| | |
| | | <span style="display: none">{{cakeLamp.release}}</span> |
| | | <span> 允许放行</span> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | <el-row v-show="showInput" style="margin-top: 20px"> |
| | | <el-col></el-col> |
| | | <span style="width: 130px;" class="head-font">预装总成号 : {{headContent.yzSfcCode}}</span> |
| | | <el-row v-show="orderFlag" style="margin-top: 20px"> |
| | | <el-button @click="getWorkOrders" type="warning" size="mini">接收工单</el-button> |
| | | </el-row> |
| | | <!-- <el-row v-show="showInput" style="margin-top: 20px">--> |
| | | <!-- <el-button @click="bindYzSfc" type="primary">绑定</el-button>--> |
| | |
| | | import {listStationConf,getIpv4} from "@/api/main/sc/stationConf"; |
| | | import { |
| | | clearWorkpieceRelease, |
| | | fistSetpNumber, |
| | | fistSetpNumber, initializedData, |
| | | listFormulaChild, |
| | | noPageListFormulaChild, |
| | | releaseCheck, |
| | |
| | | bindYzSfcFlag, |
| | | checkCarCode, checkYzSfcCode, |
| | | findBytrolleyYardGetOne, |
| | | listProductionOrde, |
| | | listProductionOrde, mozuReceivingWorkOrders, |
| | | receivingWorkOrders, |
| | | trolleyYardBinDing |
| | | } from "@/api/main/om/productionOrde/productionOrde"; |
| | |
| | | saveCampaignTimeParameters, |
| | | replaceAssemblyCode, checkRecordDataDone, |
| | | } from "@/api/main/da/paramCollection/paramCollection"; |
| | | import {addFormula} from "@/api/main/bs/formula/formula"; |
| | | |
| | | export default { |
| | | name: "stationTerminal", |
| | |
| | | }, |
| | | content: '', |
| | | activeName: 'first', |
| | | url: "ws://10.103.210.248:8080/websocket/message/", |
| | | // url: "ws://192.168.2.76:8080/websocket/message/", |
| | | // url: "ws://10.103.210.248:8080/websocket/message/", |
| | | url: "ws://192.168.10.100:8080/websocket/message/", |
| | | message: "", |
| | | text_content: "", |
| | | ws: null, |
| | |
| | | originalArray: [], |
| | | yzSfcFlag: 1, |
| | | endYz: false, |
| | | orderFlag: true |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | getWorkOrders(){ |
| | | if(this.headContent.sfcCode === '' || this.headContent.sfcCode === null){ |
| | | //接收工单 |
| | | const param = { |
| | | lineCode: this.headContent.processesCode |
| | | } |
| | | mozuReceivingWorkOrders(param).then(response => { |
| | | this.headContent.sfcCode = response.msg; |
| | | this.queryParams.productNum = response.msg; |
| | | this.getList() |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | }); |
| | | }else { |
| | | this.$message.error("已经有工单了,不能接收!"); |
| | | } |
| | | }, |
| | | bindcardCode(scanValue){ |
| | | // this.$message('绑定成功!'); |
| | | let param = { |
| | |
| | | this.headContent.cardCode = rowsData.trolleyYard; |
| | | }); |
| | | this.getListFormulaChild() |
| | | // this.addOverStationCollection() |
| | | this.workpieceInformation.inboundTime = this.getCurrentTime() |
| | | }, |
| | | |
| | | initializedData(){ |
| | | const param = { |
| | | processesCode: this.headContent.processesCode, |
| | | locationCode: this.headContent.processesCode, |
| | | } |
| | | fistSetpNumber(param).then(response => { |
| | | console.log("fistSetpNumber------"+response.msg) |
| | | initializedData(param).then(response => { |
| | | if(response.msg !== ''){ |
| | | this.headContent.sfcCode = response.msg; |
| | | this.queryParams.productNum = response.msg; |
| | | this.getList() |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | } |
| | | }); |
| | | }, |
| | | |
| | |
| | | } |
| | | 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) |
| | | this.initializedData() |
| | | |
| | | }); |
| | | this.conCom() |
| | |
| | | this.$message('websocket连接成功!'); |
| | | |
| | | }; |
| | | |
| | | |
| | | //socket从后台向前台推送数据 |
| | | this.ws.onmessage = function (event) { |
| | | if (event.data === "IN") { |
| | | self.cakeLamp.InPlace = 1; |
| | |
| | | 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 => {}); |
| | | // // }); |
| | | // } |
| | | |
| | | // 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 |
| | | // }); |
| | | // } |
| | | // }); |
| | | } else if (event.data.includes("[")) { |
| | | let formulaChilds = ""; |
| | | self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort); |
| | |
| | | self.getListFormulaChild() |
| | | }); |
| | | } |
| | | }else if(event.data.includes("productNum")){ |
| | | let productNum = event.data.split(',')[1]; |
| | | self.headContent.sfcCode = productNum; |
| | | self.queryParams.productNum = productNum; |
| | | self.getList() |
| | | self.cakeLamp.scanFinish = 1 |
| | | self.cakeLamp.startWork = 1 |
| | | this.cakeLamp.InPlace = 1 |
| | | |
| | | } |
| | | }; |
| | | }, |
| | |
| | | console.log("sfc=--"+this.headContent.sfcCode+"--") |
| | | if(this.headContent.sfcCode !== '' && this.headContent.sfcCode !== null |
| | | && this.headContent.sfcCode !== undefined){ |
| | | // if(scanValue.includes("P9900173252")){ |
| | | // this.headContent.yzSfcCode = scanValue |
| | | // this.bindYzSfc(); |
| | | // }else |
| | | if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'OP240'){ |
| | | this.headContent.cardCode = scanValue |
| | | this.bindcardCode(scanValue); |
| | |
| | | this.serialPortMethod(scanValue) |
| | | } |
| | | } else { |
| | | if(this.headContent.processesCode === 'OP240'){ |
| | | // if(this.headContent.processesCode === 'OP240'){ |
| | | this.headContent.sfcCode = scanValue; |
| | | this.queryParams.productNum = scanValue; |
| | | this.getList() |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | }else { |
| | | let param = { |
| | | trolleyYard: scanValue |
| | | } |
| | | findBytrolleyYardGetOne(param).then(response => { |
| | | if(response.msg !== '2'){ |
| | | this.headContent.sfcCode = response.msg; |
| | | this.queryParams.productNum = response.msg; |
| | | this.$message('扫码识别产品序列号'+scanValue); |
| | | // this.headContent.sfcCode = scanValue; |
| | | // this.queryParams.productNum = scanValue; |
| | | this.getList() |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | }else { |
| | | this.$message('没有序列号'+scanValue); |
| | | return |
| | | } |
| | | }); |
| | | } |
| | | this.cakeLamp.InPlace = 1 |
| | | // }else { |
| | | // let param = { |
| | | // trolleyYard: scanValue |
| | | // } |
| | | // findBytrolleyYardGetOne(param).then(response => { |
| | | // if(response.msg !== '2'){ |
| | | // this.headContent.sfcCode = response.msg; |
| | | // this.queryParams.productNum = response.msg; |
| | | // this.$message('扫码识别产品序列号'+scanValue); |
| | | // this.getList() |
| | | // this.cakeLamp.scanFinish = 1 |
| | | // this.cakeLamp.startWork = 1 |
| | | // this.cakeLamp.InPlace = 1 |
| | | // }else { |
| | | // this.$message('没有序列号'+scanValue); |
| | | // return |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | } |
| | | |