审核 提交

master
lion 3 years ago
parent 410eb3737a
commit db2b1f3fd0

@ -94,20 +94,22 @@
</view> </view>
</view> </view>
<!-- 审核 --> <!-- 审核 -->
<view class="checkforms dbitem" v-if="info.audit_status==0&&isCheck" style="padding-top:30rpx"> <view class="dbtext" v-if="info.audit_status==0"></view>
<uni-forms ref="formdata" :model="checkForm" :rules="rules" labelWidth="100px"> <view class="checkforms dbitem" style="padding-top:30rpx" v-if="info.audit_status==0&&isCheck">
<uni-forms-item label="状态" required name="status"> <uni-forms ref="formdata" :model="checkForm" :rules="rules" labelWidth="100px" >
<uni-data-select v-model="checkForm.status" :localdata="statusList"> <uni-forms-item label="状态" required name="status">
</uni-data-select> <uni-data-checkbox v-model="checkForm.status" :localdata="statusList"/>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="备注"> <uni-forms-item label="备注">
<uni-easyinput type="textarea" v-model="checkForm.reason" placeholder="请输入备注" /> <uni-easyinput type="textarea" v-model="checkForm.reason" placeholder="请输入备注" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<button type="primary" style="background-color: #044ed7;" @click="checkSubmit"></button> <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}}
</view> </view>
</view> </view>
@ -123,7 +125,18 @@
data() { data() {
return { return {
id: "", id: "",
info: {}, info: {},
checkText:'',
checkLevel:[{
id:1,
value:'请等待一级审核完成'
},{
id:2,
value:'请等待二级审核完成'
},{
id:3,
value:'请等待三级审核完成'
}],
checkForm: { checkForm: {
level: "", level: "",
status: "", status: "",
@ -139,10 +152,7 @@
}] }]
} }
}, },
statusList: [{ statusList: [
value: 0,
text: "待审核"
},
{ {
value: 1, value: 1,
text: "通过" text: "通过"
@ -170,31 +180,35 @@
checkSubmit() { checkSubmit() {
let that = this let that = this
console.log(that.checkForm) console.log(that.checkForm)
// return this.$refs['formdata'].validate().then(res => {
this.util.request({ this.util.request({
api: '/api/admin/visit_audit/save', api: '/api/admin/visit_audit/save',
method: "POST", method: "POST",
requestType:'bd', requestType:'bd',
data: that.checkForm, data: that.checkForm,
utilSuccess: function(res) { utilSuccess: function(res) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
// uni.removeStorageSync('formData') // uni.removeStorageSync('formData')
uni.navigateTo({ uni.navigateTo({
url:'/pages/bd/record?type=mycheck' url:'/pages/bd/record?type=mycheck'
}) })
}, },
utilFail: function(res) { utilFail: function(res) {
uni.showToast({ uni.showToast({
title: res.errmsg, title: res.errmsg,
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
} }
}) })
}).catch(err => {
console.log('err', err);
})
}, },
loadDetail() { loadDetail() {
let that = this let that = this
@ -208,13 +222,26 @@
utilSuccess: function(res) { utilSuccess: function(res) {
that.info = res that.info = res
for (let item of res.audit) { for (let item of res.audit) {
if(that.userId==item.audit_admin_id){ if(item.status==0){
that.checkForm.level = item.level if(that.userId==item.audit_admin_id){
that.checkForm.id = item.id that.checkForm.level = item.level
that.checkForm.audit_admin_id = item.audit_admin_id that.checkForm.id = item.id
that.isCheck = true that.checkForm.audit_admin_id = item.audit_admin_id
return that.isCheck = true
return
}else{
that.checkLevel.map(item1=>{
if(item.level==item1.id){
that.checkText = item1.value
}
})
that.isCheck = false
return
}
}else{
that.isCheck = false
} }
} }
}, },
utilFail: function(res) { utilFail: function(res) {

@ -93,7 +93,7 @@
uni.showToast({ uni.showToast({
title:"登录成功", title:"登录成功",
success() { success() {
uni.navigateTo({ uni.redirectTo({
url:"/pages/bd/mine" url:"/pages/bd/mine"
}) })
} }

@ -22,10 +22,10 @@
</uni-data-select> </uni-data-select>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="施工开始时段" v-if="form.type==2"> <uni-forms-item label="施工开始时段" v-if="form.type==2">
<uni-datetime-picker type="date" return-type="string" v-model="form.work_start_time" /> <uni-datetime-picker type="date" :start="toadyStart" return-type="string" v-model="form.work_start_time" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="施工结束时段" v-if="form.type==2"> <uni-forms-item label="施工结束时段" v-if="form.type==2">
<uni-datetime-picker type="date" return-type="string" v-model="form.work_end_time" /> <uni-datetime-picker type="date" :start="toadyStart" return-type="string" v-model="form.work_end_time" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="车牌号" v-if="form.type==3"> <uni-forms-item label="车牌号" v-if="form.type==3">
<uni-easyinput @tap="plateShow=true" disabled v-model.trim="form.plate" placeholder="请输入车牌号" /> <uni-easyinput @tap="plateShow=true" disabled v-model.trim="form.plate" placeholder="请输入车牌号" />
@ -98,10 +98,10 @@
</uni-forms-item> </uni-forms-item>
<template v-if="form.long_time==1"> <template v-if="form.long_time==1">
<uni-forms-item label="开始日期"> <uni-forms-item label="开始日期">
<uni-datetime-picker type="date" return-type="string" v-model="form.start_date" /> <uni-datetime-picker type="date" :start="toadyStart" return-type="string" v-model="form.start_date" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="结束日期"> <uni-forms-item label="结束日期">
<uni-datetime-picker type="date" return-type="string" v-model="form.end_date" /> <uni-datetime-picker type="date" :start="toadyStart" return-type="string" v-model="form.end_date" />
</uni-forms-item> </uni-forms-item>
</template> </template>
<view class="formtext">被访人信息</view> <view class="formtext">被访人信息</view>
@ -110,7 +110,7 @@
</uni-data-select> --> </uni-data-select> -->
<uni-easyinput @clear="clearAccept('accept')" disabled v-model="form.acceptName" @tap="adminListShowOpen('accept')" placeholder="请选择联系人员" /> <uni-easyinput @clear="clearAccept('accept')" disabled v-model="form.acceptName" @tap="adminListShowOpen('accept')" placeholder="请选择联系人员" />
<qianziyu-select :show="adminListShow" type="radio" :popupTitle="'联系人员'" name="cworkStationName" <qianziyu-select :show="adminListShow" type="radio" :popupTitle="'联系人员'" name="cworkStationName"
:dataLists="adminList" placeholder="输入关键词搜索" @search="selectSearch" :dataLists="adminList" placeholder="输入被访人具体姓名搜索" @search="selectSearch"
@submit="submitAccept" @cancel="cancelAccept"/> @submit="submitAccept" @cancel="cancelAccept"/>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="收货人" v-if="form.type==3" required name="goodsName"> <uni-forms-item label="收货人" v-if="form.type==3" required name="goodsName">
@ -345,20 +345,21 @@
this.getVisitArea() this.getVisitArea()
this.getVisitTime() this.getVisitTime()
this.getReason() this.getReason()
this.getAdminList() // this.getAdminList()
}, },
onReady() {}, onReady() {},
methods: { methods: {
adminListShowOpen(type) { adminListShowOpen(type) {
this.acceptType = type this.acceptType = type
this.adminKeyword = "" this.adminKeyword = ""
this.getAdminList() // this.getAdminList()
this.adminListShow = true this.adminListShow = true
}, },
cancelAccept() { cancelAccept() {
console.log('123') console.log('123')
this.adminKeyword = "" this.adminKeyword = ""
this.adminList = []
this.adminListShow = false this.adminListShow = false
}, },
selectSearch(e) { selectSearch(e) {

@ -5,7 +5,7 @@
</view> </view>
<view class="asks"> <view class="asks">
<view v-for="(item,index) in askList"> <view v-for="(item,index) in askList">
<view>{{index}}{{item.title}}({{item.type==1?'单选':'多选'}})</view> <view>{{index+1}}{{item.title}}({{item.type==1?'单选':'多选'}})</view>
<view v-if="item.type==1"> <view v-if="item.type==1">
<uni-data-checkbox v-model="result[index]" @change="e=>radioAnswer(e,index)" <uni-data-checkbox v-model="result[index]" @change="e=>radioAnswer(e,index)"
:localdata="item.answer" :wrap='true' :map="{text:'content',value:'content'}" /> :localdata="item.answer" :wrap='true' :map="{text:'content',value:'content'}" />

Loading…
Cancel
Save