浏览代码

医嘱打印毒麻提示

xiaochan 2 月之前
父节点
当前提交
cbb3ccef78

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

@@ -365,5 +365,6 @@ export function printPoisonousHemp(data) {
     url: url + "/printPoisonousHemp",
     method: "post",
     data,
+    showLoading: false,
   });
 }

+ 1 - 1
src/auto-imports.d.ts

@@ -65,6 +65,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 6 - 157
src/components/xmlr/components/PrintPrescriptionSign.vue

@@ -14,177 +14,25 @@ const props = defineProps<{
   supplyType: any[];
 }>();
 
-const now = dayjs().format("YYYY年MM月DD日");
 const doctor = reactive({
   code: "",
   name: "",
 });
-
-const [TemplateDefault, print] = useVuePrint({
-  extraPageCss: `
-    @page {
-        size: A5;
-        margin: 0;
-        padding: 0 ;
-    }
-
-    * {
-        box-sizing: border-box;
-    }
-
-  table {
-  border-collapse: collapse;
-  height: 200mm;
-  width: 148mm;
-  table-layout: fixed;
-  overflow: hidden;
-}
-
-th {
-  line-height: 5mm;
-}
-
-tr > td {
-  border: none;
-  height: auto;
-  vertical-align: top;
-}
-
-th {
-  text-align: center;
-}
-
-.doctor_info {
-  text-align: right;
-  width: 5mm;
-}`,
-});
-const colspan = 6;
 </script>
 
 <template>
   <div class="layout_container">
-    <TemplateDefault>
-      <table>
-        <thead>
-          <tr>
-            <th scope="col" :colspan="colspan">
-              <span style="font-size: 12pt">{{ env.VITE_HOSPITAL_NAME }}</span>
-            </th>
-          </tr>
-          <tr>
-            <th scope="col" :colspan="colspan">处方筏</th>
-          </tr>
-          <tr>
-            <th style="border-bottom: 1px solid #000" colspan="2">
-              科室:{{ patientInfo.wardName }}
-            </th>
-            <th style="border-bottom: 1px solid #000" colspan="2">
-              住院号:{{ patientInfo.inpatientNo }}
-            </th>
-            <th style="border-bottom: 1px solid #000" colspan="2">
-              {{ now }}
-            </th>
-          </tr>
-          <tr>
-            <th style="border-bottom: 1px solid #000" colspan="2">
-              姓名:{{ patientInfo.name }}
-            </th>
-            <th style="border-bottom: 1px solid #000" colspan="2">
-              年龄:{{ patientInfo.age }}
-            </th>
-            <th style="border-bottom: 1px solid #000" colspan="2">
-              性别:{{ patientInfo.sexName }}
-            </th>
-          </tr>
-          <tr>
-            <th
-              style="
-                text-align: left;
-                border-bottom: 1px solid #000;
-                padding-left: 12pt;
-              "
-              :colspan="colspan"
-            >
-              临床诊断:{{ patientInfo.emrDiagStr }}
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr>
-            <td colspan="6">
-              <div style="height: 12pt"></div>
-              <div
-                style="
-                  display: grid;
-                  font-size: 13pt;
-                  padding-left: 15pt;
-                  padding-top: 2pt;
-                  grid-template-columns:
-                    2fr 1fr 1fr
-                    1fr;
-                "
-                v-for="item in props.data"
-              >
-                <div>
-                  {{ item.chargeName }}
-                </div>
-                <div>{{ item.chargeAmount }}</div>
-                <div>
-                  {{ item.descriptions }}
-                </div>
-                <div>
-                  {{ item.frequencyName }}
-                </div>
-                <div>
-                  {{ item.supplyTypeName }}
-                </div>
-              </div>
-            </td>
-          </tr>
-        </tbody>
-        <tfoot style="border-top: 1px solid #000">
-          <tr>
-            <td class="doctor_info">医师:</td>
-            <td style="border-bottom: 1px solid #000">
-              <img
-                :src="`/doctorSignatureImage/${doctor.code}.png`"
-                style="height: 16pt; width: 47pt"
-                :alt="doctor.name"
-              />
-            </td>
-            <td class="doctor_info">审核:</td>
-            <td style="border-bottom: 1px solid #000"></td>
-
-            <td class="doctor_info">金额:</td>
-            <td style="border-bottom: 1px solid #000"></td>
-          </tr>
-          <tr>
-            <td class="doctor_info">调配:</td>
-            <td style="border-bottom: 1px solid #000"></td>
-
-            <td class="doctor_info">核对:</td>
-            <td style="border-bottom: 1px solid #000"></td>
-
-            <td class="doctor_info">发药:</td>
-            <td style="border-bottom: 1px solid #000"></td>
-          </tr>
-        </tfoot>
-      </table>
-    </TemplateDefault>
     <header>
       医师:
       <SystemStaffSelect v-model="doctor" value="code" label="name" />
-      <el-button @click="print">打印</el-button>
     </header>
     <div class="layout_main">
       <el-table :data="props.data" height="100%">
-        <el-table-column prop="chargeDate" label="录入日期" width="80px" />
-        <el-table-column prop="chargeCodeMx" label="项目编码" />
-        <el-table-column prop="chargeName" label="项目名称" />
+        <el-table-column type="index" width="30"></el-table-column>
+        <el-table-column prop="chargeCodeMx" label="项目编码" width="60" />
+        <el-table-column prop="chargeName" label="项目名称" width="120" />
         <el-table-column prop="genTime" label="执行时间" width="80px" />
-        <el-table-column prop="execDept" label="执行科室" />
-        <el-table-column label="执行频率">
+        <el-table-column label="执行频率" width="120">
           <template #default="{ row }">
             <el-select
               v-model="row.frequency"
@@ -201,7 +49,7 @@ const colspan = 6;
             </el-select>
           </template>
         </el-table-column>
-        <el-table-column label="给药方式">
+        <el-table-column label="给药方式" width="120">
           <template #default="{ row }">
             <el-select
               v-model="row.supplyType"
@@ -218,6 +66,7 @@ const colspan = 6;
             </el-select>
           </template>
         </el-table-column>
+        <el-table-column label="剂量" width="60"></el-table-column>
       </el-table>
     </div>
   </div>

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

@@ -952,6 +952,9 @@ const confirmOrdersClick = async () => {
     if (res !== null && res.error) {
       errorMsgFunc.add(res.data);
     }
+    if (res != null && res.orders) {
+      yzMitt.emit("postPrintPoisonousHemp", res.orders, true);
+    }
   } catch (e) {}
 };
 

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

@@ -301,7 +301,7 @@
 
       <el-button
         v-title="`打印毒、麻、精一、精二、终止妊娠`"
-        @click="handlePrintPoisonousHemp"
+        @click="handlePrintPoisonousHemp()"
       >
         处方笺
       </el-button>
@@ -369,7 +369,6 @@ 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: {
@@ -669,8 +668,6 @@ 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;
@@ -678,12 +675,30 @@ function handlePrintPoisonousHemp() {
   const orders = tmpData.map(i => {
     return i.id;
   });
+  postPrintPoisonousHemp(orders, false);
+}
+
+function postPrintPoisonousHemp(orders = [], displayReminder = false) {
+  if (orders.length === 0) {
+    return;
+  }
+  if (youWuXuanZheHuanZhe()) return;
+  const { inpatientNo, admissTimes } = huanZheXinXi.value;
   printPoisonousHemp({
     patNo: inpatientNo,
     times: admissTimes,
     orders: orders,
   })
-    .then(res => {
+    .then(async res => {
+      if (displayReminder) {
+        await ElMessageBox.confirm(
+          "此患者有开具特殊药品【毒、麻】等,是否打印处方单",
+          "提示",
+          {
+            type: "warning",
+          }
+        );
+      }
       useDialog(PrintPoisonousHempTemplate, {
         dialogProps: {
           fullscreen: true,
@@ -694,8 +709,10 @@ function handlePrintPoisonousHemp() {
         },
       });
     })
-    .catch(() => {
-      return [];
+    .catch(error => {
+      if (!displayReminder) {
+        xcMessage.error(error.message);
+      }
     });
 }
 
@@ -703,6 +720,7 @@ onMounted(async () => {
   yzMitt.on("queryYz", val => {
     return queryYz(val);
   });
+  yzMitt.on("postPrintPoisonousHemp", postPrintPoisonousHemp);
 
   yzMitt.on("confirmMedicalAdvice", () => {
     if (isCydy()) {

+ 2 - 0
src/utils/request.js

@@ -125,6 +125,8 @@ service.interceptors.response.use(
             onceFun = null;
           });
       }
+    } else if (response.data.code === 4003) {
+      return Promise.reject(response.data);
     } else if (response.data.code === 5001) {
       CyMessageBox.alert({
         type: "error",

+ 2 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.ts

@@ -1133,6 +1133,8 @@ export interface YzMitt {
 
   getTableRef: () => TableMethods;
 
+  postPrintPoisonousHemp: (orders: number[], displayReminder: boolean) => void;
+
   [key: string]: (...args: any[]) => any;
 }