Prechádzať zdrojové kódy

修改任务报工的bug

695593266@qq.com 2 mesiacov pred
rodič
commit
b7dc3ffd7b
1 zmenil súbory, kde vykonal 5 pridanie a 5 odobranie
  1. 5 5
      src/views/taskList/components/Ddtails.vue

+ 5 - 5
src/views/taskList/components/Ddtails.vue

@@ -427,9 +427,9 @@
           this.$message.warning('合格重量加不合格重量不能大于任务重量');
         }
       },
-      // 计算数量:本次报工+本次损耗 不能超过 要求完成数量 - 已报工 - 已损耗
+      // 计算数量:本次报工+本次损耗 不能超过 任务数量 - 已报工 - 已损耗
       calculateQuantity(type) {
-        const req = Number(this.current.formingNum) || 0;
+        const req = Number(this.current.quantity) || 0;
         const done = this.add(this.reportNum, this.lossNum);
         const remaining = this.sub(req, done);
         const curRep = Number(this.form.reportQuantity) || 0;
@@ -438,7 +438,7 @@
         if (curTotal > remaining) {
           this.form[type] = '';
           this.$message.warning(
-            `本次报工数与损耗数之和不能超过剩余可报数量(剩余 ${remaining})`
+            `本次报工数与损耗数之和不能超过任务剩余可报数量(剩余 ${remaining})`
           );
         }
       },
@@ -505,7 +505,7 @@
       submitAdd() {
         this.$refs.form.validate((valid) => {
           if (!valid) return;
-          const req = Number(this.current.formingNum) || 0;
+          const req = Number(this.current.quantity) || 0;
           const done = this.add(this.reportNum, this.lossNum);
           const remaining = this.sub(req, done);
           const curRep = Number(this.form.reportQuantity) || 0;
@@ -513,7 +513,7 @@
           const curTotal = this.add(curRep, curLoss);
           if (curTotal > remaining) {
             return this.$message.warning(
-              `本次报工数与损耗数之和不能超过剩余数量(剩余 ${remaining})`
+              `本次报工数与损耗数之和不能超过任务剩余可报数量(剩余 ${remaining})`
             );
           }
           // if (