-
admin
2024-04-16 ddb300bd410f6c9871c3c033e16451f709c2781e
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -96,7 +96,13 @@
<!--           </el-col>-->
<!--         </el-row>-->
         <el-row style="margin-top: 20px">
             <el-button @click="Release" type="primary">放行</el-button>
           <el-col></el-col>
             <span style="width: 130px;" class="head-font">预装总成号 : {{headContent.yzSfcCode}}</span>
         </el-row>
         <el-row style="margin-top: 20px">
<!--             <el-button @click="Release" type="primary">绑定</el-button>-->
           <el-button @click="bindYzSfc" type="primary">绑定</el-button>
         </el-row>
       </el-card>
@@ -308,7 +314,8 @@
  addBasicParameters,
  addParamCollection,
  addTighteningParameters,
  saveCampaignTimeParameters
  saveCampaignTimeParameters,
  replaceAssemblyCode,
} from "@/api/main/da/paramCollection/paramCollection";
export default {
@@ -331,6 +338,7 @@
        processesCode: 'OP1010',
        processesName: '贴标机-贴码',
        sfcCode: '',
        yzSfcCode: '',
      },
      workpieceInformation: {
        workOrderNo: null,
@@ -361,7 +369,7 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.1.100:8080/websocket/message/",
      url: "ws://192.168.1.106:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -428,6 +436,19 @@
  methods: {
    serialLink() {
      this.open1 = true
    },
    bindYzSfc(){
      if(this.headContent.sfcCode!==""&&this.headContent.yzSfcCode!==""){
        let param = {
          sfcCode: this.headContent.sfcCode,
          locationCode: this.headContent.processesCode,
          yzSfcCode: this.headContent.yzSfcCode
        }
        this.$message('可以绑定!');
        replaceAssemblyCode(param).then(response => {
        });
      }
    },
    Release(){
      // this.$message('portsList!'+this.portsList.length);
@@ -661,23 +682,24 @@
      else {
        const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, '');
        console.log("串口收到数据-------------------"+scanValue)
        // if(this.cakeLamp.InPlace=== 1){
          if(this.headContent.sfcCode !== ''){
        if(this.headContent.sfcCode !== ''){
          if(scanValue.includes("SS")){
            this.headContent.yzSfcCode = scanValue
          }else {
            this.$message('扫描物料编码'+scanValue);
            console.log(scanValue)
            this.serialPortMethod(scanValue)
          }else {
            this.$message('扫码识别产品序列号'+scanValue);
            this.headContent.sfcCode = scanValue;
            this.queryParams.productNum = scanValue;
            this.getList()
            // this.getListFormulaChild()
            this.cakeLamp.scanFinish = 1
            this.cakeLamp.startWork = 1
          }
        // }else {
        //   this.$message('工件未到位禁止扫码!');
        // }
        } else {
          this.$message('扫码识别产品序列号'+scanValue);
          this.headContent.sfcCode = scanValue;
          this.queryParams.productNum = scanValue;
          this.getList()
          this.cakeLamp.scanFinish = 1
          this.cakeLamp.startWork = 1
        }
      }
    },
    clearHistory() {