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/BalanceShaft/index.vue |   81 ++++++++++++++--------------------------
 1 files changed, 29 insertions(+), 52 deletions(-)

diff --git a/jcdm-ui/src/views/main/cfkb/BalanceShaft/index.vue b/jcdm-ui/src/views/main/cfkb/BalanceShaft/index.vue
index b929b8c..25d3719 100644
--- a/jcdm-ui/src/views/main/cfkb/BalanceShaft/index.vue
+++ b/jcdm-ui/src/views/main/cfkb/BalanceShaft/index.vue
@@ -3,16 +3,6 @@
     <div style="width: 100%">
       <el-card class="box-card" >
         <el-form :model="from" size="large" :inline="true" label-width="68px" @submit.native.prevent>
-<!--          <el-form-item label="绠变綋鐮�:" prop="scanObject1" >-->
-<!--            <el-input-->
-<!--              style="width: 350px"-->
-<!--              v-model="from.scanObject1"-->
-<!--              placeholder="璇疯緭鍏ョ浣撶爜"-->
-<!--              clearable-->
-<!--              @keyup.enter.native="handleQuery"-->
-<!--              @input="handleQuery"-->
-<!--            />-->
-<!--          </el-form-item>-->
           <el-form-item label-width="200" label="骞宠 杞寸爜" :prop="from.scanObject2"  style="align-content: center">
             <input v-model="from.scanObject2"
                    ref="inputdata"
@@ -30,29 +20,6 @@
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
-                @keyup.enter.native="handleQuery"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item  label="杞村悕绉�:" prop="axisName" >
-            <el-select v-model="from.axisName" placeholder="" clearable style="width: 125px">
-              <el-option
-                v-for="dict in dict.type.axisname"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-                @keyup.enter.native="handleQuery"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item  label="棰堝悕绉�:" prop="neckName" >
-            <el-select v-model="from.neckName" placeholder="" clearable style="width: 125px">
-              <el-option
-                v-for="dict in dict.type.neckname"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-                @keyup.enter.native="handleQuery"
               />
             </el-select>
           </el-form-item>
@@ -63,7 +30,6 @@
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
-                @keyup.enter.native="handleQuery"
               />
             </el-select>
           </el-form-item>
@@ -86,17 +52,11 @@
             <el-descriptions-item label="骞宠 杞寸爜">
               <span>{{queryParams.scanObject2}}</span>
             </el-descriptions-item>
-            <el-descriptions-item label="杞村悕绉�">
-              <span>{{queryParams.axisName}}</span>
-            </el-descriptions-item>
-            <el-descriptions-item label="棰堝悕绉�">
-              <span>{{queryParams.neckName}}</span>
-            </el-descriptions-item>
             <el-descriptions-item label="鐡﹀悕绉�">
               <span>{{queryParams.tileName}}</span>
             </el-descriptions-item>
             <el-descriptions-item label="閰嶇摝棰滆壊">
-              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
+              <span v-for="(word, index) in queryParams.words" :key="index" :style="{ backgroundColor: queryParams.colors[index],fontSize: '30px',}">{{ word }}</span>
             </el-descriptions-item>
           </el-descriptions>
           <el-divider></el-divider>
@@ -108,6 +68,7 @@
 <script>
 import VueQr from 'vue-qr'
 import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules";
+import {setBarcode} from "@/api/main/bs/tileMatchRules/tileMatchRules";
 export default {
   name: "index",
   dicts: ['colour_hex','productseries','axisname','neckname','tilename'],
@@ -124,13 +85,12 @@
       from:{
         pageNum: 1,
         pageSize: 10,
-        productSeries: null,
-        //scanObject1: null,
-        //scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
-        scanObject2: '',
+        productSeries: '380Y',
+        scanObject1: null,
+        scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
         axisName: null,
         neckName: null,
-        tileName: null,
+        tileName: '骞宠 杞寸摝',
         axisParameterNoPosition: null,
         neckParameterPosition: null,
         axisValue: null,
@@ -146,11 +106,12 @@
         pageSize: 10,
         productSeries: null,
         scanObject1: null,
-        // scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
-        scanObject2: null,
+        scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
         axisName: null,
         neckName: null,
         tileName: null,
+        words: ['------', '------', ],
+        colors: ['#FFFFFF', '#FFFFFF'],
         axisParameterNoPosition: null,
         neckParameterPosition: null,
         axisValue: null,
@@ -192,6 +153,14 @@
         this.scannerFlag = true
         console.log('鏉$爜锛�',this.from.scanObject2)
         //鎵弿瀹屾垚
+        if (typeof this.from.scanObject2 !== 'undefined') {
+          console.log('鏉$爜锛�',this.from.scanObject2,'HOP040')
+          setBarcode({barcode:this.from.scanObject2,locationCode:'HOP040'}).then(res =>{
+            console.log('res',res)
+            this.from.scanObject1=res
+          })
+        }
+        this.handleQuery()
       }
     },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -199,9 +168,9 @@
       this.clear();
 
       if(this.from.scanObject1 !== null && this.from.scanObject2 !== null
-        && this.from.axisName !== null && this.from.axisName !== ""
-        && this.from.neckName !== null && this.from.neckName !== ""
-        && this.from.tileName !== null && this.from.tileName !== ""
+        // && this.from.axisName !== null && this.from.axisName !== ""
+        // && this.from.neckName !== null && this.from.neckName !== ""
+        // && this.from.tileName !== null && this.from.tileName !== ""
         && this.from.productSeries !== null && this.from.productSeries !== "")
       {
         this.axisValueextracted();
@@ -224,6 +193,7 @@
         }
       }
       else{
+        console.log("鎼滅储鏉′欢",this.from.scanObject1 ,this.from.scanObject2)
         const h = this.$createElement;
         this.$message({
           message: h('p',null, [
@@ -269,7 +239,14 @@
       }
       console.log(queryParams)
       listTileMatchRules(queryParams).then(response => {
-        this.queryParams.tileColor = response.rows[0].tileColor;
+        // this.queryParams.tileColor = response.rows[0].tileColor;
+        this.queryParams.words= ['------', '------']
+        this.queryParams.colors= ['#FFFFFF', '#FFFFFF']
+        for (var i=0;i<response.rows.length;i++){
+          this.queryParams.colors[i]=response.rows[i].tileColor;
+          this.queryParams.words[i]=response.rows[i].tileName;
+        }
+        console.log('棰滆壊锛�',response)
       });
     },
     clear(){

--
Gitblit v1.9.3