diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue index 4608bcd43..38cf78661 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue @@ -29,8 +29,8 @@ const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); const saveEdit = (id: string) => { - dialogConfirm($q, () => console.log("save")) -} + dialogConfirm($q, () => console.log("save")); +}; const edit = () => { status.value = true; @@ -54,7 +54,7 @@ const dataArr = ref(); const props = defineProps({ tab: String, data: Object, - action: String + action: String, }); const list2_1 = [ @@ -108,7 +108,7 @@ onMounted(async () => { // fecthFormdata(); // } // console.log("props===>", props) - if (props.tab && props.action == 'edit') { + if (props.tab && props.action == "edit") { evaluate_no.value = Number(props.tab.charAt(4)); dataArr.value = await props.data; fecthAssign(); @@ -116,13 +116,13 @@ onMounted(async () => { }); watch(props, async () => { - if (props.tab && props.action == 'edit') { + if (props.tab && props.action == "edit") { evaluate_no.value = Number(props.tab.charAt(4)); dataArr.value = await props.data; fecthAssign(); // console.log("props===>", props); } -}) +}); // onMounted(async () => { // if (props.tab !== undefined) { @@ -138,7 +138,7 @@ const fecthAssign = async () => { await http .get(config.API.evaluateCreate(assignId.value)) .then(async (res: any) => { - if (props.action == 'add') { + if (props.action == "add") { person.value = res.data.data.person; assign.value = res.data.data.assign; commander.value = res.data.data.commander; @@ -148,7 +148,6 @@ const fecthAssign = async () => { evaluate_no.value = res.data.data.evaluate_no; start_date.value = res.data.data.start_date; date_finish.value = res.data.data.end_date; - } // console.log(props.tab, res.data.data.evaluate_no); @@ -158,8 +157,9 @@ const fecthAssign = async () => { }) .catch((e) => { messageError($q, e); - }).finally(() => { - if (props.action == 'edit') { + }) + .finally(() => { + if (props.action == "edit") { fetchEvaluate(); } hideLoader(); @@ -210,13 +210,10 @@ const fetchEvaluate = async () => { data.achievement_other_level !== null ) { etc.value = true; - } - if ( - data.behavior_other_desc !== "" && - data.behavior_other_level !== null - ) { + } else etc.value = false; + if (data.behavior_other_desc !== "" && data.behavior_other_level !== null) { etc2.value = true; - } + } else etc2.value = false; status.value = false; // }) // .catch((e) => { @@ -346,7 +343,10 @@ const save = () => { dialogConfirm($q, async () => { await http - .put(config.API.editFormEvaluateCommader(assignId.value, evaluate_id.value), data) + .put( + config.API.editFormEvaluateCommader(assignId.value, evaluate_id.value), + data + ) .then((res: any) => { // console.log(res); status.value = false; @@ -356,7 +356,7 @@ const save = () => { messageError($q, e); }); }); -}; +}; diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 198fcb10b..d6d71383e 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -27,8 +27,8 @@ const route = useRoute(); const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); const saveEdit = (id: string) => { - dialogConfirm($q, () => console.log("save")) -} + dialogConfirm($q, () => console.log("save")); +}; const edit = () => { status.value = true; // console.log(status.value); @@ -53,7 +53,7 @@ const round = ref(); const props = defineProps({ tab: String, data: Object, - action: String + action: String, }); onMounted(async () => { @@ -61,7 +61,7 @@ onMounted(async () => { // fecthFormdata(); // } // console.log("props===>", props) - if (props.tab && props.action == 'edit') { + if (props.tab && props.action == "edit") { evaluate_no.value = Number(props.tab.charAt(4)); dataArr.value = await props.data; fecthAssign(); @@ -69,13 +69,13 @@ onMounted(async () => { }); watch(props, async () => { - if (props.tab && props.action == 'edit') { + if (props.tab && props.action == "edit") { evaluate_no.value = Number(props.tab.charAt(4)); dataArr.value = await props.data; fecthAssign(); // console.log("props===>", props); } -}) +}); // onMounted(() => { // if (props.tab !== undefined) { @@ -91,7 +91,7 @@ const fecthAssign = async () => { .get(config.API.evaluateChairman(assignId.value)) .then(async (res: any) => { // console.log(res); - if (props.action == 'add') { + if (props.action == "add") { assign.value = res.data.data.assign; evaluate_no.value = res.data.data.evaluate_no; start_date.value = res.data.data.start_date; @@ -105,7 +105,7 @@ const fecthAssign = async () => { messageError($q, e); }) .finally(() => { - if (props.action == 'edit') { + if (props.action == "edit") { fetchEvaluate(); } hideLoader(); @@ -159,13 +159,10 @@ const fetchEvaluate = async () => { data.achievement_other_level !== null ) { etc.value = true; - } - if ( - data.behavior_other_desc !== "" && - data.behavior_other_level !== null - ) { + } else etc.value = false; + if (data.behavior_other_desc !== "" && data.behavior_other_level !== null) { etc2.value = true; - } + } else etc2.value = false; status.value = false; // }) @@ -452,14 +449,15 @@ const putformData = () => { dialogConfirm($q, async () => { console.log("data==>", data); await http - .put(config.API.editFormEvaluateChairman(assignId.value, evaluate_id.value), data) + .put( + config.API.editFormEvaluateChairman(assignId.value, evaluate_id.value), + data + ) .then((res: any) => { // console.log(res); status.value = false; success($q, "บันทึกสำเร็จ"); - router.push( - `/probation/detail/${personalId.value}/${assignId.value}` - ); + router.push(`/probation/detail/${personalId.value}/${assignId.value}`); }) .catch((e: any) => { messageError($q, e); @@ -501,7 +499,13 @@ const putformData = () => {
แบบประเมินผล (คณะกรรมการ)
- + แก้ไขข้อมูล
@@ -509,12 +513,16 @@ const putformData = () => { ยกเลิก - + บันทึกข้อมูล - -
@@ -554,11 +562,19 @@ const putformData = () => { - 1.1. ความสามารถในการเรียนรู้งาน + 1.1. ความสามารถในการเรียนรู้งาน - + @@ -586,11 +602,19 @@ const putformData = () => { - 1.2. ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่ + 1.2. ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่ - + @@ -618,11 +642,19 @@ const putformData = () => { - 1.3. ความสำเร็จของงานที่ได้รับมอบหมาย + 1.3. ความสำเร็จของงานที่ได้รับมอบหมาย - + @@ -651,9 +683,15 @@ const putformData = () => { 1.4 อื่นๆ - + @@ -664,15 +702,32 @@ const putformData = () => { - + ]" + /> - + @@ -725,15 +780,27 @@ const putformData = () => { 2.1 ความประพฤติ
- + {{ list.label }} - + @@ -761,15 +828,27 @@ const putformData = () => { 2.2 ความมีคุณธรรมจริยธรรม
- + {{ list.label }} - + @@ -797,15 +876,27 @@ const putformData = () => { 2.3 การรักษาวินัย - + {{ list.label }} - + @@ -832,23 +923,50 @@ const putformData = () => {
2.4 อื่นๆ - +
- + - + ]" + /> - + @@ -906,7 +1024,8 @@ const putformData = () => { - 3.1. ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ + 3.1. ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ @@ -938,7 +1057,8 @@ const putformData = () => { - 3.2. พฤติกรรมของผู้ทดลองปฏิบัติบัติหน้าที่ราชการ + 3.2. พฤติกรรมของผู้ทดลองปฏิบัติบัติหน้าที่ราชการ @@ -1010,34 +1130,68 @@ const putformData = () => {
ร้อยละ
- +
1. การปฐมนิเทศ
- +
- +
2. การเรียนรู้ด้วยตนเอง
- +
- +
3. การอบรมสัมนาร่วมกัน
- +
- +
@@ -1046,10 +1200,20 @@ const putformData = () => { 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
- +
- +
-
- -
- - - - - +
+
+
+
+
+ +
+
+
+
+
+ +
+
-
-
- คณะกรรมการ - +
+ +
+ +
+
+
+ ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ +
+
+ +
+ + + + + +
+
-
- -
- - - - - + +
+
+ คณะกรรมการ + +
+
+ +
+ + + + + +
+
+
+ +
+
+ คณะกรรมการ + +
+
+ +
+ + + + + +
-
+ - +
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue index 08cec9763..33634d46b 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue @@ -51,14 +51,14 @@ const cancel = () => { const props = defineProps({ tab: String, data: Object, - action: String + action: String, }); onMounted(async () => { // if (props.action == 'add') { // fecthFormdata(); // } - if (props.tab && props.action == 'edit') { + if (props.tab && props.action == "edit") { evaluate_no.value = Number(props.tab.charAt(4)); dataArr.value = await props.data; fecthFormdata(); @@ -66,20 +66,20 @@ onMounted(async () => { }); watch(props, async () => { - if (props.tab && props.action == 'edit') { + if (props.tab && props.action == "edit") { evaluate_no.value = Number(props.tab.charAt(4)); dataArr.value = await props.data; fecthFormdata(); - // console.log("props===>", props); + // console.log("props===>", props.data); } -}) +}); const fecthFormdata = async () => { await http .get(config.API.formevaluateRecord(assignId.value)) .then(async (res: any) => { // console.log(res); - if (props.action == 'add') { + if (props.action == "add") { evaluate_no.value = res.data.data.evaluate_no; start_date.value = res.data.data.start_date; date_finish.value = res.data.data.end_date; @@ -91,13 +91,17 @@ const fecthFormdata = async () => { Autherise.value = res.data.data.director.name; list1_1.value = res.data.data.assign_output; - evaluate_expenct_level.value = await res.data.data.assign_output.map((e: any) => ({ - id: e.id, - labal: e.output_desc, - })); - evaluate_ouptut.value = await res.data.data.assign_output.map((e: any) => ({ - id: e.id, - })); + evaluate_expenct_level.value = await res.data.data.assign_output.map( + (e: any) => ({ + id: e.id, + labal: e.output_desc, + }) + ); + evaluate_ouptut.value = await res.data.data.assign_output.map( + (e: any) => ({ + id: e.id, + }) + ); checkArray.value = list1_1.value.length; @@ -107,8 +111,9 @@ const fecthFormdata = async () => { }) .catch((e: any) => { console.log(e); - }).finally(() => { - if (props.action == 'edit') { + }) + .finally(() => { + if (props.action == "edit") { fecthFormRound(); } }); @@ -116,6 +121,8 @@ const fecthFormdata = async () => { const fecthFormRound = async () => { showLoader(); try { + console.log(dataArr.value); + // await http // .get(config.API.formevaluateround(assignId.value, round.value)) // .then(async(res: any) => { @@ -158,23 +165,22 @@ const fecthFormRound = async () => { data.achievement_other_level !== null ) { etc.value = true; - } - if ( - data.behavior_other_desc !== "" && - data.behavior_other_level !== null - ) { + } else etc.value = false; + if (data.behavior_other_desc !== "" && data.behavior_other_level !== null) { etc2.value = true; - } + } else etc2.value = false; if (data.achievements) { await data.achievements.map((e: any, index: number) => { - evaluate_expenct_level.value[index].level = e.evaluate_expect_level - evaluate_ouptut.value[index].text = e.evaluate_output_desc - evaluate_ouptut.value[index].level = e.evaluate_output_level + evaluate_expenct_level.value[index].level = e.evaluate_expect_level; + evaluate_ouptut.value[index].text = e.evaluate_output_desc; + evaluate_ouptut.value[index].level = e.evaluate_output_level; }); } status.value = false; + console.log(etc.value); + // }) // .catch((e) => { // console.log(e); @@ -188,7 +194,6 @@ const fecthFormRound = async () => { } catch (error) { hideLoader(); } - }; const list1_1 = ref([]); @@ -426,7 +431,9 @@ const putformData = () => { // commander_dated: dateAutherise.value, }; - dialogConfirm($q, () => props.action == 'edit' ? editData(data) : saveformdata(data)); + dialogConfirm($q, () => + props.action == "edit" ? editData(data) : saveformdata(data) + ); }; const saveformdata = async (data: any) => { @@ -435,9 +442,7 @@ const saveformdata = async (data: any) => { .then((res: any) => { // console.log(res); success($q, "บันทึกสำเร็จ"); - router.push( - `/probation/detail/${personalId.value}/${assignId.value}` - ); + router.push(`/probation/detail/${personalId.value}/${assignId.value}`); }) .catch((e: any) => { messageError($q, e); @@ -455,7 +460,6 @@ const editData = async (data: any) => { messageError($q, e); }); }; - diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index a5b702867..3fb04d6e2 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -145,6 +145,54 @@
+ +
+
+ ผลการพิจารณาของผู้บังคับบัญชา +
+
+ +
+
+
+
สถานะ
+
{{ "อนุมัติ/ยับยั้ง" }}
+
+
+
วันสุดท้ายที่ยับยั้ง
+
{{ date2Thai(new Date()) }}
+
+
+
ความคิดเห็นและเหตุผล
+
{{ "ความคิดเห็นและเหตุผล" }}
+
+
+
+
+ +
+
+ ผลการพิจารณาของผู้มีอำนาจ +
+
+ +
+
+
+
สถานะ
+
{{ "อนุมัติ/ยับยั้ง" }}
+
+
+
วันสุดท้ายที่ยับยั้ง
+
{{ date2Thai(new Date()) }}
+
+
+
ความคิดเห็นและเหตุผล
+
{{ "ความคิดเห็นและเหตุผล" }}
+
+
+
+
@@ -486,19 +534,62 @@ :close="closeModal" /> - +
+
+ + + + + +
@@ -578,6 +669,7 @@ const status = ref(""); const modal = ref(false); const actionPass = ref(false); const reasonReign = ref(""); +const dateBreak = ref(null); const closeModal = () => (modal.value = false); const openModal = () => (modal.value = true); @@ -633,6 +725,7 @@ const fetchData = async (id: string) => { const popUp = (action: "pass" | "passNot") => { reasonReign.value = ""; + dateBreak.value = null; actionPass.value = action === "pass"; openModal(); // if (action === "pass") { diff --git a/src/modules/07_insignia/components/1_Proposals/addProposals.vue b/src/modules/07_insignia/components/1_Proposals/addProposals.vue index 558eab9fb..447a32b7c 100644 --- a/src/modules/07_insignia/components/1_Proposals/addProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/addProposals.vue @@ -10,7 +10,6 @@ color="primary" class="q-mr-sm" @click="clickBack" - /> {{ edit @@ -203,8 +202,15 @@ import http from "@/plugins/http"; import config from "@/app.config"; const mixin = useCounterMixin(); -const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader,dialogConfirm } = - mixin; +const { + date2Thai, + success, + dateToISO, + messageError, + showLoader, + hideLoader, + dialogConfirm, +} = mixin; const router = useRouter(); const route = useRoute(); const $q = useQuasar(); @@ -219,9 +225,9 @@ const fileDocDataUpload = ref([]); const roundInsig = ref(); const datelast = ref(1); const options = ref([ - {label:"รอบที่ 1",value:1}, - {label:"รอบที่ 2",value:2} -]) + { label: "รอบที่ 1", value: 1 }, + { label: "รอบที่ 2", value: 2 }, +]); onMounted(async () => { await fetchData(); }); @@ -238,7 +244,11 @@ const fetchData = async () => { const data = res.data.result; // const files = res.data.result.files; id.value = data.period_id; - roundInsig.value = data.period_name; + roundInsig.value = + options.value.filter((r: any) => r.value == data.period_round) + .length > 0 + ? options.value.filter((r: any) => r.value == data.period_round)[0] + : null; yearly.value = data.period_year; datelast.value = data.period_amount; dateStart.value = new Date(data.period_start); @@ -268,9 +278,13 @@ const updateYear = async (e: number) => { const editData = async (id: string) => { const formData = new FormData(); - formData.append("Name", roundInsig.value); - formData.append("year", parseInt(yearly.value).toString()); - formData.append("Amount", datelast.value.toString()); + const name = `รอบการเสนอพระราชทานเครื่องราชรอบที่ ${ + roundInsig.value.value + } ปี ${yearly.value + 543} `; + formData.append("name", name); + formData.append("year", yearly.value.toString()); + formData.append("amount", datelast.value.toString()); + formData.append("round", roundInsig.value.value); if (dateStart.value !== null) { formData.append("startDate", dateToISO(dateStart.value)); } @@ -295,9 +309,9 @@ const editData = async (id: string) => { }); console.log(formData); }; -const checkSave = () => { - dialogConfirm($q,()=> SaveData()) -} +const checkSave = () => { + dialogConfirm($q, () => SaveData()); +}; const SaveData = async () => { if (myForm.value !== null) { myForm.value.validate().then(async (success) => { @@ -324,23 +338,28 @@ const SaveData = async () => { // return valueData; // }; const updateDateRange = () => { -// console.log("test") + // console.log("test") if (roundInsig.value.value == 1) { dateStart.value = new Date(new Date().getFullYear(), 9, 1); dateEnd.value = new Date(new Date().getFullYear() + 1, 3, 29); - console.log(1) + console.log(1); } else if (roundInsig.value.value == 2) { dateStart.value = new Date(new Date().getFullYear(), 3, 29); dateEnd.value = new Date(new Date().getFullYear(), 4, 29); - console.log(2) + console.log(2); } }; const addData = async () => { const formData = new FormData(); - formData.append("name", roundInsig.value); - formData.append("year", parseInt(yearly.value).toString()); + const name = `รอบการเสนอพระราชทานเครื่องราชรอบที่ ${ + roundInsig.value.value + } ปี ${yearly.value + 543} `; + console.log(name); + formData.append("name", name); + formData.append("year", yearly.value.toString()); formData.append("amount", datelast.value.toString()); + formData.append("round", roundInsig.value.value); if (dateStart.value !== null) { formData.append("startDate", dateToISO(dateStart.value)); } @@ -356,7 +375,7 @@ const addData = async () => { showLoader(); await http - .post(config.API.listRoundInsignia("insignia"), formData) + .post(config.API.listRoundInsignia(), formData) .then(async (res) => {}) .catch((e) => { messageError($q, e);