1
This commit is contained in:
@@ -122,8 +122,8 @@ test('requires FBA warehouse and cargo-level shipment, reference, SKU and UPC fi
|
||||
assert.ok(errors.includes('FBA 订单请填写 Amazon 仓库编码'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少客户 SKU'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少 UPC'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少 Shipment ID'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少 Reference ID'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少货件编号'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少跟踪编号'))
|
||||
})
|
||||
|
||||
test('requires public destination ids while keeping private addresses detached from public warehouses', () => {
|
||||
|
||||
@@ -123,8 +123,8 @@ export function validateFirstLegOrderDraft(draft: FirstLegOrderDraft) {
|
||||
if (!item.packageType.trim()) errors.push(`${line}缺少包装类型`)
|
||||
if (draft.destinationType === 'FBA' && !item.sku.trim()) errors.push(`${line}缺少客户 SKU`)
|
||||
if (draft.destinationType === 'FBA' && !item.upc.trim()) errors.push(`${line}缺少 UPC`)
|
||||
if (draft.destinationType === 'FBA' && !item.shipmentId.trim()) errors.push(`${line}缺少 Shipment ID`)
|
||||
if (draft.destinationType === 'FBA' && !item.referenceId.trim()) errors.push(`${line}缺少 Reference ID`)
|
||||
if (draft.destinationType === 'FBA' && !item.shipmentId.trim()) errors.push(`${line}缺少货件编号`)
|
||||
if (draft.destinationType === 'FBA' && !item.referenceId.trim()) errors.push(`${line}缺少跟踪编号`)
|
||||
if (!Number.isInteger(item.pieces) || item.pieces <= 0) errors.push(`${line}件数必须为正整数`)
|
||||
if (!Number.isInteger(item.packageCount) || item.packageCount <= 0) errors.push(`${line}箱数必须为正整数`)
|
||||
if (!Number.isInteger(item.unitsPerPackage) || item.unitsPerPackage <= 0) errors.push(`${line}每箱数量必须为正整数`)
|
||||
|
||||
Reference in New Issue
Block a user