Browse Source

删除没用的组件以及新增医嘱提示

xiaochan 5 months ago
parent
commit
c222d36e7d

+ 224 - 207
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.ts

@@ -1,315 +1,332 @@
 import requestV2 from "../../utils/request-v2";
 
-const url = '/yiZhuLuRu'
+const url = "/yiZhuLuRu";
 
 // 下面是 api 请求
 export function getMyPatient() {
-    return requestV2({
-        url: url + '/getMyPatient',
-        method: 'get',
-    })
+  return requestV2({
+    url: url + "/getMyPatient",
+    method: "get",
+  });
 }
 
 export function getOrderNo() {
-    return requestV2<string>({
-        url: url + '/getOrderNo',
-        method: 'get',
-    })
+  return requestV2<string>({
+    url: url + "/getOrderNo",
+    method: "get",
+  });
 }
 
 export function enterOrders(data) {
-    return requestV2({
-        url: url + '/enterOrders',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/enterOrders",
+    method: "post",
+    data,
+  });
 }
 
 export function insertTemplateOrder(data) {
-    return requestV2({
-        url: url + '/insertTemplateOrder',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/insertTemplateOrder",
+    method: "post",
+    data,
+  });
 }
 
 export function stopOrder(data) {
-    return requestV2({
-        url: url + '/stopOrder',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/stopOrder",
+    method: "post",
+    data,
+  });
 }
 
 export function toDeleteAnOrder(orderNo) {
-    return requestV2({
-        url: url + '/toDeleteAnOrder',
-        method: 'get',
-        params: {orderNo}
-    })
+  return requestV2({
+    url: url + "/toDeleteAnOrder",
+    method: "get",
+    params: { orderNo },
+  });
 }
 
 export function deleteMultipleOrders(data) {
-    return requestV2({
-        url: url + '/deleteMultipleOrders',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/deleteMultipleOrders",
+    method: "post",
+    data,
+  });
 }
 
-
 export function confirmOrders(data) {
-    return requestV2({
-        url: url + '/confirmOrders',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/confirmOrders",
+    method: "post",
+    data,
+  });
 }
 
 export function huoQuYiZhuShuJu(data) {
-    return requestV2({
-        url: url + '/huoQuYiZhuShuJu',
-        method: 'post',
-        data,
-    })
+  return requestV2({
+    url: url + "/huoQuYiZhuShuJu",
+    method: "post",
+    data,
+  });
 }
 
-
 export function huoQuXiangMu(code: string, groupNo: string) {
-    return requestV2({
-        url: url + '/huoQuXiangMu',
-        method: 'get',
-        params: {code, groupNo},
-    })
+  return requestV2({
+    url: url + "/huoQuXiangMu",
+    method: "get",
+    params: { code, groupNo },
+  });
 }
 
 export function getItemInstructions(code: string) {
-    return requestV2<any[]>({
-        url: url + '/getItemInstructions',
-        method: 'get',
-        params: {code},
-    })
+  return requestV2<any[]>({
+    url: url + "/getItemInstructions",
+    method: "get",
+    params: { code },
+  });
 }
 
 export interface YaoPingJiLiang {
-    code: string
-    name: string
-    value: number
+  code: string;
+  name: string;
+  value: number;
 }
 
 export interface YaoPinXinXi {
-    orderCode: string;
-    orderName: string;
-    drugFlag: string;
-    selfFlagYb?: number;
-    weight?: number;
-    weighUnit: string;
-    weighUnitName: string;
-    volum?: number;
-    volUnit: string;
-    volUnitName: string;
-    packSize?: number;
-    packUnit: string;
-    packUnitName: string;
-    miniUnit: string;
-    miniUnitName: string;
-    ypLevel?: number;
-    psFlag?: number;
-    frequCode: string;
-    frequCodeName: string;
-    kssFlag?: number;
-    kjywFlag?: number;
-    supplyCode: string;
-    supplyCodeName: string;
-    nationalCode: string;
-    stockAmount?: number;
-    visibleFlagZy?: number;
-    categoriesFlag: string;
+  orderCode: string;
+  orderName: string;
+  drugFlag: string;
+  selfFlagYb?: number;
+  weight?: number;
+  weighUnit: string;
+  weighUnitName: string;
+  volum?: number;
+  volUnit: string;
+  volUnitName: string;
+  packSize?: number;
+  packUnit: string;
+  packUnitName: string;
+  miniUnit: string;
+  miniUnitName: string;
+  ypLevel?: number;
+  psFlag?: number;
+  frequCode: string;
+  frequCodeName: string;
+  kssFlag?: number;
+  kjywFlag?: number;
+  supplyCode: string;
+  supplyCodeName: string;
+  nationalCode: string;
+  stockAmount?: number;
+  visibleFlagZy?: number;
+  categoriesFlag: string;
 }
 
 export interface FeeInfo {
-    permissionPrompt: boolean
-    prompt: string[]
-    data: YaoPinXinXi
-    yaoPingJiLiang: YaoPingJiLiang[]
+  permissionPrompt: boolean;
+  prompt: string[];
+  data: YaoPinXinXi;
+  yaoPingJiLiang: YaoPingJiLiang[];
 }
 
 export function huoQuFeiYongXinXi(queryCode: string) {
-    return requestV2<FeeInfo>({
-        url: url + '/huoQuFeiYongXinXi',
-        method: 'get',
-        params: {queryCode},
-    })
+  return requestV2<FeeInfo>({
+    url: url + "/huoQuFeiYongXinXi",
+    method: "get",
+    params: { queryCode },
+  });
 }
 
 export function getFrequency() {
-    return requestV2({
-        url: '/yiZhuLuRu/getFrequency',
-        showLoading: false,
-        method: 'get',
-    })
+  return requestV2({
+    url: "/yiZhuLuRu/getFrequency",
+    showLoading: false,
+    method: "get",
+  });
 }
 
 export function getSupplyType() {
-    return requestV2({
-        url: '/yiZhuLuRu/getSupplyType',
-        showLoading: false,
-        method: 'get',
-    })
+  return requestV2({
+    url: "/yiZhuLuRu/getSupplyType",
+    showLoading: false,
+    method: "get",
+  });
 }
 
 export function huoQuZhiXinKeShi(code) {
-    return requestV2({
-        url: url + '/huoQuZhiXinKeShi',
-        method: 'get',
-        params: {code},
-    })
-}
-
-export function huoQuYiZhuMuBan(code, deptCode, muBanLeiXing, currentPage, total) {
-    return requestV2({
-        url: url + '/huoQuYiZhuMuBan',
-        method: 'get',
-        params: {code, deptCode, muBanLeiXing, currentPage, total},
-    })
+  return requestV2({
+    url: url + "/huoQuZhiXinKeShi",
+    method: "get",
+    params: { code },
+  });
+}
+
+export function huoQuYiZhuMuBan(
+  code,
+  deptCode,
+  muBanLeiXing,
+  currentPage,
+  total
+) {
+  return requestV2({
+    url: url + "/huoQuYiZhuMuBan",
+    method: "get",
+    params: { code, deptCode, muBanLeiXing, currentPage, total },
+  });
 }
 
 export function getDoctorSOrderTemplateMaxSortNo() {
-    return requestV2({
-        url: url + '/getDoctorSOrderTemplateMaxSortNo',
-        method: 'get',
-    })
+  return requestV2({
+    url: url + "/getDoctorSOrderTemplateMaxSortNo",
+    method: "get",
+  });
 }
 
 export function huoQuMuBanShuJu(code) {
-    return requestV2({
-        url: url + '/huoQuMuBanShuJu',
-        method: 'get',
-        params: {code},
-    })
+  return requestV2({
+    url: url + "/huoQuMuBanShuJu",
+    method: "get",
+    params: { code },
+  });
 }
 
-
 export function deleteADoctorSOrderTemplate(patternCode) {
-    return requestV2({
-        url: url + '/deleteADoctorSOrderTemplate',
-        method: 'delete',
-        params: {patternCode}
-    })
+  return requestV2({
+    url: url + "/deleteADoctorSOrderTemplate",
+    method: "delete",
+    params: { patternCode },
+  });
 }
 
 export function collectDoctorSOrderTemplate(patternCode) {
-    return requestV2({
-        url: url + '/collectDoctorSOrderTemplate',
-        method: 'get',
-        params: {patternCode}
-    })
+  return requestV2({
+    url: url + "/collectDoctorSOrderTemplate",
+    method: "get",
+    params: { patternCode },
+  });
 }
 
 export function muBanCaoZuo(patternCode, patternName, deptCode, sortNo, flag) {
-    return requestV2({
-        url: url + '/muBanCaoZuo',
-        method: 'get',
-        params: {patternCode, patternName, deptCode, sortNo, flag},
-    })
+  return requestV2({
+    url: url + "/muBanCaoZuo",
+    method: "get",
+    params: { patternCode, patternName, deptCode, sortNo, flag },
+  });
 }
 
 export function singleDataCheck(data) {
-    return requestV2({
-        url: url + '/singleDataCheck',
-        method: 'post',
-        data: data
-    })
+  return requestV2({
+    url: url + "/singleDataCheck",
+    method: "post",
+    data: data,
+  });
 }
 
-
 export function saveTemplate(data) {
-    return requestV2({
-        url: url + '/saveTemplate',
-        method: 'post',
-        data: data
-    })
+  return requestV2({
+    url: url + "/saveTemplate",
+    method: "post",
+    data: data,
+  });
 }
 
-
 export function doesTheTemplateExist(name) {
-    return requestV2({
-        url: url + '/doesTheTemplateExist',
-        method: 'get',
-        params: {name}
-    })
+  return requestV2({
+    url: url + "/doesTheTemplateExist",
+    method: "get",
+    params: { name },
+  });
 }
 
 export function saveTheThirdLevelDoctor(data) {
-    return requestV2({
-        url: url + '/saveTheThirdLevelDoctor',
-        method: 'post',
-        data: data
-    })
+  return requestV2({
+    url: url + "/saveTheThirdLevelDoctor",
+    method: "post",
+    data: data,
+  });
 }
 
 export function associateOrdersApi(data) {
-    return requestV2({
-        url: url + '/associateOrders',
-        method: 'post',
-        data: data
-    })
+  return requestV2({
+    url: url + "/associateOrders",
+    method: "post",
+    data: data,
+  });
 }
 
 export function confirmTheDoctorSOrderWithMedicine(patNo, times) {
-    return requestV2({
-        url: url + '/confirmTheDoctorSOrderWithMedicine',
-        method: 'get',
-        params: {patNo, times}
-    })
+  return requestV2({
+    url: url + "/confirmTheDoctorSOrderWithMedicine",
+    method: "get",
+    params: { patNo, times },
+  });
 }
 
 export function copyOrder(data) {
-    return requestV2({
-        url: url + '/copyOrder',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/copyOrder",
+    method: "post",
+    data,
+  });
 }
 
 export function queryFeeByOrderNoApi(actOrderNo) {
-    return requestV2({
-        url: url + '/queryFeeByOrderNo',
-        method: 'get',
-        params: {actOrderNo}
-    })
+  return requestV2({
+    url: url + "/queryFeeByOrderNo",
+    method: "get",
+    params: { actOrderNo },
+  });
 }
 
 export function oneClickStopOrder(data) {
-    return requestV2({
-        url: url + '/oneClickStopOrder',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/oneClickStopOrder",
+    method: "post",
+    data,
+  });
 }
 
 export function doctorAuthorizationLogin(data) {
-    return requestV2({
-        url: url + '/doctorAuthorizationLogin',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/doctorAuthorizationLogin",
+    method: "post",
+    data,
+  });
 }
 
-
 export function updateOrderInstruction(orderNo, str) {
-    return requestV2({
-        url: url + '/updateOrderInstruction',
-        method: 'get',
-        params: {orderNo, str}
-    })
+  return requestV2({
+    url: url + "/updateOrderInstruction",
+    method: "get",
+    params: { orderNo, str },
+  });
 }
 
-
 export function copyTableOrder(data) {
-    return requestV2({
-        url: url + '/copyTableOrder',
-        method: 'post',
-        data
-    })
+  return requestV2({
+    url: url + "/copyTableOrder",
+    method: "post",
+    data,
+  });
+}
+
+interface SiLimitRequest {
+  patNo: string; // 对应 Java 中的 String
+  times: number | null; // 对应 Java 中的 Integer,允许为 null
+  ledgerSn: number | null; // 对应 Java 中的 Integer,允许为 null
+  chargeList: string[]; // 对应 Java 中的 List<String>
+  currentCode: string; // 对应 Java 中的 String
+  sn: number | null; // 对应 Java 中的 Integer,允许为 null
+  oriSn: number | null; // 对应 Java 中的 Integer,允许为 null
+}
+
+export function analyzeSiChargeLimit(data: SiLimitRequest) {
+  return requestV2({
+    url: url + "/analyzeSiChargeLimit",
+    method: "post",
+    data,
+  });
 }

+ 10 - 2
src/components/cy/CyDialog/index.ts

@@ -60,6 +60,12 @@ export interface DialogState extends DialogOptions<any> {
 export const dialogStore = ref<DialogState[]>([]);
 export const dialogKey = ref(1);
 
+/**
+ * 把一个组件变成弹窗
+ *
+ * @param component 组件
+ * @param props 参数
+ */
 export function useDialog<C extends Component>(
   component: C,
   props: DialogOptions<C> = {}
@@ -84,11 +90,13 @@ export function useDialog<C extends Component>(
     const pushIndex = dialogStore.value.push({
       ...props,
       resolve: XEUtils.once(value => {
-        props.visible = false;
+        const currentItem = dialogStore.value[pushIndex - 1];
+        currentItem.visible = false;
         resolve(value);
       }),
       reject: XEUtils.once(value => {
-        props.visible = false;
+        const currentItem = dialogStore.value[pushIndex - 1];
+        currentItem.visible = false;
         props.ignoreError ? resolve(value) : reject(value);
       }),
       dialogKey: dialogKey.value,

+ 1 - 3
src/components/cy/CyDialog/index.vue

@@ -2,9 +2,7 @@
 import { dialogKeyType, DialogState, dialogStore } from "./index";
 import { ElButton } from "element-plus";
 import XEUtils from "xe-utils";
-import sleep from "@/utils/sleep";
 import { nextTick, renderSlot } from "vue";
-import { CircleCloseFilled } from "@element-plus/icons-vue";
 
 function next(item: DialogState, data: any) {
   if (item.closeValue === "confirm") {
@@ -76,7 +74,7 @@ const style = (item: DialogState) => {
     return {};
   }
   return {
-    "--el-dialog-border-radius": "14px",
+    "--el-dialog-border-radius": "12px",
   };
 };
 </script>

+ 0 - 1
src/components/cy/cy-monaco-editor/CyMonacoEditor.tsx

@@ -8,7 +8,6 @@ import { BizException, ExceptionEnum } from "@/utils/BizException";
 import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
 import { ElButton } from "element-plus";
 import * as monaco from "monaco-editor";
-import { IsCyDialog } from "@/components/cy/dialog/src/useCyDialog";
 import { tryOnBeforeUnmount } from "@vueuse/core";
 import { DialogOptions, useDialog } from "@/components/cy/CyDialog/index";
 

+ 0 - 15
src/components/cy/dialog/CyDialogTest.vue

@@ -1,15 +0,0 @@
-<script setup lang="ts">
-import { openDrugManual } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
-
-function open() {
-  openDrugManual("01195", "01")
-    .then(res => {})
-    .catch(res => {});
-}
-</script>
-
-<template>
-  <el-button @click="open"> 打开 </el-button>
-</template>
-
-<style scoped lang="scss"></style>

+ 0 - 78
src/components/cy/dialog/src/CyDialog.vue

@@ -1,78 +0,0 @@
-<script lang="ts">
-import { ElButton, useZIndex } from "element-plus";
-import {
-  CyDialogProps,
-  useCyDialog,
-} from "@/components/cy/dialog/src/useCyDialog";
-import "./cy-dialog.scss";
-
-const COMPONENT_NAME = "CyDialog";
-
-export default defineComponent({
-  name: COMPONENT_NAME,
-  components: {
-    ElButton,
-  },
-  props: { ...CyDialogProps },
-  emits: ["closed"],
-  setup(props, { emit, expose }) {
-    const API = useCyDialog(props, emit);
-    const zIndex = ref(useZIndex().nextZIndex());
-
-    expose({
-      closed: API.closed,
-    });
-
-    return {
-      ...API,
-      zIndex,
-      props,
-    };
-  },
-});
-</script>
-
-<template>
-  <div ref="containerRef" :style="{ zIndex }" :class="[ns.b('container')]">
-    <div :class="[ns.e('dialog')]">
-      <div
-        ref="boxRef"
-        :style="boxStyle"
-        :class="[ns.e('box'), ns.is('fullScreen', fullScreen)]"
-      >
-        <header ref="headerRef" :class="[ns.e('header')]">
-          <span>{{ title }}</span>
-          <el-button
-            icon="Close"
-            v-if="showCancelButton"
-            size="small"
-            circle
-            @click="handleCancel"
-          />
-        </header>
-        <div ref="bodyRef" :style="bodyStyle" :class="[ns.e('body')]">
-          <slot :width="state.bodySize.width" :height="state.bodySize.height" />
-        </div>
-        <footer ref="footerRef" :class="[ns.e('footer')]">
-          <el-button
-            v-if="showCancelButton"
-            @click="handleCancel"
-            size="default"
-          >
-            {{ cancelText ?? "取消" }}
-          </el-button>
-          <el-button
-            color="hsl(240 5.9% 10%)"
-            style="margin-right: 15px"
-            @click="handleConfirm"
-            size="default"
-            :loading="state.confirmLoading"
-            type="primary"
-          >
-            {{ confirmText ?? "确认" }}
-          </el-button>
-        </footer>
-      </div>
-    </div>
-  </div>
-</template>

+ 0 - 75
src/components/cy/dialog/src/cy-dialog.scss

@@ -1,75 +0,0 @@
-.cy-dialog-container * {
-  box-sizing: border-box;
-}
-
-.cy-dialog-container {
-  position: fixed;
-  top: 0;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  height: 100%;
-  background-color: rgba(0, 0, 0, .8);
-  overflow: auto;
-
-  .cy-dialog__dialog {
-    position: fixed;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    left: 0;
-    overflow: auto;
-
-  }
-
-  .cy-dialog__box {
-    position: relative;
-    background: white;
-    height: max-content;
-    width: 500px;
-    margin: 15vh auto 50px;
-    border-radius: .5rem;
-    box-shadow: 0 12px 32px 4px rgba(0, 0, 0, .04), 0 8px 20px rgba(0, 0, 0, .08);
-    overflow-wrap: break-word;
-  }
-
-  .is-fullScreen {
-    width: 100%;
-    height: 100%;
-    margin: 0;
-    padding: 0;
-  }
-
-  .cy-dialog__body {
-    padding: 10px;
-  }
-
-  .cy-dialog__header {
-    text-align: start;
-    padding: 15px;
-    user-select: none;
-    cursor: all-scroll;
-    font-weight: 600;
-    font-size: 1.125rem;
-    letter-spacing: -.025em;
-    line-height: 1;
-
-    display: flex;
-    justify-content: space-between;
-
-    span {
-      line-height: 24px;
-      font-size: 18px;
-      color: #303133;
-    }
-  }
-
-  .cy-dialog__footer {
-    text-align: right;
-    padding: 10px;
-    line-height: 30px;
-  }
-}
-
-
-

+ 0 - 199
src/components/cy/dialog/src/useCyDialog.ts

@@ -1,199 +0,0 @@
-import { ExtractPropTypes, ref, reactive, computed } from "vue";
-import { useCyNamespace } from "@/utils/xiaochan-element-plus";
-import { useResizeObserver } from "@vueuse/core";
-import { useDraggable } from "element-plus";
-
-export enum ClosingMethod {
-  CONFIRM = "confirm",
-  CANCEL = "cancel",
-}
-
-export const CyDialogProps = {
-  title: String,
-  fullScreen: {
-    type: Boolean,
-    default: false,
-  },
-  confirmText: {
-    type: String,
-    default: "确认",
-  },
-  cancelText: {
-    type: String,
-    default: "取消",
-  },
-  confirmClick: {
-    type: Function,
-    default: null,
-  },
-  cancelClick: {
-    type: Function,
-    default: null,
-  },
-  bodyHeight: {
-    type: [Number, String],
-    default: "max-content",
-  },
-  bodyWidth: {
-    type: [Number, String],
-    default: "500px",
-  },
-  ignoreError: {
-    type: Boolean,
-    default: false,
-  },
-  bodyPadding: {
-    type: String,
-    default: "10px",
-  },
-  showCancelButton: {
-    type: Boolean,
-    default: true,
-  },
-};
-
-export type IsCyDialog = ExtractPropTypes<typeof CyDialogProps>;
-
-export function useCyDialog(props: IsCyDialog, emit: any) {
-  const ns = useCyNamespace("dialog");
-  const headerRef = ref();
-  const footerRef = ref();
-  const containerRef = ref();
-  const boxRef = ref();
-  const bodyRef = ref();
-
-  const state = reactive({
-    bodySize: {
-      height: 0,
-      width: 0,
-    },
-    headerHeight: 0,
-    footerHeight: 0,
-    confirmLoading: false,
-    cancelLoading: false,
-  });
-
-  const draggable = computed(() => {
-    return !props.fullScreen;
-  });
-
-  const bodyStyle = computed(() => {
-    if (props.fullScreen) {
-      return {
-        height: `calc(100% - ${state.headerHeight}px - ${state.footerHeight}px)`,
-        padding: props.bodyPadding,
-        overflowY: "auto",
-      };
-    } else {
-      return {
-        height: props.bodyHeight,
-        padding: props.bodyPadding,
-        overflowY: "auto",
-      };
-    }
-  });
-
-  const boxStyle = computed(() => {
-    return {
-      width: props.fullScreen ? "" : props.bodyWidth,
-    };
-  });
-
-  useResizeObserver(headerRef, entries => {
-    // @ts-ignore
-    state.headerHeight = entries[0].target.offsetHeight;
-  });
-
-  useResizeObserver(footerRef, entries => {
-    // @ts-ignore
-    state.footerHeight = entries[0].target.offsetHeight;
-  });
-
-  useResizeObserver(bodyRef, entries => {
-    state.bodySize = {
-      // @ts-ignore
-      height: entries[0].target.offsetHeight,
-      // @ts-ignore
-      width: entries[0].target.offsetWidth,
-    };
-  });
-
-  useDraggable(boxRef, headerRef, draggable);
-
-  function closed(closingMethod: ClosingMethod, val: any) {
-    emit("closed", closingMethod, val);
-  }
-
-  async function handleConfirm() {
-    state.confirmLoading = true;
-
-    function next(val: any) {
-      closed(ClosingMethod.CONFIRM, val);
-    }
-
-    if (props.confirmClick) {
-      try {
-        await props.confirmClick(next);
-      } catch (e) {
-        console.error(e);
-      } finally {
-        state.confirmLoading = false;
-      }
-      return;
-    }
-    state.confirmLoading = false;
-    next(null);
-  }
-
-  async function handleCancel() {
-    state.cancelLoading = true;
-
-    function next(val: any) {
-      closed(
-        props.ignoreError ? ClosingMethod.CONFIRM : ClosingMethod.CANCEL,
-        val
-      );
-    }
-
-    if (props.cancelClick) {
-      try {
-        await props.cancelClick(next);
-      } catch (e) {
-        console.error(e);
-      } finally {
-        state.cancelLoading = false;
-      }
-      return;
-    }
-
-    state.cancelLoading = false;
-    next(null);
-  }
-
-  function onFocusoutPrevented(event: CustomEvent) {
-    if (event.detail?.focusReason === "pointer") {
-      event.preventDefault();
-    }
-  }
-
-  function onCloseRequested() {
-    handleCancel();
-  }
-
-  return {
-    ns,
-    headerRef,
-    footerRef,
-    bodyStyle,
-    containerRef,
-    boxRef,
-    bodyRef,
-    state,
-    handleConfirm,
-    handleCancel,
-    onFocusoutPrevented,
-    boxStyle,
-    onCloseRequested,
-    closed,
-  };
-}

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

@@ -257,6 +257,7 @@
 
 <script setup lang="ts">
 import {
+  analyzeSiChargeLimit,
   confirmOrders,
   copyOrder,
   enterOrders,
@@ -264,7 +265,6 @@ import {
   getOrderNo,
   huoQuFeiYongXinXi,
   huoQuXiangMu,
-  huoQuZhiXinKeShi,
   toDeleteAnOrder,
   YaoPingJiLiang,
 } from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
@@ -468,6 +468,7 @@ const drugDefaultValue = async (
     yaoPingJiLiang,
   }: FeeInfo = await huoQuFeiYongXinXi(queryKey).catch(() => {
     clearAndErrorMessage("请联系管理员。");
+    return {};
   });
 
   yzInfoPrompt.value = XEUtils.isArray(prompt) ? prompt : [];
@@ -533,6 +534,20 @@ const drugDefaultValue = async (
         "请注意已使用【默认给药方式】,药剂科维护默认给药方式。"
       );
     }
+
+    await analyzeSiChargeLimit({
+      patNo: props.patientInfo.inpatientNo,
+      times: props.patientInfo.admissTimes,
+      ledgerSn: props.patientInfo.ledgerSn,
+      chargeList: [data.orderCode],
+    })
+      .then(res => {
+        if (res === "OK") {
+          return;
+        }
+        yzInfoPrompt.value.push(res);
+      })
+      .catch(XEUtils.noop);
   }
 
   if (stringIsBlank(yiZhuData.value.frequCode)) {

+ 2 - 3
src/utils/cy-use/useVxeTable.tsx

@@ -11,8 +11,7 @@ import {
 import XEUtils from "xe-utils";
 import { stringIsBlank, stringNotBlank } from "@/utils/blank-utils";
 import { BizException, ExceptionEnum } from "@/utils/BizException";
-import { ElButton, ElPopover } from "element-plus";
-import { IsCyDialog } from "@/components/cy/dialog/src/useCyDialog";
+import { ElButton } from "element-plus";
 import { tsxVModel } from "@/utils/cy-use/useTsxUtils";
 import { isDev } from "@/utils/public";
 import { useElementVisibility } from "@vueuse/core";
@@ -42,7 +41,7 @@ declare type SimplifiedConfiguration<D> = {
   pagesProps?: VxePagerProps;
   showCheckbox?: boolean;
   mountedQuery?: boolean;
-  dialogProps?: IsCyDialog;
+  dialogProps?: any;
   dialogHeader?: () => any;
   getQueryParams?: () => any;
 };