diff --git a/src/api/receiving-adapter.js b/src/api/receiving-adapter.js index e7e0925..eda9108 100644 --- a/src/api/receiving-adapter.js +++ b/src/api/receiving-adapter.js @@ -62,6 +62,7 @@ export function normalizeReceivingCandidate(value = {}) { ...value, sourceContainerBookingId: typeof value.sourceContainerBookingId === 'string' ? value.sourceContainerBookingId.trim() : '', containerNo: String(value.containerNo || '').trim(), + cabinetNo: text(value.cabinetNo), overseasWarehouseCode: text(value.overseasWarehouseCode), overseasWarehouseName: text(value.overseasWarehouseName), plannedArrivalAt: typeof value.plannedArrivalAt === 'string' && value.plannedArrivalAt.trim() ? value.plannedArrivalAt.trim() : null, @@ -95,6 +96,7 @@ export function normalizeReceivingSession(value) { ...value, overseasWarehouseCode: text(value.overseasWarehouseCode), overseasWarehouseName: text(value.overseasWarehouseName), + cabinetNo: text(value.cabinetNo), photos: RECEIVING_PHOTO_ROLES.map((role) => photos.find((photo) => photo?.role === role && photo?.fileId)).filter(Boolean), domesticLoadingPhotos, totalPackages: number(value.totalPackages), diff --git a/src/components/DispatchLoadingDocuments.vue b/src/components/DispatchLoadingDocuments.vue index 1160a5c..9c641ce 100644 --- a/src/components/DispatchLoadingDocuments.vue +++ b/src/components/DispatchLoadingDocuments.vue @@ -91,10 +91,11 @@ export default { throw cause } saved++; await this.previews() + if (!this.editable) break } uni.showToast({ title: this.snapshot.stage === 'DELIVERING' && this.snapshot.complete ? '资料齐全,已进入派送中' : `已保存${saved}张照片`, icon: 'none' }) }) - if ((saved || reconciled) && this.active) this.$emit('saved') + if ((saved || reconciled) && this.active) this.$emit('saved', this.snapshot) }, preview(url) { uni.previewImage({ current: url, urls: [url] }) }, async viewPdf(photo) { @@ -117,7 +118,7 @@ export default { try { this.ensureScope(); saved = await work() === true } catch (cause) { if (this.active && !String(cause.errMsg || '').includes('cancel')) { this.error = toDispatchError(cause, '装车资料操作失败,请重新操作') } } finally { if (this.active) { this.busy = false; this.$emit('busy-change', false) } } - if (saved && notify && this.active) this.$emit('saved') + if (saved && notify && this.active) this.$emit('saved', this.snapshot) } } } diff --git a/src/components/ReceivingSessionSummary.vue b/src/components/ReceivingSessionSummary.vue index 23f5d88..24cea55 100644 --- a/src/components/ReceivingSessionSummary.vue +++ b/src/components/ReceivingSessionSummary.vue @@ -1,7 +1,7 @@