Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-05-23 13:23:01 +07:00
commit d3ae628fd7
12 changed files with 191 additions and 190 deletions

View file

@ -66,7 +66,7 @@ const menuList = readonly<any[]>([
},
{
key: 2.0,
label: "ข้อมูลตำแหน่งข้าราชการฯ",
label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
path: "masterPosition",
},
{
@ -507,7 +507,7 @@ const menuList = readonly<any[]>([
role: "salary",
children: [
{
label: "ผังบัญชีเงินเดือนข้าราชการฯ",
label: "ผังบัญชีเงินเดือนข้าราชการ ฯ",
path: "salaryChart",
role: "salary",
},
@ -522,7 +522,7 @@ const menuList = readonly<any[]>([
role: "salary",
},
{
label: "เลื่อนเงินเดือนข้าราชการฯ",
label: "เลื่อนเงินเดือนข้าราชการ ฯ",
path: "salaryLists",
role: "salary",
},

View file

@ -21,7 +21,7 @@ onMounted(() => {
<template>
<div class="toptitle text-dark col-12 row items-center">
อมลตำแหนงขาราชการ
อมลตำแหนงขาราชการ
</div>
<q-card flat bordered>

View file

@ -18,6 +18,10 @@ import type {
} from "@/modules/06_retirement/interface/response/Main";
import type { QTableProps } from "quasar";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
/** importComponents*/
import CardProfile from "@/components/CardProfile.vue";
const avatar = ref<string>("");
const modalPersonal = ref<boolean>(false);
@ -42,6 +46,8 @@ const { statusText } = RetirementData;
/** ตัวแปร */
const roleUser = ref<string>("");
const dataProfile = ref<DataProfile>();
const id = ref<string>(route.params.id.toString());
const myForm = ref<QForm | null>(null);
const myFormConfirm = ref<QForm | null>(null);
@ -166,7 +172,7 @@ const fetchData = async (id: string) => {
.get(config.API.resingByid(id))
.then((res: any) => {
const data = res.data.result;
console.log(data);
dataProfile.value = data as DataProfile;
let list: TypeFile[] = [];
if (data.docs.length > 0) {
@ -190,7 +196,7 @@ const fetchData = async (id: string) => {
location.value = data.location ?? "";
status.value = data.status ?? "";
remarkHorizontal.value = data.remarkHorizontal ?? "-";
getAvatar(data.profileId);
// getAvatar(data.profileId);
})
.catch((e) => {
messageError($q, e);
@ -200,19 +206,19 @@ const fetchData = async (id: string) => {
});
};
function getAvatar(id: string) {
if (id) {
http
.get(config.API.profileAvaId(id))
.then((res) => {
console.log(res);
const dataList = res.data.result;
avatar.value = dataList.avatar;
})
.catch((e) => {})
.finally(() => {});
}
}
// function getAvatar(id: string) {
// if (id) {
// http
// .get(config.API.profileAvaId(id))
// .then((res) => {
// console.log(res);
// const dataList = res.data.result;
// avatar.value = dataList.avatar;
// })
// .catch((e) => {})
// .finally(() => {});
// }
// }
// const downloadFile = (response: any, filename: string) => {
// const link = document.createElement("a");
@ -318,16 +324,19 @@ const saveConditions = () => {
if (myForm.value !== null) {
myForm.value.validate().then((success) => {
if (success) {
dialogMessage(
$q,
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
"mdi-help-circle-outline",
"ตกลง",
"public",
async () => await dataSave(),
undefined
);
dialogConfirm($q, () => {
dataSave();
});
// dialogMessage(
// $q,
// "?",
// "",
// "mdi-help-circle-outline",
// "",
// "public",
// async () => await dataSave(),
// undefined
// );
}
});
}
@ -343,16 +352,19 @@ const conditionSave = () => {
if (myForm.value !== null) {
myForm.value.validate().then((success) => {
if (success) {
dialogMessage(
$q,
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
"mdi-help-circle-outline",
"ตกลง",
"public",
async () => await saveData(),
undefined
);
dialogConfirm($q, () => {
saveData();
});
// dialogMessage(
// $q,
// "?",
// "",
// "mdi-help-circle-outline",
// "",
// "public",
// async () => ,
// undefined
// );
}
});
}
@ -448,11 +460,6 @@ const downloadFile = (response: any, filename: string) => {
document.body.removeChild(link);
};
function onclickViewinfo(id: string) {
modalPersonal.value = true;
personId.value = id;
}
function updatemodalPersonal(modal: boolean) {
modalPersonal.value = modal;
}
@ -463,7 +470,7 @@ function uploadFiles() {
showLoader();
http
.put(config.API.investigateRelevantUploadFile(id.value), Data)
.then((res) => {
.then(() => {
success($q, "อัปโหลดไฟล์สำเร็จ");
})
.catch((e) => {
@ -520,7 +527,10 @@ function confirmRemove(fileId: string) {
รายละเอยดการลาออกของ
{{ dataDetail.firstName + " " + dataDetail.lastName }}
</div>
<q-card bordered class="row col-12 text-dark">
<CardProfile :data="dataProfile as DataProfile" />
<!-- <q-card bordered class="row col-12 text-dark">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-subtitle2">
{{ dataDetail.firstName + " " + dataDetail.lastName }}
@ -577,7 +587,7 @@ function confirmRemove(fileId: string) {
</div>
</div>
</div>
</q-card>
</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">
@ -661,6 +671,7 @@ function confirmRemove(fileId: string) {
</div>
</div>
</q-card>
<q-card v-if="rows.length > 0" 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>
@ -932,6 +943,7 @@ function confirmRemove(fileId: string) {
</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">

View file

@ -15,6 +15,8 @@ export const useRetirementDataStore = defineStore("retirement", () => {
return "ส่งรายชื่อไปออกคำสั่ง";
case "DONE":
return "ออกคำสั่งเสร็จแล้ว";
case "CANCEL":
return "ยกเลิกการลาออก";
default:
return "-";

View file

@ -37,8 +37,6 @@ const props = defineProps({
});
const type = ref<string>("");
const typeRef = ref<any>(null);
const isReadonly = ref<boolean>(false); //
const isPunish = ref<boolean>(false); //
const isSuspension = ref<boolean>(false); //
@ -100,10 +98,12 @@ function onSubmit() {
watch(
() => modal.value,
() => {
isPunish.value = props.isPunish;
isSuspension.value = props.isSuspension;
isAbsent.value = props.isAbsent;
isLeave.value = props.isLeave;
if (modal.value) {
isPunish.value = props.isPunish ? props.isPunish : false;
isSuspension.value = props.isSuspension ? props.isSuspension : false;
isAbsent.value = props.isAbsent ? props.isAbsent : false;
isLeave.value = props.isLeave ? props.isLeave : false;
}
}
);
</script>
@ -117,33 +117,24 @@ watch(
<q-card-section class="scroll" style="max-height: 70vh">
<div class="q-gutter-y-sm column">
<q-checkbox
toggle-indeterminate
keep-color
label="ไม่ถูกลงโทษทางวินัย"
dense
v-model="isPunish"
/>
<q-checkbox
toggle-indeterminate
keep-color
label="ไม่ถูกพักราชการ"
dense
v-model="isSuspension"
/>
<q-checkbox
toggle-indeterminate
keep-color
label="ไม่ขาดราชการ"
dense
v-model="isAbsent"
/>
<q-checkbox
toggle-indeterminate
keep-color
label="วันลาไม่เกิน"
dense
v-model="isLeave"
/>
<q-checkbox keep-color label="วันลาไม่เกิน" dense v-model="isLeave" />
</div>
</q-card-section>
<q-separator />

View file

@ -366,7 +366,7 @@ onMounted(() => {
<template>
<div class="row items-center">
<div class="toptitle text-dark row items-center q-py-xs">
รายการเลอนเงนเดอนขาราชการ
รายการเลอนเงนเดอนขาราชการ
</div>
<q-space />
<datepicker

View file

@ -134,7 +134,7 @@ onMounted(() => {
<!-- Card อมลขาราชการฯ -->
<q-card flat bordered style="border: 1px solid #d6dee1">
<div class="col-12 text-weight-bold bg-grey-1 q-py-sm q-px-md">
อมลขาราชการ
อมลขาราชการ
</div>
<div class="col-12"><q-separator /></div>
<div class="row q-pa-md q-col-gutter-md">

View file

@ -238,7 +238,7 @@ watch(
<template>
<q-dialog v-model="modal" persistent>
<q-card class="col-12" style="width: 60%">
<Header :tittle="'เลือกข้าราชการฯ'" :close="closeDialog" />
<Header :tittle="'เลือกข้าราชการ ฯ'" :close="closeDialog" />
<q-separator />
<q-card-section>

View file

@ -150,9 +150,9 @@ function fetchListOrg() {
});
}
/** download file
/** download file
* @param type ประเภทของไฟล xlsx pdf
*/
*/
function onDownload(type: string) {
showLoader();
http
@ -172,9 +172,9 @@ function onDownload(type: string) {
});
}
/** edit page
/** edit page
* @param id id ของ row
*/
*/
function onEdit(id: string) {
store.statusEdit = true;
router.push(`/development/employee-history/${id}`);
@ -242,64 +242,61 @@ onMounted(() => {
<q-card flat bordered class="q-pa-md">
<div class="row no-wrap shadow-1 justify-between">
<q-toolbar class="row col-8 q-pa-none q-gutter-x-sm">
<div class="col-3">
<datepicker
menu-class-name="modalfix"
v-model="formFilter.year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="fetchListOrg()"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
lazy-rules
outlined
:model-value="
formFilter.year === 0
? 'ทั้งหมด'
: Number(formFilter.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-if="formFilter.year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<datepicker
menu-class-name="modalfix"
v-model="formFilter.year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="fetchListOrg()"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
lazy-rules
outlined
:model-value="
formFilter.year === 0
? 'ทั้งหมด'
: Number(formFilter.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-if="formFilter.year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<div class="col-3">
<q-select
dense
outlined
label="หน่วยงาน"
v-model="formFilter.root"
:options="agencyOp"
option-value="id"
option-label="name"
@update:model-value="(formFilter.page = 1), getData()"
/>
</div>
<q-select
dense
outlined
label="หน่วยงาน"
v-model="formFilter.root"
:options="agencyOp"
option-value="id"
option-label="name"
@update:model-value="(formFilter.page = 1), getData()"
style="min-width: 150px"
/>
<!-- <q-btn flat round dense icon="add" color="primary" @click="onAdd()">
<q-tooltip>เพ</q-tooltip>

View file

@ -194,9 +194,9 @@ function getData() {
});
}
/** download file
/** download file
* @param type ประเภทของไฟล xlsx pdf
*/
*/
function onDownload(type: string) {
showLoader();
http
@ -221,9 +221,9 @@ function onDownload(type: string) {
});
}
/** edit page
/** edit page
* @param id id ของ row
*/
*/
function onEdit(id: string) {
store.statusEdit = true;
router.push(`/development/history/${id}`);
@ -259,64 +259,61 @@ onMounted(() => {
<q-card flat bordered class="q-pa-md">
<div class="row no-wrap shadow-1 justify-between">
<q-toolbar class="row col-8 q-pa-none q-gutter-x-sm">
<div class="col-3">
<datepicker
menu-class-name="modalfix"
v-model="formFilter.year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="fetchListOrg()"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
lazy-rules
outlined
:model-value="
formFilter.year === 0
? 'ทั้งหมด'
: Number(formFilter.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-if="formFilter.year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<datepicker
menu-class-name="modalfix"
v-model="formFilter.year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="fetchListOrg()"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
lazy-rules
outlined
:model-value="
formFilter.year === 0
? 'ทั้งหมด'
: Number(formFilter.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-if="formFilter.year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(formFilter.year = 0), fetchListOrg()"
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<div class="col-3">
<q-select
dense
outlined
label="หน่วยงาน"
v-model="formFilter.root"
:options="agencyOp"
option-value="id"
option-label="name"
@update:model-value="(formFilter.page = 1), getData()"
/>
</div>
<q-select
dense
outlined
label="หน่วยงาน"
v-model="formFilter.root"
:options="agencyOp"
option-value="id"
option-label="name"
@update:model-value="(formFilter.page = 1), getData()"
style="min-width: 150px"
/>
</q-toolbar>
<q-toolbar class="col-4 q-pa-none q-gutter-x-sm">
<q-space />

View file

@ -33,6 +33,8 @@ const { showLoader, hideLoader, messageError, dialogMessageNotify } =
const node = ref<any>([]);
const expanded = ref<string[]>([]);
const expandedDialog = ref<string[]>([]);
const filter = ref<string>("");
const filterMain = ref<string>("");
const splitterModel = ref<number>(60);
@ -553,7 +555,7 @@ onMounted(() => {
:nodes="node"
node-key="orgTreeName"
label-key="labelName"
v-model:expanded="expanded"
v-model:expanded="expandedDialog"
:filter="filter"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"

View file

@ -184,7 +184,7 @@ function onDownload() {
.get(config.API.developmentReportScholarship())
.then((res) => {
const dataList = res.data.result;
genReportXLSX(dataList, "รายการข้าราชการที่ได้รับทุนการศึกษา/ฝึกอบรม");
genReportXLSX(dataList, "รายการข้าราชการที่ได้รับทุนการศึกษา/ฝึกอบรม");
})
.catch((e) => {
messageError($q, e);