Explorar o código

获取麻醉费用并录入

xiaochan hai 2 meses
pai
achega
2088deece7

+ 30 - 6
src/components/xmlr/components/projectInput/FeeInput.vue

@@ -18,6 +18,7 @@ import NewDialog from "@/components/xmlr/dialog/NewDialog.vue";
 import { xcMessage } from "@/utils/xiaochan-element-plus";
 import ScanCodeGun from "@/components/xmlr/dialog/ScanCodeGun.vue";
 import { needRule, ruleName } from "@/utils/public";
+import { magicApi } from "@/utils/database/magic-api-request";
 
 const { saveData, saveProxy, store, muBanRef, medicalTechnology } = inject(
   key
@@ -188,6 +189,28 @@ function 是否允许修改科室() {
   return medicalTechnology;
 }
 
+function handleSsCode() {
+  magicApi({
+    url: "/intergration/surgery/mzFee",
+    method: "get",
+    params: {
+      patNo: store.patInfo.inpatientNo,
+      times: store.patInfo.admissTimes,
+      ssCode: ssCode.value,
+    },
+  }).then((res: any[]) => {
+    if (res.length == 0) {
+      return;
+    }
+    store.chargeDate = res[0].chargeDate;
+    res.forEach(item => {
+      item.deptCode = store.patInfo.zkWard;
+    });
+
+    saveProxy.push(...res);
+  });
+}
+
 onMounted(() => {
   getWard().then(res => {
     wardData.value = res as any[];
@@ -210,6 +233,12 @@ onMounted(() => {
       <el-button icon="Tickets" type="info" @click="openScanCodeGun"
         >扫码枪
       </el-button>
+      收费日期:
+      <el-date-picker
+        v-model="store.chargeDate"
+        type="datetime"
+        style="width: 165px"
+      />
       <template v-if="是否允许修改科室()">
         病区:
         <el-select
@@ -253,18 +282,13 @@ onMounted(() => {
       <el-input
         v-model="ssCode"
         @blur="ssCode = ssCode.trim()"
+        @keydown.enter.stop="handleSsCode"
         clearable
         placeholder="请输入手术编码"
         style="width: 120px"
       />
       发票号:
       <el-input v-model="receiptNo" clearable style="width: 120px" />
-      收费日期:
-      <el-date-picker
-        v-model="store.chargeDate"
-        type="datetime"
-        style="width: 165px"
-      />
     </header>
     <div class="layout_main layout_el-table">
       <el-table

+ 10 - 12
src/components/xmlr/index.ts

@@ -43,7 +43,7 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
 
   const store = reactive({
     // 住院号
-    searchPatNo: isDev ? "005264" : "",
+    searchPatNo: isDev ? "0430621" : "",
     // 患者信息
     patInfo: {} as PatInfo,
     searchFeeParams: {
@@ -91,17 +91,15 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
           mutation.getFee();
           store.queryWard = res?.admissDept;
           store.queryDept = res?.zkWard;
-          if (needRule(ruleName.财务)) {
-            getServerDateApi()
-              .then(res => {
-                //@ts-ignore
-                store.chargeDate = res;
-              })
-              .catch(() => {
-                //@ts-ignore
-                store.chargeDate = new Date();
-              });
-          }
+          getServerDateApi()
+            .then(res => {
+              //@ts-ignore
+              store.chargeDate = res;
+            })
+            .catch(() => {
+              //@ts-ignore
+              store.chargeDate = new Date();
+            });
           return res;
         })
         .catch(() => {