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