|
|
|
@ -405,7 +405,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
// |
|
|
|
/* |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
postapi( |
|
|
|
`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}` |
|
|
|
@ -430,20 +430,32 @@ export default { |
|
|
|
console.log('打印指引单', err) |
|
|
|
this.$message.warning({ showClose: true, message: err }); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
*/ |
|
|
|
toOutShell.BusinessCode = this.multipleSelection[0].id |
|
|
|
this.$peisAPI.printPre(JSON.stringify(toOutShell)) |
|
|
|
.then(res => { |
|
|
|
if (JSON.parse(res).code < 0) { |
|
|
|
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log('打印指引单', err) |
|
|
|
this.$message.warning({ showClose: true, message: `${err}` }); |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.elProgress.display = true; |
|
|
|
this.elProgress.percentage = 0; |
|
|
|
let resPrintData, resPeisAPI, resPrintTimes; |
|
|
|
|
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
/* |
|
|
|
resPrintData = await postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[i].id}`) |
|
|
|
if (resPrintData.code == -1) continue |
|
|
|
toOutShell.ReportTable = resPrintData.data |
|
|
|
resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
console.log('壳返回结果',resPeisAPI) |
|
|
|
console.log('壳返回结果', resPeisAPI) |
|
|
|
if (JSON.parse(resPeisAPI).code < 0) continue |
|
|
|
resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [this.multipleSelection[i].id]); |
|
|
|
if (resPrintTimes.code == -1) continue |
|
|
|
@ -455,15 +467,33 @@ export default { |
|
|
|
this.tableData[lfind].guidePrintTimes = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
let patientregisterId = this.multipleSelection[i].id |
|
|
|
toOutShell.BusinessCode = patientregisterId |
|
|
|
let resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
if (JSON.parse(resPeisAPI).code < 0) continue |
|
|
|
let resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [patientregisterId]); |
|
|
|
if (resPrintTimes.code == -1) continue |
|
|
|
lfind = arrayExistObj(this.tableData, "id", patientregisterId); |
|
|
|
if (lfind > -1) { |
|
|
|
if (this.tableData[lfind].guidePrintTimes) { |
|
|
|
this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1; |
|
|
|
} else { |
|
|
|
this.tableData[lfind].guidePrintTimes = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
console.log('打印指引单', `${error}`) |
|
|
|
this.$message.warning({ showClose: true, message: error }); |
|
|
|
console.log('打印指引单', error) |
|
|
|
this.$message.warning({ showClose: true, message: `${error}` }); |
|
|
|
} |
|
|
|
|
|
|
|
this.elProgress.percentage = Math.floor( |
|
|
|
((i + 1) * 100) / this.multipleSelection.length |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
this.elProgress.display = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -501,20 +531,20 @@ export default { |
|
|
|
|
|
|
|
//双击事件 |
|
|
|
if (this.DbClick == 1) { //第一次点击的节点和第二次点击的节点id相同 |
|
|
|
this.rowClickRetrieve(row) |
|
|
|
this.rowClickRetrieve(row) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
setTimeout(() => { //300ms内没有第二次点击,执行单击事件 |
|
|
|
if(this.oneClick == 1 && this.DbClick == 0) this.rowClickRetrieve(row) |
|
|
|
if (this.oneClick == 1 && this.DbClick == 0) this.rowClickRetrieve(row) |
|
|
|
}, 300) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
rowClickRetrieve(row) { |
|
|
|
this.oneClick = 0; |
|
|
|
this.DbClick = 0; |
|
|
|
|
|
|
|
|
|
|
|
// 按住了shift键 |
|
|
|
if (this.window.shift) { |
|
|
|
//清除所有选择 |
|
|
|
@ -576,7 +606,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 双击 |
|
|
|
rowDblclick(row){ |
|
|
|
rowDblclick(row) { |
|
|
|
this.rowClick(row) |
|
|
|
this.btnEdit() |
|
|
|
}, |
|
|
|
@ -1063,6 +1093,7 @@ export default { |
|
|
|
this.$message.info("此功能,需要在壳客户端才可运行!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
let token = window.sessionStorage.getItem("token"); |
|
|
|
let user = window.sessionStorage.getItem("user"); |
|
|
|
let toOutShell = { |
|
|
|
@ -1073,11 +1104,11 @@ export default { |
|
|
|
{ Name: "printer", Value: user }, |
|
|
|
{ Name: "hisLog", Value: "pic/hisLog.jpg" }, |
|
|
|
], |
|
|
|
BusinessCode:prId |
|
|
|
}; |
|
|
|
|
|
|
|
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=${prId}` |
|
|
|
) |
|
|
|
@ -1094,8 +1125,20 @@ export default { |
|
|
|
.catch((err) => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
*/ |
|
|
|
this.$peisAPI.printPre(JSON.stringify(toOutShell)) |
|
|
|
.then(res => { |
|
|
|
if (JSON.parse(res).code < 0) { |
|
|
|
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log('打印检验条码错误', err) |
|
|
|
this.$message.warning({ showClose: true, message: `${err}` }); |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
/* |
|
|
|
postapi( |
|
|
|
`/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}` |
|
|
|
) |
|
|
|
@ -1127,6 +1170,27 @@ export default { |
|
|
|
.catch((err) => { |
|
|
|
this.$message.warning(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{ |
|
|
|
return postapi("/api/app/lisrequest/updatelisrequestisprint", { |
|
|
|
operateType: 1, |
|
|
|
patientRegisterId: prId, |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if(res && res.code < 0){ |
|
|
|
this.$message.error({ showClose: true, message: `${res.message}` }); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log('打印检验条码错误', err) |
|
|
|
this.$message.error({ showClose: true, message: `${err}` }); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1146,11 +1210,11 @@ export default { |
|
|
|
{ Name: "printer", Value: user }, |
|
|
|
{ Name: "hisLog", Value: "pic/hisLog.jpg" }, |
|
|
|
], |
|
|
|
BusinessCode:prId |
|
|
|
}; |
|
|
|
|
|
|
|
if (isPreview) { |
|
|
|
//http://140.143.162.39:9529/api/app/printreport/getpacsnoreport?PatientRegisterId=3a0c990e-5756-2dc0-19d5-69a617fe4048 |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
/* |
|
|
|
postapi( |
|
|
|
`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}` |
|
|
|
) |
|
|
|
@ -1167,8 +1231,19 @@ export default { |
|
|
|
.catch((err) => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
*/ |
|
|
|
this.$peisAPI.printPre(JSON.stringify(toOutShell)) |
|
|
|
.then(res => { |
|
|
|
if (JSON.parse(res).code < 0) { |
|
|
|
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log('打印pacs条码错误', err) |
|
|
|
this.$message.warning({ showClose: true, message: `${err}` }); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
/* |
|
|
|
postapi( |
|
|
|
`/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}` |
|
|
|
) |
|
|
|
@ -1199,6 +1274,27 @@ export default { |
|
|
|
.catch((err) => { |
|
|
|
this.$message.warning(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{ |
|
|
|
return postapi("/api/app/lisrequest/updatelisrequestisprint", { |
|
|
|
operateType: 1, |
|
|
|
patientRegisterId: prId, |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if(res && res.code < 0){ |
|
|
|
this.$message.error({ showClose: true, message: `${res.message}` }); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log('打印pacs条码错误', err) |
|
|
|
this.$message.error({ showClose: true, message: `${err}` }); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|