(0);
+/**
+ * function openPopup แก้ไขเงินเดือน
+ * @param id profileId
+ * @param amountSalary จำนวนเงินเดือน
+ *
+ */
function onClickEdit(id: string, amountSalary: number) {
profileId.value = id;
amount.value = amountSalary;
modalDialogForm.value = !modalDialogForm.value;
}
+/**
+ * function openPopup ย้ายกลุ่ม
+ * @param id profileId
+ *
+ */
function onClickMovieGroup(id: string) {
profileId.value = id;
modalDialogMoveGroup.value = !modalDialogMoveGroup.value;
}
+/**
+ * function openPopup ย้ายกขั้น
+ * @param id profileId
+ *
+ */
function onClickMoveLevel(id: string) {
profileId.value = id;
modalDialogMoveLeve.value = !modalDialogMoveLeve.value;
}
+/**
+ * function ยืนยันการลบรายชื่อ
+ * @param id profileId
+ */
function onClickDelete(id: string) {
dialogRemove($q, async () => {
showLoader();
@@ -173,19 +209,24 @@ function onClickDelete(id: string) {
});
}
+/** function updatePageTable*/
function updatePagePagination() {
props.fetchDataTable?.();
}
+/** function updatePageSizeTable*/
function updatePageSizePagination(newPagination: NewPagination) {
formFilter.value.page = 1;
formFilter.value.pageSize = newPagination.rowsPerPage;
}
+/** function ค้นหาข้อมูล Table*/
function searchData() {
formFilter.value.page = 1;
props.fetchDataTable?.();
}
+
+/** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/
watch(
() => formFilter.value.pageSize,
() => {
@@ -268,10 +309,23 @@ watch(
}}
- {{ props.row.amount.toLocaleString() }}
+ {{
+ props.row.amount !== null ? props.row.amount.toLocaleString() : ""
+ }}
- {{ props.row.amountUse.toLocaleString() }}
+ {{
+ props.row.amountUse !== null
+ ? props.row.amountUse.toLocaleString()
+ : ""
+ }}
+
+
+ {{
+ props.row.positionSalaryAmount !== null
+ ? props.row.positionSalaryAmount.toLocaleString()
+ : ""
+ }}
diff --git a/src/modules/13_salary/components/SalaryLists/TableTypePending.vue b/src/modules/13_salary/components/SalaryLists/TableTypePending.vue
index fc4a24453..952b0ec9c 100644
--- a/src/modules/13_salary/components/SalaryLists/TableTypePending.vue
+++ b/src/modules/13_salary/components/SalaryLists/TableTypePending.vue
@@ -19,18 +19,26 @@ import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsSt
import http from "@/plugins/http";
import config from "@/app.config";
-const store = useSalaryListSDataStore();
-
+/** use*/
const $q = useQuasar();
-const {
- date2Thai,
- dialogRemove,
- messageError,
- showLoader,
- hideLoader,
- success,
-} = useCounterMixin();
+const store = useSalaryListSDataStore();
+const { dialogRemove, messageError, showLoader, hideLoader, success } =
+ useCounterMixin();
+/** Props*/
+const formFilter = defineModel("formFilter", { required: true });
+const maxPage = defineModel("maxPage", { required: true });
+const props = defineProps({
+ rows: { type: Array },
+ fetchDataTable: {
+ type: Function,
+ },
+ maxPage: {
+ type: Number,
+ },
+});
+
+/** ข้อมูล Table*/
const columns = ref([
{
name: "no",
@@ -53,7 +61,7 @@ const columns = ref([
{
name: "position",
align: "left",
- label: "ตำแหน่ง",
+ label: "ตำแหน่งในสายงาน",
field: "position",
sortable: true,
headerStyle: "font-size: 14px",
@@ -126,27 +134,20 @@ const visibleColumns = ref([
"retired2",
]);
-const formFilter = defineModel("formFilter", { required: true });
-const maxPage = defineModel("maxPage", { required: true });
-const props = defineProps({
- rows: { type: Array },
- fetchDataTable: {
- type: Function,
- },
- maxPage: {
- type: Number,
- },
-});
-
-/** modal*/
+/** modalDialog*/
const modalDialogAddPerson = ref(false);
const modalDialogForm = ref(false);
const modalDialogMoveGroup = ref(false);
const modalDialogMoveLeve = ref(false);
+/** ตัวแปร*/
const profileId = ref("");
const amount = ref(0);
+/**
+ * function ยืนยันการลบรายชื่อ
+ * @param id profileId
+ */
function onClickDelete(id: string) {
dialogRemove($q, async () => {
showLoader();
@@ -164,39 +165,62 @@ function onClickDelete(id: string) {
});
});
}
+
+/** function openPopup เพิ่มคนเลื่อนเงินเดือน*/
function onClickAddPerson() {
modalDialogAddPerson.value = !modalDialogAddPerson.value;
}
+/**
+ * function openPopup แก้ไขเงินเดือน
+ * @param id profileId
+ * @param amountSalary จำนวนเงินเดือน
+ *
+ */
function onClickEdit(id: string, amountSalary: number) {
profileId.value = id;
amount.value = amountSalary;
modalDialogForm.value = !modalDialogForm.value;
}
+/**
+ * function openPopup ย้ายกลุ่ม
+ * @param id profileId
+ *
+ */
function onClickMovieGroup(id: string) {
profileId.value = id;
modalDialogMoveGroup.value = !modalDialogMoveGroup.value;
}
+/**
+ * function openPopup ย้ายกขั้น
+ * @param id profileId
+ *
+ */
function onClickMoveLevel(id: string) {
profileId.value = id;
modalDialogMoveLeve.value = !modalDialogMoveLeve.value;
}
+/** function updatePageTable*/
function updatePagePagination() {
props.fetchDataTable?.();
}
+/** function updatePageSizeTable*/
function updatePageSizePagination(newPagination: NewPagination) {
formFilter.value.page = 1;
formFilter.value.pageSize = newPagination.rowsPerPage;
}
+/** function ค้นหาข้อมูล Table*/
function searchData() {
formFilter.value.page = 1;
props.fetchDataTable?.();
}
+
+/** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/
watch(
() => formFilter.value.pageSize,
() => {
diff --git a/src/modules/13_salary/interface/response/SalaryList.ts b/src/modules/13_salary/interface/response/SalaryList.ts
index 7c8ea0350..d32951527 100644
--- a/src/modules/13_salary/interface/response/SalaryList.ts
+++ b/src/modules/13_salary/interface/response/SalaryList.ts
@@ -74,10 +74,56 @@ interface DataPerson {
root: 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 {
DataPeriodLatest,
DataPeriodQuota,
DataRound,
DataAgency,
DataPerson,
+ DataPeriod,
};