From 7f02619d92353f989cccf29fd58321d4f13500bb Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期五, 21 六月 2024 14:04:26 +0800
Subject: [PATCH] feat:客户界面修改 productName 问题& 库管点击装卸问题

---
 pages/driver-page/drvier-my/certifiCate/certifiCate.vue |   45 ++++++++++++++++++++++++++++++++++-----------
 1 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/pages/driver-page/drvier-my/certifiCate/certifiCate.vue b/pages/driver-page/drvier-my/certifiCate/certifiCate.vue
index a274862..b057da5 100644
--- a/pages/driver-page/drvier-my/certifiCate/certifiCate.vue
+++ b/pages/driver-page/drvier-my/certifiCate/certifiCate.vue
@@ -36,6 +36,12 @@
 					<view class="line detail-value">
 						鍙告満锛歿{item.driverName}}
 					</view>
+					<view class="line detail-value">
+						鎶艰繍鍛橈細{{item.supercargoInfo?getUserName(item.supercargoInfo):'鏃�'}}
+					</view>
+					<view class="line detail-value">
+						{{item.startTime}}-{{item.expirationTime}}
+					</view>
 				</view>
 			</view>
 		</view>
@@ -121,7 +127,7 @@
 							label="杩愯緭璇佸紑濮嬫椂闂�"
 							labelWidth="20%"
 							borderBottom>
-							<uni-datetime-picker v-model="tranSportForm.startTime" type="date" :start="minDate" />
+							<uni-datetime-picker v-model="tranSportForm.startTime" type="date"  />
 						</u-form-item>
 						<u-form-item prop="expirationTime"
 							label="杩愯緭璇佽繃鏈熸椂闂�"
@@ -251,7 +257,11 @@
 			return {
 				minDate: this.getToday(),
 				previewImageShow: false,
-				supercargoList:[],
+				supercargoList:[{
+					driverName:"",
+					driverIdcard:"",
+					driverPhone:""
+				}],
 				scoreDetailList: [],
 				editTranShow:false,
 				upload:false,
@@ -314,17 +324,20 @@
 		},
 		onLoad() {
 			this.getScoreDetail()
-			this.$reqGet('getUserEntity').then(res => {
-				this.userInfo = res.data;
-				this.$reqGetId('getDriverListById', this.userInfo.userId).then(res => {
-					this.certificateData = res.data;
-				});
-			});
+			this.getData()
 		},
 		methods: {
 			...mapMutations(['changeisUploadimg']),
 			beforeRead() {
 				this.changeisUploadimg(true);
+			},
+			getData(){
+				this.$reqGet('getUserEntity').then(res => {
+					this.userInfo = res.data;
+					this.$reqGetId('getDriverListById', this.userInfo.userId).then(res => {
+						this.certificateData = res.data;
+					});
+				});
 			},
 			imageClick(data) {
 				this.previewImageSrc = data;
@@ -480,7 +493,7 @@
 							if (res.code == 0) {
 								this.editTranShow = false;
 								this.$u.toast('鎻愪氦鎴愬姛');
-								this.init();
+								this.getData();
 							} else {
 								uni.showToast({
 									title: res.msg,
@@ -570,10 +583,20 @@
 				})
 			},
 			deleteSupercar(){
-				this.supercargoList.splice(this.supercargoList.length - 1, 1)
+				if(this.supercargoList.length>1){
+					this.supercargoList.splice(this.supercargoList.length - 1, 1)
+				}
 			},
 			deleteDriver(){
-				this.driverList.splice(this.driverList.length - 1, 1);
+				if(this.driverList.length>1){
+					this.driverList.splice(this.driverList.length - 1, 1);
+				}
+			},
+			getUserName(e){
+				let data= e.split(',').map(item=>{
+					return item.split("|")[0]
+				}).join(',')
+				return data
 			}
 		}
 	}

--
Gitblit v1.9.1