Browse Source

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

lighter 1 month ago
parent
commit
1eddf99b8c

+ 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)
     ) {