From 628a9aae9f3ae2125161681f959ab661c828bdac Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 12 Feb 2024 10:31:37 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20ui=20?= =?UTF-8?q?=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=AA=E0=B8=A3=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=E0=B8=AD=E0=B8=B1=E0=B8=95=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=81=E0=B8=B3=E0=B8=A5=E0=B8=B1=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogFormPosition.vue | 3 ++- .../components/DialogSelectPerson.vue | 9 ++++++--- src/modules/02_organizationalNew/components/listView.vue | 5 +---- .../02_organizationalNew/components/tableTree.vue | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue index cf5ec98e3..416b77cd4 100644 --- a/src/modules/02_organizationalNew/components/DialogFormPosition.vue +++ b/src/modules/02_organizationalNew/components/DialogFormPosition.vue @@ -31,7 +31,7 @@ const props = defineProps({ orgLevel: Number, treeId: String, actionType: String, - rowId: String, + rowId: { type: String, default: "" }, fetchDataTable: Function, }); @@ -779,6 +779,7 @@ async function emitSearch(keyword: string, typeSelect: string) { label="คำค้น" hide-bottom-space :rules="[(val) => !!val || `กรุณากรอกคำค้น`]" + @keydown.enter.prevent="searchInput()" /> diff --git a/src/modules/02_organizationalNew/components/DialogSelectPerson.vue b/src/modules/02_organizationalNew/components/DialogSelectPerson.vue index d99de44ee..18f44b58e 100644 --- a/src/modules/02_organizationalNew/components/DialogSelectPerson.vue +++ b/src/modules/02_organizationalNew/components/DialogSelectPerson.vue @@ -372,10 +372,10 @@ function clearPosition() { /** callback function ทำงานเมื่อเปิด popup*/ watch( () => modal.value, - () => { + async () => { if (modal.value == true) { - clearForm(); - fetchType(); + await clearForm(); + await fetchType(); if (props.dataDetailPos) { formData.positionNo = props.dataDetailPos.posMasterNo; @@ -397,6 +397,9 @@ watch( : "-", positionArea: e.positionArea ? e.positionArea : "-", })); + if (row.value.length === 1) { + selected.value.push(row.value[0]); + } } } } diff --git a/src/modules/02_organizationalNew/components/listView.vue b/src/modules/02_organizationalNew/components/listView.vue index 61fdb52ad..1c551d81f 100644 --- a/src/modules/02_organizationalNew/components/listView.vue +++ b/src/modules/02_organizationalNew/components/listView.vue @@ -176,7 +176,6 @@ watch(
-
- ตำแหน่งทั้งหมด -
+
ตำแหน่งทั้งหมด
(false); * @param id id */ function onClickPosition(type: string, id: string) { - rowId.value = id; + rowId.value = id ? id : ""; actionType.value = type; dialogPosition.value = !dialogPosition.value; }