fix เงินเดือนค่าจ้าง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-03-25 17:02:17 +07:00
parent c1a31a964e
commit 665b0cca24
3 changed files with 27 additions and 11 deletions

View file

@ -32,6 +32,9 @@ const {
} = useCounterMixin(); } = useCounterMixin();
const { createPathUploadFlie, getPathUploadFlie, uploadFile } = const { createPathUploadFlie, getPathUploadFlie, uploadFile } =
useRegistryNewDataStore(); useRegistryNewDataStore();
const salaryText = ref<string>(
route.name === "registryNewByid" ? "เงินเดือน" : "ค่าจ้าง"
);
const id = ref<string>(""); const id = ref<string>("");
const profileId = ref<string>( const profileId = ref<string>(
@ -166,7 +169,7 @@ const pagination = ref({
const columnsHistory = ref<QTableColumn[]>(baseColumns.value); const columnsHistory = ref<QTableColumn[]>(baseColumns.value);
const visibleColumnsHistory = ref<string[]>(baseVisibleColumns.value); const visibleColumnsHistory = ref<string[]>(baseVisibleColumns.value);
const fileGroup = ref<string>("เอกสารบันทึกวันที่ไม่ได้รับเงินเดือน"); const fileGroup = ref<string>(`เอกสารบันทึกวันที่ไม่ได้รับ${salaryText.value}`);
const fileUpload = ref<File | null>(null); const fileUpload = ref<File | null>(null);
const fileData = ref<ResFileData | null>(null); const fileData = ref<ResFileData | null>(null);
const isUpload = ref<boolean>(false); const isUpload = ref<boolean>(false);
@ -443,7 +446,9 @@ onMounted(() => {
icon="mdi-history" icon="mdi-history"
@click.stop.prevent="onClickHistory(props.row.id)" @click.stop.prevent="onClickHistory(props.row.id)"
> >
<q-tooltip>ประวนทกวนทไมไดบเงนเดอนฯ</q-tooltip> <q-tooltip>{{
`ประวัติบันทึกวันที่ไม่ได้รับ${salaryText}`
}}</q-tooltip>
</q-btn> </q-btn>
<q-btn <q-btn
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate" v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
@ -499,7 +504,9 @@ onMounted(() => {
icon="mdi-history" icon="mdi-history"
@click="onClickHistory(props.row.id)" @click="onClickHistory(props.row.id)"
> >
<q-tooltip>ประวนทกวนทไมไดบเงนเดอนฯ</q-tooltip> <q-tooltip>{{
`ประวัติบันทึกวันที่ไม่ได้รับ${salaryText}`
}}</q-tooltip>
</q-btn> </q-btn>
<q-btn <q-btn
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate" v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
@ -540,8 +547,8 @@ onMounted(() => {
<DialogHeader <DialogHeader
:tittle=" :tittle="
isStatusEdit isStatusEdit
? 'แก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ' ? `แก้ไขบันทึกวันที่ไม่ได้รับ${salaryText}`
: 'เพิ่มบันทึกวันที่ไม่ได้รับเงินเดือนฯ' : `เพิ่มบันทึกวันที่ไม่ได้รับ${salaryText}`
" "
:close="onClickCloseDialog" :close="onClickCloseDialog"
/> />
@ -789,7 +796,7 @@ onMounted(() => {
<DialogHistory <DialogHistory
v-model:modal="modalHistory" v-model:modal="modalHistory"
:visible-columns="visibleColumnsHistory" :visible-columns="visibleColumnsHistory"
:title="`ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ`" :title="`ประวัติแก้ไขบันทึกวันที่ไม่ได้รับ${salaryText}ฯ`"
:columns="columnsHistory" :columns="columnsHistory"
:fetch-data="fetchDataHistory" :fetch-data="fetchDataHistory"
/> />

View file

@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { ref } from "vue";
import { useRoute } from "vue-router";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store"; import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
@ -7,15 +8,22 @@ import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
import PositionSalary from "@/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue"; // import PositionSalary from "@/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue"; //
import NotReceiveSalary from "@/modules/04_registryPerson/components/detail/Salary/02_NotReceiveSalary.vue"; // import NotReceiveSalary from "@/modules/04_registryPerson/components/detail/Salary/02_NotReceiveSalary.vue"; //
const route = useRoute();
const storeRegistry = useRegistryNewDataStore(); const storeRegistry = useRegistryNewDataStore();
const salaryText = ref<string>(
route.name === "registryNewByid" ? "เงินเดือน" : "ค่าจ้าง"
);
const tab = ref<string>("1"); const tab = ref<string>("1");
</script> </script>
<template> <template>
<div class="row items-center q-my-md"> <div class="row items-center q-my-md">
<div class="text-dark row items-center q-px-md"> <div class="text-dark row items-center q-px-md">
<q-icon name="mdi-account" class="q-mr-md" size="22px" /> <q-icon name="mdi-account" class="q-mr-md" size="22px" />
<div class="text-subtitle1 text-weight-bold">อมลเงนเดอน/าจาง</div> <div class="text-subtitle1 text-weight-bold">
{{ `ข้อมูล${salaryText}` }}
</div>
</div> </div>
</div> </div>
@ -30,8 +38,8 @@ const tab = ref<string>("1");
dense dense
class="text-grey q-pl-sm" class="text-grey q-pl-sm"
> >
<q-tab name="1" label="เงินเดือน" /> <q-tab name="1" :label="salaryText" />
<q-tab name="2" label="บันทึกวันที่ไม่ได้รับเงินเดือนฯ" /> <q-tab name="2" :label="`บันทึกวันที่ไม่ได้รับเงิน${salaryText}ฯ`" />
</q-tabs> </q-tabs>
<q-separator /> <q-separator />

View file

@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, defineAsyncComponent } from "vue"; import { ref, defineAsyncComponent } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { useRegistryDetailNewDataStore } from "@/modules/04_registryPerson/stores/DetailMain"; import { useRegistryDetailNewDataStore } from "@/modules/04_registryPerson/stores/DetailMain";
@ -40,8 +41,8 @@ const EmployeeMain = defineAsyncComponent(
); );
const route = useRoute(); const route = useRoute();
const store = useRegistryDetailNewDataStore(); const store = useRegistryDetailNewDataStore();
const props = defineProps({ const props = defineProps({
fetchDataPersonal: { type: Function, require: true }, fetchDataPersonal: { type: Function, require: true },
}); });
@ -63,7 +64,7 @@ const itemsTab = ref<ItemTab[]>([
{ {
name: "3", name: "3",
icon: "mdi-cash", icon: "mdi-cash",
label: "เงินเดือน/ค่าจ้าง", label: route.name === "registryNewByid" ? "เงินเดือน" : "ค่าจ้าง",
}, },
{ {
name: "4", name: "4",