|
|
|
@ -11,6 +11,7 @@ |
|
|
|
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="guidePrintTimes" label="打印" /> |
|
|
|
<el-table-column prop="isLock" label="锁住"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div> |
|
|
|
@ -166,7 +167,16 @@ |
|
|
|
<el-button type="primary" class="btnClass">调整项目</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="guidePrint">打指引单</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="guidePrint('0001', true)">指引单预览</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="guidePrint('0001', true)">指引单预览</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -183,8 +193,8 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 指引单 --> |
|
|
|
<el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800" |
|
|
|
:append-to-body="true" :close-on-click-modal="false"> |
|
|
|
<el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800" :append-to-body="true" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<div>{{ guideMsg }}</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
@ -194,7 +204,7 @@ |
|
|
|
import moment from "moment"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc"; |
|
|
|
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc"; |
|
|
|
|
|
|
|
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; |
|
|
|
import Camera from "../../components/patientRegister/Camera.vue"; |
|
|
|
@ -211,8 +221,8 @@ export default { |
|
|
|
multipleSelection: [], //选中的数据列表 |
|
|
|
dialogVisible: false, |
|
|
|
dialogCamera: false, |
|
|
|
dialogGuide:false, |
|
|
|
guideMsg:'guideMsg', |
|
|
|
dialogGuide: false, |
|
|
|
guideMsg: 'guideMsg', |
|
|
|
tabChoosed: "1", |
|
|
|
formInitData: {}, //体检登记初始表单数据 |
|
|
|
editTimes: 0, |
|
|
|
@ -230,49 +240,73 @@ export default { |
|
|
|
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), |
|
|
|
|
|
|
|
// 打印指引单(isPreview) |
|
|
|
async guidePrint(isPreview){ |
|
|
|
async guidePrint(ReportCode, isPreview) { |
|
|
|
let token = localStorage.getItem('token'); |
|
|
|
let user = localStorage.getItem('user'); |
|
|
|
let toOutShell = ''; |
|
|
|
let toOutShell = { ReportCode, token, |
|
|
|
Parameters: [ |
|
|
|
{ Name: 'printer', Value: user }, |
|
|
|
{ Name: 'hisLog', Value: 'pic/hisLog.jpg' }, |
|
|
|
], |
|
|
|
}; |
|
|
|
let lfind = -1; |
|
|
|
|
|
|
|
|
|
|
|
if(this.multipleSelection.length < 1){ |
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
this.$message.info("请勾选要打印指引单的人员记录!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.multipleSelection.forEach((item,index) =>{ |
|
|
|
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
res.data; |
|
|
|
return this.$electronAPI.printPre('web 传入参数'); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if(res.toLowerCase() == 'success'){ |
|
|
|
//更新打印次数 |
|
|
|
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany',[item.id]) |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res =>{ |
|
|
|
if (res.code != -1) { |
|
|
|
// |
|
|
|
} |
|
|
|
if (isPreview) { |
|
|
|
// |
|
|
|
//this.multipleSelection.forEach((item,index) =>{ |
|
|
|
|
|
|
|
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
toOutShell.ReportTable = res.data; |
|
|
|
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell)); |
|
|
|
return this.$peisAPI.printPre(JSON.stringify(toOutShell)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
// }); |
|
|
|
} else { |
|
|
|
this.multipleSelection.forEach((item, index) => { |
|
|
|
getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.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)); |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.toLowerCase() == 'success') { |
|
|
|
//更新打印次数 |
|
|
|
return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany', [item.id]) |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
lfind = arrayExistObj(this.patientRegister.prList, 'id', item.id) |
|
|
|
if (lfind > -1) { |
|
|
|
if (this.patientRegister.prList[lfind].guidePrintTimes) { |
|
|
|
this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1; |
|
|
|
} else { |
|
|
|
this.patientRegister.prList[lfind].guidePrintTimes = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.$message.warning(err); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(msg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectionChange(val) { |
|
|
|
|