|
|
|
|
@ -8,8 +8,8 @@
|
|
|
|
|
<view class="dbstatus bm">
|
|
|
|
|
<view>{{info.audit_status_text}}</view>
|
|
|
|
|
<view>
|
|
|
|
|
<text style="margin-right:10px">访问时间:{{info.date}}</text>
|
|
|
|
|
<text>{{info.visit_time.start_time}}至{{info.visit_time.end_time}}</text>
|
|
|
|
|
<view>访问日期:{{info.date}}{{ info.end_date?'至'+info.end_date:'' }}</view>
|
|
|
|
|
<view>访问时间:{{info.visit_time.start_time}}至{{info.visit_time.end_time}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="info.type=='2'">施工时段:{{info.work_start_time}}至{{info.work_end_time}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -22,15 +22,15 @@
|
|
|
|
|
<view>
|
|
|
|
|
<view>拜访人:<text>{{info.name}}</text></view>
|
|
|
|
|
<view>电话:{{info.mobile}}</view>
|
|
|
|
|
<view v-if="info.type=='1'">事由:<text>{{info.reason}}</text></view>
|
|
|
|
|
<view v-if="info.type=='1'">事由:<text>{{info.reason?info.reason:''}}</text></view>
|
|
|
|
|
<view v-else-if="info.type=='3'">车辆:<text>{{info.plate}}</text></view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="company">
|
|
|
|
|
<view>
|
|
|
|
|
拜访公司:<text>{{info.company_name?info.company_name:''}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="company">
|
|
|
|
|
<view>
|
|
|
|
|
拜访公司:<text>{{info.company_name?info.company_name:''}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view class="dblong">
|
|
|
|
|
<view>长期访客申请:<text>{{info.long_time==0?'否':'是'}}</text></view>
|
|
|
|
|
@ -67,15 +67,15 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="dbtext">到访车辆</view>
|
|
|
|
|
<view class="dbitem sfyritem">
|
|
|
|
|
<view class="dbinfo dbcars" v-if="info.cars && info.cars.length>0">
|
|
|
|
|
<view class="onechild" v-for="item in info.cars">
|
|
|
|
|
车牌:<text>{{item?item:'无'}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="dbinfo dbcars" v-else>
|
|
|
|
|
<view class="onechild">
|
|
|
|
|
无
|
|
|
|
|
</view>
|
|
|
|
|
<view class="dbinfo dbcars" v-if="info.cars && info.cars.length>0">
|
|
|
|
|
<view class="onechild" v-for="item in info.cars">
|
|
|
|
|
车牌:<text>{{item?item:'无'}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="dbinfo dbcars" v-else>
|
|
|
|
|
<view class="onechild">
|
|
|
|
|
无
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
@ -103,48 +103,48 @@
|
|
|
|
|
人员:<text>{{info.accept_admin.name}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<block v-if="info.visit_area.name=='生产区'">
|
|
|
|
|
<view class="dbtext">陪同人员</view>
|
|
|
|
|
<view class="dbitem sfyritem">
|
|
|
|
|
<view class="dbinfo justify-left">
|
|
|
|
|
<view>
|
|
|
|
|
部门:<text>{{info.accompany.department.name}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
人员:<text>{{info.accompany.name}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
</view>
|
|
|
|
|
<block v-if="info.visit_area.name=='生产区'">
|
|
|
|
|
<view class="dbtext">陪同人员</view>
|
|
|
|
|
<view class="dbitem sfyritem">
|
|
|
|
|
<view class="dbinfo justify-left">
|
|
|
|
|
<view>
|
|
|
|
|
部门:<text>{{info.accompany.department.name}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
人员:<text>{{info.accompany.name}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<!-- <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> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 审核 -->
|
|
|
|
|
<!-- 审核 -->
|
|
|
|
|
<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>
|
|
|
|
|
<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: #4f607e;" @click="checkSubmit">审核</button>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="checkforms dbitem" style="padding-top:30rpx" v-if="info.audit_status==0&&!isCheck">
|
|
|
|
|
{{checkText}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="checkforms dbitem" style="padding-top:30rpx" v-if="info.audit_status==0&&!isCheck">
|
|
|
|
|
{{checkText}}
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
@ -160,23 +160,23 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
id: "",
|
|
|
|
|
info: {},
|
|
|
|
|
checkText:'',
|
|
|
|
|
checkLevel:[{
|
|
|
|
|
id:1,
|
|
|
|
|
value:'请等待一级审核完成'
|
|
|
|
|
},{
|
|
|
|
|
id:2,
|
|
|
|
|
value:'请等待二级审核完成'
|
|
|
|
|
},{
|
|
|
|
|
id:3,
|
|
|
|
|
value:'请等待三级审核完成'
|
|
|
|
|
info: {},
|
|
|
|
|
checkText:'',
|
|
|
|
|
checkLevel:[{
|
|
|
|
|
id:1,
|
|
|
|
|
value:'请等待一级审核完成'
|
|
|
|
|
},{
|
|
|
|
|
id:2,
|
|
|
|
|
value:'请等待二级审核完成'
|
|
|
|
|
},{
|
|
|
|
|
id:3,
|
|
|
|
|
value:'请等待三级审核完成'
|
|
|
|
|
}],
|
|
|
|
|
checkForm: {
|
|
|
|
|
level: "",
|
|
|
|
|
status: "",
|
|
|
|
|
audit_admin_id: "",
|
|
|
|
|
visit_id:"",
|
|
|
|
|
audit_admin_id: "",
|
|
|
|
|
visit_id:"",
|
|
|
|
|
reason:""
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
@ -197,8 +197,8 @@
|
|
|
|
|
text: "驳回"
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
check_admin_name: "",
|
|
|
|
|
userId:'',
|
|
|
|
|
check_admin_name: "",
|
|
|
|
|
userId:'',
|
|
|
|
|
isCheck:false,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -206,43 +206,43 @@
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.id = options.id
|
|
|
|
|
this.id = options.id
|
|
|
|
|
this.userId = uni.getStorageSync('userInfo_Bd').id
|
|
|
|
|
this.checkForm.visit_id = parseInt(options.id)
|
|
|
|
|
this.loadDetail()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
checkSubmit() {
|
|
|
|
|
checkSubmit() {
|
|
|
|
|
let that = this
|
|
|
|
|
console.log(that.checkForm)
|
|
|
|
|
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.redirectTo({
|
|
|
|
|
url:'/pages/bd/record?type=mycheck'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res,
|
|
|
|
|
duration: 2000,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
console.log('err', err);
|
|
|
|
|
})
|
|
|
|
|
console.log(that.checkForm)
|
|
|
|
|
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.redirectTo({
|
|
|
|
|
url:'/pages/bd/record?type=mycheck'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res,
|
|
|
|
|
duration: 2000,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
console.log('err', err);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
loadDetail() {
|
|
|
|
|
@ -255,30 +255,30 @@
|
|
|
|
|
id: that.id
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.info = res
|
|
|
|
|
for (let item of res.audit) {
|
|
|
|
|
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.checkText = "请等待"+item.audit_admin.name+"审核"
|
|
|
|
|
// that.checkLevel.map(item1=>{
|
|
|
|
|
// if(item.level==item1.id){
|
|
|
|
|
// that.checkText = item1.value
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
that.isCheck = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
that.isCheck = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
that.info = res
|
|
|
|
|
for (let item of res.audit) {
|
|
|
|
|
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.checkText = "请等待"+item.audit_admin.name+"审核"
|
|
|
|
|
// that.checkLevel.map(item1=>{
|
|
|
|
|
// if(item.level==item1.id){
|
|
|
|
|
// that.checkText = item1.value
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
that.isCheck = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
that.isCheck = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
@ -317,9 +317,9 @@
|
|
|
|
|
font-size: 40rpx;
|
|
|
|
|
padding-left: 30rpx
|
|
|
|
|
}
|
|
|
|
|
.dbcars>view{
|
|
|
|
|
width:100%;
|
|
|
|
|
padding-left:0
|
|
|
|
|
.dbcars>view{
|
|
|
|
|
width:100%;
|
|
|
|
|
padding-left:0
|
|
|
|
|
}
|
|
|
|
|
.sfyritem {
|
|
|
|
|
padding-bottom: 10rpx
|
|
|
|
|
@ -327,12 +327,12 @@
|
|
|
|
|
|
|
|
|
|
.dbinfo>view text {
|
|
|
|
|
color: #8f9596;
|
|
|
|
|
}
|
|
|
|
|
.company{
|
|
|
|
|
padding-bottom:30rpx;
|
|
|
|
|
margin-top:-10rpx;
|
|
|
|
|
}
|
|
|
|
|
.company text{
|
|
|
|
|
color: #8f9596;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
.company{
|
|
|
|
|
padding-bottom:30rpx;
|
|
|
|
|
margin-top:-10rpx;
|
|
|
|
|
}
|
|
|
|
|
.company text{
|
|
|
|
|
color: #8f9596;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|