diff --git a/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue b/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue index 5e3baf9f..e79f5630 100644 --- a/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue +++ b/openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue @@ -15,10 +15,27 @@ - + + + + @@ -625,6 +642,7 @@ import { } from "./components/outpatientregistration"; import patientInfoDialog from "./components/patientInfoDialog"; import PatientAddDialog from "./components/patientAddDialog"; +import patientList from "./components/patientList"; import { nextTick } from "vue"; const router = useRouter(); @@ -646,6 +664,8 @@ const total = ref(0); const title = ref(""); const priorityLevelOptionOptions = ref(undefined); // 优先级 const jzyyList = ref([{ value: "1", label: "其他" }]); +const showPopover = ref(false); +const patientSearchKey = ref(); // 键盘事件用 const contractNameRef = ref(null); const jzyyRef = ref(null); @@ -967,6 +987,39 @@ function handleAdd() { }); } +/** + * 姓名表单获取焦点打开列表 + */ +function handleFocus() { + showPopover.value = true; +} +/** + * 姓名表单失去焦点关闭列表 + */ +function handleBlur() { + showPopover.value = false; +} + +/** + * 搜索患者 + */ +function handleSearchPatient(value) { + patientSearchKey.value = value; +} + +/** + * 点击患者列表给表单赋值 + */ +function selsectPatient(row) { + form.value.searchKey = row.name; + form.value.name = row.name; + form.value.idCard = row.idCard; + form.value.genderEnum_enumText = row.genderEnum_enumText; + form.value.phone = row.phone; + form.value.firstEnum_enumText = row.firstEnum_enumText; + form.value.age = row.age; +} + // 设置新增参数 function transformFormData(form) { return { diff --git a/openhis-ui-vue3/src/views/doctorstation/components/patientlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/patientlist.vue index 3cd2330d..5ac58209 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/patientlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/patientlist.vue @@ -31,6 +31,7 @@ - \ No newline at end of file