You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

303 lines
7.6 KiB

3 years ago
<template>
<view class="containers">
<view class="db">
<view class="dblist">
<view>
<view class="dbitem">
<text class="dbtype">{{info.type_text}}</text>
<view class="dbstatus bm">
<view>{{info.audit_status_text}}</view>
<view>
3 years ago
<text style="margin-right:10px">访问时间{{info.date}}</text>
3 years ago
<text>{{info.visit_time.start_time}}{{info.visit_time.end_time}}</text>
3 years ago
</view>
3 years ago
<view v-if="info.type=='2'">{{info.work_start_time}}{{info.work_end_time}}</view>
</view>
3 years ago
<view class="dbinfo justify-left">
<view>
<view>被访人<text>{{info.accept_admin.name}}</text></view>
<view>部门<text>{{info.accept_admin.department.name}}</text></view>
<view>访问区域<text>{{info.visit_area.name}}</text></view>
</view>
<view>
<view>拜访人<text>{{info.name}}</text></view>
<view>电话{{info.mobile}}</view>
<view v-if="info.type=='1'"><text>{{info.reason}}</text></view>
3 years ago
<view v-else-if="info.type=='3'">停车区域<text>{{info.plate}}</text></view>
3 years ago
</view>
</view>
<view class="dblong">
<view>长期访客申请<text>{{info.long_time==0?'否':'是'}}</text></view>
<view v-if="info.long_time==1">访{{info.start_date}} {{info.end_date}}</view>
</view>
</view>
</view>
<template v-if="info.type!='3'">
<view class="dbtext">随访人员</view>
<view class="dbitem sfyritem">
3 years ago
<template v-if="info.follw_people.length>0">
3 years ago
<view class="dbinfo justify-left" v-for="people in info.follw_people">
<view>
<view>
随访人<text>{{people.name}}</text>
</view>
<view>证件类型<text>{{people.credent_name}}</text></view>
<view>证件号<text>{{people.idcard}}</text></view>
</view>
<view>
电话<text>{{people.mobile}}</text>
</view>
</view>
</template>
<template v-else>
<view class="dbinfo justify-left">
</view>
</template>
</view>
</template>
3 years ago
<template>
3 years ago
<view class="dbtext">到访车辆</view>
<view class="dbitem sfyritem">
<view class="dbinfo">
<view class="onechild">
车牌<text>{{info.cars}}</text>
</view>
</view>
3 years ago
</view>
3 years ago
</template>
<template v-if="info.type=='3'">
<view class="dbtext">收货人</view>
<view class="dbitem sfyritem">
<view class="dbinfo justify-left">
<view>
部门<text>{{info.accept_goods_admin.department.name}}</text>
</view>
<view>
人员<text>{{info.accept_goods_admin.name}}</text>
</view>
</view>
</view>
</template>
<view class="dbtext">被访人员</view>
<view class="dbitem sfyritem">
<view class="dbinfo justify-left">
<view>
部门<text>{{info.accept_admin.department.name}}</text>
</view>
<view>
人员<text>{{info.accept_admin.name}}</text>
</view>
</view>
3 years ago
</view>
<template v-if="info.accept_admin_sign">
<view class="dbtext">签字</view>
<view class="dbitem sfyritem">
<view class="dbinfo justify-left">
<image style="width:100%" :src="info.accept_admin_sign_file.url" mode=""></image>
</view>
</view>
</template>
3 years ago
3 years ago
<!-- 审核 -->
<view class="dbtext" v-if="info.audit_status==0"></view>
<view class="checkforms dbitem" style="padding-top:30rpx" v-if="info.audit_status==0&&isCheck">
<uni-forms ref="formdata" :model="checkForm" :rules="rules" labelWidth="100px" >
<uni-forms-item label="状态" required name="status">
<uni-data-checkbox v-model="checkForm.status" :localdata="statusList"/>
</uni-forms-item>
<uni-forms-item label="备注">
<uni-easyinput type="textarea" v-model="checkForm.reason" placeholder="请输入备注" />
</uni-forms-item>
</uni-forms>
<button type="primary" style="background-color: #044ed7;" @click="checkSubmit"></button>
</view>
<view class="checkforms dbitem" style="padding-top:30rpx" v-if="info.audit_status==0&&!isCheck">
{{checkText}}
3 years ago
</view>
3 years ago
3 years ago
</view>
3 years ago
3 years ago
</view>
</view>
</template>
<script>
3 years ago
import '@/static/css/bd.css'
export default {
data() {
return {
id: "",
3 years ago
info: {},
checkText:'',
checkLevel:[{
id:1,
value:'请等待一级审核完成'
},{
id:2,
value:'请等待二级审核完成'
},{
id:3,
value:'请等待三级审核完成'
}],
3 years ago
checkForm: {
level: "",
status: "",
audit_admin_id: "",
visit_id:"",
reason:""
},
rules: {
status: {
rules: [{
required: true,
errorMessage: '请选择状态'
}]
3 years ago
}
3 years ago
},
3 years ago
statusList: [
3 years ago
{
value: 1,
text: "通过"
},
{
value: 2,
text: "驳回"
},
],
3 years ago
check_admin_name: "",
userId:'',
isCheck:false,
3 years ago
}
},
onReady() {
3 years ago
3 years ago
},
onLoad(options) {
3 years ago
this.id = options.id
this.userId = uni.getStorageSync('userInfo_Bd').id
3 years ago
this.checkForm.visit_id = parseInt(options.id)
this.loadDetail()
},
methods: {
checkSubmit() {
let that = this
console.log(that.checkForm)
3 years ago
this.$refs['formdata'].validate().then(res => {
this.util.request({
api: '/api/admin/visit_audit/save',
method: "POST",
requestType:'bd',
data: that.checkForm,
utilSuccess: function(res) {
uni.showToast({
title: res.msg,
duration: 2000,
icon: 'none'
})
// uni.removeStorageSync('formData')
uni.navigateTo({
url:'/pages/bd/record?type=mycheck'
})
},
utilFail: function(res) {
uni.showToast({
title: res.errmsg,
duration: 2000,
icon: 'none'
})
}
})
}).catch(err => {
console.log('err', err);
})
3 years ago
},
loadDetail() {
let that = this
this.util.request({
api: '/api/admin/visit/show',
method: "get",
requestType: 'bd',
data: {
id: that.id
},
utilSuccess: function(res) {
3 years ago
that.info = res
for (let item of res.audit) {
3 years ago
if(item.status==0){
if(that.userId==item.audit_admin_id){
that.checkForm.level = item.level
that.checkForm.id = item.id
that.checkForm.audit_admin_id = item.audit_admin_id
that.isCheck = true
return
}else{
that.checkLevel.map(item1=>{
if(item.level==item1.id){
that.checkText = item1.value
}
})
that.isCheck = false
return
}
}else{
3 years ago
3 years ago
that.isCheck = false
3 years ago
}
3 years ago
3 years ago
}
},
utilFail: function(res) {
uni.showToast({
title: res.errmsg,
duration: 2000,
icon: 'none'
})
}
})
},
isnull(p) {
if (p == '' || p == undefined || p == null || p == 'undefined' || p == 'null') {
return ""
} else {
return p
}
}
}
3 years ago
}
</script>
3 years ago
<style scoped>
.containers {
background-color: #eceefe;
min-height: 100vh;
padding-top: 20rpx;
}
.dbtext {
padding-top: 10rpx;
margin-bottom: 30rpx;
color: #303639;
font-size: 40rpx;
padding-left: 30rpx
}
.sfyritem {
padding-bottom: 10rpx
}
.dbinfo>view text {
color: #8f9596;
3 years ago
}
</style>