|
|
|
@ -28,7 +28,7 @@ |
|
|
|
<el-button class="commonbutton" type="primary" @click="submit" style="width:80px;">确定</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 10px"> |
|
|
|
<el-button class="commonbutton" type="success" @click="lisPrint('0002', false)" style="width:80px;">条码打印</el-button> |
|
|
|
<el-button class="commonbutton" type="success" @click="lisPrint('0002')" style="width:80px;">条码打印</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 10px"> |
|
|
|
<el-button class="commonbutton" type="danger" @click="patientRegister.lisRequestVisble = false" style="width:80px;">关闭</el-button> |
|
|
|
@ -188,79 +188,54 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//条码打印 |
|
|
|
lisPrint(ReportCode, isPreview) { |
|
|
|
lisPrint(ReportCode) { |
|
|
|
|
|
|
|
if (!this.$peisAPI) { |
|
|
|
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" }); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
let token = window.sessionStorage.getItem("token"); |
|
|
|
let user = window.sessionStorage.getItem("user"); |
|
|
|
let toOutShell = { |
|
|
|
ReportCode, |
|
|
|
isBuildImage:'N', |
|
|
|
IsUploadPdf:'N', |
|
|
|
token, |
|
|
|
IsMoreLabel: 'Y', |
|
|
|
isBuildImage: 'N', |
|
|
|
IsUploadPdf: 'N', |
|
|
|
preViewCanPrint: "N", |
|
|
|
Parameters: [ |
|
|
|
{ Name: "printer", Value: user }, |
|
|
|
{ Name: "hisLog", Value: "pic/hisLog.jpg" }, |
|
|
|
], |
|
|
|
BusinessCode: this.id |
|
|
|
}; |
|
|
|
|
|
|
|
if(!this.$peisAPI) { |
|
|
|
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!"}) |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('this.$peisAPI.print', toOutShell) |
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
//http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295 |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
postapi( |
|
|
|
`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.id}` |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log( |
|
|
|
"JSON.stringify(toOutShell)", |
|
|
|
JSON.stringify(toOutShell) |
|
|
|
); |
|
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message.warning({ showClose: true, message: err}); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
this.$peisAPI.print(JSON.stringify(toOutShell)) |
|
|
|
.then(res => { |
|
|
|
if (JSON.parse(res).code < 0) { |
|
|
|
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); |
|
|
|
} else { |
|
|
|
postapi( |
|
|
|
`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.id}` |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = { lisRequest: res.data }; |
|
|
|
console.log( |
|
|
|
"JSON.stringify(toOutShell)", |
|
|
|
JSON.stringify(toOutShell) |
|
|
|
); |
|
|
|
|
|
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
//更新打印状态 /api/app/lisrequest/updatelisrequestisprint |
|
|
|
// { |
|
|
|
// "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId) |
|
|
|
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// } |
|
|
|
return postapi("/api/app/lisrequest/updatelisrequestisprint", { |
|
|
|
operateType: 1, |
|
|
|
patientRegisterId: this.id, |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res && res.code < 0) { |
|
|
|
this.$message.error({ showClose: true, message: `${res.message}` }); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message.warning({ showClose: true, message: err}); |
|
|
|
// console.log('打印检验条码错误', err) |
|
|
|
this.$message.error({ showClose: true, message: `${err}` }); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
|