diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index 901775d..ca71914 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -778,6 +778,26 @@ export default { return true }, + // Packing List 条件必填校验(仅在 packingListFlag = Y 时生效) + validatePackingListRequired() { + if (this.scheduleData.packingListFlag !== 'Y') { + return true + } + + for (let i = 0; i < this.rowDataList.length; i++) { + const row = this.rowDataList[i] + const packingList = row && row.packingList !== undefined && row.packingList !== null + ? String(row.packingList).trim() + : '' + if (!packingList) { + this.$message.error(`Packing List不能为空`) + return false + } + } + + return true + }, + // 换班结转保存 async saveShiftChangeTransfer() { // 人员判断 @@ -1406,6 +1426,12 @@ export default { return false } + // Packing List 显示时要求必填 + if (!this.validatePackingListRequired()) { + this.yieldReportLoading = false; + return false + } + try { // 计算分卷 const rowsPerRoll = Math.floor(this.pageData.rowCount / this.pageData.rollCount)