From 86baa8ff948d2e79588e0dd7efa16f6b8ac3b157 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 06 十二月 2024 15:29:15 +0800
Subject: [PATCH] ll

---
 h5/pages/staff/vehicle/sendACarDetail.vue |   42 +++++++++++++++++++++++++++++++-----------
 1 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/h5/pages/staff/vehicle/sendACarDetail.vue b/h5/pages/staff/vehicle/sendACarDetail.vue
index 6e62334..cdd69e7 100644
--- a/h5/pages/staff/vehicle/sendACarDetail.vue
+++ b/h5/pages/staff/vehicle/sendACarDetail.vue
@@ -99,18 +99,23 @@
         info.approveDateVO.canBeApproved != null &&
         info.approveDateVO.canBeApproved == 1
       ">
-			<template v-if="appr == '1'">
+			<template>
 				<view class="btn" @click="handleSub(3)">鎷掔粷</view>
 				<view class="btn agree" @click="handleSub(2)">鍚屾剰</view>
 			</template>
-			<view v-else class="btn agree" @click="isShowBack = true">鎾ら攢鐢ㄨ溅</view>
-		</view>
+		</view>
+		<template v-else>
+			<view v-if="(info.approveDateVO.canBeApproved == 1 || userInfo.memberId == info.memberId) && info.status == 0" class="main_footer"  @click="isShowBack = true">
+				<view class="agree btn">鎾ゅ洖鐢ㄨ溅</view>
+			</view>
+		</template>
+		
 
 		<!-- 鎾ら攢 -->
 		<u-popup :show="isShowBack" :round="10" :safeAreaInsetBottom="true" mode="bottom" @close="isShowBack = false">
 			<view class="appr_modal">
-				<view class="title">鎾ら攢鐢ㄨ溅</view>
-				<view class="line"> 鎾ら攢璇存槑 </view>
+				<view class="title">鎾ゅ洖鐢ㄨ溅</view>
+				<view class="line"> 鎾ゅ洖璇存槑 </view>
 				<textarea v-model="backParam.info" placeholder="闈炲繀濉�" placeholder-class="placeholder9" />
 				<view class="main_footer">
 					<view class="btn agree" @click="onSubBack">鎻愪氦</view>
@@ -121,10 +126,10 @@
 		<u-popup :show="showApprModal" :round="10" :safeAreaInsetBottom="true" mode="bottom" @close="showApprModal = false">
 			<view class="appr_modal">
 				<view class="title">{{ param.status == 2 ? "鍚屾剰" : "鎷掔粷" }}</view>
-				<view v-if="param.status == 2" class="line" @click="isShowDrive = true">
-					<text v-if="param.driverName">{{ param.driverName }}</text>
+				<view v-if="param.status == 2" class="line" @click="openModal">
+					<text :class="{placeholder9: info.approveDateVO.driverParam == 0}" v-if="param.driverName">{{ param.driverName }}</text>
 					<text v-else class="placeholder9">娲捐溅鍙告満</text>
-					<u-icon class="ml12" name="arrow-right" color="#999999" />
+					<u-icon v-if="info.approveDateVO.driverParam == 1" class="ml12" name="arrow-right" color="#999999" />
 				</view>
 				<textarea v-model="param.checkInfo" :placeholder="
             param.status == 2 ? '鍚屾剰璇存槑锛岄潪蹇呭~' : '鎷掔粷璇存槑锛屽繀濉�'
@@ -154,7 +159,8 @@
 				showApprModal: false,
 				isShowBack: false,
 				backParam: {},
-				isShowDrive: false,
+				isShowDrive: false,
+				userInfo: uni.getStorageSync('userInfo') || {},
 				id: '',
 				appr: '',
 				infoStatus: '',
@@ -201,6 +207,11 @@
 						})
 					}
 				})
+			},
+			openModal() {
+				if(this.info.approveDateVO.driverParam == 0) return
+				this.isShowDrive = true
+				
 			},
 			onSubBack() {
 				carUseBookBack({
@@ -254,12 +265,21 @@
 					this.getDriveList()
 				} else {
 
+				}
+				if(this.info.driverId && this.info.driverName){
+						this.$set(this.param, 'driverId', this.info.driverId)
+						this.$set(this.param, 'driverName', this.info.driverName)
 				}
 				this.showApprModal = true
 			},
 			getDriveList() {
-				driveListPost({}).then(res => {
-					this.driveList = [res.data]
+				driveListPost({}).then(res => {
+					const temp = res.data || []
+					this.driveList = [res.data]
+					if(this.param.driverId){
+						const item = temp.find(i=>i.id == this.param.driverId)
+						this.$set(this.param, 'driverName', item.name)
+					}
 				})
 			},
 			seletedDrive(e) {

--
Gitblit v1.9.3