From 1b4f1c9db703b1bfd0e3f8cc7f01153a7399088d Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期一, 10 四月 2023 15:53:47 +0800 Subject: [PATCH] 修改称重控制,修复刷新失败 --- pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 2 +- pages/tabbar-page/index-tabbar/index-tabbar.vue | 37 +++++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 17 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 7363ee3..f99e4e9 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 @@ -260,7 +260,7 @@ let nowWeighObj = JSON.parse(res.data.slice(7)); console.log(nowWeighObj); // 涓�寮�濮嬫槸weighHouseCode - if (nowWeighObj.eqCode == this.weighData.equipmentCode) { + if (nowWeighObj.eqCode == this.weighHouseCode) { if (nowWeighObj.eqInfraredStatus) { this.infraredStatus = true; this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue index 7d5114a..2fc1f58 100644 --- a/pages/tabbar-page/index-tabbar/index-tabbar.vue +++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue @@ -27,15 +27,17 @@ onPullDownRefresh() { uni.showLoading({ title: '鍔犺浇涓�...' }); // 鑾峰彇鍘嗗彶鎻愮叅鍗� - this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => { - if (res.data.records) { - this.indexHistoryCoalData = res.data.records; - uni.hideLoading(); - uni.stopPullDownRefresh(); - } else { - this.$u.toast('鍔犺浇澶辫触'); - } - }); + if (this.roleType == 1 || this.roleType == 2) { + this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => { + if (res.data.records) { + this.indexHistoryCoalData = res.data.records; + uni.hideLoading(); + uni.stopPullDownRefresh(); + } else { + this.$u.toast('鍔犺浇澶辫触'); + } + }); + } // 瀹㈡埛鑾峰彇鏃ヨ鍒� if (this.roleType == 1) { this.$reqGet('GetOrderPlan').then(res => { @@ -58,16 +60,19 @@ } }); } else if (this.roleType == 3) { - if (res.data) { - this.$reqGet('qiangDanList').then(res => { + this.$reqGet('qiangDanList').then(res => { + console.log(res, '鍒锋柊涔嬪悗鐨勬暟鎹�'); + if (res.code == 0) { this.indexdriverBillOfLoadingData = res.data; + this.$u.toast('鍔犺浇鎴愬姛'); uni.hideLoading(); uni.stopPullDownRefresh(); - }); - } else { - this.$u.toast('鍔犺浇澶辫触'); - } - s; + } else { + this.$u.toast('鍔犺浇澶辫触'); + uni.hideLoading(); + uni.stopPullDownRefresh(); + } + }); } }, onLoad() { -- Gitblit v1.9.1