From 75f1ced619b49f354addc1cf8fa1ca320b25edd4 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期二, 17 十二月 2024 14:21:58 +0800
Subject: [PATCH] 优化

---
 jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue |   51 +++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue b/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
index 10734ec..52d0047 100644
--- a/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
+++ b/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -1,19 +1,32 @@
 <template>
   <div class="app-container">
    <el-row :gutter="5">
-     <el-col :span="7">
+     <el-col :span="4">
        <el-card style="height: 72px;padding-top: 9px" shadow="never">
          <span class="head-font">宸ヤ綅缂栧彿 : {{headContent.processesCode}}</span>
          <span hidden>{{headContent.inboundTime}}</span>
        </el-card>
      </el-col>
-     <el-col :span="7">
+     <el-col :span="6">
        <el-card shadow="never">
          <span class="head-font">鐗╂枡缂栫爜 : </span>
          <el-input style="width: 70%" ref="inputData" v-model="materialCode" @change="materialCodeHandleEnter" placeholder="璇锋壂鎻忔�绘垚搴忓垪鍙�"></el-input>
        </el-card>
      </el-col>
-     <el-col :span="10">
+     <el-col :span="6">
+       <el-card shadow="never">
+         <span class="head-font">浜у搧鍨嬪彿 : </span>
+         <el-select style="width: 70%" 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 style="height: 72px;padding-top: 9px" shadow="never">
          <span class="head-font">浜у搧搴忓垪鍙� : {{headContent.sfcCode}}</span>
          <el-button @click="clearClick" style="float: right" type="danger" size="mini">娓呴櫎</el-button>
@@ -73,6 +86,14 @@
   name: "stationTerminal",
   data() {
     return {
+      selectProductCode: '9900200461',
+      options: [{
+        value: '9900200461',
+        label: '9900200461'
+      }, {
+        value: '9900207783',
+        label: '9900207783'
+      }],
       showInput: true,
       serialPortContent: '',
       // 鏌ヨ鍙傛暟
@@ -122,7 +143,7 @@
       },
       content: '',
       activeName: 'first',
-      // url: "ws://10.103.210.248:8080/websocket/message/",
+      // url: "ws://192.168.10.231:8080/websocket/message/",
       url: "ws://192.168.20.250:8080/websocket/message/",
       message: "",
       text_content: "",
@@ -172,6 +193,7 @@
         this.setFocus();
         this.materialCode = '';
       }
+      this.materialCode = ''
     },
     setFocus(){
       this.$nextTick(()=>{
@@ -211,7 +233,7 @@
         scanBarcode: value,
         sfcBarcode: this.headContent.sfcCode,
         workOrderNo: '-',
-        productCode: "9900200461",
+        productCode: this.selectProductCode,
         locationCode: this.headContent.processesCode,
         collectionTime: new Date()
       }
@@ -229,7 +251,7 @@
     },
     /** 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭垪琛� */
     getListFormulaChild() {
-      this.formulaChildParams.productCode = "9900200461"
+      this.formulaChildParams.productCode = this.selectProductCode
       this.formulaChildParams.processesCode = this.headContent.processesCode
       console.log(this.formulaChildParams)
       noPageListFormulaChild(this.formulaChildParams).then(response => {
@@ -251,7 +273,8 @@
               }
             })
           }
-
+        }else {
+          this.$message.error("鏃犻厤鏂瑰姞杞借妫�鏌ワ紒锛�");
         }
       });
     },
@@ -267,11 +290,17 @@
         locationCode: this.headContent.processesCode,
       }
       clearWorkpieceRelease(param).then(response => {});
+
+
       this.headContent.sfcCode = ''
-      this.formulaChildList = [];
+      // this.formulaChildList = [];
       this.materialCode = ''
       this.$message('娓呴櫎鎴愬姛锛�');
       this.setFocus()
+      setTimeout(() => {
+        // 杩欓噷鏄綘鎯宠寤舵椂鍚庢墽琛岀殑閫昏緫
+        this.getList()
+      }, 500); // 500姣 = 0.5绉�
     },
     scanCompleted(){
       this.$message('鎵爜瀹屾垚'+this.content);
@@ -288,7 +317,7 @@
       const param = {
         processesCode: this.headContent.processesCode,
       }
-      // fistSetpNumber(param).then(response => {});
+      fistSetpNumber(param).then(response => {});
       this.getListFormulaChild()
       // this.addOverStationCollection()
     },
@@ -347,6 +376,8 @@
       };
       this.ws.onmessage = function (event) {
         if(event.data.includes("[")) {
+          console.log(self.selectProductCode)
+
           let formulaChilds = "";
           self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort);
           self.formulaChildList
@@ -363,7 +394,7 @@
             tightenTheArray: event.data,
             paramCode: formulaChilds.paramCode,
             workOrderNo: '-',
-            productCode: "9900200461",
+            productCode: self.selectProductCode,
             locationCode: self.headContent.processesCode,
             productBarcode: self.headContent.sfcCode,
             spareField2: formulaChilds.spareField2,

--
Gitblit v1.9.3