|
@@ -13,7 +13,7 @@
|
|
|
<el-tab-pane label="基本信息" name="base">
|
|
<el-tab-pane label="基本信息" name="base">
|
|
|
<el-form
|
|
<el-form
|
|
|
label-width="100px"
|
|
label-width="100px"
|
|
|
- ref="formRef"
|
|
|
|
|
|
|
+ ref="form"
|
|
|
:model="form"
|
|
:model="form"
|
|
|
:rules="rules"
|
|
:rules="rules"
|
|
|
style="margin-top: 30px"
|
|
style="margin-top: 30px"
|
|
@@ -706,24 +706,19 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async save() {
|
|
async save() {
|
|
|
-
|
|
|
|
|
- const data1 = {
|
|
|
|
|
- base: this.form,
|
|
|
|
|
- other: this.otherForm,
|
|
|
|
|
- bankList: this.tableBankData,
|
|
|
|
|
- linkList: this.tableLinkData
|
|
|
|
|
- };
|
|
|
|
|
- console.log("data1", data1);
|
|
|
|
|
- return;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
const isBaseValid = await this.$refs.form.validate();
|
|
const isBaseValid = await this.$refs.form.validate();
|
|
|
- const isOtherValid = await this.$refs.form.validate();
|
|
|
|
|
- if (!isBaseValid || !isOtherValid) {
|
|
|
|
|
|
|
+ const isOtherValid = await this.$refs.otherForm.validate();
|
|
|
|
|
+ if (!isBaseValid) {
|
|
|
|
|
+ this.activeName = 'base';
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!isOtherValid) {
|
|
|
|
|
+ this.activeName = 'other';
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if(this.tableLinkData && this.tableLinkData.length === 0){
|
|
if(this.tableLinkData && this.tableLinkData.length === 0){
|
|
|
this.$message.error("联系人信息至少有1条");
|
|
this.$message.error("联系人信息至少有1条");
|
|
|
|
|
+ this.activeName = 'link';
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -734,6 +729,9 @@ export default {
|
|
|
if (node) {
|
|
if (node) {
|
|
|
this.form.addressId = node.path.join();
|
|
this.form.addressId = node.path.join();
|
|
|
this.form.addressName = node.pathLabels.join();
|
|
this.form.addressName = node.pathLabels.join();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.addressId = '';
|
|
|
|
|
+ this.form.addressName = '';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (this.$refs.industry.getCheckedNodes()) {
|
|
if (this.$refs.industry.getCheckedNodes()) {
|
|
@@ -741,6 +739,9 @@ export default {
|
|
|
if (node) {
|
|
if (node) {
|
|
|
this.form.industryCode = node.path.join();
|
|
this.form.industryCode = node.path.join();
|
|
|
this.form.industryFullName = node.pathLabels.join();
|
|
this.form.industryFullName = node.pathLabels.join();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.industryCode = '';
|
|
|
|
|
+ this.form.industryFullName = '';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (this.form.companyCategoryId) {
|
|
if (this.form.companyCategoryId) {
|
|
@@ -751,6 +752,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
if(this.form.businessLicenseFiles && this.form.businessLicenseFiles.length > 0){
|
|
if(this.form.businessLicenseFiles && this.form.businessLicenseFiles.length > 0){
|
|
|
this.form.businessLicenseFile = this.form.businessLicenseFiles[0];
|
|
this.form.businessLicenseFile = this.form.businessLicenseFiles[0];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.businessLicenseFile = null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 其他信息处理
|
|
// 其他信息处理
|
|
@@ -765,6 +768,9 @@ export default {
|
|
|
if (node) {
|
|
if (node) {
|
|
|
this.otherForm.addressId = node.path.join();
|
|
this.otherForm.addressId = node.path.join();
|
|
|
this.otherForm.addressName = node.pathLabels.join();
|
|
this.otherForm.addressName = node.pathLabels.join();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.otherForm.addressId = '';
|
|
|
|
|
+ this.otherForm.addressName = '';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -806,6 +812,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
cancel() {
|
|
cancel() {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
|
|
+ this.activeName = 'base';
|
|
|
// 关闭后,销毁所有的表单数据
|
|
// 关闭后,销毁所有的表单数据
|
|
|
this.$refs['otherForm'] && this.$refs['otherForm'].resetFields();
|
|
this.$refs['otherForm'] && this.$refs['otherForm'].resetFields();
|
|
|
this.$refs['formRef'] && this.$refs['formRef'].resetFields();
|
|
this.$refs['formRef'] && this.$refs['formRef'].resetFields();
|