Просмотр исходного кода

修复查询出院患者后再查询在院患者有问题

xiaochan 5 месяцев назад
Родитель
Сommit
f7e4891e1c
2 измененных файлов с 4 добавлено и 6 удалено
  1. 2 3
      src/components/xmlr/components/HeaderInfo.vue
  2. 2 3
      src/components/xmlr/index.ts

+ 2 - 3
src/components/xmlr/components/HeaderInfo.vue

@@ -29,8 +29,7 @@ async function getDisList() {
     }
   }).then(res => {
     store.searchPatNo = res.inpatientNo;
-    store.searchTimes = res.admissTimes;
-    mutation.getPatInfo();
+    mutation.getPatInfo(res.admissTimes);
   })
 }
 </script>
@@ -40,7 +39,7 @@ async function getDisList() {
     住院号:
     <el-input v-model="store.searchPatNo" style="width: 120px;" clearable/>
     <el-divider direction="vertical"/>
-    <el-button icon="Search" type="primary" @click="mutation.getPatInfo">查询</el-button>
+    <el-button icon="Search" type="primary" @click="() => mutation.getPatInfo(null)">查询</el-button>
     <el-button type="info" @click="getDisList">出院</el-button>
     <el-button v-if="!medicalTechnology" type="danger" @click="mutation.closeDialog">关闭</el-button>
     <el-divider direction="vertical"/>

+ 2 - 3
src/components/xmlr/index.ts

@@ -39,7 +39,6 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
     const store = reactive({
         // 住院号
         searchPatNo: '',
-        searchTimes: null as number | null,
         // 患者信息
         patInfo: {} as PatInfo,
         searchFeeParams: {
@@ -76,8 +75,8 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
     const muBanRef = shallowRef()
 
     const mutation = {
-        async getPatInfo() {
-            await api.getPatientInfo(store.searchPatNo, store.searchTimes).then(res => {
+        async getPatInfo(times: number = null) {
+            await api.getPatientInfo(store.searchPatNo, times).then(res => {
                 store.patInfo = res
                 mutation.getFee();
                 store.queryWard = res.admissDept