|
|
|
@ -608,13 +608,14 @@ |
|
|
|
<WebBookingMzak /> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- checkStrictly: true, expandTrigger: 'hover', --> |
|
|
|
<!-- checkStrictly: true, expandTrigger: 'hover', lazyLoad: lazyLoad, lazy: true, @change="changeChooseOrgId" --> |
|
|
|
<!-- checkStrictly: true, expandTrigger: 'click', :show-all-levels="false" --> |
|
|
|
<el-dialog title="选择单位" :visible.sync="dialogOrg" width="800px" :close-on-click-modal="false" |
|
|
|
:append-to-body="true"> |
|
|
|
<div style="height: 320px;"> |
|
|
|
<el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll" style="width:400px;" |
|
|
|
filterable popper-class="example" :show-all-levels="false" @change="changeChooseOrgId" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'click', ...customerOrg.treeprops, lazyLoad: lazyLoad, lazy: true, leaf: 'isLeaf' }" |
|
|
|
filterable popper-class="example" |
|
|
|
:props="{ ...customerOrg.treeprops, leaf: 'isLeaf' }" |
|
|
|
size="small"> |
|
|
|
</el-cascader> |
|
|
|
</div> |
|
|
|
@ -749,8 +750,8 @@ |
|
|
|
<span>单位体检次数:</span> |
|
|
|
<el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px" |
|
|
|
size="small" @change="changeTimes" value-key="id"> |
|
|
|
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes" |
|
|
|
:value="item" /> |
|
|
|
<el-option v-for="item in customerOrgRegisterListCopy" :key="item.id" :label="item.medicalTimes" |
|
|
|
:value="item" :disabled="item.isComplete == 'Y'" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -1028,7 +1029,7 @@ export default { |
|
|
|
customerOrgId: '', |
|
|
|
customerOrgDisp: [], |
|
|
|
customerOrgAll: [], |
|
|
|
customerOrgRegisterList: [], //当前体检次数集合 |
|
|
|
customerOrgRegisterListCopy: [], //当前体检次数集合 |
|
|
|
customerOrgRegister: {}, // 当前选择体检次数 |
|
|
|
|
|
|
|
hc_warn_mode: '1', //0-仅提醒;1-提醒并决择;2-有互斥项目时不允许保存 |
|
|
|
@ -1359,21 +1360,29 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 确定选中企业 |
|
|
|
btnOkOrg() { |
|
|
|
let customerOrgId = '' |
|
|
|
|
|
|
|
this.changeCustomerOrgId(this.form.customerOrgId) |
|
|
|
.then(res => { |
|
|
|
this.form.customerOrgParentId = res |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (Array.isArray(this.form.customerOrgId)) { |
|
|
|
this.form.customerOrgParentId = this.form.customerOrgId[0] |
|
|
|
customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1] |
|
|
|
} else { |
|
|
|
this.form.customerOrgParentId = this.form.customerOrgId |
|
|
|
customerOrgId = this.form.customerOrgId |
|
|
|
} |
|
|
|
// 设置单位显示值 |
|
|
|
let node = getTreeNode(this.patientRegister.customerOrgTreeAll, "treeChildren", "id", customerOrgId) |
|
|
|
if (node) this.form.customerOrgName = node.displayName |
|
|
|
|
|
|
|
this.dialogOrg = false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取登记信息 初始form表单数据 |
|
|
|
@ -1429,7 +1438,7 @@ export default { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
postapi('/api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId', { customerOrgId }) |
|
|
|
.then(res => { |
|
|
|
if (res.code > -1) { |
|
|
|
if (res.code > -1) { |
|
|
|
this.form.medicalTypeId = res.data.medicalTypeId |
|
|
|
this.form.personnelTypeId = res.data.personnelTypeId |
|
|
|
} |
|
|
|
@ -1489,7 +1498,7 @@ export default { |
|
|
|
changeCustomerOrgId(v) { |
|
|
|
// 始终返回 reslove ,主要用于流程控制 |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
console.log('changeCustomerOrgId', v, this.form.customerOrgParentId) |
|
|
|
console.log('选择单位 changeCustomerOrgId', v, this.form.customerOrgParentId) |
|
|
|
let customerOrgId = "", customerOrgParentId = "" |
|
|
|
if (Array.isArray(v) && v.length > 0) { |
|
|
|
customerOrgId = v[v.length - 1] |
|
|
|
@ -1501,6 +1510,7 @@ export default { |
|
|
|
|
|
|
|
this.getParentCustomerOrgId(v) |
|
|
|
.then(res => { |
|
|
|
console.log('获得顶级单位 getParentCustomerOrgId', res, this.form.customerOrgParentId) |
|
|
|
if (res) { |
|
|
|
customerOrgParentId = res |
|
|
|
// 获取并设置体检次数(个人的固定 "00000000-0000-0000-0000-000000000001" ),单位刷新分组字典 |
|
|
|
@ -1526,7 +1536,7 @@ export default { |
|
|
|
this.changeCustomerOrgGroupId() |
|
|
|
} |
|
|
|
} |
|
|
|
return resolve(customerOrgParentId) |
|
|
|
resolve(customerOrgParentId) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
resolve(customerOrgParentId) |
|
|
|
@ -1544,20 +1554,20 @@ export default { |
|
|
|
let customerOrgParentId = null |
|
|
|
if (Array.isArray(v) && v.length > 0) { |
|
|
|
customerOrgParentId = v[0] |
|
|
|
return resolve(customerOrgParentId) |
|
|
|
resolve(customerOrgParentId) |
|
|
|
} else { |
|
|
|
if (!v) { |
|
|
|
return resolve(customerOrgParentId) |
|
|
|
resolve(customerOrgParentId) |
|
|
|
} else { |
|
|
|
if (v == this.dict.personOrgId) { |
|
|
|
return resolve(v) // 等于个人体检时,则直接返回 |
|
|
|
resolve(v) // 等于个人体检时,则直接返回 |
|
|
|
} else { |
|
|
|
getapi(`/api/app/customer-org/parent/${v}`) |
|
|
|
.then(res => { |
|
|
|
if (res.code > -1) customerOrgParentId = res.data |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
return resolve(customerOrgParentId) |
|
|
|
resolve(customerOrgParentId) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
@ -1574,6 +1584,9 @@ export default { |
|
|
|
this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001" |
|
|
|
return resolve() |
|
|
|
} else { |
|
|
|
console.log('更换单位前顶级单位', this.form.customerOrgParentId) |
|
|
|
console.log('更换单位后顶级单位', customerOrgParentId) |
|
|
|
|
|
|
|
//获取单位体检次数信息 |
|
|
|
getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`) |
|
|
|
.then(res => { |
|
|
|
@ -1581,26 +1594,50 @@ export default { |
|
|
|
// console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data) |
|
|
|
this.customerOrgRegisterList = res.data |
|
|
|
|
|
|
|
if (!this.form.customerOrgRegisterId || this.form.customerOrgRegisterId == "00000000-0000-0000-0000-000000000001") { |
|
|
|
let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数 |
|
|
|
let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数 |
|
|
|
let oldCustomerOrgRegisterId = this.form.customerOrgRegisterId |
|
|
|
|
|
|
|
// 初始化打开页面人员登记页面 |
|
|
|
if (!oldCustomerOrgRegisterId || oldCustomerOrgRegisterId == "00000000-0000-0000-0000-000000000001") { |
|
|
|
if (customerOrgRegisterList.length > 0) { |
|
|
|
this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 更换了顶级单位时,要更换体检次数 |
|
|
|
if (customerOrgParentId != this.form.customerOrgParentId) { |
|
|
|
this.form.customerOrgRegisterId = '' |
|
|
|
if (customerOrgRegisterList.length > 0) { |
|
|
|
this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId} |
|
|
|
|
|
|
|
// 清除单位分组 |
|
|
|
this.patientRegister.customerOrgGroup = [] |
|
|
|
if (this.form.customerOrgRegisterId && this.form.customerOrgRegisterId != '00000000-0000-0000-0000-000000000001') { |
|
|
|
//获取单位分组 |
|
|
|
postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId: this.form.customerOrgRegisterId }) |
|
|
|
.then(res2 => { |
|
|
|
if (res2 && res2.code != -1) { |
|
|
|
this.patientRegister.customerOrgGroup = res2.data; |
|
|
|
} |
|
|
|
}) |
|
|
|
} return |
|
|
|
|
|
|
|
if (!this.form.customerOrgRegisterId) { |
|
|
|
console.log('当前所选单位无可用的体检次数') |
|
|
|
resolve() |
|
|
|
} else { |
|
|
|
// /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId} |
|
|
|
console.log('更换体检次数', this.form.customerOrgRegisterId) |
|
|
|
if (this.form.customerOrgRegisterId && this.form.customerOrgRegisterId != '00000000-0000-0000-0000-000000000001') { |
|
|
|
//获取单位分组 |
|
|
|
postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId: this.form.customerOrgRegisterId }) |
|
|
|
.then(res2 => { |
|
|
|
if (res2.code > -1) { |
|
|
|
this.patientRegister.customerOrgGroup = res2.data; |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
resolve() |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
.catch(err => { |
|
|
|
console.error('获取单位体检次数信息失败', err) |
|
|
|
resolve() |
|
|
|
}) |
|
|
|
} |
|
|
|
@ -2103,7 +2140,7 @@ export default { |
|
|
|
.finally(() => { |
|
|
|
if (message) { |
|
|
|
switch (this.hc_warn_mode) { |
|
|
|
case '1':'' |
|
|
|
case '1': '' |
|
|
|
this.$confirm(`${message} 是否继续?`, "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: " 否 ", |
|
|
|
@ -3448,7 +3485,7 @@ export default { |
|
|
|
//选择单位 |
|
|
|
changeCustomerOrg(v) { |
|
|
|
if (!v) { |
|
|
|
this.customerOrgRegisterList = []; |
|
|
|
this.customerOrgRegisterListCopy = []; |
|
|
|
this.customerOrgRegister = {}; |
|
|
|
this.customerOrgGroups = []; |
|
|
|
} else { |
|
|
|
@ -3456,7 +3493,7 @@ export default { |
|
|
|
`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}` |
|
|
|
).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.customerOrgRegisterList = res.data; |
|
|
|
this.customerOrgRegisterListCopy = res.data; |
|
|
|
if (res.data.length > 0) { |
|
|
|
this.customerOrgRegister = res.data[res.data.length - 1]; |
|
|
|
this.getCustomerOrgGroupCopy(this.customerOrgRegister.id); |
|
|
|
|