From 5030f3d30ccc1bd16db371c6970a48103aff9191 Mon Sep 17 00:00:00 2001 From: yyt <306727702@qq.com> Date: 星期一, 03 六月 2024 13:56:57 +0800 Subject: [PATCH] 380新产品,优化 --- jcdm-ui/src/views/main/cfkb/crankshaftUp/index.vue | 40 ++++++++++++++++++++++++++++++++++++---- 1 files changed, 36 insertions(+), 4 deletions(-) diff --git a/jcdm-ui/src/views/main/cfkb/crankshaftUp/index.vue b/jcdm-ui/src/views/main/cfkb/crankshaftUp/index.vue index 180fe9b..e8fb564 100644 --- a/jcdm-ui/src/views/main/cfkb/crankshaftUp/index.vue +++ b/jcdm-ui/src/views/main/cfkb/crankshaftUp/index.vue @@ -57,7 +57,7 @@ <span>{{queryParams.scanObject2}}</span> </el-descriptions-item> <el-descriptions-item label="缁撴灉"> - <span style="color: #FFFFFF;" :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span> + <span style="color: #FFFFFF;" :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.words}}</span> </el-descriptions-item> </el-descriptions> <el-divider></el-divider> @@ -70,6 +70,7 @@ import VueQr from 'vue-qr' import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules"; import {listStationConf,getIp} from "@/api/main/sc/stationConf"; +import {setBarcode1} from "@/api/main/da/opcuaconfig/opcuaconfig"; export default { name: "index", dicts: ['colour_hex','productseries','axisname','neckname','tilename'], @@ -119,6 +120,7 @@ neckParameterPosition: null, axisValue: null, neckValue: null, + words:"", tileColor: null, createUser: null, updateUser: null, @@ -153,11 +155,41 @@ } const input = event.target const inputValue = input.value - this.from.scanObject2 = inputValue + //this.from.scanObject2 = inputValue if (event.key === 'Enter'){ this.scannerFlag = true - console.log('鏉$爜锛�',this.from.scanObject2) - //鎵弿瀹屾垚 + this.from.scanObject2 = inputValue + //console.log('鏉$爜锛�',this.from.scanObject2,this.locationCode) + if (typeof this.from.scanObject2 !== 'undefined'&& typeof this.locationCode !== 'undefined' ) { + console.log('鏉$爜锛�',this.from.scanObject2,this.locationCode) + setBarcode1({barcode:this.from.scanObject2,locationCode:this.locationCode}).then(res => { + if (res.data===500){ + this.$message({ + message:res.msg, + type:'warning' + }) + }else { + this.$message({ + message:'鎿嶄綔鎴愬姛', + type:'success' + }) + console.log('杩斿洖锛�',res) + this.queryParams.productSeries=res.sfcCode + this.queryParams.scanObject1=res.paramValue + this.queryParams.scanObject2=this.from.scanObject2 + this.queryParams.words="鎵爜鎴愬姛"; + this.queryParams.tileColor='#00FF00'; + + } + }) + + } + //setBarcode({barcode:'1111',locationCode:'555555'}) + // //鎵弿瀹屾垚 + // if(this.form.scanObject2 !== null && this.form.scanObject2 !== undefined){ + // console.log('鏉$爜锛�',this.from.scanObject2,this.locationCode) + // //setBarcode(this.form.scanObject2,this.locationCode) + // } } }, -- Gitblit v1.9.3