1
This commit is contained in:
@@ -141,9 +141,15 @@ export function validateFirstLegOrderDraft(draft: FirstLegOrderDraft) {
|
||||
}
|
||||
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}为木制品,“是否商检”必须选择“是”`)
|
||||
})
|
||||
|
||||
const woodenCargoLines = draft.items
|
||||
.map((item, index) => item.woodenProduct ? index + 1 : null)
|
||||
.filter((index): index is number => index != null)
|
||||
if (woodenCargoLines.length && draft.customsInspection !== true) {
|
||||
errors.push(`第 ${woodenCargoLines.join('、')} 条货物为木制品,“是否商检”必须选择“是”`)
|
||||
}
|
||||
|
||||
if (draft.fulfillmentType === 'ONE_CLICK_DROPSHIP') {
|
||||
const groups = new Map<string, FirstLegCargoItem>()
|
||||
draft.items.forEach((item) => {
|
||||
|
||||
Reference in New Issue
Block a user