xiaochan 2 månader sedan
förälder
incheckning
19c27cb5fe

+ 10 - 5
src/api/inpatient/xiang-mu-lu-ru.js

@@ -29,11 +29,16 @@ export function xiangMuTuiFei(data) {
   });
 }
 
-export function getMuBan(deptCode, currentPage, pageSize, total) {
+/**
+ *
+ * @param data {data : {searchName: string, total: number, pageSize: number, currentPage: number}}
+ * @return {Promise<any[]>}
+ */
+export function getMuBan(data) {
   return request({
     url: "/xmlr/getMuBan",
-    method: "get",
-    params: { deptCode, currentPage, pageSize, total },
+    method: "post",
+    data,
   });
 }
 
@@ -45,11 +50,11 @@ export function getMuBanXinXi(patternName, opIdCode) {
   });
 }
 
-export function queryDanGeXiangMu(pyCode, xiangMuHuoYaoPinFlag) {
+export function queryDanGeXiangMu(pyCode, xiangMuHuoYaoPinFlag, yfType) {
   return request({
     url: "/xmlr/queryXiangMu",
     method: "get",
-    params: { pyCode, xiangMuHuoYaoPinFlag },
+    params: { pyCode, xiangMuHuoYaoPinFlag, yfType },
   });
 }
 

+ 40 - 0
src/components/cy/yf-group/YfGrouo.vue

@@ -0,0 +1,40 @@
+<script setup lang="ts">
+import { useYfGroupStore } from "@/pinia/use-yf-group";
+import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
+
+const props = withDefaults(
+  defineProps<{
+    modelValue?: string | number;
+    type?: "xy" | "cy";
+    oldStyle?: boolean;
+  }>(),
+  {
+    type: "xy",
+    oldStyle: false,
+  }
+);
+
+const emits = defineEmits(["update:modelValue"]);
+
+const value = defineModel();
+
+const data = computed(() => {
+  return useYfGroupStore()[props.type];
+});
+
+onMounted(() => {
+  useYfGroupStore().init();
+  value.value = useYfGroupStore().getDefaultCode(props.type);
+});
+</script>
+
+<template>
+  <el-select v-model="value" style="width: 120px" v-if="!props.oldStyle">
+    <xc-el-option :data="data" />
+  </el-select>
+  <select v-model="value" style="width: 120px" v-else>
+    <option v-for="item in data" :value="item.code">
+      {{ item.name }}
+    </option>
+  </select>
+</template>

+ 122 - 92
src/components/med-tec-mod/HuoQuMuBan.vue

@@ -1,15 +1,18 @@
 <template>
   <div class="layout_display_flex_y">
     <el-dialog
-        title="模板信息"
-        draggable
-        width="90vw"
-        append-to-body
-        v-model="dialog">
-      <el-table ref="detailsTableRef"
-                height="60vh"
-                @row-click="(row) => detailsTableRef.toggleRowSelection(row)"
-                :data="muBanXiangQing.data ">
+      title="模板信息"
+      draggable
+      width="90vw"
+      append-to-body
+      v-model="dialog"
+    >
+      <el-table
+        ref="detailsTableRef"
+        height="60vh"
+        @row-click="row => detailsTableRef.toggleRowSelection(row)"
+        :data="muBanXiangQing.data"
+      >
         <el-table-column type="selection"></el-table-column>
         <el-table-column label="项目名称" prop="chargeName"></el-table-column>
         <el-table-column label="厂家" prop="manuName"></el-table-column>
@@ -19,7 +22,12 @@
         <el-table-column label="数量" prop="amount"></el-table-column>
         <el-table-column label="金额">
           <template #default="scope">
-            {{ XEUtils.toFixed(Dig.multiply(scope.row.chargeAmount, scope.row.amount), 2) }}
+            {{
+              XEUtils.toFixed(
+                Dig.multiply(scope.row.chargeAmount, scope.row.amount),
+                2
+              )
+            }}
           </template>
         </el-table-column>
         <el-table-column label="编码" prop="chargeCodeMx"></el-table-column>
@@ -27,17 +35,10 @@
       </el-table>
 
       <template #footer>
-        <el-button
-            type="danger"
-            size="large"
-            @click="dialog = false">
+        <el-button type="danger" size="large" @click="dialog = false">
           取消
         </el-button>
-        <el-button
-            type="primary"
-            @click="confirmTemplate"
-            size="large"
-        >
+        <el-button type="primary" @click="confirmTemplate" size="large">
           确认
         </el-button>
       </template>
@@ -45,22 +46,33 @@
 
     <div class="layout_flex_1-y">
       <el-table
-          @rowClick="getMuBanXinXiClick"
-          :data="templateData.data"
-          height="100%">
-        <el-table-column label="模板名称" prop="name" width="120px"/>
+        @rowClick="getMuBanXinXiClick"
+        :data="templateData.data"
+        height="100%"
+      >
+        <el-table-column label="模板名称" prop="name" width="120px">
+          <template #header>
+            <el-input
+              placeholder="按下回车搜索"
+              v-model="templateData.searchName"
+              @keydown.enter.stop.prevent="
+                () => reloadData(templateData.searchName)
+              "
+            />
+          </template>
+        </el-table-column>
         <el-table-column>
           <template #header>
-            <el-button type="primary" @click="reloadData">刷新</el-button>
+            <el-button type="primary" @click="reloadData(null)">刷新</el-button>
           </template>
           <template #default="scope">
             <el-popconfirm
-                cancel-button-text="取消"
-                confirm-button-text="确认"
-                icon="InfoFilled"
-                iconColor="red"
-                title="是否删除该数据"
-                @confirm="shanChuMuBanClick(scope.$index, scope.row)"
+              cancel-button-text="取消"
+              confirm-button-text="确认"
+              icon="InfoFilled"
+              iconColor="red"
+              title="是否删除该数据"
+              @confirm="shanChuMuBanClick(scope.$index, scope.row)"
             >
               <template #reference>
                 <el-button @click.stop.prevent type="danger">删除</el-button>
@@ -72,108 +84,126 @@
     </div>
     <div>
       <el-pagination
-          :current-page="templateData.currentPage"
-          :page-size="templateData.pageSize"
-          :pager-count="5"
-          :total="templateData.total"
-          layout=" prev, pager, next"
-          small
-          style="margin-top: 5px"
-          @current-change="templatePaging"/>
+        :current-page="templateData.currentPage"
+        :page-size="templateData.pageSize"
+        :pager-count="5"
+        :total="templateData.total"
+        layout=" prev, pager, next"
+        small
+        style="margin-top: 5px"
+        @current-change="templatePaging"
+      />
     </div>
   </div>
 </template>
 
 <script setup>
-import {onMounted, ref, reactive} from 'vue'
-import {getMuBan, getMuBanXinXi, shanChuMuBan} from '@/api/inpatient/xiang-mu-lu-ru'
-import {ElMessageBox, ElTable} from 'element-plus'
-import {useUserStore} from "@/pinia/user-store";
+import { onMounted, ref, reactive } from "vue";
+import {
+  getMuBan,
+  getMuBanXinXi,
+  shanChuMuBan,
+} from "@/api/inpatient/xiang-mu-lu-ru";
+import { ElMessageBox, ElTable } from "element-plus";
+import { useUserStore } from "@/pinia/user-store";
 import useCompRef from "@/utils/useCompRef";
 import Dig from "../../utils/math";
-import XEUtils from 'xe-utils'
+import XEUtils from "xe-utils";
 
-const dialog = ref(false)
-const emit = defineEmits(['selectionFeiYong'])
-const detailsTableRef = useCompRef(ElTable)
+const dialog = ref(false);
+const emit = defineEmits(["selectionFeiYong"]);
+const detailsTableRef = useCompRef(ElTable);
 
-let templateData = reactive({
+const templateData = reactive({
   data: [],
   currentPage: 1,
   pageSize: 10,
   total: 0,
-})
+  searchName: "",
 
-const userInfo = useUserStore().userInfo
+  tmpName: "",
+});
 
-const templatePaging = (val) => {
-  templateData.currentPage = val
-  getMuBan(userInfo.deptCode, templateData.currentPage, templateData.pageSize, templateData.total).then((res) => {
-    templateData.data = res.records
-  })
-}
+const userInfo = useUserStore().userInfo;
+
+const templatePaging = val => {
+  templateData.currentPage = val;
+  const { data, tmpName, ...value } = templateData;
+  getMuBan({ ...value, searchName: templateData.tmpName }).then(res => {
+    templateData.data = res.records;
+  });
+};
 
 // 获取模板信息
-const getMuBanXinXiClick = (row) => {
-  getMuBanXinXi(row.name, row.opIdCode).then((res) => {
-    muBanXiangQing.value.data = res
-    muBanXiangQing.value.total = res.length
-    dialog.value = true
-  })
-}
+const getMuBanXinXiClick = row => {
+  getMuBanXinXi(row.name, row.opIdCode).then(res => {
+    muBanXiangQing.value.data = res;
+    muBanXiangQing.value.total = res.length;
+    dialog.value = true;
+  });
+};
 
 // 获取模板的详情
 const muBanXiangQing = ref({
   data: [],
   currentPage: 1,
   pageSize: 30,
-  total: 0
-})
+  total: 0,
+});
 
 function confirmTemplate() {
   const data = detailsTableRef.value.getSelectionRows();
   if (data.length > 0) {
-    emit('selectionFeiYong', data)
+    emit("selectionFeiYong", data);
   }
-  dialog.value = false
+  dialog.value = false;
 }
 
 const shanChuMuBanClick = (index, data) => {
   if (data.opIdCode !== userInfo.code) {
-    ElMessageBox.confirm('该模板非本人创建是否强制删除', '提示', {
-      type: 'error',
-    }).then(() => {
-      shanChuMuBan(data.name, data.opIdCode).then((res) => {
-        templateData.data.splice(index, 1)
-      })
-    }).catch(() => {
+    ElMessageBox.confirm("该模板非本人创建是否强制删除", "提示", {
+      type: "error",
     })
+      .then(() => {
+        shanChuMuBan(data.name, data.opIdCode).then(res => {
+          templateData.data.splice(index, 1);
+        });
+      })
+      .catch(() => {});
   } else {
-    shanChuMuBan(data.name, data.opIdCode).then((res) => {
-      templateData.data.splice(index, 1)
-    })
+    shanChuMuBan(data.name, data.opIdCode).then(res => {
+      templateData.data.splice(index, 1);
+    });
   }
-}
+};
 
-const reloadData = () => {
-  getMuBan(userInfo.deptCode, 1, 10, 0).then((res) => {
-    templateData.total = res.total
-    templateData.data = res.records
-    templateData.currentPage = 1
-  })
-}
+const reloadData = (name = "") => {
+  templateData.total = 0;
+  templateData.data = [];
+  templateData.currentPage = 1;
+  templateData.pageSize = 10;
+
+  if (name !== "") {
+    templateData.searchName = name;
+    templateData.tmpName = name;
+  }
+
+  const { data, tmpName, ...value } = templateData;
+
+  getMuBan(value).then(res => {
+    templateData.total = res.total;
+    templateData.data = res.records;
+    templateData.currentPage = 1;
+  });
+};
 
 defineExpose({
-  reloadData
-})
+  reloadData: () => reloadData(),
+});
 
 onMounted(() => {
-  getMuBan(userInfo.deptCode, templateData.currentPage, templateData.pageSize, templateData.total).then((res) => {
-    templateData.total = res.total
-    templateData.data = res.records
-    templateData.currentPage = 1
-  })
-})
+  reloadData();
+});
 </script>
 
 <style></style>

+ 4 - 10
src/components/medical-insurance/medicine-return-order/GenerateMedicineReturnOrder.vue

@@ -3,17 +3,11 @@
   <el-dialog v-model="dialog" title="生成退药单" width="60vw" append-to-body>
     <div class="header">
       药房:
-      <el-select
+      <YfGrouo
         v-model="groupNo"
         style="width: 90px"
         @change="dateRangeChange"
-      >
-        <el-option
-          v-for="item in useYfGroupStore().xy"
-          :value="item.code"
-          :label="item.name"
-        />
-      </el-select>
+      />
       <div>
         <el-date-picker
           style="width: 220px"
@@ -140,7 +134,7 @@ import { BizException, ExceptionEnum } from "@/utils/BizException";
 import { listIsBlank, stringIsBlank } from "@/utils/blank-utils";
 import { getLodop, initLodop } from "@/utils/c-lodop";
 import { refundReasonList } from "@/data";
-import { useYfGroupStore } from "@/pinia/use-yf-group";
+import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
 
 defineOptions({
   name: "GenerateMedicineReturnOrder",
@@ -156,7 +150,7 @@ const data = reactive({
   totalFee: 0,
   refundReason: 1,
 });
-const groupNo = ref(useYfGroupStore().getDefaultXyCode);
+const groupNo = ref();
 const refundReason = ref(1);
 
 // 获取未生成的药单

+ 52 - 46
src/components/xmlr/dialog/NewDialog.vue

@@ -1,57 +1,65 @@
 <script setup lang="ts">
-import {queryDanGeXiangMu} from "@/api/inpatient/xiang-mu-lu-ru";
+import { queryDanGeXiangMu } from "@/api/inpatient/xiang-mu-lu-ru";
+import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
 
 const props = defineProps<{
   add: (value: any) => void;
-  medicalTechnology: boolean
+  medicalTechnology: boolean;
 }>();
 
-const search = ref('');
+const search = ref("");
+const yf = ref(null);
+
 const xiangMuHuoYaoPinFlag = ref(0);
 const xiangMuHuoYaoPinShuJu = reactive({
   data: [],
   currentPage: 1,
   pageSize: 10,
-})
+});
 
 function rmChargePyCode() {
   if (search.value.length >= 2) {
-    queryDanGeXiangMu(search.value, xiangMuHuoYaoPinFlag.value).then(res => {
-          xiangMuHuoYaoPinShuJu.data = res;
-        }
+    queryDanGeXiangMu(search.value, xiangMuHuoYaoPinFlag.value, yf.value).then(
+      res => {
+        xiangMuHuoYaoPinShuJu.data = res;
+      }
     );
   }
 }
 
 function clearXiangMuHuoYaoPinShuJu() {
-  xiangMuHuoYaoPinShuJu.data = []
-  xiangMuHuoYaoPinShuJu.currentPage = 1
+  xiangMuHuoYaoPinShuJu.data = [];
+  xiangMuHuoYaoPinShuJu.currentPage = 1;
 }
 </script>
 
 <template>
   <div>
-    <el-input v-model="search"
-              style="width: 140px"
-              @keyup.enter="rmChargePyCode"
+    <el-input
+      v-model="search"
+      style="width: 140px"
+      @keyup.enter="rmChargePyCode"
     />
-    <el-divider direction="vertical"/>
+    <el-divider direction="vertical" />
     <el-button type="primary" @click="rmChargePyCode">查询</el-button>
     <template v-if="props.medicalTechnology">
-      <el-divider direction="vertical"/>
+      <el-divider direction="vertical" />
       <el-switch
-          v-model="xiangMuHuoYaoPinFlag"
-          @change="clearXiangMuHuoYaoPinShuJu"
-          :active-value="1"
-          :inactive-value="0"
-          active-color="#409EFF"
-          active-text="药品"
-          inactive-color="#13ce66"
-          inactive-text="项目"/>
+        v-model="xiangMuHuoYaoPinFlag"
+        @change="clearXiangMuHuoYaoPinShuJu"
+        :active-value="1"
+        :inactive-value="0"
+        active-color="#409EFF"
+        active-text="药品"
+        inactive-color="#13ce66"
+        inactive-text="项目"
+      />
+      <YfGrouo v-model="yf" v-if="xiangMuHuoYaoPinFlag === 1" />
     </template>
     <el-table
-        max-height="50vh"
-        :data="xiangMuHuoYaoPinShuJu.data.slice(
+      max-height="50vh"
+      :data="
+        xiangMuHuoYaoPinShuJu.data.slice(
           (xiangMuHuoYaoPinShuJu.currentPage - 1) *
             xiangMuHuoYaoPinShuJu.pageSize,
           xiangMuHuoYaoPinShuJu.currentPage * xiangMuHuoYaoPinShuJu.pageSize
@@ -60,7 +68,9 @@ function clearXiangMuHuoYaoPinShuJu() {
     >
       <el-table-column label="操作" width="40">
         <template #default="scope">
-          <el-button text @click="props.add(scope.row)" type="primary">添加</el-button>
+          <el-button text @click="props.add(scope.row)" type="primary"
+            >添加
+          </el-button>
         </template>
       </el-table-column>
       <el-table-column label="项目编码" prop="chargeCodeMx"></el-table-column>
@@ -69,9 +79,9 @@ function clearXiangMuHuoYaoPinShuJu() {
       <el-table-column label="国家编码" prop="nationalCode"></el-table-column>
       <el-table-column label="国家名称" prop="nationalName"></el-table-column>
       <el-table-column label="单位" prop="spec"></el-table-column>
-      <el-table-column label="执行科室" prop="execUnitName"/>
+      <el-table-column label="执行科室" prop="execUnitName" />
       <el-table-column label="单价" prop="chargeAmount"></el-table-column>
-      <el-table-column label="数量" prop="amount"/>
+      <el-table-column label="数量" prop="amount" />
       <el-table-column label="金额">
         <template #default="scope">
           {{ (scope.row.chargeAmount * scope.row.amount).toFixed(2) }}
@@ -79,33 +89,29 @@ function clearXiangMuHuoYaoPinShuJu() {
       </el-table-column>
       <el-table-column label="账单码" prop="billItemName"></el-table-column>
       <el-table-column
-          label="规格"
-          prop="descriptions"
-          show-overflow-tooltip
+        label="规格"
+        prop="descriptions"
+        show-overflow-tooltip
       ></el-table-column>
       <el-table-column
-          v-if="xiangMuHuoYaoPinFlag === 1"
-          label="库存"
-          prop="stockAmount"
+        v-if="xiangMuHuoYaoPinFlag === 1"
+        label="库存"
+        prop="stockAmount"
       ></el-table-column>
       <el-table-column
-          v-if="xiangMuHuoYaoPinFlag === 1"
-          label="医保类型"
-          prop="yblx"
+        v-if="xiangMuHuoYaoPinFlag === 1"
+        label="医保类型"
+        prop="yblx"
       ></el-table-column>
     </el-table>
     <el-pagination
-        style="margin-top: 10px"
-        v-model:current-page="xiangMuHuoYaoPinShuJu.currentPage"
-        v-model:page-size="xiangMuHuoYaoPinShuJu.pageSize"
-        :total="xiangMuHuoYaoPinShuJu.data.length"
-        background
-        layout="total, sizes, prev, pager, next, jumper"
+      style="margin-top: 10px"
+      v-model:current-page="xiangMuHuoYaoPinShuJu.currentPage"
+      v-model:page-size="xiangMuHuoYaoPinShuJu.pageSize"
+      :total="xiangMuHuoYaoPinShuJu.data.length"
+      background
+      layout="total, sizes, prev, pager, next, jumper"
     >
     </el-pagination>
   </div>
 </template>
-
-<style lang="scss">
-
-</style>

+ 3 - 9
src/components/xmlr/dialog/RefundDialog.vue

@@ -1,6 +1,6 @@
 <script setup lang="ts">
 import FeeTableColumn from "@/components/xmlr/components/FeeTableColumn.vue";
-import { useYfGroupStore } from "@/pinia/use-yf-group";
+import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
 
 const props = defineProps<{
   feeTableRef: any;
@@ -9,7 +9,7 @@ const props = defineProps<{
 
 const tmpData = ref([]);
 const hasYaoPing = ref(false);
-const groupNo = ref(useYfGroupStore().getDefaultXyCode);
+const groupNo = ref(null);
 const feeTotal = ref(0);
 const feeQuantity = ref(0);
 
@@ -52,13 +52,7 @@ defineExpose({
   <div>
     <el-form inline>
       <el-form-item label="退药药房:" v-if="showGroupNo">
-        <el-select style="width: 90px" v-model="groupNo">
-          <el-option
-            v-for="item in useYfGroupStore().xy"
-            :value="item.code"
-            :label="item.name"
-          />
-        </el-select>
+        <YfGrouo v-model="groupNo" style="width: 90px" />
         请注意如果点击了【退费且退药】那么需要提交一次药单。
       </el-form-item>
       <el-form-item label="金额:">

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

@@ -33,14 +33,12 @@
       </label>
       <label>
         药房:
-        <select
+        <YfGrouo
           v-model="queryParam.groupNo"
+          style="width: 90px"
           v-title="'在新增医嘱的时候,去指定的药房查询药品。'"
-        >
-          <option v-for="item in useYfGroupStore().xy" :value="item.code">
-            {{ item.name }}
-          </option>
-        </select>
+          old-style
+        />
       </label>
       <label>
         排序:
@@ -361,7 +359,7 @@ import { useUserStore } from "@/pinia/user-store";
 import CyDateRange from "@/components/cy/date-range/CyDateRange.vue";
 import { useDialog } from "@/components/cy/CyDialog/index";
 import XEUtils from "xe-utils";
-import { useYfGroupStore } from "@/pinia/use-yf-group";
+import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
 
 const props = defineProps({
   patientInfo: {

+ 4 - 0
src/pinia/use-yf-group.ts

@@ -7,6 +7,8 @@ type CodeName = {
   isDefault: true;
 };
 
+let init = false;
+
 export const useYfGroupStore = defineStore("groupStore", {
   state: () => ({
     // 西药
@@ -47,6 +49,7 @@ export const useYfGroupStore = defineStore("groupStore", {
   },
   actions: {
     async init() {
+      if (init) return;
       const tmp = await getYpZdGroup().catch(() => {
         return {
           // 西药
@@ -58,6 +61,7 @@ export const useYfGroupStore = defineStore("groupStore", {
 
       this.xy = tmp.xy;
       this.cy = tmp.cy;
+      init = true;
     },
   },
 });

+ 3 - 8
src/views/dictionary/clinical-pathway/compoents/YzTable.vue

@@ -29,7 +29,7 @@ import {
 import { BizException, ExceptionEnum } from "@/utils/BizException";
 import FloatingFrame from "@/components/cy/floating-frame/FloatingFrame.vue";
 import { jyZdSample, orderType } from "@/views/dictionary/clinical-pathway";
-import { useYfGroupStore } from "@/pinia/use-yf-group";
+import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
 
 const props = defineProps<{
   wordId: string;
@@ -40,7 +40,7 @@ const props = defineProps<{
 const drugCache = {};
 
 const yzInfo = reactive({
-  groupNo: useYfGroupStore().getDefaultXyCode,
+  groupNo: null,
   jiLiangValue: 1,
   tableData: [],
   showFrame: false,
@@ -334,13 +334,8 @@ defineExpose<UseDialogType.Expose>({
           </option>
         </select>
       </template>
-
       药房:
-      <select v-model="yzInfo.groupNo">
-        <option v-for="item in useYfGroupStore().xy" :value="item.code">
-          {{ item.name }}
-        </option>
-      </select>
+      <YfGrouo v-model="yzInfo.groupNo" style="width: 90px" old-style />
       医嘱名称:
       <CyComboGrid
         ref="orderCodeRef"

+ 8 - 11
src/views/hospitalization/zhu-yuan-yi-sheng/cao-yao-yi-zhu/XinZhengCaoYao.vue

@@ -121,16 +121,11 @@
             </el-col>
             <el-col :span="6">
               <el-form-item class="bi_tian" label="药房:">
-                <el-select
+                <YfGrouo
                   v-model="chuFang.groupNo"
                   @change="clearHerbalInformation"
-                >
-                  <el-option
-                    v-for="item in useYfGroupStore().cy"
-                    :value="item.code"
-                    :label="item.name"
-                  />
-                </el-select>
+                  type="cy"
+                />
               </el-form-item>
             </el-col>
           </el-row>
@@ -216,11 +211,12 @@
     v-if="muBanZuJian"
     @close="muBanZuJian = false"
     @xuanZhongShuJu="dianJiXuanZhongMuBanShuJu"
+    :group-no="chuFang.groupNo"
   ></cao-yao-mu-ban>
 </template>
 
 <script setup>
-import { computed, onMounted, ref, watch } from "vue";
+import { onMounted, ref, watch } from "vue";
 import {
   cuoWuXinXi,
   huanZheXinXi,
@@ -248,6 +244,7 @@ import SystemDeptSelect from "@/components/system/dept-select/SystemDeptSelect.v
 import XEUtils from "xe-utils";
 import { useDialog } from "@/components/cy/CyDialog/index";
 import { useYfGroupStore } from "@/pinia/use-yf-group";
+import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
 
 const props = defineProps({
   saveSuccess: Function,
@@ -266,7 +263,7 @@ const chuFang = ref({
   cyFj: 0,
   cyFfcs: 0,
   cyJssm: "",
-  groupNo: useYfGroupStore().getDefaultCyCode,
+  groupNo: null,
   execDept: "",
 });
 
@@ -305,7 +302,7 @@ const wipeData = () => {
     cyFj: 0,
     cyFfcs: 0,
     cyJssm: "",
-    groupNo: useYfGroupStore().getDefaultCyCode,
+    groupNo: null,
     execDept: huanZheXinXi.value.smallDept,
   };
 };

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

@@ -38,7 +38,6 @@ import ItemInstructions from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/ItemIn
 import { useDialog } from "@/components/cy/CyDialog/index";
 import { getSendDockerPrompt } from "@/api/zhu-yuan-yi-sheng/sendDockerPrompt";
 import SendPromptDialog from "@/views/hospitalization/zhu-yuan-yi-sheng/comp/SendPromptDialog.vue";
-import { useYfGroupStore } from "@/pinia/use-yf-group";
 
 export interface PatInfo {
   inpatientNo?: string | null;
@@ -512,7 +511,7 @@ export const queryParam = ref({
   frequCode: isDev ? frequCodeEnum.all : frequCodeEnum.longTerm,
   sort: userConfig.yz_orderBySort,
   zhuangTai: 0,
-  groupNo: useYfGroupStore().getDefaultXyCode,
+  groupNo: null,
   patNo: "",
   times: 0,
   startTime: "",

+ 3 - 9
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TemplateMaintenance.vue

@@ -37,13 +37,7 @@
         药品用法
       </el-button>
       <el-divider direction="vertical"></el-divider>
-      <el-select v-model="groupNo" style="width: 90px">
-        <el-option
-          v-for="item in useYfGroupStore().xy"
-          :value="item.code"
-          :label="item.name"
-        />
-      </el-select>
+      <YfGrouo v-model="groupNo" style="width: 90px" />
     </header>
     <div class="layout_main layout_container">
       <header>
@@ -476,7 +470,7 @@ import SelectV4 from "@/components/xiao-chan/select-v4/SelectV4.vue";
 import { shortcutTrigger, xcEvent } from "@/utils/xckeydown";
 import CyComboGrid from "@/components/cy/combo-grid/src/CyComboGrid.vue";
 import { useUserStore } from "@/pinia/user-store";
-import { useYfGroupStore } from "@/pinia/use-yf-group";
+import YfGrouo from "@/components/cy/yf-group/YfGrouo.vue";
 
 const props = defineProps({
   patientInfo: {
@@ -493,7 +487,7 @@ const dataIndex = ref(-1);
 // 表格的 ref
 const elTableRef = ref(null);
 
-const groupNo = ref(useYfGroupStore().getDefaultXyCode);
+const groupNo = ref(null);
 
 const searchOrders = val => {
   return huoQuXiangMu(val, groupNo.value);

+ 17 - 0
src/views/mz-emr/emr-v2/comp/MzEmrFun.vue

@@ -65,6 +65,23 @@ const funs = [
       });
     },
   },
+  // {
+  //   name: "打印只读病历",
+  //   items: [
+  //     {
+  //       name: "页面打印",
+  //       fun: () => {
+  //         emrMutation.printReadOnly("html");
+  //       },
+  //     },
+  //     {
+  //       name: "服务打印",
+  //       fun: () => {
+  //         emrMutation.printReadOnly("server");
+  //       },
+  //     },
+  //   ],
+  // },
 ];
 </script>
 

+ 3 - 1
src/views/mz-emr/emr-v2/index.tsx

@@ -414,6 +414,9 @@ export const useMzEmrStore = () => {
         mutation.queryPatientEmr();
       });
     },
+    printReadOnly(value: "html" | "server") {
+      historyMainEdit.print(value);
+    },
   };
 
   const emrEventFun = {
@@ -457,7 +460,6 @@ export const useMzEmrStore = () => {
           JSON.stringify({
             times: 78,
             patientId: "489108-4",
-            userIdCode: "02896",
           })
         )
       );