Explorar el Código

件数自动按照勾选的钢印号数量计算

seyason hace 1 año
padre
commit
876a08fb93

+ 16 - 0
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/fillReport.vue

@@ -177,6 +177,20 @@ export default {
         }).catch(err => { this.$toast.clear(); });
     },
     onSubmit() {
+      //核验件数
+      if (this.reportForm.finishNum >0 && this.reportForm.finishNum < 1.0) {
+        //完成件数为小数时,如果勾选了钢印号需要二次确认
+        this.$dialog.confirm({
+                    title: '提醒',
+                    message: '检测到件数为小数同时勾选了钢印号,确认该钢印号已完成吗?'
+                }).then(() => {
+                    this.submitData();
+                }).catch(() => {});
+        return
+      }
+      this.submitData();
+    },
+    submitData() {
       let postData = {
         userProcedureTeamId: this.reportForm.id,
         prodProcedureId: this.reportForm.prod_procedure_id,
@@ -217,6 +231,8 @@ export default {
     onCheckChange(names) {
       this.$forceUpdate();
       console.log(this.reportForm.checkedSteelNum);
+      //自动计算件数
+      this.reportForm.finishNum = this.reportForm.checkedSteelNum.length;
     },
     getMyPlanProcedureList() {
       const { id, reportBoolean, date } = this.$route.query;