feat(position-employee): HistoryPos

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-24 15:11:07 +07:00
parent df2b3f7b32
commit 49b57e7b40
4 changed files with 144 additions and 41 deletions

View file

@ -78,6 +78,7 @@ const modalDialogSuccession = ref<boolean>(false); // สืบทอดตำ
const modalDialogHistoryPos = ref<boolean>(false); //
const modalCondition = ref<boolean>(false); //
const dataCondition = ref<DataPositionCondition>();
const historyType = ref<string>(""); //
const rowId = ref<string>("");
const actionType = ref<string>("");
@ -107,6 +108,12 @@ const listMenu = ref<ListMenu[]>([
type: "CONDITION",
color: "deep-orange",
},
{
label: "ประวัติคนครอง",
icon: "history",
type: "OWNER_HISTORY",
color: "deep-purple",
},
{
label: "ลบ",
icon: "delete",
@ -247,18 +254,20 @@ const typeMove = ref<string>("");
* @param type ประเภท [ALL,SINGER]
*/
function onClickMovePos(id: string, type: string) {
rowId.value = id;
modalDialogMMove.value = !modalDialogMMove.value;
typeMove.value = type;
rowId.value = id;
}
/**
* function ประวตำแหน
* @param id ID ตำแหน
* @param type ประเภท [ALL,SINGER]
*/
function onClickHistoryPos(id: string) {
modalDialogHistoryPos.value = !modalDialogHistoryPos.value;
function onClickHistoryPos(id: string, type: string) {
rowId.value = id;
historyType.value = type;
modalDialogHistoryPos.value = !modalDialogHistoryPos.value;
}
/**
@ -615,13 +624,15 @@ watch(
: item.type === 'MOVE'
? onClickMovePos(props.row.id, 'SINGER')
: item.type === 'HISTORY'
? onClickHistoryPos(props.row.id)
? onClickHistoryPos(props.row.id, item.type)
: item.type === 'INHERIT'
? onClickInherit(props.row.id)
: item.type === 'COPY'
? onClickPosition('COPY', props.row.id)
: item.type === 'CONDITION'
? onClickCodition(props.row)
: item.type === 'OWNER_HISTORY'
? onClickHistoryPos(props.row.ancestorDNA, item.type)
: null
"
>
@ -778,7 +789,11 @@ watch(
/>
<!-- ประวตำแหน -->
<DialogHistoryPos v-model:modal="modalDialogHistoryPos" :rowId="rowId" />
<DialogHistoryPos
v-model:modal="modalDialogHistoryPos"
:rowId="rowId"
:historyType="historyType"
/>
<!-- เลอกคนครอง -->
<DialogSelectPerson