From a4362dfe3e0e9c6fad426685da0065455799d018 Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期三, 10 七月 2024 20:06:15 +0800 Subject: [PATCH] cvt交互逻辑更新 --- jcdm-ui/src/views/main/kb/cvt/index.vue | 92 ++++++++++++++++++--------------------------- 1 files changed, 37 insertions(+), 55 deletions(-) diff --git a/jcdm-ui/src/views/main/kb/cvt/index.vue b/jcdm-ui/src/views/main/kb/cvt/index.vue index 46f132d..866977f 100644 --- a/jcdm-ui/src/views/main/kb/cvt/index.vue +++ b/jcdm-ui/src/views/main/kb/cvt/index.vue @@ -79,9 +79,8 @@ <script> import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; -import { listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection } from "@/api/main/da/passingStationCollection/passingStationCollection"; +import {listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection,initializedData } from "@/api/main/da/passingStationCollection/passingStationCollection"; import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo"; -import {setSNCode} from "@/api/main/da/opcuaconfig/opcuaconfig"; import {getIp, listStationConf} from "@/api/main/sc/stationConf"; export default { @@ -95,7 +94,7 @@ engineCheckList:[], showFlag:false, buttondisabled:true, - locationCode: "鏈厤缃�", + locationCode: "鏈厤缃甀P", locationName: "鏈厤缃伐浣�", scannerFlag: false, @@ -160,7 +159,19 @@ this.scannerFlag = true console.log("鏉$爜锛�",this.form.engineNo) if(this.form.engineNo !== null && this.form.engineNo !== undefined) { - setSNCode(this.form.engineNo, this.locationCode) + console.log("鏉$爜2锛�",this.locationCode) + initializedData({sfcCode:this.form.engineNo,locationCode:this.locationCode}).then(res =>{ + if(res.code===500){ + this.$createElement; + }else { + addPassingStationCollection({sfcCode:this.form.engineNo,locationCode:this.locationCode}).then(res =>{ + console.log("rrrrr",res)}) + this.$message({ + message: '鎵爜鎴愬姛', + type: 'success' + }); + } + }) }else{ this.reset(); this.buttondisabled = true @@ -175,9 +186,30 @@ offset:300 }); } + } + // this.AddEngineNo(); }, + handleScannerInput111(event){ + const param = { + sfcCode: this.from.engineNo, + } + addPassingStationCollection(param).then(response => { + }); + }, + + + // AddEngineNo(){ + // const param = { + // locationCode: this.from.locationCode, + // sfcCode: this.from.engineNo, + // // locationCode:"OP110", + // // sfcCode:"666", + // + // } + // addPassingStationCollection(param).then(response =>{}); + // }, getStationConf() { getIp().then(response => { @@ -207,52 +239,7 @@ EngineNohandleChange(){ console.log('鏉$爜锛�',this.form.engineNo) if(this.form.engineNo !== null && this.form.engineNo !== undefined){ - //let OrderSchedulingParam = {engineNo: null} setSNCode(this.form.engineNo,this.locationCode) - //OrderSchedulingParam.engineNo = this.form.engineNo; - /* listOrderScheduling(OrderSchedulingParam).then(response => { - if(response.total === 1 ){ - this.form.productType = response.rows[0].model - this.form.orderNo = response.rows[0].orderNo - this.form.qualityStatus = response.rows[0].qualityStatus - this.form.currentWorkstation = response.rows[0].currentWorkstation - this.form.add= response.rows[0].currentWorkstation+ response.rows[0].qualityStatus - if(this.form.qualityStatus ==='涓嶅悎鏍�'){ - this.buttondisabled = false; - } - else{ - this.buttondisabled = true; - } - } - else{ - this.reset(); - this.buttondisabled = true - const h = this.$createElement; - this.$message({ - message: h('p',null, [ - h('span', null, '璀﹀憡 '), - h('i', { style: 'color: black' }, '杈撳叆鐨勫彂鍔ㄦ満鍙锋湁璇�'), - h()]), - type: 'error', - center: true, - offset:300 - }); - } - });*/ - /*let PassingStationCollectionParam = {sfcCode: null} - PassingStationCollectionParam.sfcCode = this.form.engineNo; - listPassingStationCollection(PassingStationCollectionParam).then(ponse =>{ - this.engineCheckList = ponse.rows.locationCode ; - if(ponse.rows.length >= 1 && this.form.engineNo !== undefined){ - this.form.engineCheckList = '' - for (let i = 0; i < ponse.rows.length; i++) { - this.form.engineCheckList += ' 宸ヤ綅:'+ ponse.rows[i].locationCode+'['+ponse.rows[i].outRsSign+']' - } - } - else{ - this.form.engineCheckList = '鏆傛棤鏁版嵁' - } - });*/ } }, @@ -282,10 +269,5 @@ justify-content: center; margin-top: 5px } -/*.my-custom-modal .el-dialog__wrapper {*/ -/* width: 400px; !* 璁剧疆瀹藉害 *!*/ -/* height: 200px; !* 璁剧疆楂樺害 *!*/ -/* top: 50px; !* 璁剧疆璺濈椤甸潰椤堕儴鐨勪綅缃� *!*/ -/* left: 50px; !* 璁剧疆璺濈椤甸潰宸︿晶鐨勪綅缃� *!*/ -/*}*/ + </style> -- Gitblit v1.9.3