From 83952eb02c37eb94b674ea806d787b1ca1a86fc4 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期三, 13 三月 2024 14:59:23 +0800
Subject: [PATCH] feat:井陉无人值守上传小程序更改线上配置

---
 pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue |  156 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 123 insertions(+), 33 deletions(-)

diff --git a/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue b/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
index 75eaaf8..18a1a1f 100644
--- a/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
+++ b/pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
@@ -5,6 +5,7 @@
 				icon="http://cdn.uviewui.com/uview/empty/data.png"
 				textSize="30"
 				iconSize="1000"
+				text="鏆傛棤鏁版嵁"
 				v-if="detailData.length == 0"></u-empty>
 		</view>
 		<view class="collection-form">
@@ -26,34 +27,43 @@
 						</view>
 						<view class="num">{{ item.hair }}</view>
 					</view>
-					<view class="item">
-						<view class="concrete"
-							:style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/clean.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }">
-							鍑�
+				</view>
+				<view class="info-container">
+					<view class="info-block">
+						<view class="car-num">
+							<text class="label-text">杞︾墝鍙�:</text>{{item.carNo}}
 						</view>
-						<view class="num">{{ item.clean }}</view>
+						<view class="order-margin">
+							<text class="label-text">鐓ょ鍚嶇О:</text>
+							{{item.coalName}}
+						</view>
+						<view class="order-type info">
+							璁㈠崟绫诲瀷:<text style="font-weight: 600;">{{item.orderType}}</text>
+						</view>
+						<view class="file-name info">
+							鐘舵��:<text style="font-weight: 600;">{{coalStatus[item.status]}}</text>
+						</view>
+						<view class="info createTime">
+							鍏ュ満鏃堕棿:{{item.createTime}}
+						</view>
+						<view class="info code">
+							璁㈠崟缂栧彿:{{item.code}}
+						</view>
+						<view class="info confirmPeople"
+							v-if="item.confirmPeople">
+							瀹℃牳浜�:{{item.confirmPeople}}
+						</view>
 					</view>
 				</view>
-				<view class="order-type info">
-					璁㈠崟绫诲瀷:{{item.orderType}}
-				</view>
-				<view class="car-num info">
-					杞︾墝鍙�:{{item.carNo}}
-				</view>
-				<view class="file-name info">
-					鐓ゅ満鍚嶇О:{{item.filedName}}
-				</view>
-				<view class="order-margin info">
-					鐓ょ鍚嶇О:{{item.coalName}}
-				</view>
-				<view class="confirm-button info">
+				<view class="confirm-button">
 					<u-button plain
 						type="primary"
 						text="纭畾瑁呭嵏"
 						shape="circle"
 						@click.stop="loadOrder(item.id)"
 						:loading="loading"
-						loadingText="纭"></u-button>
+						loadingText="纭"
+						v-if='!item.ableDischar&&item.isContainLoginUser'></u-button>
 				</view>
 			</view>
 		</view>
@@ -75,22 +85,45 @@
 				onlineurl,
 				loadShow: false, // 纭寮圭獥鎺у埗
 				loading: false,
-				id: ""
+				id: "",
+				coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
+					'杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�', '杩斿洖鍔犲噺鍚�', '瓒呮椂', '鎵撳嵃涓�', '鎵撳嵃涓�', '濉啓'
+				], // 鐘舵��
+				orderType: null
+			}
+		},
+		computed: {
+			userId() {
+				return uni.getStorageSync('userId')
 			}
 		},
 		onLoad(params) {
-			this.name = params.coalName ? params.coalName : ''
+			this.orderType = params.orderType || ''
 			this.init()
 		},
 		methods: {
+			onPullDownRefresh() {
+				this.init()
+				uni.stopPullDownRefresh();
+			},
 			init() {
 				uni.showLoading({
 					title: "鍔犺浇涓�"
 				})
-				this.$reqGet('getAccordingCoalNameAll', { coalName: this.name }).then(res => {
+				this.$reqGet('getAccordingCoalNameAll', { orderType: this.orderType }).then(res => {
 					uni.hideLoading()
 					if (res.code === 0) {
-						this.detailData = res.data
+						const errorStatusArr = [0, 1, 2, 3, 6, 11, 12, 13];
+						this.detailData = res.data.map(v => {
+							return {
+								...v,
+								ableDischar: v.skin === v.hair || v.hair === 0 && v.skin === 0 || v
+									.isPretendDischar !== 0 || errorStatusArr.indexOf(v.status) !== -1,
+								isContainLoginUser: v.confirmPeopleId ? v.confirmPeopleId.split(',')
+									.indexOf(this.userId) === -
+									1 : true
+							}
+						})
 					} else {
 						this.$u.toast('鍔犺浇澶辫触')
 					}
@@ -107,7 +140,9 @@
 					this.loading = false;
 					if (res.code === 0) {
 						this.$u.toast('瑁呭嵏鎴愬姛')
-						this.init()
+						setTimeout(() => {
+							this.init()
+						}, 1000)
 					} else {
 						this.$u.toast(res.msg ? res.msg : '瑁呭嵏澶辫触')
 					}
@@ -129,7 +164,7 @@
 
 		.collection-form-item {
 			width: 690rpx;
-			height: 400rpx;
+			height: 550rpx;
 			background: #ffffff;
 			box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
 			border-radius: 20rpx;
@@ -141,11 +176,13 @@
 			margin-top: vww(10);
 
 			.weigh-item {
-				width: 100%;
+				width: 94%;
 				height: vww(36);
-				margin: vww(10);
+				margin: 0 vww(10);
 				@include flex;
 				justify-content: space-around;
+				position: relative;
+				top: vww(-30);
 
 				.item {
 					min-width: vww(50);
@@ -170,17 +207,70 @@
 				}
 			}
 
-			.info {
-				height: vww(20);
-				color: #515151;
-				margin: vww(5);
-				margin-left: vww(20);
+			.info-container {
+				width: 100%;
+				height: vww(150);
+				display: flex;
+				justify-content: center;
+				position: relative;
+				top: vww(-15);
+
+				.info-block {
+					width: 600rpx;
+					height: vww(120);
+					display: flex;
+					justify-content: center;
+					flex-wrap: wrap;
+
+					.car-num,
+					.order-margin {
+						width: 100%;
+						display: flex;
+						justify-content: flex-start;
+						margin-left: 4%;
+						margin-top: vww(4);
+						color: #FF0000;
+						font-weight: 600;
+
+						.label-text {
+							color: #409eff;
+						}
+					}
+
+					.order-margin {
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+					}
+
+				}
+
+				.info {
+					width: 45%;
+					height: vww(20);
+					color: #515151;
+					margin: vww(5);
+				}
+
+				.createTime,
+				.code,
+				.confirmPeople {
+					width: 100%;
+					margin-left: vww(9);
+					display: flex;
+					justify-content: flex-start;
+				}
+
+				.confirmPeople {
+					margin-top: vww(24);
+				}
 			}
+
 
 			.confirm-button {
 				width: vww(80);
 				position: absolute;
-				bottom: vww(20);
+				bottom: vww(6);
 				right: vww(10);
 			}
 		}

--
Gitblit v1.9.1