From 029dd92e96bec1ca325e99f154c8a2188919e8d5 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 26 六月 2023 08:49:56 +0800
Subject: [PATCH] 增加验质功能
---
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 52 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 32 insertions(+), 20 deletions(-)
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 7042ecc..f1e7407 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
@@ -18,11 +18,11 @@
<view class="block-information">
<view class="block-main">
<view class="basic">
- <view class="coalName">{{ coalDetailsData.coalName }}</view>
+ <view class="coalName">{{ coalDetailsData.coalName||'' }}</view>
<view class="status-button"
style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/statusbutton.png') no-repeat;
background-size: cover;">
- {{ coalStatus[coalDetailsData.status] || '' }}
+ {{ coalStatus[coalDetailsData.statusWeigh] || '' }}
</view>
</view>
<view class="time">
@@ -34,24 +34,29 @@
<view class="coal-code">鎻愮叅鍗曠紪鍙�: {{ coalDetailsData.code || '' }}</view>
<view class="order-code">
璁㈠崟缂栧彿: {{ coalDetailsData.orderCode || '' }}</view>
+ <view class="coal-code"
+ @click="jumpWeighDetail"
+ style="color: rgb(73, 123, 251);">
+ 鏌ョ湅鏄庣粏
+ </view>
<view class="weigh-item">
<view class="item">
<view class="concrete"
style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
鐨�</view>
- <view class="num">{{ coalDetailsData.skin }}</view>
+ <view class="num">{{ showWeigh.skin }}</view>
</view>
<view class="item">
<view class="concrete"
style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
姣�</view>
- <view class="num">{{ coalDetailsData.hair }}</view>
+ <view class="num">{{ showWeigh.hair }}</view>
</view>
<view class="item">
<view class="concrete"
style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
鍑�</view>
- <view class="num">{{ coalDetailsData.clean }}</view>
+ <view class="num">{{ showWeigh.clean }}</view>
</view>
</view>
</view>
@@ -174,9 +179,7 @@
openId: null,
openName: ''
},
- coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
- '杩涘叆鍦洪櫌'
- ], // 鐘舵��
+ coalStatus: ['鏈О閲�', '绉伴噸涓�', '楠岃川涓�', '绉伴噸瀹屾垚'], // 鐘舵��
weighHouseCode: '',
// 鏀剧┖寮圭獥鎺у埗鍙橀噺
evacuationModalShow: false,
@@ -242,7 +245,12 @@
return this.coalDetailsData.hair !== 0 || this.coalDetailsData.skin !== 0;
},
isapproach() {
- return this.currentPageCoalStatus <= 3;
+ return this.currentPageCoalStatus !== 3;
+ },
+ // 灞曠ず鐨瘺鍑�
+ showWeigh() {
+ return this.coalDetailsData.tmTaskCoalItems ? (this.coalDetailsData.tmTaskCoalItems[0] ? this
+ .coalDetailsData.tmTaskCoalItems[0] : {}) : {}
}
},
methods: {
@@ -272,14 +280,12 @@
this.$reqGet('getCallOutList', this.getServiceOpenid).then(res => {
console.log(res, '瀹㈡湇openid');
if (res.code != 0) {
- this.$u.toast('鑾峰彇瀹㈡湇淇℃伅澶辫触');
+ this.$u.toast(res.msg ? res.msg : '鑾峰彇瀹㈡湇淇℃伅澶辫触');
} else {
- if (res.data.length > 0) {
- this.serviceInfoObj.openId = res.data[0].openId;
- this.serviceInfoObj.openName = res.data[0].openName;
- uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
- uni.setStorageSync('customerName', this.serviceInfoObj.openName);
- }
+ this.serviceInfoObj.openId = res.data.openId;
+ this.serviceInfoObj.openName = res.data.openName;
+ uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
+ uni.setStorageSync('customerName', this.serviceInfoObj.openName);
}
});
},
@@ -289,8 +295,8 @@
title: '鍔犺浇涓�'
});
this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
+ uni.hideLoading();
if (res.code == 0) {
- uni.hideLoading();
console.log(res, '鎻愮叅鍗曡鎯�');
this.coalDetailsData = res.data;
this.orderType = this.coalDetailsData.orderType;
@@ -313,7 +319,7 @@
this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
// 鑾峰彇鎻愮叅鍗曠姸鎬�
- this.currentPageCoalStatus = this.coalDetailsData.status;
+ this.currentPageCoalStatus = this.coalDetailsData.statusWeigh;
// 鑾峰彇鍘熷彂淇℃伅
this.primarySkin = this.coalDetailsData.skinTwo;
this.primaryHair = this.coalDetailsData.hairTwo;
@@ -358,7 +364,7 @@
});
}
});
- }, 5000);
+ }, 10000);
},
// 灞曠ず鎻愮叅鍗曡鎯�
showCaolPickUpBill() {
@@ -411,7 +417,7 @@
nickname: uni.getStorageSync('customerName'),
openid: uni.getStorageSync(
'customeropenId')
- }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
+ },
backgroundType: 2,
roomType: 'voice',
success() {
@@ -495,6 +501,12 @@
completeOutSaleCancel() {
this.completeOutSaleShow = false
},
+ // 鏌ョ湅璐ㄩ噺鏄庣粏
+ jumpWeighDetail() {
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${this.orderPlanId}`
+ })
+ }
}
};
</script>
--
Gitblit v1.9.1