From fd4ea6a620c5d079d3ee8ee30b943f3dea93f4eb Mon Sep 17 00:00:00 2001
From: cl <418351270@qq.com>
Date: 星期三, 07 八月 2024 11:18:35 +0800
Subject: [PATCH] 修改采集参数

---
 jcdm-ui/src/views/main/kb/stationTerminal/index.vue |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
index b1fca02..2c88940 100644
--- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
+++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -469,7 +469,7 @@
           console.log("杩涘叆鏈�缁堟柟娉�")
           self.endSaveData(param)
 
-        } else if(event.data.includes("productNum")){
+        } else if(event.data.includes("productNum")){//浜у搧搴忓垪鍙�
           let productNum = event.data.split(',')[1];
           self.headContent.sfcCode = productNum;
           self.queryParams.productNum = productNum;
@@ -478,6 +478,53 @@
           self.cakeLamp.startWork = 1
           self.cakeLamp.InPlace = 1
 
+        }else if (event.data.includes("[")) {//鎷х揣
+          let formulaChilds = "";
+          self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort);
+          self.formulaChildList
+            .filter((formulaChild) => formulaChild.operationType === '1');
+          for (let i = 0; i < self.formulaChildList.length; i++) {
+            let formulaChild = self.formulaChildList[i];
+            let results = formulaChild.results;
+
+            if (results === '' || results === null || results === 'NG') {
+              formulaChilds = formulaChild;
+              break;
+            }
+          }
+          if(formulaChilds === ""){
+            self.$message.error('鏈伐浣嶅凡宸ヤ綔瀹屾垚锛�');
+            return;
+          }
+          const param = {
+            id: formulaChilds.id,
+            tightenTheArray: event.data,
+            paramCode: formulaChilds.paramCode,
+            workOrderNo: self.workpieceInformation.workOrderNo,
+            productCode: self.workpieceInformation.productCode,
+            locationCode: self.headContent.processesCode,
+            productBarcode: self.headContent.sfcCode,
+            spareField1: formulaChilds.spareField1,
+            spareField2: formulaChilds.spareField2,
+            spareField3: formulaChilds.spareField3,
+            spareField4: formulaChilds.spareField4,
+            stepSort: formulaChilds.stepSort,
+            ngTimes: formulaChilds.ngTimes,
+          }
+          if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){
+            self.$message('鏈壘鍒板弬鏁扮爜锛岃妫�鏌ュ弬鏁扮爜鏄惁姝g‘');
+            return;
+          }
+          self.formulaChildParams.artificialNgFlag = null
+          console.log("self.formulaChildParams.artificialNgFlag"+self.formulaChildParams.artificialNgFlag)
+          if(self.headContent.sfcCode!==null||self.headContent.sfcCode!==''){
+            updateTighteningFormula(param).then(response => {
+              //addTighteningParameters(param).then(response => {});
+              self.getListFormulaChild()
+            }).catch(error =>{
+              self.getListFormulaChild()
+            });
+          }
         }
       };
     },

--
Gitblit v1.9.3