ทะเบียนประวัติ Position

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-24 16:34:36 +07:00
parent 24f68d129d
commit c60f2acd22
4 changed files with 732 additions and 28 deletions

View file

@ -33,15 +33,17 @@ const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
const visibleColumns = ref<string[]>([
"date",
"commandDateAffect",
"amount",
"positionSalaryAmount",
"mouthSalaryAmount",
"posNo",
"positionName",
"positionType",
"positionLevel",
"templateDoc",
"commandName",
"refCommandNo",
"remark",
"lastUpdateFullName",
"lastUpdatedAt",
]);
@ -61,11 +63,11 @@ const columns = computed(() => {
const baseColumns = ref<QTableProps["columns"]>([
{
name: "date",
name: "commandDateAffect",
align: "left",
label: "วัน เดือน ปี",
sortable: true,
field: "date",
field: "commandDateAffect",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => date2Thai(v),
@ -100,7 +102,6 @@ const baseColumns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format: (v) => Number(v).toLocaleString(),
},
{
name: "posNo",
align: "left",
@ -109,8 +110,23 @@ const baseColumns = ref<QTableProps["columns"]>([
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",
label: "ตำแหน่ง",
sortable: true,
field: "positionName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionType",
align: "left",
@ -128,14 +144,23 @@ const baseColumns = ref<QTableProps["columns"]>([
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return `${
row.positionLevel
? row.positionLevel
: row.positionCee
? row.positionCee
: "-"
}`;
},
},
{
name: "templateDoc",
name: "commandName",
align: "left",
label: "เอกสารอ้างอิง",
sortable: true,
field: "templateDoc",
field: "commandName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -147,6 +172,20 @@ const baseColumns = ref<QTableProps["columns"]>([
field: "refCommandNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.commandNo && row.commandYear
? `${row.commandNo}/${row.commandYear}`
: "";
},
},
{
name: "remark",
align: "left",
label: "หมายเหตุ",
sortable: true,
field: "remark",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "lastUpdateFullName",
@ -170,12 +209,12 @@ const baseColumns = ref<QTableProps["columns"]>([
]);
const visibleColumnsHistory = ref<string[]>([
"date",
"commandDateAffect",
"amount",
"positionSalaryAmount",
"mouthSalaryAmount",
"oc",
"position",
"positionName",
"posNo",
"positionLine",
"positionPathSide",
@ -184,8 +223,9 @@ const visibleColumnsHistory = ref<string[]>([
"positionExecutive",
"positionExecutiveSide",
"salaryClass",
"templateDoc",
"commandName",
"refCommandNo",
"remark",
"lastUpdateFullName",
"lastUpdatedAt",
]);
@ -205,11 +245,11 @@ const columnsHistory = computed(() => {
const baseColumnsHistory = ref<QTableProps["columns"]>([
{
name: "date",
name: "commandDateAffect",
align: "left",
label: "วัน เดือน ปี",
sortable: true,
field: "date",
field: "commandDateAffect",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => date2Thai(v),
@ -253,15 +293,7 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "position",
align: "left",
label: "ตำแหน่ง",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posNo",
align: "left",
@ -270,6 +302,22 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
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",
label: "ตำแหน่ง",
sortable: true,
field: "positionName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLine",
@ -335,11 +383,11 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "templateDoc",
name: "commandName",
align: "left",
label: "เอกสารอ้างอิง",
sortable: true,
field: "templateDoc",
field: "commandName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -351,6 +399,20 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
field: "refCommandNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.commandNo && row.commandYear
? `${row.commandNo}/${row.commandYear}`
: "";
},
},
{
name: "remark",
align: "left",
label: "หมายเหตุ",
sortable: true,
field: "remark",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "lastUpdateFullName",