瀏覽代碼

修复病案首页超过10个手术后的填写问题

lighter 1 月之前
父節點
當前提交
1eddf99b8c
共有 2 個文件被更改,包括 11 次插入0 次删除
  1. 4 0
      src/utils/validate.js
  2. 7 0
      src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

+ 4 - 0
src/utils/validate.js

@@ -203,3 +203,7 @@ export function validateCovidAnswer(answer) {
   answer.addrAdditional = "";
   return "";
 }
+
+export function isNumeric(str) {
+  return /^\d+$/.test(str);
+}

+ 7 - 0
src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

@@ -2428,6 +2428,7 @@ import { useUserStore } from "@/pinia/user-store";
 import HistorySheetExport from "@/views/hospitalization/case-front-sheet/component/HistorySheetExport.vue";
 import { useDialog } from "@/components/cy/CyDialog/index";
 import env from "../../../utils/setting";
+import {isNumeric} from "@/utils/validate.js";
 
 const userStore = useUserStore();
 const userWards = ref([]);
@@ -2839,6 +2840,12 @@ const handleSelectSearch = item => {
     let no = searchTargetCode.value.substr(
       searchTargetCode.value.length - offset
     );
+    if (!isNumeric(no)) {
+      offset = 1
+      no = searchTargetCode.value.substr(
+          searchTargetCode.value.length - offset
+      );
+    }
     switch (
       searchTargetCode.value.substr(0, searchTargetCode.value.length - offset)
     ) {