Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
This commit is contained in:
commit
3a9499ac75
27 changed files with 413 additions and 564 deletions
|
|
@ -175,6 +175,8 @@ export default {
|
|||
profileReactive: (profileId: string) => `${profile}reactive/${profileId}`,
|
||||
|
||||
profileReportId: (profileId: string) => `${report}kk1/${profileId}`,
|
||||
profileReportEmpId: (profileId: string) =>
|
||||
`${report}kk1-employee/${profileId}`,
|
||||
profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`,
|
||||
|
||||
profileChangeNameId: (profileId: string) =>
|
||||
|
|
@ -212,8 +214,8 @@ export default {
|
|||
/**ปรับรายการเงินเดือนขึ้น-ลง*/
|
||||
salarySwap: (dierction: string, id: string) =>
|
||||
`${profile}salary/swap/${dierction}/${id}`,
|
||||
listProfileNew:(id:string,page:number,pageSize:number)=>`${profile}search/new-page/oc/${id}/officer?page=${page}&pageSize=${pageSize}`,
|
||||
listProfileNew: (id: string, page: number, pageSize: number) =>
|
||||
`${profile}search/new-page/oc/${id}/officer?page=${page}&pageSize=${pageSize}`,
|
||||
|
||||
|
||||
orgProfileAvatar:`${registryNew}avatar`
|
||||
orgProfileAvatar: `${registryNew}avatar`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ import type {
|
|||
} from "@/modules/04_registryPerson/interface/index/Main";
|
||||
|
||||
import type { FormSalaryNew } from "@/modules/04_registryPerson/interface/request/Salary";
|
||||
import type {
|
||||
ResListSalary,
|
||||
ResType,
|
||||
} from "@/modules/04_registryPerson/interface/response/Salary";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import DialogHistory from "@/modules/04_registryPerson/components/detail/Salary/01_PositionSalaryHistory.vue";
|
||||
|
|
@ -130,7 +134,6 @@ const baseColumns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
const columns = computed(() => {
|
||||
if (empType.value === "-employee") {
|
||||
if (baseColumns.value) {
|
||||
|
|
@ -143,7 +146,6 @@ const columns = computed(() => {
|
|||
}
|
||||
return baseColumns.value;
|
||||
});
|
||||
|
||||
const visibleColumns = ref<string[]>([
|
||||
"date",
|
||||
"amount",
|
||||
|
|
@ -155,18 +157,12 @@ const visibleColumns = ref<string[]>([
|
|||
"templateDoc",
|
||||
"refCommandNo",
|
||||
]);
|
||||
const formFilter = reactive({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
});
|
||||
|
||||
const pagination = ref({
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const rows = ref<any[]>([]);
|
||||
const rows = ref<ResListSalary[]>([]);
|
||||
const keyword = ref<string>("");
|
||||
|
||||
const formDataSalary = reactive<FormSalaryNew>({
|
||||
date: null,
|
||||
|
|
@ -189,7 +185,7 @@ const formDataSalary = reactive<FormSalaryNew>({
|
|||
const modalDialogSalary = ref<boolean>(false);
|
||||
const isStatusEdit = ref<boolean>(false);
|
||||
const salaryId = ref<string>("");
|
||||
const dataLevel = ref<any[]>([]);
|
||||
const dataLevel = ref<ResType[]>([]);
|
||||
|
||||
const posNoOptions = ref<DataOption2[]>(store.optionTemplatePos);
|
||||
|
||||
|
|
@ -206,6 +202,9 @@ const posExecutiveOptionMain = ref<DataOption[]>([]);
|
|||
|
||||
const docOption = ref<DataOption2[]>(store.optionTemplateDoc);
|
||||
|
||||
/**
|
||||
* function fetch รายการ ตำแหน่งเงินเดือน
|
||||
*/
|
||||
function fetchListSalary() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -221,6 +220,9 @@ function fetchListSalary() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function fetch รายการ ตำแหน่งเงินเดือน
|
||||
*/
|
||||
function fetchType() {
|
||||
http
|
||||
.get(config.API.orgPosType)
|
||||
|
|
@ -237,6 +239,11 @@ function fetchType() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลือกประเภทตำแหน่ง
|
||||
* @param val
|
||||
* @param status
|
||||
*/
|
||||
async function updateSelectType(val: string, status: boolean = false) {
|
||||
const listLevel = await dataLevel.value.find(
|
||||
(e: any) => e.posTypeName === val
|
||||
|
|
@ -252,7 +259,12 @@ async function updateSelectType(val: string, status: boolean = false) {
|
|||
}
|
||||
}
|
||||
|
||||
async function onClickOpenDialog(statusEdit: boolean = false, data: any = []) {
|
||||
/**
|
||||
* function เปิด dialog ตำแหน่งเงินเดือน
|
||||
* @param statusEdit แก้ไข,เพิ่ม
|
||||
* @param data
|
||||
*/
|
||||
function onClickOpenDialog(statusEdit: boolean = false, data: any = []) {
|
||||
if (empType.value === "") {
|
||||
dataLevel.value.length === 0 && fetchType();
|
||||
fetchDataOption();
|
||||
|
|
@ -261,6 +273,7 @@ async function onClickOpenDialog(statusEdit: boolean = false, data: any = []) {
|
|||
fetchOptionGroup();
|
||||
}
|
||||
|
||||
// หาระดับตำแหน่ง
|
||||
setTimeout(async () => {
|
||||
statusEdit && (await updateSelectType(data.positionType, true));
|
||||
isStatusEdit.value = statusEdit;
|
||||
|
|
@ -288,10 +301,19 @@ async function onClickOpenDialog(statusEdit: boolean = false, data: any = []) {
|
|||
formDataSalary.doc = statusEdit ? data.templateDoc : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* function ปิด dialog ตำแหน่งเงินเดือน
|
||||
*/
|
||||
function onClickCloseDialog() {
|
||||
modalDialogSalary.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟิลเตอร์ข้อมูลจาก input
|
||||
* @param val ค่าที่ป้อนให้ input
|
||||
* @param update function จาก quasar
|
||||
* @param filtername type ที่กำหนด ของ input นั้นๆ
|
||||
*/
|
||||
function filterSelector(val: any, update: Function, filtername: string) {
|
||||
switch (filtername) {
|
||||
case "pos":
|
||||
|
|
@ -350,75 +372,91 @@ function filterSelector(val: any, update: Function, filtername: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลือกต้นแบบ tamplate ตำแหน่ง
|
||||
* @param val
|
||||
*/
|
||||
function updatePos(val: string) {
|
||||
formDataSalary.position = val;
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลือกต้นแบบ tamplate เอกสาร
|
||||
* @param val
|
||||
*/
|
||||
function updateDoc(val: string) {
|
||||
formDataSalary.doc = val;
|
||||
}
|
||||
|
||||
/**
|
||||
* function ยืนยันการบันทึกข้อมูล
|
||||
*/
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, () => {
|
||||
submit();
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const formData = {
|
||||
profileEmployeeId:
|
||||
!isStatusEdit.value && empType.value !== ""
|
||||
? profileId.value
|
||||
: undefined,
|
||||
profileId:
|
||||
!isStatusEdit.value && empType.value === ""
|
||||
? profileId.value
|
||||
: undefined,
|
||||
date: formDataSalary.date, // วันที่
|
||||
posNo: formDataSalary.posNo, //ตำแหน่งเลขที่
|
||||
position: formDataSalary.position, //ตำแหน่ง
|
||||
positionLine:
|
||||
empType.value === "" ? formDataSalary.positionLine : undefined, //สายงาน
|
||||
positionPathSide:
|
||||
empType.value === "" ? formDataSalary.positionPathSide : undefined, // ด้าน/สาขา
|
||||
positionExecutive:
|
||||
empType.value === "" ? formDataSalary.positionExecutive : undefined, //ตำแหน่งทางการบริหาร
|
||||
positionType: formDataSalary.positionType, // ประเภทตำแหน่ง
|
||||
positionLevel: formDataSalary.positionLevel, // ระดับตำแหน่ง
|
||||
amount:
|
||||
typeof formDataSalary.salary === "number"
|
||||
? formDataSalary.salary
|
||||
: Number(formDataSalary?.salary?.replace(/,/g, "")), //เงินเดือนฐาน
|
||||
positionSalaryAmount:
|
||||
typeof formDataSalary.salaryPos === "number"
|
||||
? formDataSalary.salaryPos
|
||||
: Number(formDataSalary?.salaryPos?.replace(/,/g, "")), // เงินประจำตำแหน่ง
|
||||
mouthSalaryAmount:
|
||||
typeof formDataSalary.salaryCompensation === "number"
|
||||
? formDataSalary.salaryCompensation
|
||||
: Number(formDataSalary?.salaryCompensation?.replace(/,/g, "")), //เงินค่าตอบแทนรายเดือน
|
||||
refCommandNo: formDataSalary.refCommandNo, // เลขที่คำสั่ง
|
||||
templateDoc: formDataSalary.doc, // เอกสารอ้างอิง
|
||||
};
|
||||
|
||||
try {
|
||||
const url = isStatusEdit.value
|
||||
? config.API.profileListSalaryNew(salaryId.value, empType.value)
|
||||
: config.API.profileSalaryNew(empType.value);
|
||||
const method = isStatusEdit.value ? "patch" : "post";
|
||||
await http[method](url, formData);
|
||||
await fetchListSalary();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
await onClickCloseDialog();
|
||||
} catch (e) {
|
||||
messageError($q, e);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
const formData = {
|
||||
profileEmployeeId:
|
||||
!isStatusEdit.value && empType.value !== "" ? profileId.value : undefined,
|
||||
profileId:
|
||||
!isStatusEdit.value && empType.value === "" ? profileId.value : undefined,
|
||||
date: formDataSalary.date, // วันที่
|
||||
posNo: formDataSalary.posNo, //ตำแหน่งเลขที่
|
||||
position: formDataSalary.position, //ตำแหน่ง
|
||||
positionLine:
|
||||
empType.value === "" ? formDataSalary.positionLine : undefined, //สายงาน
|
||||
positionPathSide:
|
||||
empType.value === "" ? formDataSalary.positionPathSide : undefined, // ด้าน/สาขา
|
||||
positionExecutive:
|
||||
empType.value === "" ? formDataSalary.positionExecutive : undefined, //ตำแหน่งทางการบริหาร
|
||||
positionType: formDataSalary.positionType, // ประเภทตำแหน่ง
|
||||
positionLevel: formDataSalary.positionLevel, // ระดับตำแหน่ง
|
||||
amount:
|
||||
typeof formDataSalary.salary === "number"
|
||||
? formDataSalary.salary
|
||||
: Number(formDataSalary?.salary?.replace(/,/g, "")), //เงินเดือนฐาน
|
||||
positionSalaryAmount:
|
||||
typeof formDataSalary.salaryPos === "number"
|
||||
? formDataSalary.salaryPos
|
||||
: Number(formDataSalary?.salaryPos?.replace(/,/g, "")), // เงินประจำตำแหน่ง
|
||||
mouthSalaryAmount:
|
||||
typeof formDataSalary.salaryCompensation === "number"
|
||||
? formDataSalary.salaryCompensation
|
||||
: Number(formDataSalary?.salaryCompensation?.replace(/,/g, "")), //เงินค่าตอบแทนรายเดือน
|
||||
refCommandNo: formDataSalary.refCommandNo, // เลขที่คำสั่ง
|
||||
templateDoc: formDataSalary.doc, // เอกสารอ้างอิง
|
||||
};
|
||||
|
||||
try {
|
||||
const url = isStatusEdit.value
|
||||
? config.API.profileListSalaryNew(salaryId.value, empType.value)
|
||||
: config.API.profileSalaryNew(empType.value);
|
||||
const method = isStatusEdit.value ? "patch" : "post";
|
||||
await http[method](url, formData);
|
||||
fetchListSalary();
|
||||
onClickCloseDialog();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
} catch (e) {
|
||||
messageError($q, e);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลื่อนรายการเงินเดือนขึ้น
|
||||
* @param id รายการเงินเดือน
|
||||
*/
|
||||
function onSwapUp(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileSalarySwapNew("up", id, empType.value))
|
||||
.then(() => {
|
||||
fetchListSalary();
|
||||
.then(async () => {
|
||||
await fetchListSalary();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -427,12 +465,17 @@ function onSwapUp(id: string) {
|
|||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลื่อนรายการเงินเดือนลง
|
||||
* @param id รายการเงินเดือน
|
||||
*/
|
||||
function onSwapDown(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileSalarySwapNew("down", id, empType.value))
|
||||
.then(() => {
|
||||
fetchListSalary();
|
||||
.then(async () => {
|
||||
await fetchListSalary();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -443,14 +486,22 @@ function onSwapDown(id: string) {
|
|||
}
|
||||
|
||||
const modalHistory = ref<boolean>(false);
|
||||
|
||||
/**
|
||||
* function ดูข้อมูลประวัติการแก้ไขรายการเงินเดือน
|
||||
* @param id รายการเงินเดือน
|
||||
*/
|
||||
function onClikcHistory(id: string) {
|
||||
salaryId.value = id;
|
||||
modalHistory.value = true;
|
||||
}
|
||||
|
||||
async function fetchDataOption() {
|
||||
/**
|
||||
* function fetch ข้อมูลสายงาน
|
||||
*/
|
||||
function fetchDataOption() {
|
||||
showLoader();
|
||||
await http
|
||||
http
|
||||
.get(config.API.orgPosPosition + `?keyword=&type=ALL`)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
|
@ -497,6 +548,9 @@ async function fetchDataOption() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลตำแหน่งข้อมูลทางการบริหาร
|
||||
*/
|
||||
function fetchDataOptionExecutive() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -516,11 +570,14 @@ function fetchDataOptionExecutive() {
|
|||
});
|
||||
}
|
||||
|
||||
async function fetchOptionGroup() {
|
||||
/**
|
||||
* function fetch ข้อมูลปรเภทตำแหน่ง
|
||||
*/
|
||||
function fetchOptionGroup() {
|
||||
showLoader();
|
||||
await http
|
||||
http
|
||||
.get(config.API.orgEmployeeType)
|
||||
.then(async (res) => {
|
||||
.then((res) => {
|
||||
dataLevel.value = res.data.result;
|
||||
posTypeOptionsMain.value = res.data.result.map((e: any) => ({
|
||||
id: e.id,
|
||||
|
|
@ -561,20 +618,14 @@ const classInput = (val: boolean) => {
|
|||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="formFilter.keyword"
|
||||
label="ค้นหา"
|
||||
class="q-mr-sm"
|
||||
>
|
||||
<q-input dense outlined v-model="keyword" label="ค้นหา" class="q-mr-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="formFilter.keyword == ''" name="search" />
|
||||
<q-icon v-if="keyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-else
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="formFilter.keyword = ''"
|
||||
@click="keyword = ''"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
@ -600,7 +651,7 @@ const classInput = (val: boolean) => {
|
|||
flat
|
||||
bordered
|
||||
dense
|
||||
:filter="formFilter.keyword"
|
||||
:filter="keyword"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:paging="true"
|
||||
|
|
|
|||
|
|
@ -13,15 +13,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const {
|
||||
date2Thai,
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
pathRegistryEmp,
|
||||
} = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError, pathRegistryEmp } =
|
||||
useCounterMixin();
|
||||
|
||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||
|
||||
|
|
@ -242,6 +235,9 @@ function closeDialog() {
|
|||
modal.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลประวัติการแก้ไข
|
||||
*/
|
||||
function fetchListHistory() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ const {
|
|||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
dialogRemove,
|
||||
pathRegistryEmp,
|
||||
} = useCounterMixin();
|
||||
const id = ref<string>("");
|
||||
|
|
@ -111,24 +110,27 @@ const formData = reactive<RequestNoPaidObject>({
|
|||
refCommandNo: "",
|
||||
refCommandDate: null,
|
||||
});
|
||||
const formFilter = reactive({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
});
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
const keyword = ref<string>("");
|
||||
const pagination = ref({
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/**
|
||||
* funciton ยืนยันการบันทึกข้อมูล
|
||||
*/
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, () => {
|
||||
isStatusEdit.value ? editData() : saveData();
|
||||
onClickCloseDialog();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เปิด Didalig บันทึกวันที่ไม่ได้รับเงินเดือนฯ
|
||||
* @param StatusEdit แก้ไข , เพิ่ม
|
||||
* @param data ข้อมูล
|
||||
*/
|
||||
function onClickOpenDialog(StatusEdit: boolean = false, data: any = []) {
|
||||
isStatusEdit.value = StatusEdit;
|
||||
id.value = StatusEdit ? data.id : "";
|
||||
|
|
@ -140,14 +142,20 @@ function onClickOpenDialog(StatusEdit: boolean = false, data: any = []) {
|
|||
modalDialog.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* function ปิด Didalig บันทึกวันที่ไม่ได้รับเงินเดือนฯ
|
||||
*/
|
||||
function onClickCloseDialog() {
|
||||
modalDialog.value = false;
|
||||
isStatusEdit.value = false;
|
||||
}
|
||||
|
||||
async function getData() {
|
||||
/**
|
||||
* function fetch รายการบันทึกวันที่ไม่ได้รับเงินเดือนฯ
|
||||
*/
|
||||
function getData() {
|
||||
showLoader();
|
||||
await http
|
||||
http
|
||||
.get(config.API.profileNewNoPaidByProfileId(profileId.value, empType.value))
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
|
|
@ -160,18 +168,21 @@ async function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
async function saveData() {
|
||||
/**
|
||||
* function เพิ่มข้อมูลรายการบันทึกวันที่ไม่ได้รับเงินเดือนฯ
|
||||
*/
|
||||
function saveData() {
|
||||
showLoader();
|
||||
await http
|
||||
http
|
||||
.post(config.API.profileNewNoPaid(empType.value), {
|
||||
...formData,
|
||||
profileId: empType.value === "" ? profileId.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? profileId.value : undefined,
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
getData();
|
||||
.then(async () => {
|
||||
await getData();
|
||||
onClickCloseDialog();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -181,17 +192,20 @@ async function saveData() {
|
|||
});
|
||||
}
|
||||
|
||||
async function editData() {
|
||||
/**
|
||||
* function แก้ไขข้อมูลรายการบันทึกวันที่ไม่ได้รับเงินเดือนฯ
|
||||
*/
|
||||
function editData() {
|
||||
showLoader();
|
||||
await http
|
||||
http
|
||||
.patch(config.API.profileNewNoPaidById(id.value, empType.value), {
|
||||
...formData,
|
||||
profileId: undefined,
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
getData();
|
||||
.then(async () => {
|
||||
await getData();
|
||||
onClickCloseDialog();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -201,22 +215,9 @@ async function editData() {
|
|||
});
|
||||
}
|
||||
|
||||
// async function deleteData(id: string) {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .delete(config.API.profileNewNoPaidById(id))
|
||||
// .then((res) => {
|
||||
// success($q, "ลบข้อมูลสำเร็จ");
|
||||
// getData();
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
* function เปิดข้อมูลประวัติการแก้ไช
|
||||
*/
|
||||
function onClickHistory(rowId: string) {
|
||||
id.value = rowId;
|
||||
modalHistory.value = true;
|
||||
|
|
@ -243,7 +244,7 @@ onMounted(() => {
|
|||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="formFilter.keyword"
|
||||
v-model="keyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
|
|
@ -251,15 +252,15 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="formFilter.keyword == ''"
|
||||
v-if="keyword == ''"
|
||||
name="search"
|
||||
@click.stop.prevent="formFilter.keyword = ''"
|
||||
@click.stop.prevent="keyword = ''"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
<q-icon
|
||||
v-if="formFilter.keyword"
|
||||
v-if="keyword"
|
||||
name="cancel"
|
||||
@click.stop.prevent="formFilter.keyword = ''"
|
||||
@click.stop.prevent="keyword = ''"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -320,7 +321,7 @@ onMounted(() => {
|
|||
:columns="columns"
|
||||
:rows="rows"
|
||||
:paging="true"
|
||||
:filter="formFilter.keyword"
|
||||
:filter="keyword"
|
||||
v-model:pagination="pagination"
|
||||
:rows-per-page-options="[20, 50, 100]"
|
||||
:visible-columns="visibleColumns"
|
||||
|
|
|
|||
|
|
@ -119,6 +119,9 @@ const pagination = ref({
|
|||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
/**
|
||||
* fetch รายการข้อมูลประวัติการแก้ไช
|
||||
*/
|
||||
function getHistory() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
|
|||
41
src/modules/04_registryPerson/interface/response/Salary.ts
Normal file
41
src/modules/04_registryPerson/interface/response/Salary.ts
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
interface ResListSalary {
|
||||
amount: number;
|
||||
createdAt: string;
|
||||
createdFullName: string;
|
||||
createdUserId: string;
|
||||
date: string;
|
||||
id: string;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdateUserId: string;
|
||||
lastUpdatedAt: string;
|
||||
mouthSalaryAmount: number;
|
||||
order: number;
|
||||
posNo: string;
|
||||
position: string;
|
||||
positionExecutive: string;
|
||||
positionLevel: string;
|
||||
positionLine: string;
|
||||
positionPathSide: string;
|
||||
positionSalaryAmount: number;
|
||||
positionType: string;
|
||||
profileEmployeeId: null | string;
|
||||
profileId: string;
|
||||
refCommandNo: string;
|
||||
templateDoc: string;
|
||||
}
|
||||
|
||||
interface ResType {
|
||||
id: string;
|
||||
posTypeName: string;
|
||||
posTypeRank: number;
|
||||
posLevels: PosLevel[];
|
||||
}
|
||||
|
||||
interface PosLevel {
|
||||
id: string;
|
||||
posLevelAuthority: null;
|
||||
posLevelName: string;
|
||||
posLevelRank: number;
|
||||
}
|
||||
|
||||
export type { ResListSalary, ResType };
|
||||
|
|
@ -285,10 +285,14 @@ async function fetchDataPersonal() {
|
|||
}
|
||||
|
||||
function onClickDownloadKp7(type: string) {
|
||||
console.log(empType.value);
|
||||
|
||||
showLoader();
|
||||
const url =
|
||||
type === "FULL"
|
||||
? config.API.profileReportId(profileId.value)
|
||||
? empType.value
|
||||
? config.API.profileReportEmpId(profileId.value)
|
||||
: config.API.profileReportId(profileId.value)
|
||||
: config.API.profileKp7ShortId(profileId.value);
|
||||
const fileName = type === "FULL" ? "ก.พ.7/ก.ก.1" : "ประวัติแบบย่อ";
|
||||
http
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ const {
|
|||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
const personalId = route.params.personalId as string;
|
||||
const assignId = ref<string>(route.params.form as string);
|
||||
|
|
@ -421,23 +420,10 @@ async function getcompetency(id: string) {
|
|||
main3.value = data[2];
|
||||
main4.value = data[3];
|
||||
main5.value = data[4];
|
||||
console.log(main.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
// await http.get(config.API.competencyOptions(id)).then((res: any) => {
|
||||
// const data = res.data.data;
|
||||
|
||||
// console.log(data);
|
||||
|
||||
// OPmain.value = data;
|
||||
// main.value = data[0];
|
||||
// main2.value = data[1];
|
||||
// main3.value = data[2];
|
||||
// main4.value = data[3];
|
||||
// main5.value = data[4];
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -446,7 +432,6 @@ async function getcompetency(id: string) {
|
|||
*/
|
||||
const assign_competencyGroupMain = ref<any>();
|
||||
async function getCompetencyGroup(id: string) {
|
||||
console.log(position.value);
|
||||
http
|
||||
.get(config.API.kpiCapacity + `/group?positionName=${position.value}`)
|
||||
.then((res) => {
|
||||
|
|
@ -820,17 +805,8 @@ function putData(id: string) {
|
|||
* @param id personal id
|
||||
*/
|
||||
async function saveData(id: string) {
|
||||
console.log("tests");
|
||||
|
||||
const data = putData(id);
|
||||
console.log("data==>", data);
|
||||
// await myForm.value.validate().then((result: boolean) => {
|
||||
// if (result) {
|
||||
dialogConfirm($q, async () => await DataSave(id));
|
||||
// } else {
|
||||
// dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import criterion from "@/modules/05_placement/components/Other/Criterion.vue";
|
||||
import type { ListDataText } from "@/modules/05_placement/interface/index/Main";
|
||||
|
||||
const router = useRouter();
|
||||
const routeName = router.currentRoute.value.name;
|
||||
|
||||
const $q = useQuasar();
|
||||
const probationStore = useProbationDataStore();
|
||||
const { ratingColors } = probationStore;
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
|
|
@ -30,7 +30,6 @@ const route = useRoute();
|
|||
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const { assign } = probationStore;
|
||||
const personalId = ref<string>(route.params.personalId.toString());
|
||||
const Autherise = ref<any>(null);
|
||||
const dateAutherise = ref<any>(new Date());
|
||||
const option = ref<any>([]);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, defineAsyncComponent, onMounted, watch, computed } from "vue";
|
||||
import { ref, onMounted, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -11,11 +11,9 @@ import type { ListDataText } from "@/modules/05_placement/interface/index/Main";
|
|||
|
||||
const $q = useQuasar();
|
||||
const probationStore = useProbationDataStore();
|
||||
const { ratingColors } = probationStore;
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
notifyError,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
|
|
@ -78,32 +76,6 @@ const list2_1 = probationStore.behavior_no1;
|
|||
const list2_2 = probationStore.behavior_no2;
|
||||
const list2_3 = probationStore.behavior_no3;
|
||||
|
||||
/**
|
||||
* get ประเมิน
|
||||
* @param id
|
||||
*/
|
||||
async function fecthAssign(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluateCreate(id))
|
||||
.then(async (res: any) => {
|
||||
person.value = res.data.data.person;
|
||||
assign.value = res.data.data.assign;
|
||||
// option.value.push(res.data.data.commander);
|
||||
Autherise.value = res.data.data.director;
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
round.value = res.data.data.evaluate_no;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** part 3 */
|
||||
const alerts = Array(20)
|
||||
.fill(null)
|
||||
|
|
@ -128,9 +100,6 @@ const behavio_inproveRules = [
|
|||
(val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลสิ่งที่ควรปรับปรุง",
|
||||
];
|
||||
const knowledge_level = ref<number>(0);
|
||||
const knowledge_levelRules = [
|
||||
(val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลสิ่งที่ควรปรับปรุง",
|
||||
];
|
||||
const ArrayCountbotton = [orientation, self_learning, training_seminar];
|
||||
const variablesToWatch = [
|
||||
knowledge_level,
|
||||
|
|
@ -140,7 +109,8 @@ const variablesToWatch = [
|
|||
apply_level,
|
||||
success_level,
|
||||
];
|
||||
const savaForm = () => {
|
||||
|
||||
function savaForm(){
|
||||
let hasError = false;
|
||||
behavio_strengthRef.value.validate();
|
||||
if (
|
||||
|
|
@ -198,6 +168,31 @@ const savaForm = () => {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* get ประเมิน
|
||||
* @param id
|
||||
*/
|
||||
async function fecthAssign(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluateCreate(id))
|
||||
.then(async (res: any) => {
|
||||
person.value = res.data.data.person;
|
||||
assign.value = res.data.data.assign;
|
||||
Autherise.value = res.data.data.director;
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
round.value = res.data.data.evaluate_no;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** ฟังชั่น post data*/
|
||||
function putformData() {
|
||||
const data = {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ const router = useRouter();
|
|||
const routeName = router.currentRoute.value.name;
|
||||
const $q = useQuasar();
|
||||
const probationStore = useProbationDataStore();
|
||||
const { ratingColors } = probationStore;
|
||||
const { assign } = probationStore;
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -45,9 +44,6 @@ const evaluate_id = ref<string>("");
|
|||
const start_date = ref<Date>(new Date());
|
||||
const date_finish = ref<Date>(new Date());
|
||||
const status = ref<boolean>(true);
|
||||
// const chairman = ref<any>([]);
|
||||
// const commander = ref<any>([]);
|
||||
// const mentors = ref<any>([{ name: "" }, { name: "" }]);
|
||||
const dataArr = ref<any>();
|
||||
const props = defineProps({
|
||||
tab: String,
|
||||
|
|
@ -98,105 +94,6 @@ const develop_result_option = ref<any>([
|
|||
{ name: "ไม่ผ่าน (ต่ำกว่าร้อยละ 60)", value: 0 },
|
||||
]);
|
||||
|
||||
/**set true */
|
||||
function edit() {
|
||||
status.value = true;
|
||||
}
|
||||
|
||||
/** set false */
|
||||
function cancel() {
|
||||
status.value = false;
|
||||
fecthAssign();
|
||||
}
|
||||
|
||||
/** get ข้อมูล */
|
||||
async function fecthAssign() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluateChairman(assignId.value))
|
||||
.then(async (res: any) => {
|
||||
// if (props.action == "add") {
|
||||
assign.value = res.data.data.assign;
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
// chairman.value = res.data.data.chairman;
|
||||
// commander.value = res.data.data.commander;
|
||||
// mentors.value = res.data.data.mentors;
|
||||
// }
|
||||
director_id.value = res.data.data.chairman;
|
||||
director_id2.value = res.data.data.commander;
|
||||
if (res.data.data.mentors.length != 0) {
|
||||
director_id3.value = res.data.data.mentors[0];
|
||||
}
|
||||
|
||||
// dateAutherise.value = res.data.data.chairman_dated;
|
||||
// director1_dated.value = res.data.data.director1_dated;
|
||||
// director2_dated.value = res.data.data.director2_dated;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
if (props.action == "edit") {
|
||||
fetchEvaluate();
|
||||
}
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** เอาค่าจ่าก ดาต้า เก็บไว้ที่ตัวเเปร */
|
||||
async function fetchEvaluate() {
|
||||
try {
|
||||
let data = await dataArr.value;
|
||||
evaluate_id.value = data.id;
|
||||
start_date.value = data.date_start;
|
||||
date_finish.value = data.date_finish;
|
||||
learn_level.value = data.knowledge_level;
|
||||
apply_level.value = data.apply_level;
|
||||
success_level.value = data.success_level;
|
||||
achievement_other.value.text = data.achievement_other_desc;
|
||||
achievement_other.value.level = data.achievement_other_level;
|
||||
conduct_level.value[0] = data.conduct1_level;
|
||||
conduct_level.value[1] = data.conduct2_level;
|
||||
conduct_level.value[2] = data.conduct3_level;
|
||||
conduct_level.value[3] = data.conduct4_level;
|
||||
moral_level.value[0] = data.moral1_level;
|
||||
moral_level.value[1] = data.moral2_level;
|
||||
moral_level.value[2] = data.moral3_level;
|
||||
discipline_level.value[0] = data.discipline1_level;
|
||||
discipline_level.value[1] = data.discipline2_level;
|
||||
discipline_level.value[2] = data.discipline3_level;
|
||||
discipline_level.value[3] = data.discipline4_level;
|
||||
discipline_level.value[4] = data.discipline5_level;
|
||||
behavio_orther.value.text = data.behavior_other_desc;
|
||||
behavio_orther.value.level = data.behavior_other_level;
|
||||
orientation.value = data.develop_orientation_score;
|
||||
self_learning.value = data.develop_self_learning_score;
|
||||
training_seminar.value = data.develop_training_seminar_score;
|
||||
other_training.value = data.develop_other_training_score;
|
||||
orientation_percent.value = data.develop_orientation_percent;
|
||||
self_learning_percent.value = data.develop_self_learning_percent;
|
||||
training_seminar_percent.value = data.develop_training_seminar_percent;
|
||||
other_training_percent.value = data.develop_other_training_percent;
|
||||
develop_result.value = data.develop_result;
|
||||
evaluate_result.value = data.evaluate_result;
|
||||
dateAutherise.value = data.chairman_dated;
|
||||
director1_dated.value = data.director1_dated;
|
||||
director2_dated.value = data.director2_dated;
|
||||
if (
|
||||
data.achievement_other_desc !== "" &&
|
||||
data.achievement_other_level !== null
|
||||
) {
|
||||
etc.value = true;
|
||||
} else etc.value = false;
|
||||
if (data.behavior_other_desc !== "" && data.behavior_other_level !== null) {
|
||||
etc2.value = true;
|
||||
} else etc2.value = false;
|
||||
status.value = false;
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
// score
|
||||
const score1 = computed(() => {
|
||||
if (
|
||||
|
|
@ -304,6 +201,96 @@ const score5 = computed(() => {
|
|||
);
|
||||
});
|
||||
|
||||
/**set true */
|
||||
function edit() {
|
||||
status.value = true;
|
||||
}
|
||||
|
||||
/** set false */
|
||||
function cancel() {
|
||||
status.value = false;
|
||||
fecthAssign();
|
||||
}
|
||||
|
||||
/** get ข้อมูล */
|
||||
async function fecthAssign() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.evaluateChairman(assignId.value))
|
||||
.then(async (res: any) => {
|
||||
assign.value = res.data.data.assign;
|
||||
evaluate_no.value = res.data.data.evaluate_no;
|
||||
start_date.value = res.data.data.start_date;
|
||||
date_finish.value = res.data.data.end_date;
|
||||
director_id.value = res.data.data.chairman;
|
||||
director_id2.value = res.data.data.commander;
|
||||
if (res.data.data.mentors.length != 0) {
|
||||
director_id3.value = res.data.data.mentors[0];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
if (props.action == "edit") {
|
||||
fetchEvaluate();
|
||||
}
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** เอาค่าจ่าก ดาต้า เก็บไว้ที่ตัวเเปร */
|
||||
async function fetchEvaluate() {
|
||||
try {
|
||||
let data = await dataArr.value;
|
||||
evaluate_id.value = data.id;
|
||||
start_date.value = data.date_start;
|
||||
date_finish.value = data.date_finish;
|
||||
learn_level.value = data.knowledge_level;
|
||||
apply_level.value = data.apply_level;
|
||||
success_level.value = data.success_level;
|
||||
achievement_other.value.text = data.achievement_other_desc;
|
||||
achievement_other.value.level = data.achievement_other_level;
|
||||
conduct_level.value[0] = data.conduct1_level;
|
||||
conduct_level.value[1] = data.conduct2_level;
|
||||
conduct_level.value[2] = data.conduct3_level;
|
||||
conduct_level.value[3] = data.conduct4_level;
|
||||
moral_level.value[0] = data.moral1_level;
|
||||
moral_level.value[1] = data.moral2_level;
|
||||
moral_level.value[2] = data.moral3_level;
|
||||
discipline_level.value[0] = data.discipline1_level;
|
||||
discipline_level.value[1] = data.discipline2_level;
|
||||
discipline_level.value[2] = data.discipline3_level;
|
||||
discipline_level.value[3] = data.discipline4_level;
|
||||
discipline_level.value[4] = data.discipline5_level;
|
||||
behavio_orther.value.text = data.behavior_other_desc;
|
||||
behavio_orther.value.level = data.behavior_other_level;
|
||||
orientation.value = data.develop_orientation_score;
|
||||
self_learning.value = data.develop_self_learning_score;
|
||||
training_seminar.value = data.develop_training_seminar_score;
|
||||
other_training.value = data.develop_other_training_score;
|
||||
orientation_percent.value = data.develop_orientation_percent;
|
||||
self_learning_percent.value = data.develop_self_learning_percent;
|
||||
training_seminar_percent.value = data.develop_training_seminar_percent;
|
||||
other_training_percent.value = data.develop_other_training_percent;
|
||||
develop_result.value = data.develop_result;
|
||||
evaluate_result.value = data.evaluate_result;
|
||||
dateAutherise.value = data.chairman_dated;
|
||||
director1_dated.value = data.director1_dated;
|
||||
director2_dated.value = data.director2_dated;
|
||||
if (
|
||||
data.achievement_other_desc !== "" &&
|
||||
data.achievement_other_level !== null
|
||||
) {
|
||||
etc.value = true;
|
||||
} else etc.value = false;
|
||||
if (data.behavior_other_desc !== "" && data.behavior_other_level !== null) {
|
||||
etc2.value = true;
|
||||
} else etc2.value = false;
|
||||
status.value = false;
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
/** ฟังชั่นเช็คค่าไม่ว่าง */
|
||||
function savaForm() {
|
||||
let hasError = false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
import { ref, defineAsyncComponent, computed, onMounted, watch } from "vue";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ const reson52 = ref<string>("");
|
|||
const chairman_dated = ref<Date>();
|
||||
const director1_dated = ref<any>("");
|
||||
const director2_dated = ref<any>("");
|
||||
// const fullname = ref<string>("");
|
||||
const director_id = ref<any>(null);
|
||||
const director_id2 = ref<any>(null);
|
||||
const director_id3 = ref<any>(null);
|
||||
|
|
|
|||
|
|
@ -352,7 +352,6 @@ onMounted(async () => {
|
|||
if (props.tab && props.action == "edit") {
|
||||
evaluate_no.value = Number(props.tab.charAt(4));
|
||||
dataArr.value = await props.data;
|
||||
console.log("🚀 ~ onMounted ~ props.data:", props.data);
|
||||
fecthFormdata();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ const {
|
|||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
|
||||
const { ratingColors } = probationStore;
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const personalId = ref<string>(route.params.id.toString());
|
||||
|
||||
|
|
@ -46,12 +45,7 @@ const list2_3 = probationStore.behavior_no3;
|
|||
|
||||
const option = ref<any>([]);
|
||||
const achievement_strengthRef = ref<any>(null);
|
||||
const achievement_inproveRef = ref<any>(null);
|
||||
const behavio_strengthRef = ref<any>(null);
|
||||
const behavio_inproveRef = ref<any>(null);
|
||||
const dateToday = ref<Date>(new Date("10-10-2023"));
|
||||
const dateEnd = ref<Date>(new Date("12-10-2023"));
|
||||
const period = ref<number>(1);
|
||||
|
||||
// part 1
|
||||
const evaluate_expenct_level = ref<any>([]);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const {
|
|||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const { ratingColors } = probationStore;
|
||||
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const personalId = ref<string>(route.params.personalId.toString());
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const mixin = useCounterMixin();
|
|||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const personalId = ref<string>(route.params.personalId.toString());
|
||||
// const fullname = ref<string>("");
|
||||
|
||||
const tab = ref<string>("save1");
|
||||
const dataArrayNumber = ref<number>();
|
||||
const dataRole = ref<string>("mentor");
|
||||
|
|
@ -44,9 +44,6 @@ async function fecthAssign(id: string) {
|
|||
.get(config.API.formevaluate(id))
|
||||
.then(async (res: any) => {
|
||||
await fecthdataAssign(res.data.data);
|
||||
// fullname.value = res.data.data.experimentee
|
||||
// ? res.data.data.experimentee.name
|
||||
// : "";
|
||||
dataArrayNumber.value = 1;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
|
|||
|
|
@ -30,15 +30,10 @@ const mixin = useCounterMixin();
|
|||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const personalId = ref<string>(route.params.personalId.toString());
|
||||
// const fullname = ref<string>("");
|
||||
const tab = ref<string>("save1");
|
||||
const dataArrayNumber = ref<number>();
|
||||
const dataRole = ref<string>("mentor");
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthAssign(assignId.value);
|
||||
});
|
||||
|
||||
/**
|
||||
* get data
|
||||
* @param id person id
|
||||
|
|
@ -135,6 +130,10 @@ function addData() {
|
|||
`/probation/detail/addevaluacommander/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthAssign(assignId.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ const probationStore = useProbationDataStore();
|
|||
const { fecthdataAssign } = probationStore;
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const personalId = ref<string>(route.params.personalId.toString());
|
||||
// const fullname = ref<string>("");
|
||||
const tab = ref<string>("save1");
|
||||
const tabs = ref<any>([]);
|
||||
const dataArrayNumber = ref<number>(1);
|
||||
|
|
@ -45,10 +44,6 @@ function changeTab(tabVal: string) {
|
|||
dataArrayNumber.value = Number(tabVal.charAt(4));
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fecthAssign(assignId.value);
|
||||
});
|
||||
|
||||
/**
|
||||
* get data
|
||||
* @param id person id
|
||||
|
|
@ -114,6 +109,10 @@ function addData() {
|
|||
`/probation/detail/addevalua/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fecthAssign(assignId.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -147,17 +146,16 @@ function addData() {
|
|||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<!-- <q-page-container v-if="tabs.length > 0">
|
||||
<FormEvaluate
|
||||
:tab="tab"
|
||||
:data="evaluate.find((x: any) => x.no === dataArrayNumber)"
|
||||
action="edit"
|
||||
/>
|
||||
</q-page-container> -->
|
||||
|
||||
|
||||
<div v-else class="q-gutter-md">
|
||||
<div class="flex justify-center items-center q-my-md q-gutter-md">
|
||||
<q-btn v-if="!checkRoutePermisson" outline color="primary" label="สร้างแบบประเมิน" @click="addData" />
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
outline
|
||||
color="primary"
|
||||
label="สร้างแบบประเมิน"
|
||||
@click="addData"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -131,13 +131,6 @@ const changeTab = (tabVal: string) => {
|
|||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<!-- <q-page-container v-if="tabs.length > 0">
|
||||
<FormEvaluateScore
|
||||
:tab="tab"
|
||||
:data="evaluate.find((x: any) => x.no === dataArrayNumber)"
|
||||
action="edit"
|
||||
/>
|
||||
</q-page-container> -->
|
||||
|
||||
<div class="q-gutter-md" v-if="tabs.length === 0">
|
||||
<div class="flex justify-center items-center q-my-md q-gutter-md">
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ import type { QTableProps } from "quasar";
|
|||
import type {
|
||||
FormMainProbation,
|
||||
FormMainProbation2,
|
||||
mapData,
|
||||
OpfillterType,
|
||||
CriteriaType,
|
||||
} from "@/modules/05_placement/interface/request/Main";
|
||||
|
||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||
|
|
@ -20,33 +18,36 @@ import config from "@/app.config";
|
|||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const rows = ref<FormMainProbation[]>([]);
|
||||
const rows2 = ref<FormMainProbation2[]>([]);
|
||||
const modal = ref<boolean>(false);
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const paging = ref<boolean>(true);
|
||||
const fillter = ref<number | null>(0);
|
||||
const paging2 = ref<boolean>(true);
|
||||
const Opfillter = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
|
||||
const filterRef = ref<any>(null);
|
||||
const filterRef2 = ref<any>(null);
|
||||
const dataUpdate = ref<FormMainProbation[]>([]);
|
||||
const probationlist = ref<any>([]);
|
||||
const filterKeyword = ref<string>("");
|
||||
const fillterStatus = ref<any>([]);
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const Opfillter2 = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
|
||||
|
||||
const storeFn = useTransferDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const { statusProbationMain } = storeFn;
|
||||
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||
|
||||
const filterRef = ref<any>(null);
|
||||
const modal = ref<boolean>(false);
|
||||
const paging = ref<boolean>(true);
|
||||
const filterRef2 = ref<any>(null);
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const paging2 = ref<boolean>(true);
|
||||
const fillterStatus = ref<any>([]);
|
||||
const fillter = ref<number | null>(0);
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const rows = ref<FormMainProbation[]>([]);
|
||||
const rows2 = ref<FormMainProbation2[]>([]);
|
||||
const dataUpdate = ref<FormMainProbation[]>([]);
|
||||
const Opfillter = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
|
||||
const Opfillter2 = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
|
||||
const formProbation = reactive({ keyword: "", pageSize: 10, page: 1 });
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
const pagination = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const pagination2 = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
|
|
@ -269,9 +270,6 @@ async function getpersonalList() {
|
|||
});
|
||||
}
|
||||
|
||||
const formProbation = reactive({ keyword: "", pageSize: 10, page: 1 });
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
async function onclickAddProbation() {
|
||||
modal.value = true;
|
||||
modal.value && showLoader();
|
||||
|
|
@ -289,10 +287,6 @@ async function onclickAddProbation() {
|
|||
});
|
||||
}
|
||||
|
||||
watch([() => formProbation.page, () => formProbation.pageSize], () => {
|
||||
onclickAddProbation();
|
||||
});
|
||||
|
||||
/**
|
||||
* function updatePagination
|
||||
* @param newPagination ข้อมูล Pagination ใหม่
|
||||
|
|
@ -306,81 +300,9 @@ async function filterKeyword2Fn(page: number) {
|
|||
page !== 1 ? (formProbation.page = 1) : await onclickAddProbation();
|
||||
}
|
||||
|
||||
/** fecth profile */
|
||||
// async function fecthlistPersonal() {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.profileOrganizRoot)
|
||||
// .then((res) => {
|
||||
// const id = res.data.result[0].id;
|
||||
// if (id !== "") {
|
||||
// findlist(id);
|
||||
// }
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {});
|
||||
// }
|
||||
|
||||
/**
|
||||
* ส่งข้อมูลเพื่อ รับ res
|
||||
* @param id string
|
||||
* @param data type
|
||||
*/
|
||||
// async function fecthlistProbation(id: string, data: any) {
|
||||
// try {
|
||||
// probationlist.value = [];
|
||||
// const res = await http.post(
|
||||
// config.API.profileSearchNewOcIdType(id, "officer"),
|
||||
// {
|
||||
// criterias: data,
|
||||
// }
|
||||
// );
|
||||
// return res.data.result;
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* ค้นหาข้อมูลตามไอดี
|
||||
* @param id string
|
||||
*/
|
||||
// async function findlist(id: string) {
|
||||
// let data: CriteriaType[] = [
|
||||
// { criteriaType: "is_retire", criteriaValue: "false" },
|
||||
// { criteriaType: "is_probation", criteriaValue: "true" },
|
||||
// ];
|
||||
// let data2: CriteriaType[] = [
|
||||
// { criteriaType: "is_retire", criteriaValue: "false" },
|
||||
// { criteriaType: "is_probation", criteriaValue: "false" },
|
||||
// ];
|
||||
// let response1 = await fecthlistProbation(id, data);
|
||||
// let response2 = await fecthlistProbation(id, data2);
|
||||
|
||||
// response1.forEach((e: any) =>
|
||||
// probationlist.value.push({ ...e, probation: true })
|
||||
// );
|
||||
// response2.forEach((e: any) =>
|
||||
// probationlist.value.push({ ...e, probation: false })
|
||||
// );
|
||||
// rows2.value = probationlist.value.map((e: mapData) => ({
|
||||
// id: e.id,
|
||||
// fullname: e.fullname,
|
||||
// position: e.position,
|
||||
// level: e.positionEmployeeLevel,
|
||||
// organizationOrganization: e.oc,
|
||||
// status: e.probation,
|
||||
// }));
|
||||
// modal.value = true;
|
||||
// }
|
||||
|
||||
/**
|
||||
* เพิ่มข้อมูล ผู้ทดลองปฏิบัติหน้าที่ราชการ
|
||||
* @param id personal id
|
||||
* @param data personal data
|
||||
*/
|
||||
function clickAdd(data: any) {
|
||||
dialogConfirm(
|
||||
|
|
@ -460,6 +382,10 @@ function filterFn(val: string, update: any) {
|
|||
}
|
||||
}
|
||||
|
||||
watch([() => formProbation.page, () => formProbation.pageSize], () => {
|
||||
onclickAddProbation();
|
||||
});
|
||||
|
||||
/** get ค่า เมื่อโหลดหน้า */
|
||||
onMounted(async () => {
|
||||
getpersonalList();
|
||||
|
|
@ -593,9 +519,7 @@ onMounted(async () => {
|
|||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click="
|
||||
router.push(
|
||||
`/probation/detail/${props.row.personal_id}`
|
||||
)
|
||||
router.push(`/probation/detail/${props.row.personal_id}`)
|
||||
"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
|
|
|
|||
|
|
@ -6,30 +6,16 @@ import { useRoute, useRouter } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const $q = useQuasar();
|
||||
const myForm = ref<QForm>();
|
||||
const mixin = useCounterMixin();
|
||||
const router = useRouter();
|
||||
|
||||
const {
|
||||
date2Thai,
|
||||
notifyError,
|
||||
messageError,
|
||||
success,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const action = ref<string>("edit");
|
||||
const status = ref<boolean>(false);
|
||||
|
||||
const score1 = ref<number>(0);
|
||||
const score2 = ref<number>(0);
|
||||
const score3 = ref<number>(0);
|
||||
const Allscore = ref<number>(0);
|
||||
|
||||
const develop_orientation_score = ref<number>();
|
||||
const develop_self_learning_score = ref<number>();
|
||||
const develop_training_seminar_score = ref<number>();
|
||||
|
|
|
|||
|
|
@ -16,44 +16,25 @@ const optionText = ref<ListDataText[]>([
|
|||
{ value: "4", label: "สูงว่าความคาดหวังค่อนข้างมาก (4)" },
|
||||
{ value: "5", label: "สูงกว่าความคาดหวังมาก (5)" },
|
||||
]);
|
||||
const probationStore = useProbationDataStore();
|
||||
const { ratingColors } = probationStore;
|
||||
|
||||
const $q = useQuasar();
|
||||
const myForm = ref<QForm>();
|
||||
const mixin = useCounterMixin();
|
||||
const router = useRouter();
|
||||
|
||||
const {
|
||||
date2Thai,
|
||||
notifyError,
|
||||
messageError,
|
||||
success,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const action = ref<string>("edit");
|
||||
const status = ref<boolean>(true);
|
||||
|
||||
const score1 = ref<number>(0);
|
||||
const score2 = ref<number>(0);
|
||||
const score3 = ref<number>(0);
|
||||
const Allscore = ref<number>(0);
|
||||
|
||||
const answer1 = ref<string>("");
|
||||
const answer2 = ref<string>("");
|
||||
const answer3 = ref<number>(0);
|
||||
|
||||
const result = ref<any>();
|
||||
const result_option = ref<any>([
|
||||
{ name: "ผ่าน", value: 1 },
|
||||
{ name: "ไม่ผ่าน", value: 0 },
|
||||
]);
|
||||
|
||||
const note = ref<string>("");
|
||||
const date = ref<Date>(new Date());
|
||||
const classBordered = ref<string>("");
|
||||
|
||||
/** ดึง ข้อมูลแบบสำรวจ */
|
||||
|
|
|
|||
|
|
@ -416,55 +416,30 @@ const openModalCalendar = (rows: any) => {
|
|||
<q-td
|
||||
key="realReason"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ props.row.realReason }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="notExitFactor"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ props.row.notExitFactor }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="futureWork"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ props.row.futureWork ? "ใช่" : "ไม่" }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="futureWorkReason"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ props.row.futureWorkReason }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="havejob"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ props.row.havejob ? "ใช่" : "ไม่" }}
|
||||
</q-td>
|
||||
|
|
@ -472,11 +447,6 @@ const openModalCalendar = (rows: any) => {
|
|||
<q-td
|
||||
key="havejobReason"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
<div class="table_ellipsis">
|
||||
{{ props.row.havejobReason }}
|
||||
|
|
@ -485,11 +455,6 @@ const openModalCalendar = (rows: any) => {
|
|||
<q-td
|
||||
key="appointDate"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{
|
||||
props.row.appointDate == null ? "-" : props.row.appointDate
|
||||
|
|
@ -498,11 +463,6 @@ const openModalCalendar = (rows: any) => {
|
|||
<q-td
|
||||
key="datetext"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ props.row.datetext }}
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -241,25 +241,9 @@ const pagination = ref({
|
|||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click="
|
||||
router.push(`/retirement/deceased-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.stop.prevent="nextPage(props.row.id)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
|
|
|
|||
|
|
@ -14,12 +14,14 @@ import CardProfile from "@/components/CardProfile.vue";
|
|||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
/**use*/
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "deceased-detailOnly");
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||
const fullName = ref<string>("");
|
||||
|
|
@ -64,17 +66,6 @@ const nextPage = (page: string) => {
|
|||
window.open(page, "_blank");
|
||||
};
|
||||
|
||||
//downloadFile
|
||||
const downloadFile = (response: any, filename: string) => {
|
||||
const link = document.createElement("a");
|
||||
var fileName = filename;
|
||||
link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
link.setAttribute("download", fileName);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่น ดาว์โหลด
|
||||
* @param type typeของรายละเอียด
|
||||
|
|
@ -82,13 +73,13 @@ const downloadFile = (response: any, filename: string) => {
|
|||
const fileDownload = async (type: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.DeceasedReport(type, profileId.value), {
|
||||
responseType: "blob",
|
||||
})
|
||||
.get(config.API.DeceasedReport(type, profileId.value))
|
||||
.then((res) => {
|
||||
downloadFile(
|
||||
res,
|
||||
`รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม-${fullName.value}.${type}`
|
||||
const data = res.data.result;
|
||||
genReport(
|
||||
data,
|
||||
`รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม-${fullName.value}`,
|
||||
type
|
||||
);
|
||||
})
|
||||
.catch(async (e) => {
|
||||
|
|
@ -191,7 +182,7 @@ const fileDownload = async (type: string) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" v-if="!checkRoutePermisson">
|
||||
<div class="col-12" v-if="checkPermission($route)?.attrIsUpdate">
|
||||
<div class="row">
|
||||
<q-space />
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ const deceased = () =>
|
|||
import("@/modules/06_retirement/components/resign/Deceased.vue");
|
||||
const detaildeceased = () =>
|
||||
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
|
||||
const detaildeceasedOnly = () =>
|
||||
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
|
||||
const dismissOrder = () =>
|
||||
import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue");
|
||||
const outDetail = () =>
|
||||
|
|
@ -190,16 +188,6 @@ export default [
|
|||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/retirement/deceased-detail/:id",
|
||||
name: "deceased-detailOnly",
|
||||
component: detaildeceasedOnly,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_PASSAWAY",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/retirement/deceased/detail/:id",
|
||||
name: "deceased-detailByid",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue