รายการเลื่อน
This commit is contained in:
parent
3b02120606
commit
b76d93b734
7 changed files with 267 additions and 53 deletions
|
|
@ -36,6 +36,7 @@ export default {
|
||||||
salaryReportListsByid: (type: string, rootId: string, periodId: string) =>
|
salaryReportListsByid: (type: string, rootId: string, periodId: string) =>
|
||||||
`${salary}/report/${type}/${rootId}/${periodId}`,
|
`${salary}/report/${type}/${rootId}/${periodId}`,
|
||||||
salaryProperty: (id: string) => `${salaryPeriod}/org/property/${id}`,
|
salaryProperty: (id: string) => `${salaryPeriod}/org/property/${id}`,
|
||||||
|
salaryDashboard: `${salaryPeriod}/summary/all`,
|
||||||
|
|
||||||
/** รายการเงินเดือนลูกจ้างประจำ*/
|
/** รายการเงินเดือนลูกจ้างประจำ*/
|
||||||
salaryEmployeeChart: `${salary}/employee`,
|
salaryEmployeeChart: `${salary}/employee`,
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,8 @@ export default {
|
||||||
profileListSalaryNew: (id: string) => `${salaryNew}/${id}`,
|
profileListSalaryNew: (id: string) => `${salaryNew}/${id}`,
|
||||||
profileListSalaryHistoryNew: (profileId: string) =>
|
profileListSalaryHistoryNew: (profileId: string) =>
|
||||||
`${salaryNew}/history/${profileId}`,
|
`${salaryNew}/history/${profileId}`,
|
||||||
|
profileSalarySwapNew: (type: string, id: string) =>
|
||||||
|
`${salaryNew}/swap/${type}/${id}`,
|
||||||
|
|
||||||
// ประวัติการเปลี่ยนชื่อ-นามสกุล
|
// ประวัติการเปลี่ยนชื่อ-นามสกุล
|
||||||
profileNewChangeName: `${registryNew}changeName`,
|
profileNewChangeName: `${registryNew}changeName`,
|
||||||
|
|
@ -159,8 +161,4 @@ export default {
|
||||||
`${registryNew}changeName/${changeNameId}`,
|
`${registryNew}changeName/${changeNameId}`,
|
||||||
profileNewChangeNameHisByChangeNameId: (changeNameId: string) =>
|
profileNewChangeNameHisByChangeNameId: (changeNameId: string) =>
|
||||||
`${registryNew}changeName/history/${changeNameId}`,
|
`${registryNew}changeName/history/${changeNameId}`,
|
||||||
profileSalaryNew: `${salaryNew}`,
|
|
||||||
profileListSalaryNew: (id: string) => `${salaryNew}/${id}`,
|
|
||||||
profileListSalaryHistoryNew: (profileId: string) =>
|
|
||||||
`${salaryNew}/history/${profileId}`,
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -147,41 +147,7 @@ const pagination = ref({
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
const rows = ref<any>([
|
const rows = ref<any>([]);
|
||||||
// {
|
|
||||||
// date: new Date(),
|
|
||||||
// amount: 20000,
|
|
||||||
// positionSalaryAmount: 20000,
|
|
||||||
// mouthSalaryAmount: 20000,
|
|
||||||
// posNo: "1",
|
|
||||||
// postionTypeName: "คำแหน่งประเภท",
|
|
||||||
// positionLevelName: "ระดับ",
|
|
||||||
// salaryRef: "เอกสารอ้างอิง",
|
|
||||||
// refCommandNo: "เลขที่คำสั่ง",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// date: new Date(),
|
|
||||||
// amount: 20000,
|
|
||||||
// positionSalaryAmount: 20000,
|
|
||||||
// mouthSalaryAmount: 20000,
|
|
||||||
// posNo: "1",
|
|
||||||
// postionTypeName: "คำแหน่งประเภท",
|
|
||||||
// positionLevelName: "ระดับ",
|
|
||||||
// salaryRef: "เอกสารอ้างอิง",
|
|
||||||
// refCommandNo: "เลขที่คำสั่ง",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// date: new Date(),
|
|
||||||
// amount: 20000,
|
|
||||||
// positionSalaryAmount: 20000,
|
|
||||||
// mouthSalaryAmount: 20000,
|
|
||||||
// posNo: "1",
|
|
||||||
// postionTypeName: "คำแหน่งประเภท",
|
|
||||||
// positionLevelName: "ระดับ",
|
|
||||||
// salaryRef: "เอกสารอ้างอิง",
|
|
||||||
// refCommandNo: "เลขที่คำสั่ง",
|
|
||||||
// },
|
|
||||||
]);
|
|
||||||
|
|
||||||
const formDataSalary = reactive<FormSalaryNew>({
|
const formDataSalary = reactive<FormSalaryNew>({
|
||||||
date: null,
|
date: null,
|
||||||
|
|
@ -392,6 +358,35 @@ async function submit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSwapUp(id: string) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.profileSalarySwapNew("up", id))
|
||||||
|
.then(() => {
|
||||||
|
fetchListSalary();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function onSwapDown(id: string) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.profileSalarySwapNew("down", id))
|
||||||
|
.then(() => {
|
||||||
|
fetchListSalary();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
function onClikcHistory(id: string) {
|
function onClikcHistory(id: string) {
|
||||||
salaryId.value = id;
|
salaryId.value = id;
|
||||||
|
|
@ -476,6 +471,7 @@ onMounted(() => {
|
||||||
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
|
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
|
||||||
:disable="props.rowIndex + 1 == 1"
|
:disable="props.rowIndex + 1 == 1"
|
||||||
icon="mdi-arrow-up-bold"
|
icon="mdi-arrow-up-bold"
|
||||||
|
@click="onSwapUp(props.row.id)"
|
||||||
>
|
>
|
||||||
<!-- <q-tooltip>เลื่อนลำดับขึ้น</q-tooltip> -->
|
<!-- <q-tooltip>เลื่อนลำดับขึ้น</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -489,6 +485,7 @@ onMounted(() => {
|
||||||
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
|
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
|
||||||
:disable="rows.length == props.rowIndex + 1"
|
:disable="rows.length == props.rowIndex + 1"
|
||||||
icon="mdi-arrow-down-bold"
|
icon="mdi-arrow-down-bold"
|
||||||
|
@click="onSwapDown(props.row.id)"
|
||||||
>
|
>
|
||||||
<!-- <q-tooltip>เลื่อนลำดับลง</q-tooltip> -->
|
<!-- <q-tooltip>เลื่อนลำดับลง</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
|
||||||
|
|
@ -99,13 +99,34 @@ const itemsCardOCT = ref([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const itemsCardSpeciel = ref([
|
||||||
|
{
|
||||||
|
lable: "จำนวนคนทั้งหมด",
|
||||||
|
name: "group1",
|
||||||
|
color: "secondary",
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "เลือกไปแล้ว",
|
||||||
|
name: "group2",
|
||||||
|
color: "primary",
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "สำรอง",
|
||||||
|
name: "group2",
|
||||||
|
color: "red-6",
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const itemsCard = computed(() => {
|
const itemsCard = computed(() => {
|
||||||
const items =
|
const items =
|
||||||
store.roundMainCode === "APR"
|
store.roundMainCode === "APR"
|
||||||
? itemsCardAPR.value
|
? itemsCardAPR.value
|
||||||
: store.roundMainCode === "OCT"
|
: store.roundMainCode === "OCT"
|
||||||
? itemsCardOCT.value
|
? itemsCardOCT.value
|
||||||
: [];
|
: itemsCardSpeciel.value;
|
||||||
return items;
|
return items;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -185,6 +206,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "currentAmount",
|
field: "currentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -195,6 +221,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "sixPercentAmount",
|
field: "sixPercentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "spentAmount",
|
name: "spentAmount",
|
||||||
|
|
@ -204,6 +235,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "spentAmount",
|
field: "spentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "sixPercentSpentAmount",
|
name: "sixPercentSpentAmount",
|
||||||
|
|
@ -213,6 +249,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "sixPercentSpentAmount",
|
field: "sixPercentSpentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -223,6 +264,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "useAmount",
|
field: "useAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "remainingAmount",
|
name: "remainingAmount",
|
||||||
|
|
@ -232,6 +278,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "remainingAmount",
|
field: "remainingAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "totalBackup",
|
name: "totalBackup",
|
||||||
|
|
@ -243,13 +294,54 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const columnsSpeciel = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "org",
|
||||||
|
align: "left",
|
||||||
|
label: "หน่วยงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "org",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "total",
|
||||||
|
align: "left",
|
||||||
|
label: "จำนวนคนทั้งหมด",
|
||||||
|
sortable: true,
|
||||||
|
field: "total",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "chosen",
|
||||||
|
align: "left",
|
||||||
|
label: "เลือกไปแล้ว",
|
||||||
|
sortable: true,
|
||||||
|
field: "chosen",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "totalBackup",
|
||||||
|
align: "left",
|
||||||
|
label: "สำรอง",
|
||||||
|
sortable: true,
|
||||||
|
field: "totalBackup",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
const columns = computed(() => {
|
const columns = computed(() => {
|
||||||
const columnsss =
|
const columnsss =
|
||||||
store.roundMainCode === "APR"
|
store.roundMainCode === "APR"
|
||||||
? columnsAPR.value
|
? columnsAPR.value
|
||||||
: store.roundMainCode === "OCT"
|
: store.roundMainCode === "OCT"
|
||||||
? columnsOCT.value
|
? columnsOCT.value
|
||||||
: [];
|
: columnsSpeciel.value;
|
||||||
return columnsss;
|
return columnsss;
|
||||||
});
|
});
|
||||||
const visibleColumns = ref<string[]>(
|
const visibleColumns = ref<string[]>(
|
||||||
|
|
@ -270,9 +362,10 @@ const visibleColumns = ref<string[]>(
|
||||||
);
|
);
|
||||||
|
|
||||||
function fetchDataDashboard() {
|
function fetchDataDashboard() {
|
||||||
|
showLoader();
|
||||||
const formData = {
|
const formData = {
|
||||||
year: props?.year,
|
year: props?.year,
|
||||||
group: "",
|
group: "GROUP1",
|
||||||
period: props?.roundFilter?.id,
|
period: props?.roundFilter?.id,
|
||||||
snapshot: props?.snapShot,
|
snapshot: props?.snapShot,
|
||||||
};
|
};
|
||||||
|
|
@ -294,10 +387,17 @@ function fetchDataDashboard() {
|
||||||
itemsCardOCT.value[5].total = quota.remainingAmount;
|
itemsCardOCT.value[5].total = quota.remainingAmount;
|
||||||
itemsCardOCT.value[6].total = quota.totalBackup;
|
itemsCardOCT.value[6].total = quota.totalBackup;
|
||||||
|
|
||||||
|
itemsCardSpeciel.value[0].total = quota.total;
|
||||||
|
itemsCardSpeciel.value[1].total = quota.chosen;
|
||||||
|
itemsCardSpeciel.value[2].total = quota.totalBackup;
|
||||||
|
|
||||||
rows.value = res.data.result.salaryOrg;
|
rows.value = res.data.result.salaryOrg;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
@ -331,7 +431,16 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="`text-${item.color} text-bold`">
|
<div :class="`text-${item.color} text-bold`">
|
||||||
{{ item.total ? item.total.toLocaleString() : 0 }}
|
{{
|
||||||
|
item.total
|
||||||
|
? store.roundMainCode === "OCT"
|
||||||
|
? item.total.toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
})
|
||||||
|
: item.total
|
||||||
|
: 0
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
@ -384,7 +493,7 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div class="table_ellipsis">
|
<div class="table_ellipsis">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ const props = defineProps({
|
||||||
roundFilter: Object,
|
roundFilter: Object,
|
||||||
});
|
});
|
||||||
|
|
||||||
const gruup = ref<string>("ALL");
|
const gruup = ref<string>("");
|
||||||
const options = ref([
|
const options = ref([
|
||||||
{ id: "ALL", name: "ทั้งหมด" },
|
{ id: "", name: "ทั้งหมด" },
|
||||||
{ id: "group1", name: "กลุ่ม 1" },
|
{ id: "GROUP1", name: "กลุ่ม 1" },
|
||||||
{ id: "group2", name: "กลุ่ม 2" },
|
{ id: "GROUP2", name: "กลุ่ม 2" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** itemsCard*/
|
/** itemsCard*/
|
||||||
|
|
@ -104,6 +104,26 @@ const itemsCardOCT = ref([
|
||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const itemsCardSpeciel = ref([
|
||||||
|
{
|
||||||
|
lable: "จำนวนคนทั้งหมด",
|
||||||
|
name: "group1",
|
||||||
|
color: "secondary",
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "เลือกไปแล้ว",
|
||||||
|
name: "group2",
|
||||||
|
color: "primary",
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "สำรอง",
|
||||||
|
name: "group2",
|
||||||
|
color: "red-6",
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const itemsCard = computed(() => {
|
const itemsCard = computed(() => {
|
||||||
const items =
|
const items =
|
||||||
|
|
@ -111,7 +131,7 @@ const itemsCard = computed(() => {
|
||||||
? itemsCardAPR.value
|
? itemsCardAPR.value
|
||||||
: store.roundMainCode === "OCT"
|
: store.roundMainCode === "OCT"
|
||||||
? itemsCardOCT.value
|
? itemsCardOCT.value
|
||||||
: [];
|
: itemsCardSpeciel.value;
|
||||||
return items;
|
return items;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -191,6 +211,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "currentAmount",
|
field: "currentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -201,6 +226,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "sixPercentAmount",
|
field: "sixPercentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "spentAmount",
|
name: "spentAmount",
|
||||||
|
|
@ -210,6 +240,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "spentAmount",
|
field: "spentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "sixPercentSpentAmount",
|
name: "sixPercentSpentAmount",
|
||||||
|
|
@ -219,6 +254,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "sixPercentSpentAmount",
|
field: "sixPercentSpentAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -229,6 +269,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "useAmount",
|
field: "useAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "remainingAmount",
|
name: "remainingAmount",
|
||||||
|
|
@ -238,6 +283,11 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
field: "remainingAmount",
|
field: "remainingAmount",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) =>
|
||||||
|
Number(v).toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "totalBackup",
|
name: "totalBackup",
|
||||||
|
|
@ -249,13 +299,54 @@ const columnsOCT = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const columnsSpeciel = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "org",
|
||||||
|
align: "left",
|
||||||
|
label: "หน่วยงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "org",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "total",
|
||||||
|
align: "left",
|
||||||
|
label: "จำนวนคนทั้งหมด",
|
||||||
|
sortable: true,
|
||||||
|
field: "total",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "chosen",
|
||||||
|
align: "left",
|
||||||
|
label: "เลือกไปแล้ว",
|
||||||
|
sortable: true,
|
||||||
|
field: "chosen",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "totalBackup",
|
||||||
|
align: "left",
|
||||||
|
label: "สำรอง",
|
||||||
|
sortable: true,
|
||||||
|
field: "totalBackup",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const columns = computed(() => {
|
const columns = computed(() => {
|
||||||
const columnsss =
|
const columnsss =
|
||||||
store.roundMainCode === "APR"
|
store.roundMainCode === "APR"
|
||||||
? columnsAPR.value
|
? columnsAPR.value
|
||||||
: store.roundMainCode === "OCT"
|
: store.roundMainCode === "OCT"
|
||||||
? columnsOCT.value
|
? columnsOCT.value
|
||||||
: [];
|
: columnsSpeciel.value;
|
||||||
return columnsss;
|
return columnsss;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -277,6 +368,7 @@ const visibleColumns = ref<string[]>(
|
||||||
);
|
);
|
||||||
|
|
||||||
function fetchDataDashboard() {
|
function fetchDataDashboard() {
|
||||||
|
showLoader();
|
||||||
const formData = {
|
const formData = {
|
||||||
year: props?.year,
|
year: props?.year,
|
||||||
group: gruup.value,
|
group: gruup.value,
|
||||||
|
|
@ -284,7 +376,7 @@ function fetchDataDashboard() {
|
||||||
snapshot: props?.snapShot,
|
snapshot: props?.snapShot,
|
||||||
};
|
};
|
||||||
http
|
http
|
||||||
.post(config.API.salaryDashboardEmp, formData)
|
.post(config.API.salaryDashboard, formData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const quota = res.data.result.dashboard;
|
const quota = res.data.result.dashboard;
|
||||||
itemsCardAPR.value[0].total = quota.total;
|
itemsCardAPR.value[0].total = quota.total;
|
||||||
|
|
@ -301,10 +393,16 @@ function fetchDataDashboard() {
|
||||||
itemsCardOCT.value[5].total = quota.remainingAmount;
|
itemsCardOCT.value[5].total = quota.remainingAmount;
|
||||||
itemsCardOCT.value[6].total = quota.totalBackup;
|
itemsCardOCT.value[6].total = quota.totalBackup;
|
||||||
|
|
||||||
|
itemsCardSpeciel.value[0].total = quota.total;
|
||||||
|
itemsCardSpeciel.value[1].total = quota.chosen;
|
||||||
|
itemsCardSpeciel.value[2].total = quota.totalBackup;
|
||||||
rows.value = res.data.result.salaryOrg;
|
rows.value = res.data.result.salaryOrg;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -353,7 +451,16 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="`text-${item.color} text-bold`">
|
<div :class="`text-${item.color} text-bold`">
|
||||||
{{ item.total ? item.total.toLocaleString() : 0 }}
|
{{
|
||||||
|
item.total
|
||||||
|
? store.roundMainCode === "OCT"
|
||||||
|
? item.total.toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
})
|
||||||
|
: item.total
|
||||||
|
: 0
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
@ -405,7 +512,7 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div class="table_ellipsis">
|
<div class="table_ellipsis">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -455,6 +455,7 @@ onMounted(() => {
|
||||||
class="row col-12 q-mt-xs"
|
class="row col-12 q-mt-xs"
|
||||||
>
|
>
|
||||||
<ProcessStep
|
<ProcessStep
|
||||||
|
v-if="agencyFilter !== 'ALL'"
|
||||||
:periodId="roundFilter.id"
|
:periodId="roundFilter.id"
|
||||||
:rootId="agencyFilter"
|
:rootId="agencyFilter"
|
||||||
:get-data="getQuota"
|
:get-data="getQuota"
|
||||||
|
|
|
||||||
|
|
@ -497,6 +497,7 @@ onMounted(async () => {
|
||||||
class="row col-12 q-mt-xs"
|
class="row col-12 q-mt-xs"
|
||||||
>
|
>
|
||||||
<ProcessStep
|
<ProcessStep
|
||||||
|
v-if="agencyFilter !== 'ALL'"
|
||||||
:periodId="roundFilter.id"
|
:periodId="roundFilter.id"
|
||||||
:rootId="agencyFilter"
|
:rootId="agencyFilter"
|
||||||
:get-data="getQuota"
|
:get-data="getQuota"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue