Merge branch 'develop' into devTee
This commit is contained in:
commit
b85a61920d
12 changed files with 618 additions and 29 deletions
|
|
@ -55,4 +55,5 @@ export default {
|
||||||
/** บรรจุแต่งตั้ง*/
|
/** บรรจุแต่งตั้ง*/
|
||||||
orgPosPlacement: `${orgPos}/placement/search`,
|
orgPosPlacement: `${orgPos}/placement/search`,
|
||||||
orgPosFind: `${organization}/find/node`,
|
orgPosFind: `${organization}/find/node`,
|
||||||
|
orgProfileProbation: `${organization}/profile/probation`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted, watch, reactive } from "vue";
|
||||||
import type { QInput, QTableProps } from "quasar";
|
import type { QInput, QTableProps } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
@ -112,12 +112,24 @@ onMounted(async () => {
|
||||||
fetchType();
|
fetchType();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** queryString*/
|
||||||
|
const formQuery = reactive({
|
||||||
|
page: 1, //*หน้า
|
||||||
|
pageSize: 10, //*จำนวนแถวต่อหน้า
|
||||||
|
keyword: "", //keyword ค้นหา
|
||||||
|
});
|
||||||
|
const maxPage = ref<number>(1);
|
||||||
|
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.registryNew)
|
.get(
|
||||||
|
config.API.registryNew +
|
||||||
|
`?page=${formQuery.page}&pageSise=${formQuery.pageSize}&keyword=${formQuery.keyword}`
|
||||||
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
store.save(res.data.result);
|
maxPage.value = Math.ceil(res.data.result.total / formQuery.pageSize);
|
||||||
|
store.save(res.data.result.data);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -284,6 +296,23 @@ watch(posTypeId, () => {
|
||||||
}, 200);
|
}, 200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch([() => formQuery.page, () => formQuery.pageSize], async () => {
|
||||||
|
await fetchData();
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function updatePagination
|
||||||
|
* @param newPagination ข้อมูล Pagination ใหม่
|
||||||
|
*/
|
||||||
|
function updatePagination(newPagination: any) {
|
||||||
|
formQuery.page = 1;
|
||||||
|
formQuery.pageSize = newPagination.rowsPerPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function filterFn(page: number) {
|
||||||
|
page !== 1 ? (formQuery.page = 1) : await fetchData();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function ตรวจสอบเลขประจำตัวประชาชน
|
* function ตรวจสอบเลขประจำตัวประชาชน
|
||||||
* @param citizenId เลขประจำตัวประชาชน
|
* @param citizenId เลขประจำตัวประชาชน
|
||||||
|
|
@ -333,7 +362,13 @@ async function changeCardID(citizenId: string | number | null) {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="row q-gutter-sm">
|
<div class="row q-gutter-sm">
|
||||||
<q-input outlined dense v-model="filterKeyword" label="ค้นหา"></q-input>
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
v-model="formQuery.keyword"
|
||||||
|
label="ค้นหา"
|
||||||
|
@keydown.enter.prevent="filterFn(formQuery.page)"
|
||||||
|
></q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -355,7 +390,6 @@ async function changeCardID(citizenId: string | number | null) {
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="store.row"
|
:rows="store.row"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="name"
|
row-key="name"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -363,6 +397,8 @@ async function changeCardID(citizenId: string | number | null) {
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
|
@update:pagination="updatePagination"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -376,7 +412,9 @@ async function changeCardID(citizenId: string | number | null) {
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{
|
||||||
|
(formQuery.page - 1) * formQuery.pageSize + props.rowIndex + 1
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'fullName'">
|
<div v-else-if="col.name == 'fullName'">
|
||||||
{{ props.row.prefix }}{{ props.row.firstName }}
|
{{ props.row.prefix }}{{ props.row.firstName }}
|
||||||
|
|
@ -432,6 +470,18 @@ async function changeCardID(citizenId: string | number | null) {
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
<q-pagination
|
||||||
|
v-model="formQuery.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="maxPage"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs, onMounted } from "vue";
|
import { ref, useAttrs, onMounted, reactive, watch } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||||
|
|
@ -171,11 +171,11 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "level",
|
name: "posLevelName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับ",
|
label: "ระดับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "level",
|
field: "posLevelName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -218,7 +218,7 @@ function ProbationMainFilter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* อัพเดท rows ตาม status
|
* อัพเดท rows ตาม status
|
||||||
* @param body {id:? , value: ?}
|
* @param body {id:? , value: ?}
|
||||||
*/
|
*/
|
||||||
function updateRows(body: any) {
|
function updateRows(body: any) {
|
||||||
|
|
@ -261,6 +261,43 @@ async function getpersonalList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const formProbation = reactive({ keyword: "", pageSize: 10, page: 1 });
|
||||||
|
const maxPage = ref<number>(1);
|
||||||
|
|
||||||
|
async function onclickAddProbation() {
|
||||||
|
modal.value = true;
|
||||||
|
modal.value && showLoader();
|
||||||
|
await http
|
||||||
|
.post(config.API.orgProfileProbation, formProbation)
|
||||||
|
.then((res) => {
|
||||||
|
maxPage.value = Math.ceil(res.data.result.total / formProbation.pageSize);
|
||||||
|
rows2.value = res.data.result.data;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
watch([() => formProbation.page, () => formProbation.pageSize], () => {
|
||||||
|
onclickAddProbation();
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function updatePagination
|
||||||
|
* @param newPagination ข้อมูล Pagination ใหม่
|
||||||
|
*/
|
||||||
|
function updatePagination(newPagination: any) {
|
||||||
|
formProbation.page = 1;
|
||||||
|
formProbation.pageSize = newPagination.rowsPerPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function filterKeyword2Fn(page: number) {
|
||||||
|
page !== 1 ? (formProbation.page = 1) : await onclickAddProbation();
|
||||||
|
}
|
||||||
|
|
||||||
/** fecth profile */
|
/** fecth profile */
|
||||||
async function fecthlistPersonal() {
|
async function fecthlistPersonal() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -335,18 +372,18 @@ async function findlist(id: string) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เพิ่มข้อมูล ผู้ทดลองปฏิบัติหน้าที่ราชการ
|
* เพิ่มข้อมูล ผู้ทดลองปฏิบัติหน้าที่ราชการ
|
||||||
* @param id personal id
|
* @param id personal id
|
||||||
*/
|
*/
|
||||||
function clickAdd(id: string) {
|
function clickAdd(data: any) {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
const postData = {
|
// const postData = {
|
||||||
personal_id: id,
|
// personal_id: id,
|
||||||
};
|
// };
|
||||||
await http
|
await http
|
||||||
.post(config.API.personalAdd(), postData)
|
.post(config.API.personalAdd(), data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getpersonalList();
|
getpersonalList();
|
||||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||||
|
|
@ -456,7 +493,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="fecthlistPersonal"
|
@click="onclickAddProbation"
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -469,7 +506,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
standout
|
standout
|
||||||
|
|
@ -577,11 +614,12 @@ onMounted(async () => {
|
||||||
class="col-12"
|
class="col-12"
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword2"
|
v-model="formProbation.keyword"
|
||||||
ref="filterRef2"
|
ref="filterRef2"
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter.prevent="filterKeyword2Fn(formProbation.page)"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||||
|
|
@ -598,7 +636,6 @@ onMounted(async () => {
|
||||||
ref="table2"
|
ref="table2"
|
||||||
:columns="columns2"
|
:columns="columns2"
|
||||||
:rows="rows2"
|
:rows="rows2"
|
||||||
:filter="filterKeyword2"
|
|
||||||
row-key="Order"
|
row-key="Order"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -608,6 +645,8 @@ onMounted(async () => {
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
:pagination-label="paginationLabel2"
|
:pagination-label="paginationLabel2"
|
||||||
v-model:pagination="pagination2"
|
v-model:pagination="pagination2"
|
||||||
|
@update:pagination="updatePagination"
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -629,18 +668,66 @@ onMounted(async () => {
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{
|
||||||
|
(formProbation.page - 1) * formProbation.pageSize +
|
||||||
|
props.rowIndex +
|
||||||
|
1
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="col.name == 'fullname'">
|
||||||
|
{{
|
||||||
|
props.row.prefix +
|
||||||
|
props.row.firstName +
|
||||||
|
" " +
|
||||||
|
props.row.lastName
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'status'" class="text-center">
|
<div v-else-if="col.name == 'status'" class="text-center">
|
||||||
<q-icon
|
<q-icon
|
||||||
v-if="col.value === true"
|
v-if="props.row.isProbation === true"
|
||||||
name="mdi-check"
|
name="mdi-check"
|
||||||
color="positive"
|
color="positive"
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="col.name == 'organizationOrganization'"
|
||||||
|
class="table_ellipsis"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
props.row.orgChild4Name === null &&
|
||||||
|
props.row.orgChild3Name === null &&
|
||||||
|
props.row.orgChild2Name === null &&
|
||||||
|
props.row.orgChild1Name === null &&
|
||||||
|
props.row.orgRootName === null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
{{
|
||||||
|
`${
|
||||||
|
props.row.orgChild4Name
|
||||||
|
? props.row.orgChild4Name + "/"
|
||||||
|
: ""
|
||||||
|
}${
|
||||||
|
props.row.orgChild3Name
|
||||||
|
? props.row.orgChild3Name + "/"
|
||||||
|
: ""
|
||||||
|
}${
|
||||||
|
props.row.orgChild2Name
|
||||||
|
? props.row.orgChild2Name + "-"
|
||||||
|
: ""
|
||||||
|
}${
|
||||||
|
props.row.orgChild1Name
|
||||||
|
? props.row.orgChild1Name + "/"
|
||||||
|
: ""
|
||||||
|
}${props.row.orgRootName ? props.row.orgRootName : ""}`
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -650,7 +737,7 @@ onMounted(async () => {
|
||||||
outline
|
outline
|
||||||
color="primary"
|
color="primary"
|
||||||
label="เพิ่ม"
|
label="เพิ่ม"
|
||||||
@click="clickAdd(props.row.id)"
|
@click="clickAdd(props.row)"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -658,14 +745,14 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="pagination2.page"
|
v-model="formProbation.page"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
color="dark"
|
color="dark"
|
||||||
:max="scope.pagesNumber"
|
:max="maxPage"
|
||||||
:max-pages="5"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
boundary-links
|
boundary-links
|
||||||
direction-links
|
direction-links
|
||||||
|
:max-pages="5"
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,180 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
import TableTabType1 from "@/modules/13_salary/components/SalaryLists/TableTabType1.vue";
|
||||||
|
import TableTabType2 from "@/modules/13_salary/components/SalaryLists/TableTabType2.vue";
|
||||||
|
import TableTabType3 from "@/modules/13_salary/components/SalaryLists/TableTabType3.vue";
|
||||||
|
import TableTabType4 from "@/modules/13_salary/components/SalaryLists/TableTabType4.vue";
|
||||||
|
|
||||||
|
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||||
|
|
||||||
|
const store = useSalaryListSDataStore();
|
||||||
|
const itemsTabGroup = ref([
|
||||||
|
{
|
||||||
|
lable: "กลุ่ม 1",
|
||||||
|
name: "group1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "กลุ่ม 2",
|
||||||
|
name: "group2",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const itemsTabType = ref([
|
||||||
|
{
|
||||||
|
lable: "รายชื่อถือครอง",
|
||||||
|
name: "tab1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "1 ขั้น",
|
||||||
|
name: "tab2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "ครึ่งขั้น",
|
||||||
|
name: "tab3",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "ไม่ได้เลือก",
|
||||||
|
name: "tab4",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const itemsCard = ref([
|
||||||
|
{
|
||||||
|
lable: "จำนวนคนทั้งหมด",
|
||||||
|
name: "group1",
|
||||||
|
color: "secondary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "ของจำนวนคน",
|
||||||
|
name: "group2",
|
||||||
|
color: "light-blue-4",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "เลือกไปแล้ว",
|
||||||
|
name: "group2",
|
||||||
|
color: "primary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lable: "คงเหลือโควตา",
|
||||||
|
name: "group2",
|
||||||
|
color: "indigo-6",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const splitterModel = ref<number>(15);
|
||||||
|
|
||||||
|
function changeTabGroup() {
|
||||||
|
store.tabType = "tab1";
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeTabType(name: string) {
|
||||||
|
console.log(name);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<q-tabs
|
||||||
|
v-model="store.tabGroup"
|
||||||
|
dense
|
||||||
|
class="text-grey"
|
||||||
|
active-color="primary"
|
||||||
|
active-class="bg-teal-1"
|
||||||
|
indicator-color="primary"
|
||||||
|
align="left"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in itemsTabGroup"
|
||||||
|
:key="index"
|
||||||
|
@click="changeTabGroup"
|
||||||
|
>
|
||||||
|
<q-tab :name="item.name" :label="item.lable" />
|
||||||
|
</div>
|
||||||
|
</q-tabs>
|
||||||
|
|
||||||
|
<q-separator />
|
||||||
|
<q-tab-panels v-model="store.tabGroup" animated class="bg-grey-1">
|
||||||
|
<q-tab-panel
|
||||||
|
style="padding: 0px"
|
||||||
|
v-for="(item, index) in itemsTabGroup"
|
||||||
|
:key="index"
|
||||||
|
:name="item.name"
|
||||||
|
>
|
||||||
|
<div class="row col-12 q-pa-md">
|
||||||
|
<div class="row col-12 items-start q-gutter-md items-center">
|
||||||
|
<div v-for="(item, index) in itemsCard" :key="index" class="my-card">
|
||||||
|
<q-card>
|
||||||
|
<q-card-section>
|
||||||
|
<div class="row items-center no-wrap">
|
||||||
|
<div class="col">
|
||||||
|
<div class="">{{ item.lable }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div :class="`text-${item.color} text-bold`">1</div>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
<div class="row col justify-end items-center">
|
||||||
|
<q-btn color="blue-5" icon="download" label="ดาว์นโหลด" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-separator />
|
||||||
|
|
||||||
|
<q-card flat bordered>
|
||||||
|
<q-splitter v-model="splitterModel" disable>
|
||||||
|
<template v-slot:before>
|
||||||
|
<q-tabs
|
||||||
|
v-model="store.tabType"
|
||||||
|
vertical
|
||||||
|
dense
|
||||||
|
class="text-grey"
|
||||||
|
active-color="blue-5"
|
||||||
|
active-class="bg-blue-1"
|
||||||
|
indicator-color="blue-5"
|
||||||
|
align="left"
|
||||||
|
>
|
||||||
|
<div v-for="(item, index) in itemsTabType" :key="index">
|
||||||
|
<q-tab
|
||||||
|
:name="item.name"
|
||||||
|
:label="item.lable"
|
||||||
|
@click="changeTabType(item.name)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</q-tabs>
|
||||||
|
</template>
|
||||||
|
<template v-slot:after>
|
||||||
|
<q-tab-panels
|
||||||
|
v-model="store.tabType"
|
||||||
|
animated
|
||||||
|
swipeable
|
||||||
|
vertical
|
||||||
|
transition-prev="jump-up"
|
||||||
|
transition-next="jump-up"
|
||||||
|
>
|
||||||
|
<q-tab-panel
|
||||||
|
class="q-pa-md"
|
||||||
|
v-for="(item, index) in itemsTabType"
|
||||||
|
:key="index"
|
||||||
|
:name="item.name"
|
||||||
|
>
|
||||||
|
<TableTabType1 v-if="index + 1 === 1" />
|
||||||
|
<TableTabType2 v-if="index + 1 === 2" />
|
||||||
|
<TableTabType3 v-if="index + 1 === 3" />
|
||||||
|
<TableTabType4 v-if="index + 1 === 4" />
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
</template>
|
||||||
|
</q-splitter>
|
||||||
|
</q-card>
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.my-card
|
||||||
|
width: 100%
|
||||||
|
max-width: 200px
|
||||||
|
</style>
|
||||||
233
src/modules/13_salary/components/SalaryLists/TableTabType1.vue
Normal file
233
src/modules/13_salary/components/SalaryLists/TableTabType1.vue
Normal file
|
|
@ -0,0 +1,233 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "fullName",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื้อ-นามสกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "fullName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่ง",
|
||||||
|
field: "position",
|
||||||
|
sortable: true,
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "org",
|
||||||
|
align: "left",
|
||||||
|
label: "สั่งกัด",
|
||||||
|
sortable: true,
|
||||||
|
field: "org",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "isResult",
|
||||||
|
align: "center",
|
||||||
|
label: "ผลการประเมิน",
|
||||||
|
sortable: false,
|
||||||
|
field: "isResult",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "isDuration",
|
||||||
|
align: "center",
|
||||||
|
label: "ระยะเวลา",
|
||||||
|
sortable: false,
|
||||||
|
field: "isDuration",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "isPunish",
|
||||||
|
align: "center",
|
||||||
|
label: "การลงโทษ",
|
||||||
|
sortable: false,
|
||||||
|
field: "isPunish",
|
||||||
|
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",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "isRetired2",
|
||||||
|
align: "center",
|
||||||
|
label: "ขาดราชการ",
|
||||||
|
sortable: false,
|
||||||
|
field: "isRetired",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const visibleColumns = ref<string[]>([
|
||||||
|
"no",
|
||||||
|
"fullName",
|
||||||
|
"position",
|
||||||
|
"org",
|
||||||
|
"isResult",
|
||||||
|
"isDuration",
|
||||||
|
"isPunish",
|
||||||
|
"isRetired",
|
||||||
|
"isRetired2",
|
||||||
|
]);
|
||||||
|
const rows = ref<any>([
|
||||||
|
{
|
||||||
|
fullName: "sd",
|
||||||
|
position: "sd",
|
||||||
|
org: "sd",
|
||||||
|
isResult: true,
|
||||||
|
isDuration: true,
|
||||||
|
isPunish: false,
|
||||||
|
isRetired: true,
|
||||||
|
isRetired2: false,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const filter = ref<string>("");
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<q-toolbar class="text-primary" style="padding: 0px">
|
||||||
|
<q-btn flat round dense icon="add">
|
||||||
|
<q-tooltip>เพิ่ม </q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-space />
|
||||||
|
<q-input
|
||||||
|
borderless
|
||||||
|
dense
|
||||||
|
debounce="300"
|
||||||
|
outlined
|
||||||
|
v-model="filter"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<q-select
|
||||||
|
for="#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"
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||||
|
/>
|
||||||
|
</q-toolbar>
|
||||||
|
<d-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:rows="rows"
|
||||||
|
row-key="id"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
:paging="true"
|
||||||
|
dense
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
|
: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-th auto-width></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 v-if="col.name === 'no'">
|
||||||
|
{{ props.rowIndex + 1 }}
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'isResult'">
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
v-model="props.row.isResult"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'isDuration'">
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
v-model="props.row.isDuration"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'isPunish'">
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
v-model="props.row.isPunish"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'isRetired'">
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
v-model="props.row.isRetired"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'isRetired2'">
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
v-model="props.row.isRetired2"
|
||||||
|
false
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
{{ col.value ? col.value : "-" }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<!-- <template v-slot:pagination="scope">
|
||||||
|
<q-pagination
|
||||||
|
v-model="formQuery.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="maxPage"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template> -->
|
||||||
|
</d-table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<script setup lang="ts"></script>
|
||||||
|
<template>
|
||||||
|
<div>222222222222222222</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<script setup lang="ts"></script>
|
||||||
|
<template>
|
||||||
|
<div>333333</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<script setup lang="ts"></script>
|
||||||
|
<template>
|
||||||
|
<div>4444444444</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
8
src/modules/13_salary/store/SalaryListsStore.ts
Normal file
8
src/modules/13_salary/store/SalaryListsStore.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import { defineStore } from "pinia";
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
||||||
|
const tabGroup = ref<string>("group1");
|
||||||
|
const tabType = ref<string>("tab1");
|
||||||
|
return { tabGroup, tabType };
|
||||||
|
});
|
||||||
|
|
@ -364,6 +364,7 @@ async function filterFn(page: number) {
|
||||||
size="sm"
|
size="sm"
|
||||||
boundary-links
|
boundary-links
|
||||||
direction-links
|
direction-links
|
||||||
|
:max-pages="5"
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
import TabGroup from "@/modules/13_salary/components/SalaryLists/TabGroup.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
|
|
@ -6,6 +8,14 @@
|
||||||
รายการเงินเดือน
|
รายการเงินเดือน
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-card flat bordered>
|
||||||
|
<TabGroup />
|
||||||
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style lang="sass" scoped>
|
||||||
|
.my-card
|
||||||
|
width: 100%
|
||||||
|
max-width: 200px
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -364,6 +364,7 @@ watch([() => formQuery.page, () => formQuery.pageSize], async () => {
|
||||||
size="sm"
|
size="sm"
|
||||||
boundary-links
|
boundary-links
|
||||||
direction-links
|
direction-links
|
||||||
|
:max-pages="5"
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue