เงินเดือน เพิ่ม toLocaleString
This commit is contained in:
parent
f13832667c
commit
0c3bcd7f68
3 changed files with 54 additions and 27 deletions
|
|
@ -165,6 +165,7 @@ const columnsAPR = ref<QTableProps["columns"]>([
|
||||||
field: "total",
|
field: "total",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format: (v) => Number(v).toLocaleString(),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -401,15 +402,14 @@ async function fetchDataDashboard() {
|
||||||
.post(config.API.salaryDashboard, formData)
|
.post(config.API.salaryDashboard, formData)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const quota = await res.data.result.dashboard;
|
const quota = await res.data.result.dashboard;
|
||||||
itemsCardAPR.value[0].total = quota.total;
|
itemsCardAPR.value[0].total = quota.total.toLocaleString();
|
||||||
itemsCardAPR.value[1].total = quota.fifteenPercent.toLocaleString("en", {
|
itemsCardAPR.value[1].total = quota.fifteenPercent.toLocaleString("en", {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2,
|
maximumFractionDigits: 2,
|
||||||
});
|
});
|
||||||
itemsCardAPR.value[2].total = quota.chosen;
|
itemsCardAPR.value[2].total = quota.chosen.toLocaleString();
|
||||||
itemsCardAPR.value[3].total = quota.remaining;
|
itemsCardAPR.value[3].total = quota.remaining.toLocaleString();
|
||||||
itemsCardAPR.value[4].total = quota.totalBackup;
|
itemsCardAPR.value[4].total = quota.totalBackup.toLocaleString();
|
||||||
|
|
||||||
itemsCardOCT.value[0].total = quota.currentAmount.toLocaleString("en", {
|
itemsCardOCT.value[0].total = quota.currentAmount.toLocaleString("en", {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2,
|
maximumFractionDigits: 2,
|
||||||
|
|
@ -440,12 +440,11 @@ async function fetchDataDashboard() {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2,
|
maximumFractionDigits: 2,
|
||||||
});
|
});
|
||||||
itemsCardOCT.value[6].total = quota.totalBackup;
|
itemsCardOCT.value[6].total = quota.totalBackup.toLocaleString();
|
||||||
|
|
||||||
itemsCardSpeciel.value[0].total = quota.total;
|
itemsCardSpeciel.value[0].total = quota.total.toLocaleString();
|
||||||
itemsCardSpeciel.value[1].total = quota.chosen;
|
itemsCardSpeciel.value[1].total = quota.chosen.toLocaleString();
|
||||||
itemsCardSpeciel.value[2].total = quota.totalBackup;
|
itemsCardSpeciel.value[2].total = quota.totalBackup.toLocaleString();
|
||||||
console.log(res.data.result.salaryOrg);
|
|
||||||
|
|
||||||
rows.value = res.data.result.salaryOrg;
|
rows.value = res.data.result.salaryOrg;
|
||||||
rowsData.value = res.data.result.salaryOrg;
|
rowsData.value = res.data.result.salaryOrg;
|
||||||
|
|
@ -586,7 +585,7 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<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 ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -390,26 +390,53 @@ function fetchDataDashboard() {
|
||||||
.post(config.API.salaryDashboardEmp, formData)
|
.post(config.API.salaryDashboardEmp, 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.toLocaleString();
|
||||||
itemsCardAPR.value[1].total = quota.fifteenPercent.toLocaleString("en", {
|
itemsCardAPR.value[1].total = quota.fifteenPercent.toLocaleString("en", {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2,
|
maximumFractionDigits: 2,
|
||||||
});
|
});
|
||||||
itemsCardAPR.value[2].total = quota.chosen;
|
itemsCardAPR.value[2].total = quota.chosen.toLocaleString();
|
||||||
itemsCardAPR.value[3].total = quota.remaining;
|
itemsCardAPR.value[3].total = quota.remaining.toLocaleString();
|
||||||
itemsCardAPR.value[4].total = quota.totalBackup;
|
itemsCardAPR.value[4].total = quota.totalBackup.toLocaleString();
|
||||||
|
|
||||||
itemsCardOCT.value[0].total = quota.currentAmount;
|
itemsCardOCT.value[0].total = quota.currentAmount.toLocaleString("en", {
|
||||||
itemsCardOCT.value[1].total = quota.sixPercentAmount;
|
minimumFractionDigits: 2,
|
||||||
itemsCardOCT.value[2].total = quota.spentAmount;
|
maximumFractionDigits: 2,
|
||||||
itemsCardOCT.value[3].total = quota.sixPercentSpentAmount;
|
});
|
||||||
itemsCardOCT.value[4].total = quota.useAmount;
|
itemsCardOCT.value[1].total = quota.sixPercentAmount.toLocaleString(
|
||||||
itemsCardOCT.value[5].total = quota.remainingAmount;
|
"en",
|
||||||
itemsCardOCT.value[6].total = quota.totalBackup;
|
{
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
itemsCardOCT.value[2].total = quota.spentAmount.toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
});
|
||||||
|
itemsCardOCT.value[3].total = quota.sixPercentSpentAmount.toLocaleString(
|
||||||
|
"en",
|
||||||
|
{
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
itemsCardOCT.value[4].total = quota.useAmount.toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
});
|
||||||
|
itemsCardOCT.value[5].total = quota.remainingAmount.toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
});
|
||||||
|
itemsCardOCT.value[6].total = quota.totalBackup.toLocaleString("en", {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
});
|
||||||
|
|
||||||
itemsCardSpeciel.value[0].total = quota.total;
|
itemsCardSpeciel.value[0].total = quota.total.toLocaleString();
|
||||||
itemsCardSpeciel.value[1].total = quota.chosen;
|
itemsCardSpeciel.value[1].total = quota.chosen.toLocaleString();
|
||||||
itemsCardSpeciel.value[2].total = quota.totalBackup;
|
itemsCardSpeciel.value[2].total = quota.totalBackup.toLocaleString();
|
||||||
|
|
||||||
rows.value = res.data.result.salaryOrg;
|
rows.value = res.data.result.salaryOrg;
|
||||||
rowsData.value = res.data.result.salaryOrg;
|
rowsData.value = res.data.result.salaryOrg;
|
||||||
|
|
|
||||||
|
|
@ -405,8 +405,9 @@ onMounted(async () => {
|
||||||
<div class="row q-col-gutter-sm items-center q-py-xs">
|
<div class="row q-col-gutter-sm items-center q-py-xs">
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
((isOfficer || isStaff) && snapFilter === 'SNAP2') ||
|
(((isOfficer || isStaff) && snapFilter === 'SNAP2') ||
|
||||||
roundFilter?.shortCode === 'SPECIAL'
|
roundFilter?.shortCode === 'SPECIAL') &&
|
||||||
|
periodLatest?.group1IsClose
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue