|
|
|
@ -162,7 +162,7 @@ |
|
|
|
class="el-icon-check"></i>保存</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '删除')" class="btnList"> |
|
|
|
<el-button type="danger" @click="del('form')" class="commonbutton"> |
|
|
|
<el-button type="danger" @click="btnDel('form')" class="commonbutton"> |
|
|
|
<i class="el-icon-delete"></i>删除 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
@ -220,7 +220,7 @@ export default { |
|
|
|
rules: { |
|
|
|
displayName: [{ required: true, message: "请输入单位名称", trigger: "blur" }], |
|
|
|
shortName: [{ required: true, message: "请输入单位简写", trigger: "blur" }], |
|
|
|
orgTypeId: [{ required: true, message: "请输入单位性质", trigger: "blur" }], |
|
|
|
orgTypeId: [{ required: true, message: "请输入单位性质", trigger: "blur" }], |
|
|
|
organizationUnitId: [ |
|
|
|
{ required: true, message: "请输入体检中心", trigger: "blur" }, |
|
|
|
], |
|
|
|
@ -269,7 +269,7 @@ export default { |
|
|
|
|
|
|
|
//获取单位信息 |
|
|
|
getCustomerOrgRd(id) { |
|
|
|
if (!id){ |
|
|
|
if (!id) { |
|
|
|
this.form = deepCopy(this.formInit) |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -293,14 +293,14 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 初始化 字典数据 |
|
|
|
dictInit() { |
|
|
|
dictInit() { |
|
|
|
//获取组织体检中心数据 |
|
|
|
getapi("/api/app/organization-units/organization-unit-by-is-peis").then((res) => { |
|
|
|
this.data.organizationdata = res.data; |
|
|
|
}); |
|
|
|
|
|
|
|
//获取单位类别列表 |
|
|
|
getapi("/api/app/customer-org-type/in-filter").then((res) => { |
|
|
|
getapi("/api/app/customer-org-type/get-all").then((res) => { |
|
|
|
this.data.customerOrgType = res.data.items; |
|
|
|
}); |
|
|
|
}, |
|
|
|
@ -421,14 +421,16 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
console.log("body", body, "this.form", this.form); |
|
|
|
|
|
|
|
|
|
|
|
if (!this.form.id) { |
|
|
|
//id为空则新增 |
|
|
|
postapi(`/api/app/customerorg/create`, body).then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
console.log("创健 操作成功"); |
|
|
|
//this.setData({ key: "customerOrg.customerOrgRd", value: res }); |
|
|
|
this.customerOrg.customerOrgId = res.data.id; |
|
|
|
this.form = res.data |
|
|
|
this.dataTransOpts.tableS.customer_org.id = res.data.id |
|
|
|
// this.customerOrg.customerOrgId = res.data.id; |
|
|
|
this.customerOrg.customerOrgRd = res.data; |
|
|
|
this.getCustomerOrgTree("insert", res.data); |
|
|
|
this.customerOrg.oprStatus = 'edit' |
|
|
|
@ -466,25 +468,25 @@ export default { |
|
|
|
this.customerOrg.oprStatus = '' |
|
|
|
return; |
|
|
|
} |
|
|
|
this.form.parentId = this.dataTransOpts.tableS.customer_org.id |
|
|
|
} else { |
|
|
|
this.form.parentId = this.dataTransOpts.tableS.customer_org.id |
|
|
|
} else { |
|
|
|
// 新增一级单位时,清除 vuex 一级单位ID |
|
|
|
this.dataTransOpts.tableS.customer_org.parent_id = '' |
|
|
|
this.dataTransOpts.tableS.customer_org.parent_id = '' |
|
|
|
} |
|
|
|
this.customerOrg.oprStatus = 'add' |
|
|
|
// this.customerOrg.customerOrgId = ""; |
|
|
|
|
|
|
|
this.dataTransOpts.tableS.customer_org.id = '' |
|
|
|
setTimeout(() => { |
|
|
|
this.dataTransOpts.refresh.customer_org_register.M++ |
|
|
|
this.dataTransOpts.refresh.contact_person.M++ |
|
|
|
}, 20); |
|
|
|
|
|
|
|
this.dataTransOpts.refresh.customer_org_register.M++ |
|
|
|
this.dataTransOpts.refresh.contact_person.M++ |
|
|
|
}, 20); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//删除 |
|
|
|
del(formName) { |
|
|
|
if (!this.customerOrg.customerOrgRd.id) { |
|
|
|
btnDel(formName) { |
|
|
|
if (!this.dataTransOpts.tableS.customer_org.id) { |
|
|
|
this.$message.warning("请先选中要删除的节点") |
|
|
|
return |
|
|
|
} |
|
|
|
@ -508,7 +510,8 @@ export default { |
|
|
|
this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } }); |
|
|
|
this.$refs[formName].resetFields(); |
|
|
|
this.customerOrg.oprStatus = '' |
|
|
|
this.customerOrg.customerOrgId = '' |
|
|
|
// this.customerOrg.customerOrgId = '' |
|
|
|
this.dataTransOpts.tableS.customer_org.id = '' |
|
|
|
} |
|
|
|
}).catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
|