From 7406be32979e90a730b5a2ac8d392892f71835d2 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 10 四月 2023 14:53:17 +0800
Subject: [PATCH] 修复称重不显示问题,优化信息提示
---
pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue | 2
pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue | 2 +
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 40 ++++++++++++--------
pages/driver-page/appointment/appointment.vue | 6 ++
pages/customer-page/customer-index/customer-index.vue | 8 ++--
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue | 2
pages/customer-page/fleet-management/fleet-management.vue | 2
pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue | 2 +
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 4 +-
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue | 2 +
pages/customer-page/customer-my/customer-my.vue | 4 +
pages/driver-page/driver-index/driver-index.vue | 2
12 files changed, 48 insertions(+), 28 deletions(-)
diff --git a/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue b/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue
index 20b85db..4bf211f 100644
--- a/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue
+++ b/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver.vue
@@ -94,7 +94,7 @@
});
} else {
uni.showToast({
- title: res.msg,
+ title: res.msg ? res.msg : '鎿嶄綔澶辫触',
icon: 'null',
duration: 2000
});
diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index 6437192..120d1d7 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -9,8 +9,8 @@
寮�
</view>
<view class="card-left__utils">
- <u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.carNum != 0" shape="circle"></u-button>
- <u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.cars2 != 0"></u-button>
+ <u-button @tap.stop="receiveClick(item)" text="棰嗗彇" type="primary" v-if="item.carNum - item.cars2 != 0" shape="circle"></u-button>
+ <u-button text="杞彂" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplus1 != 0"></u-button>
</view>
</template>
<template v-slot:right-top>
@@ -34,7 +34,7 @@
<text class="lingqu" @tap.stop="numInput(item.id)">{{ item.receiveNum || '_______' }}</text>
寮�
</view> -->
- <view v-if="item.cars == item.cars2 ? false : true">鍓╀綑{{ item.carNum - item.cars2 }}寮�</view>
+ <view v-if="item.carNum == item.cars2 ? false : true">鍓╀綑{{ item.carNum - item.cars2 }}寮�</view>
<view v-else>宸查瀹�</view>
</view>
</view>
@@ -188,7 +188,7 @@
duration: 1000
});
} else {
- this.$u.toast(res.data ? res.data : '棰嗗彇澶辫触');
+ this.$u.toast(res.msg ? res.msg : '棰嗗彇澶辫触');
}
});
} else {
diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
index 4e88a84..cbbb80a 100644
--- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
+++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
@@ -97,7 +97,7 @@
this.yyDailyList = res.data.yyDailyList;
uni.hideLoading();
} else {
- this.$u.toast('鏈嶅姟鍣ㄩ敊璇紝璇风◢鍚庨噸璇�');
+ this.$u.toast('鍔犺浇澶辫触锛岃绋嶅悗閲嶈瘯');
uni.hideLoading();
}
});
diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
index 2dedc99..2e623fd 100644
--- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
+++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
@@ -81,6 +81,8 @@
this.orderPlanDetail = res.data;
this.yyDailyList = res.data.yyDailyList.filter((v, i) => i == this.index);
uni.hideLoading();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
}
});
}
diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index ca15628..62643bc 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -182,7 +182,7 @@
this.$u.toast('娣诲姞鎴愬姛');
this.getFleet();
} else {
- this.$u.toast(res.data ? res.data : '娣诲姞澶辫触');
+ this.$u.toast(res.msg ? res.msg : '娣诲姞澶辫触');
}
});
this.updateGroupShow = false;
@@ -247,6 +247,8 @@
console.log('鍒犻櫎杞﹂槦', res);
if (res.code == 0) {
this.$u.toast('鍒犻櫎鎴愬姛');
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
}
uni.hideLoading();
this.getFleet();
diff --git a/pages/customer-page/fleet-management/fleet-management.vue b/pages/customer-page/fleet-management/fleet-management.vue
index a5c2fe4..0f0dd0f 100644
--- a/pages/customer-page/fleet-management/fleet-management.vue
+++ b/pages/customer-page/fleet-management/fleet-management.vue
@@ -121,7 +121,7 @@
});
} else {
uni.showToast({
- title: '鍒犻櫎澶辫触',
+ title: res.msg ? res.msg : '鍒犻櫎澶辫触',
duration: 2000
});
}
diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue
index dae7583..42e79ca 100644
--- a/pages/driver-page/appointment/appointment.vue
+++ b/pages/driver-page/appointment/appointment.vue
@@ -78,6 +78,8 @@
uni.hideLoading();
if (res.code == 0) {
this.yuYueData = res.data;
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
}
});
},
@@ -116,7 +118,9 @@
this.rcsqData.filedId = value.filedId;
this.$reqPost('saveRCSQ', this.rcsqData, 'json').then(res => {
if (res.code == 0) {
- this.$u.toast('鏂板缓鍏ュ満鐢宠鎴愬姛銆�');
+ this.$u.toast('鍏ュ満鐢宠鎴愬姛');
+ } else {
+ this.$u.toast('鍏ュ満鐢宠澶辫触锛岃绋嶅悗閲嶈瘯');
}
});
}
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
index f1d9e15..3b96ba9 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -303,10 +303,10 @@
this.$reqPost('getOneEvacuation', mix, 'json').then(res => {
console.log(res, '绗竴娆℃斁绌�');
if (res.code == 0) {
- this.$u.toast('宸叉斁绌�');
+ this.$u.toast('鎿嶄綔鎴愬姛');
this.evacuationModalShow = false;
} else {
- this.$u.toast('鏀剧┖澶辫触锛岃绋嶅悗閲嶈瘯');
+ this.$u.toast('鎿嶄綔澶辫触锛岃绋嶅悗閲嶈瘯');
this.evacuationModalShow = false;
}
});
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue b/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
index 5a8dfa7..7db8d01 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill.vue
@@ -44,6 +44,8 @@
console.log('鑾峰彇鎻愮叅鍗曡鎯�', res);
if (res.code == 0) {
this.coalData = res.data[0];
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
}
});
}
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 391fe04..7363ee3 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
@@ -47,7 +47,7 @@
></u-button>
<u-button type="primary" text="杩斿洖鍔犲噺鍚�" :disabled="addAndSubtractCoalDisabled" @click="addAndSubtractCoal" class="jiajian"></u-button>
</view>
- <view class="four" v-if="weighList.orderTye == '澶栭攢'">濡傛偍闇�瑕佽皟鏁磋杞借揣鍝佸惃鏁帮紝璇风偣鍑昏繑鍥炲姞鍑忓惃</view>
+ <view class="four" v-if="weighList.orderTye !== '澶栬喘'">濡傛偍闇�瑕佽皟鏁磋杞借揣鍝佸惃鏁帮紝璇风偣鍑昏繑鍥炲姞鍑忓惃</view>
<!-- 鏀剧┖寮圭獥 -->
<view class="evacuationModal">
<u-modal
@@ -112,25 +112,29 @@
infraredStatus: false, // 绾㈠鐘舵�侊紝
// 鏀剧┖鎺у埗
evacuationModalShow: false,
- evacuationTitle: '绗簩娆℃斁绌虹‘璁�',
+ evacuationTitle: '鏀剧┖纭',
evacuationContent: '鏄惁纭鏀剧┖'
};
},
watch: {
realTimeWeigh(newV, oldV) {
- if (this.weighList.orderTye == '澶栭攢') {
+ if (this.weighList.orderTye == '澶栭攢' || this.weighList.orderTye == '鍐呴攢') {
if (this.weighList.skin == 0) {
- this.temporaryWeighObj.skin = this.realTimeWeigh;
+ // this.temporaryWeighObj.skin = this.realTimeWeigh;
+ this.temporaryWeighObj.skin = newV;
} else {
- this.temporaryWeighObj.hair = this.realTimeWeigh;
+ // this.temporaryWeighObj.hair = this.realTimeWeigh;
+ this.temporaryWeighObj.hair = newV;
this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2);
}
- } else if (this.weighList.orderTye == '澶栬喘') {
+ } else if (this.weighList.orderTye == '澶栬喘' || this.weighList.orderTye == '杞嚭') {
if (this.weighList.hair == 0) {
- this.temporaryWeighObj.hair = this.realTimeWeigh;
+ // this.temporaryWeighObj.hair = this.realTimeWeigh;
+ this.temporaryWeighObj.hair = newV;
} else {
- this.temporaryWeighObj.skin = this.realTimeWeigh;
- this.temporaryWeighObj = this.weighList.hair - this.temporaryWeighObj.skin;
+ // this.temporaryWeighObj.skin = this.realTimeWeigh;
+ this.temporaryWeighObj.skin = newV;
+ this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(2);
}
}
}
@@ -145,14 +149,15 @@
},
// 鍔犲噺鐓ゆ寜閽鐢ㄤ笌鍚�
addAndSubtractCoalDisabled() {
- if (this.weighList.orderTye == '澶栭攢') {
- if (this.weighList.skin == 0) {
+ if (this.weighList.orderTye == '澶栭攢' || this.weighList.orderTye == '鍐呴攢' || this.weighList.orderTye == '杞嚭') {
+ if (this.weighList.hair == 0) {
return true;
- } else if (this.weighList.skin != 0) {
+ } else if (this.weighList.hair != 0) {
return false;
}
}
},
+ // 鏄惁鏀剧┖鎸夐挳绂佺敤
isEvacuation() {
if (this.weighList.hair == this.weighList.skin || this.temporaryWeighObj.skin == this.temporaryWeighObj.hair) {
return false;
@@ -237,7 +242,7 @@
*/
initWebSocket() {
let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`;
- socket = uni.connectSocket({
+ let socket = uni.connectSocket({
url: wsUrl,
header: {
CLIENT_TOC: 'Y'
@@ -253,7 +258,9 @@
socket.onMessage(res => {
console.log('socketWeigh', res);
let nowWeighObj = JSON.parse(res.data.slice(7));
- if (nowWeighObj.eqCode == this.weighHouseCode) {
+ console.log(nowWeighObj);
+ // 涓�寮�濮嬫槸weighHouseCode
+ if (nowWeighObj.eqCode == this.weighData.equipmentCode) {
if (nowWeighObj.eqInfraredStatus) {
this.infraredStatus = true;
this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh;
@@ -264,12 +271,13 @@
}
});
socket.onClose(() => {
+ uni.closeSocket();
console.log('webSocketClose');
- this.$u.toast('纾呮埧鎺ュ彛缁堢');
+ this.$u.toast('纾呮埧宸插叧闂�');
});
socket.onError(err => {
console.log('socket鎶ラ敊', err);
- this.$u.toast('纾呮埧鎺ュ彛鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
+ this.$u.toast('纾呮埧鏆傛椂涓嶈兘浣跨敤锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
});
},
// 鏀剧┖
diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index 50204f2..037a609 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -206,7 +206,7 @@
if (res.code == 0) {
this.$u.toast('鎶㈠崟鎴愬姛');
} else {
- this.$u.toast(res.data ? res.data : '鎶㈠崟澶辫触');
+ this.$u.toast(res.msg ? res.msg : '鎶㈠崟澶辫触');
}
})
.then(() => {
diff --git a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
index 548b342..8db9103 100644
--- a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
+++ b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
@@ -146,6 +146,8 @@
console.log('鍒犻櫎杞﹂槦', res);
if (res.code == 0) {
this.$u.toast('鍒犻櫎鎴愬姛');
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
}
uni.hideLoading();
this.getFleet();
--
Gitblit v1.9.1