|
@@ -61,18 +61,31 @@
|
|
|
<template #main>
|
|
|
<div style="display: flex; flex-wrap: wrap">
|
|
|
<div v-if="queryParams.cardType === 'INFUSION_CARD'">
|
|
|
- <div v-for="item in patientInfusionInfos" :id="item.patInfo.patNo"
|
|
|
- style="margin: 8px 12px; padding: 4px; border: 1px solid red">
|
|
|
- <infusion-card :drug-groups="item.drugGroups" :pat-info="item.patInfo"
|
|
|
- :yz-date="queryParams.executeDate" :print-date="printDate">
|
|
|
+ <div
|
|
|
+ v-for="item in patientInfusionInfos"
|
|
|
+ :id="item.patInfo.patNo"
|
|
|
+ style="margin: 8px 12px; padding: 4px; border: 1px solid red"
|
|
|
+ >
|
|
|
+ <infusion-card
|
|
|
+ :drug-groups="item.drugGroups"
|
|
|
+ :pat-info="item.patInfo"
|
|
|
+ :yz-date="queryParams.executeDate"
|
|
|
+ :print-date="printDate"
|
|
|
+ >
|
|
|
</infusion-card>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- <div v-for="(item,index) in patientInfusionInfos" :id="item.patInfo.patNo+'-'+index"
|
|
|
- style="margin: 8px 12px">
|
|
|
- <bottle-card :drugs="item.bottleCardDrugs" :pat-info="item.patInfo"
|
|
|
- :yz-date="queryParams.executeDate">
|
|
|
+ <div
|
|
|
+ v-for="(item,index) in patientInfusionInfos"
|
|
|
+ :id="item.patInfo.patNo+'-'+index"
|
|
|
+ style="margin: 8px 12px"
|
|
|
+ >
|
|
|
+ <bottle-card
|
|
|
+ :drugs="item.bottleCardDrugs"
|
|
|
+ :pat-info="item.patInfo"
|
|
|
+ :yz-date="queryParams.executeDate"
|
|
|
+ >
|
|
|
</bottle-card>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -84,7 +97,11 @@
|
|
|
<script setup>
|
|
|
import PageLayer from "@/layout/PageLayer.vue";
|
|
|
import {formatDate, getDatetime, getDate} from "@/utils/date";
|
|
|
-import {getPatientBeds, queryInfusionCardOrBottleCard} from '@/api/inpatient/nurse-module/print-infusion-card'
|
|
|
+import {
|
|
|
+ getPatientBeds,
|
|
|
+ queryInfusionCardOrBottleCard,
|
|
|
+ updatePrintStatus
|
|
|
+} from '@/api/inpatient/nurse-module/print-infusion-card'
|
|
|
import InfusionCard from "@/components/inpatient/nurse-module/InfusionCard.vue";
|
|
|
import {ElMessage} from "element-plus";
|
|
|
import {getLodop, initLodop} from "@/utils/c-lodop";
|
|
@@ -153,6 +170,8 @@ const executeQuery = () => {
|
|
|
queryInfusionCardOrBottleCard(queryParams).then(res => {
|
|
|
patientInfusionInfos.value = res
|
|
|
printDate.value = getDatetime()
|
|
|
+ }).catch(() => {
|
|
|
+ patientInfusionInfos.value = []
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -168,24 +187,58 @@ const execPrint = () => {
|
|
|
return
|
|
|
}
|
|
|
let LODOP = getLodop();
|
|
|
+
|
|
|
const prntStyle = `<style>td{border: 1px solid black;font-size: 12px;padding: 2px;}</style>`
|
|
|
- const prntContent = document.getElementById('0421437').innerHTML
|
|
|
- let pagePrint = prntStyle + '<body>' + prntContent + '</body>'
|
|
|
- LODOP.PRINT_INIT('infusionCard')
|
|
|
- LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
|
|
|
- LODOP.ADD_PRINT_TABLE('0mm', '0mm', '210mm', '230mm', pagePrint)
|
|
|
- LODOP.SET_PRINT_STYLE('ItemType', 3)
|
|
|
- // LODOP.PRINT()
|
|
|
- LODOP.PREVIEW()
|
|
|
+
|
|
|
+ let cardLength = patientInfusionInfos.value.length
|
|
|
+ for (let i = 0; i < cardLength; i++) {
|
|
|
+ let info = patientInfusionInfos.value[i]
|
|
|
+ let id = queryParams.cardType === 'INFUSION_CARD'
|
|
|
+ ? info.patInfo.patNo : info.patInfo.patNo + '-' + i
|
|
|
+ const prntContent = document.getElementById(id).innerHTML
|
|
|
+ let pagePrint = prntStyle + '<body>' + prntContent + '</body>'
|
|
|
+ LODOP.PRINT_INIT('infusionCard')
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
|
|
|
+ LODOP.ADD_PRINT_TABLE('0mm', '0mm', '210mm', '230mm', pagePrint)
|
|
|
+ LODOP.SET_PRINT_STYLE('ItemType', 3)
|
|
|
+ LODOP.PRINT()
|
|
|
+ }
|
|
|
+ updatePrintState()
|
|
|
+}
|
|
|
+
|
|
|
+function updatePrintState() {
|
|
|
+ const params = {
|
|
|
+ cardType: queryParams.cardType,
|
|
|
+ orderNos: []
|
|
|
+ }
|
|
|
+
|
|
|
+ patientInfusionInfos.value.forEach(info => {
|
|
|
+ if (params.cardType === 'INFUSION_CARD') {
|
|
|
+ info.drugGroups.forEach(group => {
|
|
|
+ params.orderNos.push(group.mainDrug.actOrderNo)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ info.bottleCardDrugs.forEach(group => {
|
|
|
+ params.orderNos.push(group.actOrderNo)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ nextTick(() => {
|
|
|
+ updatePrintStatus(params).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+// J,S,JS,SJ
|
|
|
// -- 小输液卡
|
|
|
// -- 已打印:print_comment like '%S%'
|
|
|
-// -- 未打印:isnull(print_comment,'')not like '%S%'
|
|
|
+// -- 未打印:isnull(print_comment,'') not like '%S%'
|
|
|
//
|
|
|
-// -- 瓶贴卡
|
|
|
// -- 已打印:print_comment like '%J%'
|
|
|
-// -- 未打印:isnull(print_comment,'')not like '%J%'
|
|
|
+// -- 未打印:isnull(print_comment,'') not like '%J%'
|
|
|
onMounted(() => {
|
|
|
initLodop()
|
|
|
getWardsApi().then(res => {
|