From d154966cc9492a30c47809aa2824ba61d18e6fef Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 28 五月 2024 16:51:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 h5/pages/appointmentDetails/appointmentDetails.vue |  454 +++++++++++++++++++++++++++++---------------------------
 1 files changed, 234 insertions(+), 220 deletions(-)

diff --git a/h5/pages/appointmentDetails/appointmentDetails.vue b/h5/pages/appointmentDetails/appointmentDetails.vue
index a58e09b..2787c8f 100644
--- a/h5/pages/appointmentDetails/appointmentDetails.vue
+++ b/h5/pages/appointmentDetails/appointmentDetails.vue
@@ -1,233 +1,247 @@
 <template>
-	<view class="box">
-		<view class="head_wrap head_success" v-if="info.status == 1"> 
-			<view class="h1">璁垮棰勭害瀹℃牳閫氳繃</view>
-			<view class="h2">鎮ㄧ殑鏉ヨ鐢宠宸插鏍搁�氳繃锛岃鍦ㄨ瀹㈡満绛惧埌鍏ュ巶銆傚閬囩壒娈婃儏鍐碉紝鍙仈绯昏璁夸汉鎴栧畨淇濅汉鍛�</view>
-		</view>
-		<view class="qr_wrap" v-if="info.status == 1">
-			<canvas class="box_head_qrcode" canvas-id="img"></canvas>
-			<view class="text">浣跨敤璁垮鏈烘壂鐮佺鍒�</view>
-		</view>
-		<view class="head_wrap head_padding" v-if="info.status == 2"> 
-			<view class="h1">璁垮棰勭害寰呭鏍�</view>
-			<view class="h2">鎮ㄧ殑棰勭害鍗曞凡鎻愪氦瀹℃牳锛岃绛夊緟琚浜哄鏍�</view>
-		</view>
-		<view class="head_wrap head_error" v-if="info.status == 3"> 
-			<view class="h1">璁垮棰勭害瀹℃牳涓嶉�氳繃</view>
-			<view class="h2">鎮ㄧ殑鏉ヨ鐢宠宸茶椹冲洖锛屽鏈夌枒闂紝鍙仈绯昏璁夸汉</view>
-		</view>
-		<view class="box_list">
-			<view class="box_list_label">鎷滆淇℃伅</view>
-			<view class="box_list_tips" v-if="info.status === 2">璇锋敞鎰忔煡鐪嬪嚭鍏ラ棬绂佷笅鍙戞儏鍐碉紝濡傝嫢涓嬪彂澶辫触闇�閲嶆柊鐢宠</view>
-			<view class="box_list_item">
-				<view class="box_list_item_label">琚浜哄憳锛�</view>
-				<view class="box_list_item_val">{{info.visitUserName}}</view>
-			</view>
-			<!-- <view class="box_list_item">
+  <view class="box">
+    <view class="head_wrap head_success" v-if="info.status == 2">
+      <view class="h1">璁垮棰勭害瀹℃牳閫氳繃</view>
+      <view class="h2"
+        >鎮ㄧ殑鏉ヨ鐢宠宸插鏍搁�氳繃锛岃鍦ㄨ瀹㈡満绛惧埌鍏ュ巶銆傚閬囩壒娈婃儏鍐碉紝鍙仈绯昏璁夸汉鎴栧畨淇濅汉鍛�</view
+      >
+    </view>
+    <view class="qr_wrap" v-if="info.status == 2">
+      <canvas class="box_head_qrcode" canvas-id="img"></canvas>
+      <view class="text">浣跨敤璁垮鏈烘壂鐮佺鍒�</view>
+    </view>
+    <view class="head_wrap head_padding" v-if="info.status == 0">
+      <view class="h1">璁垮棰勭害寰呭鏍�</view>
+      <view class="h2">鎮ㄧ殑棰勭害鍗曞凡鎻愪氦瀹℃牳锛岃绛夊緟琚浜哄鏍�</view>
+    </view>
+    <view class="head_wrap head_error" v-if="info.status == 3">
+      <view class="h1">璁垮棰勭害瀹℃牳涓嶉�氳繃</view>
+      <view class="h2">鎮ㄧ殑鏉ヨ鐢宠宸茶椹冲洖锛屽鏈夌枒闂紝鍙仈绯昏璁夸汉</view>
+    </view>
+    <view class="box_list">
+      <view class="box_list_label">鎷滆淇℃伅</view>
+      <view class="box_list_tips" v-if="info.status == 6 || info.status == 3"
+        >璇锋敞鎰忔煡鐪嬪嚭鍏ラ棬绂佷笅鍙戞儏鍐碉紝濡傝嫢涓嬪彂澶辫触闇�閲嶆柊鐢宠</view
+      >
+      <view class="box_list_item">
+        <view class="box_list_item_label">琚浜哄憳锛�</view>
+        <view class="box_list_item_val"
+          >{{ info.visitUserCompany
+          }}{{ info.visitUserName ? "-" + info.visitUserName : "" }}</view
+        >
+      </view>
+      <!-- <view class="box_list_item">
 				<view class="box_list_item_label">杞︾墝鍙凤細</view>
 				<view class="box_list_item_val">{{info.carNos}}</view>
 			</view> -->
-			<view class="box_list_item">
-				<view class="box_list_item_label">鎷滆浜嬬敱锛�</view>
-				<view class="box_list_item_val">{{info.visitReason}}</view>
-			</view>
-			<view class="box_list_item">
-				<view class="box_list_item_label">鎷滆鏃堕棿锛�</view>
-				<view class="box_list_item_val">{{info.visitTime}}</view>
-			</view>
-			<view class="box_list_item">
-				<view class="box_list_item_label">璁块棶闂ㄧ锛�</view>
-				<view class="box_list_item_val" v-if="info.doorGroupName && info.doorGroupName.length > 0">{{info.doorGroupName.join('銆�')}}</view>
-			</view>
-			<view class="box_list_item">
-				<view class="box_list_item_label">涓昏瀹細</view>
-				<view class="box_list_item_val">
-					{{info.name}} {{info.phone}}
-				</view>
-			</view>
-			<view class="box_list_item" v-for="(item, index) in info.withVisitsList" :key="index">
-				<view class="box_list_item_label">闅忚浜哄憳{{index + 1}}锛�</view>
-				<view class="box_list_item_val">
-					{{item.name}} {{item.phone}}
-					<view class="box_list_item_val_btn" v-if="[2,5,7,8,9].includes(item.status)">
-						<u-button text="鏌ョ湅浜岀淮鐮�" size="mini" @click="seeQrCode(item)" type="primary"></u-button>
-					</view>
-				</view>
-			</view>
-		</view>
-		<u-popup :show="show" mode="center" @close="close">
-			<view class="qrocde">
-				<canvas class="qrcode_img" canvas-id="img1"></canvas>
-			</view>
-		</u-popup>
-	</view>
+      <view class="box_list_item">
+        <view class="box_list_item_label">鎷滆浜嬬敱锛�</view>
+        <view class="box_list_item_val">{{ info.visitReason }}</view>
+      </view>
+      <view class="box_list_item">
+        <view class="box_list_item_label">鎷滆鏃堕棿锛�</view>
+        <view class="box_list_item_val">{{ info.visitTime }}</view>
+      </view>
+      <view class="box_list_item">
+        <view class="box_list_item_label">璁垮淇℃伅锛�</view>
+        <view class="box_list_item_val">{{ info.name }} {{ info.phone }}</view>
+      </view>
+      <view class="box_list_item">
+        <view class="box_list_item_label">鏂藉伐浜哄憳锛�</view>
+        <view class="box_list_item_val">{{ info.type == 0 ? '鍚�' : '鏄�'}}</view>
+      </view>
+			<view class="box_list_item" v-if="info.type == '1'">
+        <view class="box_list_item_label">鏂藉伐鍐呭锛�</view>
+        <view class="box_list_item_val">{{ info.constructionReason}}</view>
+      </view>
+      <view class="box_list_item">
+        <view class="box_list_item_label">闅忚杞﹁締锛�</view>
+        <view class="box_list_item_val">{{ info.carNos }}</view>
+      </view>
+    </view>
+    <u-popup :show="show" mode="center" @close="close">
+      <view class="qrocde">
+        <canvas class="qrcode_img" canvas-id="img1"></canvas>
+      </view>
+    </u-popup>
+  </view>
 </template>
 
 <script>
-	import wxcode from 'uniapp-qrcode'
-	import { visitorSubDetail } from '@/api'
+import wxcode from 'uniapp-qrcode'
+import { getVisitedDetail } from '@/api'
 
-	export default {
-		data() {
-			return {
-				info: {
-					status: 1
-				},
-				show: false
-			};
-		},
-		onLoad(option) {
-			// this.$u.api.detail({ id: option.id })
-			// visitorSubDetail({ id: option.id })
-			// 	.then(res => {
-			// 		if (res.code === 200) {
-			// 			this.info = res.data
-			// 			if (res.data.qrcode) {
-			// 				this.$nextTick(() => {
-			// 					wxcode.qrcode('img', res.data.qrcode, 320, 320)
-			// 				})
-			// 			}
-			// 		}
-			// 	})
-		},
-		methods: {
-			close() {
-				this.show = false
-			},
-			seeQrCode(code) {
-				if (code.qrcode) {
-					this.show = true
-					this.$nextTick(() => {
-						wxcode.qrcode('img1', code.qrcode, 300, 300)
-					})
-				} else {
-					uni.showToast({ title: '鏆傛棤浜岀淮鐮�', icon: 'none' })
-				}
-			}
-		}
-	}
+export default {
+  data() {
+    return {
+      info: {},
+      show: false
+    }
+  },
+  onLoad(option) {
+    this.getDetail(option.id)
+    // visitorSubDetail({ id: option.id })
+    // 	.then(res => {
+    // 		if (res.code === 200) {
+    // 			this.info = res.data
+    // 			if (res.data.qrcode) {
+    // 				this.$nextTick(() => {
+    // 					wxcode.qrcode('img', res.data.qrcode, 320, 320)
+    // 				})
+    // 			}
+    // 		}
+    // 	})
+
+  },
+  methods: {
+    close() {
+      this.show = false
+    },
+    getDetail(id) {
+      getVisitedDetail({ id }).then(res => {
+        this.info = res.data
+        if (res.data.qrcode) {
+          this.$nextTick(() => {
+            wxcode.qrcode('img', res.data.qrcode, 320, 320)
+          })
+        }
+      })
+    },
+    seeQrCode(code) {
+      if (code.qrcode) {
+        this.show = true
+        this.$nextTick(() => {
+          wxcode.qrcode('img1', code.qrcode, 300, 300)
+        })
+      } else {
+        uni.showToast({ title: '鏆傛棤浜岀淮鐮�', icon: 'none' })
+      }
+    }
+  }
+}
 </script>
 <style>
-	page {
-		background-color: #f7f7f7;
-	}
+page {
+  background-color: #f7f7f7;
+}
 </style>
 <style lang="scss" scoped>
-	.box {
-		width: 100%;
-		.qrocde {
-			width: 300rpx;
-			height: 300rpx;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			.qrcode_img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-		.qr_wrap{
-			background-color: #fff;
-			text-align: center;
-			.box_head_qrcode {
-				width: 320rpx;
-				height: 320rpx;
-			}
-			.text{
-				font-size: 30rpx;
-				color: #279BAA;
-				padding: 20rpx 0 30rpx;
-			}
-		}
-		.head_wrap{
-			padding: 30px;
-			
-			.h1{
-				margin-bottom: 16rpx;
-				font-weight: 600;
-				font-size: 36rpx;
-			}
-			.h2{
-				font-weight: 400;
-				font-size: 26rpx;
-			}
-		}	
-		.head_padding{
-			background: #279BAA;
-			.h1{
-				color: #FFFFFF;
-			}
-			.h2{
-				color: #FFFFFF;
-			}
-		}
-		.head_error{
-			background: #FDEDED;
-			.h1{
-				color: #ED4545;
-			}
-			.h2{
-				color: #333333;
-			}
-		}
-		.head_success{
-			background: #E8F4F6;
-			.h1{
-				color: #279BAA;
-			}
-			.h2{
-				color: #333333;
-			}
-		}
-		.box_list {
-			width: 100%;
-			margin-top: 20rpx;
-			background-color: #ffffff;
-			padding: 40rpx 30rpx;
-			box-sizing: border-box;
-			.box_list_tips {
-				width: 100%;
-				height: 52rpx;
-				padding: 0 20rpx;
-				box-sizing: border-box;
-				line-height: 52rpx;
-				background-color: rgba(224, 49, 42, 0.06);
-				font-weight: 400;
-				font-size: 24rpx;
-				color: #E0312A;
-				border-radius: 4rpx;
-				margin: 30rpx 0;
-			}
-			.box_list_label {
-				font-size: 32rpx;
-				font-weight: 500;
-				color: #222222;
-			}
-			.box_list_item {
-				width: 100%;
-				display: flex;
-				align-items: center;
-				margin-top: 30rpx;
-				.box_list_item_label {
-					flex-shrink: 0;
-					font-size: 28rpx;
-					font-family: PingFangSC, PingFang SC;
-					font-weight: 400;
-					color: #666666;
-				}
-				.box_list_item_val {
-					font-size: 28rpx;
-					font-family: PingFangSC, PingFang SC;
-					font-weight: 400;
-					color: #333333;
-					display: flex;
-					align-items: center;
-					.box_list_item_val_btn {
-						width: 140rpx;
-						margin-left: 15rpx;
-					}
-				}
-			}
-		}
-	}
+.box {
+  width: 100%;
+  .qrocde {
+    width: 300rpx;
+    height: 300rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .qrcode_img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .qr_wrap {
+    background-color: #fff;
+    text-align: center;
+    .box_head_qrcode {
+      width: 320rpx;
+      height: 320rpx;
+			margin: 20rpx auto;
+    }
+    .text {
+      font-size: 30rpx;
+      color: #279baa;
+      padding: 20rpx 0 30rpx;
+    }
+  }
+  .head_wrap {
+    padding: 30px;
+
+    .h1 {
+      margin-bottom: 16rpx;
+      font-weight: 600;
+      font-size: 36rpx;
+    }
+    .h2 {
+      font-weight: 400;
+      font-size: 26rpx;
+    }
+  }
+  .head_padding {
+    background: #279baa;
+    .h1 {
+      color: #ffffff;
+    }
+    .h2 {
+      color: #ffffff;
+    }
+  }
+  .head_error {
+    background: #fdeded;
+    .h1 {
+      color: #ed4545;
+    }
+    .h2 {
+      color: #333333;
+    }
+  }
+  .head_success {
+    background: #e8f4f6;
+    .h1 {
+      color: #279baa;
+    }
+    .h2 {
+      color: #333333;
+    }
+  }
+  .box_list {
+    width: 100%;
+    margin-top: 20rpx;
+    background-color: #ffffff;
+    padding: 40rpx 30rpx;
+    box-sizing: border-box;
+    .box_list_tips {
+      width: 100%;
+      height: 52rpx;
+      padding: 0 20rpx;
+      box-sizing: border-box;
+      line-height: 52rpx;
+      background-color: rgba(224, 49, 42, 0.06);
+      font-weight: 400;
+      font-size: 24rpx;
+      color: #e0312a;
+      border-radius: 4rpx;
+      margin: 30rpx 0;
+    }
+    .box_list_label {
+      font-size: 32rpx;
+      font-weight: 500;
+      color: #222222;
+    }
+    .box_list_item {
+      width: 100%;
+      display: flex;
+      align-items: center;
+      margin-top: 30rpx;
+      .box_list_item_label {
+        flex-shrink: 0;
+        font-size: 28rpx;
+        font-family: PingFangSC, PingFang SC;
+        font-weight: 400;
+        color: #666666;
+      }
+      .box_list_item_val {
+        font-size: 28rpx;
+        font-family: PingFangSC, PingFang SC;
+        font-weight: 400;
+        color: #333333;
+        display: flex;
+        align-items: center;
+        .box_list_item_val_btn {
+          width: 140rpx;
+          margin-left: 15rpx;
+        }
+      }
+    }
+  }
+}
 </style>

--
Gitblit v1.9.3