|
|
|
@ -20,7 +20,7 @@ |
|
|
|
<el-button type="primary" class="commonbutton" @click="btnGetReport">领用报告</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" class="commonbutton" @click="btnUpReport">上传报告</el-button> |
|
|
|
<el-button type="primary" class="commonbutton" @click="btnUpReport">上传Web</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
@ -60,7 +60,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(["dict", "elProgress","dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]), |
|
|
|
...mapState(["dict", "elProgress", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]), |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
@ -113,7 +113,7 @@ export default { |
|
|
|
this.elProgress.display = true; |
|
|
|
this.elProgress.percentage = 0; |
|
|
|
|
|
|
|
let ReportCode = '0005'; |
|
|
|
let ReportCode = '0005'; |
|
|
|
let token = window.sessionStorage.getItem('token'); |
|
|
|
let user = window.sessionStorage.getItem('user'); |
|
|
|
let toOutShell = { |
|
|
|
@ -135,24 +135,34 @@ export default { |
|
|
|
}; |
|
|
|
|
|
|
|
for (let i = 0; i < this.dataTransOpts.tableM.patient_register.length; i++) { |
|
|
|
|
|
|
|
let e = this.dataTransOpts.tableM.patient_register[i]; |
|
|
|
this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.dataTransOpts.tableM.patient_register.length); |
|
|
|
if (e.completeFlag != '3') continue |
|
|
|
|
|
|
|
// 调上传接口 |
|
|
|
try { |
|
|
|
toOutShell.BusinessCode = e.patientRegisterId |
|
|
|
let jsonToOutShell = JSON.stringify(toOutShell) |
|
|
|
console.log('toOutShell',jsonToOutShell) |
|
|
|
let res = await this.$peisAPI.upLoadReportPdf(jsonToOutShell) |
|
|
|
if (JSON.parse(res).code < 0){ |
|
|
|
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); |
|
|
|
}else{ |
|
|
|
// 上传成功 ,更新上传传状态 |
|
|
|
e.isUpload = 'Y' |
|
|
|
console.log('btnUpReport success',JSON.parse(res)) |
|
|
|
if (e.completeFlag == '3') { |
|
|
|
toOutShell.BusinessCode = e.patientRegisterId |
|
|
|
let jsonToOutShell = JSON.stringify(toOutShell) |
|
|
|
console.log('toOutShell', jsonToOutShell) |
|
|
|
let res = await this.$peisAPI.upLoadReportPdf(jsonToOutShell) |
|
|
|
if (JSON.parse(res).code < 0) { |
|
|
|
console.log('$peisAPI.upLoadReportPdf err', res) |
|
|
|
} else { |
|
|
|
// 上传成功 ,更新上传传状态 |
|
|
|
e.isUpload = 'Y' |
|
|
|
console.log('btnUpReport success', JSON.parse(res)) |
|
|
|
} |
|
|
|
} else { |
|
|
|
patientRegisterId = e.patientRegisterId |
|
|
|
let res2 = await postapi('/api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId', { patientRegisterId }) |
|
|
|
if (res2.code == -1) { |
|
|
|
console.log('TransToWebPeis err', res2) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
console.log('error',error) |
|
|
|
console.log('error', error) |
|
|
|
this.$message.warning({ showClose: true, message: error }); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -180,7 +190,7 @@ export default { |
|
|
|
|
|
|
|
///3a0c990e-5756-2dc0-19d5-69a617fe4048 |
|
|
|
let ReportCode = '0005'; |
|
|
|
if(this.dataTransOpts.tableS.patient_register.isPatientOccupationalDisease == 'Y') ReportCode = '0006' |
|
|
|
if (this.dataTransOpts.tableS.patient_register.isPatientOccupationalDisease == 'Y') ReportCode = '0006' |
|
|
|
let token = window.sessionStorage.getItem('token'); |
|
|
|
let user = window.sessionStorage.getItem('user'); |
|
|
|
let toOutShell = { |
|
|
|
@ -212,7 +222,7 @@ export default { |
|
|
|
// let res = await postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.patientRegister.patientRegisterId}`) |
|
|
|
// toOutShell.ReportTable = res.data |
|
|
|
let JSONtoOutShell = JSON.stringify(toOutShell) |
|
|
|
console.log('$peisAPI.printPre',JSONtoOutShell) |
|
|
|
console.log('$peisAPI.printPre', JSONtoOutShell) |
|
|
|
if (isPreview) { |
|
|
|
this.$peisAPI.printPre(JSONtoOutShell) |
|
|
|
.then(res => { |
|
|
|
|