|
@@ -31,6 +31,7 @@ export default {
|
|
prop: 'slaveOrganizationNos',
|
|
prop: 'slaveOrganizationNos',
|
|
type: 'select',
|
|
type: 'select',
|
|
options: {
|
|
options: {
|
|
|
|
+ filterable: true,
|
|
placeholder: '请选择被合并的机构',
|
|
placeholder: '请选择被合并的机构',
|
|
multiple: true,
|
|
multiple: true,
|
|
items: this.items,
|
|
items: this.items,
|
|
@@ -45,6 +46,7 @@ export default {
|
|
async open (item) {
|
|
async open (item) {
|
|
this.formValues.organizationName = item.name
|
|
this.formValues.organizationName = item.name
|
|
this.formValues.masterOrganizationNo = item.value
|
|
this.formValues.masterOrganizationNo = item.value
|
|
|
|
+ this.formValues.slaveOrganizationNos = []
|
|
this.$refs.dialog.open()
|
|
this.$refs.dialog.open()
|
|
try {
|
|
try {
|
|
const { data } = await getOrganizationByType({
|
|
const { data } = await getOrganizationByType({
|
|
@@ -56,7 +58,7 @@ export default {
|
|
size: 1000
|
|
size: 1000
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- this.items = data.records
|
|
|
|
|
|
+ this.items = data.records.filter(e => e.organizationNo !== item.value)
|
|
} catch (error) {
|
|
} catch (error) {
|
|
this.$message.error(error)
|
|
this.$message.error(error)
|
|
} finally {
|
|
} finally {
|
|
@@ -64,6 +66,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async onSure () {
|
|
async onSure () {
|
|
|
|
+ this.loading = true
|
|
const { masterOrganizationNo, slaveOrganizationNos } = this.formValues
|
|
const { masterOrganizationNo, slaveOrganizationNos } = this.formValues
|
|
try {
|
|
try {
|
|
await margeOrganization({
|
|
await margeOrganization({
|
|
@@ -75,6 +78,8 @@ export default {
|
|
this.$emit('refresh')
|
|
this.$emit('refresh')
|
|
} catch (error) {
|
|
} catch (error) {
|
|
this.$message.error(error)
|
|
this.$message.error(error)
|
|
|
|
+ } finally {
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|