diff --git a/src/views/xgf/audit/components/edit.vue b/src/views/xgf/audit/components/edit.vue index f7aed95..5e19243 100644 --- a/src/views/xgf/audit/components/edit.vue +++ b/src/views/xgf/audit/components/edit.vue @@ -635,6 +635,11 @@ export default { {} ).then((data) => { this.treeData = JSON.parse(data.zTreeNodes) + this.treeData.push({ + id: '0', + name: '无', + nodes: [] + }) resolve() }).catch((e) => { reject() diff --git a/src/views/xgf/insert/components/corpInfoAdd.vue b/src/views/xgf/insert/components/corpInfoAdd.vue index 1e4570a..db12012 100644 --- a/src/views/xgf/insert/components/corpInfoAdd.vue +++ b/src/views/xgf/insert/components/corpInfoAdd.vue @@ -419,6 +419,11 @@ export default { ).then((data) => { const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') this.treeData = this.removeEmptyChildren(treeData) + this.treeData.push({ + id: '0', + name: '无', + nodes: [] + }) }).catch((e) => { }) }, @@ -447,6 +452,12 @@ export default { this.form.MANAGER_DEPARTMENT_ID = this.form.MANAGER_DEPARTMENT_ID.join(',') } this.form.CORP_TYPE = JSON.stringify(this.form.CORP_TYPE) + if (this.form.MAIN_DEPARTMENT.indexOf('0') > -1 && this.form.MAIN_DEPARTMENT.length > 1) { + this.listLoading = false + this.buttonLoading = false + this.$message.error('主管部门选无时不能选择其他部门') + return + } this.form.MAIN_DEPARTMENT = JSON.stringify(this.form.MAIN_DEPARTMENT) requestFN( '/relevantunits/saveCorpInfo', @@ -484,11 +495,6 @@ export default { ).then((data) => { const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') this.treeDataSupervise = this.removeEmptyChildren(treeData) - this.treeData.push({ - id: '0', - name: '无', - nodes: [] - }) }).catch((e) => { }) diff --git a/src/views/xgf/insert/components/corpInfoEdit.vue b/src/views/xgf/insert/components/corpInfoEdit.vue index 0407989..c5eb44f 100644 --- a/src/views/xgf/insert/components/corpInfoEdit.vue +++ b/src/views/xgf/insert/components/corpInfoEdit.vue @@ -573,8 +573,14 @@ export default { if (this.form.COMPETENT_DEPT_ID) { this.form.COMPETENT_DEPT_ID = this.form.COMPETENT_DEPT_ID.join(',') } + if (this.form.MAIN_DEPARTMENT.indexOf('0') > -1 && this.form.MAIN_DEPARTMENT.length > 1) { + this.listLoading = false + this.buttonLoading = false + this.$message.error('主管部门选无时不能选择其他部门') + return + } if (this.form.MANAGER_DEPARTMENT_ID) { - this.form.MANAGER_DEPARTMENT_ID = this.form.MANAGER_DEPARTMENT_ID.join(',') + this.form.MANAGER_DEPARTMENT_ID = JSON.stringify(this.form.MANAGER_DEPARTMENT_ID) } this.form.CORP_TYPE = JSON.stringify(this.form.CORP_TYPE) requestFN(