5bfa6aac by 任超

style:受理申请

1 parent 9f532d89
......@@ -10,6 +10,11 @@ import Base from './components/Base/base' // 全局组件引入
import mixin from '@/utils/mixin/theme.js'
Vue.mixin(mixin);
import rules from './utils/rule.js'
// 全局方法挂载
Vue.prototype.$rules = rules
import { theme } from "@/directive/theme.js"
Vue.directive("theme", theme)
......
// 手机号码验证
const validatePhone = (rule, value, callback) => {
const patter = new RegExp('^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$')
if (!patter.test(value)) {
return callback(new Error('请输入正确格式的手机号!'))
} else {
callback() // 必须有此项回调,否则验证会一直不通过
}
}
export default {
common: {
phone: [{// 手机号
required: true,
message: '手机号不能为空'
}, {
validator: validatePhone,
trigger: 'blur'
}]
}
}
\ No newline at end of file
......@@ -4,17 +4,4 @@
*/
export function isExternal (path) {
return /^(https?:|mailto:|tel:)/.test(path)
}
export function validatePhone (rule, value, callback) {
let phoneReg = /^[1][3,4,5,7,8][0-9]{9}$/
if (!value) {
return callback(new Error('号码不能为空!!'))
}
setTimeout(() => {
if (!phoneReg.test(value)) {
callback(new Error('格式有误'))
} else {
callback()
}
}, 100)
}
\ No newline at end of file
......
......@@ -109,6 +109,7 @@ export default {
methods: {
// 添加
handleAdd () {
console.log(11111111111);
this.dialog = true
},
// 减
......
<template>
<dialogBox title="申请人信息" width="60%" isMain v-model="myValue" :isFullscreen="false" @submitForm="submitForm"
@closeDialog="closeDialog">
<el-form :model="ruleForm" ref="ruleForm" label-width="100px">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
<el-row>
<el-col :span="8">
<el-form-item label="权利人类型" prop="qlrlx">
......@@ -28,17 +28,111 @@
<el-row>
<el-col :span="8">
<el-form-item label="证件号" prop="zjh">
<el-input v-model="ruleForm.zjh" maxlegth="15"></el-input>
<el-input v-model="ruleForm.zjh" maxlength="15"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系电话" prop="lxdh">
<el-input v-model="ruleForm.lxdh" maxlegth="11"></el-input>
<el-form-item label="联系电话" prop="lxdh" :rules="$rules.common.phone">
<el-input v-model="ruleForm.lxdh" maxlength="11"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="xb">
<el-select v-model="ruleForm.zjzl" class="width100" placeholder="请选择">
<el-option v-for="item in dictData['A43']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="法人名称" prop="frmc">
<el-input v-model="ruleForm.frmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="国家/地区" prop="gjdq">
<el-input v-model="ruleForm.gjdq"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="户籍所在省市" prop="szss">
<el-input v-model="ruleForm.szss"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="地址" prop="dz">
<el-input v-model="ruleForm.dz"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮编" prop="yb">
<el-input v-model="ruleForm.yb"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="发证机关" prop="fzjg">
<el-input v-model="ruleForm.fzjg"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电子邮件" prop="dzyj">
<el-input v-model="ruleForm.dzyj"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="权利比例" prop="qlbl">
<el-input v-model="ruleForm.qlbl"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="工作单位" prop="gzdw">
<el-input v-model="ruleForm.gzdw"></el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="代理机构" prop="dljg">
<el-input v-model="ruleForm.dljg"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="联系电话" prop="lxdh" :rules="$rules.common.phone">
<el-input v-model="ruleForm.lxdh" maxlength="11"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="代理人姓名" prop="dlrxm">
<el-input v-model="ruleForm.dlrxm"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="代理人证件类型" prop="dlrzjlx">
<el-select v-model="ruleForm.dlrzjlx" class="width100" placeholder="请选择">
<el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="代理人证件号" prop="dlrzjh">
<el-input v-model="ruleForm.dlrzjh" maxlength="20"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</dialogBox>
......@@ -46,7 +140,6 @@
<script>
import { mapGetters } from 'vuex'
import { validatePhone } from '@/utils/validate'
export default {
props: {
value: { type: Boolean, default: false },
......@@ -62,7 +155,21 @@ export default {
xm: '',
zjzl: '',
zjh: '',
lxdh: ''
lxdh: '',
xb: '',
frmc: '',
gjdq: '',
szss: '',
dz: '',
yb: '',
fzjg: '',
dzyj: '',
qlbl: '',
gzdw: '',
dljg: '',
dlrxm: '',
dlrzjlx: '',
dlrzjh: ''
},
rules: {
qlrlx: [
......@@ -77,13 +184,47 @@ export default {
zjh: [
{ required: true, message: '证件号', trigger: 'blur' }
],
lxdh: [
{
required: true, // required就是这个框必须填写
message: '不能空着',
validator: validatePhone, // 规则
trigger: 'blur', // blur失去焦点,事件何时触发
},
xb: [
{ required: true, message: '性别', trigger: 'change' }
],
frmc: [
{ required: true, message: '法人名称', trigger: 'blur' }
],
gjdqc: [
{ required: true, message: '国家/地区', trigger: 'blur' }
],
szss: [
{ required: true, message: '户籍所在省市', trigger: 'blur' }
],
dz: [
{ required: true, message: '地址', trigger: 'blur' }
],
yb: [
{ required: true, message: '邮编', trigger: 'blur' }
],
fzjg: [
{ required: true, message: '发证机关', trigger: 'blur' }
],
dzyj: [
{ required: true, message: '电子邮件', trigger: 'blur' }
],
qlbl: [
{ required: true, message: '权利比例', trigger: 'blur' }
],
gzdw: [
{ required: true, message: '工作单位', trigger: 'blur' }
],
dljg: [
{ required: true, message: '代理机构', trigger: 'blur' }
],
dlrxm: [
{ required: true, message: '代理人姓名', trigger: 'blur' }
],
dlrzjlx: [
{ required: true, message: '代理人证件类型', trigger: 'change' }
],
dlrzjh: [
{ required: true, message: '代理人证件号', trigger: 'blur' }
]
}
}
......
......@@ -120,7 +120,7 @@ export default {
},
mounted () {
if (this.$route.query.bsmSlsq) {
this.expandInfo(this.$route.query.bsmSlsq,this.$route.query.bestepid);
this.expandInfo(this.$route.query.bsmSlsq, this.$route.query.bestepid);
this.list(this.$route.query.bsmSlsq)
this.queryForm.bsmSlsq = this.$route.query.bsmSlsq
this.queryForm.bestepid = this.$route.query.bestepid
......@@ -146,12 +146,11 @@ export default {
})
},
//获取环节扩展信息
expandInfo (bsmSlsq,bestepid) {
expandInfo (bsmSlsq, bestepid) {
let that = this
var formdata = new FormData();
formdata.append("bsmSlsq", bsmSlsq);
formdata.append("bestepid", bestepid);
console.log(formdata, 'formdata');
stepExpandInfo(formdata).then(res => {
if (res.code === 200) {
this.tabList1 = [...res.result.form]
......