主管单位选无时不能选择其他主管单位

pull/11/head
liujun 2024-03-20 16:19:20 +08:00
parent 9cfd5bd004
commit 1d2251be42
3 changed files with 23 additions and 6 deletions

View File

@ -635,6 +635,11 @@ export default {
{} {}
).then((data) => { ).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes) this.treeData = JSON.parse(data.zTreeNodes)
this.treeData.push({
id: '0',
name: '无',
nodes: []
})
resolve() resolve()
}).catch((e) => { }).catch((e) => {
reject() reject()

View File

@ -419,6 +419,11 @@ export default {
).then((data) => { ).then((data) => {
const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
this.treeData = this.removeEmptyChildren(treeData) this.treeData = this.removeEmptyChildren(treeData)
this.treeData.push({
id: '0',
name: '无',
nodes: []
})
}).catch((e) => { }).catch((e) => {
}) })
}, },
@ -447,6 +452,12 @@ export default {
this.form.MANAGER_DEPARTMENT_ID = this.form.MANAGER_DEPARTMENT_ID.join(',') this.form.MANAGER_DEPARTMENT_ID = this.form.MANAGER_DEPARTMENT_ID.join(',')
} }
this.form.CORP_TYPE = JSON.stringify(this.form.CORP_TYPE) 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) this.form.MAIN_DEPARTMENT = JSON.stringify(this.form.MAIN_DEPARTMENT)
requestFN( requestFN(
'/relevantunits/saveCorpInfo', '/relevantunits/saveCorpInfo',
@ -484,11 +495,6 @@ export default {
).then((data) => { ).then((data) => {
const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
this.treeDataSupervise = this.removeEmptyChildren(treeData) this.treeDataSupervise = this.removeEmptyChildren(treeData)
this.treeData.push({
id: '0',
name: '无',
nodes: []
})
}).catch((e) => { }).catch((e) => {
}) })

View File

@ -573,8 +573,14 @@ export default {
if (this.form.COMPETENT_DEPT_ID) { if (this.form.COMPETENT_DEPT_ID) {
this.form.COMPETENT_DEPT_ID = this.form.COMPETENT_DEPT_ID.join(',') 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) { 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) this.form.CORP_TYPE = JSON.stringify(this.form.CORP_TYPE)
requestFN( requestFN(