fix เลื่อนขั้นเงินเดือน
This commit is contained in:
parent
19fa1bb447
commit
bf29f6d058
2 changed files with 21 additions and 66 deletions
|
|
@ -166,6 +166,11 @@ function inputEdit(val: boolean) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pagination = ref({
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 50,
|
||||||
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => modal.value,
|
() => modal.value,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -177,6 +182,8 @@ watch(
|
||||||
keyword.value = "";
|
keyword.value = "";
|
||||||
type.value = "";
|
type.value = "";
|
||||||
selectedData.value = [];
|
selectedData.value = [];
|
||||||
|
pagination.value.page = 1;
|
||||||
|
pagination.value.rowsPerPage = 50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -267,8 +274,7 @@ watch(
|
||||||
<div class="row justify-end">ทั้งหมด {{ rows.length }} รายการ</div>
|
<div class="row justify-end">ทั้งหมด {{ rows.length }} รายการ</div>
|
||||||
|
|
||||||
<div class="col-12 q-mt-sm">
|
<div class="col-12 q-mt-sm">
|
||||||
<q-table
|
<d-table
|
||||||
class="custom-header-table"
|
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
|
@ -276,11 +282,10 @@ watch(
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
dense
|
dense
|
||||||
hide-pagination
|
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selectedData"
|
v-model:selected="selectedData"
|
||||||
:pagination="{ page: 1, rowsPerPage: total }"
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
<template v-slot:header-selection="scope">
|
<template v-slot:header-selection="scope">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
|
|
@ -336,7 +341,7 @@ watch(
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
@ -353,31 +358,4 @@ watch(
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
.custom-header-table {
|
|
||||||
height: auto;
|
|
||||||
.q-table tr:nth-child(odd) td {
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
.q-table tr:nth-child(even) td {
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr {
|
|
||||||
background: #ecebeb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr th {
|
|
||||||
position: sticky;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
/* this will be the loading indicator */
|
|
||||||
.q-table thead tr:last-child th {
|
|
||||||
/* height of all previous header rows */
|
|
||||||
top: 48px;
|
|
||||||
}
|
|
||||||
.q-table thead tr:first-child th {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,10 @@ const typeRangeOps = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const keyword = ref<string>("");
|
const keyword = ref<string>("");
|
||||||
|
const pagination = ref({
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 50,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function เรียกข้อมูลรายชื่อ
|
* function เรียกข้อมูลรายชื่อ
|
||||||
|
|
@ -177,6 +181,8 @@ watch(
|
||||||
keyword.value = "";
|
keyword.value = "";
|
||||||
type.value = "";
|
type.value = "";
|
||||||
selectedData.value = [];
|
selectedData.value = [];
|
||||||
|
pagination.value.page = 1;
|
||||||
|
pagination.value.rowsPerPage = 50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -267,8 +273,7 @@ watch(
|
||||||
<div class="row justify-end">ทั้งหมด {{ rows.length }} รายการ</div>
|
<div class="row justify-end">ทั้งหมด {{ rows.length }} รายการ</div>
|
||||||
|
|
||||||
<div class="col-12 q-mt-sm">
|
<div class="col-12 q-mt-sm">
|
||||||
<q-table
|
<d-table
|
||||||
class="custom-header-table"
|
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
|
@ -276,11 +281,10 @@ watch(
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
dense
|
dense
|
||||||
hide-pagination
|
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selectedData"
|
v-model:selected="selectedData"
|
||||||
:pagination="{ page: 1, rowsPerPage: total }"
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
<template v-slot:header-selection="scope">
|
<template v-slot:header-selection="scope">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
|
|
@ -336,7 +340,7 @@ watch(
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
@ -353,31 +357,4 @@ watch(
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
.custom-header-table {
|
|
||||||
height: auto;
|
|
||||||
.q-table tr:nth-child(odd) td {
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
.q-table tr:nth-child(even) td {
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr {
|
|
||||||
background: #ecebeb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr th {
|
|
||||||
position: sticky;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
/* this will be the loading indicator */
|
|
||||||
.q-table thead tr:last-child th {
|
|
||||||
/* height of all previous header rows */
|
|
||||||
top: 48px;
|
|
||||||
}
|
|
||||||
.q-table thead tr:first-child th {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue