Browse Source

删除360视图,添加腕带打印

lighter 1 year ago
parent
commit
a19d65147f
2 changed files with 49 additions and 17 deletions
  1. 0 8
      src/api/inpatient/patient.js
  2. 49 9
      src/views/medical-insurance/inpatient/Home.vue

+ 0 - 8
src/api/inpatient/patient.js

@@ -96,14 +96,6 @@ export function genDismissActOrder(data) {
     })
 }
 
-export function getEmpiViewUrl(id) {
-    return request({
-        url: '/powersi/getEmpiViewUrl',
-        method: 'get',
-        params: {id},
-    })
-}
-
 export function receiveAndRecalculateCost(data) {
     return request({
         url: '/patient/receiveAndRecalculateCost',

+ 49 - 9
src/views/medical-insurance/inpatient/Home.vue

@@ -13,8 +13,8 @@
       <el-button type="primary" icon="Postcard" @click="checkIdCard" style="margin-left: 8px">身份信息</el-button>
       <el-button type="success" icon="Document" @click="getRegInfo">登记信息</el-button>
       <el-button type="primary" icon="Tickets" @click="beforeGetTreatinfo">待遇检查</el-button>
-      <el-button type="danger" icon="MagicStick" @click="toEmpiView">360视图</el-button>
       <el-button icon="Document" @click="openEmr">电子病历</el-button>
+      <el-button @click="printWristStrap">打印腕带</el-button>
       <bloodSugar :pat-no="patient.inpatientNo" :times="patient.admissTimes" :old-button="false"/>
     </template>
     <template #aside>
@@ -41,7 +41,7 @@
 <script setup>
 import {computed, reactive, ref} from 'vue'
 import store from '@/store'
-import {getEmpiViewUrl, getPatientInfo} from '@/api/inpatient/patient'
+import {getPatientInfo} from '@/api/inpatient/patient'
 import {nullPatient} from '@/utils/validate'
 import {getGreatestRole} from '@/utils/permission'
 import {baseinfo, setBaseinfo} from '@/data/inpatient'
@@ -58,6 +58,7 @@ import Treatmentinfo from "@/components/medical-insurance/treatmentinfo/Index.vu
 import Insuinfo from "@/components/medical-insurance/insuinfo/Index.vue";
 import {ElMessage} from "element-plus";
 import {getDatetime} from "@/utils/date";
+import {getLodop, initLodop} from "@/utils/c-lodop";
 
 
 const search = initSearchParam()
@@ -99,13 +100,6 @@ const getRegInfo = () => {
   showRegisterInfo.value = true
 }
 
-const toEmpiView = () => {
-  if (nullPatient()) return
-  getEmpiViewUrl(patient.value.inpatientNo).then((res) => {
-    window.open(res, '_blank')
-  })
-}
-
 const showIdCardImg = ref(false)
 const checkIdCard = () => {
   if (nullPatient()) return
@@ -176,4 +170,50 @@ const checkTreatmentinfos = (row) => {
   showPsnInsuinfo.value = false
   showTreatmentinfos.value = true
 }
+
+const childrenDepts = ['1040000','1040100', '1700015']
+
+function printWristStrap() {
+  if (nullPatient()) return
+  if (childrenDepts.indexOf(patient.value.smallDept) !== -1) {
+    printChildWristStrap()
+  } else {
+    printNormalWristStrap()
+  }
+}
+
+let LODOP;
+function printNormalWristStrap() {
+  LODOP = getLodop();
+  LODOP.PRINT_INIT('inpatient_info2')
+  LODOP.SET_PRINTER_INDEX('DASCOM DL-520Z')
+  LODOP.SET_PRINT_PAGESIZE(2, 0, 0, '')
+  LODOP.SET_PRINT_STYLE('FontSize', 9)
+  LODOP.SET_PRINT_STYLE('Bold', 1)
+  LODOP.ADD_PRINT_BARCODE('7mm', '27mm', '18.5mm', '18.5mm', 'QRCode', patient.value.inpatientNo)
+  LODOP.ADD_PRINT_TEXT('8mm', '45mm', '220mm', '7mm',
+      `姓名:${patient.value.name} / 性别:${patient.value.sexName} / 年龄:${patient.value.age}`)
+  LODOP.ADD_PRINT_TEXT('14mm', '45mm', '220mm', '7mm', `入院科室:${patient.value.smallDeptName}`)
+  LODOP.ADD_PRINT_TEXT('20mm', '45mm', '220mm', '7mm', `紧急联系人:${patient.value.contactPhone}`)
+  LODOP.PREVIEW()
+}
+
+function printChildWristStrap() {
+  LODOP = getLodop()
+  LODOP.PRINT_INIT('inpatient_info3')
+  LODOP.SET_PRINTER_INDEX('DASCOM DL-520Z')
+  LODOP.SET_PRINT_PAGESIZE(2, 0, 0, '')
+  LODOP.SET_PRINT_STYLE('FontSize', 6)
+  LODOP.SET_PRINT_STYLE('Bold', 1)
+  LODOP.ADD_PRINT_BARCODE('10mm', '32mm', '15mm', '15mm', 'QRCode', patient.value.inpatientNo)
+  LODOP.ADD_PRINT_TEXT('11mm', '45mm', '50mm', '3mm',
+      `姓名:${patient.value.name} / 性别:${patient.value.sexName} / 年龄:${patient.value.age}`)
+  LODOP.ADD_PRINT_TEXT('14.75mm', '45mm', '50mm', '3mm', `入院科室:${patient.value.smallDeptName}`)
+  LODOP.ADD_PRINT_TEXT('18.5mm', '45mm', '50mm', '3mm', `紧急联系人:${patient.value.contactPhone}`)
+  LODOP.PREVIEW()
+}
+
+onMounted(() => {
+  initLodop()
+})
 </script>