From 94a7a81e1f72a42d5c567208782126fa229effa1 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 26 Mar 2024 17:22:35 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=A3?= =?UTF-8?q?=E0=B8=AD=E0=B8=9A=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=82=E0=B8=B6?= =?UTF-8?q?=E0=B9=89=E0=B8=99=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80?= =?UTF-8?q?=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../13_salary/interface/response/Main.ts | 1 + src/modules/13_salary/store/SalaryStore.ts | 1 + src/modules/13_salary/views/salaryRound.vue | 51 +++++++++++-------- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/src/modules/13_salary/interface/response/Main.ts b/src/modules/13_salary/interface/response/Main.ts index e6495d3bb..e455fd2bc 100644 --- a/src/modules/13_salary/interface/response/Main.ts +++ b/src/modules/13_salary/interface/response/Main.ts @@ -48,6 +48,7 @@ interface RowList { effectiveDate: Date|null|string; year: number|null; status: string|null; + revisionId: string|null; } interface Row { diff --git a/src/modules/13_salary/store/SalaryStore.ts b/src/modules/13_salary/store/SalaryStore.ts index fe3b48d22..36b86d487 100644 --- a/src/modules/13_salary/store/SalaryStore.ts +++ b/src/modules/13_salary/store/SalaryStore.ts @@ -22,6 +22,7 @@ export const useSalaryDataStore = defineStore("salaryDataStore", () => { isClose: i.isClose !== null ? i.isClose : null, effectiveDate: i.effectiveDate !== null ? i.effectiveDate : null, status: i.status !== null ? i.status : null, + revisionId: i.revisionId, })); } diff --git a/src/modules/13_salary/views/salaryRound.vue b/src/modules/13_salary/views/salaryRound.vue index d6b4be995..7c5c84242 100644 --- a/src/modules/13_salary/views/salaryRound.vue +++ b/src/modules/13_salary/views/salaryRound.vue @@ -22,7 +22,7 @@ const { date2Thai, dateToISO, dialogConfirm, - success + success, } = mixin; const dataStore = useSalaryDataStore(); const year = ref(0); @@ -52,6 +52,7 @@ const visibleColumns = ref([ "year", "effectiveDate", "isActive", + "isClose", ]); // หัวตาราง @@ -101,6 +102,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "isClose", + align: "left", + label: "สถานะการปิดรอบ", + sortable: true, + field: "isClose", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); function clickAdd() { @@ -152,7 +162,7 @@ function deleteData(id: string) { .delete(config.API.salaryPeriod() + `/${id}`) .then((res) => { getData(); - success($q,'ลบข้อมูลสำเร็จ') + success($q, "ลบข้อมูลสำเร็จ"); }) .catch((e) => { messageError($q, e); @@ -378,6 +388,9 @@ onMounted(async () => { class="text-h5" /> +
+ {{ props.row.isClose == false ? "" : "ปิดรอบแล้ว" }} +
{{ col.value }}
@@ -397,8 +410,7 @@ onMounted(async () => { clickable v-close-popup @click.stop=" - dateToISO(new Date()) >= - dateToISO(props.row.effectiveDate) + props.row.revisionId !== null ? editPopup(props.row, 'read') : editPopup(props.row, 'edit') " @@ -417,8 +429,7 @@ onMounted(async () => { />
{{ - dateToISO(new Date()) >= - dateToISO(props.row.effectiveDate) + props.row.revisionId !== null ? "ดูข้อมูล" : "แก้ไขข้อมูล" }} @@ -428,34 +439,32 @@ onMounted(async () => {
- +
ปิดรอบ