.+?(?=
)/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="AMAZON_PICKUP"/)
assert.match(view, /label="客户自提" value="CUSTOMER_PICKUP"/)
assert.match(api, /RelabelDeliveryMethod = 'TRUCK' \| 'EXPRESS' \| 'AMAZON_PICKUP' \| 'CUSTOMER_PICKUP'/)
assert.match(view, /labelingMode\.value !== 'sku' && !form\.deliveryMethod/)
})
test('一次申请单选库存来源且退货库存按退货单汇总', () => {
assert.doesNotMatch(view, /multiple filterable collapse-tags/)
assert.match(view, /returnSourceNos\(item\)\.includes\(selectedReturnOrderNo\.value\)/)
assert.match(view, /current\.availablePackages \+= inventoryQuantity\(candidate\.availablePackages\)/)
assert.match(view, /availablePackages: inventoryQuantity\(candidate\.availablePackages\)/)
assert.match(view, /const quantity = Number\(value\)/)
assert.match(view, /可用包裹<\/h3>/)
assert.match(view, /仓库箱识别码/)
assert.match(view, /箱内 SKU/)
assert.match(view, /returnLooseCandidates/)
assert.match(view, /returnBoxCandidates/)
assert.doesNotMatch(view, /submitReturnRelabel/)
assert.doesNotMatch(view, /candidate\.sourceType === 'RETURN_CARTON'\) rows\.push\(\.\.\.Array\.from/)
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; returnCartonId\?: string/)
})
test('退货贴标复用普通申请,混贴要求两份总文件', () => {
assert.match(view, /cartonTotalFile\.value && !requiresBothTotalFiles\.value\) clearCreateTotalFile\('SKU_TOTAL'\)/)
assert.match(view, /skuTotalFile\.value && !requiresBothTotalFiles\.value\) clearCreateTotalFile\('CARTON_TOTAL'\)/)
assert.match(view, /const created = await createRelabel/)
assert.doesNotMatch(view, /&& !isReturnRelabelSource.value && labelingMode.value === 'carton_and_sku'/)
})
test('SKU 和箱唛都换时两份总文件必须同时上传', () => {
assert.match(view, /labelingMode\.value === 'carton_and_sku'/)
assert.match(view, /requiresBothTotalFiles\.value && \(!cartonTotalFile\.value \|\| !skuTotalFile\.value\)/)
assert.match(view, /必须同时上传箱唛总文件和 SKU 总文件/)
assert.match(view, /requiresBothTotalFiles \? '和' : '或'/)
assert.match(view, /必传 · 两份文件/)
})
test('海外操作仓和FBA目的仓使用独立字段', () => {
assert.match(api, /operationWarehouseId: string/)
assert.match(api, /destinationFbaWarehouseCode\?: string/)
assert.match(view, /operationWarehouseId: form\.warehouse/)
assert.match(view, /destinationFbaWarehouseCode: form\.destination/)
assert.match(view, /FBA 目的仓<\/span> {
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/)
})
test('客户可在换标列表或详情确认完工且照片使用二进制下载', () => {
assert.match(view, /item\.__status === 'CUSTOMER_CONFIRM_PENDING'/)
assert.match(view, /confirmRelabelFromList\(item\['0'\]\)/)
assert.match(view, /selectedRelabelDetail\?\.application\.status === 'CUSTOMER_CONFIRM_PENDING'/)
assert.match(view, /@click="confirmSelectedRelabel">确认换标完成/)
assert.match(api, /apiBlobRequest/)
})
test('客户详情进入页面后直接回显完工照片并支持大图预览', () => {
assert.match(view, /void loadCompletionPhotos\(\)/)
assert.match(view, /class="warehouse-photo-grid"/)
assert.match(view, /照片 \{\{ index \+ 1 \}\}<\/el-button>/)
})
test('进入复核后客户订单回显换标完成状态', () => {
assert.match(view, /CUSTOMER_CONFIRM_PENDING: '待客户确认'/)
assert.match(view, /READY_FOR_OUTBOUND: '换标完成'/)
})
test('审核驳回后展示原因并允许替换资料后重新提交', () => {
assert.match(api, /export function resubmitRelabel\(/)
assert.match(view, / |