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; }