Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into me

This commit is contained in:
Thanit Konmek 2023-07-24 14:42:02 +07:00
commit 1e51577963
11 changed files with 1402 additions and 400 deletions

View file

@ -1,141 +1,171 @@
<template>
<!-- <div class="toptitle text-dark col-12 row items-center">ดการบญช 2</div> -->
<q-card flat bordered class="col-12">
<q-layout
view="hHh Lpr lff"
container
class="shadow-2 rounded-borders page-relative"
style="height: 82vh"
>
<q-card flat bordered class="col-12">
<q-layout view="hHh Lpr lff" container class="shadow-2 rounded-borders page-relative" style="height: 82vh">
<q-header class="bg-grey-1">
<q-toolbar>
<div class="text-h6 text-weight-medium text-dark col-12 row items-center q-py-md">
<q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1)"
/>
นทกผลการทดลองปฏหนาทราชการของ นายสมค ยอดใจ
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
@click="router.go(-1)" />
นทกผลการทดลองปฏหนาทราชการของ นายสมค ยอดใจ
</div>
</q-toolbar>
<q-separator/>
<q-separator />
</q-header>
<q-drawer
v-model="drawer"
show-if-above
:width="150"
:breakpoint="500"
class="bg-grey-1"
bordered
>
<q-scroll-area class="fit" :horizontal-thumb-style="{ opacity: 0 }">
<q-list class="text-grey-7">
<q-item
dense
active
class="q-py-sm"
active-class="text-primary bg-teal-1 text-weight-medium"
clickable
<q-drawer v-model="drawer" show-if-above :width="150" :breakpoint="500" class="bg-grey-1" bordered>
<q-scroll-area class="fit" :horizontal-thumb-style="{ opacity: 0 }">
<q-list class="text-grey-7">
<q-item active-class="text-primary bg-teal-1 text-weight-medium" clickable class="q-py-sm" dense
v-ripple>
<q-item-section avatar style="min-width: 40px">
<q-icon size="18px" name="mdi-file-edit" />
</q-item-section>
<q-item-section avatar style="min-width: 40px">
<q-icon size="18px" name="mdi-file" />
</q-item-section>
<q-item-section>
นทกผล
</q-item-section>
</q-item>
<q-item-section>
แบบมอบหมายงาน
</q-item-section>
</q-item>
<q-item
active-class="text-primary bg-teal-1 text-weight-medium"
clickable
class="q-py-sm"
dense
<q-item dense active class="q-py-sm" active-class="text-primary bg-teal-1 text-weight-medium"
clickable v-ripple>
<q-item-section avatar style="min-width: 40px">
<q-icon size="18px" name="mdi-file-edit" />
</q-item-section>
<q-item-section>
นทกผลการทดลองปฏหนาทราชการ
</q-item-section>
</q-item>
<q-item active-class="text-primary bg-teal-1 text-weight-medium" clickable class="q-py-sm" dense
v-ripple>
<q-item-section avatar style="min-width: 40px">
<q-icon size="18px" name="mdi-file-star" />
</q-item-section>
<q-item-section avatar style="min-width: 40px">
<q-icon size="18px" name="mdi-file-star" />
</q-item-section>
<q-item-section>
ประเมนผล
</q-item-section>
</q-item>
<q-item-section>
ประเมนผลการทดลองปฏหนาทราชการ
</q-item-section>
</q-item>
<q-item
active-class="text-primary bg-teal-1 text-weight-medium"
clickable
class="q-py-sm"
dense
<q-item active-class="text-primary bg-teal-1 text-weight-medium" clickable class="q-py-sm" dense
v-ripple>
<q-item-section avatar style="min-width: 40px">
<q-icon size="18px" name="mdi-file-chart" />
</q-item-section>
<q-item-section avatar style="min-width: 40px">
<q-icon size="18px" name="mdi-file-chart" />
</q-item-section>
<q-item-section>
รายการ
</q-item-section>
</q-item>
</q-list>
</q-scroll-area>
</q-drawer>
<q-page-container>
<q-layout
view="hHh Lpr lff"
container
style="height: 72vh"
>
<q-item-section>
รายงานการประเมนผลการทดลองปฏหนาทราชการ
</q-item-section>
</q-item>
</q-list>
</q-scroll-area>
</q-drawer>
<q-page-container>
<q-layout view="hHh Lpr lff" container style="height: 72vh">
<q-header class="bg-grey-1">
<div class="bg-grey-1">
<div class="col-12 row q-gutter-x-md items-center">
<q-tabs dense v-model="tab" active-class="text-primary text-weight-medium" indicator-color="grey-1" class="text-grey-7">
<q-tab name="save1" label="บันทึกผลครั้งที่ 1" />
<q-tab name="save2" label="บันทึกผลครั้งที่ 2" />
<q-tab name="save3" label="บันทึกผลครั้งที่ 3" />
</q-tabs>
<div>
<q-btn color="blue" flat dense icon="mdi-plus">
<q-tooltip>
เพมบนทกผลการทดลอง
</q-tooltip>
</q-btn>
</div>
</div>
<q-separator/>
<div class="bg-grey-1">
<div class="col-12 row q-gutter-x-md items-center">
<q-tabs dense v-model="tab" active-class="text-primary text-weight-medium"
indicator-color="grey-1" class="text-grey-7">
<q-tab name="save1" label="บันทึกผลครั้งที่ 1" />
<q-btn size="12px" flat dense icon="mdi-download" :disable="tab !== 'save1'"
:color="tab !== 'save1' ? 'grey' : 'add'">
<q-tooltip>ดาวนโหลด</q-tooltip>
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="red"
name="mdi-file-pdf" /></q-item-section>
<q-item-section>ไฟล .PDF</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="blue"
name="mdi-file-word" /></q-item-section>
<q-item-section>ไฟล .docx</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
<q-tab name="save2" label="บันทึกผลครั้งที่ 2" />
<q-btn size="12px" flat dense icon="mdi-download" :disable="tab !== 'save2'"
:color="tab !== 'save2' ? 'grey' : 'add'">
<q-tooltip>ดาวนโหลด</q-tooltip>
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="red"
name="mdi-file-pdf" /></q-item-section>
<q-item-section>ไฟล .PDF</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="blue"
name="mdi-file-word" /></q-item-section>
<q-item-section>ไฟล .docx</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
<!-- <q-tab name="save3" label="บันทึกผลครั้งที่ 3" />
<q-btn size="12px" flat dense icon="mdi-download" :disable="tab !== 'save3'"
:color="tab !== 'save3' ? 'grey' : 'add'">
<q-tooltip>ดาวนโหลด</q-tooltip>
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="red"
name="mdi-file-pdf" /></q-item-section>
<q-item-section>ไฟล .PDF</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section avatar><q-icon color="blue"
name="mdi-file-word" /></q-item-section>
<q-item-section>ไฟล .docx</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn> -->
</q-tabs>
<div>
<q-btn color="blue" flat dense icon="mdi-plus">
<q-tooltip>
เพมบนทกผลการทดลอง
</q-tooltip>
</q-btn>
</div>
</div>
</q-header>
<q-page-container>
<div class="col-12 row">
<Form />
</div>
</q-page-container>
</q-layout>
</q-page-container>
</q-layout>
<q-separator />
</div>
</q-header>
<q-page-container>
<div class="col-12 row">
<Form />
</div>
</q-page-container>
</q-layout>
</q-page-container>
</q-layout>
</q-card>
</template>
<script setup lang="ts">
import { useRouter } from "vue-router";
import { ref } from "vue";
import Form from "@/modules/05_placement/components/probation/form.vue";
import Form from "@/modules/05_placement/components/probation/FormEvaluation.vue";
const router = useRouter();
const drawer = ref<boolean>(true);
const tab = ref('save1');
const tab = ref('save1');
</script>
<style lang="scss" scope>
.btn-absolute {
z-index: 50;
position: absolute;
left: 200px;
top: 10px;
z-index: 50;
position: absolute;
left: 200px;
top: 10px;
}
.btnShadow {
box-shadow: 0 1px 2px rgb(0 0 0 / 10%), 3px 3px 7px 1px rgba(95, 95, 95, 0.15) !important;
box-shadow: 0 1px 2px rgb(0 0 0 / 10%), 3px 3px 7px 1px rgba(95, 95, 95, 0.15) !important;
}
</style>

View file

@ -61,110 +61,110 @@
<div class="row q-col-gutter-sm">
<div class="row col-12 q-col-gutter-sm">
<div>
<q-btn @click="router.push(`/probation/work/add`)" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพมงานทไดบมอบหมาย</q-tooltip>
</q-btn>
</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-btn @click="router.push(`/probation/add`)" size="12px" flat round color="add" icon="mdi-plus">
<q-tooltip>เพมงานทไดบมอบหมาย</q-tooltip>
</q-btn>
</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"
options-cover
style="min-width: 150px"
class="col-xs-12 col-sm-3 col-md-2"
/>
</div>
<div class="col-12">
<q-table
ref="table"
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="Order"
flat
bordered
:paging="true"
dense
class="custom-header-table"
v-bind="attrs"
:visible-columns="visibleColumns"
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<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-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer" @click="router.push(`/probation/form`)">
<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>
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<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"
options-cover
style="min-width: 150px"
class="col-xs-12 col-sm-3 col-md-2"
/>
</div>
<div class="col-12">
<q-table
ref="table"
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="Order"
flat
bordered
:paging="true"
dense
class="custom-header-table"
v-bind="attrs"
:visible-columns="visibleColumns"
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<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-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer" @click="router.push(`/probation/form`)">
<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>
{{ col.value }}
</div>
</q-td>
<!-- <q-td auto-width>
<q-btn flat dense size="12px" round color="blue" icon="mdi-file-download-outline">
<q-tooltip> ดาวนโหลด .Docx</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">
<q-pagination
v-model="pagination.page"
active-color="primary"
color="dark"
:max="scope.pagesNumber"
:max-pages="5"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</q-table>
</div>
</div>
</q-card>
</q-td> -->
</q-tr>
</template>
<template v-slot:pagination="scope">
<q-pagination
v-model="pagination.page"
active-color="primary"
color="dark"
:max="scope.pagesNumber"
:max-pages="5"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</q-table>
</div>
</div>
</q-card>
</template>
<script setup lang="ts">
import { useRouter } from "vue-router";
@ -180,92 +180,92 @@ const institution = ref<string>('ฝ่ายบริหารงานทั
const status = ref<string>('อยู่ระหว่างการทดลองงาน')
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const visibleColumns = ref<string[]>([
"no",
"startDate",
"no",
"startDate",
"endDete",
"intendant",
"commander",
"intendant",
"commander",
]); //
//
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "startDate",
align: "left",
label: "ตั้งแต่วันที่",
sortable: true,
field: "startDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "endDete",
align: "left",
label: "ถึงวันที่",
sortable: true,
field: "endDete",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "intendant",
align: "left",
label: "ผู้ดูแล",
sortable: true,
field: "intendant",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
name: "startDate",
align: "left",
label: "ตั้งแต่วันที่",
sortable: true,
field: "startDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "commander",
align: "left",
label: "ผู้บังคับบัญชา",
sortable: true,
field: "commander",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
}
name: "endDete",
align: "left",
label: "ถึงวันที่",
sortable: true,
field: "endDete",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "intendant",
align: "left",
label: "ผู้ดูแล",
sortable: true,
field: "intendant",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "commander",
align: "left",
label: "ผู้บังคับบัญชา",
sortable: true,
field: "commander",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
}
]);
// ()
const rows = ref<FormProbationDetail[]>([
{
{
no: "1",
startDate: "09 ก.ย. 2566",
endDete: "20 ต.ค. 2566",
intendant: "นางสาวรัชภรณ์ ภักดี",
commander: "นายนภัทร วันดี"
intendant: "นางสาวรัชภรณ์ ภักดี",
commander: "นายนภัทร วันดี"
},
{
no: "2",
startDate: "09 ก.ย. 2566",
endDete: "20 ต.ค. 2566",
intendant: "นางสาวทวิดา กมลเวชชี",
commander: "นางพิศ โพธิ์ดำ"
},
{
no: "3",
startDate: "09 ก.ย. 2566",
endDete: "20 ต.ค. 2566",
intendant: "นางสาวทวิดา กมลเวชชี",
commander: "นายนภัทร วันดี"
startDate: "25 ต.ค. 2566",
endDete: "24 ม.ค. 2567",
intendant: "นางสาวทวิดา กมลเวชชี",
commander: "นางพิศ โพธิ์ดำ"
},
// {
// no: "3",
// startDate: "09 .. 2566",
// endDete: "20 .. 2566",
// intendant: " ",
// commander: " "
// },
]);
const clickAdd = () => {

View file

@ -20,150 +20,140 @@ const detailOrderReplace = () =>
import(
"@/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue"
);
// ระบบทดลองงาน
const mainProbation = () =>
import("@/modules/05_placement/components/probation/MainProbation.vue");
const probationDetail = () =>
import("@/modules/05_placement/components/probation/ProbationDetail.vue");
const probationForm = () =>
const probationFormEvaluation = () =>
import("@/modules/05_placement/components/probation/MainDetail.vue");
const probationWorkAdd = () =>
import("@/modules/05_placement/components/probation/MainDetail.vue");
const probationWorkAdd2 = () =>
import("@/modules/05_placement/components/probation/AddWork.vue");
const resignOrder = () =>
import("@/modules/05_placement/components/OrderPlacement/ResignOrder.vue");
export default [
{
path: "/placement",
name: "placement",
component: PlacementMain,
meta: {
Auth: true,
Key: [6.1],
Role: "placement",
const probationFormAssign = () =>
import("@/modules/05_placement/components/probation/FormAssign.vue");
export default [
{
path: "/placement",
name: "placement",
component: PlacementMain,
meta: {
Auth: true,
Key: [6.1],
Role: "placement",
},
},
},
{
path: "/placement/personal-list/:examId",
name: "placementDetail",
component: PlacementDetail,
meta: {
Auth: true,
Key: [6.1],
Role: "placement",
{
path: "/placement/personal-list/:examId",
name: "placementDetail",
component: PlacementDetail,
meta: {
Auth: true,
Key: [6.1],
Role: "placement",
},
},
},
{
path: "/placement/personal-detail/:personalId",
name: "PlacementPersonalDetail",
component: PlacementPersonalDetail,
meta: {
Auth: true,
Key: [6.1],
Role: "placement",
{
path: "/placement/personal-detail/:personalId",
name: "PlacementPersonalDetail",
component: PlacementPersonalDetail,
meta: {
Auth: true,
Key: [6.1],
Role: "placement",
},
},
},
{
path: "/placement/order",
name: "Orderplacement",
component: MainOrderPlacement,
meta: {
Auth: true,
Key: [6.2],
Role: "placement",
{
path: "/placement/order",
name: "Orderplacement",
component: MainOrderPlacement,
meta: {
Auth: true,
Key: [6.2],
Role: "placement",
},
},
},
{
path: "/placement/order/detail",
name: "OrderplacementDetail",
component: detailOrderReplace,
meta: {
Auth: true,
Key: [6.2],
Role: "placement",
{
path: "/placement/order/detail",
name: "OrderplacementDetail",
component: detailOrderReplace,
meta: {
Auth: true,
Key: [6.2],
Role: "placement",
},
},
},
{
path: "/placement/addOrderPlacement",
name: "addOrderPlacement",
component: addOrderPlacement,
meta: {
Auth: true,
Key: [6.2],
Role: "placement",
{
path: "/placement/addOrderPlacement",
name: "addOrderPlacement",
component: addOrderPlacement,
meta: {
Auth: true,
Key: [6.2],
Role: "placement",
},
},
},
{
path: "/probation",
name: "probation",
component: mainProbation,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
{
path: "/probation",
name: "probation",
component: mainProbation,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
},
},
},
{
path: "/probation/detail/:id",
name: "probationDetail",
component: probationDetail,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
{
path: "/probation/detail/:id",
name: "probationDetail",
component: probationDetail,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
},
},
},
{
path: "/probation/form",
name: "probationForm",
component: probationForm,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
{
path: "/probation/form",
name: "probationForm",
component: probationFormEvaluation,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
},
},
},
{
path: "/probation/work/add",
name: "probationWorkAdd",
component: probationWorkAdd,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
{
path: "/probation/work/add",
name: "probationWorkAdd",
component: probationWorkAdd,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
},
},
},
{
path: "/probation/work/:id",
name: "probationWork",
component: probationWorkAdd,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
{
path: "/probation/work/:id",
name: "probationWork",
component: probationWorkAdd,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
},
},
},
{
path: "/probation/add",
name: "probationWorkAdd",
component: probationWorkAdd2,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
{
path: "/probation/add",
name: "probationWorkAdd",
component: probationFormAssign,
meta: {
Auth: true,
Key: [6.3],
Role: "placement",
},
},
},
{
path: "/placement/resign-order",
name: "ResignOrderplacement",
component: resignOrder,
meta: {
Auth: true,
Key: [6.2],
Role: "placement",
},
},
];
];

View file

@ -0,0 +1,268 @@
<script setup lang="ts">
import { ref } from "vue";
import type { QTableProps } from "quasar";
import { useRouter } from "vue-router";
const router = useRouter();
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const paging = ref<boolean>(true);
const paginationLabel = (start: string, end: string, total: string) => {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total;
};
const visibleColumns = ref<string[]>([ "prefix", "fullname", "positionType", "position", "positionLevel", "positionExecutive", "oc"]); //
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
const resetFilter = () => {
filterKeyword.value = "";
filterRef.value.focus();
};
// const nextPage = (id:string) => {
// router.push("/retirement/resign/"+id);
// };
const rows = ref<any>([
{ personalId:"0a846508-4932-40de-9a9e-5b519492217c",prefix: "นางสาว", fullname: "นางสาวอย พชช", positionType: "บริหาร", position: "นักบริหาร", positionLevel: "ต้น", positionExecutive: "ผู้ช่วยหัวหน้าสำนักงาน", oc: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร"},
{ personalId:"0a846508-4932-40de-9a9e-5b519492227c",prefix: "นางสาว", fullname: "นางสาววญ สพ", positionType: "วิชาการ", position: "นักจัดการงานทั่วไป", positionLevel: "ปฏิบัติการ", positionExecutive: "-", oc: "กลุ่มงานช่วยนักบริหาร"},
]);
const columns = ref<QTableProps["columns"]>([
{
name: "prefix",
align: "left",
label: "คำนำหน้า",
sortable: true,
field: "prefix",
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: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
label: "ระดับ",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionExecutive",
align: "left",
label: "ตำแหน่งทางการบริหาร",
sortable: true,
field: "positionExecutive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "oc",
align: "left",
label: "สังกัด",
sortable: true,
field: "oc",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">รายการบนทกเวยนแจงการถงแกกรรม</div>
<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">
<!-- <q-select
v-model="fiscalyear"
label="ปีงบประมาณ"
dense
emit-value
map-options
:options="fiscalyearOP"
option-value="id"
option-label="name"
lazy-rules
hide-bottom-space
:readonly="false"
:borderless="false"
:outlined="true"
:hide-dropdown-icon="false"
style="min-width: 150px"
@update:model-value="searchFilterTable"
/> -->
<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"
options-cover
style="min-width: 150px"
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="fullname"
flat
bordered
:paging="true"
dense
class="custom-header-table"
:visible-columns="visibleColumns"
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<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-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer" @click=" router.push(`/retirement/resign/${props.rowIndex + 1}`)">
<!-- <q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td> -->
<q-td key="prefix" :props="props">
{{ props.row.prefix }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="positionType" :props="props">
{{ props.row.positionType }}
</q-td>
<q-td key="position" :props="props">
{{ props.row.position }}
</q-td>
<q-td key="positionLevel" :props="props">
{{ props.row.positionLevel }}
</q-td>
<q-td key="positionExecutive" :props="props">
{{ props.row.positionExecutive }}
</q-td>
<q-td key="oc" :props="props">
{{ props.row.oc }}
</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-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>

View file

@ -0,0 +1,278 @@
<script setup lang="ts">
import { ref } from "vue";
import type { QTableProps } from "quasar";
import { useRouter } from "vue-router";
const router = useRouter();
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const paging = ref<boolean>(true);
const paginationLabel = (start: string, end: string, total: string) => {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total;
};
const visibleColumns = ref<string[]>([ "prefix", "fullname", "positionType", "position", "positionLevel", "positionExecutive", "oc", "status",]); //
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
const resetFilter = () => {
filterKeyword.value = "";
filterRef.value.focus();
};
// const nextPage = (id:string) => {
// router.push("/retirement/resign/"+id);
// };
const rows = ref<any>([
{ personalId:"0a846508-4932-40de-9a9e-5b519492217c",prefix: "นางสาว", fullname: "นางสาวอย พชช", positionType: "บริหาร", position: "นักบริหาร", positionLevel: "ต้น", positionExecutive: "ผู้ช่วยหัวหน้าสำนักงาน", oc: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", status: "ยื่นลาออก",},
{ personalId:"0a846508-4932-40de-9a9e-5b519492227c",prefix: "นางสาว", fullname: "นางสาววญ สพ", positionType: "วิชาการ", position: "นักจัดการงานทั่วไป", positionLevel: "ปฏิบัติการ", positionExecutive: "-", oc: "กลุ่มงานช่วยนักบริหาร", status: "ยื่นลาออก",},
]);
const columns = ref<QTableProps["columns"]>([
{
name: "prefix",
align: "left",
label: "คำนำหน้า",
sortable: true,
field: "prefix",
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: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
label: "ระดับ",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionExecutive",
align: "left",
label: "ตำแหน่งทางการบริหาร",
sortable: true,
field: "positionExecutive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "oc",
align: "left",
label: "สังกัด",
sortable: true,
field: "oc",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">รายการลาออก</div>
<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">
<!-- <q-select
v-model="fiscalyear"
label="ปีงบประมาณ"
dense
emit-value
map-options
:options="fiscalyearOP"
option-value="id"
option-label="name"
lazy-rules
hide-bottom-space
:readonly="false"
:borderless="false"
:outlined="true"
:hide-dropdown-icon="false"
style="min-width: 150px"
@update:model-value="searchFilterTable"
/> -->
<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"
options-cover
style="min-width: 150px"
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="fullname"
flat
bordered
:paging="true"
dense
class="custom-header-table"
:visible-columns="visibleColumns"
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<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-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer" @click=" router.push(`/retirement/resign/${props.rowIndex + 1}`)">
<!-- <q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td> -->
<q-td key="prefix" :props="props">
{{ props.row.prefix }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="positionType" :props="props">
{{ props.row.positionType }}
</q-td>
<q-td key="position" :props="props">
{{ props.row.position }}
</q-td>
<q-td key="positionLevel" :props="props">
{{ props.row.positionLevel }}
</q-td>
<q-td key="positionExecutive" :props="props">
{{ props.row.positionExecutive }}
</q-td>
<q-td key="oc" :props="props">
{{ props.row.oc }}
</q-td>
<q-td key="status" :props="props">
{{ props.row.status }}
</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-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>

View file

@ -0,0 +1,390 @@
<template>
<div class="toptitle text-dark col-12 row items-center">
<q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1)"
/>
รายละเอยดการลาออกของ {{ name }}
</div>
<q-card bordered class="row col-12 text-dark">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ name }}</div>
<q-space />
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm" label="ดูข้อมูลทะเบียนประวัติ" />
</div>
<div class="col-12"><q-separator/></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-3 col-sm-2 col-md-1 row ">
<q-img src="@/assets/avatar_user.jpg" />
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12 q-pl-md">
<div class="col-12 text-top">ตำแหนงในสายงาน</div>
<div class="col-12 text-detail">{{position}}</div>
</div>
</div>
<div class="col-xs-6 col-sm-2 row items-center">
<div class="col-12">
<div class="col-12 text-top">ระด</div>
<div class="col-12 text-detail">{{level}}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<div class="col-12 text-top">งก</div>
<div class="col-12 text-detail">{{institution}}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<div class="col-12 text-top">สถานะการทดลองงาน</div>
<div class="col-12 text-detail">
<q-icon size="20px" v-if="status == 'อยู่ระหว่างการทดลองงาน'" name="mdi-timer-sand" color="deep-orange" />
<q-icon size="20px" v-else-if="status == 'ไม่ผ่านการทดลอง'" name="mdi-close" color="red" />
<q-icon size="20px" v-else name="mdi-check" color="teal" />
{{ status }}
</div>
</div>
</div>
</div>
</div>
</q-card>
<q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark">อมลการลาออก</div>
<q-space />
<div class="q-gutter-x-sm">
<q-btn outline color="primary" dense icon-right="check" class="q-px-sm" label="อนุมัติ" @click="popUp('pass')" />
<q-btn outline color="red" dense icon-right="close" class="q-px-sm" label="ยับยั้ง" @click="popUp('passNot')"/>
</div>
</div>
<div class="col-12"><q-separator/></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12 ">
<div class="col-12 text-top">สถานทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">{{location}}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<div class="col-12 text-top">นทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">{{filingDate}}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12 ">
<div class="col-12 text-top">เหตผลทลาออกจากราชการ</div>
<div class="col-12 text-detail">{{reason}}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<div class="col-12 text-top">นทขอลาออกจากราชการ</div>
<div class="col-12 text-detail">{{requestDate}}</div>
</div>
</div>
</div>
</div>
</q-card>
<q-dialog v-model="modalPass" persistent>
<q-card style="width: 800px">
<q-form ref="myForm">
<DialogHeader
:title="`${modalPass ? 'อนุมัติ' : 'ยับยั้ง'}`"
:close="clickClose"
/>
<q-separator />
<q-card-section class="q-p-sm">
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
hide-bottom-space
dense
lazy-rules
outlined
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
v-model="userNote"
:label="`${'กรอกเหตุผล'}`"
type="textarea"
/>
</div>
</q-card-section>
<q-separator />
<DialogFooter
:editvisible="true"
:save="modalPass ? savePass : savePassNot"
/>
</q-form>
</q-card>
</q-dialog>
<q-dialog v-model="modalPassNot" persistent>
<q-card style="width: 800px">
<q-form ref="myForm">
<DialogHeader
:title="`${modalPass ? 'อนุมัติ' : 'ยับยั้ง'}`"
:close="clickClose"
/>
<q-separator />
<q-card-section class="q-p-sm">
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
hide-bottom-space
dense
outlined
lazy-rules
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
v-model="userNote"
:label="`${'กรอกเหตุผล'}`"
type="textarea"
/>
</div>
</q-card-section>
<q-separator />
<DialogFooter
:editvisible="true"
:save="modalPass ? savePass : savePassNot"
/>
</q-form>
</q-card>
</q-dialog>
</template>
<script setup lang="ts">
import { useRouter } from "vue-router";
import { useQuasar, QForm } from "quasar";
import { ref, useAttrs } from "vue";
import type { QTableProps } from "quasar";
import type { FormProbationDetail } from "@/modules/05_placement/interface/request/Main";
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
const router = useRouter();
const userNote = ref<string>("");
const name = ref<string>('นายสมคิด ยอดใจ')
const position = ref<string>('นักจัดการงานทั่วไป')
const level = ref<string>('ชำนาญการพิเศษ')
const institution = ref<string>('ฝ่ายบริหารงานทั่วไป')
const status = ref<string>('อยู่ระหว่างการทดลองงาน')
const edit = ref<boolean>(true)
const location = ref<string>('ที่ทำงาน')
const filingDate = ref<string>('21 ก.ค. 2566')
const reason = ref<string>('เพราะxxx')
const requestDate = ref<string>('21 ธ.ค. 2566')
const $q = useQuasar();
const modalPass = ref<boolean>(false);
const modalPassNot = ref<boolean>(false);
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const visibleColumns = ref<string[]>([
"no",
"startDate",
"endDete",
"intendant",
"commander",
]); //
//
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "startDate",
align: "left",
label: "ตั้งแต่วันที่",
sortable: true,
field: "startDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "endDete",
align: "left",
label: "ถึงวันที่",
sortable: true,
field: "endDete",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "intendant",
align: "left",
label: "ผู้ดูแล",
sortable: true,
field: "intendant",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "commander",
align: "left",
label: "ผู้บังคับบัญชา",
sortable: true,
field: "commander",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
}
]);
// ()
const rows = ref<FormProbationDetail[]>([
{
no: "1",
startDate: "09 ก.ย. 2566",
endDete: "20 ต.ค. 2566",
intendant: "นางสาวรัชภรณ์ ภักดี",
commander: "นายนภัทร วันดี"
},
{
no: "2",
startDate: "09 ก.ย. 2566",
endDete: "20 ต.ค. 2566",
intendant: "นางสาวทวิดา กมลเวชชี",
commander: "นางพิศ โพธิ์ดำ"
},
{
no: "3",
startDate: "09 ก.ย. 2566",
endDete: "20 ต.ค. 2566",
intendant: "นางสาวทวิดา กมลเวชชี",
commander: "นายนภัทร วันดี"
},
]);
const clickAdd = () => {
};
//
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
const resetFilter = () => {
filterKeyword.value = "";
filterRef.value.focus();
};
const attrs = ref<any>(useAttrs());
const paging = ref<boolean>(true);
const paginationLabel = (start: string, end: string, total: string) => {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total;
};
const popUp = (action: "pass" | "passNot" ) => {
if (action === "pass") {
modalPass.value = true;
} else if (action === "passNot") {
modalPassNot.value = true;
}
};
const clickClose = () =>{
userNote.value = ""
modalPass.value = false
modalPassNot.value = false
}
const savePass = () =>{
$q.dialog({
title: "ยืนยันการขอลาออก",
message: "ต้องการยืนยันการขอลาออกข้อมูลนี้ใช่หรือไม่ ?",
cancel: {
flat: true,
const: "negative",
},
persistent: true,
})
.onOk(() => {
modalPass.value = false
console.log('----MSG---- :',userNote.value)
console.log('passSave (close)')
userNote.value = ""
}).onCancel(() => {})
.onDismiss(() => {});
}
const savePassNot = () => {
$q.dialog({
title: "ยืนยันการขอลาออก",
message: "ต้องการยืนยันการขอลาออกข้อมูลนี้ใช่หรือไม่ ?",
cancel: {
flat: true,
const: "negative",
},
persistent: true,
})
.onOk(() => {
modalPass.value = false
console.log('----MSG---- :',userNote.value)
console.log('passSaveNot (close)')
userNote.value = ""
}).onCancel(() => {})
.onDismiss(() => {});
}
</script>
<style lang="scss" scope>
.q-img {
border-radius: 5px;
height: 70px;
}
.text-top{
color: gray;
font-weight: 400;
padding-bottom: 3px;
}
.text-detail{
font-weight: 500;
}
.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>

View file

@ -1 +1,4 @@
export type {};
interface Pagination {
rowsPerPage: number;
}
export type {Pagination};

View file

@ -4,8 +4,10 @@
const Main = () => import("@/modules/06_retirement/views/Main.vue");
const Listretirement = () => import("@/modules/06_retirement/components/ListRetirement/TableList.vue")
const resignOrder = () => import("@/modules/06_retirement/components/resign/ResignOrder.vue");
const resign = () => import("@/modules/06_retirement/components/resign/Resign.vue");
const resignByid = () => import("@/modules/06_retirement/components/resign/ResignByid.vue")
const deceased = () => import("@/modules/06_retirement/components/resign/Deceased.vue")
export default [
{
path: "/retirement",
@ -27,4 +29,45 @@ export default [
Role: "retirement",
},
},
{
path: "/retirement/resign",
name: "resign",
component: resign,
meta: {
Auth: true,
Key: [7.2],
Role: "retirement",
},
},
{
path: "/retirement/resign/:id",
name: "resignbyid",
component: resignByid,
meta: {
Auth: true,
Key: [7.3],
Role: "retirement",
},
},
{
path: "/retirement/resign-order",
name: "resign-order",
component: resignOrder,
meta: {
Auth: true,
Key: [7.4],
Role: "retirement",
},
},
{
path: "/deceased",
name: "deceased",
component: deceased,
meta: {
Auth: true,
Key: [7.4],
Role: "retirement",
},
},
];