From 2b36b70715813c81da740e4bb9ddbefa6f61ffde Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 4 Dec 2024 15:15:36 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20filte=20?= =?UTF-8?q?Table=20=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Achievement/01_ProfessionalLicense.vue | 58 +++-- .../detail/Achievement/02_Train.vue | 110 ++++++---- .../detail/Achievement/03_Insignia.vue | 79 +++---- .../Achievement/04_DeclarationHonor.vue | 82 +++---- .../Achievement/05_ResultsPerformance.vue | 69 +++--- .../detail/Employee/01_DataEmployee.vue | 20 +- .../detail/Employee/02_Employment.vue | 37 +++- .../detail/GovernmentInformation/01_Info.vue | 56 ++--- .../GovernmentInformation/02_Discipline.vue | 41 ++-- .../02_DisciplineHistory.vue | 32 ++- .../detail/GovernmentInformation/03_Leave.vue | 61 +++--- .../GovernmentInformation/03_LeaveHistory.vue | 48 ++-- .../04_PerformSpecialWork.vue | 38 ++-- .../04_PerformSpecialWorkHistory.vue | 29 ++- .../detail/Other/01_OtherInformation.vue | 42 ++-- .../Other/01_OtherInformationHistory.vue | 32 ++- .../detail/PersonalInformation/01_Profile.vue | 69 +++--- .../02_NameChangeHistory.vue | 55 ++--- .../detail/PersonalInformation/03_Address.vue | 48 ++-- .../PersonalInformation/04_FamilyNew.vue | 70 +++--- .../PersonalInformation/05_Education.vue | 207 ++++++++++-------- .../PersonalInformation/06_SpecialSkill.vue | 65 ++++-- .../detail/Salary/01_PositionSalary.vue | 60 ++--- .../Salary/01_PositionSalaryHistory.vue | 36 +-- .../detail/Salary/02_NotReceiveSalary.vue | 46 ++-- .../Salary/02_NotReceiveSalaryHistory.vue | 33 ++- 26 files changed, 841 insertions(+), 682 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/Achievement/01_ProfessionalLicense.vue b/src/modules/04_registryPerson/components/detail/Achievement/01_ProfessionalLicense.vue index bd7a08a8e..aee932914 100644 --- a/src/modules/04_registryPerson/components/detail/Achievement/01_ProfessionalLicense.vue +++ b/src/modules/04_registryPerson/components/detail/Achievement/01_ProfessionalLicense.vue @@ -25,6 +25,7 @@ const { success, date2Thai, pathRegistryEmp, + onSearchDataTable, } = mixin; const id = ref(route.params.id.toString()); @@ -44,6 +45,7 @@ const editId = ref(""); //id ที่ต้องการแก้ไ //Table Main const rows = ref([]); //รายการใบอนุญาตประกอบวิชาชีพ +const rowsMain = ref([]); //รายการใบอนุญาตประกอบวิชาชีพ const keyword = ref(""); //คำค้นหา const columns = ref([ { @@ -118,6 +120,8 @@ const pagination = ref({ //Table ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ const historyRows = ref([]); //รายการประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ +const historyRowsMain = ref([]); //รายการประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ + const historyKeyword = ref(""); //คำค้นหาประวัติแก้ไข const historyColumns = ref([ { @@ -224,9 +228,7 @@ const profesLicenseData = reactive({ profileId: id.value, }); -/** - * ยืนยันการบันทึกข้อมูล - */ +/** ยืนยันการบันทึกข้อมูล*/ function onSubmit() { dialogConfirm( $q, @@ -238,31 +240,26 @@ function onSubmit() { ); } -/** - * ปิด form ข้อมูลใบอนุญาตประกอบวิชาชีพ - */ +/** ปิด form ข้อมูลใบอนุญาตประกอบวิชาชีพ*/ function closeDialog() { dialog.value = false; } -/** - * ปิด popup ประวัติการแก้ไขข้อมูลใบอนุญาตประกอบวิชาชีพ - */ +/** ปิด popup ประวัติการแก้ไขข้อมูลใบอนุญาตประกอบวิชาชีพ*/ function closeHistoryDialog() { historyDialog.value = false; historyRows.value = []; historyKeyword.value = ""; } -/** - * fetch ข้อมูลรายการใบอนุญาตประกอบวิชาชีพ - */ +/** fetch ข้อมูลรายการใบอนุญาตประกอบวิชาชีพ*/ async function fetchData(id: string) { showLoader(); await http .get(config.API.profileNewCertificateByProfileId(id, empType.value)) .then(async (res) => { rows.value = await res.data.result; + rowsMain.value = await res.data.result; }) .catch((err) => { messageError($q, err); @@ -272,9 +269,7 @@ async function fetchData(id: string) { }); } -/** - * เคลียร์ form ข้อมูลใบอนุญาตประกอบวิชาชีพ - */ +/** เคลียร์ form ข้อมูลใบอนุญาตประกอบวิชาชีพ*/ function clearForm() { profesLicenseData.expireDate = null; profesLicenseData.issueDate = new Date(); @@ -349,15 +344,14 @@ function editData(idData: string) { }); } -/** - * fetch ข้อมูลประวัติการแก้ไขข้อมูลใบอนุญาตประกอบวิชาชีพ - */ +/** fetch ข้อมูลประวัติการแก้ไขข้อมูลใบอนุญาตประกอบวิชาชีพ*/ function fetchHistoryData(id: string) { showLoader(); http .get(config.API.profileNewCertificateHisByCertificateId(id, empType.value)) .then(async (res) => { historyRows.value = res.data.result; + historyRowsMain.value = res.data.result; }) .catch((err) => { messageError($q, err); @@ -367,6 +361,22 @@ function fetchHistoryData(id: string) { }); } +function serchDataTable() { + rows.value = onSearchDataTable( + keyword.value, + rowsMain.value, + columns.value ? columns.value : [] + ); +} + +function serchDataTableHistory() { + historyRows.value = onSearchDataTable( + historyKeyword.value, + historyRowsMain.value, + historyColumns.value ? historyColumns.value : [] + ); +} + /** * ทำงานเมื่อ Components ถูกเรียกใช้งาน */ @@ -394,7 +404,13 @@ onMounted(() => { > - + @@ -456,7 +472,6 @@ onMounted(() => { bordered :paging="true" dense - :filter="keyword.trim()" v-model:pagination="pagination" :rows-per-page-options="[20, 50, 100]" class="custom-header-table" @@ -730,6 +745,7 @@ onMounted(() => { bg-color="white" v-model="historyKeyword" label="ค้นหา" + @keydown.enter.pervent="serchDataTableHistory" >