From e8158d16a13c2ea1f2d8566578137db4394ab610 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期四, 28 三月 2024 18:36:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/appointmentDetails/appointmentDetails.vue | 105 +++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 91 insertions(+), 14 deletions(-)
diff --git a/h5/pages/appointmentDetails/appointmentDetails.vue b/h5/pages/appointmentDetails/appointmentDetails.vue
index 6c2248f..9d85809 100644
--- a/h5/pages/appointmentDetails/appointmentDetails.vue
+++ b/h5/pages/appointmentDetails/appointmentDetails.vue
@@ -1,24 +1,27 @@
<template>
<view class="box">
<view class="box_head">
- <image src="@/static/logo@2x.png" mode="widthFix"></image>
- <text class="box_head_a" v-if="info.status === 0">璁垮棰勭害寰呭鏍�</text>
- <text class="box_head_a" style="color: ;" v-if="info.status === 2">璁垮棰勭害瀹℃牳閫氳繃</text>
- <text class="box_head_a" v-if="info.status === 3">璁垮棰勭害瀹℃牳涓嶉�氳繃</text>
- <text class="box_head_b" v-if="info.status === 0">鎮ㄧ殑棰勭害鍗曞凡鎻愪氦瀹℃牳锛岃绛夊緟琚浜哄鏍�</text>
- <text class="box_head_b" v-if="info.status === 2">鎮ㄧ殑鏉ヨ鐢宠宸插鏍搁�氳繃锛岃鍦ㄩ棬鍗杩涜鐧�</text>
- <text class="box_head_b" v-if="info.status === 3">鎮ㄧ殑鏉ヨ鐢宠宸茶椹冲洖锛屽師鍥犳槸锛氳繖鏄師鍥�</text>
+ <canvas class="box_head_qrcode" canvas-id="img" v-if="[2,5,7,8,9].includes(info.status)"></canvas>
+ <image class="box_head_logo" src="../../static/logo@2x.png" mode="widthFix" v-else></image>
+ <text class="box_head_a" v-if="[0, 1].includes(info.status)">璁垮棰勭害寰呭鏍�</text>
+ <text class="box_head_a" style="color: #03AF76;" v-if="info.status === 2">璁垮棰勭害瀹℃牳閫氳繃</text>
+ <text class="box_head_a" style="color: #ED4545;" v-if="info.status === 3">璁垮棰勭害瀹℃牳涓嶉�氳繃</text>
+ <text class="box_head_b" v-if="[0, 1].includes(info.status)">鎮ㄧ殑棰勭害鍗曞凡鎻愪氦瀹℃牳锛岃绛夊緟琚浜哄鏍�</text>
+ <text class="box_head_b" v-if="info.status === 2">鎮ㄧ殑鏉ヨ鐢宠宸插鏍搁�氳繃锛岃鍦ㄩ棬鍗杩涜鐧昏鍏ュ満
+濡傞亣鐗规畩鎯呭喌锛屽彲鑱旂郴琚浜烘垨瀹変繚浜哄憳</text>
+ <text class="box_head_b" v-if="info.status === 3">鎮ㄧ殑鏉ヨ鐢宠宸茶椹冲洖锛屽鏈夌枒闂紝鍙仈绯昏璁夸汉</text>
</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_label">琚浜哄憳锛�</view>
<view class="box_list_item_val">{{info.visitUserName}}</view>
</view>
- <view class="box_list_item">
+ <!-- <view class="box_list_item">
<view class="box_list_item_label">杞︾墝鍙凤細</view>
<view class="box_list_item_val">{{info.carNos}}</view>
- </view>
+ </view> -->
<view class="box_list_item">
<view class="box_list_item_label">鎷滆浜嬬敱锛�</view>
<view class="box_list_item_val">{{info.visitReason}}</view>
@@ -31,29 +34,67 @@
<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>
+ <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>
</template>
<script>
+ import wxcode from 'uniapp-qrcode'
+
export default {
data() {
return {
- info: {}
+ info: {},
+ show: false
};
},
onLoad(option) {
this.$u.api.detail({ id: option.id })
.then(res => {
if (res.code === 200) {
- console.log(res)
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' })
+ }
+ }
}
}
</script>
@@ -65,6 +106,17 @@
<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%;
+ }
+ }
.box_head {
width: 100%;
padding: 40rpx 0;
@@ -74,9 +126,13 @@
align-items: center;
justify-content: center;
flex-direction: column;
- image {
+ .box_head_qrcode {
width: 320rpx;
height: 320rpx;
+ }
+ .box_head_logo {
+ width: 220rpx;
+ height: 220rpx;
}
.box_head_a {
font-size: 36rpx;
@@ -89,6 +145,7 @@
font-weight: 400;
color: #666666;
margin-top: 24rpx;
+ text-align: center;
}
}
.box_list {
@@ -97,6 +154,19 @@
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;
@@ -108,6 +178,7 @@
align-items: center;
margin-top: 30rpx;
.box_list_item_label {
+ flex-shrink: 0;
font-size: 28rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
@@ -118,6 +189,12 @@
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;
+ }
}
}
}
--
Gitblit v1.9.3