|
@@ -1,60 +1,126 @@
|
|
<template>
|
|
<template>
|
|
<div class="enterprise-edit">
|
|
<div class="enterprise-edit">
|
|
<basic-info ref="baseInfo" :base-info="baseInfo" />
|
|
<basic-info ref="baseInfo" :base-info="baseInfo" />
|
|
- <PersonInfo ref="legalPersonInfoRef" :person-type="'legal'" :details-info="legalPersonInfo" />
|
|
|
|
- <PersonInfo ref="controlPersonInfoRef" :person-type="'control'" :details-info="controlPersonInfo" />
|
|
|
|
- <AuthBook ref="authBookRef" :details-info="authBookInfo" />
|
|
|
|
|
|
+ <PersonInfo ref="legalPersonInfoRef" :person-type="'legal'" :details-info="legalPersonInfo" :regionList="regionList" />
|
|
|
|
+ <PersonInfo ref="controlPersonInfoRef" :person-type="'control'" :details-info="controlPersonInfo" :regionList="regionList" />
|
|
|
|
+ <ContactInfo ref="contactInfoRef" :details-info="contactInfo" />
|
|
<div class="submit-btn">
|
|
<div class="submit-btn">
|
|
<el-button @click="() => { $router.push({ name: 'MyStoreEnterprise', query: { activeName: 'enterprise' } }) }">关闭</el-button>
|
|
<el-button @click="() => { $router.push({ name: 'MyStoreEnterprise', query: { activeName: 'enterprise' } }) }">关闭</el-button>
|
|
<el-button type="primary" @click="submitClick('temp')">暂存</el-button>
|
|
<el-button type="primary" @click="submitClick('temp')">暂存</el-button>
|
|
- <el-button type="primary" @click="submitClick('submit')">提交</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="submitClick('submit')">下一步</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-// import { queryParent } from '@/utils';
|
|
|
|
-
|
|
|
|
|
|
+import { getRegion } from '@/api/dictionary'
|
|
|
|
+import { treeChildrenEmpty } from '@/utils'
|
|
|
|
+import { enterpriseAccessStepOne } from '@/api/myStoreEnterprise'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: 'MyBusinessProjectEdit',
|
|
|
|
|
|
+ name: 'MyEnterpriseReInvite',
|
|
components: {
|
|
components: {
|
|
BasicInfo: () => import('./components/BasicInfo'),
|
|
BasicInfo: () => import('./components/BasicInfo'),
|
|
PersonInfo: () => import('./components/PersonInfo.vue'),
|
|
PersonInfo: () => import('./components/PersonInfo.vue'),
|
|
- AuthBook: () => import('./components/AuthBook')
|
|
|
|
|
|
+ ContactInfo: () => import('./components/ContactInfo.vue')
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
baseInfo: {},
|
|
baseInfo: {},
|
|
legalPersonInfo: {},
|
|
legalPersonInfo: {},
|
|
controlPersonInfo: {},
|
|
controlPersonInfo: {},
|
|
- authBookInfo: [
|
|
|
|
- {
|
|
|
|
- contractType: 0,
|
|
|
|
- contractName: '测试合同名称',
|
|
|
|
- shortAuthUrl: 'http://www.baidu.com'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- contractType: 1,
|
|
|
|
- contractName: '测试合同名称1',
|
|
|
|
- shortAuthUrl: 'http://www.baidu.com'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- contractType: 2,
|
|
|
|
- contractName: '测试合同名称2',
|
|
|
|
- shortAuthUrl: 'http://www.baidu.com'
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ contactInfo: {},
|
|
|
|
+ regionList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- // this.getDetails()
|
|
|
|
|
|
+ const { typeName, code, name } = this.$route.query
|
|
|
|
+
|
|
|
|
+ this.baseInfo = {
|
|
|
|
+ typeName: typeName || '',
|
|
|
|
+ socialCreditCode: code || '',
|
|
|
|
+ enterpriseName: name || ''
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.queryReginList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getDetails() {
|
|
|
|
- // const { id } = this.$route.query
|
|
|
|
|
|
+ async queryReginList() {
|
|
|
|
+ getRegion({ flag: false }).then(({ data }) => {
|
|
|
|
+ this.regionList = treeChildrenEmpty(data)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
async submitClick(type) {
|
|
async submitClick(type) {
|
|
|
|
+ const fileIds = []
|
|
|
|
+ const legalParams = await this.$refs.legalPersonInfoRef.getParams(type)
|
|
|
|
+
|
|
|
|
+ const legalReqParams = {
|
|
|
|
+ legalPerson: legalParams.legalName || '', // 法人姓名
|
|
|
|
+ legalPersonBirthday: legalParams.bornDate || '', // 法人出生日期
|
|
|
|
+ legalPersonPhone: legalParams.phoneNumber || '', // 法人手机号码
|
|
|
|
+ legalPersonCard: legalParams.personCard || '', // 法人身份证号
|
|
|
|
+ legalPersonEmail: legalParams.email || '', // 法人邮箱
|
|
|
|
+ legalPersonProvince: legalParams.cascaderAddress[0] || '', // 省code
|
|
|
|
+ legalPersonCity: legalParams.cascaderAddress[1] || '', // 市code
|
|
|
|
+ legalPersonCounty: legalParams.cascaderAddress[2] || '', // 区code
|
|
|
|
+ legalPersonAddress: legalParams.contactAddress || '', // 法人身份证地址
|
|
|
|
+ legalPersonLiveAddress: legalParams.inputAddress || '' // 详细地址
|
|
|
|
+ }
|
|
|
|
+ fileIds.push(legalParams.cardFrontId, legalParams.cardBackId, legalParams.creditId)
|
|
|
|
+
|
|
|
|
+ const controlParams = await this.$refs.controlPersonInfoRef.getParams(type)
|
|
|
|
+
|
|
|
|
+ const controlReqParams = {
|
|
|
|
+ realControlPerson: controlParams.legalName || '', // 实控人姓名
|
|
|
|
+ realControlPersonBirthday: controlParams.bornDate || '', // 实控人出生日期
|
|
|
|
+ realControlPersonPhone: controlParams.phoneNumber || '', // 实控人手机号码
|
|
|
|
+ realControlPersonCard: controlParams.personCard || '', // 实控人身份证号
|
|
|
|
+ realControlPersonEmail: controlParams.email || '', // 法人邮箱
|
|
|
|
+ realControlPersonProvince: controlParams.cascaderAddress[0] || '', // 省code
|
|
|
|
+ realControlPersonCity: controlParams.cascaderAddress[1] || '', // 市code
|
|
|
|
+ realControlPersonCounty: controlParams.cascaderAddress[2] || '', // 区code
|
|
|
|
+ realControlPersonAddress: controlParams.contactAddress || '', // 法人身份证地址
|
|
|
|
+ realControlPersonLiveAddress: controlParams.inputAddress || '' // 详细地址
|
|
|
|
+ }
|
|
|
|
+ fileIds.push(controlParams.cardFrontId, controlParams.cardBackId, controlParams.creditId)
|
|
|
|
+
|
|
|
|
+ const contactParams = await this.$refs.contactInfoRef.getParams(type)
|
|
|
|
+ const contactReqParams = {
|
|
|
|
+ ...contactParams
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const supParams = {
|
|
|
|
+ companyId: this.$route.query.id,
|
|
|
|
+ ...legalReqParams,
|
|
|
|
+ ...controlReqParams,
|
|
|
|
+ ...contactReqParams,
|
|
|
|
+ fileIds,
|
|
|
|
+ flag: type === 'temp' ? 0 : 1
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.$route.query.companyZrId) {
|
|
|
|
+ supParams.companyZrId = this.$route.query.companyZrId
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const res = await enterpriseAccessStepOne(supParams)
|
|
|
|
+
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.$message.success('操作成功')
|
|
|
|
+ if (type === 'temp') {
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
+ } else if (type === 'submit') {
|
|
|
|
+ if (res.data.redNo) {
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
+ } else {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'StoreEnterpriseAuth',
|
|
|
|
+ query: {
|
|
|
|
+ taskId: res.data.taskId
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|