优化
This commit is contained in:
@@ -11,7 +11,7 @@ function slotPath(no, slot) {
|
||||
}
|
||||
export function normalizeLoadingDocuments(value, no) {
|
||||
if (value?.dispatchNo !== no || !/^\d+$/.test(String(value.recordVersion ?? '')) || !Array.isArray(value.photos)
|
||||
|| !['AFTER_LOADING', 'DELIVERING', 'DELIVERED'].includes(value.stage)) throw new Error('装车资料与当前排车事实不一致')
|
||||
|| !['LOADING', 'AFTER_LOADING', 'DELIVERING', 'DELIVERED'].includes(value.stage)) throw new Error('装车资料与当前排车事实不一致')
|
||||
const slots = new Set()
|
||||
for (const photo of value.photos) {
|
||||
if (!loadingPhotoSlots.includes(photo.slot) || !photo.fileId || slots.has(photo.slot)) throw new Error('装车照片引用不完整或重复')
|
||||
|
||||
Reference in New Issue
Block a user