diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index e6c6e0847..775d8d572 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -98,6 +98,7 @@ export default { receiveReport: `${receive}/report`, receiveDataId: (id: string) => `${receive}/${id}`, receivePosition: (id: string) => `${receive}/position/${id}`, + receiveDataPosition: () => `${receive}/use`, //tranfer ระบบคำขอโอน transfer, @@ -115,6 +116,7 @@ export default { appointmentDelete: (id: string) => `${placement}/appointment/${id}`, appointmentPosition: (id: string) => `${placement}/appointment/position/${id}`, apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`, + apppointmentPosition: () => `${placement}/appointment/use`, // ช่วยราชการ placemenHelpGov, @@ -139,6 +141,8 @@ export default { relocationMainReport: () => `${placement}/relocation/report`, relocationMainPut: (id: string) => `${placement}/relocation/position/${id}`, relocationMainEdit: (id: string) => `${placemenRelocation}/${id}`, + relocationMainPosition: () => `${placement}/relocation/use`, + // อื่นๆ placemenOther, otherMain: () => `${placemenOther}`, diff --git a/src/modules/05_placement/components/AppointMent/AppointmentModal.vue b/src/modules/05_placement/components/AppointMent/AppointmentModal.vue index 8625c2b2a..64d377c5f 100644 --- a/src/modules/05_placement/components/AppointMent/AppointmentModal.vue +++ b/src/modules/05_placement/components/AppointMent/AppointmentModal.vue @@ -30,15 +30,12 @@ let dataForm = reactive({ positionLineId: "", positionPathSideId: "", positionTypeId: "", - // salaryAmount: null, - // mouthSalaryAmount: null, - // positionSalaryAmount: null, }); onMounted(async () => { await fetchPublishFile(); await loadTreeData(); - // await fetchplacementPosition(); + await fetchplacementPosition(); }); const fetchPublishFile = async () => { await http @@ -90,17 +87,17 @@ function filterByPersonIdNull(obj: any) { } // โหลด position -// const placementPosition = ref([]); -// const fetchplacementPosition = async () => { -// await http -// .get(config.API.placementPosition()) -// .then((res: any) => { -// placementPosition.value = res.data.result; -// }) -// .catch((e: any) => { -// messageError($q, e); -// }); -// }; +const placementPosition = ref([]); +const fetchplacementPosition = async () => { + await http + .get(config.API.apppointmentPosition()) + .then((res: any) => { + placementPosition.value = res.data.result; + }) + .catch((e: any) => { + messageError($q, e); + }); +}; const search = ref(""); //reset Tree Filter @@ -191,7 +188,7 @@ const saveAppoint = async () => { // await resetFilter(); await fetchPublishFile(); await loadTreeData(); - // await fetchplacementPosition(); + await fetchplacementPosition(); hideLoader(); }); } @@ -367,10 +364,10 @@ const selectedPosition = async (data: any) => { console.log("dataForm", dataForm); }; -// const checkPosition = (val: string) => { -// const num = placementPosition.value.findIndex((e: string) => e === val); -// return num; -// }; +const checkPosition = (val: string) => { + const num = placementPosition.value.findIndex((e: string) => e === val); + return num; +}; const personal = ref(); const expanded = ref([]); @@ -506,13 +503,12 @@ function findByPerson(element: any): any { :active="selected == prop.node.keyId" @click="selectedPosition(prop.node)" :disable=" - prop.node.name != null - + prop.node.name != null || + checkPosition(prop.node.positionNumId) != -1 " active-class="my-list-link text-primary text-weight-medium" class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list" > - (""); const positionTypeOld = ref(""); const positionLevelOld = ref(""); @@ -53,8 +54,9 @@ const fecthappointmentByid = async () => { .then((res: any) => { const data = res.data.result; appointment.value = data; - console.log(data); + // console.log(data); + profileId.value = data.profileId; title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`; title.value.organizationPositionOld = data.organizationPositionOld ?? "-"; title.value.positionLevelOld = data.positionLevelOld ?? "-"; @@ -131,16 +133,7 @@ const getClass = (val: boolean) => {