From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 16 十月 2024 15:59:38 +0800
Subject: [PATCH] 代码初始化
---
h5/pages/staff/vehicle/sendACarDetail.vue | 373 +++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 290 insertions(+), 83 deletions(-)
diff --git a/h5/pages/staff/vehicle/sendACarDetail.vue b/h5/pages/staff/vehicle/sendACarDetail.vue
index 9cd3da5..da13b54 100644
--- a/h5/pages/staff/vehicle/sendACarDetail.vue
+++ b/h5/pages/staff/vehicle/sendACarDetail.vue
@@ -3,12 +3,18 @@
<view class="status_wrap">
<view class="name">{{ info.memberName }}鐨勭敤杞︾敵璇�</view>
<view class="placeholder9">{{ info.companyName }}</view>
+ <view
+ class="desc"
+ :class="{
+ gray: info.businessStatus == '2' || info.businessStatus == '3' || info.businessStatus == '4',
+ }"
+ >{{ infoStatus }}</view
+ >
<view class="status">
- <text class="loading" v-if="info.status == '0'">鐢宠涓�</text>
- <text class="grr" v-if="info.status == '1'">瀹℃壒涓�</text>
- <text class="grr" v-if="info.status == '2'">瀹℃壒閫氳繃</text>
- <text class="error" v-if="info.status == '3'">瀹℃壒涓嶉�氳繃</text>
- <text class="grr" v-if="info.status == '4'">宸插彇娑�</text>
+ <text class="loading" :class="{
+ grr: info.status == 1 || info.status == 2 || info.status == 4,
+ error: info.status == 3
+ }" v-if="info.status == '0'">{{statusMap[info.status]}}</text>
</view>
</view>
<!-- -->
@@ -16,19 +22,25 @@
<view class="module_list">
<view class="item">
<view class="label">棰勮鐢ㄨ溅鏃舵</view>
- <view class="value">{{ info.startTime.slice(0, 16) }}鑷硔{ info.endTime.slice(0, 16) }}</view>
+ <view class="value" v-if="info.startTime"
+ >{{ info.startTime.slice(0, 16) }}鑷硔{
+ info.endTime.slice(0, 16)
+ }}</view
+ >
</view>
- <view class="item">
+ <view class="item">
<view class="label">棰勮鍑哄彂鏃堕棿</view>
<view class="value">{{ info.planUseDate }}</view>
</view>
- <view class="item">
+ <view class="item">
<view class="label">涔樿溅浜哄憳</view>
<view class="value">{{ info.memberNames }}</view>
</view>
<view class="item">
<view class="label">鐩殑鍦�</view>
- <view class="value">{{ info.type == '1' ? '甯傚' : '瀹ゅ唴' }}锛歿{ info.addr }}</view>
+ <view class="value"
+ >{{ info.type == "1" ? "甯傚" : "瀹ゅ唴" }}锛歿{ info.addr }}</view
+ >
</view>
<view class="item">
<view class="label">鐢ㄨ溅浜嬬敱</view>
@@ -46,52 +58,75 @@
<!-- 娴佺▼ -->
<view class="flow_wrap">
<view class="flow_title">娴佺▼</view>
- <view class="list">
- <view class="item">
+ <view
+ class="list"
+ v-if="
+ info.approveDateVO != null && info.approveDateVO.approveList != null
+ "
+ >
+ <view
+ class="item"
+ v-for="(item, index) in info.approveDateVO.approveList"
+ :key="item.id"
+ >
+ <view class="separate"></view>
<view class="avatar">
- <image class="img" src="@/static/logo@2x.png" mode="widthFix" />
+ <image
+ v-if="item.type == 1"
+ class="img"
+ src="@/static/staff/ic_chaosong@2x.png"
+ />
<image
+ v-else-if="item.approveType == 1 || item.approveType == 0"
+ class="img"
+ src="@/static/staff/ic_shenpiren@2x.png"
+ />
+ <span v-else class="img_name">{{item.memberName && item.memberName.slice(0,1)}}</span>
+ <image
+ v-if="item.status == 2"
class="status"
src="@/static/staff/liucheng_success@2x.png"
mode="widthFix"
/>
- <view class="separate"></view>
- </view>
- <view class="content">
- <view class="head">
- <view class="event">鏌愭煇鎻愪氦鐨勬嫓璁跨敵璇�</view>
- <view class="time">time</view>
- </view>
- <view class="name_wrap">
- <text>鏉庝笢(<text class="status">澶勭悊涓�</text>)</text>
- </view>
- <view class="remark">鍚屾剰鏀捐</view>
- </view>
- </view>
- <view class="item">
- <view class="avatar">
- <image class="img" src="@/static/logo@2x.png" mode="widthFix" />
<image
+ v-if="item.status == 3"
class="status"
- src="@/static/staff/liucheng_success@2x.png"
+ src="@/static/staff/liucheng_fail@2x.png"
mode="widthFix"
/>
</view>
<view class="content">
<view class="head">
- <view class="event">鏌愭煇鎻愪氦鐨勬嫓璁跨敵璇�</view>
- <view class="time">time</view>
+ <view class="event">{{ item.title }}</view>
+ <view class="time">{{ item.checkDate }}</view>
</view>
<view class="name_wrap">
- <text>鏉庝笢(<text class="status">澶勭悊涓�</text>)</text>
+ <text
+ >{{ item.memberName
+ }}<text class="status" v-if="item.statusInfo"
+ >({{ item.statusInfo }})</text
+ ></text
+ >
</view>
- <view class="carbon">
- <view class="carbon_item" v-for="i in 12">
+ <view v-if="item.checkInfo" class="remark">{{
+ item.checkInfo
+ }}</view>
+ <!-- 鎶勯�佷汉 -->
+ <view v-if="item.approveType == 1" class="children">
+ <view
+ class="child"
+ v-for="child in item.approveList"
+ :key="child.id"
+ >
<image
- src="../../../static/logo@2x.png"
- mode="widthFix"
- ></image>
- <view class="text">name</view>
+ class="child_img"
+ :src="
+ child.faceImg
+ ? child.faceImg
+ : require('@/static/meeting/common/default_user@2x.png')
+ "
+ />
+ <view>{{ child.memberName }}</view>
</view>
</view>
</view>
@@ -99,11 +134,42 @@
</view>
</view>
<view class="emyty"></view>
- <view class="main_footer">
- <view class="btn" @click="handleSub('0')">鎷掔粷</view>
- <view class="btn agree" @click="handleSub('1')">鍚屾剰</view>
+ <view
+ class="main_footer"
+ v-if="
+ info.approveDateVO != null &&
+ info.approveDateVO.canBeApproved != null &&
+ info.approveDateVO.canBeApproved == 1
+ "
+ >
+ <template v-if="appr == '1'">
+ <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>
+ <!-- 鎾ら攢 -->
+ <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>
+ <textarea
+ v-model="backParam.info"
+ placeholder="闈炲繀濉�"
+ placeholder-class="placeholder9"
+ />
+ <view class="main_footer">
+ <view class="btn agree" @click="onSubBack">鎻愪氦</view>
+ </view>
+ </view>
+ </u-popup>
<!-- -->
<u-popup
:show="showApprModal"
@@ -113,34 +179,69 @@
@close="showApprModal = false"
>
<view class="appr_modal">
- <view class="title">鍚屾剰</view>
+ <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>
+ <text v-else class="placeholder9">娲捐溅鍙告満</text>
+ <u-icon class="ml12" name="arrow-right" color="#999999" />
+ </view>
<textarea
- placeholder="鍚屾剰璇存槑锛岄潪蹇呭~"
+ v-model="param.checkInfo"
+ :placeholder="
+ param.status == 2 ? '鍚屾剰璇存槑锛岄潪蹇呭~' : '鎷掔粷璇存槑锛屽繀濉�'
+ "
placeholder-class="placeholder9"
/>
<view class="main_footer">
<view class="btn" @click="showApprModal = false">鍙栨秷</view>
- <view class="btn agree">鎻愪氦</view>
+ <view class="btn agree" @click="onSubmit">鎻愪氦</view>
</view>
</view>
</u-popup>
+ <!-- 鍙告満 -->
+ <u-picker
+ keyName="name"
+ :show="isShowDrive"
+ @close="isShowDrive = false"
+ :closeOnClickOverlay="true"
+ :columns="driveList"
+ @confirm="seletedDrive"
+ @cancel="isShowDrive = false"
+ ></u-picker>
</view>
</template>
<script>
-import { carUseBookDetail } from '@/api'
+import { carUseBookDetail, carUseBookAppr, driveListPost, carUseBookBack } from '@/api'
export default {
data() {
return {
showApprModal: false,
+ isShowBack: false,
+ backParam: {},
+ isShowDrive: false,
id: '',
+ appr: '',
+ infoStatus: '',
info: {},
- param: {},
+ param: {
+ status: ''
+ },
+ statusMap: {
+ 0: '寰呭鎵�',
+ 1: '瀹℃壒涓�',
+ 2: '宸查�氳繃',
+ 3: '鎾ゅ洖鐢宠',
+ 4: '宸插彇娑�',
+ },
+ driveList: []
}
},
onLoad(option) {
this.id = option.id
+ this.appr = option.appr || ''
+ this.infoStatus = option.info
this.getDetail()
},
methods: {
@@ -150,15 +251,69 @@
this.info = { ...res.data }
})
},
- handleSub(flag) {
+ onSubBack() {
+ carUseBookBack({
+ id: this.id,
+ info: this.backParam.info
+ }).then(res => {
+ if (res.code === 200) {
+ uni.showToast({
+ title: '鎾ら攢鎴愬姛',
+ icon: 'success',
+ duration: 2000
+ })
+ this.isShowBack = false
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1000)
+ }
+ })
+ },
+ onSubmit() {
+ const { param, info } = this
+ carUseBookAppr({
+ status: param.status,
+ objType: info.type == 1 ? 4 : 3,
+ objId: this.id,
+ driverId: param.driverId,
+ checkInfo: param.checkInfo
+ }).then(res => {
+ if (res.code === 200) {
+ this.showApprModal = false
+ setTimeout(() => {
+ uni.showToast({
+ title: '鎿嶄綔鎴愬姛',
+ icon: 'success'
+ })
+ })
+ uni.navigateBack()
+ }
+ })
+ },
+ handleSub(status) {
// this.param.flag =
- if (flag === '1') {
-
+ this.param = {
+ status
+ }
+ this.showApprModal = true
+ if (status === 2) { // 鍚屾剰
+ this.getDriveList()
} else {
}
this.showApprModal = true
- }
+ },
+ getDriveList() {
+ driveListPost({}).then(res => {
+ this.driveList = [res.data]
+ })
+ },
+ seletedDrive(e) {
+ console.log(e.value[0])
+ this.$set(this.param, 'driverId', e.value[0].id)
+ this.$set(this.param, 'driverName', e.value[0].name)
+ this.isShowDrive = false
+ },
},
}
</script>
@@ -174,31 +329,45 @@
.flow_wrap {
padding: 30rpx 0;
-
+
.flow_title {
- font-weight: 500;
+ font-weight: 600;
font-size: 32rpx;
color: #222222;
margin-bottom: 24rpx;
}
-
+
.list {
.item {
display: flex;
margin-bottom: 48rpx;
-
+ position: relative;
+ .separate {
+ position: absolute;
+ width: 4rpx;
+ height: 100%;
+ background-color: #eeeeee;
+ left: 40rpx;
+ transform: translate(-50%, 0);
+ top: 80rpx;
+ }
.avatar {
width: 80rpx;
height: 80rpx;
position: relative;
margin-right: 20rpx;
-
+ display: flex;
+ align-items: center;
+ justify-content: center;
.img {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
-
+ .img_name{
+ font-size: 32rpx;
+ color: #FFFFFF;
+ }
.status {
width: 28rpx;
height: 28rpx;
@@ -207,45 +376,67 @@
right: 0;
bottom: 0;
}
-
- .separate {
- position: absolute;
- width: 4rpx;
- height: 100%;
- background-color: #eeeeee;
- left: 50%;
- transform: translate(-50%, 0);
- bottom: -80rpx;
- }
}
-
+
.content {
flex: 1;
-
+
.head {
display: flex;
justify-content: space-between;
margin-bottom: 4rpx;
-
+
.event {
font-size: 30rpx;
}
-
+
.time {
font-size: 26rpx;
color: #999999;
}
}
-
+
.name_wrap {
font-size: 26rpx;
color: #777777;
-
+
.status {
- color: #279baa;
+ color: $uni-color-primary;
}
}
-
+ .children {
+ display: flex;
+ flex-wrap: wrap;
+ margin-top: 12rpx;
+ .child {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ margin-right: 12rpx;
+ font-size: 26rpx;
+ color: #777777;
+ .child_img {
+ width: 48rpx;
+ height: 48rpx;
+ border-radius: 50%;
+ margin-bottom: 2rpx;
+ }
+ .child_name{
+ margin-bottom: 2rpx;
+ width: 48rpx;
+ height: 48rpx;
+ text-align: center;
+ justify-content: center;
+ padding-top: 4rpx;
+ font-size: 28rpx;
+ border-radius: 50%;
+ color: #FFFFFF;
+ background-color: $uni-color-primary;
+ }
+ }
+ }
+
.remark {
margin-top: 12rpx;
background-color: #f7f7f7;
@@ -274,6 +465,11 @@
font-size: 26rpx;
color: #777777;
}
+ }
+ }
+ &:nth-last-child(1) {
+ .separate {
+ height: 0;
}
}
}
@@ -326,15 +522,19 @@
padding: 30rpx 0;
.name {
- font-weight: 500;
+ font-weight: 600;
font-size: 32rpx;
- margin-bottom: 20rpx;
+ margin-bottom: 16rpx;
color: #222222;
}
.desc {
font-size: 26rpx;
color: #ed4545;
+ margin-top: 16rpx;
+ }
+ .gray {
+ color: #999999;
}
.status {
@@ -346,7 +546,7 @@
padding: 0 32rpx;
border-radius: 0rpx 0rpx 0rpx 30rpx;
background-color: #e9edff;
- color: #279baa;
+ color: $uni-color-primary;
}
}
@@ -356,7 +556,7 @@
justify-content: space-between;
.btn {
- width: 336rpx;
+ flex: 1;
height: 88rpx;
line-height: 88rpx;
background: #ffffff;
@@ -364,21 +564,28 @@
border: 1rpx solid #999999;
font-size: 32rpx;
text-align: center;
- margin: 16rpx 0;
+ margin: 16rpx;
}
.agree {
- background: #279baa;
+ background: $uni-color-primary;
color: #fff;
- border: 1rpx solid #279baa;
+ border: 1rpx solid $uni-color-primary;
}
}
.appr_modal {
padding: 36rpx 30rpx 0;
-
+ .line {
+ height: 90rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #e4e4e4;
+ margin-bottom: 20rpx;
+ }
.title {
- font-weight: 500;
+ font-weight: 600;
font-size: 32rpx;
color: #222222;
margin-bottom: 40rpx;
--
Gitblit v1.9.3