diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue index 350a858a0..2ba1781b1 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue @@ -151,6 +151,8 @@ const fetchEvaluate = async () => { self_learning.value = data.self_learning.toString(); training_seminar.value = data.training_seminar.toString(); other_training.value = data.other_training.toString(); + dateAutherise.value = data.commander_dated + if ( data.achievement_other_desc !== "" && data.achievement_other_level !== null diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index dea6b317a..0230cbe9b 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -46,6 +46,19 @@ const director_id3 = ref(null); const optionDirector = ref([]); const person = ref([]); +const options = ref([ + { value: 1, label: "พัฒนาครบ 3 ส่วน" }, + { value: 2, label: "พัฒนาไม่ครบ 3 ส่วน" }, +]); +const optionsResult = ref([ + { value: 1, label: "ไม่ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้รับราชการต่อ" }, + { value: 2, label: "ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้ออกจากราชการ" }, + { + value: 3, + label: "เห็นควรให้ขยายระยะเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก", + }, +]); + // const saveEdit = async (id: string) => { // await myForm.value.validate().then((result: boolean) => { // if (result) { @@ -73,6 +86,7 @@ const fecthAssign = async (id: string) => { ) { develop.value = res.data.data.result.develop_complete; result.value = res.data.data.result.evaluate_result; + changeReson52(Number(res.data.data.result.evaluate_result)); } director_id.value = res.data.data.chairman.name; @@ -117,19 +131,6 @@ const fecthResult = async (id: string) => { // part new -const options = [ - { value: 1, label: "พัฒนาครบ 3 ส่วน" }, - { value: 2, label: "พัฒนาไม่ครบ 3 ส่วน" }, -]; -const optionsResult = [ - { value: 1, label: "ไม่ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้รับราชการต่อ" }, - { value: 2, label: "ต่ำกว่ามาตรฐานที่กำหนด เห็นควรให้ออกจากราชการ" }, - { - value: 3, - label: "เห็นควรให้ขยายระยะเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก", - }, -]; - const savaForm = async () => { await myForm.value.validate().then((result: boolean) => { if (result) { @@ -207,7 +208,7 @@ const postData = async (action: string) => { }); } }; -const selectRuslt = () => { +const selectResult = () => { if (result.value !== 3) { expand_month.value = ""; } @@ -236,30 +237,6 @@ onMounted(() => { fecthAssign(assignId.value); fecthResult(assignId.value); }); -const optionsFn = ref([]); -function filterFnOptions(val: string, update: any) { - if (val == "") { - update(() => { - optionsFn.value = options; - }); - } else { - update(() => { - optionsFn.value = options.filter((e: any) => e.label.search(val) !== -1); - }); - } -} -const optionsResultFn = ref([]) -function filterFnOptionsResult(val: string, update: any) { - if (val == "") { - update(() => { - optionsResultFn.value = optionsResult; - }); - } else { - update(() => { - optionsResultFn.value = optionsResult.filter((e: any) => e.label.search(val) !== -1); - }); - } -}