From 5549d85f02eb085feb3dcb6c246acf44c2f0ab0e Mon Sep 17 00:00:00 2001 From: rui_li <877258667@qq.com> Date: Tue, 29 Mar 2022 11:32:25 +0800 Subject: [PATCH] =?UTF-8?q?Fqc=E6=8E=92=E4=BA=A7=E5=8F=B3=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/com_merge_roll.vue | 27 +++++++++++++++---- .../modules/yieldReport/produce_order.vue | 6 ++--- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/views/modules/yieldReport/com_merge_roll.vue b/src/views/modules/yieldReport/com_merge_roll.vue index 5e09f9e..0b840b9 100644 --- a/src/views/modules/yieldReport/com_merge_roll.vue +++ b/src/views/modules/yieldReport/com_merge_roll.vue @@ -13,7 +13,7 @@ - + @@ -155,20 +155,37 @@ export default { /*检验良品的总数量*/ checkValidQty() { + //处理老卷的数量 + let rollQty = parseInt(this.pageData.rollQty); + if (rollQty == null || rollQty == '') { + //this.$message.error('请输入新卷数量!'); + this.pageData.rollQty = 0;//重新赋值 + return false; + } + //转换成整数 + if (rollQty <= 0) { + //this.$message.error('新卷数量必须是大于零的整数!'); + this.pageData.rollQty = 0;//重新赋值 + return false; + }else{ + this.pageData.rollQty = rollQty; + } //首先判断数值是否通过判断 - let newRollQty = this.pageData.newRollQty; + let newRollQty = parseInt(this.pageData.newRollQty); if (newRollQty == null || newRollQty == '') { //this.$message.error('请输入新卷数量!'); this.pageData.newRollQty = 0;//重新赋值 return false; } - //转换成整数 - newRollQty = parseInt(newRollQty); - if (newRollQty <= 0 || !Number.isInteger(newRollQty)) { + if (newRollQty <= 0) { //this.$message.error('新卷数量必须是大于零的整数!'); this.pageData.newRollQty = 0;//重新赋值 return false; + }else{ + this.pageData.newRollQty = newRollQty; } + //计算总的数量 + this.pageData.totalQty = newRollQty + rollQty; }, /*执行是否需要提示的操作*/ diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue index 3b99476..83f1736 100644 --- a/src/views/modules/yieldReport/produce_order.vue +++ b/src/views/modules/yieldReport/produce_order.vue @@ -66,12 +66,10 @@ - + - + 显示已结束派工单