付延余
2023-03-23 1cb780b1762c62751c7f5f26132f3a7aa4ef3e2f
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -90,29 +90,29 @@
         //    pingMessage: JSON.stringify({ type: 'ping' }) // 心跳请求信息
         // }
         // 临时称重对象
         temporaryWeighObj:{
            skin:0,
            hair:0,
            clean:0
         temporaryWeighObj: {
            skin: 0,
            hair: 0,
            clean: 0
         },
         infraredStatus:false// 红外状态
         infraredStatus: false // 红外状态
      };
   },
   watch:{
      realTimeWeigh(newV,oldV){
         if(this.weighList.orderTye == '外销'){
            if(this.weighList.skin == 0){
               this.temporaryWeighObj.skin = this.realTimeWeigh
   watch: {
      realTimeWeigh(newV, oldV) {
         if (this.weighList.orderTye == '外销') {
            if (this.weighList.skin == 0) {
               this.temporaryWeighObj.skin = this.realTimeWeigh;
            } else {
               this.temporaryWeighObj.hair = this.realTimeWeigh
               this.temporaryWeighObj.clean = this.temporaryWeighObj.hair - this.weighList.skin
               this.temporaryWeighObj.hair = this.realTimeWeigh;
               this.temporaryWeighObj.clean = this.temporaryWeighObj.hair - this.weighList.skin;
            }
         } else if(this.weighList.orderTye == '外购'){
            if(this.weighList.hair == 0){
               this.temporaryWeighObj.hair = this.realTimeWeigh
         } else if (this.weighList.orderTye == '外购') {
            if (this.weighList.hair == 0) {
               this.temporaryWeighObj.hair = this.realTimeWeigh;
            } else {
               this.temporaryWeighObj.skin = this.realTimeWeigh
               this.temporaryWeighObj = this.weighList.hair - this.temporaryWeighObj.skin
               this.temporaryWeighObj.skin = this.realTimeWeigh;
               this.temporaryWeighObj = this.weighList.hair - this.temporaryWeighObj.skin;
            }
         }
      }
@@ -134,7 +134,7 @@
               return false;
            }
         }
      },
      }
   },
   methods: {
      init() {
@@ -227,13 +227,13 @@
         // 获取服务器传来的数据,做相应处理
         socket.onMessage(res => {
            console.log('socketWeigh', res);
            let nowWeighObj = JSON.parse(res.data.slice(7))
            let nowWeighObj = JSON.parse(res.data.slice(7));
            if (nowWeighObj.eqCode == this.weighHouseCode) {
               if(nowWeighObj.eqInfraredStatus){
                  this.infraredStatus = true
               if (nowWeighObj.eqInfraredStatus) {
                  this.infraredStatus = true;
                  this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh;
               }else{
                  this.infraredStatus = false
               } else {
                  this.infraredStatus = false;
                  this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh;
               }
            }