รายการเงินเดือน => ปรับ table เดือนตุลาคม
This commit is contained in:
parent
8ae0407aa7
commit
69ab685832
2 changed files with 55 additions and 23 deletions
|
|
@ -57,6 +57,11 @@ const itemsTabType = computed(() => {
|
|||
name: "tab1",
|
||||
type: "PENDING",
|
||||
},
|
||||
{
|
||||
lable: "รายชื่อผู้เกษียณอายุราชการ",
|
||||
name: "tab5",
|
||||
type: "RETIRE",
|
||||
},
|
||||
{
|
||||
lable: "1 ขั้น",
|
||||
name: "tab2",
|
||||
|
|
@ -77,11 +82,6 @@ const itemsTabType = computed(() => {
|
|||
name: "tab4",
|
||||
type: "NONE",
|
||||
},
|
||||
{
|
||||
lable: "รายชื่อผู้เกษียณอายุราชการ",
|
||||
name: "tab5",
|
||||
type: "RETIRE",
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
|
|
@ -230,7 +230,7 @@ function fetchDataPeriod(id: string) {
|
|||
.put(config.API.salaryListPeriodORG(id), formData)
|
||||
.then((res) => {
|
||||
rows.value = res.data.result.data;
|
||||
total.value = res.data.result.total
|
||||
total.value = res.data.result.total;
|
||||
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -384,7 +384,15 @@ onMounted(async () => {
|
|||
v-for="(item, index) in itemsTabType"
|
||||
:key="index"
|
||||
class="row"
|
||||
:style="index == 0 ? 'border-bottom: 1px solid #c8d3db;' : ''"
|
||||
:style="
|
||||
store.roundMainCode === 'OCT'
|
||||
? index === 1
|
||||
? 'border-bottom: 1px solid #c8d3db;'
|
||||
: ''
|
||||
: index === 0
|
||||
? 'border-bottom: 1px solid #c8d3db;'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
<q-tab
|
||||
class="col-12"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -121,6 +121,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "positionSalaryAmount",
|
||||
align: "left",
|
||||
|
|
@ -130,7 +131,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isRetired",
|
||||
align: "center",
|
||||
label: "เกษียณอายุ",
|
||||
sortable: false,
|
||||
field: "isRetired",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"posNo",
|
||||
|
|
@ -142,6 +153,7 @@ const visibleColumns = ref<string[]>([
|
|||
"amount",
|
||||
"amountUse",
|
||||
"positionSalaryAmount",
|
||||
"isRetired",
|
||||
]);
|
||||
|
||||
/** modalDialog*/
|
||||
|
|
@ -266,7 +278,7 @@ watch(
|
|||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
:options="store.roundMainCode === 'OCT' ? columns : columns.slice(0, 10)"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
|
|
@ -276,7 +288,7 @@ watch(
|
|||
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:columns="store.roundMainCode === 'OCT' ? columns : columns.slice(0, 10)"
|
||||
:rows="props.rows"
|
||||
row-key="id"
|
||||
flat
|
||||
|
|
@ -336,6 +348,19 @@ watch(
|
|||
}}
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else-if="
|
||||
col.name === 'isRetired' && store.roundMainCode === 'OCT'
|
||||
"
|
||||
>
|
||||
<q-icon
|
||||
name="check"
|
||||
color="primary"
|
||||
size="24px"
|
||||
v-if="props.row.isRetired"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
@ -387,19 +412,18 @@ watch(
|
|||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
ทั้งหมด {{ props.total }} รายการ
|
||||
<q-pagination
|
||||
|
||||
v-model="formFilter.page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="Number(maxPage)"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
@update:model-value="updatePagePagination()"
|
||||
></q-pagination>
|
||||
</template>
|
||||
<q-pagination
|
||||
v-model="formFilter.page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="Number(maxPage)"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
@update:model-value="updatePagePagination()"
|
||||
></q-pagination>
|
||||
</template>
|
||||
</d-table>
|
||||
|
||||
<DialogAddPerson
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue