master
lion 3 years ago
parent 36465dec21
commit 3d087ee39d

@ -245,11 +245,12 @@
that.isCheck = true that.isCheck = true
return return
}else{ }else{
that.checkLevel.map(item1=>{ that.checkText = "请等待"+item.audit_admin.name+"审核"
if(item.level==item1.id){ // that.checkLevel.map(item1=>{
that.checkText = item1.value // if(item.level==item1.id){
} // that.checkText = item1.value
}) // }
// })
that.isCheck = false that.isCheck = false
return return
} }

@ -57,8 +57,11 @@
<uni-data-select v-model="form.credent" :localdata="credentList"> <uni-data-select v-model="form.credent" :localdata="credentList">
</uni-data-select> </uni-data-select>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="证件号码" required name="idcard"> <uni-forms-item label="证件号码" required name="idcard" v-if="form.credent==1">
<uni-easyinput type="idcard" v-model="form.idcard" placeholder="请输入证件号码" /> <uni-easyinput type="idcard" v-model="form.idcard" placeholder="请输入证件号码" />
</uni-forms-item>
<uni-forms-item label="护照号码" required name="passcard" v-if="form.credent==2">
<uni-easyinput type="text" v-model="form.passcard" placeholder="请输入证件号码" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="单位名称" required name="company_name"> <uni-forms-item label="单位名称" required name="company_name">
<uni-easyinput v-model="form.company_name" placeholder="请输入单位名称" /> <uni-easyinput v-model="form.company_name" placeholder="请输入单位名称" />
@ -99,7 +102,7 @@
<view class="formtext" style="display: flex;justify-content: space-between;"> <view class="formtext" style="display: flex;justify-content: space-between;">
<text>随访人员</text> <text>随访人员</text>
<button style="background-color: #044ed7;" type="primary" size="mini" <button style="background-color: #044ed7;" type="primary" size="mini"
@click="$refs.showRight.open(),follw_people_obj={},follow_people_index=-1">新增随访人员</button> @click="$refs.showRight.open(),follw_people_obj={credent:1},follow_people_index=-1">新增随访人员</button>
</view> </view>
<!-- 随访人员表格 --> <!-- 随访人员表格 -->
<template> <template>
@ -173,8 +176,11 @@
:localdata="credentList"> :localdata="credentList">
</uni-data-select> </uni-data-select>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="证件号码" required name='idcard'> <uni-forms-item label="证件号码" required name='idcard' v-if="follw_people_obj.credent==1">
<uni-easyinput type="idcard" v-model="follw_people_obj.idcard" placeholder="请输入证件号码" /> <uni-easyinput type="idcard" v-model="follw_people_obj.idcard" placeholder="请输入证件号码" />
</uni-forms-item>
<uni-forms-item label="护照号码" required name='passcard' v-if="follw_people_obj.credent==2">
<uni-easyinput type="text" v-model="follw_people_obj.passcard" placeholder="请输入证件号码" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<view class="uni-group" style="text-align: right;"> <view class="uni-group" style="text-align: right;">
@ -228,7 +234,8 @@
name: "", name: "",
mobile: "", mobile: "",
credent: 1, credent: 1,
idcard: "", idcard: "",
passcard:"",
company_name: "", company_name: "",
cars: [], cars: [],
follw_people: [], follw_people: [],
@ -302,6 +309,15 @@
pattern: '^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]', pattern: '^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]',
errorMessage: '身份证格式错误' errorMessage: '身份证格式错误'
}] }]
},
passcard:{
rules: [{
required: true,
errorMessage: '护照号码不能为空'
}, {
pattern: '/^([a-zA-z]|[0-9]){5,17}$/',
errorMessage: '护照格式错误'
}]
}, },
company_name: { company_name: {
rules: [{ rules: [{
@ -358,6 +374,15 @@
pattern: '^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]', pattern: '^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]',
errorMessage: '身份证格式错误' errorMessage: '身份证格式错误'
}] }]
},
passcard:{
rules: [{
required: true,
errorMessage: '护照号码不能为空'
}, {
pattern: '/^([a-zA-z]|[0-9]){5,17}$/',
errorMessage: '护照格式错误'
}]
} }
}, },
// //
@ -607,7 +632,10 @@
this.$refs.showRight.close() this.$refs.showRight.close()
}, },
pushFollowPeople() { pushFollowPeople() {
console.log('this.follw_people_obj', this.follw_people_obj) console.log('this.follw_people_obj', this.follw_people_obj)
if(this.follw_people_obj.credent==2){
this.follw_people_obj.idcard = this.follw_people_obj.passcard
}
this.$refs['peopleform'].validate().then(res => { this.$refs['peopleform'].validate().then(res => {
if (this.follow_people_index > -1) { if (this.follow_people_index > -1) {
this.form.follw_people[this.follow_people_index] = this.follw_people_obj this.form.follw_people[this.follow_people_index] = this.follw_people_obj
@ -625,8 +653,12 @@
}, },
// //
saveFormgoStudy() { saveFormgoStudy() {
console.log("form", this.form) if(this.form.credent==2){
this.$refs['formdata'].validate().then(res => { this.form.idcard = this.form.passcard
}
this.$refs['formdata'].validate().then(res => {
console.log("form", this.form)
// return
if (this.isCall === 'call') { if (this.isCall === 'call') {
this.submitForm() this.submitForm()
return return
@ -676,7 +708,7 @@
this.util.request({ this.util.request({
api: '/api/mobile/visit/visit-save', api: '/api/mobile/visit/visit-save',
method: "POST", method: "POST",
data: that.formData, data: that.form,
utilSuccess: function(res) { utilSuccess: function(res) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

Loading…
Cancel
Save