diff --git a/src/components/Dialogs/DialogOrgSelect.vue b/src/components/Dialogs/DialogOrgSelect.vue index e3c5e4634..e0173febc 100644 --- a/src/components/Dialogs/DialogOrgSelect.vue +++ b/src/components/Dialogs/DialogOrgSelect.vue @@ -512,12 +512,14 @@ function onSubmit() { posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง posExecutiveName: selectedPos.value[0].posExecutiveName, //ชื่อตำแหน่ง + posExecutiveId: selectedPos.value[0].posExecutiveId, //ชื่อตำแหน่ง reportingDate: convertDateToAPI(datePos.value), posmasterId: dataPosMaster.id, typeCommand: type.value, positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร positionArea: selectedPos.value[0].positionArea, //ด้าน/สาขา }; + console.log(body); await props.onSubmit?.(body); close(); diff --git a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue index e54741069..ad1028738 100644 --- a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue +++ b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue @@ -165,7 +165,9 @@ async function fetchDataTable(id: string, level: number = 0) { (e) => e !== props.dataRow?.posmasterId ); - positionNo.value = posMain.filter((e: DataPositionNo) => !newUse.includes(e.id)); + positionNo.value = posMain.filter( + (e: DataPositionNo) => !newUse.includes(e.id) + ); } else { positionNo.value = posMain.filter( (e: DataPositionNo) => !positionUse.value.includes(e.id) @@ -241,6 +243,7 @@ async function onClickSubmit() { posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง posExecutiveName: selectedPos.value[0].posExecutiveName, + posExecutiveId: selectedPos.value[0].posExecutiveId, reportingDate: convertDateToAPI(datePos.value), posmasterId: dataPosMaster.id, positionExecutiveField: selectedPos.value[0].positionExecutiveField, //ด้านทางการบริหาร @@ -290,7 +293,10 @@ watch( if (modal.value) { await fetchPositionUes(); if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) { - await fetchPosFind(props?.dataRow?.node ?? 0, props?.dataRow?.nodeId ?? ""); + await fetchPosFind( + props?.dataRow?.node ?? 0, + props?.dataRow?.nodeId ?? "" + ); } else { expanded.value = []; } @@ -345,7 +351,7 @@ function onPosType() { watch( [isAll, isBlank, () => isPosition.value], ([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => { - const shouldFetch = (newAll !== oldAll) || (newBlank !== oldBlank); + const shouldFetch = newAll !== oldAll || newBlank !== oldBlank; const isSelectMode = newPos === "select" && oldPos !== "select"; if (shouldFetch || isSelectMode) { diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 1d43085e9..1e151ee01 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -1,5 +1,5 @@