admin
2024-08-08 682919cdb4229973a4917bdb3cb876ec6d5b574a
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -34,18 +34,15 @@
           <el-descriptions-item label="工单编号">
               <span>{{workpieceInformation.workOrderNo}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品编号">
           <el-descriptions-item label="产品型号">
             <span>{{workpieceInformation.productCode}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品型号">
             <span>{{workpieceInformation.productModel}}</span>
           <el-descriptions-item label="小车码">
             <span>{{headContent.cardCode}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品名称">
             <span>{{workpieceInformation.productName}}</span>
           <el-descriptions-item label="开始时间">
             <span>{{workpieceInformation.inboundTime}}</span>
           </el-descriptions-item>
<!--           <el-descriptions-item label="节拍">-->
<!--             <span>{{workpieceInformation.beat}}</span>-->
<!--           </el-descriptions-item>-->
         </el-descriptions>
         <el-divider></el-divider>
         <el-row>
@@ -85,21 +82,55 @@
           </el-col>
         </el-row>
         <el-row v-show="showInput" style="margin-top: 20px">
           <el-col></el-col>
             <span style="width: 130px;" class="head-font">预装总成号 : {{headContent.yzSfcCode}}</span>
         </el-row>
         <el-row v-show="showInput" style="margin-top: 20px">
           <el-button @click="bindYzSfc" type="primary">绑定</el-button>
         <el-row v-show="goOnlineFlag" style="margin-top: 20px">
           <el-button @click="getWorkOrders" type="primary">接收工单</el-button>
           <div style="display: none">
             <div id="getWorkOrdersPrintPrintMe" style="width: 500px;">
               <div ref="canvasWrapper" id="canvasWrapper3" style="display: flex;justify-content: center;"></div>
               <p style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;">{{packCode}}</p>
             </div>
<!--             <el-button @click="print">打印</el-button>-->
             <el-button @click="test1">生成二维码</el-button>
           </div>
         </el-row>
         <el-row v-show="onLineBinDing" style="margin-top: 20px">
           <el-col></el-col>
           <span style="width: 130px;" class="head-font">小车码 : {{headContent.cardCode}}</span>
         </el-row>
         <el-row v-show="onLineBinDing" style="margin-top: 20px">
           <el-button @click="bindcardCode" type="primary">绑定</el-button>
         <el-row v-show="offlineFlag" style="margin-top: 20px">
           <el-button id="print" v-print="'#printMe'" type="primary">打印三联码</el-button>
           <el-button style="display: none" @click="test1">生成二维码</el-button>
           <el-button style="display: none" @click="test2">生成
             <span style="font-size: 10px;margin-left: 52px">MADE IN CHINA</span><br>
             <br>
             <br>二维码</el-button>
           <div style="display: none">
             <div  id="printMe">
               <br>
               <p style="margin-left: 53px">{{printInfoData.partNumber}}</p>
               <p style="margin-left: 53px">{{printInfoData.hardwareVersion}}</p>
               <p style="margin-left: 53px">{{printInfoData.softwareVersion}}</p>
               <br>
               <br>
               <br>
               <br>
               <img style="width: 140px;height: 20px;margin-left: 30px" :src="require('@/assets/images/a8963a24920640508e96150a053fc41.png')"/>
               <span style="margin-left: 72px">{{printInfoData.printModel}}</span><br>
               <span style="margin-left: 73px">{{printInfoData.supplierCode}}</span><br>
               <span style="margin-left: 55px">{{printInfoData.partNumber}}</span><br>
               <span style="font-size: 10px;margin-left: 28px;">{{headContent.sfcCode}}</span><br>
               <span style="font-size: 10px;margin-left: 60px">MADE IN CHINA</span><br>
               <br>
               <br>
               <br>
               <div ref="canvasWrapper" id="canvasWrapper1" style="display: flex;justify-content: center;margin-top: -27px;"></div>
               <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span>
               <br>
               <br>
               <div ref="canvasWrapper" id="canvasWrapper2" style="display: flex;justify-content: center;margin-top: -27px"></div>
               <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span>
             </div>
           </div>
         </el-row>
       </el-card>
@@ -110,48 +141,22 @@
           <span slot="label"> <a class="el-icon-date"></a>首页</span>
           <el-col :span="24">
             <el-table height="500" :cell-style="rowStyle" :data="formulaChildList">
               <el-table-column label="排序" width="60" align="center" type="index">
               <el-table-column label="拧紧步号" width="80" align="center" prop="stepSort">
               </el-table-column>
               <el-table-column label="操作内容" :show-overflow-tooltip='true' align="center" prop="operationSteps">
               <el-table-column label="操作内容" align="center" prop="operationSteps">
               </el-table-column>
               <el-table-column label="产品编号" align="center" prop="productCode">
               <el-table-column label="产品编号" width="80" align="center" prop="productCode">
               </el-table-column>
               <el-table-column label="物料编码" align="center" prop="materialCode">
               <el-table-column label="物料编码" width="140" align="center" prop="materialCode">
               </el-table-column>
               <el-table-column label="采集值" align="center" prop="collectData">
               </el-table-column>
               <el-table-column label="结果" align="center" prop="results">
               <el-table-column label="结果" width="60" align="center" prop="results">
               </el-table-column>
             </el-table>
           </el-col>
<!--           <el-col :span="14">-->
<!--             <el-image style="height: 520px;width: 100%" :src="imgSrc"></el-image>-->
<!--           </el-col>-->
         </el-tab-pane>
<!--         <el-tab-pane name="second">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>物料BOM</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
<!--         <el-tab-pane name="third">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>采集清单</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
<!--         <el-tab-pane name="fourth">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>安灯状态</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
<!--         <el-tab-pane name="fifth">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>工艺配方</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
       </el-tabs>
     </el-col>
   </el-row>
@@ -298,9 +303,11 @@
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {
  listFormulaChild,
  clearWorkpieceRelease,
  fistSetpNumber, inPlaceInspection,
  listFormulaChild, manualNgOffline,
  noPageListFormulaChild,
  releaseCheck,
  releaseCheck, unfinishedProcess,
  updateResults,
  updateTighteningFormula,
  workpieceRelease
@@ -308,6 +315,8 @@
import MySerialPort from "@/utils/MySerialPort";
import USBDevice from "@/utils/usb.json";
import {
  bindYzSfcFlag,
  checkCarCode, checkYzSfcCode,
  findBytrolleyYardGetOne,
  listProductionOrde,
  receivingWorkOrders,
@@ -319,16 +328,26 @@
  addParamCollection,
  addTighteningParameters,
  saveCampaignTimeParameters,
  replaceAssemblyCode,
  replaceAssemblyCode, checkRecordDataDone, enterWeighing,
} from "@/api/main/da/paramCollection/paramCollection";
import QRCode from "qrcodejs2";
import {listEquipmentArchives} from "@/api/main/em/equipmentArchives/equipmentArchives";
export default {
  name: "stationTerminal",
  data() {
    return {
      printInfoData: {
        softwareVersion: 'SW001.001', //软件版本号
        hardwareVersion: 'HW001.001', //硬件版本号
        printModel: 'H2155D', //型号
        partNumber: '9900200136', //零部件号
        supplierCode: '993983', //供应商编码
      },
      carCode: '',
      showInput: false,
      onLineBinDing: false,
      goOnlineFlag: false,
      offlineFlag: false,
      serialPortContent: '',
      // 查询参数
@@ -337,6 +356,8 @@
        pageSize: 10,
        productCode: null,
        processesCode: null,
        artificialNgFlag: null,
        sfcBarcode: null,
      },
      // 配方配置子信息表格数据
      formulaChildList: [],
@@ -354,7 +375,7 @@
        productCode: null,
        productModel: null,
        productName: null,
        beat: null,
        inboundTime: null,
      },
      // 查询参数
      queryParams: {
@@ -378,6 +399,8 @@
      },
      content: '',
      activeName: 'first',
      // url: "ws://192.168.2.248:8080/websocket/message/",
      // url: "ws://10.103.210.248:8080/websocket/message/",
      url: "ws://192.168.2.76:8080/websocket/message/",
      message: "",
      text_content: "",
@@ -407,6 +430,9 @@
      passingStationForm: {},
      originalArray: [],
      yzSfcFlag: 1,
      endYz: false,
      packCode: 'test111'
    }
  },
  beforeDestroy() {
@@ -440,14 +466,116 @@
  computed: {
    isDisable() {
      return this.btnType === "danger";
    },
    }
  },
  methods: {
    bindcardCode(){
      this.$message('可以绑定!');
    //接收工单-------开始
    getWorkOrdersPrint() {
      let newStr = document.getElementById('getWorkOrdersPrintPrintMe').innerHTML;
      const printFrame = document.createElement('iframe');
      printFrame.style.display = 'none';
      document.body.appendChild(printFrame);
      const content = document.getElementById('getWorkOrdersPrintPrintMe').innerHTML;
      printFrame.contentDocument.write(content);
      printFrame.contentWindow.print();
      document.body.removeChild(printFrame);
      return false;
    },
    async getWorkOrders(){
      await receivingWorkOrders().then(response => {
        this.packCode = response.msg;
        this.getWorkOrdersTest1()
      });
      setTimeout(() => {
        this.getWorkOrdersPrint()
      },50)
    },
    getWorkOrdersTest1(){
      document.getElementById('canvasWrapper3').innerHTML = ''
      this.$nextTick(() => {
        let qrCode = new QRCode('canvasWrapper3',{
          width: 80,
          height: 80,
          padding: 0,
          margin: 0,
          text: this.packCode,
          colorDark: '#000',
          colorLight: '#fff'
        })
      })
    },
    //接收工单-------结束
    //下线打印-------开始
    initializePrintInfoData(){
      listEquipmentArchives().then(response => {
        this.printInfoData.softwareVersion = response.rows[0].equipmentCode
        this.printInfoData.hardwareVersion = response.rows[0].equipmentName
        this.printInfoData.supplierCode = response.rows[0].equipmentSpec
        this.printInfoData.printModel = response.rows[0].equipmentBrand
        this.printInfoData.partNumber = response.rows[0].equipmentTypeName
        console.log(response.rows[0])
      });
    },
    test1(){
      document.getElementById('canvasWrapper1').innerHTML = '';
      this.$nextTick(() => {
          let qrCode = new QRCode('canvasWrapper1',{
            width: 120,
            height: 120,
            text: 'P'+this.printInfoData.partNumber+'#T'+ this.headContent.sfcCode +'#V'+this.printInfoData.supplierCode+'#S'+this.printInfoData.softwareVersion+'#H'+this.printInfoData.hardwareVersion+'#NBMS#',
            colorDark: '#000',
            colorLight: '#fff'
          })
        }
      )
    },
    test2(){
      document.getElementById('canvasWrapper2').innerHTML = '';
      this.$nextTick(() => {
          let qrCode = new QRCode('canvasWrapper2',{
            width: 120,
            height: 120,
            text: 'P'+this.printInfoData.partNumber+'#T'+ this.headContent.sfcCode +'#V'+this.printInfoData.supplierCode+'#S'+this.printInfoData.softwareVersion+'#H'+this.printInfoData.hardwareVersion+'#NBMS#',
            colorDark: '#000',
            colorLight: '#fff'
          })
        }
      )
    },
    print1() {
      // 使用插件打印方式
      // this.$print(this.$refs.printMe)
      // this.initializePrintInfoData()
      // if(this.headContent.sfcCode){
      //   //新页面打印
      //   // let newStr = document.getElementById('printMe').innerHTML;
      //   // let newWin = window.open('', '_blank',st);
      //   // newWin.document.body.innerHTML = newStr;
      //   // newWin.print();
      //   // 本页面打印
      //   let newStr = document.getElementById('printMe').innerHTML;
      //   const printFrame = document.createElement('iframe');
      //   printFrame.style.display = 'none';
      //   document.body.appendChild(printFrame);
      //   const content = document.getElementById('printMe').innerHTML;
      //   printFrame.contentDocument.write(content);
      //   printFrame.contentWindow.print();
      //   console.log(printFrame)
      //   // document.body.removeChild(printFrame);
      //   console.log(printFrame)
      //   return false;
      // }else {
      //   this.$message.error('未扫描总成码禁止打印!');
      // }
    },
    //下线打印-------截止
    bindcardCode(scanValue){
      // this.$message('绑定成功!');
      let param = {
        productNum: this.headContent.sfcCode,
        trolleyYard: this.headContent.cardCode,
        trolleyYard: scanValue,
      }
      trolleyYardBinDing(param).then(response => {
      });
@@ -463,9 +591,14 @@
          locationCode: this.headContent.processesCode,
          yzSfcCode: this.headContent.yzSfcCode
        }
        this.$message('可以绑定!');
        const orderParam = {
          productNum: this.headContent.sfcCode,
        }
        replaceAssemblyCode(param).then(response => {
          this.$message('绑定成功!');
          bindYzSfcFlag(orderParam).then(response => {
            this.yzSfcFlag = 1
          });
        });
      }
    },
@@ -492,6 +625,8 @@
        console.log(response)
        if(response.msg === "3"){
          this.cakeLamp.release= 1 //允许放行
        }else if(response.msg === "2"){
          this.$message.error('扫码重复请重新扫码!');
        }
        this.getListFormulaChild()
      });
@@ -509,9 +644,32 @@
      // this.formulaChildList = []
      this.formulaChildParams.productCode = this.workpieceInformation.productCode
      this.formulaChildParams.processesCode = this.headContent.processesCode
      console.log(this.formulaChildParams)
      if(this.formulaChildParams.artificialNgFlag !== null){
        this.formulaChildParams.sfcBarcode = this.headContent.sfcCode
      }
      console.log("getListFormulaChild"+this.formulaChildParams.artificialNgFlag)
      noPageListFormulaChild(this.formulaChildParams).then(response => {
        this.formulaChildList = response.rows;
        if (this.formulaChildList.length >0){
          let pos = 0
          const tempArr = this.formulaChildList.filter(x=> 'OK' === x.results)
          if (tempArr.length>0){
            pos = tempArr.length
            this.$nextTick(() => {
              let temp33 = document.getElementsByClassName('el-table__row')
              console.log('temp33',temp33)
              console.log('len',temp33.item(pos))
              if (temp33.length > 0){
                console.log('1111111111111111')
                let arr = temp33[pos-1]
                console.log('srr',arr)
                arr.scrollIntoView({ block: 'center' })
              }
            })
          }
        }
      });
    },
    endClear(){
@@ -525,14 +683,27 @@
      this.workpieceInformation.workOrderNo = null;
      this.workpieceInformation.productModel = null;
      this.workpieceInformation.productName = null;
      this.workpieceInformation.inboundTime = null;
      this.headContent.sfcCode = '';
      this.headContent.yzSfcCode = '';
      this.headContent.cardCode = '';
      this.formulaChildParams.artificialNgFlag = null
      this.formulaChildParams.sfcBarcode = null
    },
    changeMenu(tab, event) {
      console.log(tab, event);
    },
    clearClick(){
      this.$message('这是一条清除消息提示');
      this.headContent.sfcCode = null
      const param = {
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: this.workpieceInformation.productCode,
        locationCode: this.headContent.processesCode,
        productBarcode: this.headContent.sfcCode,
      }
      this.endClear()
      clearWorkpieceRelease(param).then(response => {});
      this.headContent.sfcCode = ''
      this.$message('清除成功!');
    },
    scanCompleted(){
      this.$message('扫码完成'+this.content);
@@ -546,6 +717,7 @@
    },
    /** 查询工单列表 */
    async getList() {
      this.initializePrintInfoData()
      await listProductionOrde(this.queryParams).then(response => {
        let rowsData = response.rows[0];
        console.log(rowsData)
@@ -553,12 +725,40 @@
        this.workpieceInformation.productCode = rowsData.productCode;
        this.workpieceInformation.productModel = rowsData.productModel;
        this.workpieceInformation.productName = rowsData.productName;
        this.timer = setInterval(() => {
          this.workpieceInformation.beat++;
        }, 1000);
        this.headContent.cardCode = rowsData.trolleyYard;
        this.formulaChildParams.artificialNgFlag = rowsData.artificialNgFlag;
      });
      if(this.headContent.processesCode === 'POP430'){
        this.test1()
        this.test2()
      }
      this.getListFormulaChild()
      this.addOverStationCollection()
      // this.addOverStationCollection()
      this.workpieceInformation.inboundTime = this.getCurrentTime()
      const param = {
        processesCode: this.headContent.processesCode,
        productCode: this.workpieceInformation.productCode
      }
      fistSetpNumber(param).then(response => {
        console.log("fistSetpNumber------"+response.msg)
      });
    },
    getCurrentTime() {
      const now = new Date();
      const year = now.getFullYear();
      const month = this.padTimeUnit(now.getMonth() + 1); // 月份是从0开始的
      const day = this.padTimeUnit(now.getDate());
      const hours = this.padTimeUnit(now.getHours());
      const minutes = this.padTimeUnit(now.getMinutes());
      const seconds = this.padTimeUnit(now.getSeconds());
      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
    padTimeUnit(value) {
      return value.toString().padStart(2, '0');
    },
    addBaseData(){
      addBasicParameters(this.passingStationForm).then(response => {});
    },
    /** 入站增加过站采集记录 **/
@@ -603,14 +803,19 @@
        }
        this.headContent.processesName = rows.processesName
        this.headContent.processesCode = rows.processesCode
        if(this.headContent.processesCode === 'OP240'){
          this.onLineBinDing = true
        console.log('设置工位编码' + this.headContent.processesCode)
        inPlaceInspection({processesCode: this.headContent.processesCode}).then(response => {
          console.log(response)
          this.cakeLamp.InPlace = response.data
        });
        if(this.headContent.processesCode === 'POP230'){
          this.goOnlineFlag = true
        }
        if(this.headContent.processesCode === 'OP260'){
          this.showInput = true
        if(this.headContent.processesCode === 'POP430'){
          this.offlineFlag = true
        }
        console.log('设置工位编码' + this.headContent.processesCode)
      });
      this.conCom()
      console.log('websocket连接工位为' + this.headContent.processesCode)
@@ -618,26 +823,61 @@
      this.ws = new WebSocket(wsuri);
      const self = this;
      this.ws.onopen = function (event) {
        this.$message('websocket连接成功!');
        self.$message('websocket连接成功!');
      };
      this.ws.onmessage = function (event) {
        if (event.data === "IN") {
        if (event.data === "print") {
          self.$message('postman调用打印方法打印!');
          // self.print1()
          document.getElementById('print').click();
        }else if (event.data === "IN") {
          self.cakeLamp.InPlace = 1;
        } else if (event.data === "IN0") {
          self.cakeLamp.InPlace = 0;
        } else if (event.data === "NG") {
          //给plc发下线信号
          //清除数据
          self.$confirm('拧紧三次NG,请确认下线!!!', '消息', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            showCancelButton: false,
            type: 'warning'
          }).then(() => {
            self.ngFunction();
            this.$message({
              type: 'success',
              message: '确认成功!'
            });
          });
        } else if (event.data === "OUT") {
          self.cakeLamp.release = 1;
        } else if (event.data === "END") {
          const formulaChildIndex = self.formulaChildList.length-1
          if(self.headContent.sfcCode=== ''||self.headContent.sfcCode=== null){
            unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 26}).then(response => {});
            self.$message('总成码为空,请扫码!')
            return;
          }
          if(self.formulaChildList[formulaChildIndex].results !== 'OK'){
            self.$message('未做完工序禁止放行');
            unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 25}).then(response => {});
            return;
          }
          const param = {
            workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: self.workpieceInformation.productCode,
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
            inboundTime: self.workpieceInformation.inboundTime,
            formulaChildEntity: self.formulaChildList[formulaChildIndex]
          }
          saveCampaignTimeParameters(param).then(response => {});
          self.cakeLamp.release = 1;
          self.endClear()
          workpieceRelease(param).then(response => {});
          console.log("进入最终方法")
          self.endSaveData(param)
        } else if (event.data.includes("[")) {
          let formulaChilds = "";
          self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort);
@@ -646,30 +886,67 @@
          for (let i = 0; i < self.formulaChildList.length; i++) {
            let formulaChild = self.formulaChildList[i];
            let results = formulaChild.results;
            if (results === '' || results === null || results === 'NG') {
              formulaChilds = formulaChild;
              break;
            }
          }
           if(formulaChilds === ""){
             self.$message.error('本工位已工作完成!');
             return;
           }
          const param = {
            id: formulaChilds.id,
            tightenTheArray: event.data,
            paramCode: formulaChilds.paramCode,
            workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: self.workpieceInformation.productCode,
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
            spareField1: formulaChilds.spareField1,
            spareField2: formulaChilds.spareField2,
            spareField3: formulaChilds.spareField3,
            spareField4: formulaChilds.spareField4,
            stepSort: formulaChilds.stepSort,
            ngTimes: formulaChilds.ngTimes,
          }
          addTighteningParameters(param).then(response => {});
          updateTighteningFormula(param).then(response => {
            self.getListFormulaChild()
          }).catch(error =>{
            self.getListFormulaChild()
          });
          if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){
            self.$message('未找到参数码,请检查参数码是否正确');
            return;
          }
          self.formulaChildParams.artificialNgFlag = null
          console.log("self.formulaChildParams.artificialNgFlag"+self.formulaChildParams.artificialNgFlag)
          if(self.headContent.sfcCode!==null||self.headContent.sfcCode!==''){
            updateTighteningFormula(param).then(response => {
              //addTighteningParameters(param).then(response => {});
              self.getListFormulaChild()
            }).catch(error =>{
              self.getListFormulaChild()
            });
          }
        }
      };
    },
    endSaveData(param){
      saveCampaignTimeParameters(param).then(response => {
      this.cakeLamp.release = 1;
      this.endClear()
      workpieceRelease(param).then(response => {});
      });
    },
    ngFunction(){
      const param = {
        locationCode: this.headContent.processesCode,
        sfcBarcode: this.headContent.sfcCode,
        productCode: this.workpieceInformation.productCode,
      }
      manualNgOffline(param).then(response => {});
      clearWorkpieceRelease(param).then(releaseCheck =>{});
      this.endClear()
    },
    //接受数据的回调
    callBack(value) {
@@ -677,19 +954,20 @@
      else {
        const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, '');
        console.log("串口收到数据-------------------"+scanValue)
        if(this.headContent.sfcCode !== ''){
          if(scanValue.includes("P9900173252")){
            this.headContent.yzSfcCode = scanValue
          }else if(scanValue.includes("HDY")){
        console.log("sfc=--"+this.headContent.sfcCode+"--")
        if(this.headContent.sfcCode !== '' && this.headContent.sfcCode !== null
          && this.headContent.sfcCode !== undefined){
          if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'POP230'){
            this.headContent.cardCode = scanValue
            this.bindcardCode(scanValue);
            this.serialPortMethod(scanValue)
          }else {
            this.$message('扫描物料编码'+scanValue);
            this.$message('工位终端扫描物料编码'+scanValue);
            console.log(scanValue)
            this.serialPortMethod(scanValue)
          }
        } else {
          if(this.headContent.processesCode === 'OP240'){
          if(this.headContent.processesCode === 'POP230'){
            this.headContent.sfcCode = scanValue;
            this.queryParams.productNum = scanValue;
            this.getList()