| | |
| | | console.log(response) |
| | | if(response.msg === "3"){ |
| | | this.cakeLamp.release= 1 //允许放行 |
| | | }else if(response.msg === "2"){ |
| | | this.$message.error('扫码重复请重新扫码!'); |
| | | } |
| | | this.getListFormulaChild() |
| | | }); |
| | |
| | | } |
| | | |
| | | if(self.headContent.sfcCode=== ''||self.headContent.sfcCode=== null){ |
| | | self.$message('总成码为空,请检查!') |
| | | self.$message('总成码为空,请扫码!') |
| | | return |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | }else { |
| | | self.$message('未绑定小车码禁止放行'); |
| | | self.$alert('<strong style="color: red;font-size: 30px">未扫描小车码禁止放行</strong>', '提示', { |
| | | dangerouslyUseHTMLString: true |
| | | }); |
| | | } |
| | | }); |
| | | } else if (event.data.includes("[")) { |
| | |
| | | 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 |
| | | } |
| | | if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){ |
| | | self.$message('未找到参数码,请检查参数码是否正确'); |
| | | return; |
| | | } |
| | | if(self.headContent.sfcCode!==null||self.headContent.sfcCode!==''){ |
| | | addTighteningParameters(param).then(response => {}); |
| | | updateTighteningFormula(param).then(response => { |
| | | //addTighteningParameters(param).then(response => {}); |
| | | self.getListFormulaChild() |
| | | }).catch(error =>{ |
| | | self.getListFormulaChild() |
| | |
| | | else { |
| | | const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, ''); |
| | | console.log("串口收到数据-------------------"+scanValue) |
| | | |
| | | console.log("sfc=--"+this.headContent.sfcCode+"--") |
| | | if(this.headContent.sfcCode !== '' && this.headContent.sfcCode !== null |
| | | && this.headContent.sfcCode !== undefined){ |
| | | if(scanValue.includes("P9900173252")){ |