Browse Source

日期问题

xiaochan 1 tuần trước cách đây
mục cha
commit
bd9fbec5e2

+ 2 - 1
src/components/xmlr/components/projectInput/FeeInput.vue

@@ -19,6 +19,7 @@ import { xcMessage } from "@/utils/xiaochan-element-plus";
 import ScanCodeGun from "@/components/xmlr/dialog/ScanCodeGun.vue";
 import { isDev, needRule, ruleName } from "@/utils/public";
 import { magicApi } from "@/utils/database/magic-api-request";
+import dayjs from "dayjs";
 
 const { saveData, saveProxy, store, muBanRef, medicalTechnology } = inject(
   key
@@ -74,7 +75,7 @@ function handleSave() {
     orderNo: medicalTechnology ? 3 : 0,
     ledgerSn: store.patInfo.ledgerSn,
     receiptNo: receiptNo.value,
-    chargeDate: store.chargeDate,
+    chargeDate: dayjs(store.chargeDate).format("YYYY-MM-DD hh:mm:ss"),
   };
 
   if (needRule(ruleName.财务)) {

+ 4 - 1
src/components/xmlr/index.ts

@@ -15,6 +15,7 @@ import {
   getFrequency,
   getSupplyType,
 } from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+import dayjs from "dayjs";
 
 type PatInfo = {
   name?: string;
@@ -103,7 +104,9 @@ export const useXmlr = (props: XmlrProps, emits: UseDialogType.Emits) => {
             })
             .catch(() => {
               //@ts-ignore
-              store.chargeDate = new Date();
+              store.chargeDate = dayjs(new Date()).format(
+                "YYYY-MM-DD hh:mm:ss"
+              );
             });
           return res;
         })