diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue index 5c29f55ca..7c1839ffd 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue @@ -71,10 +71,24 @@ const baseColumns = ref([ .toString() .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "commandDateSign", + align: "left", + label: "วันที่ลงนาม", + sortable: true, + field: "commandDateSign", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "posNo", align: "left", - label: empType.value === "" ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", + label: empType.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -107,7 +121,7 @@ const baseColumns = ref([ { name: "positionType", align: "left", - label: empType.value === "-employee" ? "กลุ่มงาน" : "ประเภทตำแหน่ง", + label: empType.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -148,28 +162,6 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "amount", - align: "left", - label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", - sortable: true, - field: "amount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(v, row) { - return row.amount - ? `${row.amount.toLocaleString()}${ - row.amountSpecial !== 0 && row.amountSpecial - ? ` (${row.amountSpecial.toLocaleString()})` - : "" - }` - : "-"; - }, - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "commandNo", align: "left", @@ -194,26 +186,9 @@ const baseColumns = ref([ field: "commandCode", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return store.convertCommandCodeName(val); - }, sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "commandDateSign", - align: "left", - label: "วันที่ลงนาม", - sortable: true, - field: "commandDateSign", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => date2Thai(v), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "organization", align: "left", @@ -234,6 +209,28 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "amount", + align: "left", + label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + sortable: true, + field: "amount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(v, row) { + return row.amount + ? `${row.amount.toLocaleString()}${ + row.amountSpecial !== 0 && row.amountSpecial + ? ` (${row.amountSpecial.toLocaleString()})` + : "" + }` + : "-"; + }, + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "remark", align: "left", @@ -243,7 +240,9 @@ const baseColumns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "lastUpdateFullName", diff --git a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue index c8cd9b208..ee942abfc 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue @@ -76,10 +76,24 @@ const baseColumns = ref([ .toString() .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "commandDateSign", + align: "left", + label: "วันที่ลงนาม", + sortable: true, + field: "commandDateSign", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "posNo", align: "left", - label: empType.value === "" ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", + label: empType.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -112,7 +126,7 @@ const baseColumns = ref([ { name: "positionType", align: "left", - label: empType.value === "-employee" ? "กลุ่มงาน" : "ประเภทตำแหน่ง", + label: empType.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -153,56 +167,6 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "amount", - align: "left", - label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", - sortable: true, - field: "amount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(v, row) { - return row.amount - ? `${row.amount.toLocaleString()}${ - row.amountSpecial !== 0 && row.amountSpecial - ? ` (${row.amountSpecial.toLocaleString()})` - : "" - }` - : "-"; - }, - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "positionSalaryAmount", - align: "left", - label: "เงินประจำตำแหน่ง", - sortable: true, - field: "positionSalaryAmount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => Number(v).toLocaleString(), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "mouthSalaryAmount", - align: "left", - label: "เงินค่าตอบแทนรายเดือน", - sortable: true, - field: "mouthSalaryAmount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => Number(v).toLocaleString(), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "commandNo", align: "left", @@ -227,27 +191,9 @@ const baseColumns = ref([ field: "commandCode", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return store.convertCommandCodeName(val); - }, - sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "commandDateSign", - align: "left", - label: "วันที่ลงนาม", - sortable: true, - field: "commandDateSign", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => date2Thai(v), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "organization", align: "left", @@ -268,6 +214,57 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "amount", + align: "left", + label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + sortable: true, + field: "amount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(v, row) { + return row.amount + ? `${row.amount.toLocaleString()}${ + row.amountSpecial !== 0 && row.amountSpecial + ? ` (${row.amountSpecial.toLocaleString()})` + : "" + }` + : "-"; + }, + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "mouthSalaryAmount", + align: "left", + label: "เงินค่าตอบแทนรายเดือน", + sortable: true, + field: "mouthSalaryAmount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => Number(v).toLocaleString(), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "positionSalaryAmount", + align: "left", + label: "เงินประจำตำแหน่ง", + sortable: true, + field: "positionSalaryAmount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => Number(v).toLocaleString(), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { name: "remark", align: "left",