Merge branch 'nice_dev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-29 10:39:03 +07:00
commit afaec35105
7 changed files with 232 additions and 108 deletions

View file

@ -1,37 +1,41 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, defineModel } from "vue";
import Header from "@/components/DialogHeader.vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
/** importComponents*/
import Header from "@/components/DialogHeader.vue";
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
/** use*/
const $q = useQuasar(); const $q = useQuasar();
const mixin = useCounterMixin();
const { dialogConfirm, success, messageError } = mixin;
/** props*/
const modal = defineModel<boolean>("modal", { required: true }); const modal = defineModel<boolean>("modal", { required: true });
const amount = defineModel<number | null>("amount", { required: true }); const amount = defineModel<number | null>("amount", { required: true });
const profileId = defineModel<string>("profileId", { required: true }); const profileId = defineModel<string>("profileId", { required: true });
const props = defineProps({ const props = defineProps({
fetchData: { fetchData: {
type: Function, type: Function,
}, },
}); });
const mixin = useCounterMixin(); /** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
const { dialogConfirm, success, messageError } = mixin;
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
function validateForm() { function validateForm() {
onSubmit(); onSubmit();
} }
/** function ปืด Popup */
function close() { function close() {
modal.value = false; modal.value = false;
amount.value = null; amount.value = null;
} }
/** function ยืนยันการบันทึกข้อมูล*/
function onSubmit() { function onSubmit() {
dialogConfirm($q, () => { dialogConfirm($q, () => {
if (amount.value !== null) { if (amount.value !== null) {

View file

@ -1,17 +1,23 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, defineModel } from "vue"; import { ref, defineModel } from "vue";
import Header from "@/components/DialogHeader.vue";
import { useCounterMixin } from "@/stores/mixin";
import type { DataOption } from "@/modules/13_salary/interface/response/Main";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import http from "@/plugins/http"; import http from "@/plugins/http";
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
import config from "@/app.config"; import config from "@/app.config";
/** importComponents*/
import Header from "@/components/DialogHeader.vue";
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
/** use*/
const $q = useQuasar(); const $q = useQuasar();
const store = useSalaryListSDataStore(); const store = useSalaryListSDataStore();
const { dialogConfirm, success, messageError, showLoader, hideLoader } =
useCounterMixin();
/** props*/
const modal = defineModel<boolean>("modal", { required: true }); const modal = defineModel<boolean>("modal", { required: true });
const profileId = defineModel<string>("profileId", { required: true }); const profileId = defineModel<string>("profileId", { required: true });
const props = defineProps({ const props = defineProps({
@ -21,11 +27,10 @@ const props = defineProps({
}, },
}); });
/** ตัวแปร*/
const group = ref<string>(""); const group = ref<string>("");
const groupRef = ref<any>(null); const groupRef = ref<any>(null);
const isReadonly = ref<boolean>(false); // const isReadonly = ref<boolean>(false); //
const mixin = useCounterMixin();
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */ /*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
function validateForm() { function validateForm() {
@ -35,11 +40,13 @@ function validateForm() {
} }
} }
/** function ปืด Popup */
function close() { function close() {
modal.value = false; modal.value = false;
group.value = ""; group.value = "";
} }
/** function ยืนยันการบันทึกข้อมูล*/
function onSubmit() { function onSubmit() {
dialogConfirm($q, () => { dialogConfirm($q, () => {
showLoader(); showLoader();

View file

@ -1,30 +1,50 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, defineModel, computed } from "vue"; import { ref, computed } from "vue";
import Header from "@/components/DialogHeader.vue";
import { useCounterMixin } from "@/stores/mixin";
import type { DataOption } from "@/modules/13_salary/interface/response/Main";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
/** importComponents*/
import Header from "@/components/DialogHeader.vue";
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
/** use*/
const $q = useQuasar(); const $q = useQuasar();
const store = useSalaryListSDataStore(); const store = useSalaryListSDataStore();
const { dialogConfirm, success, messageError, showLoader, hideLoader } =
useCounterMixin();
/**porps*/
const modal = defineModel<boolean>("modal", { required: true }); const modal = defineModel<boolean>("modal", { required: true });
const profileId = defineModel<string>("profileId", { required: true }); const profileId = defineModel<string>("profileId", { required: true });
const type = ref<string>("");
const typeRef = ref<any>(null);
const isReadonly = ref<boolean>(false); //
const mixin = useCounterMixin();
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
const props = defineProps({ const props = defineProps({
fetchData: { fetchData: {
type: Function, type: Function,
}, },
}); });
const type = ref<string>("");
const typeRef = ref<any>(null);
const isReadonly = ref<boolean>(false); //
const typeRangeOps = computed(() => {
return store.roundMainCode == "OCT"
? [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
{ id: "FULLHAFT", name: "1.5 ขั้น" },
]
: [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
];
});
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */ /*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
function validateForm() { function validateForm() {
typeRef.value.validate(); typeRef.value.validate();
@ -33,11 +53,13 @@ function validateForm() {
} }
} }
/** function ปืด Popup */
function close() { function close() {
modal.value = false; modal.value = false;
type.value = ""; type.value = "";
} }
/** function ยืนยันการบันทึกข้อมูล*/
function onSubmit() { function onSubmit() {
dialogConfirm($q, () => { dialogConfirm($q, () => {
showLoader(); showLoader();
@ -61,21 +83,6 @@ function onSubmit() {
}); });
} }
const typeRangeOps = computed(() => {
return store.roundMainCode == "OCT"
? [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
{ id: "FULLHAFT", name: "1.5 ขั้น" },
]
: [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
];
});
function inputEdit(val: boolean) { function inputEdit(val: boolean) {
return { return {
"full-width cursor-pointer inputgreen ": val, "full-width cursor-pointer inputgreen ": val,

View file

@ -1,13 +1,17 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, reactive, computed } from "vue"; import { ref, onMounted, reactive, computed } from "vue";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
/** importType*/
import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList"; import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList";
import type { DataPeriodLatest } from "@/modules/13_salary/interface/response/SalaryList"; import type {
DataPeriodLatest,
DataPeriod,
} from "@/modules/13_salary/interface/response/SalaryList";
/** importComponents*/
import TableTabType1 from "@/modules/13_salary/components/SalaryLists/TableTypePending.vue"; import TableTabType1 from "@/modules/13_salary/components/SalaryLists/TableTypePending.vue";
import TableTabType2 from "@/modules/13_salary/components/SalaryLists/TableTypeOther.vue"; import TableTabType2 from "@/modules/13_salary/components/SalaryLists/TableTypeOther.vue";
@ -16,23 +20,19 @@ import { useCounterMixin } from "@/stores/mixin";
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
/** use*/ /** use*/
const router = useRouter();
const $q = useQuasar(); const $q = useQuasar();
const store = useSalaryListSDataStore(); const store = useSalaryListSDataStore();
const { const { messageError, showLoader, hideLoader } = useCounterMixin();
date2Thai,
dialogRemove,
messageError,
showLoader,
hideLoader,
success,
} = useCounterMixin();
/** props*/
const props = defineProps({ const props = defineProps({
periodLatest: { type: Object as () => DataPeriodLatest, require: true }, periodLatest: { type: Object as () => DataPeriodLatest, require: true },
}); });
const splitterModel = ref<number>(13); const splitterModel = ref<number>(13);
const rows = ref<DataPeriod[]>([]);
/** itemsTab กลุ่ม*/
const itemsTabGroup = ref([ const itemsTabGroup = ref([
{ {
lable: "กลุ่ม 1", lable: "กลุ่ม 1",
@ -44,6 +44,7 @@ const itemsTabGroup = ref([
}, },
]); ]);
/** itemsTab ขั้น*/
const itemsTabType = computed(() => { const itemsTabType = computed(() => {
return store.roundMainCode === "OCT" return store.roundMainCode === "OCT"
? [ ? [
@ -102,6 +103,7 @@ const itemsTabType = computed(() => {
]; ];
}); });
/** itemsCard*/
const itemsCard = ref([ const itemsCard = ref([
{ {
lable: "จำนวนคนทั้งหมด", lable: "จำนวนคนทั้งหมด",
@ -110,7 +112,7 @@ const itemsCard = ref([
total: 0, total: 0,
}, },
{ {
lable: "ของจำนวนคน", lable: "15% ของจำนวนคน",
name: "group2", name: "group2",
color: "light-blue-4", color: "light-blue-4",
total: 0, total: 0,
@ -166,6 +168,19 @@ const itemsCard = ref([
}, },
]); ]);
/** ข้อมูลค้นหารายชื่อคยขึ้นเงินเดือน*/
const formFilter = reactive<DataFilter>({
page: 1,
pageSize: 10,
keyword: "",
type: store.tabType,
});
const maxPage = ref<number>(1);
/**
* function เรยกขอมลจำนวนโควต
* @param id กล
*/
async function fetchDataQuota(id: string) { async function fetchDataQuota(id: string) {
showLoader(); showLoader();
await http await http
@ -192,15 +207,10 @@ async function fetchDataQuota(id: string) {
}); });
} }
const formFilter = reactive<DataFilter>({ /**
page: 1, * function เรยกขอมลรายช
pageSize: 10, * @param id กล
keyword: "", */
type: store.tabType,
});
const maxPage = ref<number>(1);
const rows = ref<any>();
async function fetchDataPeriod(id: string) { async function fetchDataPeriod(id: string) {
rows.value = []; rows.value = [];
const formData = { const formData = {
@ -221,6 +231,7 @@ async function fetchDataPeriod(id: string) {
}); });
} }
/**function เปลี่ยนกลุ่ม*/
async function changeTabGroup() { async function changeTabGroup() {
formFilter.page = 1; formFilter.page = 1;
formFilter.pageSize = 10; formFilter.pageSize = 10;
@ -232,6 +243,7 @@ async function changeTabGroup() {
store.groupId && fetchDataPeriod(store.groupId); store.groupId && fetchDataPeriod(store.groupId);
} }
/**function เปลี่ยนขั้น*/
function changeTabType() { function changeTabType() {
formFilter.page = 1; formFilter.page = 1;
formFilter.pageSize = 10; formFilter.pageSize = 10;
@ -239,7 +251,8 @@ function changeTabType() {
store.groupId && fetchDataPeriod(store.groupId); store.groupId && fetchDataPeriod(store.groupId);
} }
function updatePagination() { /** function เรียกข้อมูลรายชื่ออีกครั้ง*/
function fetchDataPeriodNew() {
store.groupId && fetchDataPeriod(store.groupId); store.groupId && fetchDataPeriod(store.groupId);
store.groupId && fetchDataQuota(store.groupId); store.groupId && fetchDataQuota(store.groupId);
} }
@ -251,6 +264,7 @@ onMounted(async () => {
</script> </script>
<template> <template>
<!-- Tab กล -->
<q-tabs <q-tabs
v-model="store.tabGroup" v-model="store.tabGroup"
dense dense
@ -276,6 +290,7 @@ onMounted(async () => {
:key="index" :key="index"
:name="item.name" :name="item.name"
> >
<!-- Card โควต -->
<div class="row col-12 q-pa-md"> <div class="row col-12 q-pa-md">
<div class="row col-12 items-start q-gutter-md items-center"> <div class="row col-12 items-start q-gutter-md items-center">
<div <div
@ -295,7 +310,7 @@ onMounted(async () => {
</div> </div>
<div :class="`text-${item.color} text-bold`"> <div :class="`text-${item.color} text-bold`">
{{ item.total }} {{ item.total.toLocaleString() }}
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
@ -306,9 +321,9 @@ onMounted(async () => {
</div> </div>
</div> </div>
</div> </div>
<q-separator /> <q-separator />
<!-- Tab -->
<q-card flat bordered> <q-card flat bordered>
<q-splitter v-model="splitterModel" disable> <q-splitter v-model="splitterModel" disable>
<template v-slot:before> <template v-slot:before>
@ -358,14 +373,14 @@ onMounted(async () => {
:rows="rows" :rows="rows"
v-model:maxPage="maxPage" v-model:maxPage="maxPage"
v-model:formFilter="formFilter" v-model:formFilter="formFilter"
:fetchDataTable="updatePagination" :fetchDataTable="fetchDataPeriodNew"
/> />
<TableTabType2 <TableTabType2
v-else v-else
:rows="rows" :rows="rows"
v-model:maxPage="maxPage" v-model:maxPage="maxPage"
v-model:formFilter="formFilter" v-model:formFilter="formFilter"
:fetchDataTable="updatePagination" :fetchDataTable="fetchDataPeriodNew"
/> />
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>

View file

@ -6,10 +6,7 @@ import http from "@/plugins/http";
/** importType*/ /** importType*/
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
import type { import type { NewPagination } from "@/modules/13_salary/interface/index/Main";
NewPagination,
ItemsMenu,
} from "@/modules/13_salary/interface/index/Main";
import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList"; import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList";
/** importComponents*/ /** importComponents*/
@ -22,17 +19,13 @@ import DialogMoveLevel from "@/modules/13_salary/components/SalaryLists/DialogMo
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
/** use*/
const $q = useQuasar(); const $q = useQuasar();
const store = useSalaryListSDataStore(); const store = useSalaryListSDataStore();
const { const { dialogRemove, messageError, showLoader, hideLoader, success } =
date2Thai, useCounterMixin();
dialogRemove,
messageError,
showLoader,
hideLoader,
success,
} = useCounterMixin();
/** props*/
const formFilter = defineModel<DataFilter>("formFilter", { required: true }); const formFilter = defineModel<DataFilter>("formFilter", { required: true });
const maxPage = defineModel<Number>("maxPage", { required: true }); const maxPage = defineModel<Number>("maxPage", { required: true });
const props = defineProps({ const props = defineProps({
@ -42,6 +35,7 @@ const props = defineProps({
}, },
}); });
/** ข้อมูล Table*/
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
name: "no", name: "no",
@ -127,34 +121,56 @@ const visibleColumns = ref<string[]>([
"amountUse", "amountUse",
]); ]);
/** modal*/ /** modalDialog*/
const modalDialogAddPerson = ref<boolean>(false); const modalDialogAddPerson = ref<boolean>(false);
const modalDialogForm = ref<boolean>(false); const modalDialogForm = ref<boolean>(false);
const modalDialogMoveGroup = ref<boolean>(false); const modalDialogMoveGroup = ref<boolean>(false);
const modalDialogMoveLeve = ref<boolean>(false); const modalDialogMoveLeve = ref<boolean>(false);
const profileId = ref<string>("");
const amount = ref<number>(0);
/** function openPopup เพิ่มคนเลื่อนเงินเดือน*/
function onClickAddPerson() { function onClickAddPerson() {
modalDialogAddPerson.value = !modalDialogAddPerson.value; modalDialogAddPerson.value = !modalDialogAddPerson.value;
} }
const profileId = ref<string>(""); /**
const amount = ref<number>(0); * function openPopup แกไขเงนเดอน
* @param id profileId
* @param amountSalary จำนวนเงนเดอน
*
*/
function onClickEdit(id: string, amountSalary: number) { function onClickEdit(id: string, amountSalary: number) {
profileId.value = id; profileId.value = id;
amount.value = amountSalary; amount.value = amountSalary;
modalDialogForm.value = !modalDialogForm.value; modalDialogForm.value = !modalDialogForm.value;
} }
/**
* function openPopup ายกล
* @param id profileId
*
*/
function onClickMovieGroup(id: string) { function onClickMovieGroup(id: string) {
profileId.value = id; profileId.value = id;
modalDialogMoveGroup.value = !modalDialogMoveGroup.value; modalDialogMoveGroup.value = !modalDialogMoveGroup.value;
} }
/**
* function openPopup ายกข
* @param id profileId
*
*/
function onClickMoveLevel(id: string) { function onClickMoveLevel(id: string) {
profileId.value = id; profileId.value = id;
modalDialogMoveLeve.value = !modalDialogMoveLeve.value; modalDialogMoveLeve.value = !modalDialogMoveLeve.value;
} }
/**
* function นยนการลบรายช
* @param id profileId
*/
function onClickDelete(id: string) { function onClickDelete(id: string) {
dialogRemove($q, async () => { dialogRemove($q, async () => {
showLoader(); showLoader();
@ -173,19 +189,24 @@ function onClickDelete(id: string) {
}); });
} }
/** function updatePageTable*/
function updatePagePagination() { function updatePagePagination() {
props.fetchDataTable?.(); props.fetchDataTable?.();
} }
/** function updatePageSizeTable*/
function updatePageSizePagination(newPagination: NewPagination) { function updatePageSizePagination(newPagination: NewPagination) {
formFilter.value.page = 1; formFilter.value.page = 1;
formFilter.value.pageSize = newPagination.rowsPerPage; formFilter.value.pageSize = newPagination.rowsPerPage;
} }
/** function ค้นหาข้อมูล Table*/
function searchData() { function searchData() {
formFilter.value.page = 1; formFilter.value.page = 1;
props.fetchDataTable?.(); props.fetchDataTable?.();
} }
/** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/
watch( watch(
() => formFilter.value.pageSize, () => formFilter.value.pageSize,
() => { () => {

View file

@ -19,18 +19,26 @@ import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsSt
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
const store = useSalaryListSDataStore(); /** use*/
const $q = useQuasar(); const $q = useQuasar();
const { const store = useSalaryListSDataStore();
date2Thai, const { dialogRemove, messageError, showLoader, hideLoader, success } =
dialogRemove, useCounterMixin();
messageError,
showLoader,
hideLoader,
success,
} = useCounterMixin();
/** Props*/
const formFilter = defineModel<DataFilter>("formFilter", { required: true });
const maxPage = defineModel<Number>("maxPage", { required: true });
const props = defineProps({
rows: { type: Array },
fetchDataTable: {
type: Function,
},
maxPage: {
type: Number,
},
});
/** ข้อมูล Table*/
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
name: "no", name: "no",
@ -126,27 +134,20 @@ const visibleColumns = ref<string[]>([
"retired2", "retired2",
]); ]);
const formFilter = defineModel<DataFilter>("formFilter", { required: true }); /** modalDialog*/
const maxPage = defineModel<Number>("maxPage", { required: true });
const props = defineProps({
rows: { type: Array },
fetchDataTable: {
type: Function,
},
maxPage: {
type: Number,
},
});
/** modal*/
const modalDialogAddPerson = ref<boolean>(false); const modalDialogAddPerson = ref<boolean>(false);
const modalDialogForm = ref<boolean>(false); const modalDialogForm = ref<boolean>(false);
const modalDialogMoveGroup = ref<boolean>(false); const modalDialogMoveGroup = ref<boolean>(false);
const modalDialogMoveLeve = ref<boolean>(false); const modalDialogMoveLeve = ref<boolean>(false);
/** ตัวแปร*/
const profileId = ref<string>(""); const profileId = ref<string>("");
const amount = ref<number>(0); const amount = ref<number>(0);
/**
* function นยนการลบรายช
* @param id profileId
*/
function onClickDelete(id: string) { function onClickDelete(id: string) {
dialogRemove($q, async () => { dialogRemove($q, async () => {
showLoader(); showLoader();
@ -164,39 +165,62 @@ function onClickDelete(id: string) {
}); });
}); });
} }
/** function openPopup เพิ่มคนเลื่อนเงินเดือน*/
function onClickAddPerson() { function onClickAddPerson() {
modalDialogAddPerson.value = !modalDialogAddPerson.value; modalDialogAddPerson.value = !modalDialogAddPerson.value;
} }
/**
* function openPopup แกไขเงนเดอน
* @param id profileId
* @param amountSalary จำนวนเงนเดอน
*
*/
function onClickEdit(id: string, amountSalary: number) { function onClickEdit(id: string, amountSalary: number) {
profileId.value = id; profileId.value = id;
amount.value = amountSalary; amount.value = amountSalary;
modalDialogForm.value = !modalDialogForm.value; modalDialogForm.value = !modalDialogForm.value;
} }
/**
* function openPopup ายกล
* @param id profileId
*
*/
function onClickMovieGroup(id: string) { function onClickMovieGroup(id: string) {
profileId.value = id; profileId.value = id;
modalDialogMoveGroup.value = !modalDialogMoveGroup.value; modalDialogMoveGroup.value = !modalDialogMoveGroup.value;
} }
/**
* function openPopup ายกข
* @param id profileId
*
*/
function onClickMoveLevel(id: string) { function onClickMoveLevel(id: string) {
profileId.value = id; profileId.value = id;
modalDialogMoveLeve.value = !modalDialogMoveLeve.value; modalDialogMoveLeve.value = !modalDialogMoveLeve.value;
} }
/** function updatePageTable*/
function updatePagePagination() { function updatePagePagination() {
props.fetchDataTable?.(); props.fetchDataTable?.();
} }
/** function updatePageSizeTable*/
function updatePageSizePagination(newPagination: NewPagination) { function updatePageSizePagination(newPagination: NewPagination) {
formFilter.value.page = 1; formFilter.value.page = 1;
formFilter.value.pageSize = newPagination.rowsPerPage; formFilter.value.pageSize = newPagination.rowsPerPage;
} }
/** function ค้นหาข้อมูล Table*/
function searchData() { function searchData() {
formFilter.value.page = 1; formFilter.value.page = 1;
props.fetchDataTable?.(); props.fetchDataTable?.();
} }
/** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/
watch( watch(
() => formFilter.value.pageSize, () => formFilter.value.pageSize,
() => { () => {

View file

@ -74,10 +74,56 @@ interface DataPerson {
root: string; root: string;
rootId: string; rootId: string;
} }
interface DataPeriod {
amount: number;
amountSpecial: null | number;
amountUse: null | number;
child1: string | null;
child1Id: string | null;
child2: string | null;
child2Id: string | null;
child3: string | null;
child3Id: string | null;
child4: string | null;
child4Id: string | null;
citizenId: string;
createdAt: string;
createdFullName: string;
createdUserId: string;
duration: null | number;
firstName: string;
id: string;
lastName: string;
lastUpdateFullName: string;
lastUpdateUserId: string;
lastUpdatedAt: string;
orgShortName: string;
posExecutive: null | string;
posLevel: string;
posMasterNo: number;
posMasterNoPrefix: string;
posMasterNoSuffix: string;
posType: string;
position: string;
positionSalaryAmount: null | number;
prefix: string;
punish: null | string;
result: null | string;
retired: null | string;
retired2: null | string;
revisionId: string;
root: string;
rootId: string;
salaryOrgId: string;
status: string;
type: string;
}
export type { export type {
DataPeriodLatest, DataPeriodLatest,
DataPeriodQuota, DataPeriodQuota,
DataRound, DataRound,
DataAgency, DataAgency,
DataPerson, DataPerson,
DataPeriod,
}; };