|
|
@@ -10,9 +10,10 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="供应商分类" prop="categoryId">
|
|
|
- <ele-tree-select multiple
|
|
|
- filterable
|
|
|
- :checkStrictly="true" :data="categoryTreeList" v-model="categoryIdList" valueKey="id" labelKey="name"
|
|
|
+ <ele-tree-select multiple
|
|
|
+ filterable
|
|
|
+ :checkStrictly="true" :data="categoryTreeList" v-model="categoryIdList" valueKey="id"
|
|
|
+ labelKey="name"
|
|
|
placeholder="请选择" default-expand-all/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -123,7 +124,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="级别" >
|
|
|
+ <el-form-item label="级别">
|
|
|
<DictSelection dictName="供应商级别" clearable v-model="form.level">
|
|
|
</DictSelection>
|
|
|
</el-form-item>
|
|
|
@@ -297,7 +298,8 @@
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="证书资质" name="certificate">
|
|
|
<headerTitle title="证书资质" style="margin-top: 30px"></headerTitle>
|
|
|
- <ele-pro-table ref="certificateTable" :columns="certificateColumns" :need-page="false" :datasource="tableCertificateData"
|
|
|
+ <ele-pro-table ref="certificateTable" :columns="certificateColumns" :need-page="false"
|
|
|
+ :datasource="tableCertificateData"
|
|
|
:toolkit="[]" height="350px">
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
@@ -714,6 +716,17 @@ export default {
|
|
|
groupData: [],
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ categoryIdList(val) {
|
|
|
+ if (val.length > 0) {
|
|
|
+ this.$refs.form.clearValidate('categoryId')
|
|
|
+ this.form.categoryId = this.categoryIdList.join(',')
|
|
|
+ } else {
|
|
|
+ this.form.categoryId = ''
|
|
|
+ this.$refs.form.validateField('categoryId')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getGroupAll();
|
|
|
},
|
|
|
@@ -817,14 +830,14 @@ export default {
|
|
|
tableCertificateData({page, limit, where}) {
|
|
|
if (!this.form.id) return []
|
|
|
return contactQcPackPageAPI({
|
|
|
- certificationType:'2',
|
|
|
+ certificationType: '2',
|
|
|
relationId: this.form.id
|
|
|
});
|
|
|
},
|
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
|
where = {
|
|
|
- certificationType:'2',
|
|
|
+ certificationType: '2',
|
|
|
relationId: this.form.id
|
|
|
}
|
|
|
this.$refs.certificateTable.reload({...where});
|
|
|
@@ -872,11 +885,12 @@ export default {
|
|
|
},
|
|
|
//开启资质提交流程
|
|
|
async submit(row) {
|
|
|
- await contactQcSubmit({businessId: row.id,certificationType:'2'})
|
|
|
+ await contactQcSubmit({businessId: row.id, certificationType: '2'})
|
|
|
this.reload()
|
|
|
},
|
|
|
async save() {
|
|
|
try {
|
|
|
+
|
|
|
await this.getValidate();
|
|
|
// 表单验证通过,执行保存操作
|
|
|
this.loading = true;
|
|
|
@@ -891,7 +905,7 @@ export default {
|
|
|
this.form.addressName = '';
|
|
|
}
|
|
|
}
|
|
|
- this.form.categoryId = this.categoryIdList.join(',')
|
|
|
+
|
|
|
if (this.$refs.industry.getCheckedNodes()) {
|
|
|
let node = this.$refs.industry.getCheckedNodes()[0];
|
|
|
if (node) {
|
|
|
@@ -985,15 +999,16 @@ export default {
|
|
|
this.otherForm = copyObj(this.otherFormDef),
|
|
|
this.tableBankData = []
|
|
|
this.tableLinkData = []
|
|
|
+ this.categoryIdList = []
|
|
|
this.visible = false;
|
|
|
})
|
|
|
},
|
|
|
async _getById(id) {
|
|
|
const data = await contactDetail(id);
|
|
|
- this.form = data.base||{};
|
|
|
- this.otherForm = data.other||{};
|
|
|
- this.tableBankData = data.bankList||[];
|
|
|
- this.tableLinkData = data.linkList||[];
|
|
|
+ this.form = data.base || {};
|
|
|
+ this.otherForm = data.other || {};
|
|
|
+ this.tableBankData = data.bankList || [];
|
|
|
+ this.tableLinkData = data.linkList || [];
|
|
|
if (data.base.businessLicenseFile && data.base.businessLicenseFile !== "") {
|
|
|
this.$set(this.form, 'businessLicenseFiles', [data.base.businessLicenseFile])
|
|
|
}
|