diff --git a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue index 82e528a..b230187 100644 --- a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue +++ b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue @@ -124,8 +124,6 @@ {{'新增'}} - {{'编辑'}} - 打印标签--> - 删除 - + --> - - - - - - - - - - + + + + + + + + + + + + + + + this.orderDetailData.qtyRequired){ - this.$alert('领取数量不可大于工单/派工数量!', '提示', { - confirmButtonText: '确定' - }) + this.$message.error('领取数量不可大于工单/派工数量!'); + return false + } + + //校验如果是BOM物料的话,领料数量不能大于工单数量 + if ((this.orderDetailData.issureQty + this.orderDetailData.alreadyApplyTotal) > this.orderDetailData.qtyRequired){ + this.$message.error('申请总和不可超出工单/派工数量!'); return false } } - + if (!this.orderDetailData.needDate) { - this.$alert('请选择要求发料时间!', '提示', { - confirmButtonText: '确定' - }) + this.$message.error('请选择要求发料时间'); return false } if (!this.orderDetailData.issureQty || this.orderDetailData.issureQty <= 0) { - this.$alert('请填写领取数量!', '提示', { - confirmButtonText: '确定' - }) + this.$message.error('请填写领取数量'); return false } @@ -2720,7 +2712,8 @@ itemNo: 0, workCenterNo: '', needDate: '', - materialType: 'BOM物料' + materialType: 'BOM物料', + alreadyApplyTotal: 0 } } else { this.$alert(data.msg || '保存失败', '错误', { @@ -2788,6 +2781,7 @@ this.orderDetailData.itemNo = ''; this.orderDetailData.workCenterNo = ''; this.orderDetailData.issureQty = 0; + this.orderDetailData.alreadyApplyTotal = 0; }, //派工单选择部分 @@ -2870,6 +2864,7 @@ this.orderDetailData.partDesc = row.partDesc || ''; this.orderDetailData.partNo = row.partNo || ''; this.orderDetailData.workCenterNo = row.sWorkcenterno || ''; + this.orderDetailData.alreadyApplyTotal = row.alreadyApplyTotal || 0; this.orderDetailData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm:ss'); // 根据物料类型设置 @@ -2957,6 +2952,7 @@ this.orderDetailData.partNo = row.partNo || ''; this.orderDetailData.partDesc = row.partDescription || ''; this.orderDetailData.qtyRequired = row.lotSize || ''; + this.orderDetailData.alreadyApplyTotal = row.alreadyApplyTotal || 0; // 清空相关字段 this.orderDetailData.seqNo = '';