|
|
@ -1491,6 +1491,7 @@ export default { |
|
|
isBuildImage: 'N', |
|
|
isBuildImage: 'N', |
|
|
IsUploadPdf: 'N', |
|
|
IsUploadPdf: 'N', |
|
|
preViewCanPrint: 'N', |
|
|
preViewCanPrint: 'N', |
|
|
|
|
|
BusinessCode:this.form.id, |
|
|
Parameters: [ |
|
|
Parameters: [ |
|
|
{ Name: 'printer', Value: user }, |
|
|
{ Name: 'printer', Value: user }, |
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
@ -1499,8 +1500,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isPreview) { |
|
|
if (isPreview) { |
|
|
// |
|
|
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
|
|
|
|
|
/* |
|
|
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`) |
|
|
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
@ -1512,26 +1512,39 @@ export default { |
|
|
.catch(err => { |
|
|
.catch(err => { |
|
|
this.$message.warning({ showClose: true, message: err}); |
|
|
this.$message.warning({ showClose: true, message: err}); |
|
|
}); |
|
|
}); |
|
|
// }); |
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
toOutShell.ReportTable = res.data; |
|
|
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
|
|
return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
this.$peisAPI.printPre(JSON.stringify(toOutShell)) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
console.log('this.$peisAPI.printPre',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/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`) |
|
|
|
|
|
// .then((res) => { |
|
|
|
|
|
// if (res.code != -1) { |
|
|
|
|
|
// toOutShell.ReportTable = res.data; |
|
|
|
|
|
// console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
|
|
// return this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
this.$peisAPI.print(JSON.stringify(toOutShell)) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
//console.log('this.$peisAPI.print',res) |
|
|
|
|
|
if (JSON.parse(res).code >= 0) { |
|
|
|
|
|
|
|
|
if (JSON.parse(res).code < 0) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: JSON.parse(res).message }); |
|
|
|
|
|
}else{ |
|
|
//更新打印次数 |
|
|
//更新打印次数 |
|
|
return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id]) |
|
|
return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id]) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
if (res.code != -1) { |
|
|
|
|
|
|
|
|
if (res && res.code > -1) { |
|
|
let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id) |
|
|
let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id) |
|
|
if (lfind > -1) { |
|
|
if (lfind > -1) { |
|
|
if (this.patientRegister.prList[lfind].guidePrintTimes) { |
|
|
if (this.patientRegister.prList[lfind].guidePrintTimes) { |
|
|
@ -1540,6 +1553,8 @@ export default { |
|
|
this.patientRegister.prList[lfind].guidePrintTimes = 1; |
|
|
this.patientRegister.prList[lfind].guidePrintTimes = 1; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.warning({ showClose: true, message: res.message}); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(err => { |
|
|
.catch(err => { |
|
|
@ -1551,6 +1566,8 @@ export default { |
|
|
|
|
|
|
|
|
//检验申请 |
|
|
//检验申请 |
|
|
async lisRequest() { |
|
|
async lisRequest() { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: '开发中……'}); |
|
|
|
|
|
/* |
|
|
let isPrintLisRequest = false |
|
|
let isPrintLisRequest = false |
|
|
let res = null |
|
|
let res = null |
|
|
if (this.form.id.length < 1) { |
|
|
if (this.form.id.length < 1) { |
|
|
@ -1590,6 +1607,7 @@ export default { |
|
|
} |
|
|
} |
|
|
//打印检验申请单 |
|
|
//打印检验申请单 |
|
|
this.lisPrint('0003', false); |
|
|
this.lisPrint('0003', false); |
|
|
|
|
|
*/ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//条码打印 |
|
|
//条码打印 |
|
|
@ -1609,6 +1627,7 @@ export default { |
|
|
ReportCode, token, |
|
|
ReportCode, token, |
|
|
isBuildImage: 'N', |
|
|
isBuildImage: 'N', |
|
|
IsUploadPdf: 'N', |
|
|
IsUploadPdf: 'N', |
|
|
|
|
|
BusinessCode:this.form.id, |
|
|
Parameters: [ |
|
|
Parameters: [ |
|
|
{ Name: 'printer', Value: user }, |
|
|
{ Name: 'printer', Value: user }, |
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
@ -1617,45 +1636,38 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isPreview) { |
|
|
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.form.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)); |
|
|
|
|
|
|
|
|
this.$peisAPI.printPre(JSON.stringify(toOutShell)) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
let lres = JSON.parse(res) |
|
|
|
|
|
console.log('this.$peisAPI.printPre',lres) |
|
|
|
|
|
if (lres.code < 0) { |
|
|
|
|
|
console.log('打印检验条码错误',lres.message) |
|
|
|
|
|
this.$message.warning({ showClose: true, message: lres.message }); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(err => { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: err}); |
|
|
|
|
|
|
|
|
.catch((err) => { |
|
|
|
|
|
console.log('打印检验条码错误', err) |
|
|
|
|
|
this.$message.warning({ showClose: true, message: `${err}` }); |
|
|
}); |
|
|
}); |
|
|
// }); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.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)); |
|
|
|
|
|
|
|
|
this.$peisAPI.print(JSON.stringify(toOutShell)) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
let lres = JSON.parse(res) |
|
|
|
|
|
if (res && lres.code > -1) { |
|
|
|
|
|
return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id }) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.warning({ showClose: true, message: lres.message }); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.then(res => { |
|
|
.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.form.id }) |
|
|
|
|
|
|
|
|
if(res && res.code < 0){ |
|
|
|
|
|
this.$message.error({ showClose: true, message: `更新条码打印状态失败,原因:${res.message}` }); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(err => { |
|
|
.catch(err => { |
|
|
this.$message.warning({ showClose: true, message: err}); |
|
|
|
|
|
|
|
|
this.$message.warning({ showClose: true, message: `${err}`}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|