From 552ea3be5af355ba3118020bfdc703388ec171b5 Mon Sep 17 00:00:00 2001 From: rui_li <877258667@qq.com> Date: Mon, 25 Jul 2022 12:41:59 +0800 Subject: [PATCH] =?UTF-8?q?2022-07-25=20=E7=BB=93=E6=9D=9F=E6=B4=BE?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=8E=BB=E6=8E=890=E7=9A=84=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/yieldReport/com_finish_schedule.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/modules/yieldReport/com_finish_schedule.vue b/src/views/modules/yieldReport/com_finish_schedule.vue index 3bff200..17501ed 100644 --- a/src/views/modules/yieldReport/com_finish_schedule.vue +++ b/src/views/modules/yieldReport/com_finish_schedule.vue @@ -1001,13 +1001,20 @@ finishScheduleBun() { //首先判断数值是否通过判断 let approvedQty = this.pageData.approvedQty; + let defectedQty = this.pageData.defectedQty; if (approvedQty == null || approvedQty == '') { this.$message.error('请输入总良品数量!'); this.pageData.approvedQty = 0;//重新赋值 return false; } - if (approvedQty <= 0) { - this.$message.error('总良品数量必须大于0!'); + if (approvedQty < 0) { + this.$message.error('总良品数量必须大于等于0!'); + this.pageData.approvedQty = 0;//重新赋值 + return false; + } + //校验总良品+不良的数量 + if ((approvedQty + defectedQty) <= 0) { + this.$message.error('该派工单无有效的良品或不良数量!'); this.pageData.approvedQty = 0;//重新赋值 return false; }