From 8bedb5a0c09876046b397a94a9b12bb6e805d284 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期三, 19 六月 2024 17:13:23 +0800
Subject: [PATCH] Merge branch 'jlhg' of http://39.96.92.240:10000/r/~fyy/unattended-app into jlhg

---
 pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 52 insertions(+), 7 deletions(-)

diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index a3d43d3..14c0247 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -13,6 +13,10 @@
 							<view class="content-container">{{ totalTon}}</view>
 							<view class="content-num">鍙戣繍鍚ㄦ暟</view>
 						</view>
+						<view class="content-text">
+							<view class="content-container">{{ tmNum}}</view>
+							<view class="content-num">鍙戣繍浠舵暟</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -49,6 +53,11 @@
                                             cur.clean=cur.clean||0
                                             return prev + cur.clean;
                                         }, 0)).toFixed(2)}}鍚�
+								 {{Number(item.taskCoalList
+                                        .reduce((prev, cur) => {
+                                            cur.productQuantity=cur.productQuantity||0
+                                            return prev + cur.productQuantity;
+                                        }, 0))}}浠�
 							</view>
 						</view>
 						<view class="card-main"
@@ -81,7 +90,7 @@
 							</view>
 							<view class="second-line">
 								<view class="coal-name">
-									<view class="">{{ value.coalName }}</view>
+									<view class="">{{ value.productName }}</view>
 									<view class="black-bar"></view>
 									<view class="coal-type"
 										v-if="value.orderType">{{ value.orderType }}</view>
@@ -134,7 +143,7 @@
 							</view>
 						</view>
 						<view class="filter-body">
-							<view class="condition-name">鐓ょ</view>
+							<view class="condition-name">浜у搧</view>
 							<view class="filter-name">
 								<view class="filter-button"
 									v-for="(item, index) in coalList"
@@ -223,7 +232,7 @@
 							</view> -->
 							</view>
 						</view>
-						<view class="filter-body">
+						<view class="filter-body" v-if="false">
 							<view class="condition-name">鐭垮満</view>
 							<view class="filter-name">
 								<view class="filter-button"
@@ -482,7 +491,7 @@
 					}
 				};
 				let conditionMapping = {
-					coalName: this.coalList.filter(v => v.active == true).map(item => item.condition),
+					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),
 					xsUser2Name: this.forwarderList.filter(v => v.active == true).map(item => item.condition),
@@ -492,7 +501,7 @@
 				};
 
 				const mapping = {
-					coalName: validateFn('coalName'),
+					productName: validateFn('productName'),
 					orderType: validateFn('orderType'),
 					customerName: validateFn('customerName'),
 					xsUser2Name: validateFn('xsUser2Name'),
@@ -637,8 +646,15 @@
 			},
 			// 璺宠浆鍙戣繍璇︽儏
 			faYunDetail(takeCoalId) {
+				console.log(takeCoalId,'tackle')
 				uni.navigateTo({
-					url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}`
+					url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}`,
+					success(res) {
+						console.log(res);
+						},
+						fail(err) {
+						console.log(err,'璺宠浆涓嶈繃鍘�');
+						}
 				});
 			},
 			// 鎵撳紑绛涢�夋潯浠跺脊绐�
@@ -680,7 +696,36 @@
 			},
 			carNoTotal() {
 				return this.carNoList.length;
-			}
+			},
+			//鍙戣繍浠舵暟
+			tmNum(){
+				console.log(this.filterList,'result')
+				if( !this.filterList.length){
+					return  0
+				}else{
+					const result =   this.filterList.map(v =>
+						v.taskCoalList.reduce((prev, cur) => {
+							let  cleanvalue
+							if(!cur.isWeight){
+							  cleanvalue = Number(cur.productQuantity)  || 0
+							}else{
+							  cleanvalue = 0;
+							}
+							return cleanvalue + prev
+						}, 0)
+					);
+					if(result.length){
+					return  result.reduce((x, y) => {
+							let xx = new BigNumber(x)
+							let yy = new BigNumber(y)
+							return xx.plus(yy).toNumber()
+						}, new BigNumber(0));;
+					
+					}else{
+						return 0;
+					}	
+				}
+			},
 		},
 		watch: {
 			dateselect(newV, old) {

--
Gitblit v1.9.1