diff --git a/src/views/xgf/flow/components/sendUtil.vue b/src/views/xgf/flow/components/sendUtil.vue index 1e7f19e..2b39e7a 100644 --- a/src/views/xgf/flow/components/sendUtil.vue +++ b/src/views/xgf/flow/components/sendUtil.vue @@ -173,7 +173,8 @@ export default { } else { this.isShow = false } - } else { + } + if (this.info.FLOWS_TYPE === '1') { this.isShow = true if (this.info.FLOWS_STEP === 2 || this.info.FLOWS_STEP === 3) { await this.getDepartmentTree() @@ -186,6 +187,15 @@ export default { this.corpFlag = true } } + if (this.info.FLOWS_TYPE === '2') { + if (this.info.FLOWS_STEP === 1) { + this.isShow = true + await this.getDepartmentTree() + this.corpFlag = false + } else { + this.isShow = false + } + } this.loading = false }, getMenu() { diff --git a/src/views/xgf/insert/components/corpInfoAdd.vue b/src/views/xgf/insert/components/corpInfoAdd.vue index db12012..46fe8e2 100644 --- a/src/views/xgf/insert/components/corpInfoAdd.vue +++ b/src/views/xgf/insert/components/corpInfoAdd.vue @@ -435,6 +435,12 @@ export default { submitForm() { this.$refs.form.validate(valid => { if (valid) { + if (this.form.MAIN_DEPARTMENT.indexOf('0') > -1 && this.form.MAIN_DEPARTMENT.length > 1) { + this.listLoading = false + this.submitButtonLoading = false + this.$message.error('主管部门选无时不能选择其他部门') + return + } this.listLoading = true this.submitButtonLoading = true if (this.form.POSSESSION && this.form.POSSESSION.length > 0) { @@ -452,12 +458,6 @@ 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', diff --git a/src/views/xgf/insert/components/corpInfoEdit.vue b/src/views/xgf/insert/components/corpInfoEdit.vue index c5eb44f..4a1668e 100644 --- a/src/views/xgf/insert/components/corpInfoEdit.vue +++ b/src/views/xgf/insert/components/corpInfoEdit.vue @@ -560,6 +560,12 @@ export default { if (valid) { this.listLoading = true this.buttonLoading = true + if (this.form.MAIN_DEPARTMENT.indexOf('0') > -1 && this.form.MAIN_DEPARTMENT.length > 1) { + this.listLoading = false + this.submitButtonLoading = false + this.$message.error('主管部门选无时不能选择其他部门') + return + } if (this.form.POSSESSION && this.form.POSSESSION.length > 0) { this.form.PROVINCE = this.form.POSSESSION[0] || '' this.form.CITY = this.form.POSSESSION[1] || '' @@ -573,12 +579,7 @@ 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 - } + this.form.MAIN_DEPARTMENT = JSON.stringify(this.form.MAIN_DEPARTMENT) if (this.form.MANAGER_DEPARTMENT_ID) { this.form.MANAGER_DEPARTMENT_ID = JSON.stringify(this.form.MANAGER_DEPARTMENT_ID) }