Merge branch 'develop' into devTee
This commit is contained in:
commit
f81b69b828
27 changed files with 581 additions and 735 deletions
|
|
@ -102,11 +102,14 @@ const baseItemsMenu = ref<DataOptionSys[]>([
|
|||
]);
|
||||
|
||||
const itemsMenu = computed(() => {
|
||||
console.log(leaveReason.value);
|
||||
|
||||
if (
|
||||
leaveReason.value ===
|
||||
"(พ้นจากราชการด้วยสาเหตุ: ได้รับโทษทางวินัย ให้ออกจากราชการไว้ก่อน)" ||
|
||||
leaveReason.value === "(พ้นจากราชการด้วยสาเหตุ: ลาออกจากราชการ)" ||
|
||||
"(พ้นจากราชการด้วยสาเหตุ: ได้รับโทษทางวินัย พักจากราชการ)"
|
||||
leaveReason.value ===
|
||||
"(พ้นจากราชการด้วยสาเหตุ: ได้รับโทษทางวินัย พักจากราชการ)"
|
||||
) {
|
||||
return (
|
||||
baseItemsMenu.value?.filter(
|
||||
|
|
@ -350,7 +353,6 @@ async function fetchDataPersonal() {
|
|||
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
|
||||
.then(async (res) => {
|
||||
formDetail.value = res.data.result;
|
||||
console.log(formDetail.value);
|
||||
|
||||
storeRegistry.isLeave = res.data.result.isLeave;
|
||||
|
||||
|
|
|
|||
|
|
@ -252,14 +252,7 @@ watch(modal, () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
class="text-teal-5"
|
||||
icon="mdi-plus"
|
||||
size="md"
|
||||
@click="modal = true"
|
||||
>
|
||||
<q-btn flat round class="primary" icon="mdi-plus" @click="modal = true">
|
||||
<q-tooltip>เพิ่มรายชื่อ</q-tooltip></q-btn
|
||||
>
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ import type { RetirementList } from "@/modules/06_retirement/interface/index/Mai
|
|||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
import AddList from "../ListRetirement/AddList.vue";
|
||||
import AddList from "@/modules/06_retirement/components/01_retirement/AddList.vue";
|
||||
|
||||
/** Use */
|
||||
const route = useRoute();
|
||||
|
|
@ -542,15 +542,14 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<q-table
|
||||
<d-table
|
||||
flat
|
||||
dense
|
||||
bordered
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
row-key="order"
|
||||
class="custom-header-table"
|
||||
:filter="filter"
|
||||
:filter="filter.trim()"
|
||||
:visible-columns="visibleColumns"
|
||||
no-data-label="ไม่มีข้อมูล"
|
||||
:pagination-label="paginationLabel"
|
||||
|
|
@ -678,7 +677,7 @@ onMounted(async () => {
|
|||
}}</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<!-- <template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
color="primary"
|
||||
|
|
@ -688,8 +687,8 @@ onMounted(async () => {
|
|||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</template> -->
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
|
@ -841,35 +840,6 @@ onMounted(async () => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scope>
|
||||
.custom-header-table {
|
||||
max-height: 64vh;
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.q-table thead tr:last-child th {
|
||||
top: 48px;
|
||||
}
|
||||
|
||||
.q-table thead tr:first-child th {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.q-btn-dropdown__arrow {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -182,91 +182,85 @@ watchEffect(() => {
|
|||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader tittle="ส่งไปออกคำสั่งลาออก" :close="closeModal" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-end">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword2 !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="Reset"
|
||||
/>
|
||||
</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"
|
||||
style="min-width: 140px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword2"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
<q-card-section>
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-12 row">
|
||||
<q-space />
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
debounce="300"
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword2?.trim()"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div
|
||||
:class="
|
||||
col.name === 'organizationPositionOld' ||
|
||||
col.name === 'organization'
|
||||
? 'table_ellipsis2'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
{{ col.value ? col.value : "" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</template>
|
||||
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div
|
||||
:class="
|
||||
col.name === 'organizationPositionOld' ||
|
||||
col.name === 'organization'
|
||||
? 'table_ellipsis2'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
{{ col.value ? col.value : "" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
|
|
@ -11,9 +11,10 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataStatus } from "@/modules/06_retirement/interface/index/Main";
|
||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/resign/DialogSendToCommand.vue";
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/02_resign/DialogSendToCommand.vue";
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
|
|
@ -135,7 +136,7 @@ const filterKeyword2 = ref<string>("");
|
|||
const filterKeyword = ref<string>("");
|
||||
|
||||
const status = ref<string>("");
|
||||
const optionStatus = ref<any[]>([]);
|
||||
const optionStatus = ref<DataStatus[]>([]);
|
||||
|
||||
/**Setting pagination */
|
||||
const pagination = ref({
|
||||
|
|
@ -175,7 +176,7 @@ async function openModalOrder() {
|
|||
rowsSendToCommand.value = row;
|
||||
modal.value = true;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -196,7 +197,7 @@ async function fecthlist() {
|
|||
const data = await res.data.result;
|
||||
rows.value = data;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -211,9 +212,8 @@ async function fecthlist() {
|
|||
*/
|
||||
function filterOption(val: string, update: Function) {
|
||||
update(() => {
|
||||
status.value = val ? "" : stroeResign.formQurey.status;
|
||||
optionStatus.value = stroeResign.optionStatus.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
(v: DataStatus) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
@ -249,6 +249,8 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
outlined
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
@update:model-value="
|
||||
(stroeResign.formQurey.status = status), fecthlist()
|
||||
"
|
||||
|
|
@ -283,13 +285,7 @@ onMounted(async () => {
|
|||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="filterKeyword = ''"
|
||||
/>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
|
|
@ -313,7 +309,7 @@ onMounted(async () => {
|
|||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
|
|
@ -166,11 +166,6 @@ function updateInput(value: any) {
|
|||
emit("update:filterKeyword2", value);
|
||||
}
|
||||
|
||||
/** รีเซ็ตค่าในช่องค้นหา */
|
||||
function Reset() {
|
||||
emit("update:filterKeyword2", "");
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
if (props.modal === true) {
|
||||
selected.value = [];
|
||||
|
|
@ -182,91 +177,85 @@ watchEffect(() => {
|
|||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader tittle="ส่งไปออกคำสั่งลาออก" :close="closeModal" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-end">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword2 !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="Reset"
|
||||
/>
|
||||
</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"
|
||||
style="min-width: 140px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword2"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
<q-card-section>
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-12 row">
|
||||
<q-space />
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
debounce="300"
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword2?.trim()"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div
|
||||
:class="
|
||||
col.name === 'organizationPositionOld' ||
|
||||
col.name === 'organization'
|
||||
? 'table_ellipsis2'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
{{ col.value ? col.value : "" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</template>
|
||||
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div
|
||||
:class="
|
||||
col.name === 'organizationPositionOld' ||
|
||||
col.name === 'organization'
|
||||
? 'table_ellipsis2'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
{{ col.value ? col.value : "" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
|
|
@ -11,9 +11,10 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataStatus } from "@/modules/06_retirement/interface/index/Main";
|
||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/resignEMP/DialogSendToCommand.vue";
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/03_resignEmp/DialogSendToCommand.vue";
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
|
|
@ -134,7 +135,7 @@ const filterKeyword2 = ref<string>("");
|
|||
const filterKeyword = ref<string>("");
|
||||
|
||||
const statusEMP = ref<string>("");
|
||||
const optionStatus = ref<any[]>([]);
|
||||
const optionStatus = ref<DataStatus[]>([]);
|
||||
|
||||
/**Setting pagination */
|
||||
const pagination = ref({
|
||||
|
|
@ -174,7 +175,7 @@ async function openModalOrder() {
|
|||
rowsSendToCommand.value = row;
|
||||
modal.value = true;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -195,7 +196,7 @@ async function fecthlist() {
|
|||
const data = await res.data.result;
|
||||
rows.value = data;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -212,7 +213,7 @@ function filterOption(val: string, update: Function) {
|
|||
update(() => {
|
||||
statusEMP.value = val ? "" : stroeResign.formQureyEMP.status;
|
||||
optionStatus.value = stroeResign.optionStatusEMP.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
(v: DataStatus) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
@ -248,6 +249,8 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
outlined
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
@update:model-value="
|
||||
(stroeResign.formQureyEMP.status = statusEMP), fecthlist()
|
||||
"
|
||||
|
|
@ -313,7 +316,7 @@ onMounted(async () => {
|
|||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
|
|
@ -269,7 +269,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 1',
|
||||
|
|
@ -286,7 +286,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -308,7 +308,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
|
||||
]"
|
||||
|
|
@ -338,7 +338,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 2',
|
||||
|
|
@ -355,7 +355,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -377,7 +377,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
|
||||
]"
|
||||
|
|
@ -407,7 +407,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 3',
|
||||
|
|
@ -424,7 +424,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -446,7 +446,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
|
||||
]"
|
||||
|
|
@ -476,7 +476,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 4',
|
||||
|
|
@ -493,7 +493,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -515,7 +515,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
|
||||
]"
|
||||
|
|
@ -545,7 +545,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 5',
|
||||
|
|
@ -563,7 +563,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -592,7 +592,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 6',
|
||||
|
|
@ -610,7 +610,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -639,7 +639,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 7',
|
||||
|
|
@ -656,7 +656,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -678,7 +678,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
|
||||
]"
|
||||
|
|
@ -708,7 +708,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 8',
|
||||
|
|
@ -726,7 +726,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -748,7 +748,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
|
||||
]"
|
||||
|
|
@ -778,7 +778,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 9',
|
||||
|
|
@ -796,7 +796,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -818,7 +818,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
|
||||
]"
|
||||
|
|
@ -848,7 +848,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 10',
|
||||
|
|
@ -866,7 +866,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
class="inputgreen"
|
||||
:rules="[
|
||||
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
|
||||
]"
|
||||
|
|
@ -307,7 +307,7 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
/>
|
||||
รายละเอียด Exit interview ของ{{ fullname }}
|
||||
รายละเอียด Exit interview {{ fullname }}
|
||||
</div>
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import type { QInput, QForm } from "quasar";
|
||||
|
|
@ -125,8 +125,8 @@ async function getData() {
|
|||
showLoader();
|
||||
await http
|
||||
.get(config.API.detailByidDeceased(profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
let list: DataCopyOrder[] = [];
|
||||
data.map((r: any) => {
|
||||
let selectCopyOrder = [];
|
||||
|
|
@ -162,7 +162,7 @@ async function getData() {
|
|||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -178,8 +178,8 @@ async function saveData() {
|
|||
const dataToSend = { Persons: persons };
|
||||
await http
|
||||
.put(config.API.detailByidDeceased(profileId.value), dataToSend)
|
||||
.then((res) => {
|
||||
getData();
|
||||
.then(async (res) => {
|
||||
await getData();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -220,22 +220,21 @@ function clickAdd() {
|
|||
* ลบข้อมูล
|
||||
*/
|
||||
function clickDelete(id: string) {
|
||||
dialogRemove($q, () => deleteData(id));
|
||||
}
|
||||
|
||||
/**ลบข้อมูล */
|
||||
async function deleteData(id: string) {
|
||||
await http
|
||||
.delete(config.API.detailByidDeceased(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getData();
|
||||
});
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.detailByidDeceased(id))
|
||||
.then(async () => {
|
||||
await getData();
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -269,16 +268,16 @@ async function fetchSaveCopyOrder() {
|
|||
showLoader();
|
||||
await http
|
||||
.put(config.API.notiDeceased(profileId.value), { Persons: list })
|
||||
.then((res: any) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
.then(async () => {
|
||||
await getData();
|
||||
next();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -323,17 +322,10 @@ onMounted(async () => {
|
|||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="q-ml-sm"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
|
|
@ -358,7 +350,7 @@ onMounted(async () => {
|
|||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumns"
|
||||
:filter="filter"
|
||||
:filter="filter.trim()"
|
||||
row-key="idCard"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
|
|
@ -395,7 +387,7 @@ onMounted(async () => {
|
|||
dense
|
||||
lazy-rules
|
||||
v-model="props.row.mutiselect"
|
||||
:rules="[(val:any) => !!val || `${'กรุณาเลือกช่องทางการส่งสำเนา'}`,(val:any) => val.length > 0 || `${'กรุณาเลือกช่องทางการส่งสำเนา'}`]"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกช่องทางการส่งสำเนา'}`,(val:string) => val.length > 0 || `${'กรุณาเลือกช่องทางการส่งสำเนา'}`]"
|
||||
:label="`${'เลือกช่องทางการส่งสำเนา'}`"
|
||||
emit-value
|
||||
map-options
|
||||
|
|
@ -167,6 +167,7 @@ function Reset() {
|
|||
watchEffect(() => {
|
||||
if (props.modal === true) {
|
||||
selected.value = [];
|
||||
updateInput("");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -175,89 +176,85 @@ watchEffect(() => {
|
|||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader tittle="ส่งไปออกคำสั่งให้ออก" :close="closeModal" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-end">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword2 !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="Reset"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
v-model="visibleColumns2"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns2"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:columns="columns2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
<q-card-section>
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row col-12">
|
||||
<q-space />
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
debounce="300"
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
v-model="visibleColumns2"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns2"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
:columns="columns2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword2?.trim()"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div v-else :class="col.name === 'org' ? 'table_ellipsis' : ''">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else
|
||||
:class="col.name === 'org' ? 'table_ellipsis' : ''"
|
||||
>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
|
|
@ -45,4 +45,10 @@ interface RoundData {
|
|||
round: string;
|
||||
}
|
||||
|
||||
export type { Pagination, RetirementList, PersonData, RoundData };
|
||||
interface DataStatus {
|
||||
name: string;
|
||||
value: string;
|
||||
group: string;
|
||||
}
|
||||
|
||||
export type { Pagination, RetirementList, PersonData, RoundData, DataStatus };
|
||||
|
|
|
|||
|
|
@ -2,46 +2,62 @@
|
|||
* Router พ้นจากราชการ (Retirement)
|
||||
*/
|
||||
|
||||
const Main = () => import("@/modules/06_retirement/views/Main.vue");
|
||||
/** ประกาศเกษียณอายุราชการ*/
|
||||
const Main = () => import("@/modules/06_retirement/views/01_retirement.vue");
|
||||
const Listretirement = () =>
|
||||
import("@/modules/06_retirement/components/ListRetirement/TableList.vue");
|
||||
import(
|
||||
"@/modules/06_retirement/components/01_retirement/RetirementDetail.vue"
|
||||
);
|
||||
const ListretirementDetail = () =>
|
||||
import("@/modules/06_retirement/components/ListRetirement/TableList.vue");
|
||||
const deceased = () =>
|
||||
import("@/modules/06_retirement/components/Deceased/Deceased.vue");
|
||||
const detaildeceased = () =>
|
||||
import("@/modules/06_retirement/components/Deceased/DetailDeceased.vue");
|
||||
const dismissOrder = () =>
|
||||
import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue");
|
||||
const outDetail = () =>
|
||||
import("@/modules/06_retirement/components/DismissOrder/outRegistry.vue");
|
||||
const outDetailOnly = () =>
|
||||
import("@/modules/06_retirement/components/DismissOrder/outRegistry.vue");
|
||||
const exitInterviewMain = () =>
|
||||
import("@/modules/06_retirement/components/ExitInterview/exitMain.vue");
|
||||
const exitInterviewDetails = () =>
|
||||
import("@/modules/06_retirement/components/ExitInterview/exitRegistry.vue");
|
||||
const exitInterviewDetailsOnly = () =>
|
||||
import("@/modules/06_retirement/components/ExitInterview/exitRegistry.vue");
|
||||
const exitInterviewEditQuestion = () =>
|
||||
import("@/modules/06_retirement/components/ExitInterview/EditQuestion.vue");
|
||||
const detaildeceasedByid = () =>
|
||||
import("@/modules/06_retirement/components/Deceased/DetailByidDeceased.vue");
|
||||
|
||||
/** รายการลาออก */
|
||||
const resign = () =>
|
||||
import("@/modules/06_retirement/components/resign/Main.vue");
|
||||
const resign_EMP = () =>
|
||||
import("@/modules/06_retirement/components/resignEMP/Main.vue");
|
||||
import(
|
||||
"@/modules/06_retirement/components/01_retirement/RetirementDetail.vue"
|
||||
);
|
||||
|
||||
/** รายการลาออก*/
|
||||
const resign = () => import("@/modules//06_retirement/views/02_resign.vue");
|
||||
const resignByid = () =>
|
||||
import("@/modules/06_retirement/components/resign/ResignByid.vue");
|
||||
const resignByidEMP = () =>
|
||||
import("@/modules/06_retirement/components/resignEMP/ResignByid.vue");
|
||||
import("@/modules/06_retirement/components/02_resign/ResignByid.vue");
|
||||
const resignReject = () =>
|
||||
import("@/modules/06_retirement/components/resign/ResignReject.vue");
|
||||
import("@/modules/06_retirement/components/02_resign/ResignReject.vue");
|
||||
|
||||
/** รายการลาออกลูกจ้าง*/
|
||||
const resign_EMP = () =>
|
||||
import("@/modules/06_retirement/views/03_resignEmp.vue");
|
||||
const resignByidEMP = () =>
|
||||
import("@/modules/06_retirement/components/03_resignEmp/ResignByid.vue");
|
||||
const resignRejectEMP = () =>
|
||||
import("@/modules/06_retirement/components/resignEMP/ResignReject.vue");
|
||||
import("@/modules/06_retirement/components/03_resignEmp/ResignReject.vue");
|
||||
|
||||
/** รายการ Exit interview*/
|
||||
const exitInterviewMain = () =>
|
||||
import("@/modules/06_retirement/views/04_exitInterview.vue");
|
||||
const exitInterviewDetails = () =>
|
||||
import(
|
||||
"@/modules/06_retirement/components/04_exitInterview/ExitInterviewDetail.vue"
|
||||
);
|
||||
const exitInterviewDetailsOnly = () =>
|
||||
import(
|
||||
"@/modules/06_retirement/components/04_exitInterview/ExitInterviewDetail.vue"
|
||||
);
|
||||
const exitInterviewEditQuestion = () =>
|
||||
import(
|
||||
"@/modules/06_retirement/components/04_exitInterview/EditQuestion.vue"
|
||||
);
|
||||
|
||||
/** รายการบันทึกเวียนแจ้งการถึงแก่กรรม*/
|
||||
const deceased = () => import("@/modules/06_retirement/views/05_deceased.vue");
|
||||
const detaildeceased = () =>
|
||||
import("@/modules/06_retirement/components/05_deceased/DetailDeceased.vue");
|
||||
const detaildeceasedByid = () =>
|
||||
import("@/modules/06_retirement/components/05_deceased/SendCircularPage.vue");
|
||||
|
||||
/** รายการให้ออก*/
|
||||
const dismissOrder = () =>
|
||||
import("@/modules/06_retirement/views/06_dismissOrder.vue");
|
||||
const outDetail = () =>
|
||||
import("@/modules/06_retirement/components/06_dismissOrder/Detail.vue");
|
||||
const outDetailOnly = () =>
|
||||
import("@/modules/06_retirement/components/06_dismissOrder/Detail.vue");
|
||||
|
||||
export default [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref, computed, reactive, watch } from "vue";
|
||||
|
||||
import type { DataStatus } from "@/modules/06_retirement/interface/index/Main";
|
||||
|
||||
export const useDataStore = defineStore("resign", () => {
|
||||
const mainTabs = ref<string>("1");
|
||||
const mainTabsEMP = ref<string>("1");
|
||||
const baseOptionStatus = ref<any[]>([
|
||||
const baseOptionStatus = ref<DataStatus[]>([
|
||||
{
|
||||
name: "รอดำเนินการ",
|
||||
value: "WAITTING",
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, useAttrs, reactive, watch } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStoreRetirement } from "@/modules/06_retirement/store/storeRetirement";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
|
||||
|
||||
import popupAdd from "@/modules/06_retirement/components/ListRetirement/popupAdd.vue";
|
||||
import popupAdd from "@/modules/06_retirement/components/01_retirement/DialogAddListRetirement.vue";
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const router = useRouter();
|
||||
|
|
@ -29,8 +29,6 @@ const yearOptionsFilter = ref<any>({
|
|||
});
|
||||
const actionOption = ref<resMain[]>([]);
|
||||
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
sortBy: "",
|
||||
descending: false,
|
||||
|
|
@ -95,8 +93,6 @@ const currentYear = new Date().getFullYear();
|
|||
const rows = ref<resMain[]>([]);
|
||||
const yearOptions = ref<any>([{ id: "", year: "ทั้งหมด" }]);
|
||||
|
||||
// หาปีปัจจุบัน
|
||||
|
||||
// ประกาศเกษียณอายุราชการ
|
||||
async function fetchRetirement(type: string, year: any) {
|
||||
showLoader();
|
||||
|
|
@ -251,14 +247,14 @@ onMounted(async () => {
|
|||
</q-tabs>
|
||||
</div>
|
||||
<q-separator />
|
||||
<q-tab-panels v-model="tab" animated
|
||||
><q-tab-panel
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel
|
||||
v-for="item in useStoreRetire.taboption"
|
||||
:key="item.name"
|
||||
:name="item.name"
|
||||
class="q-pa-none"
|
||||
>
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="col-12 row q-pa-md q-col-gutter-sm">
|
||||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-select
|
||||
|
|
@ -304,7 +300,6 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
|
|
@ -314,13 +309,7 @@ onMounted(async () => {
|
|||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
|
|
@ -336,100 +325,89 @@ onMounted(async () => {
|
|||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-pt-sm">
|
||||
<q-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
v-bind="attrs"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width> </q-th>
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width> </q-th>
|
||||
<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">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-eye"
|
||||
color="info"
|
||||
@click="nextPageDetail(props.row)"
|
||||
>
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-eye"
|
||||
color="info"
|
||||
@click="nextPageDetail(props.row)"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
!props.row.document
|
||||
"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="edit"
|
||||
color="edit"
|
||||
@click="nextPage(props.row)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td key="signDate" :props="props">
|
||||
{{ props.row.signDate ? props.row.signDate : "-" }}
|
||||
</q-td>
|
||||
<q-td key="Date" :props="props">
|
||||
{{ props.row.Date }}
|
||||
</q-td>
|
||||
<q-td key="retireNumber" :props="props">
|
||||
{{ props.row.total }}
|
||||
</q-td>
|
||||
<q-td key="typeReport" :props="props">
|
||||
{{ props.row.typeReport }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
active-color="primary"
|
||||
color="primary"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
</div></div></q-tab-panel
|
||||
></q-tab-panels>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="edit"
|
||||
:disable="props.row.document"
|
||||
:color="!props.row.document ? 'edit' : 'grey-5'"
|
||||
@click="nextPage(props.row)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td key="signDate" :props="props">
|
||||
{{ props.row.signDate ? props.row.signDate : "-" }}
|
||||
</q-td>
|
||||
<q-td key="Date" :props="props">
|
||||
{{ props.row.Date }}
|
||||
</q-td>
|
||||
<q-td key="retireNumber" :props="props">
|
||||
{{ props.row.total }}
|
||||
</q-td>
|
||||
<q-td key="typeReport" :props="props">
|
||||
{{ props.row.typeReport }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
|
|
@ -452,35 +430,4 @@ onMounted(async () => {
|
|||
.icon-color {
|
||||
color: #4154b3;
|
||||
}
|
||||
|
||||
.custom-header-table {
|
||||
max-height: 64vh;
|
||||
|
||||
.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>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { useDataStore } from "@/modules/06_retirement/store/resignMain";
|
||||
|
||||
import Table from "@/modules/06_retirement/components/resign/Table.vue";
|
||||
import Table from "@/modules/06_retirement/components/02_resign/Table.vue";
|
||||
|
||||
const stroe = useDataStore();
|
||||
</script>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { useDataStore } from "@/modules/06_retirement/store/resignMain";
|
||||
|
||||
import Table from "@/modules/06_retirement/components/resignEMP/Table.vue";
|
||||
import Table from "@/modules/06_retirement/components/03_resignEmp/Table.vue";
|
||||
|
||||
const stroe = useDataStore();
|
||||
</script>
|
||||
|
|
@ -171,21 +171,23 @@ async function fecthlist() {
|
|||
fullname: r.fullname ?? "",
|
||||
createdAt: new Date(r.createdAt),
|
||||
futureWork: !!r.futureWork,
|
||||
futureWorkReason: r.futureWorkReason ?? "",
|
||||
futureWorkReason: r.futureWorkReason ?? "-",
|
||||
havejob: !!r.havejob,
|
||||
havejobReason: r.havejobReason ?? "",
|
||||
havejobReason: r.havejobReason ?? "-",
|
||||
id: r.id ?? "",
|
||||
lastUpdatedAt: new Date(r.lastUpdatedAt),
|
||||
notExitFactor: r.notExitFactor ?? "",
|
||||
realReason: r.realReason ?? "",
|
||||
notExitFactor: r.notExitFactor ?? "-",
|
||||
realReason: r.realReason ? r.realReason : "-",
|
||||
suggestFriends: !!r.suggestFriends,
|
||||
suggestFriendsReason: r.suggestFriendsReason ?? "",
|
||||
suggestion: r.suggestion ?? "",
|
||||
status: r.status ?? "",
|
||||
suggestFriendsReason: r.suggestFriendsReason ?? "-",
|
||||
suggestion: r.suggestion ?? "-",
|
||||
status: r.status ?? "-",
|
||||
appointDate: date2Thai(r.appointDate),
|
||||
});
|
||||
});
|
||||
rows.value = list;
|
||||
console.log(rows.value);
|
||||
|
||||
filters.value = list;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -292,8 +294,8 @@ onMounted(async () => {
|
|||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<q-separator />
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row col-12">
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="
|
||||
|
|
@ -308,47 +310,41 @@ onMounted(async () => {
|
|||
>
|
||||
</div>
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
</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"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
<div class="row q-col-gutter-sm">
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 q-pt-sm">
|
||||
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
|
|
@ -396,14 +392,15 @@ onMounted(async () => {
|
|||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="
|
||||
!props.row.appointDate &&
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
icon="mdi-calendar"
|
||||
color="blue-7"
|
||||
:color="!props.row.appointDate ? 'blue-7' : 'grey-5'"
|
||||
:disable="props.row.appointDate !== ''"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
@ -486,6 +483,7 @@ onMounted(async () => {
|
|||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="inputgreen"
|
||||
:model-value="
|
||||
dateBreak !== null ? date2Thai(dateBreak) : null
|
||||
"
|
||||
|
|
@ -129,11 +129,6 @@ async function fectListDecased() {
|
|||
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/** Setting Pagination */
|
||||
function nextPage(id: string) {
|
||||
|
|
@ -152,58 +147,50 @@ onMounted(() => {
|
|||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<q-separator />
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row col-12">
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<div class="row q-col-gutter-sm">
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<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"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 q-pt-sm">
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="fullname"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
|
|
@ -250,35 +237,4 @@ onMounted(() => {
|
|||
</div>
|
||||
</q-card>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.custom-header-table {
|
||||
max-height: 64vh;
|
||||
|
||||
.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>
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -12,7 +12,7 @@ import { useTransferDataStore } from "@/modules/05_placement/store";
|
|||
|
||||
import type { ResponseData } from "@/modules/06_retirement/interface/response/out";
|
||||
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue";
|
||||
import DialogSendToCommand from "@/modules/06_retirement/components/06_dismissOrder/DialogSendToCommand.vue";
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar();
|
||||
|
|
@ -25,7 +25,8 @@ const {
|
|||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
dialogMessage,
|
||||
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
const { statusText } = transferStore;
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -165,39 +166,29 @@ async function getData() {
|
|||
}
|
||||
|
||||
async function clickDelete(id: string) {
|
||||
dialogMessage(
|
||||
$q,
|
||||
`ลบข้อมูล`,
|
||||
`ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
|
||||
"delete",
|
||||
"ยืนยัน",
|
||||
"red",
|
||||
async () => await deleteData(id),
|
||||
async () => await getData()
|
||||
);
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.outByid(id))
|
||||
.then(async () => {
|
||||
await getData();
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteData(id: string) {
|
||||
await http
|
||||
.delete(config.API.outByid(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getData();
|
||||
});
|
||||
function openModal() {
|
||||
modal.value = true;
|
||||
}
|
||||
|
||||
const openModal = () => (modal.value = true);
|
||||
const closeModal = () => (modal.value = false);
|
||||
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
function closeModal() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
@ -225,48 +216,42 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
|
||||
<q-space />
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<div class="row q-col-gutter-sm">
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 q-pt-sm">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
|
|
@ -342,7 +327,7 @@ onMounted(async () => {
|
|||
v-else
|
||||
:class="
|
||||
col.name === 'organizationPositionOld'
|
||||
? 'table_ellipsis'
|
||||
? 'table_ellipsis2'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
Loading…
Add table
Add a link
Reference in a new issue