ui รายการลาออก
This commit is contained in:
parent
d08dbd9528
commit
8d8ba07217
12 changed files with 1497 additions and 463 deletions
|
|
@ -7,7 +7,7 @@ import { useRouter } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
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";
|
import type { ResponseData } from "@/modules/06_retirement/interface/response/expulsion";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watchEffect } from "vue";
|
import { ref, watchEffect } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
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 { QTableProps } from "quasar";
|
||||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||||
|
|
||||||
|
|
@ -12,34 +14,30 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
|
|
||||||
/** use */
|
/** use */
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const stroe = useRetirementDataStore();
|
||||||
|
const { statusText } = stroe;
|
||||||
const selected = ref<ResponseItems[]>([]);
|
const selected = ref<ResponseItems[]>([]);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm } = mixin;
|
const { dialogConfirm, date2Thai } = mixin;
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: Boolean,
|
modal: { type: Boolean, requreid: true },
|
||||||
closeModal: Function,
|
closeModal: { type: Function, requreid: true },
|
||||||
fecthlist: Function,
|
fecthList: { type: Function, requreid: true },
|
||||||
rows2: Array,
|
rows: { type: Array as PropType<ResponseItems[]>, requreid: true },
|
||||||
filterKeyword2: String,
|
filterKeyword2: { type: String, requreid: true },
|
||||||
});
|
mainTabs: { type: String, requreid: true },
|
||||||
|
|
||||||
/** ฟังก์ชั่นการ Selected Data*/
|
|
||||||
const checkSelected = computed(() => {
|
|
||||||
if (selected.value.length === 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//Table
|
//Table
|
||||||
const columns2 = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ลำดับ",
|
label: "ลำดับ",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "no",
|
field: (row) => props?.rows!.indexOf(row) + 1,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -50,11 +48,9 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ-นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "fullname",
|
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "location",
|
name: "location",
|
||||||
|
|
@ -64,8 +60,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "location",
|
field: "location",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "positionLevel",
|
||||||
|
|
@ -95,8 +89,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "positionNumberOld",
|
field: "positionNumberOld",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organizationPositionOld",
|
name: "organizationPositionOld",
|
||||||
|
|
@ -106,34 +98,28 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "organizationPositionOld",
|
field: "organizationPositionOld",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "datetext",
|
name: "datetext",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่ดำเนินการ",
|
label: "วันที่ยื่น",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "datetext",
|
field: (row) => date2Thai(new Date(row.createdAt)),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
sortOrder: "da",
|
sortOrder: "da",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "statustext",
|
name: "status",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สถานะ",
|
label: "สถานะ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "statustext",
|
field: (row) => statusText(row.status),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "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",
|
"no",
|
||||||
"prefix",
|
"prefix",
|
||||||
"fullname",
|
"fullname",
|
||||||
|
|
@ -142,7 +128,7 @@ const visibleColumns2 = ref<string[]>([
|
||||||
"positionNumberOld",
|
"positionNumberOld",
|
||||||
"organizationPositionOld",
|
"organizationPositionOld",
|
||||||
"datetext",
|
"datetext",
|
||||||
"statustext",
|
"status",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const modalCommand = ref<boolean>(false);
|
const modalCommand = ref<boolean>(false);
|
||||||
|
|
@ -206,7 +192,7 @@ watchEffect(() => {
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns2"
|
v-model="visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -214,7 +200,7 @@ watchEffect(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:options="columns2"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
options-cover
|
options-cover
|
||||||
style="min-width: 150px"
|
style="min-width: 150px"
|
||||||
|
|
@ -225,11 +211,11 @@ watchEffect(() => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns"
|
||||||
:rows="rows2"
|
:rows="rows"
|
||||||
:filter="filterKeyword2"
|
:filter="filterKeyword2"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
|
|
@ -253,20 +239,15 @@ watchEffect(() => {
|
||||||
/>
|
/>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name === 'no'">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else
|
|
||||||
:class="
|
:class="
|
||||||
col.name === 'organizationPositionOld' ||
|
col.name === 'organizationPositionOld' ||
|
||||||
col.name === 'organization'
|
col.name === 'organization'
|
||||||
? 'table_ellipsis'
|
? 'table_ellipsis2'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -278,7 +259,7 @@ watchEffect(() => {
|
||||||
<q-btn
|
<q-btn
|
||||||
label="ส่งไปออกคำสั่ง"
|
label="ส่งไปออกคำสั่ง"
|
||||||
@click="saveOrder"
|
@click="saveOrder"
|
||||||
:disable="checkSelected"
|
:disable="selected.length === 0"
|
||||||
color="public"
|
color="public"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
@ -287,7 +268,7 @@ watchEffect(() => {
|
||||||
|
|
||||||
<DialogCreateCommand
|
<DialogCreateCommand
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
:command-type-code="'C-PM-17'"
|
:command-type-code="props.mainTabs === '1' ? 'C-PM-17' : 'C-PM-41'"
|
||||||
:persons="selected"
|
:persons="selected"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
38
src/modules/06_retirement/components/resign/Main.vue
Normal file
38
src/modules/06_retirement/components/resign/Main.vue
Normal 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>
|
||||||
|
|
@ -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>
|
|
||||||
939
src/modules/06_retirement/components/resign/ResignReject.vue
Normal file
939
src/modules/06_retirement/components/resign/ResignReject.vue
Normal 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>
|
||||||
396
src/modules/06_retirement/components/resign/Table.vue
Normal file
396
src/modules/06_retirement/components/resign/Table.vue
Normal 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>
|
||||||
|
|
@ -7,12 +7,6 @@ const Listretirement = () =>
|
||||||
import("@/modules/06_retirement/components/ListRetirement/TableList.vue");
|
import("@/modules/06_retirement/components/ListRetirement/TableList.vue");
|
||||||
const ListretirementDetail = () =>
|
const ListretirementDetail = () =>
|
||||||
import("@/modules/06_retirement/components/ListRetirement/TableList.vue");
|
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 = () =>
|
const deceased = () =>
|
||||||
import("@/modules/06_retirement/components/Deceased/Deceased.vue");
|
import("@/modules/06_retirement/components/Deceased/Deceased.vue");
|
||||||
const detaildeceased = () =>
|
const detaildeceased = () =>
|
||||||
|
|
@ -34,6 +28,14 @@ const exitInterviewEditQuestion = () =>
|
||||||
const detaildeceasedByid = () =>
|
const detaildeceasedByid = () =>
|
||||||
import("@/modules/06_retirement/components/Deceased/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 [
|
export default [
|
||||||
{
|
{
|
||||||
path: "/retirement",
|
path: "/retirement",
|
||||||
|
|
@ -115,6 +117,7 @@ export default [
|
||||||
Role: "STAFF",
|
Role: "STAFF",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
/** รายการลาออก */
|
||||||
{
|
{
|
||||||
path: "/retirement/resign",
|
path: "/retirement/resign",
|
||||||
name: "resign",
|
name: "resign",
|
||||||
|
|
@ -138,23 +141,34 @@ export default [
|
||||||
{
|
{
|
||||||
path: "/retirement/resign-detail/:id",
|
path: "/retirement/resign-detail/:id",
|
||||||
name: "resignDetailbyid",
|
name: "resignDetailbyid",
|
||||||
component: resignDetailbyid,
|
component: resignByid,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: "SYS_RESIGN",
|
Key: "SYS_RESIGN",
|
||||||
Role: "STAFF",
|
Role: "STAFF",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: "/retirement/resign-order",
|
path: "/retirement/resign-reject/:id",
|
||||||
// name: "resign-order",
|
name: "resignReject",
|
||||||
// component: resignOrder,
|
component: resignReject,
|
||||||
// meta: {
|
meta: {
|
||||||
// Auth: true,
|
Auth: true,
|
||||||
// Key: "SYS_RESIGN",
|
Key: "SYS_RESIGN",
|
||||||
// Role: "STAFF",
|
Role: "STAFF",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
|
{
|
||||||
|
path: "/retirement/resign-detail-reject/:id",
|
||||||
|
name: "resignDetailreject",
|
||||||
|
component: resignReject,
|
||||||
|
meta: {
|
||||||
|
Auth: true,
|
||||||
|
Key: "SYS_RESIGN",
|
||||||
|
Role: "STAFF",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/retirement/deceased",
|
path: "/retirement/deceased",
|
||||||
name: "deceased",
|
name: "deceased",
|
||||||
|
|
|
||||||
60
src/modules/06_retirement/store/resignMain.ts
Normal file
60
src/modules/06_retirement/store/resignMain.ts
Normal 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 };
|
||||||
|
});
|
||||||
|
|
@ -8,7 +8,7 @@ import { storeToRefs } from "pinia";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
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 { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
|
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue