| | |
| | | <span class="head-font">工位编号 : {{headContent.processesCode}}</span> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="17"> |
| | | <el-col :span="7"> |
| | | <el-card shadow="never"> |
| | | <span class="head-font">工位名称 : {{headContent.processesName}}</span> |
| | | <!-- <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">串口连接</el-button>--> |
| | | <!-- <el-button @click="clearClick" style="float: right" type="danger" size="mini">清除</el-button>--> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-card shadow="never"> |
| | | <span class="head-font">模组码 : {{headContent.module}}</span> |
| | | <!-- <el-input v-model="content" style="float: right;width: 150px;" placeholder="请输入内容"></el-input>--> |
| | | <!-- <el-button @click="scanCompleted" style="float: right" type="primary">扫码完成</el-button>--> |
| | | <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">串口连接</el-button> |
| | | <el-button @click="clearClick" style="float: right" type="danger" size="mini">清除</el-button> |
| | | </el-card> |
| | | </el-col> |
| | | <!-- <el-col :span="10">--> |
| | | <!-- <el-card shadow="never">--> |
| | | <!-- <span class="head-font">产品序列号 : {{headContent.sfcCode}}</span>--> |
| | | <!--<!– <el-input v-model="content" style="float: right;width: 150px;" placeholder="请输入内容"></el-input>–>--> |
| | | <!--<!– <el-button @click="scanCompleted" style="float: right" type="primary">扫码完成</el-button>–>--> |
| | | <!-- <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">串口连接</el-button>--> |
| | | <!-- <el-button @click="clearClick" style="float: right" type="danger" size="mini">清除</el-button>--> |
| | | <!-- </el-card>--> |
| | | <!-- </el-col>--> |
| | | |
| | | </el-row> |
| | | <el-row :gutter="5" style="margin-top: 5px"> |
| | |
| | | <i class="el-icon-tickets"></i> |
| | | <span style="font-weight: bold">当前工位信息</span> |
| | | </div> |
| | | <el-descriptions :column="1" border :content-style="{'min-width': '140px'}"> |
| | | <el-descriptions-item label="开始时间"> |
| | | <span>{{workpieceInformation.inboundTime}}</span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-divider></el-divider> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-button class="circle-button" :class="cakeLamp.plcState ? 'circle-green-animate':'circle-red'" circle></el-button> |
| | |
| | | <span> 允许放行</span> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | <el-divider></el-divider> |
| | | <el-row style="margin-top: 20px"> |
| | | <span style="width: 130px;" class="head-font">模组码A : {{headContent.moduleA}}</span> |
| | | </el-row> |
| | | <el-row style="margin-top: 20px"> |
| | | <span style="width: 130px;" class="head-font">模组码B : {{headContent.moduleB}}</span> |
| | | </el-row> |
| | | </el-card> |
| | | |
| | |
| | | import {listWorkReport} from "@/api/main/om/workReport/workReport"; |
| | | import {listStationConf,getIpv4} from "@/api/main/sc/stationConf"; |
| | | import { |
| | | clearWorkpieceRelease, inPlaceInspection, |
| | | jrmUpdateResults, jrmWorkpieceRelease, |
| | | listFormulaChild, |
| | | noPageListFormulaChild, |
| | |
| | | sfcCode: '', |
| | | yzSfcCode: '', |
| | | cardCode: '', |
| | | moduleA: '', |
| | | moduleB: '', |
| | | module: '', |
| | | // moduleB: '', |
| | | }, |
| | | workpieceInformation: { |
| | | workOrderNo: null, |
| | | productCode: null, |
| | | productModel: null, |
| | | productName: null, |
| | | beat: null, |
| | | inboundTime: null, |
| | | }, |
| | | // 查询参数 |
| | | queryParams: { |
| | |
| | | }, |
| | | content: '', |
| | | activeName: 'first', |
| | | // url: "ws://192.168.2.248:8080/websocket/message/", |
| | | // url: "ws://10.103.210.248:8080/websocket/message/", |
| | | url: "ws://192.168.2.76:8080/websocket/message/", |
| | | message: "", |
| | | text_content: "", |
| | |
| | | serialPortMethod(value){ |
| | | let formulaChildParams = { |
| | | scanBarcode: value, |
| | | sfcBarcode: this.headContent.moduleA+','+this.headContent.moduleB, |
| | | // workOrderNo: this.workpieceInformation.workOrderNo, |
| | | productCode: '1P102S', |
| | | sfcBarcode: this.headContent.module, |
| | | // workOrderNo: '-', |
| | | productCode: 'PE01B', |
| | | locationCode: this.headContent.processesCode, |
| | | collectionTime: new Date() |
| | | } |
| | |
| | | } |
| | | return ''; |
| | | }, |
| | | getCurrentTime() { |
| | | const now = new Date(); |
| | | const year = now.getFullYear(); |
| | | const month = this.padTimeUnit(now.getMonth() + 1); // 月份是从0开始的 |
| | | const day = this.padTimeUnit(now.getDate()); |
| | | const hours = this.padTimeUnit(now.getHours()); |
| | | const minutes = this.padTimeUnit(now.getMinutes()); |
| | | const seconds = this.padTimeUnit(now.getSeconds()); |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | }, |
| | | padTimeUnit(value) { |
| | | return value.toString().padStart(2, '0'); |
| | | }, |
| | | getElement() { |
| | | let temp33 = document.getElementsByClassName('el-table__row') |
| | | console.log('temp33',temp33) |
| | |
| | | getListFormulaChild() { |
| | | console.log('getListFormulaChild') |
| | | // this.formulaChildList = [] |
| | | this.formulaChildParams.productCode = '1P102S' |
| | | this.formulaChildParams.productCode = 'PE01B' |
| | | this.formulaChildParams.processesCode = this.headContent.processesCode |
| | | console.log(this.formulaChildParams) |
| | | noPageListFormulaChild(this.formulaChildParams).then(response => { |
| | |
| | | this.workpieceInformation.productModel = null; |
| | | this.workpieceInformation.productName = null; |
| | | this.headContent.sfcCode = ''; |
| | | this.headContent.moduleB = ''; |
| | | this.headContent.moduleA = ''; |
| | | this.workpieceInformation.inboundTime = null; |
| | | this.headContent.module = ''; |
| | | }, |
| | | changeMenu(tab, event) { |
| | | console.log(tab, event); |
| | | }, |
| | | clearClick(){ |
| | | const param = { |
| | | workOrderNo: this.workpieceInformation.workOrderNo, |
| | | productCode: "1P102S", |
| | | productCode: "PE01B", |
| | | locationCode: this.headContent.processesCode, |
| | | productBarcode: this.headContent.moduleA+','+this.headContent.moduleB, |
| | | } |
| | | jrmSaveCampaignTimeParameters(param).then(response => {}); |
| | | this.cakeLamp.release = 1; |
| | | // jrmSaveCampaignTimeParameters(param).then(response => {}); |
| | | // this.cakeLamp.release = 1; |
| | | this.endClear() |
| | | clearWorkpieceRelease(param).then(response => {}); |
| | | // workpieceRelease(param).then(response => {}); |
| | | jrmWorkpieceRelease(param).then(response => {}); |
| | | // this.$message('这是一条清除消息提示'); |
| | | // jrmWorkpieceRelease(param).then(response => {}); |
| | | this.$message('这是一条清除消息提示'); |
| | | // this.headContent.sfcCode = null |
| | | }, |
| | | scanCompleted(){ |
| | |
| | | }, |
| | | /** 查询工单列表 */ |
| | | async getList() { |
| | | this.workpieceInformation.inboundTime = this.getCurrentTime() |
| | | this.getListFormulaChild() |
| | | this.addOverStationCollection() |
| | | // this.addOverStationCollection() |
| | | }, |
| | | |
| | | /** 入站增加过站采集记录 **/ |
| | |
| | | locationCode: this.headContent.processesCode, |
| | | // model: this.workpieceInformation.productModel, |
| | | // productBarcode: this.headContent.sfcCode, |
| | | sfcCode: this.headContent.moduleA+','+this.headContent.moduleB, |
| | | sfcCode: this.headContent.module, |
| | | inboundTime: new Date() |
| | | } |
| | | jrmAddPassingStationCollection(this.passingStationForm).then(response => {}); |
| | |
| | | } |
| | | 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 |
| | | } |
| | | |
| | | inPlaceInspection({processesCode: this.headContent.processesCode}).then(response => { |
| | | console.log(response) |
| | | this.cakeLamp.InPlace = response.data |
| | | }); |
| | | |
| | | console.log('设置工位编码' + this.headContent.processesCode) |
| | | }); |
| | |
| | | } else if (event.data === "OUT") { |
| | | self.cakeLamp.release = 1; |
| | | } else if (event.data === "END") { |
| | | const formulaChildIndex = self.formulaChildList.length-1 |
| | | |
| | | if(self.headContent.module=== ''||self.headContent.module=== null){ |
| | | self.$message.error('模组码为空,请扫码!') |
| | | return; |
| | | } |
| | | |
| | | if(self.formulaChildList[formulaChildIndex].results !== 'OK'){ |
| | | self.$message('未做完工序禁止放行'); |
| | | return; |
| | | } |
| | | |
| | | const param = { |
| | | workOrderNo: self.workpieceInformation.workOrderNo, |
| | | productCode: "1P102S", |
| | | productCode: "PE01B", |
| | | locationCode: self.headContent.processesCode, |
| | | productBarcode: self.headContent.moduleA+','+self.headContent.moduleB, |
| | | productBarcode: self.headContent.module, |
| | | inboundTime: self.workpieceInformation.inboundTime, |
| | | workOrderNo: '-' |
| | | } |
| | | jrmSaveCampaignTimeParameters(param).then(response => {}); |
| | | self.cakeLamp.release = 1; |
| | |
| | | const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, ''); |
| | | console.log("串口收到数据-------------------"+scanValue) |
| | | |
| | | if(this.headContent.moduleA !== '' && this.headContent.moduleB !== '' ){ |
| | | if(this.headContent.module !== ''){ |
| | | console.log('this.headContent.module !== \'\' true') |
| | | this.$message('扫码模组物料码'+scanValue); |
| | | this.serialPortMethod(scanValue) |
| | | } else { |
| | | if(scanValue.includes("9900168135")){ |
| | | this.headContent.moduleA = scanValue; |
| | | } |
| | | if(scanValue.includes("9900168136")){ |
| | | this.headContent.moduleB = scanValue; |
| | | console.log('this.headContent.module !== \'\' false') |
| | | if(scanValue.includes("0RSMB")){ |
| | | this.headContent.module = scanValue; |
| | | this.$message('扫码识别产品序列号'+scanValue); |
| | | this.getList() |
| | | // this.cakeLamp.InPlace = 1 |
| | | this.cakeLamp.scanFinish = 1 |
| | | this.cakeLamp.startWork = 1 |
| | | }else { |
| | | this.$message.error('扫码识别错误的产品序列号'+scanValue+'请重新扫码'); |
| | | } |
| | | } |
| | | } |