hdy
2024-07-10 a4362dfe3e0e9c6fad426685da0065455799d018
jcdm-ui/src/views/main/kb/cvt/index.vue
@@ -79,9 +79,8 @@
<script>
import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling";
import { listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection } from "@/api/main/da/passingStationCollection/passingStationCollection";
import {listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection,initializedData } from "@/api/main/da/passingStationCollection/passingStationCollection";
import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo";
import {setSNCode} from "@/api/main/da/opcuaconfig/opcuaconfig";
import {getIp, listStationConf} from "@/api/main/sc/stationConf";
export default {
@@ -95,7 +94,7 @@
      engineCheckList:[],
      showFlag:false,
      buttondisabled:true,
      locationCode: "未配置",
      locationCode: "未配置IP",
      locationName: "未配置工位",
      scannerFlag: false,
@@ -160,7 +159,19 @@
        this.scannerFlag = true
        console.log("条码:",this.form.engineNo)
        if(this.form.engineNo !== null && this.form.engineNo !== undefined) {
          setSNCode(this.form.engineNo, this.locationCode)
          console.log("条码2:",this.locationCode)
            initializedData({sfcCode:this.form.engineNo,locationCode:this.locationCode}).then(res =>{
              if(res.code===500){
                  this.$createElement;
              }else {
                addPassingStationCollection({sfcCode:this.form.engineNo,locationCode:this.locationCode}).then(res =>{
                  console.log("rrrrr",res)})
                this.$message({
                  message: '扫码成功',
                  type: 'success'
                });
              }
            })
        }else{
          this.reset();
          this.buttondisabled = true
@@ -175,9 +186,30 @@
            offset:300
          });
        }
      }
      // this.AddEngineNo();
    },
    handleScannerInput111(event){
      const param = {
        sfcCode: this.from.engineNo,
      }
      addPassingStationCollection(param).then(response => {
      });
    },
    // AddEngineNo(){
    //   const param = {
    //     locationCode: this.from.locationCode,
    //     sfcCode: this.from.engineNo,
    //     // locationCode:"OP110",
    //     // sfcCode:"666",
    //
    //   }
    //       addPassingStationCollection(param).then(response =>{});
    // },
    getStationConf() {
      getIp().then(response => {
@@ -207,52 +239,7 @@
    EngineNohandleChange(){
      console.log('条码:',this.form.engineNo)
      if(this.form.engineNo !== null && this.form.engineNo !== undefined){
        //let OrderSchedulingParam = {engineNo: null}
        setSNCode(this.form.engineNo,this.locationCode)
        //OrderSchedulingParam.engineNo = this.form.engineNo;
     /*   listOrderScheduling(OrderSchedulingParam).then(response => {
          if(response.total === 1 ){
            this.form.productType = response.rows[0].model
            this.form.orderNo = response.rows[0].orderNo
            this.form.qualityStatus = response.rows[0].qualityStatus
            this.form.currentWorkstation = response.rows[0].currentWorkstation
            this.form.add= response.rows[0].currentWorkstation+ response.rows[0].qualityStatus
            if(this.form.qualityStatus ==='不合格'){
              this.buttondisabled = false;
            }
            else{
              this.buttondisabled = true;
            }
          }
          else{
            this.reset();
            this.buttondisabled = true
            const h = this.$createElement;
            this.$message({
              message: h('p',null, [
                       h('span', null, '警告 '),
                       h('i', { style: 'color: black' }, '输入的发动机号有误'),
                       h()]),
              type: 'error',
              center: true,
              offset:300
            });
          }
        });*/
        /*let PassingStationCollectionParam = {sfcCode: null}
        PassingStationCollectionParam.sfcCode = this.form.engineNo;
        listPassingStationCollection(PassingStationCollectionParam).then(ponse =>{
          this.engineCheckList = ponse.rows.locationCode ;
          if(ponse.rows.length >= 1 && this.form.engineNo !== undefined){
            this.form.engineCheckList = ''
            for (let i = 0; i < ponse.rows.length; i++) {
              this.form.engineCheckList += '   工位:'+ ponse.rows[i].locationCode+'['+ponse.rows[i].outRsSign+']'
            }
          }
          else{
            this.form.engineCheckList = '暂无数据'
          }
        });*/
      }
    },
@@ -282,10 +269,5 @@
  justify-content: center;
  margin-top: 5px
}
/*.my-custom-modal .el-dialog__wrapper {*/
/*  width: 400px; !* 设置宽度 *!*/
/*  height: 200px; !* 设置高度 *!*/
/*  top: 50px; !* 设置距离页面顶部的位置 *!*/
/*  left: 50px; !* 设置距离页面左侧的位置 *!*/
/*}*/
</style>