diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index f9c183113..d282229e2 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -770,11 +770,11 @@ async function getAssign() { )?.directors; const dataPerson = dataMap?.map((dataPerson: AppointTopic) => ({ ...dataPerson, - name: `${dataPerson.name} (${dataPerson.position}${ - dataPerson.positionLevel && dataPerson.positionType - ? dataPerson.positionLevel + name: `${dataPerson.name} ${ + dataPerson.position + ? `(${dataPerson.position}${dataPerson.positionLevel})` : "" - })`, + }`, })); reportPersonIdOp.value = dataPerson ?? []; if (reportPersonIdOp.value.length !== 0) { @@ -903,6 +903,7 @@ function filterFnCaretaker(val: string, update: any) { const dataFilter = filtermantor(OPcaretakerNew.value, [ caretaker2.value, ]).filter((i: any) => i.id !== chairman.value.id); + if (val == "") { update(() => { optionCaretaker.value = dataFilter; @@ -1004,11 +1005,11 @@ function updateAppointMent() { const data = appointTopic.value.directors; const dataPerson = data.map((dataPerson: AppointTopic) => ({ ...dataPerson, - name: `${dataPerson.name} (${dataPerson.position}${ - dataPerson.positionLevel && dataPerson.positionType - ? +dataPerson.positionLevel + name: `${dataPerson.name} ${ + dataPerson.position + ? `(${dataPerson.position}${dataPerson.positionLevel})` : "" - })`, + }`, })); reportPersonIdOp.value = dataPerson; @@ -1029,11 +1030,10 @@ function updateAppointMent() { const createChairmanObject = (dataPerson: AppointTopic) => ({ id: dataPerson.profileId, name: dataPerson.name, + label: dataPerson.position ? `${dataPerson.name} (${dataPerson.position}${ - dataPerson.positionLevel && dataPerson.positionType - ? +dataPerson.positionLevel - : "" + dataPerson.positionLevel ? dataPerson.positionLevel : "" })` : dataPerson.name, posLevel: dataPerson.positionLevel, diff --git a/src/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue b/src/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue new file mode 100644 index 000000000..99ce1703c --- /dev/null +++ b/src/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + แสดงเฉพาะรักษาการแทน + + + + + + + + + + + + + + + + + + + + {{ col.label }} + + + + + + + + + + + + {{ col.value ?? "-" }} + + + + + + ทั้งหมด {{ total }} รายการ + + + + + + + + + + + + + + + diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index 606c68a33..cb43e5f19 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -9,6 +9,7 @@ import { useProbationDataStore } from "@/modules/05_placement/storeProbation"; import genReport from "@/plugins/genreport"; import FormUploadFile from "@/modules/05_placement/components/probation/FormEvaluation/FormUploadFile.vue"; +import DialogSelectAuthority from "@/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue"; const probationStore = useProbationDataStore(); @@ -57,11 +58,30 @@ const options = ref([ { value: 2, label: "พัฒนาไม่ครบ 3 ส่วน" }, ]); const optionsResult = ref([ - { value: 1, label: "ไม่ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้รับราชการต่อ" }, - { value: 2, label: "ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้ออกจากราชการ" }, + { + value: 4, + label: "ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ทดลองปฏิบัติหน้าที่ราชการต่อไป", + type: "save1", + }, + { + value: 2, + label: "ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ออกจากราชการ", + type: "save1", + }, + { + value: 1, + label: "ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ทดลองปฏิบัติหน้าที่ราชการต่อไป", + type: "save2", + }, + { + value: 2, + label: "ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้ออกจากราชการ", + type: "save2", + }, { value: 3, label: "เห็นควรให้ขยายระยะเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก", + type: "save2", }, ]); @@ -156,6 +176,11 @@ const fecthResult = async (id: string) => { status.value = false; action.value = "edit"; expand_month.value = data.expand_month; + authority_name.value = data.authority_name; + authority_pos.value = data.authority_pos; + authority_type.value = data.authority_type; + authority_level.value = data.authority_level; + authority_dated.value = data.authority_dated; changeReson52(Number(data.pass_result)); } }) @@ -180,7 +205,7 @@ async function postData(action: string) { const data = { start_date: date_start.value, date_finish: date_finish.value, - develop_complete: develop.value, + develop_complete: props.tab === "save1" ? 0 : develop.value, pass_result: result.value, reson: reson.value, chairman_dated: chairman_dated.value, @@ -188,6 +213,11 @@ async function postData(action: string) { // director2_dated: director2_dated.value ? director2_dated.value : new Date(), expand_month: expand_month.value ? expand_month.value : undefined, evaluate_no: props?.tab ? Number(props?.tab.charAt(4)) : undefined, + authority_name: authority_name.value, + authority_pos: authority_pos.value, + authority_type: authority_type.value, + authority_level: authority_level.value, + authority_dated: authority_dated.value, }; if (action === "post") { showLoader(); @@ -238,25 +268,53 @@ function selectResult() { * @param val ตัวเลข */ function changeReson52(val: number) { - switch (val) { - case 1: - reson52.value = "เห็นควรให้รับราชการต่อไป"; - break; - case 2: - reson52.value = "เห็นควรให้ออกจากราชการ"; - break; - case 3: - reson52.value = `เห็นควรให้ขยายเวลาทดลองปฏิบัตหิน้าท่ีราชการต่อไปอีก ${expand_month.value} เดือน`; - break; + if (props.tab === "save1") { + switch (val) { + case 4: + reson52.value = "เห็นควรให้ทดลองปฏิบัติหน้าที่ราชการต่อไป"; + break; + case 2: + reson52.value = "เห็นควรให้ออกจากราชการ"; + break; - default: - break; + default: + break; + } + } else if (props.tab === "save2") { + switch (val) { + case 1: + reson52.value = "เห็นควรให้รับราชการต่อไป"; + break; + case 2: + reson52.value = "เห็นควรให้ออกจากราชการ"; + break; + case 3: + reson52.value = `เห็นควรให้ขยายเวลาทดลองปฏิบัตหิน้าท่ีราชการต่อไปอีก ${expand_month.value} เดือน`; + break; + + default: + break; + } } } -onMounted(() => { - fecthAssign(); - fecthResult(assignId.value); +const modal = ref(false); +const authority_dated = ref(null); +const authority_name = ref(""); +const authority_pos = ref(""); +const authority_type = ref(""); +const authority_level = ref(""); + +function updateAuthority(data: any) { + authority_name.value = `${data.prefix}${data.firstName} ${data.lastName}`; + authority_pos.value = `${data.position}`; + authority_type.value = `${data.posType}`; + authority_level.value = `${data.posLevel}`; +} + +onMounted(async () => { + await fecthAssign(); + await fecthResult(assignId.value); }); @@ -405,7 +463,7 @@ onMounted(() => { - + { 'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ', ]" hide-bottom-space - :options="optionsResult" + :options="optionsResult.filter((e:any)=> e.type === props?.tab)" :readonly=" !status || checkRoutePermisson || @@ -479,6 +538,9 @@ onMounted(() => { { - ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ/ผู้มีอํานาจสั่งบรรจุตามมาตรา - 52 + ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ { + + + ผู้มีอํานาจสั่งบรรจุตามมาตรา 52 + + + + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + + + + + +