From 09c2ac7911db8993b6b435cb5af23fcf69c0fbe2 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期五, 24 三月 2023 14:40:50 +0800
Subject: [PATCH] 增加货代详情

---
 pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue |   80 +++++++++++++++++++++-------------------
 1 files changed, 42 insertions(+), 38 deletions(-)

diff --git a/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue b/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue
index 482f9fe..8b03754 100644
--- a/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue
+++ b/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue
@@ -6,19 +6,15 @@
 				<uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁">
 					<uni-tr>
 						<uni-th align="left">濮撳悕</uni-th>
-						<uni-td align="left">娴嬭瘯</uni-td>
+						<uni-td align="left">{{ HuoDaiForm.name }}</uni-td>
 					</uni-tr>
 					<uni-tr>
 						<uni-th align="left">鐢佃瘽</uni-th>
-						<uni-td align="left">18888888888</uni-td>
+						<uni-td align="left">{{ HuoDaiForm.phone }}</uni-td>
 					</uni-tr>
-					<uni-tr>
-						<uni-th align="left">鎬у埆</uni-th>
-						<uni-td align="left">鐢�</uni-td>
-					</uni-tr>
-					<uni-tr>
-						<uni-th align="left">鍏徃鍚嶇О</uni-th>
-						<uni-td align="left">娌冲寳鏃槼钀ラ攢</uni-td>
+					<uni-tr v-if="roleType == 2">
+						<uni-th align="left">瀹㈡埛鍚嶇О</uni-th>
+						<uni-td align="left">{{ HuoDaiForm.customerName }}</uni-td>
 					</uni-tr>
 				</uni-table>
 			</view>
@@ -29,19 +25,19 @@
 				<uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁">
 					<uni-tr>
 						<uni-th align="left">娉ㄥ唽鏃堕棿</uni-th>
-						<uni-td align="left">2022/04/09</uni-td>
+						<uni-td align="left">{{ HuoDaiForm.createTime }}</uni-td>
 					</uni-tr>
 					<uni-tr>
 						<uni-th align="left">绠$悊杞﹁締</uni-th>
-						<uni-td align="left">24杈�</uni-td>
+						<uni-td align="left">{{ HuoDaiForm.cars }}</uni-td>
 					</uni-tr>
 					<uni-tr>
 						<uni-th align="left">浠诲姟鎬绘暟</uni-th>
-						<uni-td align="left">20</uni-td>
+						<uni-td align="left">{{ HuoDaiForm.sum }}</uni-td>
 					</uni-tr>
 					<uni-tr>
 						<uni-th align="left">鎵ц瀹屾垚</uni-th>
-						<uni-td align="left">10</uni-td>
+						<uni-td align="left">{{ HuoDaiForm.over }}</uni-td>
 					</uni-tr>
 				</uni-table>
 			</view>
@@ -51,24 +47,32 @@
 
 <script>
 export default {
-	onLoad(params) {
-		this.huoDaiId = params.huoDaiId;
-	},
 	data() {
 		return {
-			huoDaiId: null
+			huoDaiId: null,
+			userId: '',
+			// 璐т唬璇︽儏淇℃伅琛ㄥ崟
+			HuoDaiForm: {}
 		};
+	},
+	onLoad(v) {
+		this.userId = v.userId;
 	},
 	onShow() {
 		this.init();
+	},
+	computed: {
+		roleType() {
+			return uni.getStorageSync('roleType');
+		}
 	},
 	methods: {
 		init() {
 			this.getHuoDaiDetail();
 		},
 		getHuoDaiDetail() {
-			this.$reqGet('getHuoDaiDetail', { huoDaiId: this.huoDaiId }).then(res => {
-				console.log(res, '璐т唬璇︽儏');
+			this.$reqGet('getHuoDaiDetail', { userId: this.userId }).then(res => {
+				this.HuoDaiForm = res.data;
 			});
 		}
 	}
@@ -91,29 +95,29 @@
 			line-height: vww(40);
 			background-color: #f5f5f5;
 		}
-			.uni-table {
-				min-width: 0 !important;
+		.uni-table {
+			min-width: 0 !important;
 
-				.uni-table-tr {
-					padding: 0;
-					font-size: vww(16);
-					font-weight: 300;
-					.uni-table-th {
-						height: vww(40);
-						line-height: vww(30);
-						padding: vww(5) vww(10);
-						color: #333333;
-						font-weight: 400;
-					}
+			.uni-table-tr {
+				padding: 0;
+				font-size: vww(16);
+				font-weight: 300;
+				.uni-table-th {
+					height: vww(40);
+					line-height: vww(30);
+					padding: vww(5) vww(10);
+					color: #333333;
+					font-weight: 400;
+				}
 
-					.uni-table-td {
-						height: vww(40);
-						line-height: vww(30);
-						padding: vww(5) vww(10);
-						color: #333333;
-					}
+				.uni-table-td {
+					height: vww(40);
+					line-height: vww(30);
+					padding: vww(5) vww(10);
+					color: #333333;
 				}
 			}
+		}
 	}
 }
 </style>

--
Gitblit v1.9.1