|
|
|
@ -245,19 +245,16 @@ export default { |
|
|
|
this.dataTransOpts.tableM.patient_poison.forEach((e, i) => { |
|
|
|
if (!e.poisonId) err = `接害因素,第 ${i + 1} 行,不能为空` |
|
|
|
if (!e.occupationalAbnormalId) e.occupationalAbnormalId = null |
|
|
|
if(this.dataTransOpts.tableS.occModifiable.isOccSummary == 'Y'){ |
|
|
|
if (!e.occupationalAbnormalId) err = `接害因素检查结论,第 ${i + 1} 行,不能为空` |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// 日期为空串的,换成 null |
|
|
|
this.dataTransOpts.tableM.patient_past_medical_history.forEach(e => { |
|
|
|
if (!e.diagnosisDate) e.diagnosisDate = null |
|
|
|
}); |
|
|
|
this.dataTransOpts.tableM.patient_occupational_medical_history.forEach(e => { |
|
|
|
if (!e.diagnosisDate) e.diagnosisDate = null |
|
|
|
}); |
|
|
|
this.dataTransOpts.tableM.patient_occupational_history.forEach(e => { |
|
|
|
if (!e.beginDate) e.beginDate = null |
|
|
|
if (!e.endDate) e.endDate = null |
|
|
|
}); |
|
|
|
if(this.dataTransOpts.tableS.occModifiable.isOccSummary == 'Y'){ |
|
|
|
if(!this.dataTransOpts.tableS.patient_occupational_disease.occupationalAbnormal){ |
|
|
|
err = '职业健康检查总结论不能为空' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return err |
|
|
|
}, |
|
|
|
@ -348,8 +345,10 @@ export default { |
|
|
|
case "7": |
|
|
|
if (this.dataTransOpts.tableS.occModifiable.isOccSummary == 'Y') { |
|
|
|
this.dataTransOpts.tableS.occModifiable.isOccSummary = 'N' |
|
|
|
this.dataTransOpts.tableS.occModifiable.isPatientPoisonsUpdate = 'N' |
|
|
|
} else { |
|
|
|
this.dataTransOpts.tableS.occModifiable.isOccSummary = 'Y' |
|
|
|
this.dataTransOpts.tableS.occModifiable.isPatientPoisonsUpdate = 'Y' |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
|
@ -368,6 +367,19 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 日期为空串的,换成 null |
|
|
|
this.dataTransOpts.tableM.patient_past_medical_history.forEach(e => { |
|
|
|
if (!e.diagnosisDate) e.diagnosisDate = null |
|
|
|
}); |
|
|
|
this.dataTransOpts.tableM.patient_occupational_medical_history.forEach(e => { |
|
|
|
if (!e.diagnosisDate) e.diagnosisDate = null |
|
|
|
}); |
|
|
|
this.dataTransOpts.tableM.patient_occupational_history.forEach(e => { |
|
|
|
if (!e.beginDate) e.beginDate = null |
|
|
|
if (!e.endDate) e.endDate = null |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let body = { |
|
|
|
patientRegisterId: this.dataTransOpts.tableS.patient_register.id, |
|
|
|
patientOccupationalDisease: this.dataTransOpts.tableS.patient_occupational_disease, |
|
|
|
@ -379,7 +391,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
if(this.dataTransOpts.tableS.occModifiable.isPatientPoisonsUpdate == 'Y' || this.dataTransOpts.tableS.occModifiable.isOccSummary == 'Y'){ |
|
|
|
this.dataTransOpts.tableS.occModifiable.isPatientOccupationalDiseaseUpdate == 'Y' |
|
|
|
this.dataTransOpts.tableS.occModifiable.isPatientOccupationalDiseaseUpdate = 'Y' |
|
|
|
} |
|
|
|
this.dataTransOpts.tableS.occModifiable.isPatientOccupationalMedicalHistorysUpdate = this.dataTransOpts.tableS.occModifiable.isPatientPastMedicalHistorysUpdate |
|
|
|
|
|
|
|
@ -390,9 +402,11 @@ export default { |
|
|
|
if (res.code > -1) { |
|
|
|
this.$message.success({ showClose: true, message: "操作成功!" }) |
|
|
|
this.dataTransOpts.tableS.patient_occupational_disease.patientRegisterId = this.dataTransOpts.tableS.patient_register.id |
|
|
|
if(this.dataTransOpts.tableS.occModifiable.isOccSummary == 'Y'){ |
|
|
|
return postapi('/api/app/OccupationalDisease/UpdateOccupationalDiseaseInspectionConclusion', this.dataTransOpts.tableS.patient_occupational_disease) |
|
|
|
}else{ |
|
|
|
this.$message.warning({ showClose: true, message: res.message }) |
|
|
|
this.dataTransOpts.plus.OccDisease++ |
|
|
|
} |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
if (res && res.code > -1) { |
|
|
|
|