From 0a926b3ce629047a88dbc65cc38ec86c43520336 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期五, 07 三月 2025 16:33:09 +0800 Subject: [PATCH] -换型bug修改 --- jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue | 172 +++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 112 insertions(+), 60 deletions(-) diff --git a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue index 2eddd7a..ad940b7 100644 --- a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue @@ -1,27 +1,40 @@ <template> <div class="app-container"> <el-row :gutter="5"> - <el-col :span="7"> + <el-col :span="5"> <el-card shadow="never"> <span class="head-font">宸ヤ綅缂栧彿 : {{headContent.processesCode}}</span> </el-card> </el-col> - <el-col :span="17"> + <el-col :span="5"> <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="6"> + <el-card style="height: 57px" shadow="never"> + <span class="head-font">浜у搧鍨嬪彿 : </span> + <el-select style="width: 70%;margin-top: -10px" v-model="selectProductCode" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-card> + </el-col> + <el-col :span="8"> + <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"> @@ -31,6 +44,12 @@ <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> @@ -67,13 +86,6 @@ <span> 鍏佽鏀捐</span> </el-col> - </el-row> - <el-divider></el-divider> - <el-row style="margin-top: 20px"> - <span style="width: 130px;" class="head-font">妯$粍鐮丄 : {{headContent.moduleA}}</span> - </el-row> - <el-row style="margin-top: 20px"> - <span style="width: 130px;" class="head-font">妯$粍鐮丅 : {{headContent.moduleB}}</span> </el-row> </el-card> @@ -245,7 +257,8 @@ import {listWorkReport} from "@/api/main/om/workReport/workReport"; import {listStationConf,getIpv4} from "@/api/main/sc/stationConf"; import { - jrmUpdateResults, + clearWorkpieceRelease, inPlaceInspection, + jrmUpdateResults, jrmWorkpieceRelease, listFormulaChild, noPageListFormulaChild, releaseCheck, @@ -277,6 +290,17 @@ name: "stationTerminal", data() { return { + selectProductCode: 'PE01B', + options: [{ + value: 'PE01B', + label: 'PE01B' + }, { + value: 'PE01F', + label: 'PE01F' + }, { + value: 'PE01H', + label: 'PE01H' + }], carCode: '', showInput: false, onLineBinDing: false, @@ -299,15 +323,15 @@ sfcCode: '', yzSfcCode: '', cardCode: '', - moduleA: '', - moduleB: '', + module: '', + // moduleB: '', }, workpieceInformation: { workOrderNo: null, productCode: null, productModel: null, productName: null, - beat: null, + inboundTime: null, }, // 鏌ヨ鍙傛暟 queryParams: { @@ -331,6 +355,8 @@ }, 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: "", @@ -409,19 +435,6 @@ serialLink() { this.open1 = true }, - bindYzSfc(){ - if(this.headContent.sfcCode!==""&&this.headContent.yzSfcCode!==""){ - let param = { - sfcCode: this.headContent.sfcCode, - locationCode: this.headContent.processesCode, - yzSfcCode: this.headContent.yzSfcCode - } - this.$message('鍙互缁戝畾锛�'); - replaceAssemblyCode(param).then(response => { - - }); - } - }, Release(){ // this.$message('portsList锛�'+this.portsList.length); if(this.btnType === "danger"){ @@ -435,9 +448,9 @@ 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: this.selectProductCode, locationCode: this.headContent.processesCode, collectionTime: new Date() } @@ -457,6 +470,19 @@ } 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) @@ -472,7 +498,7 @@ getListFormulaChild() { console.log('getListFormulaChild') // this.formulaChildList = [] - this.formulaChildParams.productCode = '1P102S' + this.formulaChildParams.productCode = this.selectProductCode this.formulaChildParams.processesCode = this.headContent.processesCode console.log(this.formulaChildParams) noPageListFormulaChild(this.formulaChildParams).then(response => { @@ -511,15 +537,25 @@ 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 = { + productCode: this.selectProductCode, + locationCode: this.headContent.processesCode, + } + // jrmSaveCampaignTimeParameters(param).then(response => {}); + // this.cakeLamp.release = 1; + this.endClear() + clearWorkpieceRelease(param).then(response => {}); + // workpieceRelease(param).then(response => {}); + // jrmWorkpieceRelease(param).then(response => {}); this.$message('杩欐槸涓�鏉℃竻闄ゆ秷鎭彁绀�'); - this.headContent.sfcCode = null + // this.headContent.sfcCode = null }, scanCompleted(){ this.$message('鎵爜瀹屾垚'+this.content); @@ -533,8 +569,9 @@ }, /** 鏌ヨ宸ュ崟鍒楄〃 */ async getList() { + this.workpieceInformation.inboundTime = this.getCurrentTime() this.getListFormulaChild() - this.addOverStationCollection() + // this.addOverStationCollection() }, /** 鍏ョ珯澧炲姞杩囩珯閲囬泦璁板綍 **/ @@ -547,7 +584,7 @@ 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 => {}); @@ -580,12 +617,11 @@ } 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) }); @@ -605,16 +641,30 @@ } 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: self.selectProductCode, locationCode: self.headContent.processesCode, - productBarcode: self.headContent.sfcCode, + productBarcode: self.headContent.module, + inboundTime: self.workpieceInformation.inboundTime, + workOrderNo: '-' } jrmSaveCampaignTimeParameters(param).then(response => {}); self.cakeLamp.release = 1; self.endClear() - workpieceRelease(param).then(response => {}); + // workpieceRelease(param).then(response => {}); + jrmWorkpieceRelease(param).then(response => {}); } else if (event.data.includes("[")) { let formulaChilds = ""; self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort); @@ -655,19 +705,21 @@ 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+'璇烽噸鏂版壂鐮�'); } } } -- Gitblit v1.9.3