From 5211e91aa2a919a9026b1db61bc1740c97d78c51 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期二, 15 十月 2024 09:29:24 +0800
Subject: [PATCH] feat:液氯瓶装同步pvc

---
 pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index 8ac789a..1141048 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -184,7 +184,7 @@
 									v-for="(item, index) in customerList"
 									:key="index"
 									@click="filterCondition(2, index, item.condition)">
-									<u-button :text="item.condition"
+									<u-button :text="item.name"
 										:type="item.active ? 'primary' : ''"
 										size="small"></u-button>
 								</view>
@@ -193,7 +193,7 @@
 							</view> -->
 							</view>
 						</view>
-						<view class="filter-body"
+						<!-- <view class="filter-body"
 							v-if="roleType == 1">
 							<view class="condition-name">鎵胯繍鍟�</view>
 							<view class="filter-name">
@@ -204,18 +204,9 @@
 									<u-button :text="item.condition"
 										:type="item.active ? 'primary' : ''"></u-button>
 								</view>
-								<!-- <view class="toggle-button">
-								<u-button
-									:text="forwarderShow < forwarderTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
-									type="primary"
-									size="small"
-									@click="toggle(3)"
-									v-if="forwarderTotal > 3"
-								></u-button>
-							</view> -->
 							</view>
-						</view>
-						<view class="filter-body"
+						</view> -->
+						<!-- <view class="filter-body"
 							v-if="roleType != 3">
 							<view class="condition-name">杞﹂槦</view>
 							<view class="filter-name">
@@ -227,11 +218,7 @@
 										:type="item.active ? 'primary' : ''"
 										size="small"></u-button>
 								</view>
-								<!-- <view class="toggle-button">
-								<u-button :text="fleetShow < fleetTotal ? '鏌ョ湅鏇村' : '鏀惰捣'" type="primary" size="small" @click="toggle(4)" v-if="fleetTotal > 3"></u-button>
-							</view> -->
-							</view>
-						</view>
+						</view> -->
 						<view class="filter-body" v-if="false">
 							<view class="condition-name">鐭垮満</view>
 							<view class="filter-name">
@@ -438,6 +425,7 @@
 				this.$reqGet('getTmTaskCoalData', { startTime: this.first, endTime: this.last }).then(res => {
 					this.filterList = this.taskList = res.data;
 					if (this.filterList.length != 0) {
+						let customerTemp;
 						this.totalLength = this.filterList.map(v => v.taskCoalList.length).reduce((x, y) => x + y);
 						this.totalTon = this.filterList.map(v =>
 							v.taskCoalList.reduce((prev, cur) => {
@@ -450,6 +438,20 @@
 							let yy = new BigNumber(y)
 							return xx.plus(yy).toNumber().toFixed(2)
 						}, new BigNumber(0));
+						customerTemp = res.data.map(item=>item.taskCoalList.map(val=>{
+							return {
+								name:val.customerName,
+								active:false
+							}
+						})).flat(Infinity);
+						console.log(customerTemp,'')
+						if(customerTemp.length){
+								let obj = {};
+							this.customerList = customerTemp.reduce(function (item, next) {
+							obj[next.name] ? '' : obj[next.name] = true && item.push(next)
+							return item
+						}, [])
+						}
 					} else {
 						this.totalLength = 0;
 						this.totalTon = 0;
@@ -493,7 +495,7 @@
 				let conditionMapping = {
 					productName: this.coalList.filter(v => v.active == true).map(item => item.condition),
 					orderType: this.typeList.filter(v => v.active == true).map(item => item.condition),
-					customerName: this.customerList.filter(v => v.active == true).map(item => item.condition),
+					customerName: this.customerList.filter(v => v.active == true).map(item => item.name), //瀹㈡埛绛涢�夋潯浠跺墠绔嚜宸卞仛 鎵�浠ユ槸name
 					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),

--
Gitblit v1.9.1