From 1d2251be42c05b1d7cbc9a1d14d93edf1c6c9fec Mon Sep 17 00:00:00 2001 From: liujun Date: Wed, 20 Mar 2024 16:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E7=AE=A1=E5=8D=95=E4=BD=8D=E9=80=89?= =?UTF-8?q?=E6=97=A0=E6=97=B6=E4=B8=8D=E8=83=BD=E9=80=89=E6=8B=A9=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E4=B8=BB=E7=AE=A1=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xgf/audit/components/edit.vue | 5 +++++ src/views/xgf/insert/components/corpInfoAdd.vue | 16 +++++++++++----- src/views/xgf/insert/components/corpInfoEdit.vue | 8 +++++++- 3 files changed, 23 insertions(+), 6 deletions(-) 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(