Kaynağa Gözat

检查批量打印的功能

xiaochan 3 ay önce
ebeveyn
işleme
4a01405266

+ 37 - 0
src/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing.ts

@@ -215,3 +215,40 @@ export function getExamineIllustrate(orderCode, isCheck) {
     params: { orderCode, isCheck },
   });
 }
+
+export interface PrintYshReqVo {
+  title: string;
+  name: string;
+  patNo: string;
+  sex: number;
+  age: string;
+  bedNo: string;
+  homeStreet: string;
+  homeTel: string;
+  responceTypeName: string;
+  reqComment: string;
+  reqTzComment: string;
+  reqOtherResult: string;
+  diagText: string;
+
+  /**
+   * 注意事项
+   */
+  precautions: string;
+
+  items: Item[];
+}
+
+export interface Item {
+  reqNo: number;
+  itemName: string;
+  qrCode?: string;
+}
+
+export function printListReqNo(reqNos: number[]) {
+  return requestV2<PrintYshReqVo[]>({
+    method: "post",
+    url: url + "printListReqNo",
+    data: reqNos,
+  });
+}

+ 139 - 130
src/components/xiao-chan/xc-table/XcTable.vue

@@ -1,266 +1,275 @@
 <template>
-  <div class="layout_container" :style="{height : XEUtils.addUnit(props.height)}">
+  <div
+    class="layout_container"
+    :style="{ height: XEUtils.addUnit(props.height) }"
+  >
     <div class="layout_main layout_el-table">
       <el-table
-          ref="tableRef"
-          :data="tableData"
-          @cell-click="cellClick"
-          style="width: 100%"
-          @selection-change="selectionChange"
-          @row-click="rowClick"
-          @row-dblclick="rowDblClick"
-          highlight-current-row
-          @row-contextmenu="contextmenu"
-          :row-key="props.rowKey"
-          border
-          @select-all="selectAll"
-          :default-expand-all="props.defaultExpandAll"
-          stripe>
-        <slot/>
+        ref="tableRef"
+        :data="tableData"
+        @cell-click="cellClick"
+        style="width: 100%"
+        @selection-change="selectionChange"
+        @row-click="rowClick"
+        @row-dblclick="rowDblClick"
+        highlight-current-row
+        @row-contextmenu="contextmenu"
+        :row-key="props.rowKey"
+        border
+        @select-all="selectAll"
+        :default-expand-all="props.defaultExpandAll"
+        stripe
+      >
+        <slot />
       </el-table>
     </div>
     <div style="height: 8px"></div>
     <el-pagination
-        v-if="props.openPaging"
-        :current-page="pageObject.currentPage"
-        :page-size="pageObject.pageSize"
-        :total="pageObject.total"
-        :layout="props.layout"
-        :small="props.small"
-        :page-sizes="props.pageSizes"
-        @current-change="currentChange"
-        @size-change="sizeChange"/>
+      v-if="props.openPaging"
+      :current-page="pageObject.currentPage"
+      :page-size="pageObject.pageSize"
+      :total="pageObject.total"
+      :layout="props.layout"
+      :small="props.small"
+      :page-sizes="props.pageSizes"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+    />
   </div>
 </template>
 
-<script setup name='XcTable'>
-import {ElMessage} from "element-plus";
-import {BizException, ExceptionEnum} from "@/utils/BizException";
+<script setup name="XcTable">
+import { ElMessage } from "element-plus";
+import { BizException, ExceptionEnum } from "@/utils/BizException";
 import XEUtils from "xe-utils";
 
 const props = defineProps({
   data: {
     type: Object,
-    default: null
+    default: null,
   },
   localData: {
     type: Array,
-    default: null
+    default: null,
   },
   rowKey: {
-    type: String
+    type: String,
   },
   height: {
     type: [Number, String],
-    default: "100%"
+    default: "100%",
   },
   localPaging: {
     type: Boolean,
-    default: false
+    default: false,
   },
   openPaging: {
     type: Boolean,
-    default: true
+    default: true,
   },
   layout: {
     type: String,
-    default: 'total, sizes, prev, pager, next, jumper'
+    default: "total, sizes, prev, pager, next, jumper",
   },
   small: {
     type: Boolean,
-    default: false
+    default: false,
   },
   pageSizes: {
     type: Array,
-    default: [10, 20, 30, 100]
+    default: [10, 20, 30, 100],
   },
   isArray: {
     type: Boolean,
-    default: false
+    default: false,
   },
   defaultExpandAll: {
     type: Boolean,
-    default: true
-  }
-})
+    default: true,
+  },
+});
 const emit = defineEmits([
-  'currentChange',
-  'sizeChange',
-  'rowClick',
-  'rowDblClick',
-  'selectionChange',
-  'rowContextmenu',
-  'cellClick'
-])
+  "currentChange",
+  "sizeChange",
+  "rowClick",
+  "rowDblClick",
+  "selectionChange",
+  "rowContextmenu",
+  "cellClick",
+]);
 
 const cellClick = (row, column, cell, event) => {
-  emit('cellClick', row, column, cell, event)
-}
-
+  emit("cellClick", row, column, cell, event);
+};
 
-const tableRef = ref(null)
+const tableRef = ref(null);
 
 const tableData = computed(() => {
   if (!props.openPaging) {
-    return pageObject.value.data
+    return pageObject.value.data;
   }
   if (props.localPaging) {
-    return props.data.data.slice((props.data.currentPage - 1) * props.data.pageSize, props.data.currentPage * props.data.pageSize)
+    return props.data.data.slice(
+      (props.data.currentPage - 1) * props.data.pageSize,
+      props.data.currentPage * props.data.pageSize
+    );
   } else if (isLocalData.value) {
-    return pageObject.value.data.slice((pageObject.value.currentPage - 1) * pageObject.value.pageSize, pageObject.value.currentPage * pageObject.value.pageSize)
+    return pageObject.value.data.slice(
+      (pageObject.value.currentPage - 1) * pageObject.value.pageSize,
+      pageObject.value.currentPage * pageObject.value.pageSize
+    );
   } else {
-    return pageObject.value.data
+    return pageObject.value.data;
   }
-})
+});
 
-let flag = false // 默认 为全不选
-const selectAll = (selection) => {
-  flag = !flag
+let flag = false; // 默认 为全不选
+const selectAll = selection => {
+  flag = !flag;
   if (!flag) {
     // 在点击了全不选中 需要清空
-    tableRef.value.clearSelection()
-    return
+    tableRef.value.clearSelection();
+    return;
   }
-  let length = selection.length
+  let length = selection.length;
   for (let i = 0; i < length; i++) {
-    let item = selection[i]
+    let item = selection[i];
     if (item.children) {
-      toggleSelection(item.children, flag)
+      toggleSelection(item.children, flag);
     }
   }
-}
+};
 
 const toggleSelection = (row, selected) => {
   if (row) {
     for (let i = 0, len = row.length; i < len; i++) {
-      tableRef.value.toggleRowSelection(row[i], selected)
+      tableRef.value.toggleRowSelection(row[i], selected);
     }
   }
-}
+};
 
-const selectionChange = (selection) => {
-  emit('selectionChange', selection)
-}
+const selectionChange = selection => {
+  emit("selectionChange", selection);
+};
 
 const rowClick = (row, column, event) => {
   nextTick(() => {
-    tableRef.value.toggleRowSelection(row)
+    tableRef.value.toggleRowSelection(row);
     if (row.children) {
       for (let i = 0, len = row.children.length; i < len; i++) {
-        tableRef.value.toggleRowSelection(row.children[i])
+        tableRef.value.toggleRowSelection(row.children[i]);
       }
     }
-  })
-  emit('rowClick', row, column, event);
-}
+  });
+  emit("rowClick", row, column, event);
+};
 
 const rowDblClick = (row, column, event) => {
   nextTick(() => {
-    tableRef.value.toggleRowSelection(row)
+    tableRef.value.toggleRowSelection(row);
     if (row.children) {
       for (let i = 0, len = row.children.length; i < len; i++) {
-        tableRef.value.toggleRowSelection(row.children[i])
+        tableRef.value.toggleRowSelection(row.children[i]);
       }
     }
-  })
-  emit('rowDblClick', row, column, event);
-}
+  });
+  emit("rowDblClick", row, column, event);
+};
 
 /**
  * 取消选择或者多选
  * @param val
  */
 const toggleRowSelection = (...val) => {
-  tableRef.value.toggleRowSelection(...val)
-}
+  tableRef.value.toggleRowSelection(...val);
+};
 
-const currentChange = (val) => {
+const currentChange = val => {
   if (isLocalData.value) {
-    pageObject.value.currentPage = val
+    pageObject.value.currentPage = val;
   } else {
-    props.data.currentPage = val
-    emit('currentChange', val)
+    props.data.currentPage = val;
+    emit("currentChange", val);
   }
-  tableRef.value.setScrollTop(0)
-}
+  tableRef.value.setScrollTop(0);
+};
 
-const sizeChange = (val) => {
+const sizeChange = val => {
   if (isLocalData.value) {
-    pageObject.value.pageSize = val
+    pageObject.value.pageSize = val;
   } else {
-    props.data.pageSize = val
-    props.data.currentPage = 1
+    props.data.pageSize = val;
+    props.data.currentPage = 1;
     if (!props.localPaging) {
-      props.data.total = 0
+      props.data.total = 0;
     }
-    emit('sizeChange', val)
+    emit("sizeChange", val);
   }
-  tableRef.value.setScrollTop(0)
-}
+  tableRef.value.setScrollTop(0);
+};
 
 const clearSelection = (msg = true) => {
-  tableRef.value.clearSelection()
+  tableRef.value.clearSelection();
   if (msg) {
-    ElMessage.success('清空成功。');
+    ElMessage.success("清空成功。");
   }
-
-}
+};
 
 const contextmenu = (row, column, event) => {
-  event.returnValue = false
-  event.preventDefault()
-  emit('rowContextmenu', row)
-}
+  event.returnValue = false;
+  event.preventDefault();
+  emit("rowContextmenu", row);
+};
 
 /**
  * 获取选中的数据
  * @returns {*}
  */
 const getSelectionRows = () => {
-  let data = tableRef.value.getSelectionRows()
+  let data = tableRef.value.getSelectionRows();
   if (data.length > 0) {
     return data;
   }
-  BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择数据")
-}
+  BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择数据");
+};
 
 const pageObject = ref({
   currentPage: 1,
   pageSize: 30,
   total: 0,
-  data: []
-})
+  data: [],
+});
 
-const isLocalData = ref(false)
+const isLocalData = ref(false);
 
 onMounted(() => {
   if (props.data !== null && props.localData !== null) {
-    throw new Error('data 和 localData 不能同时使用')
+    throw new Error("data 和 localData 不能同时使用");
   }
   if (props.localData !== null) {
-    pageObject.value.data = props.localData
-    pageObject.value.total = props.localData.length
-    pageObject.value.currentPage = 1
-    pageObject.value.pageSize = 30
-    isLocalData.value = true
-    watch(() => props.localData, () => {
-      pageObject.value.data = props.localData
-      pageObject.value.total = props.localData.length
-    })
+    pageObject.value.data = props.localData;
+    pageObject.value.total = props.localData.length;
+    pageObject.value.currentPage = 1;
+    pageObject.value.pageSize = 30;
+    isLocalData.value = true;
+    watch(
+      () => props.localData,
+      () => {
+        pageObject.value.data = props.localData;
+        pageObject.value.total = props.localData.length;
+      }
+    );
   } else {
-    pageObject.value = props.data
+    pageObject.value = props.data;
   }
-})
+});
 
 defineExpose({
   clearSelection,
   getSelectionRows,
   toggleRowSelection,
-  tableRef
-})
-
+  tableRef,
+});
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 15 - 6
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/CheckApplicationHistory.vue

@@ -2,9 +2,11 @@
   <xc-table
     :local-data="props.data"
     :final-height="height - 40"
-    layout="total,  prev, pager, next"
+    layout="total, sizes, prev, pager, next, jumper"
     small
+    ref="tableRef"
   >
+    <el-table-column type="selection"></el-table-column>
     <el-table-column
       label="医嘱号"
       prop="actOrderNo"
@@ -55,7 +57,7 @@
   </el-dialog>
 </template>
 
-<script setup name="CheckApplicationHistory">
+<script setup lang="ts">
 import { ref } from "vue";
 import {
   huoQuShengQingXiangQing,
@@ -67,14 +69,15 @@ import PrintCheckTable from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/d
 import JianChaJieGuo from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/JianChaJieGuo.vue";
 import huanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 
-const props = defineProps({
-  data: Object,
-  height: Number,
-});
+const props = defineProps<{
+  data: any[];
+  height: number;
+}>();
 
 const daYingJianChaRef = ref();
 const dialogPrintRef = ref();
 const jianChaJieGuoRef = ref();
+const tableRef = ref();
 
 const vifJianChaJieGuo = ref(false);
 
@@ -105,6 +108,12 @@ async function detailsClick(row) {
     dialogPrintRef.value.fillData(res);
   });
 }
+
+defineExpose({
+  getSelectData() {
+    return tableRef.value.getSelectionRows();
+  },
+});
 </script>
 
 <style lang="scss">

+ 54 - 54
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/NewApplication.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="width: 100%;height: 100%;display: flex;box-sizing: border-box">
+  <div style="width: 100%; height: 100%; display: flex; box-sizing: border-box">
     <div style="width: 220px">
       <el-radio-group v-model="chaZhaoLeiXing" @change="dianJiLeiXingChaXun">
         <el-radio-button :value="1">新申请</el-radio-button>
@@ -7,70 +7,71 @@
         <el-radio-button :value="3">科室模板</el-radio-button>
       </el-radio-group>
       <div style="overflow: auto; height: calc(100% - 30px)">
-        <div v-show="chaZhaoLeiXing === 1" style="width: 100% ; height: 100%">
-          <JyJcTree yjyc="jc" @node-click="nodeClick"/>
+        <div v-show="chaZhaoLeiXing === 1" style="width: 100%; height: 100%">
+          <JyJcTree yjyc="jc" @node-click="nodeClick" />
         </div>
-        <div v-show="chaZhaoLeiXing !== 1" style="height: 100% ; width: 100%">
-          <jc-jy-template :data="templateData"
-                          @del-click="deleteTemplate"
-                          @node-click="rowClick"/>
+        <div v-show="chaZhaoLeiXing !== 1" style="height: 100%; width: 100%">
+          <jc-jy-template
+            :data="templateData"
+            @del-click="deleteTemplate"
+            @node-click="rowClick"
+          />
         </div>
       </div>
     </div>
 
     <div style="flex: 1; width: 0">
-      <JianChaJianYanTable is-check
-                           :data="jcList"
-                           v-model:public-data="jcExtraInformation"
-                           @del-click="deleteRequest"/>
+      <JianChaJianYanTable
+        is-check
+        :data="jcList"
+        v-model:public-data="jcExtraInformation"
+        @del-click="deleteRequest"
+      />
     </div>
   </div>
-
 </template>
 
 <script setup lang="ts">
-import {ref} from "vue";
+import { ref } from "vue";
 import {
   getTemplateGrouping,
-  shanShuJianChaMuBan
+  shanShuJianChaMuBan,
 } from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
 import JyJcTree from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJcTree.vue";
-import {ElMessageBox} from "element-plus";
+import { ElMessageBox } from "element-plus";
 import {
   AddJcParams,
   jcExtraInformation,
   jcList,
-  jcProxy, jyJcRestriction,
+  jcProxy,
+  jyJcRestriction,
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
-import JcJyTemplate
-  from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue";
-import JianChaJianYanTable
-  from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue";
-import {getServerDate} from "@/utils/moment-utils";
+import JcJyTemplate from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue";
+import JianChaJianYanTable from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue";
+import { getServerDate } from "@/utils/moment-utils";
 
 const props = defineProps({
-  returnItem: Function
-})
-
-const config = {value: 'code', label: 'name', children: 'children'}
+  returnItem: Function,
+});
 
-const chaZhaoLeiXing = ref(1)
-const templateData = ref([])
+const config = { value: "code", label: "name", children: "children" };
 
+const chaZhaoLeiXing = ref(1);
+const templateData = ref([]);
 
 const dianJiLeiXingChaXun = () => {
   if (chaZhaoLeiXing.value !== 1) {
-    getTemplateGrouping('3', chaZhaoLeiXing.value).then(res => {
-      templateData.value = res
-    })
+    getTemplateGrouping("3", chaZhaoLeiXing.value).then(res => {
+      templateData.value = res;
+    });
   }
-}
+};
 
-const rowClick = (data) => {
-  if (data.isTheParentNode === '2') {
-    jcProxy.push(data)
+const rowClick = data => {
+  if (data.isTheParentNode === "2") {
+    jcProxy.push(data);
   }
-}
+};
 
 const nodeClick = async (data: any) => {
   let temp: AddJcParams = {
@@ -85,27 +86,26 @@ const nodeClick = async (data: any) => {
     minAgeRestriction: data.minAgeRestriction,
     maxAgeRestriction: data.maxAgeRestriction,
     startTime: await getServerDate(),
-  }
-  jyJcRestriction(temp)
-  jcProxy.push(temp)
-}
+  };
+  jyJcRestriction(temp);
+  jcProxy.push(temp);
+};
 
-const deleteTemplate = (val) => {
-  ElMessageBox.confirm('是否要删除该模板', '提示', {
-    type: 'warning',
-  }).then(() => {
-    shanShuJianChaMuBan(val.code, userStore.deptCode).then(() => {
-      dianJiLeiXingChaXun()
-    })
-  }).catch(() => {
+const deleteTemplate = val => {
+  ElMessageBox.confirm("是否要删除该模板", "提示", {
+    type: "warning",
   })
-}
+    .then(() => {
+      shanShuJianChaMuBan(val.code, userStore.deptCode).then(() => {
+        dianJiLeiXingChaXun();
+      });
+    })
+    .catch(() => {});
+};
 
-const deleteRequest = (index) => {
-  jcProxy.delIndex(index)
-}
+const deleteRequest = index => {
+  jcProxy.delIndex(index);
+};
 </script>
 
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 174 - 0
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckList.vue

@@ -0,0 +1,174 @@
+<script setup lang="ts">
+import { printListReqNo } from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
+import env from "@/utils/setting";
+import { cptSex } from "@/utils/computed";
+import JsBarcode from "jsbarcode";
+import { useVuePrint } from "@/utils/cy-use/useVuePrint";
+
+const data = ref([]);
+
+const [PrintTemplate, printFun] = useVuePrint({
+  extraPageCss: `
+      @page {
+        size: A5 ;
+        margin: 0;
+        padding: 0 ;
+    }
+
+    body,
+    html {
+        font-size: 13px;
+    }
+
+    * {
+        box-sizing: border-box;
+    }
+  `,
+});
+
+function handleQrCode() {
+  data.value.forEach(item => {
+    item.items.forEach(tmp => {
+      const canvas = document.createElement("canvas");
+      JsBarcode(canvas, tmp.reqNo, {
+        lineColor: "#333",
+        width: 2,
+        height: 18,
+        displayValue: false,
+        margin: 0,
+        fontSize: 12,
+      });
+      tmp.qrCode = canvas.toDataURL("image/png");
+    });
+  });
+}
+
+defineExpose({
+  async print(reqs: number[]) {
+    data.value = await printListReqNo(reqs);
+    handleQrCode();
+    await nextTick();
+    await printFun();
+  },
+});
+</script>
+
+<template>
+  <PrintTemplate>
+    <div class="print_jc_list" v-for="item in data">
+      <div
+        style="
+          font-size: 20pt;
+          text-align: center;
+          font-weight: bold;
+          margin-bottom: 6pt;
+        "
+      >
+        {{ env.VITE_HOSPITAL_NAME }}
+      </div>
+      <div style="text-align: center">
+        {{ item.title }}
+      </div>
+      <div style="font-size: 11pt">病人身份:{{ item.responceTypeName }}</div>
+      <div
+        style="
+          border-top: 0.75pt dashed black;
+          border-bottom: 0.75pt solid black;
+          width: 100%;
+          margin-bottom: 2px;
+        "
+      >
+        <table style="border: 0; width: 100%">
+          <tr>
+            <td>住院号:{{ item.inpatientNo }}</td>
+            <td>姓名:{{ item.name }}</td>
+            <td>性别:{{ cptSex(item.sex) }}</td>
+            <td>年龄:{{ item.age }}</td>
+            <td>床号:{{ item.bedNo }}</td>
+          </tr>
+
+          <tr>
+            <td colspan="3">病人住址: {{ item.homeStreet }}</td>
+            <td colspan="2" style="width: 90pt">联系电话:{{ item.homeTel }}</td>
+          </tr>
+        </table>
+      </div>
+      <div class="req_comment-from">
+        <div class="req_comment-item">病室摘要:</div>
+        <div>
+          {{ item.reqComment }}
+        </div>
+      </div>
+      <div class="req_comment-from">
+        <div class="req_comment-item">体征:</div>
+        <div>
+          {{ item.reqTzComment }}
+        </div>
+      </div>
+      <div class="req_comment-from">
+        <div class="req_comment-item">相关辅检结果:</div>
+        <div>
+          {{ item.reqOtherResult }}
+        </div>
+      </div>
+      <div class="req_comment-from">
+        <div class="req_comment-item">临床诊断:</div>
+        <div>
+          {{ item.diagText }}
+        </div>
+      </div>
+
+      <table class="items_table">
+        <tbody>
+          <tr v-for="tmpItem in item.items">
+            <td style="height: 40px; width: 40%">
+              <img :src="tmpItem.qrCode" style="height: 100%; width: 100%" />
+            </td>
+            <td>{{ tmpItem.itemName }}</td>
+          </tr>
+        </tbody>
+      </table>
+
+      <div>
+        <pre>
+        {{ item.precautions }}
+      </pre
+        >
+      </div>
+    </div>
+  </PrintTemplate>
+</template>
+
+<style lang="scss">
+.print_jc_list {
+  background: white;
+  height: 210mm;
+  width: 148mm;
+  padding: 10px;
+  overflow: hidden;
+
+  .req_comment-from {
+    display: flex;
+    width: 100%;
+    padding: 5px;
+  }
+
+  .req_comment-item {
+    width: 20%;
+    text-align: right;
+  }
+
+  .items_table {
+    width: 100%;
+    margin: 0;
+    padding: 0;
+    border-collapse: collapse;
+
+    tr,
+    td {
+      margin: 0;
+      padding: 5px;
+    }
+  }
+}
+</style>

+ 32 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue

@@ -17,12 +17,13 @@
           icon="Search"
           type="primary"
           @click="dianJiChaXunHuanZheJianCha"
-          >查询</el-button
-        >
+          >查询
+        </el-button>
         <el-button type="primary" @click="imageClick">影像</el-button>
       </el-button-group>
       <el-divider direction="vertical"></el-divider>
       <el-button icon="Check" type="success" @click="saveData">保存</el-button>
+      <el-button type="primary" @click="batchPrint">批量打印</el-button>
       <el-button
         icon="Check"
         type="primary"
@@ -41,7 +42,11 @@
         </CyTabPane>
         <CyTabPane :name="1" label="历史记录">
           <template #default="{ height }">
-            <CheckApplicationHistory :data="jianChaShuJu" :height="height" />
+            <CheckApplicationHistory
+              ref="historyTableRef"
+              :data="jianChaShuJu"
+              :height="height"
+            />
           </template>
         </CyTabPane>
         <CyTabPane :name="2" label="结果V2">
@@ -54,6 +59,7 @@
     </div>
   </CyFlex>
   <save-template-inspection ref="saveTemplateRef" />
+  <PrintCheckList ref="printListRef" />
 </template>
 
 <script setup>
@@ -87,11 +93,14 @@ import CyTabs from "@/components/cy/tabs/src/CyTabs";
 import CyTabPane from "@/components/cy/tabs/src/CyTabPane.vue";
 import { CyMessageBox } from "@/utils/cy-message-box";
 import XEUtils from "xe-utils";
+import PrintCheckList from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckList.vue";
+import { ElMessageBox } from "element-plus";
 
 const orderName = ref("");
 const dateRange = ref(null);
 const jianChaShuJu = ref([]);
 const asideTabs = ref(0);
+const printListRef = ref();
 
 // 检查结果
 const jieGuoRefV2 = ref();
@@ -189,7 +198,15 @@ async function baoCunShuJu() {
   data.list = jcList.value;
   data.reqType = 3;
 
-  await baoCunJianYanJianCha(data);
+  const reqs = await baoCunJianYanJianCha(data);
+  ElMessageBox.confirm("是否打印申请单", "提示", {
+    type: "success",
+  })
+    .then(() => {
+      printListRef.value.print(reqs);
+    })
+    .catch(XEUtils.noop);
+
   jcProxy.clear();
   dianJiChaXunHuanZheJianCha();
   asideTabs.value = 1;
@@ -202,6 +219,17 @@ function imageClick() {
   openPatientImage(huanZheXinXi.value.inpatientNo);
 }
 
+const historyTableRef = ref();
+
+function batchPrint() {
+  const data = historyTableRef.value.getSelectData();
+  printListRef.value.print(
+    data.map(i => {
+      return i.reqNo;
+    })
+  );
+}
+
 onChangePatient(dianJiChaXunHuanZheJianCha);
 
 function medicalTechnologyAppointment() {