ทะเบียนประวัติ => ข้อมูลผลงานและเครื่องราชฯ
This commit is contained in:
parent
0e290d0c94
commit
a268461792
6 changed files with 232 additions and 137 deletions
|
|
@ -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"
|
||||
|
|
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue