From c0fe886321f19c2911ab15b0a6bd4f29d06398c0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 25 Mar 2025 16:58:58 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99?= =?UTF-8?q?=E0=B9=80=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99=E0=B8=84=E0=B9=88?= =?UTF-8?q?=E0=B8=B2=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_registry/03_Salary/01_Salary.vue | 20 ++++++++------ .../10_registry/03_Salary/02_Nopaid.vue | 26 +++++++++++-------- src/modules/10_registry/views/main.vue | 9 ++++--- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/modules/10_registry/03_Salary/01_Salary.vue b/src/modules/10_registry/03_Salary/01_Salary.vue index 1399784..6ce069a 100644 --- a/src/modules/10_registry/03_Salary/01_Salary.vue +++ b/src/modules/10_registry/03_Salary/01_Salary.vue @@ -38,6 +38,10 @@ const checkType = ref( const modalHistory = ref(false); /** ตัวแปรข้อมูล */ +const salaryText = computed(() => { + return link.value == "" ? "เงินเดือน" : "ค่าจ้าง"; +}); + const baseColumns = ref([ { name: "commandDateAffect", @@ -194,7 +198,7 @@ const baseColumns = ref([ { name: "amount", align: "left", - label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + label: salaryText.value, sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -503,7 +507,7 @@ const baseColumnsHistory = ref([ { name: "amount", align: "left", - label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + label: salaryText.value, sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -652,9 +656,9 @@ onMounted(async () => {
- ตำแหน่ง/เงินเดือน + {{ + `ตำแหน่ง/${salaryText}` + }} { icon="mdi-history" @click="onHistory(props.row.id)" > - ประวัติแก้ไขตำแหน่ง/เงินเดือน + {{`ประวัติแก้ไขตำแหน่ง/${salaryText}`}} @@ -756,7 +760,7 @@ onMounted(async () => { class="absolute_button" @click="onHistory(props.row.id)" > - ประวัติแก้ไขตำแหน่ง/เงินเดือน + {{`ประวัติแก้ไขตำแหน่ง/${salaryText}`}} @@ -778,7 +782,7 @@ onMounted(async () => {
+import { ref, onMounted, computed } from "vue"; import { useCounterMixin } from "@/stores/mixin"; import { useQuasar, type QTableProps } from "quasar"; -import { ref, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -28,7 +28,9 @@ const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); -/** ตัวแปรข้อมูล */ +const salaryText = computed(() => { + return link.value == "" ? "เงินเดือน" : "ค่าจ้าง"; +}); const visibleColumns = ref([ "date", @@ -220,7 +222,7 @@ const columnsHistory = ref([ }, ]); -const fileGroup = ref("เอกสารบันทึกวันที่ไม่ได้รับเงินเดือน"); +const fileGroup = ref(`เอกสารบันทึกวันที่ไม่ได้รับ${salaryText.value}`); function onHistory(id: string) { modalHistory.value = true; @@ -287,9 +289,9 @@ onMounted(async () => {
- บันทึกวันที่ไม่ได้รับเงินเดือนฯ + {{ + `บันทึกวันที่ไม่ได้รับ${salaryText}ฯ` + }} { icon="mdi-history" @click="onHistory(props.row.id)" > - ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + {{ + `ประวัติแก้ไขบันทึกวันที่ไม่ได้รับ${salaryText}ฯ` + }} @@ -412,9 +416,9 @@ onMounted(async () => { size="14px" @click="onHistory(props.row.id)" > - ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + {{ + `ประวัติแก้ไขบันทึกวันที่ไม่ได้รับ${salaryText}ฯ` + }}
@@ -438,7 +442,7 @@ onMounted(async () => { -import { ref } from "vue"; +import { ref, computed } from "vue"; import { useCounterMixin } from "@/stores/mixin"; import { useDataStore } from "@/stores/data"; import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry"; @@ -25,6 +25,9 @@ const mixin = useCounterMixin(); const { messageError, showLoader, hideLoader } = mixin; const router = useRouter(); const tab = ref("information"); +const salaryText = computed(() => { + return dataStore.officerType == "OFFICER" ? "เงินเดือน" : "ค่าจ้าง"; +}); const sizeImg = ref(""); function onResize(size: any) { @@ -210,7 +213,7 @@ function redirectToPagePetition() { class="bg-active" /> - + @@ -316,7 +319,7 @@ function redirectToPagePetition() { - ข้อมูลเงินเดือน/ค่าจ้าง + {{ `ข้อมูล${salaryText}` }}