Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-10-25 15:15:59 +07:00
commit d99676095f
28 changed files with 1679 additions and 1391 deletions

View file

@ -1,65 +0,0 @@
<script setup lang="ts">
/** props*/
const props = defineProps({
editvisible: Boolean,
modalEdit: Boolean,
cancel: {
type: Function,
default: () => console.log("not function"),
},
edit: {
type: Function,
default: () => console.log("not function"),
},
save: {
type: Function,
default: () => console.log("not function"),
},
validate: {
type: Function,
default: () => console.log("not function"),
},
});
const emit = defineEmits([
"update:editvisible",
"update:next",
"update:previous",
]);
function updateEdit(value: Boolean) {
emit("update:editvisible", value);
}
async function edit() {
updateEdit(!props.editvisible);
props.edit();
}
/* บันทึกข้อมูล**/
function checkSave() {
props.validate();
props.save();
}
</script>
<template>
<q-card-actions class="text-primary">
<q-space />
<q-btn
v-if="!editvisible"
outline
:disabled="editvisible"
:color="editvisible ? 'grey-7' : 'primary'"
@click="edit"
>
</q-btn>
<div v-else>
<q-btn
unelevated
label="บันทึก"
:disabled="!editvisible"
:color="!editvisible ? 'grey-7' : 'public'"
@click="checkSave"
>
</q-btn>
</div>
</q-card-actions>
</template>

View file

@ -1,39 +0,0 @@
<script setup lang="ts">
/** props*/
const props = defineProps({
title: String,
close: {
type: Function,
default: () => console.log("not function"),
},
});
/**
* งก close
*/
const close = async () => {
props.close();
};
</script>
<template>
<q-toolbar class="q-py-md">
<q-toolbar-title class="header-text">{{ title }}</q-toolbar-title>
<q-btn
icon="close"
unelevated
round
dense
@click="close"
style="color: #ff8080; background-color: #ffdede"
/>
</q-toolbar>
</template>
<style scoped lang="scss">
.header-text {
font-size: 18px;
font-weight: 600;
line-height: 26px;
color: #35373c;
}
</style>

View file

@ -9,7 +9,7 @@ import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue";
import DialogHeader from "@/components/DialogHeader.vue";
/** use */
const $q = useQuasar();
@ -151,7 +151,7 @@ watchEffect(() => {
<template>
<q-dialog v-model="props.modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader title="ส่งไปออกคำสั่งปลดออก" :close="closeModal" />
<DialogHeader tittle="ส่งไปออกคำสั่งปลดออก" :close="closeModal" />
<q-separator />
<q-card-section class="q-pt-none">
<div class="row justify-end">

View file

@ -11,7 +11,7 @@ import { useTransferDataStore } from "@/modules/05_placement/store";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue";
import DialogHeader from "@/components/DialogHeader.vue";
/** use */
const $q = useQuasar();
@ -162,7 +162,7 @@ watchEffect(() => {
<template>
<q-dialog v-model="props.modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader title="ส่งไปออกคำสั่งให้ออก" :close="closeModal" />
<DialogHeader tittle="ส่งไปออกคำสั่งให้ออก" :close="closeModal" />
<q-separator />
<q-card-section class="q-pt-none">
<div class="row justify-end">

View file

@ -271,7 +271,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 1',
]"
/>
@ -288,7 +288,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -310,7 +310,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
]"
/>
</div>
@ -340,7 +340,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 2',
]"
/>
@ -357,7 +357,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -379,7 +379,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
]"
/>
</div>
@ -409,7 +409,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 3',
]"
/>
@ -426,7 +426,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -448,7 +448,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
]"
/>
</div>
@ -478,7 +478,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 4',
]"
/>
@ -495,7 +495,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -517,7 +517,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
]"
/>
</div>
@ -547,7 +547,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 5',
]"
/>
@ -565,7 +565,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -594,7 +594,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 6',
]"
/>
@ -612,7 +612,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -641,7 +641,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 7',
]"
/>
@ -658,7 +658,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -680,7 +680,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
]"
/>
</div>
@ -710,7 +710,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 8',
]"
/>
@ -728,7 +728,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -750,7 +750,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
]"
/>
</div>
@ -780,7 +780,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 9',
]"
/>
@ -798,7 +798,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>
@ -820,7 +820,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคำตอบ',
]"
/>
</div>
@ -850,7 +850,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกคำถามข้อที่ 10',
]"
/>
@ -868,7 +868,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
(val:string) => (val && val.length > 0) || 'กรุณากรอกคะแนน',
]"
/>
</div>

View file

@ -492,8 +492,8 @@ onMounted(async () => {
hide-bottom-space
:label="`${' วันนัดหมายเพื่อทําการสัมภาษณ์การลาออก'}`"
:rules="[
(val) => !!val || `${'กรุณาเลือกลงวันที่'}`,
(val) =>
(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`,
(val:string) =>
validationDate(val) ||
`${'วันที่นัดหมายต้องมากกว่าวันที่สร้าง'}`,
]"

View file

@ -370,7 +370,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -441,7 +441,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -486,7 +486,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -590,7 +590,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -636,7 +636,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -681,7 +681,7 @@ onMounted(async () => {
disable
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>

View file

@ -9,7 +9,7 @@ import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue";
import DialogHeader from "@/components/DialogHeader.vue";
/** use */
const $q = useQuasar();
@ -154,7 +154,7 @@ watchEffect(() => {
<template>
<q-dialog v-model="props.modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader title="ส่งไปออกคำสั่งไล่ออก" :close="closeModal" />
<DialogHeader tittle="ส่งไปออกคำสั่งไล่ออก" :close="closeModal" />
<q-separator />
<q-card-section class="q-pt-none">
<div class="row justify-end">

View file

@ -7,7 +7,7 @@ import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useRetirementDataStore } from "@/modules/06_retirement/store";
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
import type { ResponseData } from "@/modules/06_retirement/interface/response/expulsion";

View file

@ -1,9 +1,11 @@
<script setup lang="ts">
import { ref, computed, watchEffect } from "vue";
import { ref, watchEffect } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
import type { PropType } from "vue";
import type { QTableProps } from "quasar";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
@ -12,34 +14,30 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
/** use */
const $q = useQuasar();
const stroe = useRetirementDataStore();
const { statusText } = stroe;
const selected = ref<ResponseItems[]>([]);
const mixin = useCounterMixin();
const { dialogConfirm } = mixin;
const { dialogConfirm, date2Thai } = mixin;
/** props*/
const props = defineProps({
modal: Boolean,
closeModal: Function,
fecthlist: Function,
rows2: Array,
filterKeyword2: String,
});
/** ฟังก์ชั่นการ Selected Data*/
const checkSelected = computed(() => {
if (selected.value.length === 0) {
return true;
}
modal: { type: Boolean, requreid: true },
closeModal: { type: Function, requreid: true },
fecthList: { type: Function, requreid: true },
rows: { type: Array as PropType<ResponseItems[]>, requreid: true },
filterKeyword2: { type: String, requreid: true },
mainTabs: { type: String, requreid: true },
});
//Table
const columns2 = ref<QTableProps["columns"]>([
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: false,
field: "no",
field: (row) => props?.rows!.indexOf(row) + 1,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -50,11 +48,9 @@ const columns2 = ref<QTableProps["columns"]>([
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullname",
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "location",
@ -64,8 +60,6 @@ const columns2 = ref<QTableProps["columns"]>([
field: "location",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevel",
@ -95,8 +89,6 @@ const columns2 = ref<QTableProps["columns"]>([
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organizationPositionOld",
@ -106,34 +98,28 @@ const columns2 = ref<QTableProps["columns"]>([
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "datetext",
align: "left",
label: "วันที่ดำเนินการ",
label: "วันที่ยื่น",
sortable: true,
field: "datetext",
field: (row) => date2Thai(new Date(row.createdAt)),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
sortOrder: "da",
},
{
name: "statustext",
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
field: (row) => statusText(row.status),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const visibleColumns2 = ref<string[]>([
const visibleColumns = ref<string[]>([
"no",
"prefix",
"fullname",
@ -142,7 +128,7 @@ const visibleColumns2 = ref<string[]>([
"positionNumberOld",
"organizationPositionOld",
"datetext",
"statustext",
"status",
]);
const modalCommand = ref<boolean>(false);
@ -206,7 +192,7 @@ watchEffect(() => {
</template>
</q-input>
<q-select
v-model="visibleColumns2"
v-model="visibleColumns"
multiple
outlined
dense
@ -214,7 +200,7 @@ watchEffect(() => {
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns2"
:options="columns"
option-value="name"
options-cover
style="min-width: 150px"
@ -225,11 +211,11 @@ watchEffect(() => {
</div>
<d-table
:columns="columns2"
:rows="rows2"
:columns="columns"
:rows="rows"
:filter="filterKeyword2"
row-key="id"
:visible-columns="visibleColumns2"
:visible-columns="visibleColumns"
selection="multiple"
v-model:selected="selected"
>
@ -253,20 +239,15 @@ watchEffect(() => {
/>
</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 === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis'
? 'table_ellipsis2'
: ''
"
>
{{ col.value ? col.value : "-" }}
{{ col.value ? col.value : "" }}
</div>
</q-td>
</q-tr>
@ -278,7 +259,7 @@ watchEffect(() => {
<q-btn
label="ส่งไปออกคำสั่ง"
@click="saveOrder"
:disable="checkSelected"
:disable="selected.length === 0"
color="public"
/>
</q-card-actions>
@ -287,7 +268,7 @@ watchEffect(() => {
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="'C-PM-17'"
:persons="selected"
:command-type-code="props.mainTabs === '1' ? 'C-PM-17' : 'C-PM-41'"
:persons="selected"
/>
</template>

View file

@ -0,0 +1,38 @@
<script setup lang="ts">
import { useDataStore } from "@/modules/06_retirement/store/resignMain";
import Table from "@/modules/06_retirement/components/resign/Table.vue";
const stroe = useDataStore();
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">รายการลาออก</div>
<div>
<q-card flat bordered class="col-12">
<q-tabs
v-model="stroe.mainTabs"
dense
align="left"
inline-label
class="rounded-borders"
indicator-color="primary"
active-bg-color="teal-1"
active-class="text-primary"
>
<q-tab name="1" label="ขอลาออก" />
<q-tab name="2" label="ขอยกเลิกลาออก" />
</q-tabs>
<q-separator />
<div>
<q-tab-panels v-model="stroe.mainTabs" animated>
<q-tab-panel name="1"> <Table /> </q-tab-panel>
<q-tab-panel name="2"> <Table /> </q-tab-panel>
</q-tab-panels>
</div>
</q-card>
</div>
</template>
<style scoped></style>

View file

@ -1,394 +0,0 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import type { QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useRetirementDataStore } from "@/modules/06_retirement/store";
import { checkPermission } from "@/utils/permissions";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import DialogSendToCommand from "@/modules/06_retirement/components/resign/DialogSendToCommand.vue";
/** use */
const $q = useQuasar(); // noti quasar
const RetirementData = useRetirementDataStore();
const { statusText } = RetirementData;
const router = useRouter();
const mixin = useCounterMixin();
const { messageError, date2Thai, showLoader, hideLoader } = mixin;
/** คอลัมน์ */
const rows = ref<ResponseItems[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: false,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "location",
align: "left",
label: "สถานที่ยื่นขอลาออกจากราชการ",
sortable: true,
field: "location",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organizationPositionOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "datetext",
align: "left",
label: "วันที่ยื่น",
sortable: true,
field: "datetext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
sortOrder: "da",
},
{
name: "statustext",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
/** คอลัมน์ที่แสดง */
const visibleColumns = ref<string[]>([
"no",
"prefix",
"fullname",
"location",
"positionLevel",
"positionNumberOld",
"organizationPositionOld",
"datetext",
"statustext",
]);
const filters = ref<ResponseItems[]>([]);
const rows2 = ref<ResponseItems[]>([]);
const modal = ref<boolean>(false);
const filterKeyword2 = ref<string>("");
//
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
const openModal = () => (modal.value = true);
/**Setting pagination */
const pagination = ref({
sortBy: "datetext",
descending: true,
page: 1,
rowsPerPage: 10,
});
//
function closeModal() {
modal.value = false;
filterKeyword2.value = "";
}
//reset filter
function resetFilter() {
filterKeyword.value = "";
filterRef.value.focus();
}
// Modal
async function openModalOrder() {
openModal();
const row = await filters.value.filter(
(r: ResponseItems) =>
(r.status == "REJECT" || r.status == "APPROVE") &&
r.organizationPositionOld &&
r.positionTypeOld &&
r.positionLevelOld &&
r.positionNumberOld &&
r.salary &&
r.location &&
r.sendDate
);
rows2.value = row;
}
// API
async function fecthlist() {
showLoader();
await http
.get(config.API.listResign())
.then((res: any) => {
const data = res.data.result;
let list: ResponseItems[] = [];
data.map((r: ResponseItems) => {
list.push({
datetext:
r.createdAt == null ? "-" : date2Thai(new Date(r.createdAt)),
activeDate: new Date(),
createdAt: new Date(r.createdAt),
citizenId: r.citizenId,
firstName: r.firstName ?? "",
id: r.id ?? "",
isActive: r.isActive ? r.isActive : false,
lastName: r.lastName ?? "",
location: r.location ?? "",
organizationPositionOld: r.organizationPositionOld ?? "",
positionLevelOld: r.positionLevelOld ?? "",
positionNumberOld: r.positionNumberOld ?? "",
positionTypeOld: r.positionTypeOld ?? "",
prefix: r.prefix ?? "",
profileId: r.profileId ?? "",
reason: r.reason ?? "",
salary: r.salary ? r.salary : 0,
sendDate: r.sendDate,
status: r.status ?? "",
statustext: statusText(r.status ?? ""),
fullname: `${r.prefix ?? ""}${r.firstName ?? ""} ${r.lastName ?? ""}`,
});
});
rows.value = list;
filters.value = list;
})
.catch((e: any) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/**Hook */
onMounted(async () => {
await fecthlist();
});
</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">
<div>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
@click="openModalOrder"
flat
round
color="add"
icon="mdi-account-arrow-right"
>
<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-pt-sm">
<d-table
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="id"
: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
dense
round
color="info"
icon="mdi-eye"
@click="
router.push(`/retirement/resign-detail/${props.row.id}`)
"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
dense
round
color="edit"
icon="edit"
@click="router.push(`/retirement/resign/${props.row.id}`)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</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-if="col.name === 'fullname'">
<div
v-if="
!props.row.prefix &&
!props.row.firstName &&
!props.row.lastName
"
>
-
</div>
<div v-else>
{{ props.row.prefix ? props.row.prefix : ""
}}{{ props.row.firstName ? props.row.firstName : "" }}
{{ props.row.lastName ? props.row.lastName : "" }}
</div>
</div>
<div
v-else
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis'
: ''
"
>
{{ col.value == null ? "-" : col.value }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</div>
</div>
</q-card>
<DialogSendToCommand
v-model:modal="modal"
:closeModal="closeModal"
:rows2="rows2"
v-model:filterKeyword2="filterKeyword2"
:fecthlist="fecthlist"
/>
</template>
<style scoped lang="scss"></style>

View file

@ -101,12 +101,8 @@ const isCheckData = computed(() => {
posNo.value !== "" &&
salary.value !== 0 &&
date.value !== null &&
(workflowRef.value?.permission.isOperate
? dataDetail.value.commanderReject !== null
: true) &&
(workflowRef.value?.permission.isSign
? dataDetail.value.oligarchReject !== null
: true)
dataDetail.value.commanderReject !== null &&
dataDetail.value.oligarchReject !== null
) {
return true;
} else return false;
@ -181,6 +177,7 @@ function diffDate() {
/** นำข้อมูลมาจาก API*/
async function fetchData(id: string) {
showLoader();
await http
.get(config.API.resingByid(id))
.then(async (res) => {
@ -216,6 +213,8 @@ async function fetchData(id: string) {
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
@ -766,11 +765,7 @@ onMounted(async () => {
<q-space />
<div
v-if="
dataDetail.status == 'WAITTING' &&
!checkRoutePermisson &&
workflowRef?.permission.isUpdate
"
v-if="!checkRoutePermisson && workflowRef?.permission.isUpdate"
>
<div v-if="!conditions">
<q-btn
@ -812,7 +807,7 @@ onMounted(async () => {
v-model="isNoDebt"
label="ไม่เป็นหนี้สหกรณ์"
color="teal"
:disable="!conditions && !workflowRef?.permission.isUpdate"
:disable="!conditions"
/>
</div>
<div class="col-12">
@ -820,7 +815,7 @@ onMounted(async () => {
v-model="isNoBurden"
label="ไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"
color="teal"
:disable="!conditions && !workflowRef?.permission.isUpdate"
:disable="!conditions"
/>
</div>
<div class="col-12">
@ -828,7 +823,7 @@ onMounted(async () => {
v-model="isDiscipline"
label="ไม่มีพฤติการณ์ทางวินัย"
color="teal"
:disable="!conditions && !workflowRef?.permission.isUpdate"
:disable="!conditions"
/>
</div>
</q-card>
@ -845,9 +840,7 @@ onMounted(async () => {
<div class="col-12 row">
<q-file
v-if="
dataDetail.status == 'WAITTING' &&
!checkRoutePermisson &&
workflowRef?.permission.isUpdate
!checkRoutePermisson && workflowRef?.permission.isUpdate
"
class="col-12"
for="#evidenceFiles"
@ -983,7 +976,7 @@ onMounted(async () => {
ผลการพจารณาของผงคบบญชา
</div>
<q-space />
<div class="q-gutter-x-sm" v-if="workflowRef?.permission.isOperate">
<div class="q-gutter-x-sm" v-if="workflowRef?.permission.isUpdate && dataDetail.commanderReject === null">
<q-btn
outline
color="primary"
@ -1049,7 +1042,7 @@ onMounted(async () => {
ผลการพจารณาของผอำนาจ
</div>
<q-space />
<div class="q-gutter-x-sm" v-if="workflowRef?.permission.isSign">
<div class="q-gutter-x-sm" v-if="workflowRef?.permission.isUpdate && dataDetail.oligarchReject === null">
<q-btn
outline
color="primary"

View file

@ -1,682 +0,0 @@
<script setup lang="ts">
import { onMounted, reactive, ref, useAttrs, computed } from "vue";
import type { QTableProps } from "quasar";
import { useQuasar } from "quasar";
import router from "@/router";
import { useCounterMixin } from "@/stores/mixin";
import type { FormOrderPlacementMainData } from "@/modules/05_placement/interface/request/Main";
import type { DataOption } from "@/modules/05_placement/interface/index/Main";
import { useOrderPlacementDataStore } from "@/modules/05_placement/store";
/** Use */
const $q = useQuasar(); // noti quasar
const DataStore = useOrderPlacementDataStore();
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const mixin = useCounterMixin();
const { dateText } = mixin;
// . .
const textDate = (value: Date) => {
return dateText(value);
};
/** คอลัมน์ที่แสดง */
const visibleColumns = ref<string[]>([
"Order",
"OrderType",
"OrderNum",
"OrderDate",
"OrderBy",
"Signer",
"OrderStatus",
]); //
//
const columns = ref<QTableProps["columns"]>([
{
name: "Order",
align: "left",
label: "คำสั่ง",
sortable: true,
field: "Order",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "OrderNum",
align: "left",
label: "เลขที่คำสั่ง",
sortable: true,
field: "OrderNum",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "OrderType",
align: "left",
label: "ประเภท",
sortable: false,
field: "OrderType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "OrderDate",
align: "left",
label: "สั่ง ณ วันที่/วันที่คำสั่งมีผล",
sortable: true,
field: "OrderDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "OrderBy",
align: "left",
label: "คำสั่งโดย",
sortable: true,
field: "OrderBy",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "Signer",
align: "left",
label: "ผู้ลงนาม",
sortable: false,
field: "Signer",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "OrderStatus",
align: "center",
label: "สถานะคำสั่ง",
sortable: false,
field: "OrderStatus",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fiscalYear",
align: "left",
label: "ปีงบประมาณ",
sortable: true,
field: "fiscalYear",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
// ()
const rows = ref<FormOrderPlacementMainData[]>([
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2565",
fiscalYear: 2565,
OrderDate: "30 พ.ค. 2565",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "จัดทำร่างคำสั่ง",
OrderType: "คำสั่งย้าย",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2565",
fiscalYear: 2565,
OrderDate: "30 พ.ค. 2565",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "จัดทำร่างคำสั่ง",
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2564",
fiscalYear: 2564,
OrderDate: "30 พ.ค. 2564",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "บัญชีแนบท้าย",
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2564",
fiscalYear: 2564,
OrderDate: "30 พ.ค. 2564",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "บัญชีแนบท้าย",
OrderType: "คำสั่งย้าย",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2564",
fiscalYear: 2564,
OrderDate: "30 พ.ค. 2564",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ส่งสำเนาคำสั่ง",
OrderType: "คำสั่งย้าย",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2564",
fiscalYear: 2564,
OrderDate: "30 พ.ค. 2564",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ส่งสำเนาคำสั่ง",
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2566",
fiscalYear: 2566,
OrderDate: "30 พ.ค. 2566",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "รอลงนาม",
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2566",
fiscalYear: 2566,
OrderDate: "30 พ.ค. 2566",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ออกคำสั่งแล้ว",
OrderType: "คำสั่งแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2565",
fiscalYear: 2565,
OrderDate: "30 พ.ค. 2565",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ออกคำสั่งแล้ว",
OrderType: "คำสั่งบรรจุและแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2566",
fiscalYear: 2566,
OrderDate: "30 พ.ค. 2566",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ออกคำสั่งแล้ว",
OrderType: "คำสั่งแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2566",
fiscalYear: 2566,
OrderDate: "30 พ.ค. 2566",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ออกคำสั่งแล้ว",
OrderType: "คำสั่งย้าย",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2564",
fiscalYear: 2564,
OrderDate: "30 พ.ค. 2564",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ออกคำสั่งแล้ว",
OrderType: "คำสั่งแต่งตั้ง",
},
{
Order: "คำสั่งแต่งตั้งผู้สอบแข่งขันได้",
OrderNum: "1/2566",
fiscalYear: 2566,
OrderDate: "30 พ.ค. 2566",
OrderBy: "สำนักงาน กทม.",
Signer: "นาม สมคิด ยอดใจ ",
OrderStatus: "ออกคำสั่งแล้ว",
OrderType: "คำสั่งแต่งตั้ง",
},
]);
let OriginalData = ref<FormOrderPlacementMainData[]>([]);
let UpdataData = ref<FormOrderPlacementMainData[]>([]);
/**
* งคาขอมลจาก store
*/
async function OriginalDataFetch() {
await DataStore.DataMainOrder(rows.value);
OriginalData.value = await DataStore.DataMainOrigOrder;
UpdataData.value = OriginalData.value;
}
//
function redirectToPage(id?: number) {
router.push(`/placement/order/detail`);
}
/**
* function delete
* @param id id delete
*/
function clickDelete(id: string) {
$q.dialog({
title: "ยืนยันการลบข้อมูล",
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
})
.onOk(async () => {})
.onCancel(() => {})
.onDismiss(() => {});
}
//route OrderplacementDetail
function clickAdd() {
router.push({ name: "OrderplacementDetail" });
}
//
const fiscalyear = ref<number | null>(0);
const fiscalyearOP = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
const addedfiscalYearValues: number[] = [];
async function fiscalYearFilter() {
for (let data of OriginalData.value) {
const year = data.fiscalYear;
if (fiscalyear.value === null || year > fiscalyear.value) {
fiscalyear.value = year;
}
if (!addedfiscalYearValues.includes(year)) {
fiscalyearOP.push({ id: year, name: year.toString() });
addedfiscalYearValues.push(year);
}
}
}
/**
* เลอกประเภทคำส
*/
const OrderType = ref<string>("");
const OrderTypeOption = reactive<DataOption[]>([{ id: 0, name: "ทั้งหมด" }]);
const addedOrderTypeValues: string[] = [];
async function OrderTypeFilter() {
for (let data of OriginalData.value) {
const OrderTypeValue = data.OrderType;
if (!addedOrderTypeValues.includes(OrderTypeValue)) {
OrderTypeOption.push({
id: OrderTypeOption.length,
name: OrderTypeValue,
});
addedOrderTypeValues.push(OrderTypeValue);
}
}
}
/**
* เลอกStatus คำส
*/
const OrderStatus = ref<string>("");
const OrderStatusOption = reactive<DataOption[]>([{ id: 1, name: "ทั้งหมด" }]);
const addedOrderStatusValues: string[] = [];
async function OrderStatusFilter() {
for (let data of OriginalData.value) {
const OrderStatusValue = data.OrderStatus;
if (
OrderStatusValue === null ||
parseInt(OrderStatusValue) > parseInt(OrderStatusValue)
) {
OrderStatus.value = OrderStatusValue;
}
if (!addedOrderStatusValues.includes(OrderStatusValue)) {
OrderStatusOption.push({
id: OrderStatusOption.length,
name: OrderStatusValue,
});
addedOrderStatusValues.push(OrderStatusValue);
}
}
}
//
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
/** ล้างค่าในฟิลเตอร์ */
function resetFilter() {
filterKeyword.value = "";
filterRef.value.focus();
}
const attrs = ref<any>(useAttrs());
async function searchFilterTable() {
await DataStore.DataUpdateOrder(
OrderType.value,
OrderStatus.value,
fiscalyear.value
);
UpdataData.value = DataStore.DataMainUpdateOrder;
}
/**Setting pagination */
const paging = ref<boolean>(true);
function paginationLabel(start: string, end: string, total: string) {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total;
}
/**Hook */
onMounted(async () => {
await OriginalDataFetch();
fiscalYearFilter();
searchFilterTable();
OrderStatusFilter();
OrderTypeFilter();
});
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">คำสงลาออก</div>
<div>
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
<div class="row q-col-gutter-sm">
<div class="row col-12 q-col-gutter-sm">
<q-select
class="col-xs-12 col-sm-3 col-md-2"
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"
@update:model-value="searchFilterTable"
/>
<div>
<q-btn
size="12px"
flat
round
color="add"
icon="mdi-plus"
@click="clickAdd"
>
<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-card bordered class="col-12 filter-card q-pa-sm">
<div class="row col-12 q-col-gutter-sm">
<q-select
class="col-xs-12 col-sm-3 col-md-2"
v-model="OrderType"
label="ประเภท"
dense
emit-value
map-options
option-label="name"
:options="OrderTypeOption"
option-value="id"
lazy-rules
hide-bottom-space
:readonly="false"
:borderless="false"
:outlined="true"
:hide-dropdown-icon="false"
@update:model-value="searchFilterTable"
/>
<q-select
class="col-xs-12 col-sm-3 col-md-2"
v-model="OrderStatus"
label="สถานะ"
dense
emit-value
map-options
option-label="name"
:options="OrderStatusOption"
option-value="id"
lazy-rules
hide-bottom-space
:readonly="false"
:borderless="false"
:outlined="true"
:hide-dropdown-icon="false"
@update:model-value="searchFilterTable"
/>
</div>
</q-card>
</div>
<div class="col-12">
<q-table
ref="table"
:columns="columns"
:rows="UpdataData"
: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">
<q-td
key="Order"
:props="props"
@click="redirectToPage(props.row.Order)"
>
{{ props.row.Order }}
</q-td>
<q-td
key="OrderNum"
:props="props"
@click="redirectToPage(props.row.Order)"
>
{{ props.row.OrderNum }}
</q-td>
<q-td
key="OrderType"
:props="props"
@click="redirectToPage(props.row.OrderType)"
>
{{ props.row.OrderType }}
</q-td>
<q-td
key="OrderDate"
:props="props"
@click="redirectToPage(props.row.Order)"
>
{{ props.row.OrderDate }}
</q-td>
<q-td
key="OrderBy"
:props="props"
@click="redirectToPage(props.row.Order)"
>
{{ props.row.OrderBy }}
</q-td>
<q-td
key="Signer"
:props="props"
@click="redirectToPage(props.row.Order)"
>
{{ props.row.Signer }}
</q-td>
<q-td
key="OrderStatus"
:props="props"
@click="redirectToPage(props.row.Order)"
>
{{ props.row.OrderStatus }}
</q-td>
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.id)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</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>
</div>
</template>
<style lang="scss" scope>
.filter-card {
background-color: #f1f1f1b0;
}
.toggle-expired-account {
font-size: 12px;
font-weight: 400;
font-size: 15px;
line-height: 150%;
color: #35373c;
}
.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>

View file

@ -0,0 +1,939 @@
<script setup lang="ts">
import { ref, onMounted, computed } from "vue";
import axios from "axios";
import { useRouter, useRoute } from "vue-router";
import { useQuasar, QForm } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import genReport from "@/plugins/genreport";
import { useCounterMixin } from "@/stores/mixin";
import DialogHeader from "@/components/DialogHeader.vue";
import type {
TypeFile,
rowFile,
FileList,
} from "@/modules/06_retirement/interface/response/Main";
import type { QTableProps } from "quasar";
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import CardProfile from "@/components/CardProfile.vue";
import WorkFlow from "@/components/Workflow/Main.vue";
/** Use */
const $q = useQuasar();
const route = useRoute();
const router = useRouter();
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailReject");
const mixin = useCounterMixin();
const {
messageError,
date2Thai,
showLoader,
hideLoader,
success,
dialogConfirm,
dialogRemove,
} = mixin;
/** ตัวแปร */
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
const roleUser = ref<string>("");
const dataProfile = ref<DataProfile>();
const id = ref<string>(route.params.id.toString());
const myForm = ref<QForm | null>(null);
const edit = ref<boolean>(false);
const conditions = ref<boolean>(false);
const dataDetail = ref<any>({
datetext: "",
activeDate: new Date(),
createdAt: new Date(),
firstName: "",
id: "",
isActive: true,
lastName: "",
location: "",
organizationPositionOld: "",
positionLevelOld: "",
positionNumberOld: "",
positionTypeOld: "",
prefix: "",
profileId: "",
reason: "",
salary: 0,
sendDate: new Date(),
status: "",
statustext: "",
fullname: "",
});
const workflowRef = ref<any>(null);
const organizationPositionOld = ref<string>("");
const positionTypeOld = ref<string>("");
const positionLevelOld = ref<string>("");
const posNo = ref<string>("");
const salary = ref<number>(0);
const date = ref<Date | null>(null);
const dateLeave = ref<Date | null>(null);
const reason = ref<string>("");
const location = ref<string>("");
const status = ref<string>("");
const remarkHorizontal = ref<string>("");
const modal = ref<boolean>(false);
const actionPass = ref<boolean>(false);
const reasonReign = ref<string>("");
const dateBreak = ref<Date | null>(null);
const isCheckData = computed(() => {
if (
organizationPositionOld.value !== "" &&
positionTypeOld.value !== "" &&
positionLevelOld.value !== "" &&
posNo.value !== "" &&
salary.value !== 0 &&
date.value !== null &&
dataDetail.value.commanderReject !== null &&
dataDetail.value.oligarchReject !== null
) {
return true;
} else return false;
});
/**เปิด-ปิด modal */
function closeModal() {
modal.value = false;
}
function openModal() {
modal.value = true;
}
const isNoDebt = ref<boolean>(false);
const isNoBurden = ref<boolean>(false);
const isDiscipline = ref<boolean>(false);
function diffDate() {
if (date.value !== null && dateLeave.value !== null) {
const time = dateLeave.value.getTime() - date.value.getTime();
// -
const day = time / (1000 * 3600 * 24);
if (day < 30) {
return true;
}
return false;
}
return false;
}
/** นำข้อมูลมาจาก API*/
async function fetchData(id: string) {
showLoader();
await http
.get(config.API.resingByid(id))
.then(async (res) => {
const data = await res.data.result;
dataProfile.value = data as DataProfile;
dataDetail.value = data;
organizationPositionOld.value = data.organizationPositionOld ?? "";
positionTypeOld.value = data.positionTypeOld ?? "";
positionLevelOld.value = data.positionLevelOld ?? "";
posNo.value = data.positionNumberOld ?? "";
salary.value = data.salary ? data.salary : 0;
date.value = data.sendDate ? new Date(data.sendDate) : null;
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
reason.value = data.reason ?? "";
location.value = data.location ?? "";
status.value = data.status ?? "";
remarkHorizontal.value = data.remarkHorizontal ?? "-";
isNoDebt.value = data.isNoDebt;
isNoBurden.value = data.isNoBurden;
isDiscipline.value = data.isDiscipline;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/**Pop up */
function popUp(action: "pass" | "passNot", type: string) {
reasonReign.value = "";
dateBreak.value = null;
actionPass.value = action === "pass";
roleUser.value = type;
openModal();
}
//pop up
function onSubmit() {
if (actionPass.value) {
confirmpopUp();
} else {
rejectpopUp();
}
}
//pop up
async function confirmpopUp() {
dialogConfirm(
$q,
async () => {
showLoader();
const body = {
reason: reasonReign.value,
};
await http
.put(config.API.resignConfirm(roleUser.value, id.value), body)
.then(async () => {
await fetchData(id.value);
closeModal();
success($q, "การอนุญาตสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
},
"ยืนยันการอนุญาต",
"ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?"
);
}
//pop up
async function rejectpopUp() {
dialogConfirm(
$q,
async () => {
showLoader();
const body = {
reason: reasonReign.value,
date: dateBreak.value,
};
await http
.put(config.API.resignReject(roleUser.value, id.value), body)
.then(async () => {
await fetchData(id.value);
closeModal();
success($q, "การยับยั้งสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
},
"ยืนยันการยับยั้ง",
"ต้องการยืนยันการยับยั้งนี้หรือไม่ ?"
);
}
/**
* กดยกเล
*/
async function clickCancel() {
await fetchData(id.value);
edit.value = false;
myForm.value?.resetValidation();
}
/**
* กดยกเล
*/
async function clickCancelConditions() {
await fetchData(id.value);
conditions.value = false;
}
/** Function บันทึก รายการตรวจสอบเงื่อนไขต่าง ๆ*/
function onSubmitConditions() {
dialogConfirm($q, () => {
showLoader();
http
.put(config.API.resignConditions(id.value), {
isNoDebt: isNoDebt.value,
isNoBurden: isNoBurden.value,
isDiscipline: isDiscipline.value,
})
.then(async () => {
await fetchData(id.value);
success($q, "บันทึกเงื่อนไขต่าง ๆ สำเร็จ");
conditions.value = false;
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
});
}
/** Function บันทึก ,แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
function onSubmitAttached() {
dialogConfirm($q, () => {
const formData = new FormData();
const send = date.value !== null ? new Date(date.value).toUTCString() : "";
const activeDate =
dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : "";
formData.append("Location", location.value);
formData.append("SendDate", send);
formData.append("ActiveDate", activeDate);
formData.append("Reason", reason.value);
formData.append("OrganizationPositionOld", organizationPositionOld.value);
formData.append("PositionTypeOld", positionTypeOld.value);
formData.append("PositionLevelOld", positionLevelOld.value);
formData.append("PositionNumberOld", posNo.value);
formData.append("AmountOld", salary.value.toString());
formData.append("remarkHorizontal", remarkHorizontal.value);
showLoader();
http
.put(config.API.resingByid(id.value), formData)
.then(async () => {
await fetchData(id.value);
success($q, "บันทึกข้อมูลสำเร็จ");
edit.value = false;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
}
/**
* Function เพ Class เวลา Edit
* @param val เมอเปนEdit จะเปลยน Class
*/
function getClass(val: boolean) {
return {
"full-width inputgreen cursor-pointer": val,
"full-width cursor-pointer": !val,
};
}
/** แปลง StatusOrder */
function statusOrder(val: boolean) {
switch (val) {
case true:
return "ยับยั้ง";
case false:
return "อนุญาต";
}
}
function updatemodalPersonal(modal: boolean) {
modalPersonal.value = modal;
}
/** Hook */
onMounted(async () => {
await fetchData(id.value);
});
</script>
<template>
<div class="q-gutter-sm q-pa-sm">
<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.push('/retirement/resign')"
/>
รายละเอยดการยกเลกลาออกของ{{
dataDetail.firstName + " " + dataDetail.lastName
}}
</div>
<CardProfile :data="dataProfile as DataProfile" />
<!-- อมลการลาออก -->
<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"
v-if="
(roleUser === 'officer' && dataDetail.officerReject === null) ||
(roleUser === 'commander' &&
dataDetail.commanderReject === null &&
dataDetail.officerReject !== null) ||
(roleUser === 'oligarch' &&
dataDetail.oligarchReject === null &&
dataDetail.commanderReject !== null &&
dataDetail.officerReject !== null)
"
>
<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-start">
<div class="col-12">
<div class="col-12 text-top">สถานทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">{{ dataDetail.location }}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">นทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">
{{ date2Thai(dataDetail.sendDate) }}
</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">เหตผลทลาออกจากราชการ</div>
<div class="col-12 text-detail">{{ dataDetail.reason }}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">นทขอลาออกจากราชการ</div>
<div
:class="
diffDate()
? 'col-12 text-detail text-red text-bold'
: 'col-12 text-detail'
"
>
{{ date2Thai(dataDetail.activeDate) }}
</div>
<div
:class="
diffDate()
? 'col-12 text-detail text-red text-bold'
: 'col-12 text-detail'
"
>
{{ diffDate() ? "(ยื่นขอลาออกน้อยกว่า 30 วัน)" : "" }}
</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"
v-if="
workflowRef?.permission.isUpdate &&
dataDetail.commanderReject === null
"
>
<q-btn
outline
color="primary"
dense
icon-right="check"
class="q-px-sm"
label="อนุญาต"
@click="popUp('pass', 'commander')"
/>
<q-btn
outline
color="red"
dense
icon-right="close"
class="q-px-sm"
label="ยับยั้ง"
@click="popUp('passNot', 'commander')"
/>
</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 row items-start">
<div class="col-12 text-top">สถานะ</div>
<div class="col-12 text-detail">
{{
dataDetail.commanderReject !== null
? statusOrder(dataDetail.commanderReject)
: "-"
}}
</div>
</div>
<div class="col-xs-6 row items-start">
<div class="col-12 text-top">นสดทายทบย</div>
<div class="col-12 text-detail">
{{
dataDetail.commanderRejectDate !== null
? date2Thai(dataDetail.commanderRejectDate)
: "-"
}}
</div>
</div>
<div class="col-xs-12 row items-start">
<div class="col-12 text-top">ความคดเหนและเหตผล</div>
<div class="col-12 text-detail">
{{
dataDetail.commanderReject
? dataDetail.commanderRejectReason
: dataDetail.commanderApproveReason
}}
</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"
v-if="
workflowRef?.permission.isUpdate &&
dataDetail.oligarchReject === null
"
>
<q-btn
outline
color="primary"
dense
icon-right="check"
class="q-px-sm"
label="อนุญาต"
@click="popUp('pass', 'oligarch')"
/>
<q-btn
outline
color="red"
dense
icon-right="close"
class="q-px-sm"
label="ยับยั้ง"
@click="popUp('passNot', 'oligarch')"
/>
</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 row items-start">
<div class="col-12 text-top">สถานะ</div>
<div class="col-12 text-detail">
{{
dataDetail.oligarchReject !== null
? statusOrder(dataDetail.oligarchReject)
: "-"
}}
</div>
</div>
<div class="col-xs-6 row items-start">
<div class="col-12 text-top">นสดทายทบย</div>
<div class="col-12 text-detail">
{{
dataDetail.oligarchRejectDate !== null
? date2Thai(dataDetail.oligarchRejectDate)
: "-"
}}
</div>
</div>
<div class="col-xs-12 row items-start">
<div class="col-12 text-top">ความคดเหนและเหตผล</div>
<div class="col-12 text-detail">
{{
dataDetail.oligarchReject
? dataDetail.oligarchRejectReason
: dataDetail.oligarchApproveReason
}}
</div>
</div>
</div>
</div>
</q-card>
<!-- แกไขขอมลเพอลงบญชแนบทาย -->
<q-card bordered class="row col-12 text-dark q-mt-sm">
<q-form
ref="myForm"
greedy
@submit.prevent
@validation-success="onSubmitAttached"
>
<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 v-if="!checkRoutePermisson && workflowRef?.permission.isUpdate">
<div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
v-if="!(status == 'REPORT' || status == 'DONE')"
/>
</div>
<div class="q-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
type="submit"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="clickCancel"
/>
</div>
</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-12 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัดเดิม'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัดเดิม'}`"
type="textarea"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
</div>
</div>
<div class="col-xs-6 col-sm-3 row">
<div class="col-12">
<q-input
v-model="salary"
:outlined="edit"
dense
:readonly="!edit"
:borderless="!edit"
hide-bottom-space
:label="`${'เงินเดือน'}`"
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
lazy-rules
:class="getClass(edit)"
mask="###,###,###,###"
reverse-fill-mask
/>
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-4 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="location"
:rules="[
(val:string) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`,
]"
hide-bottom-space
:label="`${'สถานที่ยื่นขอลาออกจากราชการ'}`"
/>
</div>
</div>
<div class="col-xs-4 row">
<div class="col-12">
<datepicker
menu-class-name="modalfix"
:readonly="!edit"
v-model="date"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
:readonly="!edit"
:class="getClass(edit)"
:outlined="edit"
dense
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[
(val:string) =>
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
]"
hide-bottom-space
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="reason"
:rules="[
(val:string) => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`,
]"
hide-bottom-space
:label="`${'เหตุผลที่ลาออกจากราชการ (หมายเหตุแนวตั้ง)'}`"
type="textarea"
/>
</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="remarkHorizontal"
:rules="[(val:string) => !!val || `${'กรุณากรอกหมายเหตุแนวนอน '}`]"
hide-bottom-space
:label="`${'หมายเหตุแนวนอน '}`"
type="textarea"
/>
</div>
</div>
</div>
</q-form>
</q-card>
<WorkFlow
ref="workflowRef"
v-model:is-check-data="isCheckData"
:id="id"
sys-name="RETIREMENT_RESIFNATION"
/>
</div>
<q-dialog v-model="modal" persistent>
<q-card style="width: 800px">
<q-form greedy @submit.prevent @validation-success="onSubmit">
<DialogHeader
:tittle="`${actionPass ? 'อนุญาตการลาออก' : 'ยับยั้งการลาออก'}`"
:close="closeModal"
/>
<q-separator />
<q-card-section class="q-p-sm q-gutter-md">
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
hide-bottom-space
dense
outlined
lazy-rules
:rules="[(val:string) => !!val || 'กรุณากรอกความคิดเห็น/เหตุผล']"
v-model="reasonReign"
:label="`${'กรอกความคิดเห็น/เหตุผล'}`"
type="textarea"
class="inputgreen"
/>
</div>
<div class="col-xs-12 col-sm-12 col-md-12" v-if="!actionPass">
<datepicker
menu-class-name="modalfix"
v-model="dateBreak"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
outlined
dense
class="inputgreen"
:model-value="
dateBreak !== null ? date2Thai(dateBreak) : null
"
hide-bottom-space
:label="`${' วันสุดท้ายที่ยับยั้ง'}`"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
color="primary"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white text-teal">
<q-btn label="บันทึก" color="secondary" type="submit"
><q-tooltip>นทกขอม</q-tooltip></q-btn
>
</q-card-actions>
<!-- <DialogFooter :editvisible="true" :save="conditionPopup" /> -->
</q-form>
</q-card>
</q-dialog>
<PopupPersonal
:modal="modalPersonal"
:id="personId"
@update:modal="updatemodalPersonal"
/>
</template>
<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;
}
</style>

View file

@ -0,0 +1,396 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useDataStore } from "@/modules/06_retirement/store/resignMain";
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
import { checkPermission } from "@/utils/permissions";
import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps } from "quasar";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import DialogSendToCommand from "@/modules/06_retirement/components/resign/DialogSendToCommand.vue";
/** use */
const $q = useQuasar(); // noti quasar
const stroe = useRetirementDataStore();
const stroeResign = useDataStore();
const { statusText } = stroe;
const router = useRouter();
const mixin = useCounterMixin();
const { messageError, date2Thai, showLoader, hideLoader } = mixin;
/** Table */
const rows = ref<ResponseItems[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: false,
field: (row) => rows.value.indexOf(row) + 1,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "location",
align: "left",
label: "สถานที่ยื่นขอลาออกจากราชการ",
sortable: true,
field: "location",
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",
format(val, row) {
let name = "";
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "organizationPositionOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "datetext",
align: "left",
label: "วันที่ยื่น",
sortable: true,
field: (row) => date2Thai(new Date(row.createdAt)),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sortOrder: "da",
},
{
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: (row) => statusText(row.status),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const visibleColumns = ref<string[]>([
"no",
"prefix",
"fullname",
"location",
"positionLevel",
"positionNumberOld",
"organizationPositionOld",
"datetext",
"status",
]);
const filters = ref<ResponseItems[]>([]);
const rowsSendToCommand = ref<ResponseItems[]>([]);
const modal = ref<boolean>(false);
const filterKeyword2 = ref<string>("");
const filterKeyword = ref<string>("");
const openModal = () => (modal.value = true);
const status = ref<string>("");
const optionStatus = ref<any[]>([]);
/**Setting pagination */
const pagination = ref({
sortBy: "datetext",
descending: true,
page: 1,
rowsPerPage: 10,
});
//
function closeModal() {
modal.value = false;
filterKeyword2.value = "";
}
// Modal
async function openModalOrder() {
const row = await filters.value.filter(
(r: ResponseItems) =>
(r.status == "REJECT" || r.status == "APPROVE") &&
r.organizationPositionOld &&
r.positionTypeOld &&
r.positionLevelOld &&
r.positionNumberOld &&
r.salary &&
r.location &&
r.sendDate
);
rowsSendToCommand.value = row;
openModal();
}
// API
async function fecthlist() {
showLoader();
await http
.get(config.API.listResign())
.then(async (res) => {
const data = await res.data.result;
// let list: ResponseItems[] = [];
// data.map((r: ResponseItems) => {
// list.push({
// datetext:
// r.createdAt == null ? "-" : date2Thai(new Date(r.createdAt)),
// activeDate: new Date(),
// createdAt: new Date(r.createdAt),
// citizenId: r.citizenId,
// firstName: r.firstName ?? "",
// id: r.id ?? "",
// isActive: r.isActive ? r.isActive : false,
// lastName: r.lastName ?? "",
// location: r.location ?? "",
// organizationPositionOld: r.organizationPositionOld ?? "",
// positionLevelOld: r.positionLevelOld ?? "",
// positionNumberOld: r.positionNumberOld ?? "",
// positionTypeOld: r.positionTypeOld ?? "",
// prefix: r.prefix ?? "",
// profileId: r.profileId ?? "",
// reason: r.reason ?? "",
// salary: r.salary ? r.salary : 0,
// sendDate: r.sendDate,
// status: r.status ?? "",
// statustext: statusText(r.status ?? ""),
// fullname: `${r.prefix ?? ""}${r.firstName ?? ""} ${r.lastName ?? ""}`,
// });
// });
rows.value = data;
filters.value = data;
})
.catch((e: any) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/**
* งกนตนหาขอมลของ Option ขอสถานะ
* @param val าทองการฟลเตอร
* @param update พเดทค
*/
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
);
});
}
function onRedirectToDetail(type: string, id: string) {
const test = stroeResign.mainTabs === "1" ? "" : "-reject";
router.push(`/retirement/${type}${test}/${id}`);
}
/**Hook */
onMounted(async () => {
status.value = stroeResign.formQurey.status;
optionStatus.value = stroeResign.optionStatus;
await fecthlist();
});
</script>
<template>
<q-card>
<div class="row col-12 q-col-gutter-sm">
<div class="row col-12">
<div class="row q-gutter-sm">
<q-select
v-model="status"
:label="`${'สถานะ'}`"
option-label="name"
:options="optionStatus"
option-value="value"
dense
emit-value
map-options
lazy-rules
hide-bottom-space
outlined
use-input
@update:model-value="stroeResign.formQurey.status = status"
@filter="(inputValue:string,doneFn:Function) => filterOption(inputValue, doneFn) "
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey"> ไมอม </q-item-section>
</q-item>
</template>
</q-select>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
@click="openModalOrder"
flat
round
color="add"
icon="mdi-account-arrow-right"
>
<q-tooltip>งไปออกคำสงลาออก</q-tooltip>
</q-btn>
</div>
<q-space />
<div class="row q-gutter-sm">
<q-input
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="filterKeyword = ''"
/>
</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"
/>
</div>
</div>
<div class="col-12">
<d-table
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="id"
: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
dense
round
color="info"
icon="mdi-eye"
@click.pervent="
onRedirectToDetail('resign-detail', props.row.id)
"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
dense
round
color="edit"
icon="edit"
@click.pervent="onRedirectToDetail('resign', props.row.id)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</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>
<DialogSendToCommand
v-model:modal="modal"
v-model:filter-keyword2="filterKeyword2"
:close-modal="closeModal"
:rows="rowsSendToCommand"
:fecth-list="fecthlist"
:main-tabs="stroeResign.mainTabs"
/>
</template>
<style scoped lang="scss"></style>

View file

@ -7,16 +7,10 @@ const Listretirement = () =>
import("@/modules/06_retirement/components/ListRetirement/TableList.vue");
const ListretirementDetail = () =>
import("@/modules/06_retirement/components/ListRetirement/TableList.vue");
const resign = () =>
import("@/modules/06_retirement/components/resign/Resign.vue");
const resignByid = () =>
import("@/modules/06_retirement/components/resign/ResignByid.vue");
const resignDetailbyid = () =>
import("@/modules/06_retirement/components/resign/ResignByid.vue");
const deceased = () =>
import("@/modules/06_retirement/components/resign/Deceased.vue");
import("@/modules/06_retirement/components/Deceased/Deceased.vue");
const detaildeceased = () =>
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
import("@/modules/06_retirement/components/Deceased/DetailDeceased.vue");
const dismissOrder = () =>
import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue");
const outDetail = () =>
@ -32,7 +26,15 @@ const exitInterviewDetailsOnly = () =>
const exitInterviewEditQuestion = () =>
import("@/modules/06_retirement/components/ExitInterview/EditQuestion.vue");
const detaildeceasedByid = () =>
import("@/modules/06_retirement/components/resign/DetailByidDeceased.vue");
import("@/modules/06_retirement/components/Deceased/DetailByidDeceased.vue");
/** รายการลาออก */
const resign = () =>
import("@/modules/06_retirement/components/resign/Main.vue");
const resignByid = () =>
import("@/modules/06_retirement/components/resign/ResignByid.vue");
const resignReject = () =>
import("@/modules/06_retirement/components/resign/ResignReject.vue");
export default [
{
@ -115,6 +117,7 @@ export default [
Role: "STAFF",
},
},
/** รายการลาออก */
{
path: "/retirement/resign",
name: "resign",
@ -138,23 +141,34 @@ export default [
{
path: "/retirement/resign-detail/:id",
name: "resignDetailbyid",
component: resignDetailbyid,
component: resignByid,
meta: {
Auth: true,
Key: "SYS_RESIGN",
Role: "STAFF",
},
},
// {
// path: "/retirement/resign-order",
// name: "resign-order",
// component: resignOrder,
// meta: {
// Auth: true,
// Key: "SYS_RESIGN",
// Role: "STAFF",
// },
// },
{
path: "/retirement/resign-reject/:id",
name: "resignReject",
component: resignReject,
meta: {
Auth: true,
Key: "SYS_RESIGN",
Role: "STAFF",
},
},
{
path: "/retirement/resign-detail-reject/:id",
name: "resignDetailreject",
component: resignReject,
meta: {
Auth: true,
Key: "SYS_RESIGN",
Role: "STAFF",
},
},
{
path: "/retirement/deceased",
name: "deceased",

View file

@ -0,0 +1,60 @@
import { defineStore } from "pinia";
import { ref, computed, reactive, watch } from "vue";
export const useDataStore = defineStore("resign", () => {
const mainTabs = ref<string>("1");
const baseOptionStatus = ref<any[]>([
{
name: "รอดำเนินการ",
value: "WAITTING",
group: "1",
},
{
name: "ส่งรายชื่อไปออกคำสั่ง",
value: "REPORT",
group: "1",
},
{
name: "ออกคำสั่งเสร็จแล้ว",
value: "DONE",
group: "1",
},
{
name: "ยกเลิกการลาออก",
value: "CANCEL",
group: "2",
},
{
name: "รอดำเนินการ",
value: "DONECANCEL",
group: "2",
},
{
name: "ส่งรายชื่อไปออกคำสั่ง",
value: "CANCEL",
group: "2",
},
{
name: "ออกคำสั่งยกเลิกลาออกเสร็จแล้ว",
value: "DONEREJECT",
group: "2",
},
]);
const formQurey = reactive({
status: "WAITTING",
page: 1,
rowsPerPage: 10,
});
const optionStatus = computed(() => {
return baseOptionStatus.value.filter(
(option) => option.group === mainTabs.value
);
});
watch(mainTabs, (val) => {
formQurey.status = val === "1" ? "WAITTING" : "DONECANCEL";
});
return { mainTabs, formQurey, optionStatus };
});

View file

@ -8,7 +8,7 @@ import { storeToRefs } from "pinia";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useDataStoreRetirement } from "@/modules/06_retirement/storeRetirement";
import { useDataStoreRetirement } from "@/modules/06_retirement/store/storeRetirement";
import { checkPermission } from "@/utils/permissions";
import type { resMain } from "@/modules/06_retirement/interface/response/Main";

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useQuasar } from "quasar";
@ -45,7 +45,7 @@ const stores = useLeavelistDataStore();
const router = useRouter();
const route = useRoute();
const paramsId = route.params.id.toString();
const workflowRef = ref<any>(null);
const modalApprove = ref(false);
const typeDocx = ref<string>("docx");
const typePdf = ref<string>("pdf");
@ -329,45 +329,31 @@ function checkLeaveType(leaveTypeId: string, formData: FremData) {
}
/** Function dialog*/
// async function openModal(data: string) {
// if (data === "approve") {
// modalApprove.value = true;
// dialogTitle.value = "";
// }
// if (data === "UnApprove") {
// modalApprove.value = true;
// dialogTitle.value = "";
// }
// if (data === "authority") {
// modalApprove.value = true;
// dialogTitle.value = "";
// dialogLabel.value = "";
// }
// }
async function openModal(data: string) {
if (data === "approve") {
modalApprove.value = true;
dialogTitle.value = "อนุมัติ";
}
if (data === "UnApprove") {
modalApprove.value = true;
dialogTitle.value = "ไม่อนุมัติ";
}
if (data === "authority") {
modalApprove.value = true;
dialogTitle.value = "ความคิดเห็นของผู้บังคับบัญชา";
dialogLabel.value = "ความคิดเห็น";
}
}
/** function ส่งไปผู้บังคับบัญชา*/
// function sendToCommand() {
// dialogConfirm(
// $q,
// async () => {
// showLoader();
// await http
// .get(config.API.leaveApproveToComander(formData.id))
// .then(async () => {
// await fetchDetailLeave(paramsId);
// success($q, "");
// })
// .catch((err) => {
// messageError($q, err);
// })
// .finally(async () => {
// hideLoader();
// });
// },
// "",
// " ?"
// );
// }
function sendToCommand() {
dialogConfirm(
$q,
async () => {},
"ยืนยันการส่งไปผู้บังคับบัญชา",
"ต้องการยืนยันการส่งไปผู้บังคับบัญชานี้ใช่หรือไม่ ?"
);
}
/** Function Save */
function clickSave(reason: string) {
@ -422,17 +408,27 @@ function clickSave(reason: string) {
"ต้องการยืนยันไม่อนุมัติใช่หรือไม่ ?"
);
}
if (dialogTitle.value === "ส่งไปยังผู้มีอำนาจ") {
if (dialogTitle.value === "ความคิดเห็นของผู้บังคับบัญชา") {
dialogConfirm(
$q,
async () => {
showLoader();
await http
.put(config.API.leaveComanderApprove(formData.id), body)
.get(config.API.leaveApproveToComander(formData.id))
.then(async () => {
await fetchDetailLeave(paramsId);
success($q, "บันทึกข้อมูลสำเร็จ");
modalApprove.value = false;
await http
.put(config.API.leaveComanderApprove(formData.id), body)
.then(async () => {
await fetchDetailLeave(paramsId);
success($q, "บันทึกข้อมูลสำเร็จ");
modalApprove.value = false;
})
.catch((err) => {
messageError($q, err);
})
.finally(async () => {
hideLoader();
});
})
.catch((err) => {
messageError($q, err);
@ -441,8 +437,8 @@ function clickSave(reason: string) {
hideLoader();
});
},
"ยืนยันการส่งไปยังผู้มีอำนาจ",
"ต้องการยืนยันการส่งไปยังผู้มีอำนาจใช่หรือไม่ ?"
"ยืนยันการแสดงความคิดเห็นของผู้บังคับบัญชา",
"ต้องการยืนยันการแสดงความคิดเห็นของผู้บังคับบัญชานี้ใช่หรือไม่ ?"
);
}
}
@ -467,6 +463,12 @@ function formattedNumber(x: number) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
const isCheckData = computed(() => {
if (formData.reasonCommander !== "-" && formData.reasonOligarch !== "-") {
return true;
} else return false;
});
onMounted(async () => {
if (paramsId) {
await fetchDetailLeave(paramsId);
@ -695,23 +697,29 @@ onMounted(async () => {
</div>
<!-- ความคดเหนของผงคบบญชา -->
<!-- <div
class="col-xs-12 col-sm-12 row"
v-if="
formData.approveStep === 'st3' ||
formData.approveStep === 'st4' ||
formData.approveStep === 'st5'
"
>
<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="col-xs-12 col-sm-12 row">
<q-card bordered class="row col-12 text-dark">
<div class="bg-grey-1 q-pa-sm col-12 row items-center">
<div class="q-pl-sm text-weight-bold text-dark">
ความคดเหนของผงคบบญชา
</div>
<q-space />
<q-btn
v-if="
workflowRef?.permission.isUpdate &&
checkPermission($route)?.attrIsUpdate &&
formData.reasonCommander === '-'
"
unelevated
color="orange-5"
label="ความคิดเห็นของผู้บังคับบัญชา"
@click="openModal('authority')"
><q-tooltip>ความคดเหนของผงคบบญชา</q-tooltip>
</q-btn>
</div>
<q-separator />
<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 row items-start">
@ -722,24 +730,49 @@ onMounted(async () => {
</div>
</div>
</q-card>
</div> -->
</div>
<!-- ความคดเหนของผอำนาจ -->
<!-- <div
class="col-xs-12 col-sm-12 row"
v-if="
formData.approveStep === 'st4' || formData.approveStep === 'st5'
"
>
<q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="col-xs-12 col-sm-12 row">
<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-dark">
ความคดเหนของผอำนาจ
</div>
<q-space />
<div
class="row q-gutter-sm"
v-if="
workflowRef?.permission.isUpdate &&
checkPermission($route)?.attrIsUpdate &&
formData.reasonOligarch === '-'
"
>
<q-btn
unelevated
color="orange-5"
label="ไม่อนุมัติ"
@click="openModal('UnApprove')"
><q-tooltip>ไมอน</q-tooltip>
</q-btn>
<!-- v-if="
formData.approveStep === 'st3' &&
formData.status !== 'ยกเลิก' &&
checkPermission($route)?.attrIsUpdate
" -->
<q-btn
unelevated
color="primary"
label="อนุมัติ"
@click="openModal('approve')"
><q-tooltip>อน</q-tooltip>
</q-btn>
</div>
</div>
<q-separator />
<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 row items-start">
@ -747,13 +780,18 @@ onMounted(async () => {
ผลการพจารณา
</div>
<div class="col-12 text-detail">
{{ formData.status }}
{{
formData.reasonOligarch !== "-"
? formData.status
: "-"
}}
</div>
</div>
<div class="col-xs-6 row items-start">
<div class="col-12 text-weight-bold text-top">
ความคดเห
</div>
<div class="col-12 text-detail">
{{ formData.reasonOligarch }}
</div>
@ -761,12 +799,17 @@ onMounted(async () => {
</div>
</div>
</q-card>
</div> -->
</div>
</div>
<!-- Workflow -->
<div class="col-xs-12 col-sm-12">
<WorkFlow ref="workflowRef" :id="paramsId" sys-name="LEAVE_LIST" />
<WorkFlow
ref="workflowRef"
:id="paramsId"
v-model:is-check-data="isCheckData"
sys-name="LEAVE_LIST"
/>
</div>
</div>
</div>

View file

@ -62,9 +62,9 @@ function onConfirmDraft() {
sign: isDraft.value,
})
.then(async () => {
router.push(`/command/view/${commandId.value}`);
// fetchData?.();
// isCheckDraft.value = true;
// router.push(`/command/view/${commandId.value}`);
await fetchData?.();
isCheckDraft.value = true;
})
.catch((err) => {
messageError($q, err);
@ -237,7 +237,7 @@ function onConfirmOrder() {
sign: isAuthority.value,
})
.then(async () => {
router.push(`/command/view/${commandId.value}`);
await router.push(`/command/view/${commandId.value}`);
// fetchData?.();
// isCheckAuthority.value = true;
})