|
|
|
@ -1402,14 +1402,14 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 根据体检单位ID,获取体检类别 |
|
|
|
getMedicalTypeByOrg(customerOrgId){ |
|
|
|
getMedicalTypeByOrg(customerOrgId) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
postapi('/api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId',{customerOrgId}) |
|
|
|
.then(res => { |
|
|
|
if(res.code > -1){ |
|
|
|
this.form.medicalTypeId = res.data.medicalTypeId |
|
|
|
} |
|
|
|
}) |
|
|
|
postapi('/api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId', { customerOrgId }) |
|
|
|
.then(res => { |
|
|
|
if (res.code > -1) { |
|
|
|
this.form.medicalTypeId = res.data.medicalTypeId |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1494,7 +1494,7 @@ export default { |
|
|
|
// 如果是个人,则清除分组字典 |
|
|
|
if (customerOrgParentId == this.dict.personOrgId) { |
|
|
|
this.patientRegister.customerOrgGroup = [] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.form.customerOrgParentId == this.dict.personOrgId) { |
|
|
|
this.changeMedicalPackageId() |
|
|
|
@ -1932,14 +1932,14 @@ export default { |
|
|
|
|
|
|
|
//提交 |
|
|
|
btnSubmit(formName, msgTip) { |
|
|
|
console.log('btnSubmit,formName,form', formName, JSON.stringify(this.form)) |
|
|
|
//console.log('btnSubmit,formName,form', formName, JSON.stringify(this.form)) |
|
|
|
this.$refs[formName].validate((valid, fields) => { |
|
|
|
// console.log('fields', fields) |
|
|
|
if (!valid) { |
|
|
|
this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message }); |
|
|
|
return false |
|
|
|
} |
|
|
|
console.log('btnSubmit1', formName) |
|
|
|
//console.log('btnSubmit1', formName) |
|
|
|
if (this.form.customerOrgId != this.dict.personOrgId) { |
|
|
|
if (!this.form.customerOrgRegisterId) { |
|
|
|
this.$message.warning({ showClose: true, message: "请填写单位体检次数!" }); |
|
|
|
@ -1974,9 +1974,14 @@ export default { |
|
|
|
} else { |
|
|
|
delete body.id; |
|
|
|
} |
|
|
|
console.log('btnSubmit3', formName) |
|
|
|
//console.log('btnSubmit3', formName) |
|
|
|
// // console.log(`/api/patientregister/createreturninfo`, body); |
|
|
|
postapi(`/api/PatientRegister/CreatePatientRegister`, body) |
|
|
|
|
|
|
|
// 保存前,判断是否有互斥项目 |
|
|
|
this.checkAsbItemHC() |
|
|
|
.then(() => { |
|
|
|
return postapi(`/api/PatientRegister/CreatePatientRegister`, body) |
|
|
|
}) |
|
|
|
.then(async (res) => { |
|
|
|
if (res.code > -1) { |
|
|
|
// 因为 res.data 返回的 isPatientOccupationalDisease 是错误的(因为职业病尚未保存,所以以form里的值为准) |
|
|
|
@ -2035,10 +2040,36 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 检查项目互斥 |
|
|
|
checkAsbItemHC() { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
let asbitemIds = [] |
|
|
|
//console.log('this.dataTransOpts.tableM.register_check_asbitem',this.dataTransOpts.tableM.register_check_asbitem) |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
|
asbitemIds.push(e.asbitemId) |
|
|
|
}); |
|
|
|
|
|
|
|
if (asbitemIds.length == 0) { |
|
|
|
resolve() |
|
|
|
} else { |
|
|
|
postapi('/api/app/AsbitemMutualExclusion/GetAsbitemIsMutualExclusion', { asbitemIds }) |
|
|
|
.then(res => { |
|
|
|
if (res.code > -1) { |
|
|
|
if(res?.data?.message) this.$message.warning({ showClose: true, message: res.data.message }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
resolve() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 保存职业病信息 |
|
|
|
async occUpdate() { |
|
|
|
// 职业病基本信息 |
|
|
|
@ -3312,9 +3343,9 @@ export default { |
|
|
|
//双击选套餐,并确认复制 |
|
|
|
rowDblclick(row) { |
|
|
|
this.packageRowClick(row) |
|
|
|
.then(res => { |
|
|
|
this.copyMedicalPackage() |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
this.copyMedicalPackage() |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//复制套餐(确认选中套餐) |
|
|
|
|