เงินเดือน => fix bug
This commit is contained in:
parent
e4912c45de
commit
e7547d98df
5 changed files with 176 additions and 146 deletions
|
|
@ -348,6 +348,7 @@ const columnsSpeciel = ref<QTableProps["columns"]>([
|
|||
format: (v) => Number(v).toLocaleString(),
|
||||
},
|
||||
]);
|
||||
|
||||
const columns = computed(() => {
|
||||
const columnsss =
|
||||
store.roundMainCode === "APR"
|
||||
|
|
@ -371,8 +372,9 @@ const visibleColumns = ref<string[]>(
|
|||
"remainingAmount",
|
||||
"totalBackup",
|
||||
]
|
||||
: []
|
||||
: ["org", "total", "chosen", "totalBackup"]
|
||||
);
|
||||
const filter = ref<string>("");
|
||||
|
||||
function fetchDataDashboard() {
|
||||
showLoader();
|
||||
|
|
@ -462,59 +464,75 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
|
|||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
<!-- <div class="row col justify-end self-center">
|
||||
<q-btn-dropdown color="blue-5" label="ดาวน์โหลด">
|
||||
<q-list>
|
||||
<q-item
|
||||
v-for="(item, index) in store.roundMainCode === 'APR'
|
||||
? store.itemDownloadApr
|
||||
: store.roundMainCode === 'OCT'
|
||||
? store.itemDownloadOct
|
||||
: []"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickDownload(item)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-pa-md">
|
||||
<d-table
|
||||
for="table"
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
class="custom-header-table"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
<div class="row q-pa-md">
|
||||
<div class="col-12">
|
||||
<q-toolbar style="padding: 0px">
|
||||
<q-space />
|
||||
<div class="row q-col-gutter-sm">
|
||||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
v-model="filter"
|
||||
placeholder="ค้นหา"
|
||||
outlined
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
for="table"
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:filter="filter"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -360,6 +360,22 @@ const columnsSpeciel = ref<QTableProps["columns"]>([
|
|||
format: (v) => Number(v).toLocaleString(),
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>(
|
||||
store.roundMainCode === "APR"
|
||||
? ["org", "total", "chosen", "totalBackup"]
|
||||
: store.roundMainCode === "OCT"
|
||||
? [
|
||||
"org",
|
||||
"currentAmount",
|
||||
"sixPercentAmount",
|
||||
"spentAmount",
|
||||
"sixPercentSpentAmount",
|
||||
"useAmount",
|
||||
"remainingAmount",
|
||||
"totalBackup",
|
||||
]
|
||||
: ["org", "total", "fifteenPercent", "chosen", "remaining", "totalBackup"]
|
||||
);
|
||||
const columns = computed(() => {
|
||||
const columnsss =
|
||||
store.roundMainCode === "APR"
|
||||
|
|
@ -369,6 +385,7 @@ const columns = computed(() => {
|
|||
: columnsSpeciel.value;
|
||||
return columnsss;
|
||||
});
|
||||
const filter = ref<string>("");
|
||||
|
||||
/** function fetch ข้อมูลสถิติ*/
|
||||
function fetchDataDashboard() {
|
||||
|
|
@ -500,58 +517,74 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
|
|||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
<!-- <div class="row col justify-end self-center">
|
||||
<q-btn-dropdown color="blue-5" label="ดาวน์โหลด">
|
||||
<q-list>
|
||||
<q-item
|
||||
v-for="(item, index) in store.roundMainCode === 'APR'
|
||||
? store.itemDownloadApr
|
||||
: store.roundMainCode === 'OCT'
|
||||
? store.itemDownloadOct
|
||||
: []"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickDownload(item)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-pa-md">
|
||||
<d-table
|
||||
for="table"
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
<div class="row q-pa-md">
|
||||
<div class="col-12">
|
||||
<q-toolbar style="padding: 0px">
|
||||
<q-space />
|
||||
<div class="row q-col-gutter-sm">
|
||||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
v-model="filter"
|
||||
placeholder="ค้นหา"
|
||||
outlined
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
for="table"
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:filter="filter"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -356,7 +356,6 @@ function onClickDownload(data: DataOption) {
|
|||
|
||||
const modalDialogInfoCriteria = ref<boolean>(false);
|
||||
onMounted(() => {
|
||||
console.log(props.rootId);
|
||||
if (props.rootId) {
|
||||
fetchDataQuota(store.groupId);
|
||||
fetchDataPeriod(store.groupId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue