| | |
| | | import {listStationConf,getIpv4} from "@/api/main/sc/stationConf"; |
| | | import { |
| | | clearWorkpieceRelease, |
| | | fistSetpNumber, |
| | | listFormulaChild, |
| | | fistSetpNumber, inPlaceInspection, |
| | | listFormulaChild, manualNgOffline, |
| | | noPageListFormulaChild, |
| | | releaseCheck, |
| | | releaseCheck, unfinishedProcess, |
| | | updateResults, |
| | | updateTighteningFormula, |
| | | workpieceRelease |
| | |
| | | addParamCollection, |
| | | addTighteningParameters, |
| | | saveCampaignTimeParameters, |
| | | replaceAssemblyCode, checkRecordDataDone, |
| | | replaceAssemblyCode, checkRecordDataDone, enterWeighing, |
| | | } from "@/api/main/da/paramCollection/paramCollection"; |
| | | |
| | | export default { |
| | |
| | | pageSize: 10, |
| | | productCode: null, |
| | | processesCode: null, |
| | | artificialNgFlag: null, |
| | | sfcBarcode: null, |
| | | }, |
| | | // 配方配置子信息表格数据 |
| | | formulaChildList: [], |
| | |
| | | originalArray: [], |
| | | yzSfcFlag: 1, |
| | | endYz: false, |
| | | artificialNgFlag: null, |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | // this.formulaChildList = [] |
| | | this.formulaChildParams.productCode = this.workpieceInformation.productCode |
| | | this.formulaChildParams.processesCode = this.headContent.processesCode |
| | | console.log(this.artificialNgFlag) |
| | | if(this.artificialNgFlag !== null){ |
| | | this.formulaChildParams.artificialNgFlag = this.artificialNgFlag |
| | | this.formulaChildParams.sfcBarcode = this.headContent.sfcCode |
| | | } |
| | | console.log(this.formulaChildParams) |
| | | noPageListFormulaChild(this.formulaChildParams).then(response => { |
| | | this.formulaChildList = response.rows; |
| | |
| | | this.headContent.sfcCode = ''; |
| | | this.headContent.yzSfcCode = ''; |
| | | this.headContent.cardCode = ''; |
| | | this.formulaChildParams.artificialNgFlag = null |
| | | this.formulaChildParams.sfcBarcode = null |
| | | }, |
| | | changeMenu(tab, event) { |
| | | console.log(tab, event); |
| | |
| | | this.workpieceInformation.productModel = rowsData.productModel; |
| | | this.workpieceInformation.productName = rowsData.productName; |
| | | this.headContent.cardCode = rowsData.trolleyYard; |
| | | this.artificialNgFlag = rowsData.artificialNgFlag; |
| | | }); |
| | | this.getListFormulaChild() |
| | | // this.addOverStationCollection() |
| | |
| | | } |
| | | this.headContent.processesName = rows.processesName |
| | | this.headContent.processesCode = rows.processesCode |
| | | if(this.headContent.processesCode === 'OP240'){ |
| | | this.onLineBinDing = true |
| | | } |
| | | if(this.headContent.processesCode === 'OP260'){ |
| | | // this.showInput = true |
| | | } |
| | | |
| | | console.log('设置工位编码' + this.headContent.processesCode) |
| | | inPlaceInspection({processesCode: this.headContent.processesCode}).then(response => { |
| | | console.log(response) |
| | | this.cakeLamp.InPlace = response.data |
| | | }); |
| | | |
| | | }); |
| | | this.conCom() |
| | |
| | | this.ws.onmessage = function (event) { |
| | | if (event.data === "IN") { |
| | | self.cakeLamp.InPlace = 1; |
| | | console.log(self.headContent.processesCode); |
| | | // const param = { |
| | | // processesCode: self.headContent.processesCode, |
| | | // } |
| | | // fistSetpNumber(param).then(response => {}); |
| | | } else if (event.data === "IN0") { |
| | | self.cakeLamp.InPlace = 0; |
| | | } else if (event.data === "NG") { |
| | | //给plc发下线信号 |
| | | //清除数据 |
| | | self.$confirm('拧紧三次NG,请确认下线!!!', '消息', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | showCancelButton: false, |
| | | type: 'warning' |
| | | }).then(() => { |
| | | self.ngFunction(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '确认成功!' |
| | | }); |
| | | }); |
| | | |
| | | } else if (event.data === "OUT") { |
| | | self.cakeLamp.release = 1; |
| | | } else if (event.data === "END") { |
| | |
| | | const formulaChildIndex = self.formulaChildList.length-1 |
| | | |
| | | if(self.headContent.sfcCode=== ''||self.headContent.sfcCode=== null){ |
| | | unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 26}).then(response => {}); |
| | | self.$message('总成码为空,请扫码!') |
| | | return; |
| | | } |
| | | |
| | | if(self.formulaChildList[formulaChildIndex].results !== 'OK'){ |
| | | self.$message('未做完工序禁止放行'); |
| | | unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 25}).then(response => {}); |
| | | return; |
| | | } |
| | | |
| | |
| | | formulaChildEntity: self.formulaChildList[formulaChildIndex] |
| | | } |
| | | |
| | | console.log("进入最终方法") |
| | | self.endSaveData(param) |
| | | |
| | | |
| | | // if(self.headContent.processesCode === "OP260"){ |
| | | // checkYzSfcCode(orderParam).then(response => { |
| | | // if(response.data === 0){ |
| | | // self.$message('未绑定总成码禁止放行'); |
| | | // return; |
| | | // }else { |
| | | // self.endSaveData(param) |
| | | // // saveCampaignTimeParameters(param).then(response => { |
| | | // // self.cakeLamp.release = 1; |
| | | // // self.endClear() |
| | | // // workpieceRelease(param).then(response => {});}); |
| | | // } |
| | | // }) |
| | | // }else { |
| | | // self.endSaveData(param) |
| | | // // saveCampaignTimeParameters(param).then(response => { |
| | | // // self.cakeLamp.release = 1; |
| | | // // self.endClear() |
| | | // // workpieceRelease(param).then(response => {}); |
| | | // // }); |
| | | // if(param.locationCode === 'POP430'){ |
| | | // let enterWeighingparam = { |
| | | // sfcCode: param.productBarcode, |
| | | // } |
| | | // enterWeighing(enterWeighingparam).then(response => { |
| | | // }); |
| | | // } |
| | | |
| | | // checkCarCode(orderParam).then(response => { |
| | | // console.log(response.data) |
| | | // if(response.data === 1){ |
| | | // if(self.headContent.processesCode === "OP260"){ |
| | | // checkYzSfcCode(orderParam).then(response => { |
| | | // if(response.data === 1){ |
| | | // saveCampaignTimeParameters(param).then(response => { |
| | | // checkRecordDataDone(param).then(response => { |
| | | // if(response.msg === "21"){ |
| | | // self.cakeLamp.release = 1; |
| | | // self.endClear() |
| | | // workpieceRelease(param).then(response => {}); |
| | | // }else { |
| | | // self.$message('未做完工序禁止放行'); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // }else { |
| | | // self.$message('请先绑定预装总成'); |
| | | // } |
| | | // }); |
| | | // }else { |
| | | // saveCampaignTimeParameters(param).then(response => { |
| | | // checkRecordDataDone(param).then(response => { |
| | | // if(response.msg === "21"){ |
| | | // self.cakeLamp.release = 1; |
| | | // self.endClear() |
| | | // workpieceRelease(param).then(response => {}); |
| | | // }else { |
| | | // self.$message('未做完工序禁止放行'); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }else { |
| | | // self.$alert('<strong style="color: red;font-size: 30px">未扫描小车码禁止放行</strong>', '提示', { |
| | | // dangerouslyUseHTMLString: true |
| | | // }); |
| | | // } |
| | | // }); |
| | | console.log("进入最终方法") |
| | | self.endSaveData(param) |
| | | } else if (event.data.includes("[")) { |
| | | let formulaChilds = ""; |
| | | self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort); |
| | |
| | | spareField2: formulaChilds.spareField2, |
| | | spareField3: formulaChilds.spareField3, |
| | | spareField4: formulaChilds.spareField4, |
| | | stepSort: formulaChilds.stepSort |
| | | stepSort: formulaChilds.stepSort, |
| | | ngTimes: formulaChilds.ngTimes, |
| | | } |
| | | if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){ |
| | | self.$message('未找到参数码,请检查参数码是否正确'); |
| | |
| | | }); |
| | | }, |
| | | |
| | | ngFunction(){ |
| | | const param = { |
| | | locationCode: this.headContent.processesCode, |
| | | sfcBarcode: this.headContent.sfcCode, |
| | | productCode: this.workpieceInformation.productCode, |
| | | } |
| | | manualNgOffline(param).then(response => {}); |
| | | clearWorkpieceRelease(param).then(releaseCheck =>{}); |
| | | this.endClear() |
| | | }, |
| | | |
| | | //接受数据的回调 |
| | | callBack(value) { |
| | | if (this.form1.isShowHistory) this.form1.desc = this.readLi().join(""); |
| | |
| | | // this.headContent.yzSfcCode = scanValue |
| | | // this.bindYzSfc(); |
| | | // }else |
| | | if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'POP240'){ |
| | | if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'POP230'){ |
| | | this.headContent.cardCode = scanValue |
| | | this.bindcardCode(scanValue); |
| | | this.serialPortMethod(scanValue) |
| | |
| | | this.serialPortMethod(scanValue) |
| | | } |
| | | } else { |
| | | if(this.headContent.processesCode === 'POP240'){ |
| | | if(this.headContent.processesCode === 'POP230'){ |
| | | this.headContent.sfcCode = scanValue; |
| | | this.queryParams.productNum = scanValue; |
| | | this.getList() |