feat(client): surface Excel draft import in order creation
This commit is contained in:
@@ -132,10 +132,8 @@ export function validateFirstLegOrderDraft(draft: FirstLegOrderDraft) {
|
||||
if (!Number.isInteger(item.unitsPerPackage) || item.unitsPerPackage <= 0) errors.push(`${line}每箱数量必须为正整数`)
|
||||
if (item.grossWeightKg <= 0) errors.push(`${line}毛重必须大于 0`)
|
||||
if (item.volumeCbm <= 0) errors.push(`${line}体积必须大于 0`)
|
||||
if (item.woodenProduct && draft.customsInspection !== true) errors.push(`${line}为木制品,“是否商检”必须选择“是”`)
|
||||
})
|
||||
if (draft.items.some((item) => item.woodenProduct) && draft.customsInspection !== true) {
|
||||
errors.push('木制品必须选择商检')
|
||||
}
|
||||
|
||||
return errors
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user