|
|
|
@ -16,10 +16,10 @@ |
|
|
|
<el-button type="primary" class="btnClass" @click="btnDelPr">删除人员</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'上一人')"> |
|
|
|
<el-button type="primary" class="btnClass" @click="btnPrev">上一人</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="btnStep(-1)">上一人</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs,'下一人')"> |
|
|
|
<el-button type="primary" class="btnClass" @click="btnNext">下一人</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="btnStep(1)">下一人</el-button> |
|
|
|
</div> |
|
|
|
<!-- |
|
|
|
<div> |
|
|
|
@ -85,12 +85,13 @@ |
|
|
|
<!-- 体检人员登记 --> |
|
|
|
<el-dialog |
|
|
|
:title="doctorCheck.prBase.id ? '体检人员--编辑' : '体检人员--新增'" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
:visible.sync="dialogWin.PatientRegisterEdit" |
|
|
|
:close-on-click-modal="false" |
|
|
|
fullscreen |
|
|
|
fullscreen @close="closeDialogWinPatientRegisterEdit" |
|
|
|
> |
|
|
|
<!-- :formInitData="formData" --> |
|
|
|
<PatientRegisterEdit style="z-index:30001;" |
|
|
|
:isDoctor="'1'" |
|
|
|
:patientRegisterId = "doctorCheck.prBase.id" |
|
|
|
:editTimes="editTimes" |
|
|
|
:refreshRegister="refreshRegister" |
|
|
|
@ -172,6 +173,7 @@ export default { |
|
|
|
}, |
|
|
|
medicalStartDate:'', //设置体检日期 |
|
|
|
medicalStartDateTemp:'', //设置体检日期 临时体检日期 |
|
|
|
refreshPatientRegisterList:0, // 当有 人员登记有 新增/编辑/删除 时,强制刷新 上一人/下一人的人员列表 |
|
|
|
medicalStartDateDatas:[], // 设置体检日期 的人员信息登记信息,按登记日期排序 (用于上一人,下一人) |
|
|
|
|
|
|
|
dialogVisibleSetStartDate:false, //设置体检日期窗口 |
|
|
|
@ -259,7 +261,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(["window", "dataTransOpts", "dict", "patientRegister", "doctorCheck","sumDoctorCheck"]), |
|
|
|
...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "doctorCheck","sumDoctorCheck"]), |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
@ -275,8 +277,11 @@ export default { |
|
|
|
|
|
|
|
//设置体检日期 |
|
|
|
btnSetStartDate(){ |
|
|
|
this.medicalStartDate = this.medicalStartDateTemp |
|
|
|
this.medicalStartDate = this.medicalStartDateTemp |
|
|
|
this.dialogVisibleSetStartDate = false |
|
|
|
setTimeout(() => { |
|
|
|
this.refreshPatientRegisterList++ |
|
|
|
}, 20); |
|
|
|
if(this.nextTodialogVisible) this.btnAddPr() |
|
|
|
}, |
|
|
|
|
|
|
|
@ -285,12 +290,12 @@ export default { |
|
|
|
// debugger |
|
|
|
if(this.medicalStartDate){ |
|
|
|
//this.formData = Object.assign({},this.formInitData,{medicalStartDate:moment(this.medicalStartDate).format('yyyy-MM-DD')}) |
|
|
|
this.doctorCheck.prBase.id = '' |
|
|
|
this.dialogVisible = true |
|
|
|
this.patientRegister.photo = '' |
|
|
|
setTimeout(() =>{ |
|
|
|
this.editTimes++ |
|
|
|
},100) |
|
|
|
this.dataTransOpts.tableS.patient_register.id = '' |
|
|
|
this.dialogWin.PatientRegisterEdit = true |
|
|
|
setTimeout(() => { |
|
|
|
this.dataTransOpts.refresh.patient_register.S++ |
|
|
|
}, 20); |
|
|
|
this.patientRegister.photo = '' |
|
|
|
}else{ |
|
|
|
this.nextTodialogVisible = true |
|
|
|
this.dialogVisibleSetStartDate = true |
|
|
|
@ -299,11 +304,11 @@ export default { |
|
|
|
|
|
|
|
//人员删除 |
|
|
|
btnDelPr(){ |
|
|
|
if(!this.doctorCheck.prBase.id){ |
|
|
|
if(!this.dataTransOpts.tableS.patient_register.id){ |
|
|
|
this.$message.warning("未选中要删除的人员记录") |
|
|
|
return |
|
|
|
} |
|
|
|
let id = this.doctorCheck.prBase.id |
|
|
|
let id = this.dataTransOpts.tableS.patient_register.id |
|
|
|
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
@ -314,9 +319,12 @@ export default { |
|
|
|
}).then((res) => { |
|
|
|
if(res.code != -1){ |
|
|
|
console.log("操作成功!") |
|
|
|
this.doctorCheckPrBaseInit(); |
|
|
|
let lfind = arrayExistObj(this.medicalStartDateDatas,'id',id) |
|
|
|
if(lfind > -1) this.medicalStartDateDatas.splice(lfind,1) |
|
|
|
// this.doctorCheckPrBaseInit(); |
|
|
|
this.dataTransOpts.tableS.patient_register.id = '' |
|
|
|
setTimeout(() => { |
|
|
|
// 刷新当前界面数据 及 上一人/下一人 列表数据 |
|
|
|
this.closeDialogWinPatientRegisterEdit() |
|
|
|
}, 20); |
|
|
|
} |
|
|
|
}).catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
@ -330,7 +338,7 @@ export default { |
|
|
|
|
|
|
|
//人员编辑 |
|
|
|
btnEditPr() { |
|
|
|
if(!this.doctorCheck.prBase.id){ |
|
|
|
if(!this.dataTransOpts.tableS.patient_register.id){ |
|
|
|
this.$message.warning("未选中要编辑的人员记录") |
|
|
|
return |
|
|
|
} |
|
|
|
@ -339,12 +347,20 @@ export default { |
|
|
|
// this.formData = Object.assign({},this.doctorCheck.prBase) |
|
|
|
|
|
|
|
//console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList) |
|
|
|
this.dialogVisible = true; |
|
|
|
this.editTimes++; //触发表单窗口,数据更新 |
|
|
|
this.dialogWin.PatientRegisterEdit = true; |
|
|
|
setTimeout(() => { |
|
|
|
this.dataTransOpts.refresh.patient_register.S++ |
|
|
|
}, 20); |
|
|
|
}, |
|
|
|
|
|
|
|
// 上一人 |
|
|
|
btnPrev(){ |
|
|
|
// 关闭人员登记 新增/编辑 时,刷新当前界面数据 及 上一人/下一人 列表数据 |
|
|
|
closeDialogWinPatientRegisterEdit(){ |
|
|
|
this.dataTransOpts.refresh.patient_register.S++ // 刷新当前界面数据 |
|
|
|
this.refreshPatientRegisterList++ // 刷新 上一人/下一人 列表 |
|
|
|
}, |
|
|
|
|
|
|
|
// 上(下)一人 step 1 表示下一人, -1 表示上一人 |
|
|
|
btnStep(step){ |
|
|
|
if(!this.medicalStartDate){ |
|
|
|
this.$message.warning("请先设置体检日期") |
|
|
|
return |
|
|
|
@ -354,53 +370,33 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let lfind = -1 |
|
|
|
if(this.doctorCheck.prBase.id){ |
|
|
|
lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id) |
|
|
|
if(lfind == 0){ |
|
|
|
this.$message.warning("已是第一个人") |
|
|
|
return |
|
|
|
} |
|
|
|
if(lfind > - 1) lfind-- |
|
|
|
} |
|
|
|
let lstep = -1 |
|
|
|
if(step && step > 0) lstep = 1 |
|
|
|
|
|
|
|
// 未选中,未找到,显示第一人 |
|
|
|
if(lfind < 0){ |
|
|
|
if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){ |
|
|
|
this.findPR(this.medicalStartDateDatas[0]) |
|
|
|
let lfind = -1 |
|
|
|
let patientRegisterId = this.dataTransOpts.tableS.patient_register.id |
|
|
|
if(patientRegisterId){ |
|
|
|
lfind = arrayExistObj(this.medicalStartDateDatas,'id',patientRegisterId) |
|
|
|
if(lfind > - 1){ |
|
|
|
if(lstep < 0 && lfind == 0){ |
|
|
|
this.$message.warning("已是第一个人") |
|
|
|
return |
|
|
|
}else if(lstep > 0 && lfind == this.medicalStartDateDatas.length - 1){ |
|
|
|
this.$message.warning("已是最后一人") |
|
|
|
return |
|
|
|
} |
|
|
|
lfind = Number(lfind) + Number(lstep) |
|
|
|
this.dataTransOpts.tableS.patient_register.id = this.medicalStartDateDatas[lfind].id |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){ |
|
|
|
this.findPR(this.medicalStartDateDatas[lfind]) |
|
|
|
this.dataTransOpts.tableS.patient_register.id = this.medicalStartDateDatas[0].id |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 下一人 |
|
|
|
btnNext(){ |
|
|
|
if(!this.medicalStartDate){ |
|
|
|
this.$message.warning("请先设置体检日期") |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.medicalStartDateDatas.length == 0) { |
|
|
|
this.$message.warning("当前设置的体检日期,无体检人员信息") |
|
|
|
return |
|
|
|
} |
|
|
|
let lfind = 0 |
|
|
|
if(this.doctorCheck.prBase.id){ |
|
|
|
lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id) |
|
|
|
lfind++ |
|
|
|
} |
|
|
|
|
|
|
|
// 未选中,未找到,显示第一人 |
|
|
|
if(this.medicalStartDateDatas.length > lfind){ |
|
|
|
this.findPR(this.medicalStartDateDatas[lfind]) |
|
|
|
}else{ |
|
|
|
this.$message.warning("已是最后一人") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
this.dataTransOpts.refresh.patient_register.S++ |
|
|
|
}, 20); |
|
|
|
}, |
|
|
|
|
|
|
|
//查询找到相关信息处理 |
|
|
|
@ -590,10 +586,10 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 设置体检日期 |
|
|
|
"medicalStartDate":{ |
|
|
|
immediate:true, |
|
|
|
"refreshPatientRegisterList":{ |
|
|
|
// immediate:true, |
|
|
|
handler(newVal,oldVal){ |
|
|
|
if(newVal){ |
|
|
|
if(newVal != oldVal){ |
|
|
|
let body = { |
|
|
|
customerOrgs: [ |
|
|
|
{ |
|
|
|
|