Merge branch 'develop' into devTee
This commit is contained in:
commit
072d6087f7
6 changed files with 136 additions and 266 deletions
|
|
@ -260,28 +260,8 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
เลือกตำแหน่งเลขที่
|
เลือกตำแหน่งเลขที่
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="col-12">
|
<!-- <div class="col-12">
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
v-model="isBlank"
|
|
||||||
label="แสดงเฉพาะตำแหน่งว่าง"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>แสดงเฉพาะตำแหน่งว่าง </q-tooltip>
|
|
||||||
</q-checkbox>
|
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
v-model="isAll"
|
|
||||||
label="แสดงตำแหน่งทั้งหมด"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip
|
|
||||||
>แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก</q-tooltip
|
|
||||||
>
|
|
||||||
</q-checkbox>
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="row q-gutter-sm no-wrap">
|
<div class="row q-gutter-sm no-wrap">
|
||||||
<div>
|
<div>
|
||||||
<q-radio
|
<q-radio
|
||||||
|
|
@ -342,9 +322,29 @@ onMounted(async () => {
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="col-12 q-pa-md">
|
<div class="col-12 q-pa-sm">
|
||||||
<q-toolbar style="padding: 0px">
|
<q-toolbar style="padding: 0px">
|
||||||
|
<div>
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
v-model="isBlank"
|
||||||
|
label="แสดงเฉพาะตำแหน่งว่าง"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<q-tooltip>แสดงเฉพาะตำแหน่งว่าง </q-tooltip>
|
||||||
|
</q-checkbox>
|
||||||
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
v-model="isAll"
|
||||||
|
label="แสดงตำแหน่งทั้งหมด"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<q-tooltip
|
||||||
|
>แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก</q-tooltip
|
||||||
|
>
|
||||||
|
</q-checkbox>
|
||||||
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div class="row q-gutter-md">
|
<div class="row q-gutter-md">
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,13 @@ import { useQuasar, QForm } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { tokenParsed } from "@/plugins/auth";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
TypeFile,
|
TypeFile,
|
||||||
rowFile,
|
rowFile,
|
||||||
FileList,
|
FileList,
|
||||||
CheckBoxType,
|
|
||||||
} from "@/modules/06_retirement/interface/response/Main";
|
} from "@/modules/06_retirement/interface/response/Main";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
@ -527,22 +523,6 @@ onMounted(async () => {
|
||||||
await Promise.all([fetchData(id.value), fetchFile()]).finally(() => {
|
await Promise.all([fetchData(id.value), fetchFile()]).finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
// const user = await tokenParsed();
|
|
||||||
// if (user) {
|
|
||||||
// const commander = await user.role.includes("commander");
|
|
||||||
// const oligarch = await user.role.includes("oligarch");
|
|
||||||
// const officer = await user.role.includes("officer");
|
|
||||||
// if (commander) {
|
|
||||||
// roleUser.value = "commander";
|
|
||||||
// } else if (oligarch) {
|
|
||||||
// roleUser.value = "oligarch";
|
|
||||||
// } else if (officer) {
|
|
||||||
// roleUser.value = "officer";
|
|
||||||
// } else {
|
|
||||||
// roleUser.value = "admin";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -976,7 +956,13 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้บังคับบัญชา
|
ผลการพิจารณาของผู้บังคับบัญชา
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="q-gutter-x-sm" v-if="workflowRef?.permission.isUpdate && dataDetail.commanderReject === null">
|
<div
|
||||||
|
class="q-gutter-x-sm"
|
||||||
|
v-if="
|
||||||
|
workflowRef?.permission.isUpdate &&
|
||||||
|
dataDetail.commanderReject === null
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
outline
|
outline
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
@ -1042,7 +1028,13 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้มีอำนาจ
|
ผลการพิจารณาของผู้มีอำนาจ
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="q-gutter-x-sm" v-if="workflowRef?.permission.isUpdate && dataDetail.oligarchReject === null">
|
<div
|
||||||
|
class="q-gutter-x-sm"
|
||||||
|
v-if="
|
||||||
|
workflowRef?.permission.isUpdate &&
|
||||||
|
dataDetail.oligarchReject === null
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
outline
|
outline
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
||||||
|
|
@ -40,15 +40,12 @@ const {
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** ตัวแปร */
|
/** ตัวแปร */
|
||||||
const modalPersonal = ref<boolean>(false);
|
|
||||||
const personId = ref<string>("");
|
|
||||||
const roleUser = ref<string>("");
|
const roleUser = ref<string>("");
|
||||||
const dataProfile = ref<DataProfile>();
|
const dataProfile = ref<DataProfile>();
|
||||||
|
|
||||||
const id = ref<string>(route.params.id.toString());
|
const id = ref<string>(route.params.id.toString());
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const conditions = ref<boolean>(false);
|
|
||||||
const dataDetail = ref<any>({
|
const dataDetail = ref<any>({
|
||||||
datetext: "",
|
datetext: "",
|
||||||
activeDate: new Date(),
|
activeDate: new Date(),
|
||||||
|
|
@ -133,7 +130,7 @@ function diffDate() {
|
||||||
async function fetchData(id: string) {
|
async function fetchData(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.resingByid(id))
|
.get(config.API.listResign() + `/cancel/${id}`)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
dataProfile.value = data as DataProfile;
|
dataProfile.value = data as DataProfile;
|
||||||
|
|
@ -173,68 +170,26 @@ function popUp(action: "pass" | "passNot", type: string) {
|
||||||
|
|
||||||
//เงื่อนไขpop up
|
//เงื่อนไขpop up
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
if (actionPass.value) {
|
dialogConfirm($q, async () => {
|
||||||
confirmpopUp();
|
showLoader();
|
||||||
} else {
|
const body = {
|
||||||
rejectpopUp();
|
reason: reasonReign.value,
|
||||||
}
|
reject: !actionPass.value,
|
||||||
}
|
};
|
||||||
|
await http
|
||||||
//pop up ยืนยันการอนุญาต
|
.put(config.API.resignReject(`${roleUser.value}-cancel`, id.value), body)
|
||||||
async function confirmpopUp() {
|
.then(async () => {
|
||||||
dialogConfirm(
|
await fetchData(id.value);
|
||||||
$q,
|
closeModal();
|
||||||
async () => {
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
showLoader();
|
})
|
||||||
const body = {
|
.catch((e) => {
|
||||||
reason: reasonReign.value,
|
messageError($q, e);
|
||||||
};
|
})
|
||||||
await http
|
.finally(() => {
|
||||||
.put(config.API.resignConfirm(roleUser.value, id.value), body)
|
hideLoader();
|
||||||
.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();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
"ยืนยันการยับยั้ง",
|
|
||||||
"ต้องการยืนยันการยับยั้งนี้หรือไม่ ?"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -245,37 +200,6 @@ async function clickCancel() {
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
myForm.value?.resetValidation();
|
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 บันทึก ,แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||||
function onSubmitAttached() {
|
function onSubmitAttached() {
|
||||||
|
|
@ -296,7 +220,7 @@ function onSubmitAttached() {
|
||||||
formData.append("remarkHorizontal", remarkHorizontal.value);
|
formData.append("remarkHorizontal", remarkHorizontal.value);
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.resingByid(id.value), formData)
|
.put(config.API.listResign() + `/update-cancel/${id.value}`, formData)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
@ -332,10 +256,6 @@ function statusOrder(val: boolean) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatemodalPersonal(modal: boolean) {
|
|
||||||
modalPersonal.value = modal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
|
|
@ -513,7 +433,7 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.commanderReject
|
dataDetail.commanderReject
|
||||||
? dataDetail.commanderRejectReason
|
? dataDetail.commanderApproveReason
|
||||||
: dataDetail.commanderApproveReason
|
: dataDetail.commanderApproveReason
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -529,6 +449,7 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้มีอำนาจ
|
ผลการพิจารณาของผู้มีอำนาจ
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="q-gutter-x-sm"
|
class="q-gutter-x-sm"
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -584,7 +505,7 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.oligarchReject
|
dataDetail.oligarchReject
|
||||||
? dataDetail.oligarchRejectReason
|
? dataDetail.oligarchApproveReason
|
||||||
: dataDetail.oligarchApproveReason
|
: dataDetail.oligarchApproveReason
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -606,7 +527,6 @@ onMounted(async () => {
|
||||||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div v-if="!checkRoutePermisson && workflowRef?.permission.isUpdate">
|
<div v-if="!checkRoutePermisson && workflowRef?.permission.isUpdate">
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -836,7 +756,7 @@ onMounted(async () => {
|
||||||
ref="workflowRef"
|
ref="workflowRef"
|
||||||
v-model:is-check-data="isCheckData"
|
v-model:is-check-data="isCheckData"
|
||||||
:id="id"
|
:id="id"
|
||||||
sys-name="SYS_RETIREMENT"
|
sys-name="RETIREMENT_CANCEL"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -844,7 +764,9 @@ onMounted(async () => {
|
||||||
<q-card style="width: 800px">
|
<q-card style="width: 800px">
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<DialogHeader
|
<DialogHeader
|
||||||
:tittle="`${actionPass ? 'อนุญาตการลาออก' : 'ยับยั้งการลาออก'}`"
|
:tittle="`${
|
||||||
|
actionPass ? 'อนุญาตยกเลิกการลาออก' : 'ยับยั้งยกเลิกการลาออก'
|
||||||
|
}`"
|
||||||
:close="closeModal"
|
:close="closeModal"
|
||||||
/>
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -862,48 +784,6 @@ onMounted(async () => {
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</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-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
|
@ -915,12 +795,6 @@ onMounted(async () => {
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<PopupPersonal
|
|
||||||
:modal="modalPersonal"
|
|
||||||
:id="personId"
|
|
||||||
@update:modal="updatemodalPersonal"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scope>
|
<style lang="scss" scope>
|
||||||
|
|
|
||||||
|
|
@ -125,13 +125,10 @@ const visibleColumns = ref<string[]>([
|
||||||
"datetext",
|
"datetext",
|
||||||
"status",
|
"status",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const filters = ref<ResponseItems[]>([]);
|
|
||||||
const rowsSendToCommand = ref<ResponseItems[]>([]);
|
const rowsSendToCommand = ref<ResponseItems[]>([]);
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const openModal = () => (modal.value = true);
|
|
||||||
|
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
const optionStatus = ref<any[]>([]);
|
const optionStatus = ref<any[]>([]);
|
||||||
|
|
@ -144,66 +141,57 @@ const pagination = ref({
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
// ปิดโมเดล
|
/** ฟังก์ชันปิด Popup*/
|
||||||
function closeModal() {
|
function closeModal() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//เปิด Modal
|
/** */
|
||||||
async function openModalOrder() {
|
async function openModalOrder() {
|
||||||
const row = await filters.value.filter(
|
const pathAPI =
|
||||||
(r: ResponseItems) =>
|
stroeResign.mainTabs === "1"
|
||||||
(r.status == "REJECT" || r.status == "APPROVE") &&
|
? `${config.API.listResign()}?type=APPROVE`
|
||||||
r.organizationPositionOld &&
|
: `${config.API.listResign()}/cancel?type=APPROVE`;
|
||||||
r.positionTypeOld &&
|
|
||||||
r.positionLevelOld &&
|
|
||||||
r.positionNumberOld &&
|
|
||||||
r.salary &&
|
|
||||||
r.location &&
|
|
||||||
r.sendDate
|
|
||||||
);
|
|
||||||
rowsSendToCommand.value = row;
|
|
||||||
openModal();
|
|
||||||
}
|
|
||||||
|
|
||||||
//นำข้อมูลจาก API มาแสดง
|
|
||||||
async function fecthlist() {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listResign())
|
.get(pathAPI)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
// let list: ResponseItems[] = [];
|
const row = await data.filter(
|
||||||
// data.map((r: ResponseItems) => {
|
(r: ResponseItems) =>
|
||||||
// list.push({
|
(r.status == "REJECT" || r.status == "APPROVE") &&
|
||||||
// datetext:
|
r.organizationPositionOld &&
|
||||||
// r.createdAt == null ? "-" : date2Thai(new Date(r.createdAt)),
|
r.positionTypeOld &&
|
||||||
// activeDate: new Date(),
|
r.positionLevelOld &&
|
||||||
// createdAt: new Date(r.createdAt),
|
r.positionNumberOld &&
|
||||||
// citizenId: r.citizenId,
|
r.salary &&
|
||||||
// firstName: r.firstName ?? "",
|
r.location &&
|
||||||
// id: r.id ?? "",
|
r.sendDate
|
||||||
// isActive: r.isActive ? r.isActive : false,
|
);
|
||||||
// lastName: r.lastName ?? "",
|
rowsSendToCommand.value = row;
|
||||||
// location: r.location ?? "",
|
modal.value = true;
|
||||||
// organizationPositionOld: r.organizationPositionOld ?? "",
|
})
|
||||||
// positionLevelOld: r.positionLevelOld ?? "",
|
.catch((e: any) => {
|
||||||
// positionNumberOld: r.positionNumberOld ?? "",
|
messageError($q, e);
|
||||||
// positionTypeOld: r.positionTypeOld ?? "",
|
})
|
||||||
// prefix: r.prefix ?? "",
|
.finally(() => {
|
||||||
// profileId: r.profileId ?? "",
|
hideLoader();
|
||||||
// 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 ?? ""}`,
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
/** รายการลาออก*/
|
||||||
|
async function fecthlist() {
|
||||||
|
const pathAPI =
|
||||||
|
stroeResign.mainTabs === "1"
|
||||||
|
? `${config.API.listResign()}?type=${status.value}`
|
||||||
|
: `${config.API.listResign()}/cancel?type=${status.value}`;
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(pathAPI)
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = await res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
filters.value = data;
|
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -258,7 +246,9 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
outlined
|
outlined
|
||||||
use-input
|
use-input
|
||||||
@update:model-value="stroeResign.formQurey.status = status"
|
@update:model-value="
|
||||||
|
(stroeResign.formQurey.status = status), fecthlist()
|
||||||
|
"
|
||||||
@filter="(inputValue:string,doneFn:Function) => filterOption(inputValue, doneFn) "
|
@filter="(inputValue:string,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,11 @@ export const useDataStore = defineStore("resign", () => {
|
||||||
value: "WAITTING",
|
value: "WAITTING",
|
||||||
group: "1",
|
group: "1",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "รอออกคำสั่ง",
|
||||||
|
value: "APPROVE",
|
||||||
|
group: "1",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "ส่งรายชื่อไปออกคำสั่ง",
|
name: "ส่งรายชื่อไปออกคำสั่ง",
|
||||||
value: "REPORT",
|
value: "REPORT",
|
||||||
|
|
@ -19,24 +24,30 @@ export const useDataStore = defineStore("resign", () => {
|
||||||
value: "DONE",
|
value: "DONE",
|
||||||
group: "1",
|
group: "1",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "ยกเลิกการลาออก",
|
name: "ยกเลิกลาออก",
|
||||||
value: "CANCEL",
|
value: "CANCEL",
|
||||||
group: "2",
|
group: "1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "รอดำเนินการ",
|
name: "รอดำเนินการ",
|
||||||
value: "DONECANCEL",
|
value: "WAITTING",
|
||||||
group: "2",
|
group: "2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ส่งรายชื่อไปออกคำสั่ง",
|
name: "รอออกคำสั่ง",
|
||||||
value: "CANCEL",
|
value: "APPROVE",
|
||||||
group: "2",
|
group: "2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ออกคำสั่งยกเลิกลาออกเสร็จแล้ว",
|
name: "ส่งไปออกคำสั่ง",
|
||||||
value: "DONEREJECT",
|
value: "REPORT",
|
||||||
|
group: "2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ออกคำสั่งสำเร็จ",
|
||||||
|
value: "DONE",
|
||||||
group: "2",
|
group: "2",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
@ -53,7 +64,7 @@ export const useDataStore = defineStore("resign", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(mainTabs, (val) => {
|
watch(mainTabs, (val) => {
|
||||||
formQurey.status = val === "1" ? "WAITTING" : "DONECANCEL";
|
formQurey.status = "WAITTING";
|
||||||
});
|
});
|
||||||
|
|
||||||
return { mainTabs, formQurey, optionStatus };
|
return { mainTabs, formQurey, optionStatus };
|
||||||
|
|
|
||||||
|
|
@ -236,15 +236,18 @@ onMounted(() => {
|
||||||
color="secondary"
|
color="secondary"
|
||||||
icon="mdi-dots-horizontal-circle-outline"
|
icon="mdi-dots-horizontal-circle-outline"
|
||||||
v-if="
|
v-if="
|
||||||
store.tabsMain === 'DRAFT' ||
|
store.tabsMain === 'DRAFT' || store.tabsMain === 'PENDING'
|
||||||
store.tabsMain === 'PENDING' ||
|
|
||||||
store.tabsMain === 'CANCEL'
|
|
||||||
? checkPermission($route)?.attrIsGet ||
|
? checkPermission($route)?.attrIsGet ||
|
||||||
checkPermission($route)?.attrIsCreate ||
|
checkPermission($route)?.attrIsCreate ||
|
||||||
checkPermission($route)?.attrIsDelete
|
checkPermission($route)?.attrIsDelete ||
|
||||||
|
checkPermission($route)?.attrIsUpdate
|
||||||
: store.tabsMain === 'WAITING' || store.tabsMain === 'REPORTED'
|
: store.tabsMain === 'WAITING' || store.tabsMain === 'REPORTED'
|
||||||
? checkPermission($route)?.attrIsGet ||
|
? checkPermission($route)?.attrIsGet ||
|
||||||
checkPermission($route)?.attrIsCreate
|
checkPermission($route)?.attrIsCreate
|
||||||
|
: store.tabsMain === 'CANCEL'
|
||||||
|
? checkPermission($route)?.attrIsGet ||
|
||||||
|
checkPermission($route)?.attrIsCreate ||
|
||||||
|
checkPermission($route)?.attrIsDelete
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -257,7 +260,7 @@ onMounted(() => {
|
||||||
store.tabsMain !== 'CANCEL' &&
|
store.tabsMain !== 'CANCEL' &&
|
||||||
store.tabsMain !== 'REPORTED' &&
|
store.tabsMain !== 'REPORTED' &&
|
||||||
checkPermission($route)?.attrIsGet &&
|
checkPermission($route)?.attrIsGet &&
|
||||||
checkPermission($route)?.attrIsCreate
|
checkPermission($route)?.attrIsUpdate
|
||||||
"
|
"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue