admin
2024-12-17 75f1ced619b49f354addc1cf8fa1ca320b25edd4
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: "",
@@ -212,7 +233,7 @@
        scanBarcode: value,
        sfcBarcode: this.headContent.sfcCode,
        workOrderNo: '-',
        productCode: "9900200461",
        productCode: this.selectProductCode,
        locationCode: this.headContent.processesCode,
        collectionTime: new Date()
      }
@@ -230,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 => {
@@ -252,7 +273,8 @@
              }
            })
          }
        }else {
          this.$message.error("无配方加载请检查!!");
        }
      });
    },
@@ -354,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
@@ -370,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,