From 3fd84886a15713ece1ba34954f49fd1e075ef7be Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期三, 19 四月 2023 17:38:48 +0800
Subject: [PATCH] 改变称重监听,增加发运详情,修复电子提煤单错误
---
pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue | 78 +++++++++++++++++++++++++++++++++++----
1 files changed, 70 insertions(+), 8 deletions(-)
diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index 83f3c08..1da3993 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -4,7 +4,7 @@
<view class="content-statistics">
<view class="content-text">鍙戣繍缁熻</view>
<view class="content-text">鍏眥{ totalLength }}杞�</view>
- <view class="content-text">鍏眥{ totalTon }}鍚�</view>
+ <view class="content-text">鍏眥{ totalTon.toFixed(2) }}鍚�</view>
</view>
</view>
<view class="collapse-main">
@@ -119,6 +119,24 @@
</view>
</view>
</view>
+ <view class="filter-body" v-if="roleType == 2">
+ <view class="condition-name">杞︾墝鍙凤細</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in carNoList" :key="index" @click="filterCondition(6, index, item.condition)">
+ <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button
+ shape="circle"
+ :text="carNoShow < carNoTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
+ type="primary"
+ size="small"
+ @click="toggle(6)"
+ v-if="carNoTotal > 3"
+ ></u-button>
+ </view>
+ </view>
+ </view>
<view class="filter-body">
<view class="condition-name">鏃ユ湡锛�</view>
<view class="filter-name">
@@ -156,10 +174,10 @@
</view>
</view>
<view class="card-main" v-for="(value, i) in item.taskCoalList" :key="i">
- <view class="arrow-right"><u-icon name="arrow-right" size="50"></u-icon></view>
+ <view class="arrow-right" @click="faYunDetail(value.id)"><u-icon name="arrow-right" size="50"></u-icon></view>
<view class="main-body">
<view class="coal-name">鐓ょ:{{ value.coalName || '' }}</view>
- <view class="clean">鎵ц閲�:{{ value.clean || 0 }}</view>
+ <view class="clean">鎵ц閲�:{{ value.clean.toFixed(2) || 0 }}</view>
<view class="out-time">鍑哄満鏃堕棿:{{ value.outTime || '' }}</view>
<view class="car-number">杞︾墝鍙�:{{ value.carNo || '' }}</view>
<view class="filedName">鐭垮満:{{ value.filedName || '' }}</view>
@@ -181,6 +199,7 @@
forwarderList: [],
fleetList: [],
filedList: [],
+ carNoList: [],
isactive: false,
info: {
lunar: false,
@@ -201,12 +220,18 @@
forwarderShow: 3,
fleetShow: 3,
filedShow: 3,
+ carNoShow: 3,
coalToggeleState: false,
typeToggeleState: false,
customerToggeleState: false,
forwarderToggeleState: false,
fleetToggeleState: false,
- filedToggeleState: false
+ filedToggeleState: false,
+ carNoToggeleState: false,
+ // 鐐瑰嚮鍙崇澶磋鎯呭脊绐�
+ faYunDetailobj: {},
+ modalShow: false,
+ coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅鍦�', '鍑虹叅浠�']
};
},
onShow() {
@@ -283,6 +308,14 @@
active: false
};
});
+ this.carNoList = res.data
+ .filter(v => v.conditionType == 6)
+ .map(item => {
+ return {
+ ...item,
+ active: false
+ };
+ });
});
},
// 鑾峰彇鏁版嵁
@@ -328,6 +361,9 @@
case 5:
this.filedList[i].active = !this.filedList[i].active;
break;
+ case 6:
+ this.carNoList[i].active = !this.carNoList[i].active;
+ break;
}
const validateFn = key => (v, arr) => {
@@ -343,7 +379,8 @@
customerName: this.customerList.filter(v => v.active == true).map(item => item.condition),
xsUser2Name: this.forwarderList.filter(v => v.active == true).map(item => item.condition),
fleetName: this.fleetList.filter(v => v.active == true).map(item => item.condition),
- filedName: this.filedList.filter(v => v.active == true).map(item => item.condition)
+ filedName: this.filedList.filter(v => v.active == true).map(item => item.condition),
+ carNo: this.carNoList.filter(v => v.active == true).map(item => item.condition)
};
const mapping = {
@@ -352,7 +389,8 @@
customerName: validateFn('customerName'),
xsUser2Name: validateFn('xsUser2Name'),
fleetName: validateFn('fleetName'),
- filedName: validateFn('filedName')
+ filedName: validateFn('filedName'),
+ carNo: validateFn('carNo')
};
this.filterList = this.taskList.map(val => {
return {
@@ -439,7 +477,25 @@
this.filedToggeleState = false;
}
break;
+ case 6:
+ if (!this.carNoToggeleState) {
+ this.carNoShow = this.carNoTotal;
+ this.carNoToggeleState = true;
+ } else {
+ this.carNoShow = 3;
+ this.carNoToggeleState = false;
+ }
+ break;
}
+ },
+ // 璺宠浆鍙戣繍璇︽儏
+ faYunDetail(takeCoalId) {
+ uni.navigateTo({
+ url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}`
+ });
+ },
+ confirm() {
+ this.modalShow = false;
}
},
computed: {
@@ -469,6 +525,9 @@
},
filedTotal() {
return this.filedList.length;
+ },
+ carNoTotal() {
+ return this.carNoList.length;
}
},
watch: {
@@ -513,7 +572,7 @@
justify-content: space-between;
align-items: center;
.content-text {
- width: vww(80);
+ width: 33.3%;
height: vww(30);
font-size: vww(20);
color: #393a3c;
@@ -560,7 +619,10 @@
}
}
.toggle-button {
- margin-top: vww(12);
+ margin: vww(12) auto;
+ position: relative;
+ left: -10%;
+ transform: translateX(-50%);
}
}
}
--
Gitblit v1.9.1