diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 2c83ecc79..d5a4b1194 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -909,7 +909,7 @@ onMounted(async () => { :borderless="false" :outlined="true" :hide-dropdown-icon="false" - style="min-width: 180px" + style="min-width: 320px" @update:model-value=" DataStore.searchDataTable( DataStore.typeinsignia, diff --git a/src/modules/07_insignia/components/2_Manage/Tab2.vue b/src/modules/07_insignia/components/2_Manage/Tab2.vue index 2cf81a9d4..a569f2039 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab2.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab2.vue @@ -352,7 +352,7 @@ onMounted(async () => { :borderless="false" :outlined="true" :hide-dropdown-icon="false" - style="min-width: 180px" + style="min-width: 320px" @update:model-value=" DataStore.searchDataTable( DataStore.typeinsignia, diff --git a/src/modules/07_insignia/components/2_Manage/Tab3.vue b/src/modules/07_insignia/components/2_Manage/Tab3.vue index e3bb846ed..3262f3107 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab3.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab3.vue @@ -351,7 +351,7 @@ onMounted(async () => { :borderless="false" :outlined="true" :hide-dropdown-icon="false" - style="min-width: 180px" + style="min-width: 320px" @update:model-value=" DataStore.searchDataTable( DataStore.typeinsignia, diff --git a/src/modules/07_insignia/components/3_result/DialogForm.vue b/src/modules/07_insignia/components/3_result/DialogForm.vue index 54734215d..4607b8e71 100644 --- a/src/modules/07_insignia/components/3_result/DialogForm.vue +++ b/src/modules/07_insignia/components/3_result/DialogForm.vue @@ -177,13 +177,27 @@ const formFilter = reactive({ * function เรียกรายชื่อลูกจ้างตาม id หน่วยงาน * @param id id หน่วยงาน */ -async function findlist(id: string) { - showLoader(); - +async function findlist(id: string = "", idCard: string) { + formFilter.searchKeyword = idCard; http - .get(config.API.registryNew(""), { params: formFilter }) + .get( + config.API.registryNew( + employeeClass.value === "officer" ? "" : "-employee" + ), + { + params: formFilter, + } + ) .then((res) => { - console.log(); + const data = res.data.result.data[0]; + if (data) { + fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`; // ชื่อ; + position.value = data.position; // ตำแหน่ง + } else { + notifyError($q, "ไม่พบข้อมูลเลขประจำตัวประชาชนนี้"); + } + + console.log(res); }) .catch((err) => { messageError($q, err); @@ -224,7 +238,8 @@ async function findlist(id: string) { async function fectDataByid(id: string) { showLoader(); if (props.profileType !== undefined) { - employeeClass.value = props.profileType.toString(); + // employeeClass.value = props.profileType.toString(); + employeeClass.value = "officer"; } await http .get(config.API.noteByid(id)) @@ -298,11 +313,7 @@ async function onSubmit() { /** function หาเลขประจำตัวประชาชน*/ function searchcardid() { if (cardid.value.length === 13) { - let data = listPerson.value.find((e: any) => e.citizenId === cardid.value); - if (data) { - fullName.value = data.fullname; // ชื่อ - position.value = data.positionEmployeePosition; // ตำแหน่ง - } else notifyError($q, "ไม่พบข้อมูลเลขประจำตัวประชาชนนี้"); + findlist("", cardid.value); } } diff --git a/src/modules/07_insignia/components/3_result/Dialogbody.vue b/src/modules/07_insignia/components/3_result/Dialogbody.vue index 3afb42a4a..63e65e103 100644 --- a/src/modules/07_insignia/components/3_result/Dialogbody.vue +++ b/src/modules/07_insignia/components/3_result/Dialogbody.vue @@ -1,4 +1,3 @@ -div