แก้ไขทะเบียนประวัติ ตำแหน่ง/เงินเดือน
This commit is contained in:
parent
5fe741c35f
commit
3f9a677d9b
14 changed files with 539 additions and 74 deletions
|
|
@ -33,6 +33,7 @@ const empType = ref<string>(route.params.type.toString());
|
|||
const profileId = ref<string>(route.params.id.toString());
|
||||
|
||||
const tabs = defineModel<string>("tabs", { required: true });
|
||||
const isConfirmEdit = defineModel<boolean>("isConfirmEdit", { required: true });
|
||||
const statusCheckEdit = defineModel<string>("statusCheckEdit", {
|
||||
required: true,
|
||||
});
|
||||
|
|
@ -322,6 +323,11 @@ function onEditData(index: number) {
|
|||
modal.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* function สลับตำแหน่งของข้อมูลขึ้นลง
|
||||
* @param action up , down
|
||||
* @param id id รายการที่ต้องการสลับตะแหน่ง
|
||||
*/
|
||||
async function onSwapData(action: string, id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -337,6 +343,11 @@ async function onSwapData(action: string, id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function ลบข้อมูลรายการตำแหน่งเงินเดือน
|
||||
* @param id id ที่ต้องการลบข้อมูลรายการตำแหน่งเงินเดือน
|
||||
* @param isDelete true ลบข้อมูลรานการตำแหน่งเงินเดือน false นำข้อมูลรายการที่ลบไปกลับมา
|
||||
*/
|
||||
function onConfirmDeleteData(id: string, isDelete: boolean) {
|
||||
isDelete
|
||||
? dialogConfirm(
|
||||
|
|
@ -352,6 +363,11 @@ function onConfirmDeleteData(id: string, isDelete: boolean) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function ลบข้อมูลรายการตำแหน่งเงินเดือน
|
||||
* @param id id ที่ต้องการลบข้อมูลรายการตำแหน่งเงินเดือน
|
||||
* @param isDelete true ลบข้อมูลรานการตำแหน่งเงินเดือน false นำข้อมูลรายการที่ลบไปกลับมา
|
||||
*/
|
||||
async function onDeleteData(id: string, isDelete: boolean) {
|
||||
showLoader();
|
||||
const path = isDelete ? "/delete-renew" : "/delete";
|
||||
|
|
@ -372,6 +388,13 @@ async function onDeleteData(id: string, isDelete: boolean) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* class สีของข้อความ
|
||||
* @param isDelete รายการที่ลบ
|
||||
* @param isEdit รายการที่แก้ไข
|
||||
* @param isEntry รายการข้อมูลที่มากจาก Entry
|
||||
* @returns class ส
|
||||
*/
|
||||
function classColorRow(isDelete: boolean, isEdit: boolean, isEntry: boolean) {
|
||||
return isDelete
|
||||
? "text-red"
|
||||
|
|
@ -437,7 +460,13 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-if="tabs === 'PENDING' && statusCheckEdit !== 'CHECKED'" />
|
||||
<q-th
|
||||
v-if="
|
||||
tabs === 'PENDING' &&
|
||||
statusCheckEdit == 'PENDING' &&
|
||||
isConfirmEdit
|
||||
"
|
||||
/>
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
|
|
@ -445,7 +474,13 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td v-if="tabs === 'PENDING' && statusCheckEdit !== 'CHECKED'">
|
||||
<q-td
|
||||
v-if="
|
||||
tabs === 'PENDING' &&
|
||||
statusCheckEdit == 'PENDING' &&
|
||||
isConfirmEdit
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue