From 169e9b4d59bdd763bb5bd1b5a9b092a1200e327b Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期一, 17 四月 2023 17:37:18 +0800 Subject: [PATCH] 增加原发信息,修复bug --- pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 98 ++++++++++++++++++++++++++++--------------------- 1 files changed, 56 insertions(+), 42 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue index cea97c8..81b3e58 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue @@ -20,6 +20,12 @@ </view> --> </view> </view> + <view class="bottom" v-if="weighList.orderType == '鍐呰喘' || weighList.orderType == '杞嚭'"> + <view> + <view style="font-weight: 600;">鍘熷彂淇℃伅</view> + <text>鐨噸{{ primarySkin || '' }}姣涢噸{{ primaryHair || '' }}鍑�閲峽{ primaryClean || '' }}</text> + </view> + </view> <view class="bottom"><text>TIP:褰撳墠鐘舵�佷负姝e父鏃跺彲浠ョО閲�</text></view> </view> <view class="two"> @@ -74,6 +80,9 @@ this.weighData.gateCameraId = params.gateCameraId; this.weighData.equipmentCode = params.gateCameraCode; this.weighHouseCode = params.weighHouseCode; + this.primarySkin = params.primarySkin; + this.primaryHair = params.primaryHair; + this.primaryClean = params.primaryClean; this.changeweighHouseCode(params.weighHouseCode); }, data() { @@ -115,13 +124,16 @@ // 鏀剧┖鎺у埗 evacuationModalShow: false, evacuationTitle: '鏀剧┖纭', - evacuationContent: '鏄惁纭鏀剧┖' + evacuationContent: '鏄惁纭鏀剧┖', + // 鑾峰彇鍘熷彂淇℃伅 + primarySkin: null, + primaryHair: null, + primaryClean: null }; }, watch: { realTimeWeigh(newV, oldV) { - console.log(newV); - if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢') { + if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType == '杞嚭') { if (this.weighList.skin == 0) { // this.temporaryWeighObj.skin = this.realTimeWeigh; this.temporaryWeighObj.skin = newV; @@ -130,7 +142,7 @@ this.temporaryWeighObj.hair = newV; this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2); } - } else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '杞嚭') { + } else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList.orderType == '杞叆') { if (this.weighList.hair == 0) { // this.temporaryWeighObj.hair = this.realTimeWeigh; this.temporaryWeighObj.hair = newV; @@ -252,44 +264,44 @@ /** * 鍒濆鍖� weoSocket */ - initWebSocket() { - let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`; - let socket = uni.connectSocket({ - url: wsUrl, - header: { - CLIENT_TOC: 'Y' - }, - complete: res => { - console.log(res, 'socket缁撴灉'); - } - }); - socket.onOpen(() => { - console.log('onOpen'); - }); - // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊 - socket.onMessage(res => { - console.log('socketWeigh', res); - let nowWeighObj = JSON.parse(res.data.slice(7)); - if (nowWeighObj.eqCode == this.weighHouseCode) { - if (nowWeighObj.eqInfraredStatus) { - this.infraredStatus = true; - this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; - } else { - this.infraredStatus = false; - this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; - } - } - }); - socket.onClose(() => { - uni.closeSocket(); - console.log('webSocketClose'); - this.$u.toast('纾呮埧宸插叧闂�'); - }); - socket.onError(err => { - console.log('socket鎶ラ敊', err); - this.$u.toast('纾呮埧鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒'); - }); - }, + // initWebSocket() { + // let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`; + // let socket = uni.connectSocket({ + // url: wsUrl, + // header: { + // CLIENT_TOC: 'Y' + // }, + // complete: res => { + // console.log(res, 'socket缁撴灉'); + // } + // }); + // socket.onOpen(() => { + // console.log('onOpen'); + // }); + // // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊 + // socket.onMessage(res => { + // console.log('socketWeigh', res); + // let nowWeighObj = JSON.parse(res.data.slice(7)); + // if (nowWeighObj.eqCode == this.weighHouseCode) { + // if (nowWeighObj.eqInfraredStatus) { + // this.infraredStatus = true; + // this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; + // } else { + // this.infraredStatus = false; + // this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; + // } + // } + // }); + // socket.onClose(() => { + // uni.closeSocket(); + // console.log('webSocketClose'); + // this.$u.toast('纾呮埧宸插叧闂�'); + // }); + // socket.onError(err => { + // console.log('socket鎶ラ敊', err); + // this.$u.toast('纾呮埧鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒'); + // }); + // }, // 鏀剧┖ evacuation() { this.evacuationModalShow = true; @@ -342,6 +354,8 @@ } .bottom { text-align: center; + position: relative; + top: vww(-30); } } .two { -- Gitblit v1.9.1