.+?(?=
)/s)?.[0]
assert.ok(cartonTable)
assert.match(cartonTable, /
箱数<\/th>/)
assert.match(cartonTable, / | 1 箱<\/strong><\/td>/)
assert.doesNotMatch(cartonTable, /v-model="row\.quantity"/)
assert.doesNotMatch(view, /'本次箱数'/)
assert.match(view, /totalPackageCount: 1, notifiedPackageCount: 1/)
})
test('贴标货物明细通过单一换标类型选择三种模式', () => {
assert.match(view, //)
assert.match(view, /只换箱唛<\/el-radio-button>/)
assert.match(view, /只换 SKU 标签<\/el-radio-button>/)
assert.match(view, /SKU 和箱唛都换<\/el-radio-button>/)
assert.doesNotMatch(view, /el-tab-pane label="(?:箱唛换标|SKU 换标)"/)
assert.match(view, /interface SkuRelabelRow/)
assert.match(view, /旧 SKU \*/)
assert.match(view, /仓库唛头 \*/)
assert.match(view, /换标数量(件)\*/)
assert.match(view, /旧SKU标签/)
assert.match(view, /新SKU标签/)
assert.match(view, /已读取 \$\{rows\.length\} 条绑定关系/)
assert.match(view, /applyExistingSkuBinding/)
assert.match(view, /applyExistingCartonBinding/)
assert.match(view, /buildSkuRelabelItems/)
assert.match(view, /CARTON_AND_SKU/)
assert.match(view, /changeCarton/)
assert.doesNotMatch(view, /SKU 换标提交待接口接入/)
})
test('箱唛相关换标必须选择四选一派送方式', () => {
assert.match(view, /label="卡车派送" value="TRUCK"/)
assert.match(view, /label="快递派送" value="EXPRESS"/)
assert.match(view, /label="卡车自提" value="TRUCK_PICKUP"/)
assert.match(view, /label="快递自提" value="EXPRESS_PICKUP"/)
assert.match(api, /RelabelDeliveryMethod = 'TRUCK' \| 'EXPRESS' \| 'TRUCK_PICKUP' \| 'EXPRESS_PICKUP'/)
assert.match(view, /labelingMode\.value !== 'sku' && !form\.deliveryMethod/)
})
test('一次申请单选入仓单且每项保留原库存归属', () => {
assert.doesNotMatch(view, /multiple filterable collapse-tags/)
assert.match(view, /String\(candidate\.inboundOrderId\) === inboundOrderId/)
assert.match(view, /sourceInventoryBalanceId: String\(candidate\.inventoryBalanceId\)/)
assert.match(view, /sourceInventoryPositionId: String\(position\.positionId\)/)
assert.match(view, /sourceInboundOrderId: String\(candidate\.inboundOrderId\)/)
assert.match(api, /sourceInventoryBalanceId: string; sourceInventoryPositionId: string; sourceInboundOrderId: string/)
})
test('海外操作仓和FBA目的仓使用独立字段', () => {
assert.match(api, /operationWarehouseId: string/)
assert.match(api, /destinationFbaWarehouseCode\?: string/)
assert.match(view, /operationWarehouseId: form\.warehouse/)
assert.match(view, /destinationFbaWarehouseCode: item\.destinationWarehouseId/)
assert.match(view, /| FBA 目的仓<\/th>/)
})
test('操作仓和FBA仓均从商户仓库目录按类型加载', () => {
assert.match(view, /loadAllWarehouseRecords\('FBA', getMerchantWarehouses\)/)
assert.match(view, /\['OVERSEAS', 'OVERSEAS_PARTNER'\]/)
assert.match(view, /v-for="warehouse in operationWarehouses"/)
assert.match(view, /v-for="warehouse in fbaWarehouses"/)
assert.doesNotMatch(view, /美西海外仓-ONT8/)
})
test('选择海外操作仓后自动带出仓库签收联系方式', () => {
assert.match(warehouseApi, /contactName: string \| null/)
assert.match(warehouseApi, /contactPhone: string \| null/)
assert.match(view, /form\.contact = warehouse\?\.contactName \|\| ''/)
assert.match(view, /form\.phone = warehouse\?\.contactPhone \|\| ''/)
assert.match(view, /海外仓签收联系人/)
assert.match(view, /海外仓联系电话/)
assert.doesNotMatch(view, /ElMessage\.warning\('该海外仓主数据未完整维护/)
assert.match(view, /form\.warehouse && !form\.contact[^\n]+warehouse-unmaintained[^\n]+未维护/)
assert.match(view, /form\.warehouse && !form\.phone[^\n]+warehouse-unmaintained[^\n]+未维护/)
})
test('贴标详情展示箱唛、SKU 子明细和独立FBA目的仓', () => {
assert.match(api, /export interface RelabelDetail/)
assert.match(view, /item\.cartonMark \|\| '—'/)
assert.match(view, /item\.fbaCartonMark \|\| '—'/)
assert.match(view, /item\.destinationFbaWarehouseCode/)
assert.match(view, /item\.operationType === 'CARTON_AND_SKU'/)
assert.match(view, /item\.skuItems\?\.length/)
})
| |