From 6d67dacc3c7c4ff6ce28f1d730ba977579231e9d Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期三, 22 五月 2024 17:41:11 +0800
Subject: [PATCH] feat:库管代码提交

---
 pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue |   73 ++++++++++++++++++++++++++----------
 1 files changed, 53 insertions(+), 20 deletions(-)

diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index a7dc442..a3d43d3 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -10,7 +10,7 @@
 							<view class="content-num">鍙戣繍杞︽暟</view>
 						</view>
 						<view class="content-text">
-							<view class="content-container">{{ totalTon.toFixed(2) }}</view>
+							<view class="content-container">{{ totalTon}}</view>
 							<view class="content-num">鍙戣繍鍚ㄦ暟</view>
 						</view>
 					</view>
@@ -35,6 +35,7 @@
 						icon="http://cdn.uviewui.com/uview/empty/data.png"
 						textSize="30"
 						iconSize="1000"
+						text="鏆傛棤鏁版嵁"
 						v-if="filterList.length == 0"></u-empty>
 					<view class="statistics-card"
 						v-for="(item, index) in filterList"
@@ -42,13 +43,12 @@
 						<view class="card-top">
 							<view class="left"><combined-title :title="item.condition"></combined-title></view>
 							<view class="card-top_num">
-								{{ item.taskCoalList.length }}杞{
-									item.taskCoalList
-										.reduce((prev, cur) => {
-											return prev + cur.clean;
-										}, 0)
-										.toFixed(2)
-								}}鍚�
+								{{ item.taskCoalList.length }}杞�
+								{{Number(item.taskCoalList
+                                        .reduce((prev, cur) => {
+                                            cur.clean=cur.clean||0
+                                            return prev + cur.clean;
+                                        }, 0)).toFixed(2)}}鍚�
 							</view>
 						</view>
 						<view class="card-main"
@@ -91,7 +91,7 @@
 							</view>
 							<view class="third-line">
 								<view class="carnum-icon">
-									<image src="https://mx.jzeg.cn:9095/appimg/image/banner/carNO.png"
+									<image src="https://mx.jzeg.cn:9096/appimg/image/banner/carNO.png"
 										mode="widthFix"></image>
 								</view>
 								<view class="carnum-text">{{ value.carNo || '' }}</view>
@@ -279,6 +279,7 @@
 </template>
 
 <script>
+	import BigNumber from "bignumber.js"
 	import combinedTitle from '@/components/combined-title/combined-title.vue';
 	export default {
 		components: {
@@ -330,11 +331,11 @@
 				faYunDetailobj: {},
 				modalShow: false,
 				coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
-					'杩涘叆鍦洪櫌'
+					'杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�', '杩斿洖鍔犲噺鍚�', '瓒呮椂', '鎵撳嵃涓�', '鎵撳嵃涓�', '濉啓'
 				]
 			};
 		},
-		onShow() {
+		onLoad() {
 			this.firstDate();
 			this.lastDate();
 			this.getShipping();
@@ -431,10 +432,15 @@
 						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) => {
-								return cur.clean + prev;
+								const cleanvalue = cur.clean || 0
+								return cleanvalue + prev
 							}, 0)
 						);
-						this.totalTon = this.totalTon.reduce((x, y) => x + y);
+						this.totalTon = this.totalTon.reduce((x, y) => {
+							let xx = new BigNumber(x)
+							let yy = new BigNumber(y)
+							return xx.plus(yy).toNumber().toFixed(2)
+						}, new BigNumber(0));
 					} else {
 						this.totalLength = 0;
 						this.totalTon = 0;
@@ -507,10 +513,15 @@
 					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) => {
-							return cur.clean + prev;
+							const cleanvalue = cur.clean || 0
+							return cleanvalue + prev
 						}, 0)
 					);
-					this.totalTon = this.totalTon.reduce((x, y) => x + y);
+					this.totalTon = this.totalTon.reduce((x, y) => {
+						let xx = new BigNumber(x)
+						let yy = new BigNumber(y)
+						return xx.plus(yy).toNumber().toFixed(2)
+					}, new BigNumber(0));
 				} else {
 					this.totalLength = 0;
 					this.totalTon = 0;
@@ -543,12 +554,15 @@
 				this.filedList.forEach(v => {
 					v.active = false;
 				});
+        this.getTmTaskCoalData()
 			},
 			confirm(e) {
 				console.log(e, '鏃ユ湡閫夋嫨');
 				this.first = e.range.before;
 				this.last = e.range.after;
-				this.conditinonShow = false;
+        this.$nextTick(() => {
+          this.$refs.calendar.close()
+        })
 			},
 			opencalendar() {
 				this.$refs.calendar.open();
@@ -894,7 +908,8 @@
 						margin-left: vww(20);
 						padding-bottom: vww(12);
 						position: relative;
-						@include flex flex-direction: column;
+						@include flex;
+						flex-direction: column;
 						align-items: flex-start;
 
 						.first-line {
@@ -917,12 +932,19 @@
 									height: vww(28);
 									line-height: vww(28);
 									text-align: center;
-									background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat;
+									background: url('https://mx.jzeg.cn:9096/appimg/image/banner/blueblock.png') no-repeat;
 									background-size: contain;
 									font-size: 30rpx;
 									font-weight: 400;
 									color: #ffffff;
 									margin-right: vww(20);
+								}
+
+								.filedname {
+									white-space: nowrap;
+									overflow: hidden;
+									text-overflow: ellipsis;
+									flex: 1;
 								}
 							}
 
@@ -950,6 +972,7 @@
 						.first-extra {
 							@include firstLine;
 							height: vww(32);
+							align-items: center;
 
 							.main-information {
 								width: 100%;
@@ -963,12 +986,22 @@
 									height: vww(28);
 									line-height: vww(28);
 									text-align: center;
-									background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
+									// display: flex;
+									// justify-content: center;
+									// align-items: center;
+									background: url('https://mx.jzeg.cn:9096/appimg/image/banner/redblock.png') no-repeat;
 									background-size: contain;
 									font-size: 30rpx;
 									font-weight: 400;
 									color: #ffffff;
 									margin-right: vww(20);
+								}
+
+								.filedname {
+									white-space: nowrap;
+									overflow: hidden;
+									text-overflow: ellipsis;
+									flex: 1;
 								}
 							}
 						}
@@ -1170,4 +1203,4 @@
 		// 	}
 		// }
 	}
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.1