diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue index a9d0551a5..23dafab82 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, getSummary: Function, }); @@ -781,6 +781,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 a4d38275e..02dc8fc88 100644 --- a/src/modules/02_organizationalNew/components/DialogSelectPerson.vue +++ b/src/modules/02_organizationalNew/components/DialogSelectPerson.vue @@ -377,10 +377,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; @@ -402,6 +402,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; }