From 9912c0c068c414ff130b6655c6e27d51fb2200c5 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 22 May 2025 17:37:24 +0700 Subject: [PATCH] modify display order column position salary --- .../views/edit/components/Table.vue | 177 +++++++++--------- 1 file changed, 89 insertions(+), 88 deletions(-) diff --git a/src/modules/04_registryPerson/views/edit/components/Table.vue b/src/modules/04_registryPerson/views/edit/components/Table.vue index aef4b53a1..90f6edbfb 100644 --- a/src/modules/04_registryPerson/views/edit/components/Table.vue +++ b/src/modules/04_registryPerson/views/edit/components/Table.vue @@ -65,48 +65,6 @@ const baseColumns = ref([ style: "font-size: 14px", format: (v) => date2Thai(v), }, - { - name: "commandDateSign", - align: "left", - label: "วันที่ลงนาม", - sortable: false, - field: "commandDateSign", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => date2Thai(v), - }, - { - name: "posNumCodeSit", - align: "left", - label: "หน่วยงานที่ออกคำสั่ง", - sortable: false, - field: "posNumCodeSit", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(val, row) { - return row.posNumCodeSitAbb && row.posNumCodeSit - ? `${row.posNumCodeSit} (${row.posNumCodeSitAbb})` - : row.posNumCodeSit - ? row.posNumCodeSit - : "-"; - }, - }, - { - name: "posNo", - align: "left", - label: empType.value === "employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง", - sortable: false, - field: "posNo", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(val, row) { - return row.posNoAbb && row.posNo - ? `${row.posNoAbb} ${row.posNo}` - : row.posNo - ? row.posNo - : "-"; - }, - }, { name: "positionName", align: "left", @@ -152,50 +110,6 @@ const baseColumns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, - { - name: "commandNo", - align: "left", - label: "เลขที่คำสั่ง", - sortable: false, - field: "commandNo", - format(val, row) { - return row.commandNo && row.commandYear - ? `${row.commandNo}/${Number(row.commandYear) + 543}` - : ""; - }, - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "commandCode", - align: "left", - label: "ประเภทคำสั่ง", - sortable: false, - field: "commandCode", - format(val, row) { - return store.convertCommandCodeName(val); - }, - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "organization", - align: "left", - label: "สังกัด", - sortable: false, - field: "organization", - headerStyle: "font-size: 14px;min-width: 280px", - style: "font-size: 14px", - format(val, row) { - return findOrgName({ - root: row.orgRoot, - child1: row.orgChild1, - child2: row.orgChild2, - child3: row.orgChild3, - child4: row.orgChild4, - }); - }, - }, { name: "amount", align: "left", @@ -234,7 +148,92 @@ const baseColumns = ref([ style: "font-size: 14px", format: (v) => Number(v).toLocaleString(), }, - + { + name: "organization", + align: "left", + label: "สังกัด", + sortable: false, + field: "organization", + headerStyle: "font-size: 14px;min-width: 280px", + style: "font-size: 14px", + format(val, row) { + return findOrgName({ + root: row.orgRoot, + child1: row.orgChild1, + child2: row.orgChild2, + child3: row.orgChild3, + child4: row.orgChild4, + }); + }, + }, + { + name: "posNo", + align: "left", + label: empType.value === "employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง", + sortable: false, + field: "posNo", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(val, row) { + return row.posNoAbb && row.posNo + ? `${row.posNoAbb} ${row.posNo}` + : row.posNo + ? row.posNo + : "-"; + }, + }, + { + name: "posNumCodeSit", + align: "left", + label: "หน่วยงานที่ออกคำสั่ง", + sortable: false, + field: "posNumCodeSit", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(val, row) { + return row.posNumCodeSitAbb && row.posNumCodeSit + ? `${row.posNumCodeSit} (${row.posNumCodeSitAbb})` + : row.posNumCodeSit + ? row.posNumCodeSit + : "-"; + }, + }, + { + name: "commandNo", + align: "left", + label: "เลขที่คำสั่ง", + sortable: false, + field: "commandNo", + format(val, row) { + return row.commandNo && row.commandYear + ? `${row.commandNo}/${Number(row.commandYear) + 543}` + : ""; + }, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "commandDateSign", + align: "left", + label: "วันที่ลงนาม", + sortable: false, + field: "commandDateSign", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + }, + { + name: "commandCode", + align: "left", + label: "ประเภทคำสั่ง", + sortable: false, + field: "commandCode", + format(val, row) { + return store.convertCommandCodeName(val); + }, + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "remark", align: "left", @@ -414,7 +413,9 @@ onMounted(() => {