admin
2024-09-18 2d564a5921cec98b2c7e6065cc8f066abd614b76
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -83,7 +83,7 @@
               <div style="text-align: center;margin-top: 64px">
                 <span style="font-size: 29px;">电驱系统总成</span>
               </div>
               <div style="display: flex;margin-top: 2px;margin-left: 44px;font-size: 15px">
               <div style="display: flex;margin-top: 2px;margin-left: 39px;font-size: 15px">
                 <div class="div1">
                   <div >
                     <span>电机型号:</span><span>TZ180XSDSZX01</span><br>
@@ -111,7 +111,7 @@
                   </div>
                 </div>
                 <div class="div2" style="font-size: 15px;margin-left: 12px">
                 <div class="div2" style="font-size: 15px;margin-left: 4px">
                   <div>
                     <span>控制器型号:</span><span>KTZ34X23SZX07</span><br>
                   </div>
@@ -125,7 +125,7 @@
                     <span>最高转速:</span><span>12000rpm</span><br>
                   </div>
                   <div style="margin-top: 4px">
                     <span>防护等级:</span><span>IP68</span><br>
                     <span>防护等级:</span><span>IP67</span><br>
                   </div>
                   <div style="margin-top: 4px">
                     <span>峰值工作电流:</span><span>230A</span><br>
@@ -134,11 +134,11 @@
                     <span>绝缘等级:</span><span>H</span><br>
                   </div>
                   <div style="margin-top: 4px">
                     <span>出厂编号:</span><span>2407190000002</span><br>
                     <span>出厂编号:</span><span>{{headContent.sfcCode}}</span><br>
                   </div>
                 </div>
               </div>
               <div style="margin-top: 2px;margin-left: 80px">
               <div style="margin-top: 2px;margin-left: 70px">
                 <span style="font-size: 26px;">湖州智芯动力系统发展有限公司</span>
               </div>
@@ -153,26 +153,26 @@
                 </div>
                 <div style="margin-top: 4px">
                   <span style="font-size: 22px">993083</span><br>
                   <span style="font-size: 22px">993983</span><br>
                 </div>
                 <div style="margin-top: 4px">
                   <span style="font-size: 22px">9900166410</span><br>
                   <span style="font-size: 22px">9900200461</span><br>
                 </div>
                 <div style="margin-top: 4px">
                   <span style="font-size: 22px">2407190000002</span>
                   <span style="font-size: 22px">{{headContent.sfcCode}}</span>
                 </div>
               </div>
               <div style="margin-top: 61px;display: flex;margin-left: 48px">
               <div style="margin-top: 61px;display: flex;margin-left: 40px">
                 <div style="width: 30%;flex: 1">
                   <VueQr :size='80' :margin='0' :text='this.text'></VueQr>
                 </div>
                 <div style="width: 70%;flex: 1;margin-top: 18px;margin-right: 23px">
                 <div style="width: 70%;flex: 1;margin-top: 18px;margin-right: 29px">
                        <span style="margin-left: -80px;font-size: 20px;font-family: FangSong;letter-spacing: -0.8px">
                          P9900166410#T{{headContent.sfcCode}}
                          P9900200461#T{{headContent.sfcCode}}
                        </span><br>
                   <span style="margin-left: -80px;font-size: 20px;font-family: FangSong;letter-spacing: -0.8px">
                          #V993983#SSW002.005#HHW001.001#NMCU
@@ -181,13 +181,13 @@
                 </div>
               </div>
               <div style="margin-top: 48px;display: flex;margin-left: 48px">
               <div style="margin-top: 48px;display: flex;margin-left: 40px">
                 <div style="width: 30%;flex: 1">
                   <VueQr :size='80' :margin='0' :text='this.text'></VueQr>
                 </div>
                 <div style="width: 70%;flex: 1;margin-top: 18px;margin-right: 23px">
                 <div style="width: 70%;flex: 1;margin-top: 18px;margin-right: 29px">
                        <span style="margin-left: -80px;font-size: 20px;font-family: FangSong;letter-spacing: -0.8px">
                          P9900166410#T{{headContent.sfcCode}}
                          P9900200461#T{{headContent.sfcCode}}
                        </span><br>
                   <span style="margin-left: -80px;font-size: 20px;font-family: FangSong;letter-spacing: -0.8px">
                          #V993983#SSW002.005#HHW001.001#NMCU
@@ -266,7 +266,7 @@
  bindYzSfcFlag,
  checkCarCode, checkYzSfcCode,
  findBytrolleyYardGetOne,
  listProductionOrde, mozuReceivingWorkOrders,
  listProductionOrde, listProductionOrdeLoopLine, mozuReceivingWorkOrders,
  receivingWorkOrders,
  trolleyYardBinDing
} from "@/api/main/om/productionOrde/productionOrde";
@@ -289,7 +289,7 @@
  name: "stationTerminal",
  data() {
    return {
      text: 'P9900200461#T2408170000004 #V993983#SSW001.001#HHW001.001#NMCU',
      text: 'P9900200461#T2408170000004#V993983#SSW001.001#HHW001.001#NMCU',
      materialCode: '', // 物料编码
      carCode: '',
      showInput: false,
@@ -344,7 +344,7 @@
        release: 0 //允许放行
      },
      content: '',
      // url: "ws://10.103.210.248:8080/websocket/message/",
      // url: "ws://10.103.214.26:8080/websocket/message/",
      url: "ws://192.168.20.250:8080/websocket/message/",
      passingStationForm: {},
@@ -388,7 +388,7 @@
        ){
          if(this.materialCode.length>25){
            let code = this.materialCode.substring(13,26);
            this.headContent.sfcCode = code;
            // this.headContent.sfcCode = code;
            this.queryParams.productNum = code;
            this.getList();
            this.cakeLamp.scanFinish = 1
@@ -518,9 +518,19 @@
    },
    /** 查询工单列表 */
    async getList() {
      await listProductionOrde(this.queryParams).then(response => {
      await listProductionOrdeLoopLine(this.queryParams).then(response => {
        let rowsData = response.rows[0];
        if(rowsData){
          if(this.headContent.processesCode === 'OP170'
            ||this.headContent.processesCode === 'OP180'||
            this.headContent.processesCode === 'OP190'||
            this.headContent.processesCode === 'OP200'||
            this.headContent.processesCode === 'OP210'||
            this.headContent.processesCode === 'OP220'||
            this.headContent.processesCode === 'OP230'
          ){
            this.headContent.sfcCode = rowsData.productNum
          }
          this.workpieceInformation.workOrderNo = rowsData.workOrderNo;
          this.workpieceInformation.productCode = rowsData.productCode;
          this.workpieceInformation.materialCode = rowsData.materialCode;
@@ -548,7 +558,7 @@
          this.cakeLamp.InPlace = 1
          // this.test1()
          // this.test2()
          this.text = 'P9900200461#T'+this.headContent.sfcCode+' #V993983#SSW001.001#HHW001.001#NMCU'
          this.text = 'P9900200461#T'+this.headContent.sfcCode+'#V993983#SSW001.001#HHW001.001#NMCU'
        }
      });
    },
@@ -579,7 +589,7 @@
          let qrCode = new QRCode('canvasWrapper1',{
            width: 83,
            height: 83,
            text: 'P9900200461#T'+this.headContent.sfcCode+' #V993983#SSW001.001#HHW001.001#NMCU',
            text: 'P9900200461#T'+this.headContent.sfcCode+'#V993983#SSW001.001#HHW001.001#NMCU',
            colorDark: '#000',
            colorLight: '#fff'
          })
@@ -592,7 +602,7 @@
          let qrCode = new QRCode('canvasWrapper2',{
            width: 83,
            height: 83,
            text: 'P9900200461#T'+this.headContent.sfcCode+' #V993983#SSW001.001#HHW001.001#NMCU',
            text: 'P9900200461#T'+this.headContent.sfcCode+'#V993983#SSW001.001#HHW001.001#NMCU',
            colorDark: '#000',
            colorLight: '#fff'
          })
@@ -639,8 +649,11 @@
      this.ws.onmessage = function (event) {
        if (event.data === "print") {
          document.getElementById('print').click();
          unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 21}).then(response => {});
        }else if (event.data === "IN") {
          self.cakeLamp.InPlace = 1;
        }else if(event.data === "twoHundredAndThirtyEND"){
          self.endClear()
        } else if (event.data === "OUT") {
          self.cakeLamp.release = 1;
        } else if (event.data === "END") {
@@ -678,7 +691,13 @@
        } else if(event.data.includes("productNum")){//产品序列号
          let productNum = event.data.split(',')[1];
          self.headContent.sfcCode = productNum;
          if(self.headContent.processesCode === 'OP165'){
            console.log("进去截取总成码方法165工站原始值是"+productNum+"截取之后的是"+productNum.substring(13,26))
            self.headContent.sfcCode = productNum.substring(13,26)
            console.log("self.headContent.sfcCode"+self.headContent.sfcCode)
          }else {
            self.headContent.sfcCode = productNum;
          }
          self.queryParams.productNum = productNum;
          self.getList()
          self.cakeLamp.scanFinish = 1
@@ -697,7 +716,7 @@
          if(self.headContent.processesCode === "OP165"){
            // self.test1()
            // self.test2()
            self.text = 'P9900166410#T'+self.headContent.sfcCode+'\n#V993983#SSW002.005#HHW001.001#NMCU#'
            self.text = 'P9900200461#T'+self.headContent.sfcCode+'#V993983#SSW002.005#HHW001.001#NMCU#'
          }
        }else if (event.data.includes("[")) {//拧紧