เงินเดือน เพิ่ม 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",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => Number(v).toLocaleString(),
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -401,15 +402,14 @@ async function fetchDataDashboard() {
|
|||
.post(config.API.salaryDashboard, formData)
|
||||
.then(async (res) => {
|
||||
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", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
});
|
||||
itemsCardAPR.value[2].total = quota.chosen;
|
||||
itemsCardAPR.value[3].total = quota.remaining;
|
||||
itemsCardAPR.value[4].total = quota.totalBackup;
|
||||
|
||||
itemsCardAPR.value[2].total = quota.chosen.toLocaleString();
|
||||
itemsCardAPR.value[3].total = quota.remaining.toLocaleString();
|
||||
itemsCardAPR.value[4].total = quota.totalBackup.toLocaleString();
|
||||
itemsCardOCT.value[0].total = quota.currentAmount.toLocaleString("en", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
|
|
@ -440,12 +440,11 @@ async function fetchDataDashboard() {
|
|||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
});
|
||||
itemsCardOCT.value[6].total = quota.totalBackup;
|
||||
itemsCardOCT.value[6].total = quota.totalBackup.toLocaleString();
|
||||
|
||||
itemsCardSpeciel.value[0].total = quota.total;
|
||||
itemsCardSpeciel.value[1].total = quota.chosen;
|
||||
itemsCardSpeciel.value[2].total = quota.totalBackup;
|
||||
console.log(res.data.result.salaryOrg);
|
||||
itemsCardSpeciel.value[0].total = quota.total.toLocaleString();
|
||||
itemsCardSpeciel.value[1].total = quota.chosen.toLocaleString();
|
||||
itemsCardSpeciel.value[2].total = quota.totalBackup.toLocaleString();
|
||||
|
||||
rows.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-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
{{ col.value ?? "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
|
|||
|
|
@ -390,26 +390,53 @@ function fetchDataDashboard() {
|
|||
.post(config.API.salaryDashboardEmp, formData)
|
||||
.then((res) => {
|
||||
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", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
});
|
||||
itemsCardAPR.value[2].total = quota.chosen;
|
||||
itemsCardAPR.value[3].total = quota.remaining;
|
||||
itemsCardAPR.value[4].total = quota.totalBackup;
|
||||
itemsCardAPR.value[2].total = quota.chosen.toLocaleString();
|
||||
itemsCardAPR.value[3].total = quota.remaining.toLocaleString();
|
||||
itemsCardAPR.value[4].total = quota.totalBackup.toLocaleString();
|
||||
|
||||
itemsCardOCT.value[0].total = quota.currentAmount;
|
||||
itemsCardOCT.value[1].total = quota.sixPercentAmount;
|
||||
itemsCardOCT.value[2].total = quota.spentAmount;
|
||||
itemsCardOCT.value[3].total = quota.sixPercentSpentAmount;
|
||||
itemsCardOCT.value[4].total = quota.useAmount;
|
||||
itemsCardOCT.value[5].total = quota.remainingAmount;
|
||||
itemsCardOCT.value[6].total = quota.totalBackup;
|
||||
itemsCardOCT.value[0].total = quota.currentAmount.toLocaleString("en", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
});
|
||||
itemsCardOCT.value[1].total = quota.sixPercentAmount.toLocaleString(
|
||||
"en",
|
||||
{
|
||||
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[1].total = quota.chosen;
|
||||
itemsCardSpeciel.value[2].total = quota.totalBackup;
|
||||
itemsCardSpeciel.value[0].total = quota.total.toLocaleString();
|
||||
itemsCardSpeciel.value[1].total = quota.chosen.toLocaleString();
|
||||
itemsCardSpeciel.value[2].total = quota.totalBackup.toLocaleString();
|
||||
|
||||
rows.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
|
||||
v-if="
|
||||
((isOfficer || isStaff) && snapFilter === 'SNAP2') ||
|
||||
roundFilter?.shortCode === 'SPECIAL'
|
||||
(((isOfficer || isStaff) && snapFilter === 'SNAP2') ||
|
||||
roundFilter?.shortCode === 'SPECIAL') &&
|
||||
periodLatest?.group1IsClose
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue