|
|
|
@ -12,15 +12,18 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="公司名称" prop="companyName"> |
|
|
|
|
<el-input v-model="form.companyName" @input="(val) => checkHanzi(val, form, 'companyName')" ref="companyName"></el-input> |
|
|
|
|
<el-input v-model="form.companyName" maxlength="40" @input="(val) => checkHanzi(val, form, 'companyName')" ref="companyName"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="注册资本"> |
|
|
|
|
<el-input v-model="form.registeredCapital" ref="registeredCapital"></el-input> |
|
|
|
|
<el-input :value="form.registeredCapital" @input="val => ismoney(val, form, 'registeredCapital')" maxlength="15" ref="registeredCapital"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="法人证件号码" required> |
|
|
|
|
<div class="idCard" @click="popUp"> |
|
|
|
|
<div class="idCard" @click="popUp('身份证扫描仪')" v-if='!idNumberJudge'> |
|
|
|
|
<p>请刷身份证</p> |
|
|
|
|
</div> |
|
|
|
|
<div v-else> |
|
|
|
|
<el-input :value="form.idNumber" maxlength="20" disabled ref="idNumber"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系电话" :rules="rules.phone" prop="phone"> |
|
|
|
|
<el-input :value="form.phone" @input="(val) => phoneListen(val, form, 'phone')" maxlength="12" ref='phone'></el-input> |
|
|
|
@ -31,7 +34,7 @@ |
|
|
|
|
<el-input :value="form.codeNumber" @input="(val) => checkHanzi(val, form, 'codeNumber')" ref="codeNumber"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="公司地址"> |
|
|
|
|
<el-input v-model="form.companyAddress" ref="companyAddress"></el-input> |
|
|
|
|
<el-input v-model="form.companyAddress" maxlength="60" ref="companyAddress"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="法人证件类型" prop="certificateType"> |
|
|
|
|
<el-select v-model="form.certificateType" placeholder="请选择" ref="certificateType"> |
|
|
|
@ -47,40 +50,7 @@ |
|
|
|
|
<el-button @click="submitForm" type="primary" class="submitBtn">提交</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-dialog |
|
|
|
|
style="margin-top:10vh" |
|
|
|
|
:visible.sync="visible" |
|
|
|
|
:modal="false" |
|
|
|
|
width="40%" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
:show-close="false" |
|
|
|
|
custom-class="data-dia" |
|
|
|
|
> |
|
|
|
|
<div slot="title" class="dia-header"> |
|
|
|
|
<div class="data-title" @click="success = true">提交</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="popBody" v-if="!authorization&&!success"> |
|
|
|
|
<h2>本业务需要授权</h2> |
|
|
|
|
</div> |
|
|
|
|
<div class="popBody" v-if="authorization&&!success"> |
|
|
|
|
<el-form ref="form2" :model="disForm" label-width="80px"> |
|
|
|
|
<el-form-item label="授权柜员"> |
|
|
|
|
<el-input disabled v-model="disForm.name"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="授权柜员"> |
|
|
|
|
<el-input type="password" disabled v-model="disForm.pass"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
<div class="popBody" v-if="success"> |
|
|
|
|
<h2>完成表单form</h2> |
|
|
|
|
</div> |
|
|
|
|
<div class="popBtns"> |
|
|
|
|
<el-button class="close btn" @click="[visible = false,authorization=false,success=false]">取 消</el-button> |
|
|
|
|
<el-button class="sure btn" type="primary" @click="popSure">确 定</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> --> |
|
|
|
|
<my-dialog v-if="visible" :visible.sync="visible" :showForm="form" :formName="formName" @submitIt="submitForm2" /> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<need-before v-else :moduleName='needBefore' :unNeed="unNeed" class="wrap" /> |
|
|
|
@ -90,27 +60,30 @@ |
|
|
|
|
import { mapState, mapMutations, mapGetters } from 'vuex' |
|
|
|
|
import { mobPattern, namePattern, ratePattern, vercustomer } from '@/utils/verify.js' |
|
|
|
|
import { addOperation, getOperation } from '@/api/http'; |
|
|
|
|
import { phoneListen, checkRequired, myValidate, checkHanzi, checkName } from '@/utils/utilFunction.js' |
|
|
|
|
import { phoneListen, checkRequired, myValidate, checkHanzi, checkName, ismoney } from '@/utils/utilFunction.js' |
|
|
|
|
import MyTitle from '@/components/myTitle' |
|
|
|
|
import NeedBefore from '@/components/needBefore' |
|
|
|
|
import MyDialog from '@/components/dialog' |
|
|
|
|
|
|
|
|
|
const moduleName = 'corporateClient' |
|
|
|
|
export default { |
|
|
|
|
name: 'index', |
|
|
|
|
components: { |
|
|
|
|
MyTitle, |
|
|
|
|
NeedBefore |
|
|
|
|
NeedBefore, |
|
|
|
|
MyDialog |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
unNeed: false, |
|
|
|
|
isNeedBefore: '', |
|
|
|
|
needBefore: '', |
|
|
|
|
|
|
|
|
|
idNumberJudge: false, |
|
|
|
|
visible:false,// 表单 |
|
|
|
|
authorization:false,// 切授权 |
|
|
|
|
success:false,// 切成功 |
|
|
|
|
form:{ |
|
|
|
|
idNumber: '', |
|
|
|
|
name: '', |
|
|
|
|
phone: '', |
|
|
|
|
documentType: '', |
|
|
|
@ -120,7 +93,25 @@ export default { |
|
|
|
|
companyAddress: '', |
|
|
|
|
certificateType: '' |
|
|
|
|
}, |
|
|
|
|
formName:{ |
|
|
|
|
idNumber: '法人证件号码', |
|
|
|
|
name: '法人姓名', |
|
|
|
|
phone: '联系电话', |
|
|
|
|
documentType: '证件类型', |
|
|
|
|
companyName: '公司名称', |
|
|
|
|
registeredCapital: '注册资本', |
|
|
|
|
codeNumber: '代码证号', |
|
|
|
|
companyAddress: '公司地址', |
|
|
|
|
certificateType: '法人证件类型' |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
idNumber: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入公司名称', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
companyName: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
@ -158,7 +149,16 @@ export default { |
|
|
|
|
// firmClientIdentity |
|
|
|
|
if(this.inMyWork(moduleName)) { |
|
|
|
|
if(this.needsModule(moduleName) === '') { |
|
|
|
|
|
|
|
|
|
if(sessionStorage.getItem('firmClientIdentity')) { |
|
|
|
|
this.idNumberJudge = true |
|
|
|
|
const { idNumber, userName } = this.dataFlow |
|
|
|
|
this.form.idNumber = idNumber |
|
|
|
|
this.form.name = userName |
|
|
|
|
} |
|
|
|
|
this.getFormData() |
|
|
|
|
}else { |
|
|
|
|
this.isNeedBefore = true |
|
|
|
|
this.needBefore = this.needsModule(moduleName) |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
this.isNeedBefore = true |
|
|
|
@ -178,82 +178,105 @@ export default { |
|
|
|
|
var list = data.data.judgmentRuleReqs |
|
|
|
|
for (var i = 0; i < list.length; i++) { |
|
|
|
|
if (list[i].answerId == '48') {this.form.documentType = list[i].emptyTwo} //证件类型 |
|
|
|
|
if (list[i].answerId == '49') {this.form.codeNumber = list[i].emptyTwo} //代码证号 |
|
|
|
|
if (list[i].answerId == '50') {this.form.companyName = list[i].emptyTwo} //公司名称 |
|
|
|
|
if (list[i].answerId == '51') {this.form.companyAddress = list[i].emptyTwo} //公司地址 |
|
|
|
|
if (list[i].answerId == '52') {this.form.registeredCapital = list[i].emptyTwo} //注册资本 |
|
|
|
|
if (list[i].answerId == '53') {this.form.certificateType = list[i].emptyTwo} //法人证件类型 |
|
|
|
|
if (list[i].answerId == '54') {sessionStorage.setItem('firmClientIdentity', list[i].emptyTwo)} //法人证件号码 |
|
|
|
|
if (list[i].answerId == '55') {this.form.name = list[i].emptyTwo} //法人姓名 |
|
|
|
|
if (list[i].answerId == '56') {this.form.phone = list[i].emptyTwo} //联系电话 |
|
|
|
|
else if (list[i].answerId == '49') {this.form.codeNumber = list[i].emptyTwo} //代码证号 |
|
|
|
|
else if (list[i].answerId == '50') {this.form.companyName = list[i].emptyTwo} //公司名称 |
|
|
|
|
else if (list[i].answerId == '51') {this.form.companyAddress = list[i].emptyTwo} //公司地址 |
|
|
|
|
else if (list[i].answerId == '52') {this.form.registeredCapital = list[i].emptyTwo} //注册资本 |
|
|
|
|
else if (list[i].answerId == '53') {this.form.certificateType = list[i].emptyTwo} //法人证件类型 |
|
|
|
|
// else if (list[i].answerId == '54') {sessionStorage.setItem('firmClientIdentity', list[i].emptyTwo)} //法人证件号码 |
|
|
|
|
else if (list[i].answerId == '54') { |
|
|
|
|
console.log('54id') |
|
|
|
|
console.log(list[i].emptyTwo) |
|
|
|
|
this.idNumberJudge = true |
|
|
|
|
this.form.idNumber = list[i].emptyTwo |
|
|
|
|
} |
|
|
|
|
else if (list[i].answerId == '55') {this.form.name = list[i].emptyTwo} //法人姓名 |
|
|
|
|
else if (list[i].answerId == '56') {this.form.phone = list[i].emptyTwo} //联系电话 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
...mapMutations({ |
|
|
|
|
changeShowGoods: 'system/changeShowGoods' |
|
|
|
|
changeShowGoods: 'system/changeShowGoods', |
|
|
|
|
setDataFlow: 'system/setDataFlow', |
|
|
|
|
setNeedsModule: 'system/setNeedsModule', |
|
|
|
|
setPopId: 'system/setPopId' |
|
|
|
|
}), |
|
|
|
|
popUp(){// 唤起弹窗 |
|
|
|
|
this.$store.commit('system/changePop',{show:true,text:'身份证扫描仪',id:'34'}) |
|
|
|
|
// this.$store.commit('system/changePop',{show:true,text:'身份证扫描仪',id:'34'}) |
|
|
|
|
|
|
|
|
|
this.$message.warning('请刷身份证'); |
|
|
|
|
this.setPopId('34') |
|
|
|
|
sessionStorage.setItem('computerPath', this.$route.fullPath) |
|
|
|
|
this.$router.push('/counter/list/') |
|
|
|
|
}, |
|
|
|
|
popSure(){ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
submitForm() { |
|
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
|
|
|
|
|
|
this.$refs.form.validate(myValidate(() => { |
|
|
|
|
// 验证通过逻辑写在这 |
|
|
|
|
this.visible = true; |
|
|
|
|
let formList = []; |
|
|
|
|
let firmClientIdentity = sessionStorage.getItem('firmClientIdentity') |
|
|
|
|
let firmClientIdentitys = JSON.parse(firmClientIdentity); |
|
|
|
|
if (firmClientIdentitys && firmClientIdentitys.length > 0){ |
|
|
|
|
for (var i=0;i<firmClientIdentitys.length;i++){ |
|
|
|
|
formList.push({"answerId":54,"emptyOne": "", "emptyTwo": firmClientIdentity, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,54","type": ""})// 法人证件号码 |
|
|
|
|
} |
|
|
|
|
if(this.form.documentType){ |
|
|
|
|
formList.push({ "answerId":'48', "emptyOne": "19", "emptyTwo": this.form.documentType, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,48","type": "1"})//证件类型 |
|
|
|
|
} |
|
|
|
|
if(this.form.companyAddress){ |
|
|
|
|
formList.push({ "answerId":'51', "emptyOne": "22", "emptyTwo": this.form.companyAddress, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,51", "type": "3" })//公司地址 |
|
|
|
|
} |
|
|
|
|
if(this.form.registeredCapital){ |
|
|
|
|
formList.push({ "answerId":'52', "emptyOne": "23", "emptyTwo": this.form.registeredCapital, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,52", "type": "3" })//注册资本 |
|
|
|
|
} |
|
|
|
|
if(this.form.name){ |
|
|
|
|
formList.push( {"answerId":'55',"emptyOne": "25", "emptyTwo": this.form.name, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,55", "type": "3"})//法人姓名 |
|
|
|
|
} |
|
|
|
|
if(this.form.phone){ |
|
|
|
|
formList.push({"answerId":'56',"emptyOne": "5", "emptyTwo": this.form.phone, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,56", "type": "3"})//联系电话 |
|
|
|
|
} |
|
|
|
|
formList.push( |
|
|
|
|
{ "answerId":'49', "emptyOne": "20", "emptyTwo": this.form.codeNumber, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,49", "type": "3" },//代码证号 |
|
|
|
|
{ "answerId":'50', "emptyOne": "21", "emptyTwo": this.form.companyName, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,50", "type": "3" },//公司名称 |
|
|
|
|
{"answerId":'53',"emptyOne": "24", "emptyTwo": this.form.certificateType, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,53", "type": "1"},//法人证件类型 |
|
|
|
|
); |
|
|
|
|
let params= { |
|
|
|
|
parentId:this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + '285,287,5,25,34', |
|
|
|
|
lcJudgmentRuleReq:formList, |
|
|
|
|
projectId:+projectId, |
|
|
|
|
startTime:startTime, |
|
|
|
|
} |
|
|
|
|
addOperation(params).then((data)=>{ |
|
|
|
|
// this.$message({ |
|
|
|
|
// message: '提交成功', |
|
|
|
|
// type: 'success' |
|
|
|
|
// }); |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|
}else { |
|
|
|
|
this.$message.error('有必填项未填哦~'); |
|
|
|
|
} |
|
|
|
|
}, this.$refs)); |
|
|
|
|
}, |
|
|
|
|
submitForm2() { |
|
|
|
|
let projectId = sessionStorage.getItem('projectId') |
|
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
|
let formList = []; |
|
|
|
|
let firmClientIdentity = sessionStorage.getItem('firmClientIdentity') |
|
|
|
|
let firmClientIdentitys = JSON.parse(firmClientIdentity); |
|
|
|
|
if (firmClientIdentitys && firmClientIdentitys.length > 0){ |
|
|
|
|
// for (var i=0;i<firmClientIdentitys.length;i++){ |
|
|
|
|
// formList.push({"answerId":54,"emptyOne": "", "emptyTwo": firmClientIdentity, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,54","type": ""})// 法人证件号码 |
|
|
|
|
// } |
|
|
|
|
formList.push({"answerId":54,"emptyOne": "", "emptyTwo": this.form.idNumber, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,54","type": ""})// 法人证件号码 |
|
|
|
|
if(this.form.documentType){ |
|
|
|
|
formList.push({ "answerId":'48', "emptyOne": "19", "emptyTwo": this.form.documentType, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,48","type": "1"})//证件类型 |
|
|
|
|
} |
|
|
|
|
if(this.form.companyAddress){ |
|
|
|
|
formList.push({ "answerId":'51', "emptyOne": "22", "emptyTwo": this.form.companyAddress, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,51", "type": "3" })//公司地址 |
|
|
|
|
} |
|
|
|
|
if(this.form.registeredCapital){ |
|
|
|
|
formList.push({ "answerId":'52', "emptyOne": "23", "emptyTwo": this.form.registeredCapital, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,52", "type": "3" })//注册资本 |
|
|
|
|
} |
|
|
|
|
if(this.form.name){ |
|
|
|
|
formList.push( {"answerId":'55',"emptyOne": "25", "emptyTwo": this.form.name, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,55", "type": "3"})//法人姓名 |
|
|
|
|
} |
|
|
|
|
if(this.form.phone){ |
|
|
|
|
formList.push({"answerId":'56',"emptyOne": "5", "emptyTwo": this.form.phone, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,56", "type": "3"})//联系电话 |
|
|
|
|
} |
|
|
|
|
formList.push( |
|
|
|
|
{ "answerId":'49', "emptyOne": "20", "emptyTwo": this.form.codeNumber, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,49", "type": "3" },//代码证号 |
|
|
|
|
{ "answerId":'50', "emptyOne": "21", "emptyTwo": this.form.companyName, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,50", "type": "3" },//公司名称 |
|
|
|
|
{"answerId":'53',"emptyOne": "24", "emptyTwo": this.form.certificateType, "operationIds": this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + "285,287,5,25,34,53", "type": "1"},//法人证件类型 |
|
|
|
|
); |
|
|
|
|
let params= { |
|
|
|
|
parentId:this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',' + '285,287,5,25,34', |
|
|
|
|
lcJudgmentRuleReq:formList, |
|
|
|
|
projectId:+projectId, |
|
|
|
|
startTime:startTime, |
|
|
|
|
} |
|
|
|
|
addOperation(params).then((data)=>{ |
|
|
|
|
// this.$message({ |
|
|
|
|
// message: '提交成功', |
|
|
|
|
// type: 'success' |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
// this.setDataFlow({ ...this.form }) |
|
|
|
|
this.setNeedsModule(moduleName) |
|
|
|
|
this.setDataFlow({ userName: this.form.name }) |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|
}else { |
|
|
|
|
this.$message.error('有必填项未填哦~'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
phoneListen: phoneListen, |
|
|
|
|
checkHanzi: checkHanzi, |
|
|
|
|
checkName: checkName |
|
|
|
|
checkName: checkName, |
|
|
|
|
ismoney: ismoney |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters({ |
|
|
|
|