|
|
|
@ -355,7 +355,7 @@ |
|
|
|
</div> |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
<!--人员登记组合项目明细--> |
|
|
|
<!--人员登记组合项目明细 register_asbitem--> |
|
|
|
<div> |
|
|
|
<PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :triggerHeadSave="triggerHeadSave" :refreshFormId="refreshFormId"/> |
|
|
|
</div> |
|
|
|
@ -788,7 +788,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]), |
|
|
|
...mapState(["window","dataTransOpts","dict", "patientRegister", "customerOrg", "projPriv"]), |
|
|
|
|
|
|
|
displayPackage(){ |
|
|
|
|
|
|
|
@ -828,7 +828,7 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//性别(查询) |
|
|
|
//适用性别 |
|
|
|
getapi("/api/app/for-sex").then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
this.dict.forSex = res.data; |
|
|
|
@ -921,30 +921,27 @@ export default { |
|
|
|
// } |
|
|
|
// }); |
|
|
|
|
|
|
|
console.log("dict", this.dict); |
|
|
|
// console.log("dict", this.dict); |
|
|
|
}, |
|
|
|
|
|
|
|
//初始form表单数据 |
|
|
|
async initFormData(){ |
|
|
|
|
|
|
|
// 获取登记信息 初始form表单数据 |
|
|
|
async initFormData(patientRegisterId){ |
|
|
|
|
|
|
|
try { |
|
|
|
// objCopy(this.formInitData, this.form); |
|
|
|
this.peisid = window.sessionStorage.getItem('peisid'); |
|
|
|
if (!this.form.id) { |
|
|
|
objCopy(this.formInit, this.form); |
|
|
|
this.form.organizationUnitId = this.peisid; |
|
|
|
}else{ |
|
|
|
let res = await getapi(`/api/app/patient-register/${this.form.id}`) |
|
|
|
this.form = res.data |
|
|
|
} |
|
|
|
this.initBox(); |
|
|
|
this.getPeoplePhoto(this.form.photo) |
|
|
|
|
|
|
|
// 单位/个人 的分组与套餐处理 |
|
|
|
await this.changeCustomerOrgId(this.form.customerOrgId) |
|
|
|
} catch (error) { |
|
|
|
console.log(`initFormData ${error}`) |
|
|
|
this.peisid = window.sessionStorage.getItem('peisid'); |
|
|
|
if (!patientRegisterId) { |
|
|
|
objCopy(this.formInit, this.form); |
|
|
|
this.form.organizationUnitId = this.peisid; |
|
|
|
}else{ |
|
|
|
let res = await getapi(`/api/app/patient-register/${patientRegisterId}`) |
|
|
|
this.form = res.data |
|
|
|
} |
|
|
|
this.initBox(); |
|
|
|
this.getPeoplePhoto(this.form.photo) |
|
|
|
|
|
|
|
// 单位/个人 的分组与套餐处理 |
|
|
|
await this.changeCustomerOrgId(this.form.customerOrgId) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选择单位 |
|
|
|
@ -1384,12 +1381,22 @@ export default { |
|
|
|
madePrBody(){ |
|
|
|
//赋值 |
|
|
|
let body = deepCopy(this.form); |
|
|
|
|
|
|
|
if (this.form.birthDate && this.form.birthDate != "Invalid date") { |
|
|
|
body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD") |
|
|
|
// console.log('this.form',this.form) |
|
|
|
// console.log('body',body) |
|
|
|
if (this.form.birthDate) { |
|
|
|
try { |
|
|
|
body.birthDate = moment(body.birthDate).format("yyyy-MM-DD") |
|
|
|
} catch (error) { |
|
|
|
// this.form.birthDate != "Invalid date" |
|
|
|
body.birthDate = null |
|
|
|
} |
|
|
|
}else{ |
|
|
|
body.birthDate = null |
|
|
|
} |
|
|
|
if(body.birthDate == "Invalid date") body.birthDate = null |
|
|
|
if(isNaN(body.age)) body.age = null |
|
|
|
// console.log('body',body) |
|
|
|
// Invalid date |
|
|
|
|
|
|
|
delete body.registerManType; |
|
|
|
delete body.id; |
|
|
|
@ -1465,6 +1472,7 @@ export default { |
|
|
|
|
|
|
|
//触发已选组合项目保存 |
|
|
|
this.prAsbOpraOpts.formId = res.data.id |
|
|
|
this.dataTransOpts.tableS.patient_register.id = res.data.id |
|
|
|
let temp = Object.assign({},res.data,{id:''}) |
|
|
|
objCopy(temp,this.form) |
|
|
|
|
|
|
|
@ -1473,6 +1481,7 @@ export default { |
|
|
|
this.prAsbOpraOpts.prAsbSave++ |
|
|
|
},100) |
|
|
|
|
|
|
|
// 用于刷新登记的列表 |
|
|
|
this.refreshRegister(Object.assign({},res.data)) |
|
|
|
|
|
|
|
//一般读身份证照片时,会出现这种情况 |
|
|
|
@ -1882,35 +1891,13 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
// 外部传入参数(登记表id) |
|
|
|
"patientRegisterId":{ |
|
|
|
immediate:true, |
|
|
|
// deep:true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log('watch:patientRegisterId:',newVal,' oldVal:',oldVal) |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.form.id = newVal |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
"form.id":{ |
|
|
|
watch: { |
|
|
|
//人员ID未切换换时 也可以强制刷新数据 |
|
|
|
"dataTransOpts.refresh.patient_register.S":{ |
|
|
|
immediate:true, |
|
|
|
// deep:true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log('watch:form.id:',newVal,' oldVal:',oldVal) |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.initFormData() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//新增或编辑 |
|
|
|
"editTimes"(newVal, oldVal) { |
|
|
|
console.log('editTimes newVal:',newVal,' oldVal:',oldVal) |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.initFormData() |
|
|
|
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`); |
|
|
|
this.initFormData(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|