404 lines
9.8 KiB
Vue
404 lines
9.8 KiB
Vue
<template>
|
||
<view class="hzIndex">
|
||
<hzHeader title="访客预约详情"></hzHeader>
|
||
<view class="hzContent" style="padding-top: 200upx;">
|
||
<view class="details">
|
||
<view class="detail_msg">
|
||
<view class="info-item">
|
||
<text class="label">被访问人姓名: </text>
|
||
<text class="infoSpan">{{item.USER_NAME}}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text class="label">被访问人部门: </text>
|
||
<text class="infoSpan">{{item.ORG_NAME}}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text class="label">访客姓名: </text>
|
||
<text class="infoSpan">{{item.PERSONNEL_NAME}}</text>
|
||
</view>
|
||
<view @click="callPhone(item.PERSONNEL_PHONE)" class="info-item">
|
||
<text class="label">访客联系方式: </text>
|
||
<text class="infoSpan" >{{ item.PERSONNEL_PHONE }}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text class="label">访客身份证号: </text>
|
||
<text class="infoSpan">{{item.PERSONNEL_CARD}}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text class="label">访问时间: </text>
|
||
<!-- <text class="infoSpan">{{formatDate(item.VISITING_TIME)}}</text> -->
|
||
<text class="infoSpan">{{formatDate(item.VISITING_TIME, 'dateTime')}}</text>
|
||
</view>
|
||
<view class="info-item">
|
||
<text class="label">离开时间: </text>
|
||
<!-- <text class="infoSpan">{{formatDate(item.VISITING_TIME)}}</text> -->
|
||
<text class="infoSpan">{{formatDate(item.LEAVE_TIME, 'dateTime')}}</text>
|
||
</view>
|
||
<view class="info-item" v-if="entourageList.length>0">
|
||
<view class="label">随行人员: </view>
|
||
<view style="margin-left: 60upx;margin-bottom:20upx;" v-for="(item, i) in entourageList" :key="i">
|
||
<text class="infoSpan">{{item.name}}</text>
|
||
<text class="infoSpan" style="margin-left: 40upx;">{{item.phone}}</text>
|
||
<text class="infoSpan" style="margin-left: 40upx;">{{item.ID}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
<view>
|
||
<view class="details">
|
||
<YSteps :lineNum='lineNum' color='#fff' backgroundColor='#4db4ea' :infoList='process'></YSteps>
|
||
</view>
|
||
</view>
|
||
<view class="occupied" style="height: 200upx;"></view>
|
||
<view v-if="queryType==1 && examineButton" style="position: fixed;bottom:0upx;height: 50upx;width: 100%;z-index: 9999;"><!-- uni-popup ref="butPopup" type="bottom" -->
|
||
|
||
<view>
|
||
<view class="footer-btn footer-btn-two batchBtn" >
|
||
<view class="btn btn-col btn1" @click="circulation()">拒绝</view>
|
||
<view class="btn btn-col1 btn2" @click="submit(1)">通过</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- <view class="footer-btn" v-if="queryType==1 && item.report_status==0||item.report_status==1" @click="circulation()">
|
||
<view class="btn">回复</view>
|
||
</view> -->
|
||
<uni-popup ref="popup" type="center" style="">
|
||
<view style="background: white;width: 80%;height: 540upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
|
||
<view style="color: #333;font-size: 30upx;font-weight: bold;padding: 10upx 0px;">
|
||
<text>审核内容:</text>
|
||
</view>
|
||
<view style="width: 100%;border: 1px solid #E5E5E5;margin-top: 20upx;padding: 20upx;height: 300upx;color: #666;border-radius: 10upx;">
|
||
<textarea style="width: 100%;height: 100%;" v-model="replyContent" placeholder="请输入审核内容"/>
|
||
</view>
|
||
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
|
||
<view class="btn btn-col" style="width:40%;margin-left:7%;margin-right: 6%;border-radius: 10upx;" @click="closeCirculation()">取消</view>
|
||
<view class="btn btn-col1" style="width:40%;border-radius: 10upx" @click="submit(2)">确定</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
getVisitor,updateVisitor
|
||
} from '@/common/api.js';
|
||
import {
|
||
callbackRequest,
|
||
callbackRequestNoLoading ,
|
||
getStorage,
|
||
alertTip,
|
||
formatDate,
|
||
sureAlterTip,
|
||
convertImgToBase64,
|
||
vbPicture,
|
||
callPhone,wxSdk,
|
||
formatImgUrl
|
||
} from '@/common/util.js';
|
||
import UniPopup from "@/components/uni-popup/uni-popup.vue"
|
||
import YSteps from '@/components/Y-Steps/Y-Steps.vue'
|
||
export default {
|
||
components: {
|
||
UniPopup,
|
||
YSteps
|
||
},
|
||
data() {
|
||
return {
|
||
lineNum:0,
|
||
callPhone:callPhone,
|
||
vbPicture:vbPicture,
|
||
formatImgUrl:formatImgUrl,
|
||
userInfo:getStorage('userInfo'),
|
||
formatDate:formatDate,
|
||
item: {},
|
||
id:0,
|
||
queryType:0,
|
||
replyContent:'',
|
||
userId: getStorage('userInfo').id,
|
||
imgs:[],
|
||
showAlert:false,
|
||
userTypes:[],
|
||
houseType:[],
|
||
examineBatch:'',
|
||
examineButton:true,
|
||
process: [],
|
||
entourageList: [],
|
||
}
|
||
},
|
||
onLoad(option) {
|
||
this.item = JSON.parse(option.item);
|
||
this.id = this.item.ID;
|
||
this.queryType = option.queryType||0;
|
||
this.examineBatch = option.examineBatch || 1;
|
||
this.getVisitorDetail();
|
||
},
|
||
methods: {
|
||
getVisitorDetail(){
|
||
let _this = this;
|
||
_this.examineButton = true;
|
||
let params = {
|
||
method: getVisitor,
|
||
data: {
|
||
userId: getStorage('userInfo').userId,
|
||
id:_this.id
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
_this.item = res.returnData[0];
|
||
let details = res.returnData[0].detail||[]
|
||
for(let i=0;i<details.length;i++){
|
||
let obj = details[i];
|
||
if(_this.examineBatch == obj.EXAMINE_BATCH){
|
||
_this.examineButton = false;
|
||
}
|
||
}
|
||
_this.process=[];
|
||
if(_this.process.length==0){
|
||
let pObj0 = {
|
||
date: '经办人',
|
||
info: _this.item.USER_NAME+' 被预约',
|
||
time: formatDate( _this.item.CREATE_TIME,'dateTime')
|
||
}
|
||
_this.process.push(pObj0);
|
||
}
|
||
if(details.length>0){
|
||
for(let i=0;i<details.length;i++){
|
||
let pObj = {
|
||
date: details[i].BATCH_DESCRIPTION,
|
||
info: details[i].USER_NAME+" "+(details[i].EXAMINE_STATE==1?"同意":"拒绝 "+(details[i].EXAMINE_OPINION||'')),
|
||
time: formatDate(details[i].EXAMINE_TIME,'dateTime')
|
||
}
|
||
_this.process.push(pObj);
|
||
}
|
||
}
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
});
|
||
},
|
||
circulation(){
|
||
this.$refs.popup.open();
|
||
//this.closeButPopup();
|
||
},
|
||
closeCirculation(){
|
||
this.$refs.popup.close()
|
||
},
|
||
submit(examineState){
|
||
this.examineButton = false;
|
||
//examineState 1通过,2不通过
|
||
let params = {
|
||
"method": updateVisitor,
|
||
"data":{
|
||
id: this.item.ID,
|
||
userId:getStorage('userInfo').id,
|
||
userName:getStorage('userInfo').userName,
|
||
examineState:examineState+'',
|
||
examineOpinion:this.replyContent,
|
||
examineBatch:this.examineBatch+''
|
||
}
|
||
};
|
||
callbackRequest(params).then(res => {
|
||
res = res.data;
|
||
if (res.returnCode == 1) {
|
||
alertTip(res.returnMsg);
|
||
this.closeCirculation();
|
||
this.getVisitorDetail();
|
||
} else {
|
||
alertTip(res.returnMsg);
|
||
}
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
@import '@/static/css/common.scss';
|
||
.uni-textarea-textarea{
|
||
text-align:left
|
||
}
|
||
.batchBtn{
|
||
position: absolute;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
padding: 10upx 40upx;
|
||
.btn1{
|
||
background: #C1EFEA;
|
||
color: #09AFA5;
|
||
width: 40%;
|
||
border-radius: 50upx;
|
||
}
|
||
.btn2{
|
||
background: linear-gradient( 90deg, #50CBA1 0%, #06AEA6 100%), #C1EFEA;
|
||
color: #fff;
|
||
width: 40%;
|
||
border-radius: 50upx;
|
||
}
|
||
.btn3{
|
||
width: 28%;margin-left: 4%;border-radius: 10upx;
|
||
}
|
||
.btn4{
|
||
width: 28%;margin-left: 4%;border-radius: 10upx;
|
||
}
|
||
.btn5{
|
||
width: 28%;margin-left: 4%;border-radius: 10upx;
|
||
background: #348CF2;
|
||
}
|
||
}
|
||
.img-box {
|
||
overflow: hidden;
|
||
padding-top: 20rpx;
|
||
padding-bottom: 10rpx;
|
||
|
||
.img-item {
|
||
float: left;
|
||
width: 200upx;
|
||
height: 200upx;
|
||
border: 1px solid #ddd;
|
||
margin: 0 22rpx 20upx 0upx;
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
|
||
.img {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.remove-btn {
|
||
position: absolute;
|
||
top: -18upx;
|
||
right: -18upx;
|
||
width: 44upx;
|
||
height: 44upx;
|
||
z-index: 2;
|
||
}
|
||
}
|
||
|
||
.upload-btn {
|
||
.img {
|
||
width: 60upx;
|
||
height: 60upx;
|
||
margin: 70upx auto 0;
|
||
}
|
||
}
|
||
}
|
||
|
||
.details{
|
||
// height: 550upx;
|
||
background: white;
|
||
margin: 20upx;
|
||
border-radius: 15upx;
|
||
position: relative;
|
||
font-size: 26upx;
|
||
.detail_header {
|
||
border-bottom: #f8f8f8 5upx solid;
|
||
height: 90upx;
|
||
line-height: 90upx;
|
||
margin: 15upx;
|
||
border-radius: 10upx;
|
||
.blueSign {
|
||
height: 28upx;
|
||
width: 5upx;
|
||
background: #00c277;
|
||
display: inline-block;
|
||
margin-left: 20upx;
|
||
}
|
||
.font-tilte {
|
||
font-weight:bold;
|
||
margin-left: 20upx;
|
||
}
|
||
}
|
||
.detail_msg {
|
||
margin-left: 20upx;
|
||
border-radius: 10upx;
|
||
.info-item{
|
||
border-bottom:1px solid #f8f8f8;
|
||
padding:20upx 10upx;
|
||
line-height: 50upx;
|
||
.label{
|
||
display:inline-block;
|
||
min-width:150upx;
|
||
width: auto;
|
||
font-size:28upx;
|
||
color:#333;
|
||
font-weight:bold;
|
||
}
|
||
}
|
||
.status {
|
||
.infoSpan{
|
||
color: #00c277;
|
||
}
|
||
.infoSpan2{
|
||
color: red;
|
||
}
|
||
}
|
||
.img-box {
|
||
// background: #fff;
|
||
image{
|
||
width: 200upx;
|
||
height: 200upx;
|
||
margin:20upx 20upx 0 0;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.common-shade{
|
||
position:fixed;
|
||
top:0;
|
||
left:0;
|
||
width:100%;
|
||
height:100vh;
|
||
background: rgba(0,0,0,0.7);
|
||
z-index:9999;
|
||
}
|
||
|
||
.box {
|
||
display: flex;
|
||
display: -webkit-flex;
|
||
}
|
||
|
||
.box-row-reverse {
|
||
flex-direction: row;
|
||
}
|
||
|
||
/*上下排列*/
|
||
.box-column {
|
||
flex-direction: column;
|
||
}
|
||
|
||
/*上下排列*/
|
||
.box-left {
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
/*居右*/
|
||
.box-right {
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
/*居左*/
|
||
.box-center {
|
||
justify-content: center;
|
||
}
|
||
|
||
/*居中*/
|
||
.box-between {
|
||
justify-content: space-between;
|
||
}
|
||
|
||
/*两端对齐*/
|
||
.box-align-center {
|
||
align-items: center;
|
||
}
|
||
|
||
.box-wrap {
|
||
flex-wrap: wrap;
|
||
}
|
||
</style>
|