Browse Source

特殊药品打印处方,医技科室orderNo以及时间问题

xiaochan 6 days ago
parent
commit
12d68d9da0

+ 1 - 1
public/static/printcss/auto-print.css

@@ -2,7 +2,7 @@
     @page {
         size: auto;
         margin: 0;
-        padding: 0 ;
+        padding: 0;
     }
 
     body,

+ 0 - 1
src/api/public-api.js

@@ -1,5 +1,4 @@
 import request from "@/utils/request";
-import axios from "axios";
 
 export function getRenYuan(code, deptCode = "") {
   return request({

+ 9 - 0
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.ts

@@ -1,4 +1,5 @@
 import requestV2 from "../../utils/request-v2";
+import { PrintOrderVo } from "@/ts-type/print-poisonous-hemp";
 
 const url = "/yiZhuLuRu";
 
@@ -358,3 +359,11 @@ export function getYpZdGroup() {
     method: "get",
   });
 }
+
+export function printPoisonousHemp(data) {
+  return requestV2<PrintOrderVo>({
+    url: url + "/printPoisonousHemp",
+    method: "post",
+    data,
+  });
+}

+ 0 - 1
src/components/hui-zhen-da-ying/PrintTheConsultationForm.vue

@@ -110,7 +110,6 @@
           v-model="huanZheXinXi.hzComment"
           maxlength="1100"
           :readonly="laiYuan === 2"
-          onkeydown="if(event.keyCode === 13)event.returnValue = false;"
           style="
             height: 246.75pt;
             margin: 3.75pt 0 0;

+ 424 - 0
src/components/print-poisonous-hemp/PrintPoisonousHempTemplate.vue

@@ -0,0 +1,424 @@
+<script setup lang="ts">
+import { DrugData, PrintOrderVo } from "@/ts-type/print-poisonous-hemp";
+import JsBarcode from "jsbarcode";
+import env from "@/utils/setting";
+import { cptSex } from "@/utils/computed";
+import Pr from "@/assets/prescription.png";
+import { useVuePrint } from "@/utils/cy-use/useVuePrint";
+
+const props = defineProps<{
+  data: PrintOrderVo;
+}>();
+
+const drugFlag = [
+  { code: "1", name: "毒", color: "red" },
+  { code: "2", name: "麻", color: "red" },
+  { code: "3", name: "精一", color: "red" },
+  { code: "4", name: "精二" },
+  { code: "6", name: "终止妊娠" },
+];
+
+const state = reactive({
+  data: {} as PrintOrderVo,
+  // 重新整理一下数据
+  tempData: {},
+  qrCodeImage: "",
+  tagName: "",
+  printTime: "",
+  currentDrugData: [] as DrugData[],
+  pageBackground: "#fff",
+  collapses: drugFlag.map(i => {
+    return `print-poisonous-hemp-${i.code}`;
+  }),
+});
+
+const [PrintTemplate, printFunc] = useVuePrint({
+  hidden: false,
+  extraPageCss: `
+
+  @media print {
+    @page {
+        size: A5;
+        margin: 0;
+        padding: 0;
+    }
+
+    body,
+    html {
+        height: max-content;
+    }
+
+    * {
+        box-sizing: border-box;
+    }
+
+}
+  `,
+});
+
+async function printPrescription(red: boolean) {
+  const tmp = [];
+  state.currentDrugData = [];
+  const canvas = document.createElement("canvas");
+
+  drugFlag.forEach(item => {
+    let tmpDrug = [];
+    if (red && item.code !== "6") {
+      tmpDrug = state.data?.data?.["drug" + item.code]?.data || [];
+    } else if (!red && item.code === "6") {
+      tmpDrug = state.data?.data?.["drug" + item.code]?.data || [];
+    }
+
+    if (tmpDrug.length > 0) {
+      tmpDrug.forEach(i => {
+        JsBarcode(canvas, i.id, {
+          lineColor: "#333",
+          width: 1,
+          height: 12,
+          margin: 0,
+          fontSize: 10,
+          displayValue: false,
+        });
+        i.qrCode = canvas.toDataURL("image/png");
+      });
+      tmp.push(...tmpDrug);
+    }
+  });
+  if (tmp.length > 0) {
+    state.currentDrugData = tmp;
+    await nextTick();
+    printFunc();
+  }
+}
+
+onMounted(() => {
+  state.data = props.data;
+});
+
+defineExpose({
+  print,
+});
+</script>
+
+<template>
+  <div class="layout_container layout-horizontal print-poisonous-hemp">
+    <aside style="width: 220px">
+      <el-collapse v-model="state.collapses">
+        <el-collapse-item
+          v-for="item in drugFlag"
+          :title="item.name"
+          :name="`print-poisonous-hemp-${item.code}`"
+        >
+          <div
+            class="print-poisonous-hemp__tag"
+            v-for="drugItem in state.data?.data?.['drug' + item.code]?.data ||
+            []"
+          >
+            {{ drugItem.orderName }}
+          </div>
+        </el-collapse-item>
+      </el-collapse>
+    </aside>
+    <div class="layout_main">
+      <el-button @click="printPrescription(true)">打印红色处方</el-button>
+      <el-button @click="printPrescription(false)">打印终止妊娠</el-button>
+      <PrintTemplate>
+        <template v-for="(item, index) in state.currentDrugData">
+          <div
+            style="
+              display: flex;
+              flex-direction: column;
+              height: 210mm;
+              width: 148mm;
+            "
+          >
+            <div style="display: flex; justify-content: space-between">
+              <div>
+                <img :src="item.qrCode" style="width: 190px" :alt="item.id" />
+              </div>
+              <div style="text-align: center">
+                <div>
+                  {{ env.VITE_HOSPITAL_NAME }}
+                </div>
+                <div>处方笺</div>
+              </div>
+              <div>
+                <div style="border: 1px solid red; color: red">
+                  {{ item.printName }}
+                </div>
+              </div>
+            </div>
+            <div class="print-poisonous-hemp__header-table">
+              <table>
+                <tbody>
+                  <tr>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      姓名:
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-left">
+                      {{ state.data.name }}
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      性别:
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-left">
+                      {{ cptSex(state.data.gender) }}
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      年龄:
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-left">
+                      {{ state.data.age }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      住院号:
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-left">
+                      {{ state.data.inpatientNo }}
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      科室:
+                    </td>
+                    <td
+                      colspan="3"
+                      class="print-poisonous-hemp__tag--text-left"
+                    >
+                      {{ state.data.wardName }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      处方类型:
+                    </td>
+                    <td>
+                      {{ state.tagName }}
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      打印时间:
+                    </td>
+                    <td colspan="3">
+                      {{ state.printTime }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      身份证:
+                    </td>
+                    <td>
+                      {{ state.data.socialNo }}
+                    </td>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      病人类别:
+                    </td>
+                    <td colspan="3">
+                      {{ state.data.responceName }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      代办人:
+                    </td>
+                    <td class="print-poisonous-hemp__tag--underline"></td>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      代办人身份证:
+                    </td>
+                    <td
+                      class="print-poisonous-hemp__tag--underline"
+                      colspan="3"
+                    ></td>
+                  </tr>
+                  <tr>
+                    <td class="print-poisonous-hemp__tag--text-right">
+                      诊断:
+                    </td>
+                    <td colspan="5">
+                      {{ state.data.diagnose }}
+                    </td>
+                  </tr>
+                </tbody>
+              </table>
+            </div>
+            <div
+              style="flex: 1; height: 0; display: flex; flex-direction: column"
+            >
+              <div style="padding-top: 6pt">
+                <img :src="Pr" />
+              </div>
+              <div class="print-poisonous-hemp__body-table">
+                <table>
+                  <tbody>
+                    <tr>
+                      <td colspan="3">
+                        1&nbsp;&nbsp;{{ item.orderName }}({{
+                          item.drugSpecification
+                        }})
+                      </td>
+                      <td style="text-align: center">X</td>
+                      <td class="print-poisonous-hemp__tag--text-right">
+                        {{ item.drugQuan }}{{ item.packUnitName }}
+                      </td>
+                    </tr>
+                    <tr>
+                      <td colspan="2"></td>
+                      <td>用法:{{ item.dose }}{{ item.doseUnitName }}</td>
+                      <td style="text-align: center">{{ item.frequName }}</td>
+                      <td class="print-poisonous-hemp__tag--text-right">
+                        {{ item.supplyName }}
+                      </td>
+                    </tr>
+                    <tr>
+                      <td
+                        colspan="5"
+                        style="padding: 5pt 0"
+                        class="print-poisonous-hemp__tag--text-right"
+                      >
+                        <div style="display: flex">
+                          <div style="flex: 1">使用批号:</div>
+                          <div
+                            style="width: 20%"
+                            class="print-poisonous-hemp__tag--underline"
+                          ></div>
+                        </div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td
+                        colspan="5"
+                        style="padding: 5pt 0"
+                        class="print-poisonous-hemp__tag--text-right"
+                      >
+                        <div style="display: flex">
+                          <div style="flex: 1">余液丢弃</div>
+                          <div
+                            style="width: 20%"
+                            class="print-poisonous-hemp__tag--underline"
+                          ></div>
+                          <div>mg按医疗垃圾处理</div>
+                        </div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td
+                        colspan="5"
+                        style="padding: 5pt 0"
+                        class="print-poisonous-hemp__tag--text-right"
+                      >
+                        <div style="display: flex">
+                          <div style="flex: 1"></div>
+                          <div
+                            style="width: 20%"
+                            class="print-poisonous-hemp__tag--underline"
+                          ></div>
+                          <div>处理人</div>
+                        </div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td
+                        colspan="5"
+                        style="padding: 5pt 0"
+                        class="print-poisonous-hemp__tag--text-right"
+                      >
+                        <div style="display: flex">
+                          <div style="flex: 1"></div>
+                          <div
+                            style="width: 20%"
+                            class="print-poisonous-hemp__tag--underline"
+                          ></div>
+                          <div>核对人</div>
+                        </div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td colspan="5">----(以下空白)----</td>
+                    </tr>
+                  </tbody>
+                </table>
+              </div>
+            </div>
+            <div class="print-poisonous-hemp__foot">
+              <table>
+                <tr>
+                  <td class="print-poisonous-hemp__tag--text-right">医师:</td>
+                  <td class="print-poisonous-hemp__tag--underline"></td>
+                  <td class="print-poisonous-hemp__tag--text-right">
+                    发出批号:
+                  </td>
+                  <td class="print-poisonous-hemp__tag--underline"></td>
+                </tr>
+                <tr>
+                  <td class="print-poisonous-hemp__tag--text-right">
+                    审核药师:
+                  </td>
+                  <td class="print-poisonous-hemp__tag--underline"></td>
+                  <td class="print-poisonous-hemp__tag--text-right">
+                    核对药师:
+                  </td>
+                  <td class="print-poisonous-hemp__tag--underline"></td>
+                </tr>
+                <tr>
+                  <td class="print-poisonous-hemp__tag--text-right">
+                    调配药师:
+                  </td>
+                  <td class="print-poisonous-hemp__tag--underline"></td>
+                  <td class="print-poisonous-hemp__tag--text-right">
+                    发药药师:
+                  </td>
+                  <td class="print-poisonous-hemp__tag--underline"></td>
+                </tr>
+              </table>
+            </div>
+          </div>
+        </template>
+      </PrintTemplate>
+    </div>
+  </div>
+</template>
+
+<style lang="scss">
+.print-poisonous-hemp__tag {
+  padding: 10px;
+  cursor: pointer;
+  border: 1px solid var(--el-border-primary-light-9);
+}
+
+.print-poisonous-hemp__body-table {
+  flex: 1;
+  height: 0;
+
+  table {
+    table-layout: fixed;
+    width: 100%;
+  }
+}
+
+.print-poisonous-hemp__tag--text-right {
+  text-align: right;
+}
+
+.print-poisonous-hemp__tag--underline {
+  border-bottom: 1px solid #000;
+}
+
+.print-poisonous-hemp__tag--text-left {
+  text-align: left;
+}
+
+.print-poisonous-hemp__header-table {
+  table {
+    width: 100%;
+    border-bottom: 1px solid #000;
+  }
+}
+
+.print-poisonous-hemp__foot {
+  table {
+    width: 100%;
+    table-layout: fixed;
+  }
+
+  border-top: 1px solid #000;
+}
+</style>

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

@@ -30,7 +30,7 @@
       :page-size="pageObject.pageSize"
       :total="pageObject.total"
       :layout="props.layout"
-      :size="props.small ? 'small' : props.small"
+      :size="props.small"
       :page-sizes="props.pageSizes"
       @current-change="currentChange"
       @size-change="sizeChange"
@@ -72,8 +72,8 @@ const props = defineProps({
     default: "total, sizes, prev, pager, next, jumper",
   },
   small: {
-    type: Boolean,
-    default: false,
+    type: String,
+    default: "small",
   },
   pageSizes: {
     type: Array,

+ 25 - 1
src/components/xmlr/components/HeaderInfo.vue

@@ -3,8 +3,14 @@ import { key, ProjectInput } from "@/components/xmlr/index";
 import { getListOfDischargedPatients } from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import { useDialog } from "@/components/cy/CyDialog/index";
 import DisPatientList from "@/components/xmlr/dialog/DisPatientList.vue";
+import { stringIsBlank } from "@/utils/blank-utils";
+import { xcMessage } from "@/utils/xiaochan-element-plus";
+import router from "@/router";
+import { windowBtoaAndAtob } from "@/utils/public";
 
-const { store, mutation, medicalTechnology } = inject(key) as ProjectInput;
+const { store, mutation, medicalTechnology, props } = inject(
+  key
+) as ProjectInput;
 
 const infoKeyValue = [
   { key: "admissTimes", value: "次数" },
@@ -33,6 +39,21 @@ async function getDisList() {
     mutation.getPatInfo(res.admissTimes);
   });
 }
+
+function openOrderPage() {
+  //  33 医技科室
+  if (stringIsBlank(store.patInfo.inpatientNo)) {
+    return xcMessage.error("请先查询患者信息");
+  }
+  router.push({
+    name: "yiZhuLuRu",
+    query: {
+      huiZhen: windowBtoaAndAtob.btoa({
+        inpatientNo: store.patInfo.inpatientNo,
+      }),
+    },
+  });
+}
 </script>
 
 <template>
@@ -52,6 +73,9 @@ async function getDisList() {
       >查询
     </el-button>
     <el-button type="info" @click="getDisList">出院</el-button>
+    <el-button v-if="props.openOrderPage" @click="openOrderPage"
+      >医嘱录入
+    </el-button>
     <el-button
       v-if="!medicalTechnology"
       type="danger"

+ 6 - 4
src/components/xmlr/components/TableFee.vue

@@ -12,7 +12,7 @@ import { receiveAndRecalculateCost } from "@/api/inpatient/patient";
 import GenerateMedicineReturnOrder from "@/components/medical-insurance/medicine-return-order/GenerateMedicineReturnOrder.vue";
 import { useUserStore } from "@/pinia/user-store";
 
-const { store, mutation, feeTableRef, medicalTechnology } = inject(
+const { store, props, mutation, feeTableRef, medicalTechnology } = inject(
   key
 ) as ProjectInput;
 const userInfo = useUserStore().userInfo;
@@ -140,9 +140,11 @@ function rcvrcalcost() {
           <el-button type="danger" icon="Delete" @click="refund"
             >退费
           </el-button>
-          <el-button @click="mutation.handlePrintPrescriptionSign"
-            >打印处方签</el-button
-          >
+          <el-button
+            @click="mutation.handlePrintPrescriptionSign()"
+            v-if="props.orderNo === 3"
+            >打印处方签
+          </el-button>
           <GenerateMedicineReturnOrder v-if="!medicalTechnology" />
         </el-form-item>
       </el-form>

+ 1 - 1
src/components/xmlr/components/projectInput/FeeInput.vue

@@ -74,7 +74,7 @@ function handleSave() {
     orderNo: props.orderNo,
     ledgerSn: store.patInfo.ledgerSn,
     receiptNo: receiptNo.value,
-    chargeDate: dayjs(store.chargeDate).format("YYYY-MM-DD hh:mm:ss"),
+    chargeDate: dayjs(store.chargeDate).format("YYYY-MM-DD HH:mm:ss"),
   };
 
   if (needRule(ruleName.财务)) {

+ 179 - 7
src/components/xmlr/index.ts

@@ -43,6 +43,8 @@ export type XmlrProps = {
   patNo?: string;
   orderNo: number;
   medicalTechnology?: boolean;
+  // 是否打开医嘱录入页面
+  openOrderPage?: boolean;
 };
 
 export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
@@ -162,14 +164,20 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
       tmp[9] = `${store.feeTotal} 元`;
       return tmp;
     },
-    async handlePrintPrescriptionSign() {
-      const data = feeTableRef.value.getSelectionRows();
-      if (data.length === 0) {
-        return;
+    async handlePrintPrescriptionSign(value = []) {
+      let filter = [];
+      if (value.length === 0) {
+        const data = feeTableRef.value.getSelectionRows();
+        if (data.length === 0) {
+          return;
+        }
+        filter = XEUtils.filter(data, item => {
+          return item.serial !== "00";
+        });
+      } else {
+        filter = value;
       }
-      const filter = XEUtils.filter(data, item => {
-        return item.serial !== "00";
-      });
+
       if (filter.length === 0) {
         return;
       }
@@ -205,6 +213,170 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
 
   onMounted(async () => {
     await mutation.setPatNo(props.patNo);
+    if (isDev) {
+      mutation.handlePrintPrescriptionSign([
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "1",
+          orderNo: 20381003,
+          chargeCodeMx: "01134",
+          execDept: "呼吸与危重症医学科",
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 1.49,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "0.9%氯化钠注射液(玻璃瓶)",
+          billItemName: "西药费",
+          chargeDate: "2025-08-11 09:58:50",
+          oriDetailSn: null,
+          genTime: "2025-08-11 10:41:41",
+          serial: "01",
+          descriptions: " 4.5g 500ml /瓶",
+        },
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "34",
+          orderNo: 20381021,
+          chargeCodeMx: "01191",
+          execDept: null,
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 3.25,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "氯化钠注射液(湖南科伦)",
+          billItemName: "西药费",
+          chargeDate: "2025-08-15 08:00:00",
+          oriDetailSn: null,
+          genTime: "2025-08-15 16:10:48",
+          serial: "01",
+          descriptions: "0.9% 250ml /袋",
+        },
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "36",
+          orderNo: 20381023,
+          chargeCodeMx: "01192",
+          execDept: "呼吸与危重症医学科",
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 3.04,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "氯化钠注射液(湖南科伦)",
+          billItemName: "西药费",
+          chargeDate: "2025-08-15 08:56:14",
+          oriDetailSn: null,
+          genTime: "2025-08-15 16:10:48",
+          serial: "01",
+          descriptions: "0.9% 100ml /袋",
+        },
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "35",
+          orderNo: 20381021,
+          chargeCodeMx: "01191",
+          execDept: null,
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 3.25,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "氯化钠注射液(湖南科伦)",
+          billItemName: "西药费",
+          chargeDate: "2025-08-15 16:00:00",
+          oriDetailSn: null,
+          genTime: "2025-08-15 16:10:48",
+          serial: "01",
+          descriptions: "0.9% 250ml /袋",
+        },
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "32",
+          orderNo: 20381021,
+          chargeCodeMx: "01191",
+          execDept: "呼吸与危重症医学科",
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 3.25,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "氯化钠注射液(湖南科伦)",
+          billItemName: "西药费",
+          chargeDate: "2025-08-16 08:00:00",
+          oriDetailSn: null,
+          genTime: "2025-08-15 16:10:48",
+          serial: "01",
+          descriptions: "0.9% 250ml /袋",
+        },
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "33",
+          orderNo: 20381021,
+          chargeCodeMx: "01191",
+          execDept: null,
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 3.25,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "氯化钠注射液(湖南科伦)",
+          billItemName: "西药费",
+          chargeDate: "2025-08-16 16:00:00",
+          oriDetailSn: null,
+          genTime: "2025-08-15 16:10:48",
+          serial: "01",
+          descriptions: "0.9% 250ml /袋",
+        },
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "82",
+          orderNo: 6,
+          chargeCodeMx: "05712",
+          execDept: "信息中心",
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 11.09,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "布洛芬混悬液",
+          billItemName: "西药费",
+          chargeDate: "2025-08-18 05:16:25",
+          oriDetailSn: null,
+          genTime: "2025-08-18 17:18:14",
+          serial: "01",
+          descriptions: " 2g 100ml /瓶",
+        },
+        {
+          inpatientNo: "0434450     ",
+          admissTimes: 1,
+          ledgerSn: 1,
+          detailSn: "83",
+          orderNo: 6,
+          chargeCodeMx: "05720",
+          execDept: "信息中心",
+          deptCode: "呼吸与危重症医学科",
+          chargeFee: 18.98,
+          chargeAmount: 1,
+          opIdName: "刘阳",
+          chargeName: "布洛芬混悬滴剂",
+          billItemName: "西药费",
+          chargeDate: "2025-08-18 05:21:51",
+          oriDetailSn: null,
+          genTime: "2025-08-18 17:22:17",
+          serial: "01",
+          descriptions: " 1.2g 30ml /瓶",
+        },
+      ]);
+    }
   });
 
   return {

+ 1 - 0
src/components/xmlr/index.vue

@@ -10,6 +10,7 @@ defineOptions({
 
 const props = withDefaults(defineProps<XmlrProps>(), {
   medicalTechnology: false,
+  openOrderPage: false,
 });
 
 const emits = defineEmits<UseDialogType.Emits>();

+ 1 - 3
src/components/zhu-yuan-yi-sheng/emr/emr-template/comp/PatientEmrData.vue

@@ -16,7 +16,6 @@ import {
   newDir,
   rename,
 } from "@/api/zhu-yuan-yi-sheng/emr-patient";
-import { useDialog } from "@/components/cy/CyDialog/index";
 import AddEmrDialog from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/add-emr-dialog/AddEmrDialog.vue";
 import {
   emrRootContextKey,
@@ -31,7 +30,6 @@ const props = defineProps<{
 }>();
 
 const root = inject(emrRootContextKey) as EmrStore;
-
 const emits = defineEmits(["nodeClick", "refresh"]);
 
 const inputValue = ref("");
@@ -270,7 +268,7 @@ function personnel(value: any) {
         :filter-node-method="filterNode"
         default-expand-all
       >
-        <template #default="{ node, data }">
+        <template #default="{ data }">
           <component :is="personnel(data)" />
           <el-icon v-if="data.submit">
             <Lock />

+ 1 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -266,6 +266,7 @@ import {
   getOrderNo,
   huoQuFeiYongXinXi,
   huoQuXiangMu,
+  printPoisonousHemp,
   toDeleteAnOrder,
   YaoPingJiLiang,
 } from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";

+ 41 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition.vue

@@ -298,6 +298,13 @@
       >
         费用接收重算
       </el-button>
+
+      <el-button
+        v-title="`打印毒、麻、精一、精二、终止妊娠`"
+        @click="handlePrintPoisonousHemp"
+      >
+        处方笺
+      </el-button>
     </div>
   </div>
 
@@ -319,6 +326,7 @@
 import {
   associateOrdersApi,
   confirmTheDoctorSOrderWithMedicine,
+  printPoisonousHemp,
   stopOrder,
 } from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import {
@@ -360,6 +368,8 @@ import CyDateRange from "@/components/cy/date-range/CyDateRange.vue";
 import { useDialog } from "@/components/cy/CyDialog/index";
 import XEUtils from "xe-utils";
 import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
+import PrintPoisonousHempTemplate from "@/components/print-poisonous-hemp/PrintPoisonousHempTemplate.vue";
+import { useCompShallowRef } from "@/utils/useCompRef";
 
 const props = defineProps({
   patientInfo: {
@@ -658,6 +668,37 @@ function nursingRecordForm() {
   });
 }
 
+function handlePrintPoisonousHemp() {
+  if (youWuXuanZheHuanZhe()) return;
+  const { inpatientNo, admissTimes } = huanZheXinXi.value;
+  const tmpData = XEUtils.clone(yzMitt.emit("getSelectedData"), true);
+  if (tmpData.length === 0) {
+    return;
+  }
+  const orders = tmpData.map(i => {
+    return i.id;
+  });
+  printPoisonousHemp({
+    patNo: inpatientNo,
+    times: admissTimes,
+    orders: orders,
+  })
+    .then(res => {
+      useDialog(PrintPoisonousHempTemplate, {
+        dialogProps: {
+          fullscreen: true,
+          title: "打印特殊药物",
+        },
+        params: {
+          data: res,
+        },
+      });
+    })
+    .catch(() => {
+      return [];
+    });
+}
+
 onMounted(async () => {
   yzMitt.on("queryYz", val => {
     return queryYz(val);

+ 5 - 0
src/css/layout.scss

@@ -56,6 +56,11 @@
   margin: 0;
 }
 
+.print-a5 {
+  height: 210mm;
+  width: 148mm;
+}
+
 .layout_container {
   @include max_h_w;
   display: flex;

+ 45 - 0
src/ts-type/print-poisonous-hemp.d.ts

@@ -0,0 +1,45 @@
+export interface DrugData {
+  orderName: string;
+  drugFlag: string;
+  drugFlagName: string;
+  drugSpecification: string;
+  dose: number; // 对应Java的BigDecimal,在TS中通常用number表示
+  frequCode: string;
+  frequName: string;
+  supplyCode: string;
+  doseUnitName: string;
+  supplyName: string;
+  drugQuan: string;
+  packUnitName: string;
+  printName?: string;
+  id: string;
+  // 前端专用
+  qrCode?: string;
+}
+
+export interface DrugGroup {
+  key: string;
+  title: string;
+  data: DrugData[];
+}
+
+export interface PrintOrderVo {
+  inpatientNo: string;
+  admissTimes: number | null; // 对应Java的Integer,可能为null
+  admissDate: string | Date; // 日期可以保持为string或转换为Date对象
+  name: string;
+  doctorName: string;
+  gender: number | null; // 对应Java的Integer
+  diagnose: string;
+  wardName: string;
+  responceName: string; // 医保类别
+  socialNo: string;
+  homeStreet: string; // 住址
+  birthDate: string | Date; // 格式为"yyyy-MM-dd"
+
+  // 计算属性,对应Java中的getAge方法
+  age?: number | null; // 可选属性,因为它是计算得出的
+
+  // 对应Java中的Map<String, DrugGroup>
+  data: Record<string, DrugGroup>;
+}

+ 5 - 5
src/utils/cy-use/useVuePrint.tsx

@@ -1,6 +1,5 @@
 import { listNotBlank, stringIsBlank } from "@/utils/blank-utils";
 import { uuid } from "@/utils/getUuid";
-import { VxePrintInstance } from "vxe-pc-ui";
 
 /**
  * 如果使用了 useTable 的话,建议不要使用全局的 table 样式污染
@@ -18,11 +17,12 @@ import { VxePrintInstance } from "vxe-pc-ui";
 export function useVuePrint(
   options: {
     id?: string;
+    // 加载css 文件列表在  /static/printcss 目录下
     extraCss?: string[];
     hidden?: boolean;
     // div 的样式
     contentStyle?: string;
-    // css 样式
+    // css 样式,写的css
     extraPageCss?: string;
     popTitle?: string;
     useTable?: boolean;
@@ -43,8 +43,6 @@ export function useVuePrint(
     ...printOjb
   } = options;
 
-  const printRef = ref<VxePrintInstance>();
-
   if (listNotBlank(printOjb.extraCss)) {
     let tmpExtraCss = "";
     printOjb.extraCss.forEach(item => {
@@ -120,5 +118,7 @@ export function useVuePrint(
     buttonRef.value.click();
   }
 
-  return [useTable ? tableTemplate : printTemplate, print, printOjb];
+  const rstTemplate = useTable ? tableTemplate : printTemplate;
+
+  return [rstTemplate, print, printOjb];
 }

+ 1 - 1
src/views/med-tec-mod/YiJiFeiYongLuRuV2.vue

@@ -3,7 +3,7 @@ import Xmlr from "@/components/xmlr/index.vue";
 </script>
 
 <template>
-  <Xmlr medical-technology :order-no="3" />
+  <Xmlr medical-technology :order-no="3" open-order-page />
 </template>
 
 <style lang="scss"></style>