From 6ef869b1adcf3a5bb8e4c3117dc507d173f13fd8 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 18 九月 2024 15:19:55 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit

---
 h5/pages/staff/task/visitorApprove.vue |  118 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 87 insertions(+), 31 deletions(-)

diff --git a/h5/pages/staff/task/visitorApprove.vue b/h5/pages/staff/task/visitorApprove.vue
index 27aee4d..f9eb139 100644
--- a/h5/pages/staff/task/visitorApprove.vue
+++ b/h5/pages/staff/task/visitorApprove.vue
@@ -5,21 +5,21 @@
       <view
         class="desc"
         :class="{
-          gray: info.status == '2' || info.status == '5' || info.status == '4',
+          gray: info.businessStatus == '2' || info.businessStatus == '3' || info.businessStatus == '4',
         }"
-        >{{ statusMap[info.status] }}</view
+        >{{ infoStatus }}</view
       >
-      <view v-if="info.status == '0'" class="status">{{
-        statusMap[info.status]
+      <view v-if="info.businessStatus == '0' || info.businessStatus == '1'" class="status">{{
+        statusMap[info.businessStatus]
       }}</view>
       <image
-        v-if="info.status == '2'"
+        v-if="info.businessStatus == '2'"
         src="@/static/ic_passed@2x.png"
         mode="widthFix"
         class="status_img"
       ></image>
       <image
-        v-if="info.status == '3' || info.status == '6'"
+        v-if="info.businessStatus == '3'"
         src="@/static/ic_refused@2x.png"
         mode="widthFix"
         class="status_img"
@@ -33,7 +33,7 @@
         <view class="value">{{ info.visitUserName }}</view>
       </view>
       <view class="item">
-        <view class="label">棰勮鍏�/绂诲巶鏃堕棿</view>
+        <view class="label">棰勮鍏�/绂诲洯鏃堕棿</view>
         <view class="value" v-if="info.visitTime">{{ info.visitTime }}</view>
       </view>
       <view class="emyty"></view>
@@ -68,6 +68,10 @@
         <view class="label">鏉ヨ浜嬬敱</view>
         <view class="value">{{ info.visitReason }}</view>
       </view>
+			<view v-if="info.constructionReason" class="item">
+			  <view class="label">鏂藉伐鍐呭</view>
+			  <view class="value">{{ info.constructionReason }}</view>
+			</view>
     </view>
     <!-- 娴佺▼ -->
     <view class="flow_wrap">
@@ -85,17 +89,27 @@
         >
           <view class="separate"></view>
           <view class="avatar">
+						<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="
-                item.faceImg
-                  ? item.faceImg
-                  : require('@/static/meeting/common/default_user@2x.png')
-              "
+              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"
+            />
+            <image
+            	v-if="item.status == 3"
+              class="status"
+              src="@/static/staff/liucheng_fail@2x.png"
               mode="widthFix"
             />
           </view>
@@ -107,7 +121,7 @@
             <view class="name_wrap">
               <text
                 >{{ item.memberName
-                }}<text class="status" v-if="item.statusInfo"
+                }}<text :class="{ status: item.statusInfo == '澶勭悊涓�' || item.status == '1'  }" v-if="item.statusInfo"
                   >({{ item.statusInfo }})</text
                 ></text
               >
@@ -116,20 +130,18 @@
               item.checkInfo
             }}</view>
             <!-- 鎶勯�佷汉 -->
-            <view v-if="item.approveType == 1" class="children">
+            <view v-if="item.approveType == 0 || item.type == 1 || item.approveType == 1" class="children">
               <view
                 class="child"
                 v-for="child in item.approveList"
                 :key="child.id"
               >
                 <image
+									v-if="child.faceImg"
                   class="child_img"
-                  :src="
-                    child.faceImg
-                      ? child.faceImg
-                      : require('@/static/meeting/common/default_user@2x.png')
-                  "
+                  :src="child.faceImg"
                 />
+								<view v-else class="child_name">{{ child.memberName && child.memberName.slice(0,1) }}</view>
                 <view>{{ child.memberName }}</view>
               </view>
             </view>
@@ -138,7 +150,14 @@
       </view>
     </view>
     <view class="emyty"></view>
-    <view class="main_footer">
+    <view
+      v-if="
+        info.approveDateVO != null &&
+        info.approveDateVO.canBeApproved != null &&
+        info.approveDateVO.canBeApproved == 1
+      "
+      class="main_footer"
+    >
       <view class="btn" @click="handleSub(3)">鎷掔粷</view>
       <view class="btn agree" @click="handleSub(2)">鍚屾剰</view>
     </view>
@@ -182,6 +201,7 @@
 
       id: '',
       type: '',
+			infoStatus: '',
       cateList: [
         { name: '璁垮鐢宠', id: 0 },
         { name: '璁垮鎶ュ', id: 1 },
@@ -192,17 +212,16 @@
       statusMap: {
         0: '寰呭鎵�',
         1: '瀹℃壒涓�',
-        2: '瀹℃壒閫氳繃',
-        3: '瀹℃壒鏈�氳繃',
+        2: '宸查�氳繃',
+        3: '宸叉嫆缁�',
         4: '宸插彇娑�',
-        5: '浠栦汉鎴栫',
-        6: '浠栦汉鎷掔粷',
       }
     }
   },
   onLoad(op) {
     this.id = op.id
     this.type = op.objType
+    this.infoStatus = op.info
     this.getDetail()
   },
   methods: {
@@ -210,10 +229,28 @@
       const { id } = this
       getVisitedDetail({ id }).then(res => {
         this.info = res.data
+				if(this.info.approveDateVO && this.info.approveDateVO.approveList.length > 0 ){
+					this.info.approveDateVO.approveList.forEach(item => {
+						if(item.approveList && item.approveList.length == 1 && item.type !== 1){
+							item.title = item.approveList[0].title
+							item.faceImg = item.approveList[0].faceImg
+							item.memberName = item.approveList[0].memberName
+							item.statusInfo = item.approveList[0].statusInfo
+							item.status = item.approveList[0].status
+							item.approveList = []
+						}
+					})
+				}
       })
     },
     onSubmit() {
       const { param, info } = this
+			if(param.status == '3' && !param.checkInfo){
+				return uni.showToast({
+              title: '璇疯緭鍏ユ嫆缁濊鏄�',
+              icon: 'none'
+            })
+			}
       carUseBookAppr({
         status: param.status,
         objType: info.type,
@@ -239,7 +276,6 @@
         status
       }
       this.showApprModal = true
-      this.showApprModal = true
     },
   },
 }
@@ -258,7 +294,7 @@
     padding: 30rpx 0;
 
     .flow_title {
-      font-weight: 500;
+      font-weight: 600;
       font-size: 32rpx;
       color: #222222;
       margin-bottom: 24rpx;
@@ -283,13 +319,18 @@
           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;
@@ -336,11 +377,26 @@
               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;
+							}
             }
           }
 
@@ -429,7 +485,7 @@
     padding: 30rpx 0;
 
     .name {
-      font-weight: 500;
+      font-weight: 600;
       font-size: 32rpx;
       margin-bottom: 20rpx;
       color: #222222;
@@ -468,7 +524,7 @@
     justify-content: space-between;
     width: 100%;
     left: 0;
-    padding: 30rpx 10rpx 60rpx;
+    // padding: 30rpx 10rpx 60rpx;
     display: flex;
     justify-content: space-between;
     background: #ffffff;
@@ -495,7 +551,7 @@
     padding: 36rpx 30rpx 0;
 
     .title {
-      font-weight: 500;
+      font-weight: 600;
       font-size: 32rpx;
       color: #222222;
       margin-bottom: 40rpx;

--
Gitblit v1.9.3