|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<basic-container>
|
|
|
- <el-dialog title="商户进件信息" :append-to-body="true" :visible.sync="dialogFormVisible" top="1vh" @close="dialogClose" @open="openDialog">
|
|
|
+ <el-dialog title="商户进件信息" :append-to-body="true" :visible.sync="dialogFormVisible" top="1vh" @close="dialogClose" @open="openDialog" :close-on-click-modal="false">
|
|
|
<!-- 步骤条 -->
|
|
|
<div class="steps">
|
|
|
<el-steps :active="active" process-status="finish" align-center>
|
|
|
@@ -13,7 +13,7 @@
|
|
|
<el-card style="margin-top: 40px;" v-if="active==0">
|
|
|
<div style="margin-top:10px;">
|
|
|
<el-form :model="form1" :rules="rules1" ref="form1" label-width="120px" label-position="right" size="small">
|
|
|
- <el-form-item label="商户类型" prop="signType">
|
|
|
+ <el-form-item label="商户签约类型" prop="signType">
|
|
|
<el-select v-model="form1.signType" placeholder="请输入商户类型" clearable="true">
|
|
|
<el-option v-for="item in signTypeOptions" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
|
|
|
</el-select>
|
|
|
@@ -75,7 +75,7 @@
|
|
|
<el-col span="12">
|
|
|
<el-form-item prop="licenceUrl" label="商户证件照片" style="width: 45%;">
|
|
|
<el-upload class="avatar-uploader" action="/api/putObject" :show-file-list="false"
|
|
|
- :on-success="uploadLicenceUrl">
|
|
|
+ :on-success="uploadLicenceUrl" :before-upload="beforeUploadLicenceUrl">
|
|
|
<img v-if="form1.licenceUrl" :src="form1.licenceUrl" class="avatar">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
@@ -84,7 +84,7 @@
|
|
|
<el-col span="12">
|
|
|
<el-form-item prop="handLicenceUrl" label="手持营业执照在经营场所的照片" style="width: 45%;">
|
|
|
<el-upload class="avatar-uploader" action="/api/putObject" :show-file-list="false"
|
|
|
- :on-success="uploadHandLicenceUrl">
|
|
|
+ :on-success="uploadHandLicenceUrl" :before-upload="beforeUploadLicenceUrl">
|
|
|
<img v-if="form1.handLicenceUrl" :src="form1.handLicenceUrl" class="avatar">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
@@ -93,7 +93,7 @@
|
|
|
</el-row>
|
|
|
<el-form-item prop="openAccountLicenceUrl" label="开户许可证照片" style="width: 45%;">
|
|
|
<el-upload class="avatar-uploader" action="/api/putObject" :show-file-list="false"
|
|
|
- :on-success="uploadOpenAccountLicenceUrl">
|
|
|
+ :on-success="uploadOpenAccountLicenceUrl" :before-upload="beforeUploadLicenceUrl">
|
|
|
<img v-if="form1.openAccountLicenceUrl" :src="form1.openAccountLicenceUrl" class="avatar">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
@@ -128,7 +128,7 @@
|
|
|
<el-col span="12">
|
|
|
<el-form-item prop="legalLicenceFrontUrl" label="请上传法人证件正面照片" style="width: 45%;">
|
|
|
<el-upload class="avatar-uploader" action="/api/putObject" :show-file-list="false"
|
|
|
- :on-success="uploadLegalLicenceFrontUrl">
|
|
|
+ :on-success="uploadLegalLicenceFrontUrl" :before-upload="beforeUploadContactUrl">
|
|
|
<img v-if="form2.legalLicenceFrontUrl" :src="form2.legalLicenceFrontUrl" class="avatar">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
@@ -137,7 +137,7 @@
|
|
|
<el-col span="12">
|
|
|
<el-form-item prop="legalLicenceBackUrl" label="法人证件反面照片" style="width: 45%;">
|
|
|
<el-upload class="avatar-uploader" action="/api/putObject" :show-file-list="false"
|
|
|
- :on-success="uploadLegalLicenceBackUrl">
|
|
|
+ :on-success="uploadLegalLicenceBackUrl" :before-upload="beforeUploadContactUrl">
|
|
|
<img v-if="form2.legalLicenceBackUrl" :src="form2.legalLicenceBackUrl" class="avatar">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
@@ -194,14 +194,13 @@
|
|
|
} from "@/api/bussinessregion/bussinessregion";
|
|
|
import {getDictionary} from "@/api/system/dictbiz";
|
|
|
import {add as saveBussInfo, update as updateBussInfo} from "@/api/bussiness/bussinessinfo"
|
|
|
- import {add as saveContactInfo, update as updateContactInfo} from "@/api/bussiness/bussinesscontactinfo"
|
|
|
- import {isvalidatemobile, isEmail} from "@/util/validate"
|
|
|
+ import {add as saveContactInfo} from "@/api/bussiness/bussinesscontactinfo"
|
|
|
export default {
|
|
|
props:{
|
|
|
form1:Object,
|
|
|
form2:Object,
|
|
|
form3:Object,
|
|
|
- curEvent: 'add'
|
|
|
+ curEvent: 'add',
|
|
|
},
|
|
|
data() {
|
|
|
var validatemobile = (rule, value, callback) => {
|
|
|
@@ -244,6 +243,7 @@
|
|
|
label: 'cityName',
|
|
|
value: 'cityCode',
|
|
|
},
|
|
|
+ bussinessRoleOptions: [],
|
|
|
signTypeOptions: [],
|
|
|
legalLicenceTypeOptions: [],
|
|
|
dialogFormVisible: false,
|
|
|
@@ -279,13 +279,13 @@
|
|
|
{ required: true, message: '请输入开户许可证编号', trigger: 'blur' },
|
|
|
],
|
|
|
licenceUrl: [
|
|
|
- { required: false, message: '请上传商户证件照片', trigger: 'blur' },
|
|
|
+ { required: true, message: '请上传商户证件照片', trigger: 'blur' },
|
|
|
],
|
|
|
openAccountLicenceUrl: [
|
|
|
- { required: false, message: '请上传法人证件照正面照片', trigger: 'blur' },
|
|
|
+ { required: true, message: '请上传法人证件照正面照片', trigger: 'blur' },
|
|
|
],
|
|
|
handLicenceUrl: [
|
|
|
- { required: false, message: '请上传法人证件照反面照片', trigger: 'blur' },
|
|
|
+ { required: true, message: '请上传法人证件照反面照片', trigger: 'blur' },
|
|
|
],
|
|
|
},
|
|
|
rules2:{
|
|
|
@@ -299,10 +299,10 @@
|
|
|
{required: true, message: '请输入法人证件号码', trigger: 'blur' },
|
|
|
],
|
|
|
legalLicenceFrontUrl:[
|
|
|
- {required: false, message: '请上传法人证件正面照片', trigger: 'blur' },
|
|
|
+ {required: true, message: '请上传法人证件正面照片', trigger: 'blur' },
|
|
|
],
|
|
|
legalLicenceBackUrl:[
|
|
|
- {required: false, message: '请上传法人证件反面照片', trigger: 'blur' },
|
|
|
+ {required: true, message: '请上传法人证件反面照片', trigger: 'blur' },
|
|
|
]
|
|
|
},
|
|
|
rules3:{
|
|
|
@@ -322,24 +322,42 @@
|
|
|
},
|
|
|
created() {
|
|
|
this.loadProvince();
|
|
|
- this.loadSignTypeList("business_sign_type");
|
|
|
- this.loadLegalLicenceTypeList("legal_licence_type");
|
|
|
+ this.loadDict("business_sign_type");
|
|
|
+ this.loadDict("legal_licence_type");
|
|
|
+ this.loadDict("yee_business_role");
|
|
|
},
|
|
|
methods: {
|
|
|
+ beforeUploadLicenceUrl(file){
|
|
|
+ if(file.size > 5242880){
|
|
|
+ this.$message.error("图片大小不能超过2.5M");
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeUploadContactUrl(file){
|
|
|
+ if(file.size > 1048576){
|
|
|
+ this.$message.error("图片大小不能超过1M");
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ },
|
|
|
openDialog(){
|
|
|
if(this.curEvent == 'edit'){
|
|
|
this.loadCity(this.form1.province);
|
|
|
this.loadDistrict(this.form1.city);
|
|
|
}
|
|
|
},
|
|
|
- loadSignTypeList(code){
|
|
|
+ loadDict(code){
|
|
|
getDictionary({"code":code}).then(res =>{
|
|
|
- this.signTypeOptions = res.data.data;
|
|
|
- })
|
|
|
- },
|
|
|
- loadLegalLicenceTypeList(code){
|
|
|
- getDictionary({"code":code}).then(res =>{
|
|
|
- this.legalLicenceTypeOptions = res.data.data;
|
|
|
+ if(code === 'business_sign_type'){
|
|
|
+ this.signTypeOptions = res.data.data;
|
|
|
+ }else if(code === 'legal_licence_type'){
|
|
|
+ this.legalLicenceTypeOptions = res.data.data;
|
|
|
+ }else if(code === 'yee_business_role'){
|
|
|
+ this.bussinessRoleOptions = res.data.data;
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
loadProvince(){
|
|
|
@@ -391,7 +409,7 @@
|
|
|
},
|
|
|
//上传法人证件反面照片
|
|
|
uploadLegalLicenceBackUrl(res) {
|
|
|
- this.form2.legalLegalLicenceBackUrl = res.data
|
|
|
+ this.form2.legalLicenceBackUrl = res.data
|
|
|
},
|
|
|
next(){
|
|
|
switch (this.active){
|
|
|
@@ -404,6 +422,7 @@
|
|
|
type: "success",
|
|
|
message: res.data.msg
|
|
|
});
|
|
|
+ this.form1.id = res.data.data.id;
|
|
|
this.form.bussinessInfoId = res.data.data.id;
|
|
|
this.form2.bussinessInfoId = res.data.data.id;
|
|
|
this.form3.bussinessInfoId = res.data.data.id;
|
|
|
@@ -426,53 +445,32 @@
|
|
|
case 1:
|
|
|
let validForm2 = this.validForm('form2');
|
|
|
if(validForm2){
|
|
|
- if(this.curEvent == "add"){
|
|
|
- this.form2.contactType = 10;
|
|
|
- saveContactInfo(this.form2).then(res => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: res.data.msg
|
|
|
- });
|
|
|
- this.form2.id = res.data.data.id;
|
|
|
- this.handelNext()
|
|
|
- });
|
|
|
- }else if(this.curEvent == "edit" && this.form2.id != null){
|
|
|
- this.form2.contactType = 10;
|
|
|
- updateContactInfo(this.form2).then(res => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: res.data.msg
|
|
|
- });
|
|
|
- this.form2.id = res.data.data.id;
|
|
|
- this.handelNext()
|
|
|
+ this.form2.contactType = 10;
|
|
|
+ this.form2.bussinessInfoId = this.form1.id
|
|
|
+ saveContactInfo(this.form2).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: res.data.msg
|
|
|
});
|
|
|
- }
|
|
|
+ this.form2.id = res.data.data.id;
|
|
|
+ this.handelNext()
|
|
|
+ });
|
|
|
}
|
|
|
break;
|
|
|
case 2:
|
|
|
let validForm3 = this.validForm('form3');
|
|
|
if(validForm3){
|
|
|
- if(this.curEvent == "add"){
|
|
|
- this.form3.contactType = 11;
|
|
|
- saveContactInfo(this.form3).then(res => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: res.data.msg
|
|
|
- });
|
|
|
- this.form3.id = res.data.data.id;
|
|
|
- this.handelNext()
|
|
|
+ this.form3.contactType = 11;
|
|
|
+ this.form3.bussinessInfoId = this.form1.id
|
|
|
+ this.form3.servicePhone = this.form3.contactMobile;
|
|
|
+ saveContactInfo(this.form3).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: res.data.msg
|
|
|
});
|
|
|
- }else if(this.curEvent == "edit" && this.form3.id != null){
|
|
|
- this.form3.contactType = 11;
|
|
|
- updateContactInfo(this.form3).then(res => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: res.data.msg
|
|
|
- });
|
|
|
- this.form3.id = res.data.data.id;
|
|
|
- this.handelNext()
|
|
|
- });
|
|
|
- }
|
|
|
+ this.form3.id = res.data.data.id;
|
|
|
+ this.handelNext()
|
|
|
+ });
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
@@ -500,9 +498,15 @@
|
|
|
}
|
|
|
},
|
|
|
submit(){
|
|
|
- this.form.bussinessInfoId = this.form1.id;
|
|
|
- this.$emit('submit', this.form)
|
|
|
- this.active = 0;
|
|
|
+ this.$confirm("确定提交进件申请吗?如果需要修改,请先点击保存后再提交申请", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.form.bussinessInfoId = this.form1.id;
|
|
|
+ this.$emit('submit', this.form)
|
|
|
+ this.active = 0;
|
|
|
+ });
|
|
|
},
|
|
|
dialogClose(){
|
|
|
this.active = 0;
|