From 9db326570458b68ca1aa991b714dd3aaef822b64 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Thu, 27 Jul 2023 17:45:14 +0700 Subject: [PATCH 001/113] no message --- .../components/probation/FormAssign.vue | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index 6e899e2af..f1a0062d8 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -96,7 +96,7 @@ hide-bottom-space class="full-width datepicker q-mb-md" :model-value=" - dateExam != null ? date2Thai(dateExam) : null + date_start != null ? date2Thai(date_start) : null " :label="`${'ตั้งเเต่วันที่'}`" clearable @@ -129,7 +129,7 @@ readonly class="full-width datepicker q-mb-md" :model-value=" - dateExam2 != null ? date2Thai(dateExam2) : null + date_finish != null ? date2Thai(date_finish) : null " :label="`${'ถึงวันที่'}`" clearable @@ -1253,8 +1253,7 @@ const val1 = ref([ const router = useRouter(); const mixin = useCounterMixin(); const { date2Thai, notifyError } = mixin; -const dateExam = ref(null); -const dateExam2 = ref(null); + const checkValidate = ref(false); const myForm = ref(null); @@ -1263,8 +1262,8 @@ const personal_id = ref(); const fullname = ref(); const knowledge_skill_map_no = ref([]); const round_no = ref(); -const date_start = ref(); -const date_finish = ref(); +const date_start = ref(null); +const date_finish = ref(null); const behavior_desc = ref(); const other_desc = ref({}); const other4_desc = ref(); @@ -1275,13 +1274,13 @@ const createdAt = ref(); const updatedAt = ref(); const clearDateExam = () => { - dateExam.value = null; + date_start.value = null; }; const clearDateExam2 = () => { - dateExam2.value = null; + date_finish.value = null; }; const isDatePicker2Readonly = computed(() => { - return dateExam.value === null; + return date_start.value === null; }); const routeName = router.currentRoute.value.name; const name = ref(""); @@ -1303,7 +1302,7 @@ const monthOp = [{ value: "6", label: "6 เดือน" }]; const activityCount = ref(2); const activity_desc = ref(Array(activityCount.value).fill("")); const goal_desc = ref(Array(activityCount.value).fill("")); - + const activityDataArray = ref([]); const addActivity = () => { activityCount.value++; }; @@ -1331,6 +1330,7 @@ const addKnowledge = () => { knowledgeCount.value++; } }; + const knowledgeArray = computed(() => { return Array(knowledgeCount.value).fill(""); }); @@ -1551,7 +1551,6 @@ const saveData = async () => { // workInfopRef.value.validate(); myForm.value.validate().then(async (result: boolean) => { if (result) { - // showLoader(); // แสดงข้อมูลใน Console @@ -1576,6 +1575,16 @@ const saveData = async () => { .onCancel(() => {}) .onDismiss(() => {}); } else { + // ลองดูlog + activityDataArray.value = activity_desc.value.map((activity, index) => ({ + id: index + 1, + activity_desc: activity, + goal_desc: goal_desc.value[index], + })); + // showLoader(); + console.log("activity_desc:", activity_desc.value); + console.log("goal_desc:", goal_desc.value); + console.log(activityDataArray.value); // Validation ไม่ผ่าน notifyError($q, "กรุณากรอกข้อมูลให้ครบ"); } @@ -1600,7 +1609,7 @@ const OPmain = [""]; const group = ref(""); const group2 = ref(""); const group3 = ref(""); -const OPgroup = [""]; +const OPgroup = ["test"]; const Other = ref(""); From aa786793ac53b5b99b9c0b73c247d35c2a6dd9ff Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Thu, 27 Jul 2023 18:26:28 +0700 Subject: [PATCH 002/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20route=20registryEmployeeEdit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/08_registryEmployee/router.ts | 2 +- src/modules/08_registryEmployee/views/Main.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/08_registryEmployee/router.ts b/src/modules/08_registryEmployee/router.ts index ce8e0d3c2..67a4cc826 100644 --- a/src/modules/08_registryEmployee/router.ts +++ b/src/modules/08_registryEmployee/router.ts @@ -47,7 +47,7 @@ export default [ }, }, { - path: "/registryEmployee/Edit/:Id", + path: "/registryEmployee/edit/:Id", name: "registryEmployeeEdit", component: EditDetail, meta: { diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index c89d46bee..edd6bba6f 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -1355,7 +1355,7 @@ const clickAdd = () => { // ดูรายการแก้ไขรายชื่อ const redirectToPage = (profileId?: string) => { - router.push(`/registryEmployee/Edit/${profileId}`); + router.push(`/registryEmployee/edit/${profileId}`); }; const editDetail = async (row: any) => { await getPosition(row.id); From e64b68c017c6a9e20c30110b3fe69523f1edf855 Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Fri, 28 Jul 2023 08:34:52 +0700 Subject: [PATCH 003/113] =?UTF-8?q?Mock=20up=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B9=82=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Receive/DialogFooter.vue | 69 ++ .../components/Receive/DialogHeader.vue | 29 + .../components/Receive/receiveMain.vue | 563 +++++++++++++ .../components/Receive/receiveModal.vue | 794 ++++++++++++++++++ src/modules/05_placement/router.ts | 14 + 5 files changed, 1469 insertions(+) create mode 100644 src/modules/05_placement/components/Receive/DialogFooter.vue create mode 100644 src/modules/05_placement/components/Receive/DialogHeader.vue create mode 100644 src/modules/05_placement/components/Receive/receiveMain.vue create mode 100644 src/modules/05_placement/components/Receive/receiveModal.vue diff --git a/src/modules/05_placement/components/Receive/DialogFooter.vue b/src/modules/05_placement/components/Receive/DialogFooter.vue new file mode 100644 index 000000000..d2358bb75 --- /dev/null +++ b/src/modules/05_placement/components/Receive/DialogFooter.vue @@ -0,0 +1,69 @@ + + diff --git a/src/modules/05_placement/components/Receive/DialogHeader.vue b/src/modules/05_placement/components/Receive/DialogHeader.vue new file mode 100644 index 000000000..a20e917b0 --- /dev/null +++ b/src/modules/05_placement/components/Receive/DialogHeader.vue @@ -0,0 +1,29 @@ + + + + diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue new file mode 100644 index 000000000..9dd3924d4 --- /dev/null +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -0,0 +1,563 @@ + + + diff --git a/src/modules/05_placement/components/Receive/receiveModal.vue b/src/modules/05_placement/components/Receive/receiveModal.vue new file mode 100644 index 000000000..4f9f42fcb --- /dev/null +++ b/src/modules/05_placement/components/Receive/receiveModal.vue @@ -0,0 +1,794 @@ + + + + + diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index 90d23090b..93d3af33f 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -46,6 +46,10 @@ const RepatriationOrder = () => const RepatriationOrderAdd = () => import("@/modules/05_placement/components/RepatriationOrder/AddOrder.vue"); +//รับโอน +const receiveMain = () => + import("@/modules/05_placement/components/Receive/receiveMain.vue"); + export default [ { path: "/placement", @@ -207,4 +211,14 @@ export default [ Role: "placement", }, }, + { + path: "/receive", + name: "receive", + component: receiveMain, + meta: { + Auth: true, + Key: [6.3], + Role: "placement", + }, + }, ]; From b6bde021689e9cda44d005c9cd230eba4666c695 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 28 Jul 2023 09:09:47 +0700 Subject: [PATCH 004/113] no message --- .../components/probation/FormAssign.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index f1a0062d8..3146c96b2 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -71,7 +71,6 @@ v-model="monthSelect" :label="`ระยะเวลากี่เดือน`" /> -
{{ monthSelect }} เดือน
{ + const data = { + fullname:fullname.value, + position:position.value, + monthSelect:monthSelect.value, + date_start:date_start.value, + date_finish:date_finish.value, + caretaker1:caretaker1.value, + caretaker2:caretaker2.value, + activity_desc:activity_desc.value, + goal_desc:goal_desc.value, + knowledge:knowledge.value, + } + console.log("test",data) +} const saveData = async () => { // myForm.value.resetValidation(); @@ -1575,6 +1589,7 @@ const saveData = async () => { .onCancel(() => {}) .onDismiss(() => {}); } else { + putData() // ลองดูlog activityDataArray.value = activity_desc.value.map((activity, index) => ({ id: index + 1, From eb5f4d35f647db1958a97aa4dc179fbcaaed3517 Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 28 Jul 2023 09:42:50 +0700 Subject: [PATCH 005/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20router=20?= =?UTF-8?q?=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B9=84=E0=B8=9B=E0=B8=94=E0=B8=B6?= =?UTF-8?q?=E0=B8=87=E0=B8=97=E0=B8=B5=E0=B9=88=20registry=20=E0=B8=81?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/08_registryEmployee/views/Main.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index edd6bba6f..7f1bba964 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -1354,8 +1354,8 @@ const clickAdd = () => { }; // ดูรายการแก้ไขรายชื่อ -const redirectToPage = (profileId?: string) => { - router.push(`/registryEmployee/edit/${profileId}`); +const redirectToPage = (id?: string) => { + router.push(`/registry/${id}`); }; const editDetail = async (row: any) => { await getPosition(row.id); From 286236dc6c674b7dd7f862663f01388c5a6cfe39 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 28 Jul 2023 10:08:17 +0700 Subject: [PATCH 006/113] =?UTF-8?q?=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99=20=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=9F=E0=B8=AD=E0=B8=A3=E0=B9=8C?= =?UTF-8?q?=E0=B8=A1=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=A1=E0=B8=B4=E0=B8=99=E0=B8=9C=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../probation/FormEvaluation/FormReport.vue | 560 +++++++----------- .../probation/FormEvaluation/Header.vue | 8 +- .../FormEvaluation/Template2Format2.vue | 4 +- .../probation/FormEvaluation/Template3.vue | 14 +- 4 files changed, 238 insertions(+), 348 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index 15c6ee09e..6be0a8872 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -1,348 +1,248 @@ @@ -366,4 +266,4 @@ const period = ref(1); .q-card { box-shadow: 0px 0px 0px 0px !important; } - + \ No newline at end of file diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Header.vue b/src/modules/05_placement/components/probation/FormEvaluation/Header.vue index 579b4e5c6..5e87f4d44 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Header.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Header.vue @@ -27,7 +27,7 @@ watch(tabHead, () => { indicator-color="grey-1" class="text-grey-7" > - + { - + { - \ No newline at end of file diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue index e0adc68a6..fb54fdd4d 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template3.vue @@ -14,17 +14,7 @@ const FormReport = defineAsyncComponent( \ No newline at end of file From 05982c4346a350c3cf3a52c73648a43814a0b2df Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:22:26 +0700 Subject: [PATCH 007/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20Api=20delete=20//=20=E0=B9=80=E0=B9=80=E0=B8=A5?= =?UTF-8?q?=E0=B8=B0=20path=20=E0=B9=83=E0=B8=99=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=B9=E0=B8=A5=20=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=A5=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=8A=E0=B8=B1?= =?UTF-8?q?=E0=B9=88=E0=B8=A7=E0=B8=84=E0=B8=A3=E0=B8=B2=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/registry/api.profile.ts | 1 + src/modules/08_registryEmployee/views/Main.vue | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/registry/api.profile.ts b/src/api/registry/api.profile.ts index 0e30e10d6..d3333d893 100644 --- a/src/api/registry/api.profile.ts +++ b/src/api/registry/api.profile.ts @@ -156,6 +156,7 @@ export default { `${profile}address/history/${profileId}`, searchProfileByOcId: (OcId: string, type: string) => `${profile}search/new/oc/${OcId}/${type}`, + searchProfileTemp: (type: string) => `${profile}search/new/oc/${type}`, profileAvatarId: (profileId: string) => `${profile}avatar/${profileId}`, profileAvatarHistoryId: (profileId: string) => diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 7f1bba964..e343d616c 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -231,7 +231,7 @@ { if (selected.value == null || selected.value == "") return; showLoader(); await http - .post(config.API.searchProfileByOcId(selected.value, "all"), { + .post(config.API.searchProfileTemp("all"), { criterias: cirteria, }) .then((res) => { @@ -1489,7 +1489,7 @@ const showEmployeeTempOrder = async () => { if (selected.value == null || selected.value == "") return; showLoader(); await http - .post(config.API.searchProfileByOcId(selected.value, "all"), { + .post(config.API.searchProfileTemp("all"), { criterias: cirteria, }) .then((res) => { From c8eb67ee2cebba453eddec839e8c2dea355954e7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 28 Jul 2023 14:42:43 +0700 Subject: [PATCH 008/113] FormEvaluateScore --- .../probation/FormEvaluation/FormEvaluate.vue | 15 +- .../FormEvaluation/FormEvaluateScore.vue | 494 ++++++++++++++++-- .../FormEvaluation/FormSaveResult.vue | 15 +- 3 files changed, 483 insertions(+), 41 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue index b78d8d0bf..54a5edc4c 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue @@ -448,7 +448,13 @@ const putformData = () => { 1.7 อื่นๆ - @@ -658,7 +664,12 @@ const putformData = () => {
2.4 อื่นๆ - +
-import { ref, defineAsyncComponent } from "vue"; +import { ref, defineAsyncComponent, computed } from "vue"; import { useQuasar } from "quasar"; import { useProbationDataStore } from "@/modules/05_placement/store"; import { useCounterMixin } from "@/stores/mixin"; @@ -60,9 +60,6 @@ const dateToday = ref(new Date("10-10-2023")); const dateEnd = ref(new Date("12-10-2023")); const period = ref(1); // part 1 -const knowledge_level = ref(0); -const skill_level = ref(0); -const competency_level = ref(0); const learn_level = ref(0); const apply_level = ref(0); const success_level = ref(0); @@ -74,39 +71,94 @@ const moral_level = ref([]); const discipline_level = ref([]); const etc2 = ref(false); // checkBox 2.4 const behavio_orther = ref([{ text: "", level: 0 }]); -const behavio_strength_desc = ref(""); -const behavio_inprove_desc = ref(""); + // part 3 -const orientation = ref(null); -const self_learning = ref(null); -const training_seminar = ref(null); -const other_training = ref(null); -//rules -const behavio_strengthRef = ref(null); -const behavio_strengthRules = [ - (val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลจุดเด่น", -]; -const behavio_inproveRef = ref(null); -const behavio_inproveRules = [ - (val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลสิ่งที่ควรปรับปรุง", -]; +const orientation = ref(null); +const self_learning = ref(null); +const training_seminar = ref(null); +const other_training = ref(null); +// footer +const Autherise = ref(null); +const dateAutherise = ref(new Date()); +const option = ref(["นาย ภูริณัฐ บุญขาว", "นาย พงศกร วรารักษ์"]); + +// score +const score1 = computed(() => { + if ( + etc.value === true && + achievement_other.value.text !== undefined && + achievement_other.value.level !== undefined + ) { + return ( + learn_level.value + + apply_level.value + + success_level.value + + achievement_other.value.level + ); + } + return learn_level.value + apply_level.value + success_level.value; +}); +const score2 = computed(() => { + let sum_conduct = conduct_level.value.reduce( + (sum: number, level: number) => sum + level, + 0 + ); + let sum_moral = moral_level.value.reduce( + (sum: number, level: number) => sum + level, + 0 + ); + let sum_discipline = discipline_level.value.reduce( + (sum: number, level: number) => sum + level, + 0 + ); + if ( + etc2.value === true && + behavio_orther.value.text !== undefined && + behavio_orther.value.level !== undefined + ) { + return ( + sum_conduct + sum_moral + sum_discipline + behavio_orther.value.level + ); + } else return sum_conduct + sum_moral + sum_discipline; +}); +const percent_score1: number = computed(() => { + let num = 0; + if (etc.value === true) { + num = 20; + } else num = 15; + let percent1 = (score1.value / num) * 100; + return percent1.toFixed(2); +}); +const percent_score2: number = computed(() => { + let num = 0; + if (etc2.value === true) { + num = 65; + } else num = 60; + let percent2 = (score2.value / num) * 100; + return percent2.toFixed(2); +}); +const percent_sum: any = computed(() => { + let sum = (Number(percent_score1.value) + Number(percent_score2.value)) / 2; + return sum.toFixed(2); +}); +const score4 = computed(() => { + return ( + Number(orientation.value) + + Number(self_learning.value) + + Number(training_seminar.value) + + Number(other_training.value) + ); +}); const savaForm = () => { let hasError = false; - behavio_strengthRef.value.validate(); - behavio_inproveRef.value.validate(); if ( - knowledge_level.value === 0 || - skill_level.value === 0 || - competency_level.value === 0 || learn_level.value === 0 || apply_level.value === 0 || success_level.value === 0 || conduct_level.value.length < 4 || moral_level.value.length < 3 || discipline_level.value.length < 5 || - behavio_strength_desc.value === "" || - behavio_inprove_desc.value === "" || orientation.value === null || self_learning.value === null || training_seminar.value === null @@ -133,9 +185,6 @@ const savaForm = () => { }; const putformData = () => { const data = { - knowledge_level: knowledge_level.value, - skill_level: skill_level.value, - competency_level: competency_level.value, learn_level: learn_level.value, apply_level: apply_level.value, success_level: success_level.value, @@ -153,12 +202,12 @@ const putformData = () => { discipline4_level: discipline_level.value[3], discipline5_level: discipline_level.value[4], behavio_orther: behavio_orther.value, - behavio_strength_desc: behavio_strength_desc.value, - behavio_inprove_desc: behavio_inprove_desc.value, orientation: Number(orientation.value), self_learning: Number(self_learning.value), training_seminar: Number(training_seminar.value), other_training: Number(other_training.value), + total_experiment: Number(score1.value), + total_behavior: Number(score2.value), }; $q.dialog({ title: "ยืนยันการบันทึกข้อมูล", @@ -331,7 +380,13 @@ const putformData = () => { 1.4 อื่นๆ - @@ -387,6 +442,24 @@ const putformData = () => { + + + + + คะแนนรวมผลสัมฤทธิ์ของการทดลองฯ + + + + + + + + +
@@ -541,7 +614,12 @@ const putformData = () => {
2.4 อื่นๆ - +
{ +
+ + + + + คะแนนรวมพฤติกรรมการปฎิบัติราชการ + + + + + + + + + +
- - +
3 + ผลการประเมิน +
+
+ + + + + + + 3.1. ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ + + + +
+
คะแนน
+
ร้อยละ
+
+
+ +
+
{{ score1 }}
+
{{ percent_score1 }}
+
+
+
+ + + ผ่าน(สูงกว่าร้อยละ 60) + + + ไม่ผ่าน(ต่ำกว่าร้อยละ 60) + +
+
+
+ + + + + + + 3.2. พฤติกรรมของผู้ทดลองปฏิบัติบัติหน้าที่ราชการ + + + +
+
คะแนน
+
ร้อยละ
+
+
+ +
+
{{ score2 }}
+
{{ percent_score2 }}
+
+
+
+ + + ผ่าน(สูงกว่าร้อยละ 60) + + + ไม่ผ่าน(ต่ำกว่าร้อยละ 60) + +
+
+
+ + + + + ผลคะแนนรวม + + + +
+
คะแนน
+
ร้อยละ
+
+
+ +
+
{{ score1 + score2 }}
+
{{ percent_sum }}
+
+
+
+ + + ผ่าน(สูงกว่าร้อยละ 60) + + + ไม่ผ่าน(ต่ำกว่าร้อยละ 60) + +
+
+
+
+ + +
+
+
+ 4 การพัฒนาผู้ทดลองปฏิบัติบัติหน้าที่ราชการ
+
+
+
+
คะแนน
+
ร้อยละ
+
+
- +
+
1. การปฐมนิเทศ
+
+ +
+
+ +
+
+ +
+
2. การเรียนรู้ด้วยตนเอง
+
+ +
+
+ +
+
+ +
+
3. การอบรมสัมนาร่วมกัน
+
+ +
+
+ +
+
+ +
+
+ 4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี) +
+
+ +
+
+ +
+
+ +
+ +
+
+
ผลคะแนนรวม
+
{{ score4 }}
+
ร้อยละ
+
+
+
+
+
+ ผู้บังคับบัญชาผู้มอบหมายงาน +
+
+ +
+ + + + + +
+
+
+ +
+ + + + + +
+
+
+ +
+ + + + + +
+
+
+
+ @@ -726,6 +1141,11 @@ const putformData = () => { \ No newline at end of file + From 8c1a5d9b23757235d4567fa53ee7dc395e55cd4b Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Thu, 3 Aug 2023 14:49:17 +0700 Subject: [PATCH 019/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=97?= =?UTF-8?q?=E0=B8=B5=E0=B9=88=E0=B8=AD=E0=B8=A2=E0=B8=B9=E0=B9=88=20?= =?UTF-8?q?=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B9=82=E0=B8=AD=E0=B8=99=20compon?= =?UTF-8?q?ent=20=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=99=E0=B8=9A=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=AA=E0=B9=88?= =?UTF-8?q?=E0=B8=A7=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/information/Address.vue | 875 ++++++++++ src/components/information/Certicate.vue | 830 +++++++++ src/components/information/Family.vue | 1514 +++++++++++++++++ src/components/information/Government.vue | 763 +++++++++ src/components/information/Image.vue | 365 ++++ src/components/information/Information.vue | 1129 ++++++++++++ .../information/interface/store/main.ts | 20 + src/components/information/store/store.ts | 70 + src/components/information/top.vue | 199 +++ .../03_recruiting/views/03_editor/index.vue | 4 +- .../components/Information/Address.vue | 6 +- .../04_registry/components/Profile.vue | 4 - .../PersonalDetail/Information/Address.vue | 6 +- .../components/Receive/receiveDetail.vue | 39 + .../components/Receive/receiveMain.vue | 46 +- src/modules/05_placement/router.ts | 13 + .../views/Information/Address.vue | 6 +- 17 files changed, 5864 insertions(+), 25 deletions(-) create mode 100644 src/components/information/Address.vue create mode 100644 src/components/information/Certicate.vue create mode 100644 src/components/information/Family.vue create mode 100644 src/components/information/Government.vue create mode 100644 src/components/information/Image.vue create mode 100644 src/components/information/Information.vue create mode 100644 src/components/information/interface/store/main.ts create mode 100644 src/components/information/store/store.ts create mode 100644 src/components/information/top.vue create mode 100644 src/modules/05_placement/components/Receive/receiveDetail.vue diff --git a/src/components/information/Address.vue b/src/components/information/Address.vue new file mode 100644 index 000000000..8881a3505 --- /dev/null +++ b/src/components/information/Address.vue @@ -0,0 +1,875 @@ + + diff --git a/src/components/information/Certicate.vue b/src/components/information/Certicate.vue new file mode 100644 index 000000000..d08e8c3b2 --- /dev/null +++ b/src/components/information/Certicate.vue @@ -0,0 +1,830 @@ + + + + diff --git a/src/components/information/Family.vue b/src/components/information/Family.vue new file mode 100644 index 000000000..8b9eaf90c --- /dev/null +++ b/src/components/information/Family.vue @@ -0,0 +1,1514 @@ + + diff --git a/src/components/information/Government.vue b/src/components/information/Government.vue new file mode 100644 index 000000000..35d6fca2a --- /dev/null +++ b/src/components/information/Government.vue @@ -0,0 +1,763 @@ + + diff --git a/src/components/information/Image.vue b/src/components/information/Image.vue new file mode 100644 index 000000000..30efcc2a7 --- /dev/null +++ b/src/components/information/Image.vue @@ -0,0 +1,365 @@ + + + diff --git a/src/components/information/Information.vue b/src/components/information/Information.vue new file mode 100644 index 000000000..1acf5f85d --- /dev/null +++ b/src/components/information/Information.vue @@ -0,0 +1,1129 @@ + + diff --git a/src/components/information/interface/store/main.ts b/src/components/information/interface/store/main.ts new file mode 100644 index 000000000..7c31dd81c --- /dev/null +++ b/src/components/information/interface/store/main.ts @@ -0,0 +1,20 @@ +interface Profile { + main: { columns: String[] }; + education: { columns: String[] }; + oldName: { columns: String[] }; + certicate: { columns: String[] }; + train: { columns: String[] }; + insignia: { columns: String[] }; + coined: { columns: String[] }; + assessment: { columns: String[] }; + salary: { columns: String[] }; + discipline: { columns: String[] }; + leave: { columns: String[] }; + talent: { columns: String[] }; + work: { columns: String[] }; + record: { columns: String[] }; + other: { columns: String[] }; + document: { columns: String[] }; +} + +export type { Profile }; diff --git a/src/components/information/store/store.ts b/src/components/information/store/store.ts new file mode 100644 index 000000000..7c30f2495 --- /dev/null +++ b/src/components/information/store/store.ts @@ -0,0 +1,70 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; +import type { Profile } from "@/components/information/interface/store/main"; + +export const useComponentProfileDataStore = defineStore( + "componentProfile", + () => { + const profile = "profile"; + const birthDate = ref(new Date()); + const retireText = ref(null); + const profileData = ref({ + main: { columns: [] }, + education: { columns: [] }, + oldName: { columns: [] }, + certicate: { columns: [] }, + train: { columns: [] }, + insignia: { columns: [] }, + coined: { columns: [] }, + assessment: { columns: [] }, + salary: { columns: [] }, + discipline: { columns: [] }, + leave: { columns: [] }, + talent: { columns: [] }, + work: { columns: [] }, + record: { columns: [] }, + other: { columns: [] }, + document: { columns: [] }, + }); + + const changeRetireText = (val: string | null) => { + retireText.value = val; + }; + const changeBirth = (val: Date) => { + birthDate.value = val; + }; + + const changeProfileColumns = (system: String, val: String[]) => { + if (system == "main") profileData.value.main.columns = val; + if (system == "education") profileData.value.education.columns = val; + if (system == "oldName") profileData.value.oldName.columns = val; + if (system == "certicate") profileData.value.certicate.columns = val; + if (system == "train") profileData.value.train.columns = val; + if (system == "insignia") profileData.value.insignia.columns = val; + if (system == "coined") profileData.value.coined.columns = val; + if (system == "assessment") profileData.value.assessment.columns = val; + if (system == "salary") profileData.value.salary.columns = val; + if (system == "discipline") profileData.value.discipline.columns = val; + if (system == "leave") profileData.value.leave.columns = val; + if (system == "talent") profileData.value.talent.columns = val; + if (system == "work") profileData.value.work.columns = val; + if (system == "record") profileData.value.record.columns = val; + if (system == "other") profileData.value.other.columns = val; + if (system == "document") profileData.value.document.columns = val; + localStorage.setItem(profile, JSON.stringify(profileData.value)); + }; + + if (localStorage.getItem(profile) !== null) { + profileData.value = JSON.parse(localStorage.getItem(profile) || "{}"); + } + + return { + profileData, + changeProfileColumns, + birthDate, + changeBirth, + retireText, + changeRetireText, + }; + } +); diff --git a/src/components/information/top.vue b/src/components/information/top.vue new file mode 100644 index 000000000..416a8f049 --- /dev/null +++ b/src/components/information/top.vue @@ -0,0 +1,199 @@ + + + diff --git a/src/modules/03_recruiting/views/03_editor/index.vue b/src/modules/03_recruiting/views/03_editor/index.vue index 8f372fe5e..2e52b3840 100644 --- a/src/modules/03_recruiting/views/03_editor/index.vue +++ b/src/modules/03_recruiting/views/03_editor/index.vue @@ -1062,7 +1062,7 @@ const fetchProvince = async () => { }; const fetchDistrict = async (id: string | null) => { - if (id !== null) { + if (id !== null && id != "") { loaderPage(true); await http .get(config.API.listDistrict(id)) @@ -1084,7 +1084,7 @@ const fetchDistrict = async (id: string | null) => { }; const fetchSubDistrict = async (id: string | null) => { - if (id !== null) { + if (id !== null && id != "") { loaderPage(true); await http .get(config.API.listSubDistrict(id)) diff --git a/src/modules/04_registry/components/Information/Address.vue b/src/modules/04_registry/components/Information/Address.vue index 8b8ffbf67..8881a3505 100644 --- a/src/modules/04_registry/components/Information/Address.vue +++ b/src/modules/04_registry/components/Information/Address.vue @@ -626,8 +626,6 @@ const getNewData = async () => { await fetchDistrict(addressData.value.provinceIdC, "2"); await fetchSubDistrict(addressData.value.districtId, "1"); await fetchSubDistrict(addressData.value.districtIdC, "2"); - await selectSubDistrict(addressData.value.subdistrictId, "1"); - await selectSubDistrict(addressData.value.subdistrictIdC, "2"); }; const fetchData = async () => { @@ -797,7 +795,7 @@ const fetchProvince = async () => { }; const fetchDistrict = async (id: string | null, position: string) => { - if (id != null) { + if (id != null && id != "") { loaderPage(true); await http .get(config.API.listDistrict(id)) @@ -825,7 +823,7 @@ const fetchDistrict = async (id: string | null, position: string) => { }; const fetchSubDistrict = async (id: string | null, position: string) => { - if (id != null) { + if (id != null && id != "") { loaderPage(true); await http .get(config.API.listSubDistrict(id)) diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index c56a812f0..c9db6d816 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -155,10 +155,6 @@ - - diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue index 00c482ab1..ce83dfee2 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue @@ -123,8 +123,6 @@ const getNewData = async () => { await fetchDistrict(addressData.value.currentProvinceId, "2"); await fetchSubDistrict(addressData.value.registDistrictId, "1"); await fetchSubDistrict(addressData.value.currentDistrictId, "2"); - await selectSubDistrict(addressData.value.registSubDistrictId, "1"); - await selectSubDistrict(addressData.value.currentSubDistrictId, "2"); }; const editData = async () => { @@ -247,7 +245,7 @@ const fetchProvince = async () => { }; const fetchDistrict = async (id: string | null, position: string) => { - if (id != null) { + if (id != null && id != "") { showLoader(); await http .get(config.API.listDistrict(id)) @@ -275,7 +273,7 @@ const fetchDistrict = async (id: string | null, position: string) => { }; const fetchSubDistrict = async (id: string | null, position: string) => { - if (id != null) { + if (id != null && id != "") { showLoader(); await http .get(config.API.listSubDistrict(id)) diff --git a/src/modules/05_placement/components/Receive/receiveDetail.vue b/src/modules/05_placement/components/Receive/receiveDetail.vue new file mode 100644 index 000000000..534e2c65b --- /dev/null +++ b/src/modules/05_placement/components/Receive/receiveDetail.vue @@ -0,0 +1,39 @@ + + + +> diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 9dd3924d4..007a3b7e8 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -292,6 +292,10 @@ const closeModalTree = async () => { // await getTable(); modalTree.value = false; }; + +const nextPage = (id: string) => { + router.push(`/receive/${id}`); +}; - + From fef7c21fcd2125cfa1e6751d0f3d346388b74a37 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 4 Aug 2023 15:12:23 +0700 Subject: [PATCH 033/113] =?UTF-8?q?fix=20api=20=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20&=20se?= =?UTF-8?q?t=20value=20step=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 4 +- .../OrderPlacement/MainOrderPlacement.vue | 2 +- .../components/OrderPlacement/step/step01.vue | 342 +++++------------- 3 files changed, 89 insertions(+), 259 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index c2159003a..94259b628 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -54,8 +54,10 @@ export default { // order yearOptionsOrder: () => `${order}/order/fiscal-year`, + createOrder: () => `${order}/order/detail`, listOrder: () => `${order}/order`, - detailOrder:(orderId:string) => `${order}/order/${orderId}`, + detailOrder:(orderId:string) => `${order}/order/detail/${orderId}`, + deleteOrder:(orderId:string) => `${order}/order/${orderId}`, typeOrder: () => `${order}/order/order-type`, examroundOrder: () => `${order}/order/detail/exam-round`, }; diff --git a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue index 8d0e90c74..ea465c3e6 100644 --- a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue @@ -423,7 +423,7 @@ const clickDelete = (id: string) => { const deleteData = async (id: string) => { showLoader(); await http - .delete(config.API.detailOrder(id)) + .delete(config.API.deleteOrder(id)) .then((res) => { success($q, "ลบข้อมูลสำเร็จ"); }) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step01.vue b/src/modules/05_placement/components/OrderPlacement/step/step01.vue index 526d9a895..300a25878 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step01.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step01.vue @@ -3,24 +3,10 @@
- + @@ -29,73 +15,36 @@
- +
- +
- +
- +
- + @@ -103,24 +52,12 @@ {{ parseInt(value + 543) }} diff --git a/src/modules/07_insignia/components/1_Proposals/listProposals.vue b/src/modules/07_insignia/components/1_Proposals/listProposals.vue index 1969ecb05..6cdff4beb 100644 --- a/src/modules/07_insignia/components/1_Proposals/listProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/listProposals.vue @@ -171,12 +171,29 @@ + diff --git a/src/modules/05_placement/components/Receive/information.vue b/src/modules/05_placement/components/Receive/information.vue new file mode 100644 index 000000000..92166e018 --- /dev/null +++ b/src/modules/05_placement/components/Receive/information.vue @@ -0,0 +1,1138 @@ + + diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 7dc840540..675cd159f 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -6,6 +6,17 @@ import { useRouter } from "vue-router"; import DialogFooter from "@/modules/05_placement/components/Receive/DialogFooter.vue"; import DialogHeader from "@/modules/05_placement/components/Receive/DialogHeader.vue"; import DialogOrgTree from "@/modules/05_placement/components/Receive/receiveModal.vue"; +import { useCounterMixin } from "@/stores/mixin"; +import { config } from "@fullcalendar/core/internal"; +import http from "@/plugins/http"; +const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง +const { + showLoader, + hideLoader, + dateText, + success, + messageError +} = mixin; const selected = ref([]); const checkSelected = computed(() => { @@ -13,6 +24,11 @@ const checkSelected = computed(() => { return true; } }); + +const add = () => { + router.push(`/receive/add`); +}; + const clickClose = () => { modal.value = false; }; @@ -29,21 +45,18 @@ const personal = ref([]); const personalId = ref(""); const visibleColumns = ref([ "no", + "citizenId", "fullname", - "position", - "positionLevel", - "oc", - "agency", - "status", + "organizationName", + "birthday" ]); + const visibleColumns2 = ref([ "no", + "citizenId", "fullname", - "position", - "positionLevel", - "oc", - "agency", - "status", + "organizationName", + "birthday" ]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง const filterKeyword = ref(""); const filterKeyword2 = ref(""); @@ -60,95 +73,49 @@ const resetFilter = () => { const rows = ref([ { personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1", + citizenId: "1234444332222", fullname: "นางสาวอย พชช", - position: "นักบริหาร", - positionLevel: "ต้น", - oc: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", - agency: "กลุ่มงานกุมารเวชกรรม", - status: "รออนุมัติ", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1989-09-03")) }, { personalId: "08db721d-adf2-4842-8056-1abb1539356e", + citizenId: "0000222333333", fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-ae3d-4b8c-8cf0-b86b5a2ed8bb", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-afde-4ed4-8bc6-f0ad83e61c4d", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-b24e-45d7-8a65-3f28ef4948a4", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1990-09-03")), }, ]); const rows2 = ref([ - { - personalId: "0a846508-4932-40de-9a9e-5b519492217c", - fullname: "นางสาวอย พชช", - position: "นักบริหาร", - positionLevel: "ต้น", - oc: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", - agency: "กลุ่มงานกุมารเวชกรรม", - status: "รออนุมัติ", - }, { personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", + citizenId: "1234444332222", + fullname: "นางสาวอย พชช", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1989-09-03")), }, { personalId: "08db721d-adf2-4842-8056-1abb1539356e", + citizenId: "0000222333333", fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-adff-47b0-8762-41cd5c991001", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-ae22-424d-8f4a-87ba30cc3ee7", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1990-09-03")), }, ]); const columns = ref([ @@ -161,6 +128,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "citizenId", + align: "left", + label: "เลขประจำตัวประชาชน", + sortable: true, + field: "fullname", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "fullname", align: "left", @@ -171,47 +147,22 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "position", - align: "left", - label: "ตำแหน่งในสายงาน", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "positionLevel", - align: "left", - label: "ระดับ", - sortable: true, - field: "positionLevel", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "oc", - align: "left", - label: "สังกัด", - sortable: true, - field: "oc", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "agency", + name: "organizationName", align: "left", label: "หน่วยงานที่รับโอน", sortable: true, - field: "agency", + field: "organizationName", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "status", + name: "birthday", align: "left", - label: "สถานะ", + label: "วัน/เดือน/ปี เกิด", sortable: true, - field: "status", + field: "birthday", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -226,6 +177,15 @@ const columns2 = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "citizenId", + align: "left", + label: "เลขประจำตัวประชาชน", + sortable: true, + field: "fullname", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "fullname", align: "left", @@ -236,47 +196,22 @@ const columns2 = ref([ style: "font-size: 14px", }, { - name: "position", + name: "organizationName", align: "left", - label: "ตำแหน่งในสายงาน", + label: "หน่วยงานที่รับโอน", sortable: true, - field: "position", + field: "organizationName", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "positionLevel", + name: "birthday", align: "left", - label: "ระดับ", + label: "วัน/เดือน/ปี เกิด", sortable: true, - field: "positionLevel", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "oc", - align: "left", - label: "สังกัด", - sortable: true, - field: "oc", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "agency", - align: "left", - label: "หน่วยงานที่ขอโอนไป", - sortable: true, - field: "agency", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "status", - align: "left", - label: "สถานะ", - sortable: true, - field: "status", + field: "birthday", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -288,6 +223,33 @@ const openModalTree = (id: string) => { modalTree.value = true; }; +const openDelete = (id: string) => { + $q.dialog({ + title: `ลบข้อมูล`, + message: `ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`, + cancel: "ยกเลิก", + ok: "ยืนยัน", + persistent: true, + }) + .onOk(async () => { + showLoader(); + await http + .delete(config.API.receiveData(id)) + .then((res) => { + success($q, "ลบข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); + }) + .onCancel(() => { + + }); +}; + const closeModalTree = async () => { // await getTable(); modalTree.value = false; @@ -306,64 +268,31 @@ const nextPage = (row: any) => {
- + + เพิ่มข้อมูล + + + ส่งไปออกคำสั่งรับโอน - + - +
- +
@@ -502,19 +578,46 @@ const paginationLabel = (start: number, end: number, total: number) => { - กรอกเหตุผล + กรอกเหตุผล - + - + - + + diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index bb5a3c6bf..6b92458fa 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -22,8 +22,8 @@ export default [ }, }, { - path: "/retirement/list/:type/:year", - name: "retirement/list/", + path: "/retirement/:retirementId", + name: "retirementid", component: Listretirement, meta: { Auth: true, diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 335f4f591..5f5a24245 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -175,6 +175,93 @@
+ + + + +
เพิ่มประกาศ
+
+ + + เลือกประกาศที่ต้องการเพิ่มข้อมูล + + +
+ + + + + + + ประกาศเพิ่มผู้เกษียณ + + + + + + + + + ประกาศแก้ไขข้อมูลผู้เกษียน + + + + + + + + + + + + ประกาศยกเลิกผู้เกษียณ + + + + + +
+ + + + + + +
+
@@ -447,6 +590,9 @@ watch(type, () => { .filter-card { background-color: #f1f1f1b0; } +.q-item-custom { + padding: 0; +} .toggle-expired-account { font-size: 12px; From c21a95f486604eeaea467ac433a68f8b7832e4a3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 7 Aug 2023 13:17:59 +0700 Subject: [PATCH 039/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20retirement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/06_retirement/api.retirement.ts | 2 +- .../components/ListRetirement/TableList.vue | 9 +++++---- src/modules/06_retirement/views/Main.vue | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/api/06_retirement/api.retirement.ts b/src/api/06_retirement/api.retirement.ts index 6f9b42c5a..698f2cb82 100644 --- a/src/api/06_retirement/api.retirement.ts +++ b/src/api/06_retirement/api.retirement.ts @@ -4,7 +4,7 @@ const retirement = `${env.API_URI}/retirement` export default { profile: (type: string, year: string) => `${retirement}/profile/${type}/${year}`, - // profileRetire: (retireProfileId: string) => `${retirement}/profile/${retireProfileId}`, + profileRetire: (retireProfileId: string) => `${retirement}/profile/${retireProfileId}`, listRetire: (retireId: string) => `${retirement}/${retireId}`, createnote: () => `${retirement}/edit`, removeProfile: () => `${retirement}/remove`, diff --git a/src/modules/06_retirement/components/ListRetirement/TableList.vue b/src/modules/06_retirement/components/ListRetirement/TableList.vue index 740e7ad9e..f8c7f6949 100644 --- a/src/modules/06_retirement/components/ListRetirement/TableList.vue +++ b/src/modules/06_retirement/components/ListRetirement/TableList.vue @@ -463,6 +463,7 @@ const paginationLabel = (start: number, end: number, total: number) => { :props="props" class="cursor-pointer" :style="props.row.profileId === profileId && 'color: #26a69a;'" + @click.stop="router.push(`/registry/${props.row.profileId}`)" > {{ props.row.order }} @@ -511,7 +512,7 @@ const paginationLabel = (start: number, end: number, total: number) => { > โน้ต --> - { @click.stop="router.push(`/registry/${props.row.profileId}`)" > ดูข้อมูลทะเบียนประวัติ - + --> { (modalNote = true), (note = props.row.reason), (action = 'edit'), - (retireProfileId = props.row.profileId) + (retireProfileId = props.row.id) " > กรอกเหตุผล @@ -550,7 +551,7 @@ const paginationLabel = (start: number, end: number, total: number) => { (modalNote = true), (action = 'delete'), (note = props.row.remove), - (retireProfileId = props.row.profileId) + (retireProfileId = props.row.id) " >ลบข้อมูล diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 5f5a24245..304a9bb3a 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -125,7 +125,7 @@ {{ col.label }} - + diff --git a/src/modules/05_placement/components/Receive/receiveModal.vue b/src/modules/05_placement/components/Receive/receiveModal.vue index 4f9f42fcb..fab7859b7 100644 --- a/src/modules/05_placement/components/Receive/receiveModal.vue +++ b/src/modules/05_placement/components/Receive/receiveModal.vue @@ -153,20 +153,23 @@ const validateData = async () => { } }); }; - +const id = ref(""); const saveAppoint = async () => { console.log("save", dataForm); myFormPosition.value.validate().then(async (result: boolean) => { + if (props.personalId !== undefined) { + id.value = props.personalId.toString(); + } if (result) { const dataAppoint = await { - personalId: props.personalId, - containDate: dataForm.containDate, + // personalId: props.personalId, + recruitDate: dataForm.containDate, posNoId: dataForm.posNoId, positionId: dataForm.positionId, positionLevelId: dataForm.positionLevelId, positionLineId: dataForm.positionLineId, - positionPathSideId: dataForm.positionPathSideId, + positionPathSideId: null, positionTypeId: dataForm.positionTypeId, // salaryAmount: dataForm.salaryAmount, // mouthSalaryAmount: dataForm.mouthSalaryAmount, @@ -175,7 +178,7 @@ const saveAppoint = async () => { console.log("save appoint===>", dataAppoint); showLoader(); await http - .post(config.API.placementPass(), dataAppoint) + .put(config.API.receivePosition(id.value), dataAppoint) .then((res) => { console.log("respone=>", res); success($q, "บันทึกสำเร็จ"); diff --git a/src/modules/06_retirement/components/ListRetirement/TableList.vue b/src/modules/06_retirement/components/ListRetirement/TableList.vue index 5f6061fee..3250e6e11 100644 --- a/src/modules/06_retirement/components/ListRetirement/TableList.vue +++ b/src/modules/06_retirement/components/ListRetirement/TableList.vue @@ -362,7 +362,7 @@ const paginationLabel = (start: number, end: number, total: number) => { :profile-id="profileId" :UpdateListId="UpdateListId" v-if=" - statusReport !== true || typeReport == 'ADD' || typeReport == '' + statusReport !== true && typeReport == 'ADD' || typeReport == '' " /> @@ -459,11 +459,11 @@ const paginationLabel = (start: number, end: number, total: number) => { @@ -535,7 +535,7 @@ const paginationLabel = (start: number, end: number, total: number) => { { Date: Mon, 7 Aug 2023 16:53:51 +0700 Subject: [PATCH 042/113] =?UTF-8?q?=E0=B8=A5=E0=B8=9A=E0=B8=82=E0=B9=89?= =?UTF-8?q?=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B8=95=E0=B8=B3=E0=B9=81?= =?UTF-8?q?=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87=E0=B8=A3=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B8=AA=E0=B8=A1=E0=B8=B1=E0=B8=84=E0=B8=A3=E0=B9=83=E0=B8=99?= =?UTF-8?q?=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=9F=E0=B8=AD=E0=B8=A3?= =?UTF-8?q?=E0=B9=8C=E0=B8=A1=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_placement/components/OrderPlacement/step/step01.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step01.vue b/src/modules/05_placement/components/OrderPlacement/step/step01.vue index eeddc482b..1377ba208 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step01.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step01.vue @@ -101,10 +101,10 @@ ) " -->
- + :options="positionOption" option-value="id" use-input input-debounce="0" /> -->
@@ -366,7 +366,7 @@ const fetchdetailOrder = async () => { nameCommand.value = data.signatoryBy; positionCommand.value = data.signatoryPosition; examRound.value = data.examRound; - position.value = data.registerPosition; + // position.value = data.registerPosition; register.value = data.conclusionRegisterNo; dateRegister.value = data.conclusionRegisterDate; announce.value = data.conclusionResultNo; From 07ae0d4a5e750a4e505976c37639bce5913f9aef Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 7 Aug 2023 17:11:33 +0700 Subject: [PATCH 043/113] =?UTF-8?q?api=20=E0=B8=A3=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B9=82=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_placement/components/Receive/receiveMain.vue | 7 ++++++- .../05_placement/components/Receive/receiveModal.vue | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 7adf079fe..d01dbf801 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -64,17 +64,22 @@ const resetFilter = () => { onMounted(() => { fecthlistRecevice(); }); +const listRecevice = ref([]); const fecthlistRecevice = async () => { showLoader(); await http .get(config.API.receiveData()) .then((res) => { let response = res.data.result; + listRecevice.value = response; console.log(response); rows.value = response.map((e: any) => ({ personalId: e.id, citizenId: e.citizenId, fullname: e.firstname + " " + e.lastname, + organizationName: "sssss", + orgName: "xxaxa", + organizationShortName: "ssss", positionNumber: e.positionNumber, positionPath: e.positionPath, birthday: date2Thai(e.dateOfBirth), @@ -207,7 +212,7 @@ const openModalTree = (id: string) => { personalId.value = id; console.log(personalId.value); - personal.value = []; + personal.value = listRecevice.value.filter((e) => e.id === id); modalTree.value = true; }; diff --git a/src/modules/05_placement/components/Receive/receiveModal.vue b/src/modules/05_placement/components/Receive/receiveModal.vue index fab7859b7..89208163a 100644 --- a/src/modules/05_placement/components/Receive/receiveModal.vue +++ b/src/modules/05_placement/components/Receive/receiveModal.vue @@ -169,7 +169,7 @@ const saveAppoint = async () => { positionId: dataForm.positionId, positionLevelId: dataForm.positionLevelId, positionLineId: dataForm.positionLineId, - positionPathSideId: null, + positionPathSideId: dataForm.positionPathSideId, positionTypeId: dataForm.positionTypeId, // salaryAmount: dataForm.salaryAmount, // mouthSalaryAmount: dataForm.mouthSalaryAmount, @@ -377,6 +377,8 @@ const expanded = ref([]); watch(props, () => { expanded.value = []; const dataPersonal = props.personal; + console.log(props.personal); + if (dataPersonal) { dataPersonal.map((data: any) => { personal.value = data; @@ -385,15 +387,15 @@ watch(props, () => { } // console.log("draft===>", personal.value.draft); - if (personal.value && personal.value.draft === false) { + if (personal.value) { // const findData = dataRespone.value.find(findByPerson); let findData: any = null; dataRespone.value.map((x: any) => { findData = findByPerson(x); - console.log(findData); + // console.log(findData); if (findData != null) { - console.log("findData===>", findData); + // console.log("findData===>", findData); selectedPosition(findData); for (let i = 3; i <= findData.keyId.length; i += 2) { expanded.value.push(findData.keyId.slice(0, i)); From e731d12fd92aacf152af71a39da05389e2329a4f Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 7 Aug 2023 17:18:18 +0700 Subject: [PATCH 044/113] no message --- src/modules/05_placement/components/Receive/receiveMain.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index d01dbf801..8156fb8af 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -245,7 +245,7 @@ const openDelete = (id: string) => { }; const closeModalTree = async () => { - // await getTable(); + await fecthlistRecevice(); modalTree.value = false; }; From d5ee366ea25c7bbe0dd56333a9557296203a5604 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Mon, 7 Aug 2023 17:40:57 +0700 Subject: [PATCH 045/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20condition?= =?UTF-8?q?=20=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=20action=20=E0=B8=95?= =?UTF-8?q?=E0=B9=88=E0=B8=B2=E0=B8=87=E0=B9=86=20=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=81=E0=B8=A9=E0=B8=B5=E0=B8=A2=E0=B8=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ListRetirement/TableList.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/06_retirement/components/ListRetirement/TableList.vue b/src/modules/06_retirement/components/ListRetirement/TableList.vue index 3250e6e11..0c32115ec 100644 --- a/src/modules/06_retirement/components/ListRetirement/TableList.vue +++ b/src/modules/06_retirement/components/ListRetirement/TableList.vue @@ -362,7 +362,7 @@ const paginationLabel = (start: number, end: number, total: number) => { :profile-id="profileId" :UpdateListId="UpdateListId" v-if=" - statusReport !== true && typeReport == 'ADD' || typeReport == '' + statusReport === false && (typeReport == 'ADD' || typeReport == '' || typeReport == null) " /> @@ -459,11 +459,11 @@ const paginationLabel = (start: number, end: number, total: number) => { @@ -535,7 +535,7 @@ const paginationLabel = (start: number, end: number, total: number) => { { Date: Mon, 7 Aug 2023 18:07:32 +0700 Subject: [PATCH 046/113] =?UTF-8?q?=E0=B8=84=E0=B9=89=E0=B8=B2=E0=B8=87=20?= =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=E0=B9=80=E0=B8=95=E0=B8=AD=E0=B8=A3?= =?UTF-8?q?=E0=B9=8C=203.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/probation/FormAssign.vue | 888 +++++++----------- 1 file changed, 328 insertions(+), 560 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index 895acb766..e719eea9b 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -283,17 +283,22 @@
-
+
-
+
{{ item.description }}
@@ -365,11 +372,11 @@ class="row bg-grey-2 q-py-xs borderCheck" >
-
+
{{ item.description }}
-
+
+
diff --git a/src/modules/05_placement/interface/request/Order.ts b/src/modules/05_placement/interface/request/Order.ts new file mode 100644 index 000000000..d7e306c25 --- /dev/null +++ b/src/modules/05_placement/interface/request/Order.ts @@ -0,0 +1,7 @@ +interface RequestCopyOrder { + personalId: string; + emailChannel: boolean; + inboxChannel: boolean; +} + +export type { RequestCopyOrder }; diff --git a/src/modules/05_placement/interface/response/Order.ts b/src/modules/05_placement/interface/response/Order.ts new file mode 100644 index 000000000..6dc958ff1 --- /dev/null +++ b/src/modules/05_placement/interface/response/Order.ts @@ -0,0 +1,43 @@ +interface ResponseData { + education: string; + idCard: string; + name: string; + personId: string; + selectStatus: boolean; + sequence: number; +} + +interface ResponseOrganiz { + firstName: string; + idCard: string; + lastName: string; + name: string; + position: string; + prefixId: string; + profileId: string; + unit: string; +} + +interface ResponseCopyOrder { + emailChannel: boolean; + idCard: string; + inboxChannel: boolean; + name: string; + personalId: string; + position: string; + selectStatus: boolean; + sequence: number; + unit: string; +} + +interface DataCopyOrder { + personalId: string; + name: string; + idCard: string; + position: string; + unit: string; + send: string; + mutiselect: number[]; +} + +export type { ResponseData, ResponseOrganiz, ResponseCopyOrder, DataCopyOrder }; diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index 0fca902c5..0ebbda72f 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -229,8 +229,6 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => { ) => { DataMainUpdateOrder.value = []; - - if (filter_1 === "" && filter_2 === "" && filterYear === 0) { DataMainUpdateOrder.value = DataMainOrigOrder.value; } else if (filter_1 !== "" && filter_2 === "" && filterYear === 0) { @@ -269,7 +267,11 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => { item.OrderStatus === filter_2 && item.fiscalYear === filterYear ); - } else if (filter_1 == "ทั้งหมด" && filter_2 == "ทั้งหมด" && filterYear !== null) { + } else if ( + filter_1 == "ทั้งหมด" && + filter_2 == "ทั้งหมด" && + filterYear !== null + ) { DataMainUpdateOrder.value = DataMainOrigOrder.value; } }; @@ -294,8 +296,18 @@ export const useProbationDataStore = defineStore("probationDataStore", () => { "blue-9", "blue-10", ]); + const orderId = ref(""); + + const stepOrder = ref(2); + + const setOrderId = (val: string) => (orderId.value = val); + const setStepOrder = (val: number) => (stepOrder.value = val); return { ratingColors, + orderId, + stepOrder, + setOrderId, + setStepOrder, }; }); From eaec5470c46d3632ef37044b17249b032235d696 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 8 Aug 2023 09:09:44 +0700 Subject: [PATCH 051/113] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20disabled=20button=20=E0=B8=95=E0=B8=81=E0=B8=A5?= =?UTF-8?q?=E0=B8=87=20=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=81=E0=B8=B2=E0=B8=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/06_retirement/views/Main.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 359536720..1edcb1b45 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -263,7 +263,12 @@ - + From 85632ec16cdcef1f883415ea507855b65740c413 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 8 Aug 2023 09:28:24 +0700 Subject: [PATCH 052/113] =?UTF-8?q?filter=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Receive/receiveMain.vue | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 816fd8e71..98c75f741 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -72,25 +72,27 @@ const fecthlistRecevice = async () => { .then((res) => { let response = res.data.result; listRecevice.value = response; - console.log(response); + // console.log(response); rows.value = response.map((e: any) => ({ personalId: e.id, citizenId: e.citizenId, fullname: e.firstname + " " + e.lastname, organizationName: - e.organizationName + - " " + - e.organizationShortName + - " " + - e.positionNumber + - " " + - e.positionPath, - orgName: e.organizationName, - organizationShortName: e.organizationShortName, + e.organizationName + + " " + + e.organizationShortName + + " " + + e.positionNumber + + " " + + e.positionPath, + orgName: e.organizationName, + organizationShortName: e.organizationShortName, positionNumber: e.positionNumber, positionPath: e.positionPath, birthday: date2Thai(e.dateOfBirth), })); + // console.log(rows.value); + rows2.value = rows.value.filter((e: any) => e.orgName !== null); }) .catch((e) => { console.log(typeof e); @@ -116,6 +118,19 @@ const rows = ref([ // birthday: dateText(new Date("1989-09-03")), // }, ]); +const rows2 = ref([ + { + personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1", + citizenId: "1234444332222", + fullname: "นางสาวอย พชช", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1989-09-03")), + }, +]); const columns = ref([ { name: "no", @@ -219,7 +234,7 @@ const openModalTree = (id: string) => { personalId.value = id; console.log(personalId.value); - personal.value = listRecevice.value.filter((e) => e.id === id); + personal.value = listRecevice.value.filter((e: any) => e.id === id); modalTree.value = true; }; From ddfb5a05d507c5429172a034d89c345b0865e7b2 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Tue, 8 Aug 2023 11:15:34 +0700 Subject: [PATCH 053/113] fix finally --- tsconfig.app.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.app.json b/tsconfig.app.json index cdbea1d76..a4299392b 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -7,6 +7,7 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"] - } + }, + "lib": ["dom", "es2015", "es2018", "es2018.promise"] } } From dc2457d9ed458bd43c7da884df828acab63634e7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 8 Aug 2023 11:25:44 +0700 Subject: [PATCH 054/113] api put/pver --- src/api/05_placement/api.placement.ts | 3 +- .../OrderPlacement/detailOrderPlacement.vue | 36 ++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 8a3f5e8ed..fd13782a1 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -60,6 +60,8 @@ export default { detailOrder: (orderId: string) => `${order}/order/detail/${orderId}`, deleteOrder: (orderId: string) => `${order}/order/${orderId}`, typeOrder: () => `${order}/order/order-type`, + nextStep: (orderId: string) => `${order}/order/next/${orderId}`, + prevStep: (orderId: string) => `${order}/order/prev/${orderId}`, createOrder: () => `${order}/order/detail`, @@ -93,7 +95,6 @@ export default { attachmentOrderId: (orderId: string) => `${order}/order/attachment/order-file/${orderId}`, - attachmentFileId: (orderId: string) => `${order}/order/attachment/file/${orderId}`, diff --git a/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue index 8b68a05df..6188a047a 100644 --- a/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue @@ -65,7 +65,12 @@ import { useRouter } from "vue-router"; import { ref, defineAsyncComponent, onMounted, onUnmounted } from "vue"; import type { QStepper } from "quasar"; import { useProbationDataStore } from "@/modules/05_placement/store"; +import { useRoute } from "vue-router"; +import http from "@/plugins/http"; +import config from "@/app.config"; +const route = useRoute(); +const orderId_params = route.params.orderid; const probationData = useProbationDataStore(); const { stepOrder, setStepOrder } = probationData; @@ -89,19 +94,38 @@ const step04 = defineAsyncComponent( const router = useRouter(); const step = ref(1); const stepper = ref(); +const orderId = ref(""); onUnmounted(() => { destroyLocalStorage(); }); - -const nextStep = () => { +const nextStep = async () => { stepper.value!.next(); localStorage.setItem("currentStep", step.value.toString()); + if (orderId.value) { + await http + .put(config.API.nextStep(orderId.value)) + .then((res) => { + console.log(res); + }) + .catch((e) => { + console.log(e); + }); + } }; - -const previousStep = () => { +const previousStep = async () => { stepper.value!.previous(); localStorage.setItem("currentStep", step.value.toString()); + if (orderId.value) { + await http + .put(config.API.prevStep(orderId.value)) + .then((res) => { + console.log(res); + }) + .catch((e) => { + console.log(e); + }); + } }; const destroyLocalStorage = () => { localStorage.clear(); @@ -111,6 +135,10 @@ onMounted(() => { if (currentStep) { step.value = Number(currentStep); } + if (orderId_params !== undefined) { + orderId.value = orderId_params.toString(); + console.log(orderId.value); + } }); \ No newline at end of file + + .q-table tr:nth-child(even) td { + background: #f8f8f8; + } + + .q-table thead tr { + background: #ecebeb; + } + + .q-table thead tr th { + position: sticky; + z-index: 1; + } + + /* this will be the loading indicator */ + .q-table thead tr:last-child th { + /* height of all previous header rows */ + top: 48px; + } + + .q-table thead tr:first-child th { + top: 0; + } +} + diff --git a/src/modules/06_retirement/components/resign/DetailDeceased.vue b/src/modules/06_retirement/components/resign/DetailDeceased.vue new file mode 100644 index 000000000..4c78eed8f --- /dev/null +++ b/src/modules/06_retirement/components/resign/DetailDeceased.vue @@ -0,0 +1,221 @@ + + + diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index 6b92458fa..af06080ef 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -6,10 +6,11 @@ const Main = () => import("@/modules/06_retirement/views/Main.vue"); const Listretirement = () => import("@/modules/06_retirement/components/ListRetirement/TableList.vue") const resignOrder = () => import("@/modules/06_retirement/components/resign/ResignOrder.vue"); const resign = () => import("@/modules/06_retirement/components/resign/Resign.vue"); -const resignByid = () => import("@/modules/06_retirement/components/resign/ResignByid.vue") -const deceased = () => import("@/modules/06_retirement/components/resign/Deceased.vue") -const dismissOrder = () => import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue") -const addOrder = () => import("@/modules/06_retirement/components/DismissOrder/AddOrder.vue") +const resignByid = () => import("@/modules/06_retirement/components/resign/ResignByid.vue"); +const deceased = () => import("@/modules/06_retirement/components/resign/Deceased.vue"); +const detaildeceased = () => import("@/modules/06_retirement/components/resign/DetailDeceased.vue"); +const dismissOrder = () => import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue"); +const addOrder = () => import("@/modules/06_retirement/components/DismissOrder/AddOrder.vue"); export default [ { path: "/retirement", @@ -81,6 +82,16 @@ export default [ Role: "retirement", }, }, + { + path: "/deceased/:id", + name: "deceased-detail", + component: detaildeceased, + meta: { + Auth: true, + Key: [7.8], + Role: "retirement", + }, + }, { path: "/dismiss-order", name: "dismiss-order", From 434b752f948ef63ea808e85d61761f7cb3984c49 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 8 Aug 2023 17:56:58 +0700 Subject: [PATCH 058/113] =?UTF-8?q?api=20=E0=B8=9B=E0=B8=B8=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3=E0=B8=AA?= =?UTF-8?q?=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 1 + .../components/OrderPlacement/step/step04.vue | 82 ++++++++++++++----- 2 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index fd13782a1..108f63ad8 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -62,6 +62,7 @@ export default { typeOrder: () => `${order}/order/order-type`, nextStep: (orderId: string) => `${order}/order/next/${orderId}`, prevStep: (orderId: string) => `${order}/order/prev/${orderId}`, + executeOrder: (orderId: string) => `${order}/order/execute/${orderId}`, createOrder: () => `${order}/order/detail`, diff --git a/src/modules/05_placement/components/OrderPlacement/step/step04.vue b/src/modules/05_placement/components/OrderPlacement/step/step04.vue index 969e2d574..700cc0555 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step04.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step04.vue @@ -287,6 +287,7 @@ label="ออกคำสั่ง" :color="validateForm() ? 'public' : 'grey'" :disable="statusOrder == 'N'" + @click="clickExecute(orderId)" /> diff --git a/src/modules/09_coin/components/1_Proposals/listProposals.vue b/src/modules/09_coin/components/1_Proposals/listProposals.vue new file mode 100644 index 000000000..d9d5793b9 --- /dev/null +++ b/src/modules/09_coin/components/1_Proposals/listProposals.vue @@ -0,0 +1,468 @@ + + + + + diff --git a/src/modules/09_coin/router.ts b/src/modules/09_coin/router.ts index d555454b2..ede52ede8 100644 --- a/src/modules/09_coin/router.ts +++ b/src/modules/09_coin/router.ts @@ -4,6 +4,10 @@ const Main = () => import("@/modules/09_coin/views/Main.vue"); const CoinHistory = () => import("@/modules/09_coin/components/Coin.vue"); +const coinProposals = () => + import("@/modules/09_coin/components/1_Proposals/listProposals.vue"); +const coinRoundAdd = () => + import("@/modules/09_coin/components/1_Proposals/addProposals.vue"); export default [ { @@ -16,6 +20,36 @@ export default [ Role: "coin", }, }, + { + path: "/coin/round-proposals", + name: "coinProposals", + component: coinProposals, + meta: { + Auth: true, + Key: [8.2], + Role: "coin", + }, + }, + { + path: "/coin/round-add", + name: "coinRoundAdd", + component: coinRoundAdd, + meta: { + Auth: true, + Key: [8.2], + Role: "coin", + }, + }, + { + path: "/coin/round-add/:id", + name: "coinRoundEdit", + component: coinRoundAdd, + meta: { + Auth: true, + Key: [8.2], + Role: "coin", + }, + }, { path: "/coin/history", name: "coinHistory", From 44ab2aa17e36cd2e988e468f28f068d42b761677 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 9 Aug 2023 12:09:46 +0700 Subject: [PATCH 061/113] no message --- src/api/05_placement/api.probation.ts | 8 +- .../components/probation/FormAssign.vue | 453 +++++++++++++----- .../components/probation/MainProbation.vue | 144 ++---- .../components/probation/ProbationDetail.vue | 73 ++- .../05_placement/interface/request/Main.ts | 32 +- src/modules/05_placement/router.ts | 2 +- 6 files changed, 463 insertions(+), 249 deletions(-) diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index 351a6685a..b774f3e36 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -1,6 +1,8 @@ import env from "../index"; const dataOptions = `${env.API_PROBATION_URI}/data-options`; const personal = `${env.API_PROBATION_URI}/personal`; +const calculate = `${env.API_PROBATION_URI}/calculate`; +const finish = `${env.API_PROBATION_URI}/assign`; export default { competencyOptions: () => `${dataOptions}/competency`, @@ -8,7 +10,11 @@ export default { knowledgeOptions: () => `${dataOptions}/knowledge`, skillOptions: () => `${dataOptions}/skill`, lawOptions: () => `${dataOptions}/law`, - + personalList: () => `${personal}/list`, + personal: (personalId:string) => `${personal}?personal_id=${personalId}`, + newAssign: (personalId:string) => `${dataOptions}/new-assign?personal_id=${personalId}`, + calculateDate: () => `${calculate}/assign-finish`, + saveFinish: (personalId:string) => `${finish}/probation-assign?personal_id=${personalId}`, personalAdd: () => `${personal}/add`, // clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}` }; diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index e719eea9b..bc24c0b4c 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -67,6 +67,7 @@ dense borderless option-label="label" + option-value="value" :outlined="routeName === 'probationWorkAdd'" v-model="monthSelect" :label="`ระยะเวลากี่เดือน`" @@ -154,6 +155,7 @@
+ > +
+ > +
+ > +
+ > +
@@ -641,7 +675,9 @@ option-value="id" hide-bottom-space :rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']" - :options="filterMain(OPmain,[main2,main3,main4,main5])" + :options=" + filterMain(OPmain, [main2, main3, main4, main5]) + " class="bg-white" :readonly="routeName != 'probationWorkAdd'" dense @@ -649,7 +685,14 @@ :outlined="routeName == 'probationWorkAdd'" v-model="main" label="ตัวที่ 1" - /> + > +
+ > +
+ > +
+ > +
+ > +
@@ -731,7 +810,6 @@
+ > +
+ > +
+ > +
@@ -1179,6 +1278,8 @@
- +
diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue index 8467377f8..18e4fa248 100644 --- a/src/modules/05_placement/components/probation/MainProbation.vue +++ b/src/modules/05_placement/components/probation/MainProbation.vue @@ -84,7 +84,7 @@
@@ -257,12 +257,12 @@ const pagination = ref({ const visibleColumns = ref([ "no", "name", - "position", - "level", - "institution", - "time", - "status", - "orderNum", + "position_line", + "position_level", + "organization", + "probation_no", + "order_number", + "probation_status", ]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง // หัวตาราง @@ -286,114 +286,63 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "position", + name: "position_line", align: "left", label: "ตำแหน่งในสายงาน", sortable: true, - field: "position", + field: "position_line", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "level", + name: "position_level", align: "left", label: "ระดับ", sortable: true, - field: "level", + field: "position_level", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "institution", + name: "organization", align: "left", label: "สังกัด", sortable: true, - field: "institution", + field: "organization", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "time", + name: "probation_no", align: "center", label: "ครั้งที่ทดลองงาน", sortable: true, - field: "time", + field: "probation_no", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "orderNum", + name: "order_number", align: "center", label: "เลขที่คําสั่งบรรจุแต่งตั้ง", sortable: true, - field: "orderNum", + field: "order_number", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "status", + name: "probation_status", align: "left", label: "สถานะทดลองงาน", sortable: true, - field: "status", + field: "probation_status", headerStyle: "font-size: 14px", style: "font-size: 14px", }, ]); // ข้อมูลตาราง (จำลอง) -const rows = ref([ - { - no: "1", - name: "นายสมคิด ยอดใจ ", - position: "นักวิชาการพัสดุ", - level: "ปฏิบัติการ", - institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒", - time: "1", - status: "อยู่ระหว่างการทดลองงาน", - orderNum: "11/2566", - }, - { - no: "2", - name: "นายเกียรติศักดิ์ บัณฑิต", - position: "นักวิชาการพัสดุ", - level: "ปฏิบัติการ", - institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒", - time: "1", - status: "อยู่ระหว่างการทดลองงาน", - orderNum: "11/2566", - }, - { - no: "3", - name: "นางสาวกัณฐิมา กาฬสินธุ์", - position: "นักจัดการงานทั่วไป", - level: "ปฏิบัติการ", - institution: "กลุ่มงานช่วยนักบริหาร", - time: "1", - status: "อยู่ระหว่างการทดลองงาน", - orderNum: "11/2566", - }, - { - no: "4", - name: "นางสาวเมขลา กระจ่างมนตรี", - position: "นักจัดการงานทั่วไป", - level: "ปฏิบัติการ", - institution: "กลุ่มงานช่วยนักบริหาร", - time: "1", - status: "ไม่ผ่านการทดลอง", - orderNum: "11/2566", - }, - { - no: "5", - name: "นางสาวฐิติรัตน์ พงษ์ศิริ", - position: "นักจัดการงานทั่วไป", - level: "ปฏิบัติการ", - institution: "กลุ่มงานช่วยนักบริหาร", - time: "1", - status: "ผ่านการทดลองงาน", - orderNum: "11/2566", - }, -]); +const rows = ref([]); // หัวตาราง2 const columns2 = ref([ @@ -483,28 +432,37 @@ const rows2 = ref([ // }, ]); -onMounted(async () => {}); - -watch(modal, () => { - if (modal.value === true) { - fecthOrganiz(); - } +onMounted(async () => { + getpersonalList(); }); -const fecthOrganiz = async () => { +// watch(modal, () => { +// if (modal.value === true) { +// getpersonalList(); +// } +// }); + +const getpersonalList = async () => { showLoader(); await http - .get(config.API.profileOrganizRoot) + .get(config.API.personalList()) .then((res) => { - console.log(res); - let id = res.data.result[0].id; - if (id !== "") { - findlist(id); - } - }) - .catch((e) => { - messageError($q, e); + const data = res.data.data; + rows.value = data.map((item: FormMainProbation) => ({ + personal_id: item.personal_id, + name: item.name, + position_line: item.position_line, + position_line_id: item.position_line_id, + position_level: item.position_level, + position_level_id: item.position_level_id, + organization: item.organization, + probation_no: item.probation_no, + order_number: item.order_number, + probation_status: item.probation_status, + })); + console.log("(data)", data); }) + .catch(() => {}) .finally(() => { hideLoader(); }); @@ -559,15 +517,11 @@ const clickAdd = (id: string) => { .onOk(async () => { const postData = { personal_id: id, - } + }; console.log("postData:", postData); - await http - .post(config.API.personalAdd(), postData) - .then((res) => { - console.log("res:", res); - - }); - + await http.post(config.API.personalAdd(), postData).then((res) => { + console.log("res:", res); + }); }) .onCancel(() => {}) .onDismiss(() => {}); diff --git a/src/modules/05_placement/components/probation/ProbationDetail.vue b/src/modules/05_placement/components/probation/ProbationDetail.vue index cb43dad2d..628b2f7c0 100644 --- a/src/modules/05_placement/components/probation/ProbationDetail.vue +++ b/src/modules/05_placement/components/probation/ProbationDetail.vue @@ -34,19 +34,19 @@
ตำแหน่งในสายงาน
-
{{ position }}
+
{{ position_line }}
ระดับ
-
{{ level }}
+
{{ position_level }}
สังกัด
-
{{ institution }}
+
{{ organization }}
@@ -55,18 +55,18 @@
- {{ status }} + {{ probation_status == 'PENDING' ? 'อยู่ในระหว่างการทดลองงาน' : '' }}
@@ -78,7 +78,7 @@
\ No newline at end of file + + .q-table tr:nth-child(even) td { + background: #f8f8f8; + } + + .q-table thead tr { + background: #ecebeb; + } + + .q-table thead tr th { + position: sticky; + z-index: 1; + } + + /* this will be the loading indicator */ + .q-table thead tr:last-child th { + /* height of all previous header rows */ + top: 48px; + } + + .q-table thead tr:first-child th { + top: 0; + } +} + diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 8c191671d..87822d692 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -1,106 +1,146 @@ \ No newline at end of file + From 742fda67f65e82210ade9385ccc58ab94b8cac25 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 9 Aug 2023 14:50:01 +0700 Subject: [PATCH 065/113] no message --- src/modules/06_retirement/components/resign/Resign.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/modules/06_retirement/components/resign/Resign.vue b/src/modules/06_retirement/components/resign/Resign.vue index a4e9f499b..0e76fbd8e 100644 --- a/src/modules/06_retirement/components/resign/Resign.vue +++ b/src/modules/06_retirement/components/resign/Resign.vue @@ -265,9 +265,17 @@ const resetFilter = () => { > รอดำเนินการ - + เสร็จสิ้น + + ยับยั้ง + From c557c8711e501d355b2cbd49674bfa1dcc079aff Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 9 Aug 2023 15:57:53 +0700 Subject: [PATCH 066/113] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B9=81=E0=B8=9A=E0=B8=9A=E0=B8=A1=E0=B8=AD=E0=B8=9A?= =?UTF-8?q?=E0=B8=AB=E0=B8=A1=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=9B=E0=B8=8F=E0=B8=B4=E0=B8=9A=E0=B8=B1=E0=B8=95?= =?UTF-8?q?=E0=B8=B4=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=97=E0=B8=B5?= =?UTF-8?q?=E0=B9=88=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=20(=E0=B8=95=E0=B8=B4=E0=B8=94post)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/probation/FormAssign.vue | 81 ++++++++----------- 1 file changed, 34 insertions(+), 47 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index bc24c0b4c..118688674 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -96,7 +96,7 @@ hide-bottom-space class="full-width datepicker q-mb-md" :model-value=" - date_start != null ? date2Thai(date_start) : null + date_start != null ? date2Thai(date_start) : undefined " :label="`${'ตั้งเเต่วันที่'}`" clearable @@ -131,7 +131,7 @@ readonly class="full-width datepicker q-mb-md" :model-value=" - date_finish != null ? date2Thai(date_finish) : null + date_finish != null ? date2Thai(date_finish) : undefined " :label="`${'ถึงวันที่'}`" clearable @@ -1214,7 +1214,7 @@ dense borderless :outlined="routeName == 'probationWorkAdd'" - v-model="fullnameFoot" + v-model="fullname" label="ชื่อ-สกุล" />
@@ -1224,7 +1224,7 @@ dense borderless :outlined="routeName == 'probationWorkAdd'" - v-model="positionFoot" + v-model="position" label="ตำแหน่ง" />
@@ -1285,7 +1285,7 @@ dense borderless :outlined="routeName == 'probationWorkAdd'" - v-model="caretakerFoot" + v-model="caretaker1" label="ผู้ดูแลคนที่ 1" />
@@ -1337,7 +1337,7 @@ dense borderless :outlined="routeName == 'probationWorkAdd'" - v-model="caretakerFoot2" + v-model="caretaker2" label="ผู้ดูแลคนที่ 2" />
@@ -1694,6 +1694,8 @@ const getAssignNew = async (id: string) => { monthSelect.value = `${data.assign_month} เดือน`; OPcaretaker.value = data.mentors; OPcommander.value = [data.commander]; + fullname.value = data.person.name + position.value = data.person.OrganizationOrganization }); }; const getcompetency = async () => { @@ -1748,7 +1750,7 @@ const postDateTime = async () => { }) .then(async (res) => { const result = res.data; - date_finish.value = result.finish_date; + date_finish.value = result.finish_date; }) .catch((e) => {}) .finally(async () => { @@ -1764,7 +1766,6 @@ const putData = (id: string) => { if (activityDesc !== "" && goalDesc !== "") { return { - id: index + 1, activity_desc: activityDesc, goal_desc: goalDesc, }; @@ -1773,7 +1774,6 @@ const putData = (id: string) => { } }); const know_ledge = knowledge.value.map((item) => ({ - id: item ? item.id : null, level: item ? item.level : null, })); @@ -1783,7 +1783,6 @@ const putData = (id: string) => { if (outputDesc !== "" && indicatorDesc !== "") { return { - id: index + 1, output_desc: outputDesc, indicator_desc: indicatorDesc, }; @@ -1793,34 +1792,22 @@ const putData = (id: string) => { }); const allGroup = []; - if (group.value) - allGroup.push({ id: group.value.id, level: group.value.level }); - if (group2.value) - allGroup.push({ id: group2.value.id, level: group2.value.level }); - if (group3.value) - allGroup.push({ id: group3.value.id, level: group3.value.level }); + if (group.value) allGroup.push({ level: group.value.level }); + if (group2.value) allGroup.push({ level: group2.value.level }); + if (group3.value) allGroup.push({ level: group3.value.level }); const allSkills = []; - if (skill.value) - allSkills.push({ id: skill.value.id, level: skill.value.level }); - if (skill2.value) - allSkills.push({ id: skill2.value.id, level: skill2.value.level }); - if (skill3.value) - allSkills.push({ id: skill3.value.id, level: skill3.value.level }); - if (skill4.value) - allSkills.push({ id: skill4.value.id, level: skill4.value.level }); + if (skill.value) allSkills.push({ level: skill.value.level }); + if (skill2.value) allSkills.push({ level: skill2.value.level }); + if (skill3.value) allSkills.push({ level: skill3.value.level }); + if (skill4.value) allSkills.push({ level: skill4.value.level }); const allCompetency = []; - if (main.value) - allCompetency.push({ id: skill.value.id, level: main.value.level }); - if (main2.value) - allCompetency.push({ id: main2.value.id, level: main2.value.level }); - if (main3.value) - allCompetency.push({ id: main3.value.id, level: main3.value.level }); - if (main4.value) - allCompetency.push({ id: main4.value.id, level: main4.value.level }); - if (main5.value) - allCompetency.push({ id: main5.value.id, level: main5.value.level }); + if (main.value) allCompetency.push({ level: main.value.level }); + if (main2.value) allCompetency.push({ level: main2.value.level }); + if (main3.value) allCompetency.push({ level: main3.value.level }); + if (main4.value) allCompetency.push({ level: main4.value.level }); + if (main5.value) allCompetency.push({ level: main5.value.level }); const assign_director = [ { @@ -1844,12 +1831,10 @@ const putData = (id: string) => { personalId: GUID, fullname: fullname.value, position: position.value, - monthSelect:monthSelect.value !== null ? parseInt(monthSelect.value) : null, - date_start: - date_start.value instanceof Date - ? dateToISO(date_start.value) - : new Date(), - date_finish: date_finish.value, + monthSelect: + monthSelect.value !== null ? parseInt(monthSelect.value) : null, + date_start: date_start.value instanceof Date ? dateToISO(date_start.value) : new Date(), + date_finish: date_finish.value instanceof Date ? dateToISO(date_finish.value) : dateToISO(new Date(date_finish.value)), // caretaker_1: caretaker1.value, // caretaker_2: caretaker2.value, assign_knowledges: know_ledge, @@ -1863,12 +1848,11 @@ const putData = (id: string) => { assign_outputs: Productivity_assign.filter((item) => item !== null), // commander: commander.value, assign_director: assign_director, - experimenter_dated: date1.value instanceof Date ? dateToISO(date1.value) : new Date(), + experimenter_dated: + date1.value instanceof Date ? dateToISO(date1.value) : new Date(), // date_2: date2.value instanceof Date ? dateToISO(date2.value) : new Date(), // date_3: date3.value instanceof Date ? dateToISO(date3.value) : new Date(), // date_4: date4.value instanceof Date ? dateToISO(date4.value) : new Date(), - fullname_foot: fullnameFoot.value, - position_foot: positionFoot.value, // caretaker_foot: caretakerFoot.value, // caretaker_foot2: caretakerFoot2.value, assign_law: checkRule.value @@ -1879,6 +1863,7 @@ const putData = (id: string) => { })), }; console.log("test", data); + }; const saveData = (id: string) => { @@ -1892,13 +1877,15 @@ const saveData = (id: string) => { const: "negative", }, }) - .onOk(async () => { + .onOk(() => { const data = putData(id); - await http + http .post(config.API.saveFinish(id), data) - .then(async (res) => {}) + .then((res) => { + console.log("🚀 ~ file: FormAssign.vue:1887 ~ .then ~ res:", res); + }) .catch((e) => {}) - .finally(async () => { + .finally(() => { hideLoader(); }); }) From 5dfa5bea4f4fc6b4479ca9ab6609c5bf36be7b5b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 9 Aug 2023 16:10:02 +0700 Subject: [PATCH 067/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B9=89=20API=20=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20Step2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 1 + .../components/OrderPlacement/step/step02.vue | 110 +++++++++++++----- .../05_placement/interface/response/Order.ts | 2 +- 3 files changed, 86 insertions(+), 27 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 108f63ad8..b9cc81f9b 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -70,6 +70,7 @@ export default { //ข้อมูลเลือกรายชื่อออกคำสั่ง, ลบรายชื่อ personsOrder: (orderId: string) => `${order}/order/persons/${orderId}`, + personsselectedOrder: (orderId: string) => `${order}/order/persons-selected/${orderId}`, //เปลี่ยน status ของคำสั่งไปขั้นตอนถัดไป nextOrder: (orderId: string) => `${order}/order/next/${orderId}`, diff --git a/src/modules/05_placement/components/OrderPlacement/step/step02.vue b/src/modules/05_placement/components/OrderPlacement/step/step02.vue index 49eb96d11..984d6d2fc 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step02.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step02.vue @@ -109,7 +109,7 @@ div flat round color="red" - @click="dialogDeleteData(props.row.personId)" + @click="dialogDeleteData(props.row.personalId)" icon="mdi-delete" > ลบข้อมูล @@ -226,7 +226,7 @@ div ([ }, ]); const rows = ref([]); +const rows2 = ref([]); const selected = ref([]); +const orderId = ref(route.params.orderid.toString()); onMounted(async () => { await conditionData(); @@ -390,17 +392,17 @@ const conditionData = async () => { const getData = async (id: string) => { showLoader(); await http - .get(config.API.personsOrder(id)) + .get(config.API.personsselectedOrder(id)) .then((res) => { const data = res.data.result; - // console.log(data); + console.log(data); let list: ResponseData[] = []; data.map((r: ResponseData) => { list.push({ education: r.education ?? "", idCard: r.idCard ?? "", name: r.name ?? "", - personId: r.personId ?? "", + personalId: r.personalId ?? "", selectStatus: r.selectStatus !== null ? r.selectStatus : false, sequence: r.sequence !== null ? r.sequence : 0, }); @@ -456,8 +458,9 @@ const deleteData = async (id: string) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await conditionData(); }); }; @@ -535,19 +538,74 @@ const modalOpenClose = () => { } }; -const modalAddChange = () => { +const modalAddChange = async () => { modalAdd.value = !modalAdd.value; + if (modalAdd.value == true) { + await fetchaddlist(orderId.value); + } else await conditionData(); +}; +const fetchaddlist = async (id: string) => { + showLoader(); + await http + .get(config.API.personsOrder(id)) + .then((res) => { + const data = res.data.result; + console.log(data); + let list = []; + list = data.map((r: ResponseData) => ({ + education: r.education ?? "", + idCard: r.idCard ?? "", + name: r.name ?? "", + personalId: r.personalId ?? "", + selectStatus: r.selectStatus !== null ? r.selectStatus : false, + sequence: r.sequence !== null ? r.sequence : 0, + })); + rows2.value = list.filter((e: any) => e.selectStatus === false); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }; - const saveModalAdd = () => { if (myFormAdd.value !== null) { myFormAdd.value.validate().then(async (result: boolean) => { - if (result) { - modalAddChange(); + if (result && selected.value.length !== 0) { + $q.dialog({ + title: "ยืนยันการเพิ่มรายชื่อออกคำสั่ง", + message: "ต้องการยืนยันการเพิ่มรายชื่อออกคำสั่งนี้ใช่หรือไม่?", + cancel: { + flat: true, + color: "negative", + }, + persistent: true, + }).onOk(async () => { + let data = []; + data.push(...selected.value.map((e: any) => e.personalId)); + // console.log(data); + addlist(data); + }); } }); } }; +const addlist = async (data: Object) => { + await http + .post(config.API.personsOrder(orderId.value), data) + .then(() => { + // console.log(res); + success($q, "บันทึกสำเร็จ"); + }) + .catch((e: any) => { + console.log(e); + messageError($q, e); + }) + .finally(() => { + modalAddChange(); + }); +}; const click = (e: any) => { console.log(e); @@ -555,28 +613,28 @@ const click = (e: any) => { }; const save = () => { - // if (selected.value.length > 0) { - // next(); - // } else { - // dialogMessage( - // $q, - // "ข้อความแจ้งเตือน", - // "กรุณาเลือกรายชื่อ", - // "warning", - // undefined, - // "orange", - // undefined, - // undefined, - // true - // ); - // } + // if (selected.value.length > 0) { + // next(); + // } else { + // dialogMessage( + // $q, + // "ข้อความแจ้งเตือน", + // "กรุณาเลือกรายชื่อ", + // "warning", + // undefined, + // "orange", + // undefined, + // undefined, + // true + // ); + // } next(); }; const selectData = (row: any) => {}; const refresh = async () => { - await conditionData(); + // await conditionData(); modalAddChange(); selected.value = []; }; diff --git a/src/modules/05_placement/interface/response/Order.ts b/src/modules/05_placement/interface/response/Order.ts index 6dc958ff1..cb3d31be5 100644 --- a/src/modules/05_placement/interface/response/Order.ts +++ b/src/modules/05_placement/interface/response/Order.ts @@ -2,7 +2,7 @@ interface ResponseData { education: string; idCard: string; name: string; - personId: string; + personalId: string; selectStatus: boolean; sequence: number; } From e70eb3b3dfd49266c3f1976c5b4232fb8a11f2d1 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Wed, 9 Aug 2023 16:38:17 +0700 Subject: [PATCH 068/113] fix api parameter --- src/api/05_placement/api.probation.ts | 2 +- src/modules/05_placement/components/probation/MainProbation.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index b774f3e36..081de5a04 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -10,7 +10,7 @@ export default { knowledgeOptions: () => `${dataOptions}/knowledge`, skillOptions: () => `${dataOptions}/skill`, lawOptions: () => `${dataOptions}/law`, - personalList: () => `${personal}/list`, + probationPersonalList: () => `${personal}/list`, personal: (personalId:string) => `${personal}?personal_id=${personalId}`, newAssign: (personalId:string) => `${dataOptions}/new-assign?personal_id=${personalId}`, calculateDate: () => `${calculate}/assign-finish`, diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue index 1fabf0f9e..60f331b89 100644 --- a/src/modules/05_placement/components/probation/MainProbation.vue +++ b/src/modules/05_placement/components/probation/MainProbation.vue @@ -338,7 +338,7 @@ watch(modal, () => { const getpersonalList = async () => { showLoader(); await http - .get(config.API.personalList()) + .get(config.API.probationPersonalList()) .then((res) => { const data = res.data.data; rows.value = data.map((item: FormMainProbation) => ({ From 019e485afa1df782c403dddaea2183787c57bbad Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 9 Aug 2023 17:12:37 +0700 Subject: [PATCH 069/113] no message --- .../05_placement/components/probation/FormAssign.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index 118688674..a3511744f 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -1599,6 +1599,7 @@ interface MonthOption { label: string; } const monthOp: MonthOption[] = []; + //-----------------(3.1)-----------// const activityCount = ref(2); const activityDataArray = ref([]); @@ -1811,12 +1812,12 @@ const putData = (id: string) => { const assign_director = [ { - personal_id: caretakerFoot.value.personal_id, + personal_id: caretaker1.value.personal_id, role: "mentor", dated: date2.value instanceof Date ? dateToISO(date2.value) : null, }, { - personal_id: caretakerFoot2.value.personal_id, + personal_id: caretaker2.value.personal_id, role: "mentor", dated: date3.value instanceof Date ? dateToISO(date3.value) : null, }, @@ -1862,8 +1863,7 @@ const putData = (id: string) => { checked: item.checked, })), }; - console.log("test", data); - + return data }; const saveData = (id: string) => { @@ -1882,7 +1882,7 @@ const saveData = (id: string) => { http .post(config.API.saveFinish(id), data) .then((res) => { - console.log("🚀 ~ file: FormAssign.vue:1887 ~ .then ~ res:", res); + router.push(`/probation/detail/${id}`); }) .catch((e) => {}) .finally(() => { From a0165b48176e9dc63374998eea6f1b71758eb3b5 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 9 Aug 2023 17:41:06 +0700 Subject: [PATCH 070/113] =?UTF-8?q?API=20salary=20=20=E0=B8=AD=E0=B8=AD?= =?UTF-8?q?=E0=B8=81=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= =?UTF-8?q?=20step2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OrderPlacement/detailOrderPlacement.vue | 2 +- .../components/OrderPlacement/step/step02.vue | 149 ++++++++++++------ .../05_placement/interface/response/Order.ts | 1 + 3 files changed, 107 insertions(+), 45 deletions(-) diff --git a/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue index 2dd25af95..35f34e817 100644 --- a/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue @@ -77,7 +77,7 @@ const nextStep = async () => { }; const previousStep = async () => { stepper.value!.previous(); - // localStorage.setItem("currentStep", step.value.toString()); + localStorage.setItem("currentStep", step.value.toString()); if (orderId.value) { await http .put(config.API.prevStep(orderId.value)) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step02.vue b/src/modules/05_placement/components/OrderPlacement/step/step02.vue index 984d6d2fc..2fe4959fe 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step02.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step02.vue @@ -405,6 +405,7 @@ const getData = async (id: string) => { personalId: r.personalId ?? "", selectStatus: r.selectStatus !== null ? r.selectStatus : false, sequence: r.sequence !== null ? r.sequence : 0, + refRecordId: r.refRecordId, }); }); // console.log("list", list); @@ -418,21 +419,21 @@ const getData = async (id: string) => { }); }; -const saveSalary = async (id: string) => { - await http - .put(config.API.salaryOrder(id)) - .then((res) => { - // const data = res.data.result; - // console.log(res); - success($q, "บันทึกข้อมูลสำเร็จ"); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); -}; +// const saveSalary = async (id: string) => { +// await http +// .put(config.API.salaryOrder(id)) +// .then((res) => { +// // const data = res.data.result; +// // console.log(res); +// success($q, "บันทึกข้อมูลสำเร็จ"); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// hideLoader(); +// }); +// }; const dialogDeleteData = async (id: string) => { dialogMessage( @@ -501,11 +502,11 @@ const swapDown = async (id: string) => { const upDown = async (value: any, up: boolean = true) => { const indexCurrent = value.rowIndex; if (up) { - await swapUp(value.row.personId); + await swapUp(value.row.personalId); // rows.value[indexCurrent] = rows.value[indexCurrent - 1]; // rows.value[indexCurrent - 1] = value.row; } else { - await swapDown(value.row.personId); + await swapDown(value.row.personalId); // rows.value[indexCurrent] = rows.value[indexCurrent + 1]; // rows.value[indexCurrent + 1] = value.row; } @@ -515,27 +516,76 @@ const saveModal = () => { if (myForm.value !== null) { myForm.value.validate().then(async (result: boolean) => { if (result) { - modalOpenClose(); + putSalary(modalData.value); } }); } }; - +const personalId = ref(""); const selectModal = (e: any) => { + console.log(e); titleName.value = e.name; - modalData.value = { - salaryAmount: 0, - positionSalaryAmount: 0, - mouthSalaryAmount: 0, - }; - modalOpenClose(); + personalId.value = e.personalId; + // modalData.value = { + // salaryAmount: 0, + // positionSalaryAmount: 0, + // mouthSalaryAmount: 0, + // }; + + modalOpenClose(e.personalId); }; -const modalOpenClose = () => { +const modalOpenClose = async (personalId: string) => { modal.value = !modal.value; if (!modal.value) { titleName.value = ""; } + if (modal.value == true) { + await fetchSalary(personalId); + } +}; +const fetchSalary = async (personalId: string) => { + console.log(personalId); + showLoader(); + await http + .get(config.API.salaryOrder(personalId)) + .then((res: any) => { + console.log(res); + let salary = res.data.result; + modalData.value = { + salaryAmount: salary.salaryAmount, + positionSalaryAmount: salary.positionSalaryAmount, + mouthSalaryAmount: salary.monthSalaryAmount, + }; + }) + .catch((e) => { + console.log(e); + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +}; +const putSalary = async (salary: any) => { + modalData.value = { + salaryAmount: Number(salary.salaryAmount), + positionSalaryAmount: Number(salary.positionSalaryAmount), + mouthSalaryAmount: Number(salary.mouthSalaryAmount), + }; + await http + .put(config.API.salaryOrder(personalId.value), modalData.value) + .then((res: any) => { + console.log(res); + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((e) => { + console.log(e); + messageError($q, e); + }) + .finally(async () => { + await conditionData(); + modal.value = false; + }); }; const modalAddChange = async () => { @@ -559,6 +609,7 @@ const fetchaddlist = async (id: string) => { personalId: r.personalId ?? "", selectStatus: r.selectStatus !== null ? r.selectStatus : false, sequence: r.sequence !== null ? r.sequence : 0, + refRecordId: r.refRecordId, })); rows2.value = list.filter((e: any) => e.selectStatus === false); }) @@ -583,7 +634,7 @@ const saveModalAdd = () => { persistent: true, }).onOk(async () => { let data = []; - data.push(...selected.value.map((e: any) => e.personalId)); + data.push(...selected.value.map((e: any) => e.refRecordId)); // console.log(data); addlist(data); }); @@ -595,7 +646,6 @@ const addlist = async (data: Object) => { await http .post(config.API.personsOrder(orderId.value), data) .then(() => { - // console.log(res); success($q, "บันทึกสำเร็จ"); }) .catch((e: any) => { @@ -613,22 +663,33 @@ const click = (e: any) => { }; const save = () => { - // if (selected.value.length > 0) { - // next(); - // } else { - // dialogMessage( - // $q, - // "ข้อความแจ้งเตือน", - // "กรุณาเลือกรายชื่อ", - // "warning", - // undefined, - // "orange", - // undefined, - // undefined, - // true - // ); - // } - next(); + $q.dialog({ + title: "ยืนยันการบันทึกข้อมูล", + message: "ต้องการยืนยันการบันทึกข้อมูลนี้ใช่หรือไม่?", + cancel: { + flat: true, + color: "negative", + }, + persistent: true, + }).onOk(async () => { + success($q, "บันทึกข้อมูลสำเร็จ"); + next(); + }); + // if (selected.value.length > 0) { + // next(); + // } else { + // dialogMessage( + // $q, + // "ข้อความแจ้งเตือน", + // "กรุณาเลือกรายชื่อ", + // "warning", + // undefined, + // "orange", + // undefined, + // undefined, + // true + // ); + // } }; const selectData = (row: any) => {}; diff --git a/src/modules/05_placement/interface/response/Order.ts b/src/modules/05_placement/interface/response/Order.ts index cb3d31be5..375361a97 100644 --- a/src/modules/05_placement/interface/response/Order.ts +++ b/src/modules/05_placement/interface/response/Order.ts @@ -5,6 +5,7 @@ interface ResponseData { personalId: string; selectStatus: boolean; sequence: number; + refRecordId: string } interface ResponseOrganiz { From 8485164a12c6c7433c707a517ba96e595689cced Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 9 Aug 2023 17:43:26 +0700 Subject: [PATCH 071/113] no message --- .../components/OrderPlacement/step/step02.vue | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step02.vue b/src/modules/05_placement/components/OrderPlacement/step/step02.vue index 2fe4959fe..15087cc43 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step02.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step02.vue @@ -572,20 +572,30 @@ const putSalary = async (salary: any) => { positionSalaryAmount: Number(salary.positionSalaryAmount), mouthSalaryAmount: Number(salary.mouthSalaryAmount), }; - await http - .put(config.API.salaryOrder(personalId.value), modalData.value) - .then((res: any) => { - console.log(res); - success($q, "บันทึกข้อมูลสำเร็จ"); - }) - .catch((e) => { - console.log(e); - messageError($q, e); - }) - .finally(async () => { - await conditionData(); - modal.value = false; - }); + $q.dialog({ + title: "ยืนยันการบันทึกข้อมูล", + message: "ต้องการยืนยันการบันทึกข้อมูลนี้ใช่หรือไม่?", + cancel: { + flat: true, + color: "negative", + }, + persistent: true, + }).onOk(async () => { + await http + .put(config.API.salaryOrder(personalId.value), modalData.value) + .then((res: any) => { + console.log(res); + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((e) => { + console.log(e); + messageError($q, e); + }) + .finally(async () => { + await conditionData(); + modal.value = false; + }); + }); }; const modalAddChange = async () => { From 9cad6dce3d58eae0a892830c1146a92bf85b0bca Mon Sep 17 00:00:00 2001 From: waruneeta Date: Wed, 9 Aug 2023 21:35:25 +0700 Subject: [PATCH 072/113] =?UTF-8?q?=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99=20-=20=E0=B8=AA=E0=B9=88?= =?UTF-8?q?=E0=B8=87=20personal=20id=20=E0=B9=80=E0=B8=9E=E0=B8=B4?= =?UTF-8?q?=E0=B9=88=E0=B8=A1=E0=B9=83=E0=B8=99=E0=B8=AA=E0=B9=88=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= =?UTF-8?q?=E0=B8=9F=E0=B8=AD=E0=B8=A3=E0=B9=8C=E0=B8=A1=E0=B8=A1=E0=B8=AD?= =?UTF-8?q?=E0=B8=9A=E0=B8=AB=E0=B8=A1=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2?= =?UTF-8?q?=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.probation.ts | 23 ++++++++----- .../components/probation/FormAssign.vue | 34 +++++++++---------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index 081de5a04..56033ced6 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -5,16 +5,23 @@ const calculate = `${env.API_PROBATION_URI}/calculate`; const finish = `${env.API_PROBATION_URI}/assign`; export default { - competencyOptions: () => `${dataOptions}/competency`, - competencyGroupOptions: () => `${dataOptions}/competency-group`, - knowledgeOptions: () => `${dataOptions}/knowledge`, - skillOptions: () => `${dataOptions}/skill`, - lawOptions: () => `${dataOptions}/law`, + competencyOptions: (personalId: string) => + `${dataOptions}/competency?personal_id=${personalId}`, + competencyGroupOptions: (personalId: string) => + `${dataOptions}/competency-group?personal_id=${personalId}`, + knowledgeOptions: (personalId: string) => + `${dataOptions}/knowledge?personal_id=${personalId}`, + skillOptions: (personalId: string) => + `${dataOptions}/skill?personal_id=${personalId}`, + lawOptions: (personalId: string) => + `${dataOptions}/law?personal_id=${personalId}`, probationPersonalList: () => `${personal}/list`, - personal: (personalId:string) => `${personal}?personal_id=${personalId}`, - newAssign: (personalId:string) => `${dataOptions}/new-assign?personal_id=${personalId}`, + personal: (personalId: string) => `${personal}?personal_id=${personalId}`, + newAssign: (personalId: string) => + `${dataOptions}/new-assign?personal_id=${personalId}`, calculateDate: () => `${calculate}/assign-finish`, - saveFinish: (personalId:string) => `${finish}/probation-assign?personal_id=${personalId}`, + saveFinish: (personalId: string) => + `${finish}/probation-assign?personal_id=${personalId}`, personalAdd: () => `${personal}/add`, // clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}` }; diff --git a/src/modules/05_placement/components/probation/FormAssign.vue b/src/modules/05_placement/components/probation/FormAssign.vue index a3511744f..daa51c5e6 100644 --- a/src/modules/05_placement/components/probation/FormAssign.vue +++ b/src/modules/05_placement/components/probation/FormAssign.vue @@ -1557,10 +1557,10 @@ const OPgroup = ref< }> >([]); const clearDateExam = () => { - date_start.value = null; + date_start.value = undefined; }; const clearDateExam2 = () => { - date_finish.value = null; + date_finish.value = undefined; }; const isDatePicker2Readonly = computed(() => { return date_start.value === null; @@ -1699,8 +1699,8 @@ const getAssignNew = async (id: string) => { position.value = data.person.OrganizationOrganization }); }; -const getcompetency = async () => { - await http.get(config.API.competencyOptions()).then((res: any) => { +const getcompetency = async (id: string) => { + await http.get(config.API.competencyOptions(id)).then((res: any) => { const data = res.data.data; OPmain.value = data; main.value = data[0]; @@ -1710,8 +1710,8 @@ const getcompetency = async () => { main5.value = data[4]; }); }; -const getCompetencyGroup = async () => { - await http.get(config.API.competencyGroupOptions()).then((res: any) => { +const getCompetencyGroup = async (id: string) => { + await http.get(config.API.competencyGroupOptions(id)).then((res: any) => { const data = res.data.data; OPgroup.value = data; group.value = data[0]; @@ -1719,13 +1719,13 @@ const getCompetencyGroup = async () => { group3.value = data[2]; }); }; -const getKnowledge = async () => { - await http.get(config.API.knowledgeOptions()).then((res: any) => { +const getKnowledge = async (id: string) => { + await http.get(config.API.knowledgeOptions(id)).then((res: any) => { OPknowledge.value = res.data.data; }); }; -const getSkill = async () => { - await http.get(config.API.skillOptions()).then((res: any) => { +const getSkill = async (id: string) => { + await http.get(config.API.skillOptions(id)).then((res: any) => { const skillData = res.data.data; OPcomputer.value = [skillData.computer]; OPenglish.value = [skillData.english]; @@ -1737,8 +1737,8 @@ const getSkill = async () => { skill4.value = skillData.resourse; }); }; -const getLaw = async () => { - await http.get(config.API.lawOptions()).then((res: any) => { +const getLaw = async (id: string) => { + await http.get(config.API.lawOptions(id)).then((res: any) => { checkRule.value = res.data.data; }); }; @@ -1936,11 +1936,11 @@ const OPresourse = ref< >([]); onMounted(async () => { - await getLaw(); - await getcompetency(); - await getCompetencyGroup(); - await getSkill(); - await getKnowledge(); + await getLaw(personalId); + await getcompetency(personalId); + await getCompetencyGroup(personalId); + await getSkill(personalId); + await getKnowledge(personalId); await getAssignNew(personalId); }); watch( From f81ff646acb6bca8895556b03d7d2e6a954df7a7 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Thu, 10 Aug 2023 02:26:38 +0700 Subject: [PATCH 073/113] =?UTF-8?q?=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99=20remove=20component=20&?= =?UTF-8?q?=20add=20footer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../probation/FormEvaluation/FormEvaluate.vue | 59 +++ .../FormEvaluation/FormEvaluateScore.vue | 57 +++ .../probation/FormEvaluation/FormReport.vue | 12 +- .../FormEvaluation/FormSaveResult.vue | 2 +- .../FormEvaluation/SubForm/Part1.vue | 432 ------------------ .../FormEvaluation/SubForm/Part1Template2.vue | 312 ------------- .../FormEvaluation/SubForm/Part2.vue | 289 ------------ .../FormEvaluation/SubForm/Part3.vue | 131 ------ .../SubForm/PartHighlightImprove.vue | 45 -- 9 files changed, 123 insertions(+), 1216 deletions(-) delete mode 100644 src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part1.vue delete mode 100644 src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part1Template2.vue delete mode 100644 src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part2.vue delete mode 100644 src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part3.vue delete mode 100644 src/modules/05_placement/components/probation/FormEvaluation/SubForm/PartHighlightImprove.vue diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue index e07a256f1..5afcc2e7a 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue @@ -59,6 +59,9 @@ const { date2Thai, notifyError } = mixin; const dateToday = ref(new Date("10-10-2023")); const dateEnd = ref(new Date("12-10-2023")); const period = ref(1); +const Autherise = ref(null); +const dateAutherise = ref(new Date()); + // part 1 const knowledge_level = ref(0); const skill_level = ref(0); @@ -886,6 +889,62 @@ const putformData = () => {
+
+
+
+ ผู้บังคับบัญชา +
+
+ +
+ + + + + +
+
+
+
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index 884167ab7..4410a1b04 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -1133,6 +1133,63 @@ const putformData = () => {
+
+
+
+ คณะกรรมการ +
+
+ +
+ + + + + +
+
+
+
+ diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index 6be0a8872..88123d2de 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -149,11 +149,11 @@ const postData = async () => {
- ประธานคณะกรรมการ + ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ
+ label="" />
@@ -179,11 +179,11 @@ const postData = async () => {
- กรรมการ + ความเห็นของผู้มีอำนาจสั่งบรรจุตามมาตรา 52
+ label="" />
@@ -209,11 +209,11 @@ const postData = async () => {
- กรรมการ + ผู้มีอำนาจสั่งบรรจุตามมาตรา 52
+ label="" />
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue index 214477fe8..d390c77db 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue @@ -1119,7 +1119,7 @@ const putformData = () => {
- ผู้บังคับบัญชาผู้มอบหมายงาน + ผู้บังคับบัญชา/ผู้มอบหมายงาน
-import { ref, defineAsyncComponent } from "vue"; - -import { useQuasar } from "quasar"; - -import { useProbationDataStore } from "@/modules/05_placement/store"; - -const PartHighlightImprove = defineAsyncComponent( - () => - import( - "@/modules/05_placement/components/probation/FormEvaluation/SubForm/PartHighlightImprove.vue" - ) -); - -const $q = useQuasar(); -const probationStore = useProbationDataStore(); -const { ratingColors } = probationStore; - -const list1_1 = [ - { id: "1", label: "ผลผลิตของงานที่คาดหวัง 1" }, - { id: "2", label: "ผลผลิตของงานที่คาดหวัง 2" }, - { id: "3", label: "ผลผลิตของงานที่คาดหวัง 3" }, - { id: "4", label: "ผลผลิตของงานที่คาดหวัง 4" }, - { id: "5", label: "ผลผลิตของงานที่คาดหวัง 5" }, -]; -const list1_2 = [ - { id: "1", label: "ผลผลิตของงานที่เกิดขึ้น 1" }, - { id: "2", label: "ผลผลิตของงานที่เกิดขึ้น 2" }, - { id: "3", label: "ผลผลิตของงานที่เกิดขึ้น 3" }, - { id: "4", label: "ผลผลิตของงานที่เกิดขึ้น 4" }, - { id: "5", label: "ผลผลิตของงานที่เกิดขึ้น 5" }, -]; - -const etc_text = ref(null); -const text2_1 = ref(""); - -const model = ref(0); -const model1 = ref(0); -const model1_2 = ref(0); -const model1_3 = ref(0); -const model1_4 = ref(0); -const model1_5 = ref(0); -const model1_6 = ref(0); -const modelEtc = ref(0); -const etc = ref(false); - - - - - diff --git a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part1Template2.vue b/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part1Template2.vue deleted file mode 100644 index 2f4120f67..000000000 --- a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part1Template2.vue +++ /dev/null @@ -1,312 +0,0 @@ - - - - diff --git a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part2.vue b/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part2.vue deleted file mode 100644 index 0b4771475..000000000 --- a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part2.vue +++ /dev/null @@ -1,289 +0,0 @@ - - - diff --git a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part3.vue b/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part3.vue deleted file mode 100644 index d4b0b14d5..000000000 --- a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/Part3.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/PartHighlightImprove.vue b/src/modules/05_placement/components/probation/FormEvaluation/SubForm/PartHighlightImprove.vue deleted file mode 100644 index 5dc58496c..000000000 --- a/src/modules/05_placement/components/probation/FormEvaluation/SubForm/PartHighlightImprove.vue +++ /dev/null @@ -1,45 +0,0 @@ - - From 28d41d67233a074958a1bc14120bed3a5ec12741 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 10 Aug 2023 09:38:05 +0700 Subject: [PATCH 074/113] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/OrderPlacement/step/step02.vue | 8 +++++--- .../components/OrderPlacement/step/step04.vue | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step02.vue b/src/modules/05_placement/components/OrderPlacement/step/step02.vue index 15087cc43..0e95fd912 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step02.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step02.vue @@ -371,7 +371,7 @@ const columns = ref([ ]); const rows = ref([]); const rows2 = ref([]); -const selected = ref([]); +const selected = ref([]); const orderId = ref(route.params.orderid.toString()); onMounted(async () => { @@ -570,7 +570,7 @@ const putSalary = async (salary: any) => { modalData.value = { salaryAmount: Number(salary.salaryAmount), positionSalaryAmount: Number(salary.positionSalaryAmount), - mouthSalaryAmount: Number(salary.mouthSalaryAmount), + monthSalaryAmount: Number(salary.mouthSalaryAmount), }; $q.dialog({ title: "ยืนยันการบันทึกข้อมูล", @@ -621,7 +621,9 @@ const fetchaddlist = async (id: string) => { sequence: r.sequence !== null ? r.sequence : 0, refRecordId: r.refRecordId, })); - rows2.value = list.filter((e: any) => e.selectStatus === false); + rows2.value = list; + selected.value = rows.value; + // rows2.value = list.filter((e: any) => e.selectStatus === false); }) .catch((e) => { messageError($q, e); diff --git a/src/modules/05_placement/components/OrderPlacement/step/step04.vue b/src/modules/05_placement/components/OrderPlacement/step/step04.vue index 700cc0555..182c2598a 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step04.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step04.vue @@ -573,8 +573,8 @@ const save = () => { await putOrderData(); await postfileOrder(); await postfileTailer(); - // await fetchAttachment(orderId.value); - // await fecthstatusOrder(orderId.value); + await fetchAttachment(orderId.value); + await fecthstatusOrder(orderId.value); }) .onCancel(() => {}) .onDismiss(() => {}); @@ -606,7 +606,7 @@ const postfileOrder = async () => { const postfileTailer = async () => { const formData = new FormData(); formData.append("File", fileTailer.value); - await http.post(config.API.attachmentOrderId(orderId.value), formData); + await http.post(config.API.attachmentFileId(orderId.value), formData); }; const clickExecute = async (id: string) => { $q.dialog({ From 7b0f086e48428ff5f7910cdb25604fd44a976fdf Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 10 Aug 2023 09:40:58 +0700 Subject: [PATCH 075/113] no message --- .../components/OrderPlacement/step/step02.vue | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step02.vue b/src/modules/05_placement/components/OrderPlacement/step/step02.vue index 0e95fd912..a64b88f85 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step02.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step02.vue @@ -410,6 +410,7 @@ const getData = async (id: string) => { }); // console.log("list", list); rows.value = list; + selected.value = rows.value; }) .catch((e) => { messageError($q, e); @@ -675,33 +676,32 @@ const click = (e: any) => { }; const save = () => { - $q.dialog({ - title: "ยืนยันการบันทึกข้อมูล", - message: "ต้องการยืนยันการบันทึกข้อมูลนี้ใช่หรือไม่?", - cancel: { - flat: true, - color: "negative", - }, - persistent: true, - }).onOk(async () => { - success($q, "บันทึกข้อมูลสำเร็จ"); - next(); - }); - // if (selected.value.length > 0) { - // next(); - // } else { - // dialogMessage( - // $q, - // "ข้อความแจ้งเตือน", - // "กรุณาเลือกรายชื่อ", - // "warning", - // undefined, - // "orange", - // undefined, - // undefined, - // true - // ); - // } + if (selected.value.length > 0) { + $q.dialog({ + title: "ยืนยันการบันทึกข้อมูล", + message: "ต้องการยืนยันการบันทึกข้อมูลนี้ใช่หรือไม่?", + cancel: { + flat: true, + color: "negative", + }, + persistent: true, + }).onOk(async () => { + success($q, "บันทึกข้อมูลสำเร็จ"); + next(); + }); + } else { + dialogMessage( + $q, + "ข้อความแจ้งเตือน", + "กรุณาเลือกรายชื่อ", + "warning", + undefined, + "orange", + undefined, + undefined, + true + ); + } }; const selectData = (row: any) => {}; From 414eca616dac09dc7bdf631f4facbfdfc7356455 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Thu, 10 Aug 2023 09:50:35 +0700 Subject: [PATCH 076/113] assignList --- src/api/05_placement/api.probation.ts | 2 + .../components/probation/ProbationDetail.vue | 104 ++++++++---------- .../05_placement/interface/request/Main.ts | 13 ++- 3 files changed, 57 insertions(+), 62 deletions(-) diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index 56033ced6..1d3f01bfb 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -23,5 +23,7 @@ export default { saveFinish: (personalId: string) => `${finish}/probation-assign?personal_id=${personalId}`, personalAdd: () => `${personal}/add`, + probationGetAssignList: (personalId:string) => + `${finish}/probation-assign-list?personal_id=${personalId}` // clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}` }; diff --git a/src/modules/05_placement/components/probation/ProbationDetail.vue b/src/modules/05_placement/components/probation/ProbationDetail.vue index 628b2f7c0..c2ec61b05 100644 --- a/src/modules/05_placement/components/probation/ProbationDetail.vue +++ b/src/modules/05_placement/components/probation/ProbationDetail.vue @@ -66,7 +66,9 @@ color="red" /> - {{ probation_status == 'PENDING' ? 'อยู่ในระหว่างการทดลองงาน' : '' }} + {{ + probation_status == "PENDING" ? "อยู่ในระหว่างการทดลองงาน" : "" + }}
@@ -155,7 +157,7 @@
@@ -191,18 +193,18 @@ + diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index 382717fb1..2ea3c3c63 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -35,19 +35,25 @@
ตำแหน่งในสายงาน
-
{{ position }}
+
+ {{ responseData.positionTypeOld }} +
ระดับ
-
{{ level }}
+
+ {{ responseData.positionLevelOld }} +
สังกัด
-
{{ institution }}
+
+ {{ responseData.organizationPositionOld }} +
@@ -59,16 +65,17 @@
ข้อมูลการขอโอน
หน่วยงานที่ขอโอนไป
-
{{ organization }}
+
+ {{ responseData.organization }} +
เหตุผลที่ขอโอน
-
{{ reason }}
+
+ {{ responseData.reason }} +
@@ -102,12 +113,10 @@
- @@ -116,40 +125,56 @@ {{ props.rowIndex + 1 }} - - {{ props.row.noteTitle }} + + {{ props.row.fileName }} - + ไฟล์ PDF - + ไฟล์ WORD - +
diff --git a/src/modules/05_placement/interface/response/Transfer.ts b/src/modules/05_placement/interface/response/Transfer.ts new file mode 100644 index 000000000..19a1523a9 --- /dev/null +++ b/src/modules/05_placement/interface/response/Transfer.ts @@ -0,0 +1,38 @@ +interface ResponseData { + createdAt: Date; + date: Date; + id: string; + isActive: boolean; + organization: string; + organizationPositionOld: string; + posNo: string; + position: string; + positionLevel: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + reason: string; + salary: number; + status: string; +} + +interface TypeFile { + fileName: string; + pathName: string; +} + +interface ResponseDataDetail { + createdAt: Date; + date: Date; + id: string; + organization: string; + organizationPositionOld: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + reason: string; + salary: number; + status: string; +} + +export type { ResponseData, ResponseDataDetail, TypeFile }; From 054802c8b7a699be7d0f7af32ced1d0ea72538ea Mon Sep 17 00:00:00 2001 From: waruneeta Date: Thu, 10 Aug 2023 17:58:18 +0700 Subject: [PATCH 079/113] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=AA=E0=B8=A3=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=E0=B9=80=E0=B8=A1=E0=B8=99=E0=B8=B9,=20?= =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B9=80=E0=B8=A1?= =?UTF-8?q?=E0=B8=99=E0=B8=B9=E0=B9=83=E0=B8=99=E0=B8=97=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface/request/main/main.ts | 104 ++- .../04_registry/components/Profile.vue | 48 +- .../components/PersonalList/Table.vue | 2 +- .../components/Receive/receiveMain.vue | 2 +- .../components/Transfer/transferMain.vue | 2 +- src/modules/05_placement/router.ts | 52 -- src/modules/08_registryEmployee/router.ts | 8 +- .../08_registryEmployee/views/Main.vue | 6 +- .../08_registryEmployee/views/information.vue | 2 +- .../components/Add.vue} | 0 .../components/Detail.vue} | 11 +- .../components/Main.vue} | 185 +---- .../components}/step/step01.vue | 0 .../10_order/components/step/step02.vue | 728 ++++++++++++++++++ .../components}/step/step03.vue | 0 .../components}/step/step04.vue | 0 src/modules/10_order/interface/index/Main.ts | 218 ++++++ .../10_order/interface/request/Main.ts | 12 + .../10_order/interface/request/Order.ts | 7 + .../10_order/interface/response/Main.ts | 1 + .../10_order/interface/response/Order.ts | 44 ++ src/modules/10_order/router.ts | 40 + src/modules/10_order/store.ts | 100 +++ src/modules/10_order/views/Main.vue | 7 + src/router/index.ts | 2 + src/views/MainLayout.vue | 6 +- 26 files changed, 1337 insertions(+), 250 deletions(-) rename src/modules/{05_placement/components/OrderPlacement/addOrderPlacement.vue => 10_order/components/Add.vue} (100%) rename src/modules/{05_placement/components/OrderPlacement/detailOrderPlacement.vue => 10_order/components/Detail.vue} (88%) rename src/modules/{05_placement/components/OrderPlacement/MainOrderPlacement.vue => 10_order/components/Main.vue} (76%) rename src/modules/{05_placement/components/OrderPlacement => 10_order/components}/step/step01.vue (100%) create mode 100644 src/modules/10_order/components/step/step02.vue rename src/modules/{05_placement/components/OrderPlacement => 10_order/components}/step/step03.vue (100%) rename src/modules/{05_placement/components/OrderPlacement => 10_order/components}/step/step04.vue (100%) create mode 100644 src/modules/10_order/interface/index/Main.ts create mode 100644 src/modules/10_order/interface/request/Main.ts create mode 100644 src/modules/10_order/interface/request/Order.ts create mode 100644 src/modules/10_order/interface/response/Main.ts create mode 100644 src/modules/10_order/interface/response/Order.ts create mode 100644 src/modules/10_order/router.ts create mode 100644 src/modules/10_order/store.ts create mode 100644 src/modules/10_order/views/Main.vue diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 8b9fda266..1dc23be57 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -111,6 +111,22 @@ const menuList = readonly([ path: "registry", role: "registry", }, + { + key: 10, + icon: "o_contact_page", + activeIcon: "registry_employee_page", + label: "ทะเบียนประวัติลูกจ้าง", + path: "registry-employee", + role: "registryEmployee", + }, + { + key: 10, + icon: "o_list", + activeIcon: "order", + label: "ออกคำสั่ง", + path: "order", + role: "placement", + }, { key: 5, icon: "o_search", @@ -192,12 +208,12 @@ const menuList = readonly([ path: "placement", role: "placement", }, - { - key: 6.2, - label: "ออกคำสั่ง" /* ออกคำสั่งบรรจุ */, - path: "Orderplacement", - role: "placement", - }, + // { + // key: 6.2, + // label: "ออกคำสั่ง" /* ออกคำสั่งบรรจุ */, + // path: "Orderplacement", + // role: "placement", + // }, { key: 6.3, label: "การทดลองงาน" /* การทดลองงาน */, @@ -206,7 +222,7 @@ const menuList = readonly([ }, { key: 6.4, - label: "รายการคำขอโอน" /* */, + label: "รายการขอโอน" /* */, path: "transfer", role: "placement", }, @@ -218,13 +234,43 @@ const menuList = readonly([ }, { key: 6.6, - label: "คำสั่งช่วยราชการ/ส่งตัวกลับ" /* */, + label: "รายการช่วยราชการ" /* */, + // path: "help-government", path: "repatriation-order", role: "placement", }, + { + key: 6.7, + label: "รายการส่งตัวกลับ" /* */, + path: "repatriate", + role: "placement", + }, + { + key: 6.8, + label: "รายการแต่งตั้ง" /* */, + // path: "repatriate", + role: "placement", + }, + { + key: 6.9, + label: "รายการเลื่อน" /* */, + path: "postpone", + role: "placement", + }, + { + key: 6.1, + label: "รายการย้าย" /* */, + path: "move-order", + role: "placement", + }, + { + key: 6.1, + label: "รายการอื่นๆ" /* */, + path: "other-order", + role: "placement", + }, ], }, - { key: 7, icon: "mdi-account-cancel-outline", @@ -241,31 +287,43 @@ const menuList = readonly([ }, { key: 7.2, - label: "ลาออก", + label: "รายการลาออก", path: "resign", role: "retirement", }, + // { + // key: 7.3, + // label: "คำสั่งลาออก", + // path: "resign-order", + // role: "retirement", + // }, { key: 7.3, - label: "คำสั่งลาออก", - path: "resign-order", - role: "retirement", - }, - { - key: 7.4, label: "Exit interview", // path: "", role: "retirement", }, { - key: 7.5, - label: "ถึงแก่กรรม", + key: 7.4, + label: "รายการบันทึกการถึงแก่กรรม", path: "deceased", role: "retirement", }, + { + key: 7.5, + label: "รายการให้ออก", + path: "dismiss-order", + role: "retirement", + }, { key: 7.6, - label: "คำสั่งให้ออก ปลดออก ไล่ออก", + label: "รายการปลดออก", + path: "dismiss-order", + role: "retirement", + }, + { + key: 7.7, + label: "รายการไล่ออก", path: "dismiss-order", role: "retirement", }, @@ -363,14 +421,6 @@ const menuList = readonly([ }, ], }, - { - key: 10, - icon: "o_contact_page", - activeIcon: "contact_page", - label: "ทะเบียนประวัติลูกจ้าง", - path: "registryEmployee", - role: "registryEmployee", - }, ]); const tabList = readonly([ diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index db03c712a..ee54e19eb 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -154,33 +154,69 @@
- + + + + + ช่วยราชการ + + + + + + ส่งตัวกลับ + + + + + + แต่งตั้ง + + + + + + เลื่อน + + + + + + ย้าย + + ถึงแก่กรรม - + ให้ออกจากราชการ - + ปลดออกจากราชการ - + ไล่ออกจากราชการ + + + + อื่นๆ + + @@ -986,8 +1022,8 @@ const closeKp7Short = () => { dialogShort.value = false; }; -const clickaddOrder = () => { - router.push("/dismiss-order/add"); +const postAdd = () => { + // router.push("/dismiss-order/add"); }; const downloadKP7 = () => {}; diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index bb19d36fa..40c9ee9ec 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -1140,7 +1140,7 @@ const paginationLabel = (start: number, end: number, total: number) => { { { import("@/modules/05_placement/components/PersonalList/Detail.vue"); const PlacementPersonalDetail = () => import("@/modules/05_placement/components/PersonalDetail/Detail.vue"); -const addOrderPlacement = () => - import( - "@/modules/05_placement/components/OrderPlacement/addOrderPlacement.vue" - ); -const MainOrderPlacement = () => - import( - "@/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue" - ); -const detailOrderReplace = () => - import( - "@/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue" - ); // ระบบทดลองงาน const mainProbation = () => @@ -86,46 +74,6 @@ export default [ Role: "placement", }, }, - { - path: "/placement/order", - name: "Orderplacement", - component: MainOrderPlacement, - meta: { - Auth: true, - Key: [6.2], - Role: "placement", - }, - }, - { - path: "/placement/order/add", - name: "Orderplacementadd", - component: detailOrderReplace, - meta: { - Auth: true, - Key: [6.9], - Role: "placement", - }, - }, - { - path: "/placement/order/detail/:orderid", - name: "OrderplacementDetail", - component: detailOrderReplace, - meta: { - Auth: true, - Key: [6.2], - Role: "placement", - }, - }, - { - path: "/placement/addOrderPlacement", - name: "addOrderPlacement", - component: addOrderPlacement, - meta: { - Auth: true, - Key: [6.2], - Role: "placement", - }, - }, { path: "/probation", name: "probation", diff --git a/src/modules/08_registryEmployee/router.ts b/src/modules/08_registryEmployee/router.ts index 130b90438..49f48ff78 100644 --- a/src/modules/08_registryEmployee/router.ts +++ b/src/modules/08_registryEmployee/router.ts @@ -17,8 +17,8 @@ const EditDetail = defineAsyncComponent( export default [ { - path: "/registryEmployee", - name: "registryEmployee", + path: "/registry-employee", + name: "registry-employee", component: Main, meta: { Auth: true, @@ -37,7 +37,7 @@ export default [ // }, // }, { - path: "/registryEmployee/add", + path: "/registry-employee/add", name: "registryEmployeeAdd", component: Detail, meta: { @@ -47,7 +47,7 @@ export default [ }, }, { - path: "/registryEmployee/edit/:id", + path: "/registry-employee/edit/:id", name: "registryEmployeeEdit", component: EditDetail, meta: { diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 36e9e8553..5e84ae330 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -1343,7 +1343,7 @@ const modalOpenClose = () => { }; const next = (id: string) => { - router.push(`/registryEmployee/${id}`); + router.push(`/registry-employee/${id}`); }; const resetFilter = () => { @@ -1381,13 +1381,13 @@ const clickClose = async () => { const clickAdd = () => { // modal.value = true; - router.push(`/registryEmployee/add`); + router.push(`/registry-employee/add`); // router.push(`/placement/detail`); }; // ดูรายการแก้ไขรายชื่อ const redirectToPage = (id?: string) => { - router.push(`/registryEmployee/edit/${id}`); + router.push(`/registry-employee/edit/${id}`); }; const editDetail = async (row: any) => { await getPosition(row.id); diff --git a/src/modules/08_registryEmployee/views/information.vue b/src/modules/08_registryEmployee/views/information.vue index 8a030d692..f27c210a9 100644 --- a/src/modules/08_registryEmployee/views/information.vue +++ b/src/modules/08_registryEmployee/views/information.vue @@ -1112,7 +1112,7 @@ const saveData = async () => { }; const clickBack = () => { - router.push({ name: "registryEmployee" }); + router.push("/registry-employee"); }; const getClass = (val: boolean) => { diff --git a/src/modules/05_placement/components/OrderPlacement/addOrderPlacement.vue b/src/modules/10_order/components/Add.vue similarity index 100% rename from src/modules/05_placement/components/OrderPlacement/addOrderPlacement.vue rename to src/modules/10_order/components/Add.vue diff --git a/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue b/src/modules/10_order/components/Detail.vue similarity index 88% rename from src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue rename to src/modules/10_order/components/Detail.vue index 35f34e817..8a5c8b4db 100644 --- a/src/modules/05_placement/components/OrderPlacement/detailOrderPlacement.vue +++ b/src/modules/10_order/components/Detail.vue @@ -24,7 +24,6 @@ import { useRouter } from "vue-router"; import { ref, defineAsyncComponent, onMounted, onUnmounted } from "vue"; import type { QStepper } from "quasar"; -import { useProbationDataStore } from "@/modules/05_placement/store"; import { useRoute } from "vue-router"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -32,24 +31,22 @@ const route = useRoute(); const orderId_params = route.params.orderid; -const probationData = useProbationDataStore(); -const { stepOrder, setStepOrder } = probationData; const step01 = defineAsyncComponent( () => - import("@/modules/05_placement/components/OrderPlacement/step/step01.vue") + import("@/modules/10_order/components/step/step01.vue") ); const step02 = defineAsyncComponent( () => - import("@/modules/05_placement/components/OrderPlacement/step/step02.vue") + import("@/modules/10_order/components/step/step02.vue") ); const step03 = defineAsyncComponent( () => - import("@/modules/05_placement/components/OrderPlacement/step/step03.vue") + import("@/modules/10_order/components/step/step03.vue") ); const step04 = defineAsyncComponent( () => - import("@/modules/05_placement/components/OrderPlacement/step/step04.vue") + import("@/modules/10_order/components/step/step04.vue") ); const router = useRouter(); diff --git a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue b/src/modules/10_order/components/Main.vue similarity index 76% rename from src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue rename to src/modules/10_order/components/Main.vue index ea400107e..f5ed2ae12 100644 --- a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue +++ b/src/modules/10_order/components/Main.vue @@ -4,33 +4,12 @@
- +
- + เพิ่มข้อมูล + + + + + +
+
+ + + + +
+ +
+ + + + + +
+
+ + + + + + + +
+
+
+
+ +
+ +
+ + +
+ +
+ + +
+
+
+
+
+ + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/05_placement/components/OrderPlacement/step/step03.vue b/src/modules/10_order/components/step/step03.vue similarity index 100% rename from src/modules/05_placement/components/OrderPlacement/step/step03.vue rename to src/modules/10_order/components/step/step03.vue diff --git a/src/modules/05_placement/components/OrderPlacement/step/step04.vue b/src/modules/10_order/components/step/step04.vue similarity index 100% rename from src/modules/05_placement/components/OrderPlacement/step/step04.vue rename to src/modules/10_order/components/step/step04.vue diff --git a/src/modules/10_order/interface/index/Main.ts b/src/modules/10_order/interface/index/Main.ts new file mode 100644 index 000000000..45d341f54 --- /dev/null +++ b/src/modules/10_order/interface/index/Main.ts @@ -0,0 +1,218 @@ +interface DataOption { + id: number | null; + name: string; + disable?: boolean; +} +interface DataOption1 { + id: string | null; + name: string | null; + disable?: boolean; +} +interface DataOptionInsignia { + id: string; + name: string; + typeName: string; +} + +interface optionData { + id: string; + name: string; +} + +interface EduOps { + levelOptions: optionData[]; + positionPathOptions: optionData[]; +} + +interface InformationOps { + prefixOps: optionData[]; + genderOps: optionData[]; + bloodOps: optionData[]; + statusOps: optionData[]; + religionOps: optionData[]; + employeeClassOps: optionData[]; + employeeTypeOps: optionData[]; +} + +interface InsigniaOps { + insigniaOptions: DataOptionInsignia[]; +} + +interface Pagination { + rowsPerPage: number; +} + +interface treeTab { + id: string; + label: string; + children: treeTab[]; +} + +interface CheckboxItem { + id: number; + label: string; +} + +interface Property { + name: string; + value: boolean; +} + +interface PointExam { + pointA: number; + pointB: number; + pointC: number; + pointTotalA: number; + pointTotalB: number; + pointTotalC: number; + point: number; + pointTotal: number; + examNumber: number; + examRound: number; + pass: string | null; +} + +interface Education { + id: string; + educationLevel: string; + educationLevelId: string; + institute: string; + degree: string; + field: string; + gpa: string; + country: string; + duration: string; + other: string; + fundName: string; + durationYear: number; + finishDate: Date; + isDate: string; + startDate: Date; + endDate: Date; + positionPath: string; + isEducation: boolean; +} + +interface Family { + couple: string; + marryPrefix: string; + marryPrefixId: string; + marryFirstName: string; + marryLastName: string; + marryOccupation: string; + fatherPrefix: string; + fatherPrefixId: string; + fatherFirstName: string; + fatherLastName: string; + fatherOccupation: string; + motherPrefix: string; + motherPrefixId: string; + motherFirstName: string; + motherLastName: string; + motherOccupation: string; +} + +interface Address { + registAddress: string; + registSubDistrict: string; + registSubDistrictId: string; + registZipCode: string; + registDistrict: string; + registDistrictId: string; + registProvince: string; + registProvinceId: string; + currentAddress: string; + currentSubDistrict: string; + currentSubDistrictId: string; + currentZipCode: string; + currentDistrict: string; + currentDistrictId: string; + currentProvince: string; + currentProvinceId: string; + registSame: string; +} + +interface Certificate { + id: string; + certificateNo: string; + issuer: string; + issueDate: Date; + expireDate: Date; + certificateType: string; +} + +const AddressDataDefualt: Address = { + registAddress: "", + currentAddress: "", + registSubDistrict: "", + registSubDistrictId: "", + registZipCode: "", + registDistrict: "", + registDistrictId: "", + registProvince: "", + registProvinceId: "", + currentSubDistrict: "", + currentSubDistrictId: "", + currentZipCode: "", + currentDistrict: "", + currentDistrictId: "", + currentProvince: "", + currentProvinceId: "", + registSame: "0", +}; + +const FamilyDataDefualt: Family = { + couple: "0", + marryPrefix: "", + marryPrefixId: "", + marryFirstName: "", + marryLastName: "", + marryOccupation: "", + fatherPrefix: "", + fatherPrefixId: "", + fatherFirstName: "", + fatherLastName: "", + fatherOccupation: "", + motherPrefix: "", + motherPrefixId: "", + motherFirstName: "", + motherLastName: "", + motherOccupation: "", +}; +interface Assign { + id: number; + personal_id: string; + knowlage_skill_map_no: number; + round_no: number; + date_start: Date; + date_finish: Date; + behavior_desc: string; + other_desc: string; + other4_desc: string; + othor5_no1_desc: string; + othor5_no2_desc: string; + experimenter_dated: Date; + createdAt: Date; + updatedAt: Date; +} +export type { + DataOption, + DataOptionInsignia, + treeTab, + InformationOps, + Pagination, + EduOps, + DataOption1, + InsigniaOps, + CheckboxItem, + Property, + PointExam, + Education, + Family, + Address, + optionData, + Certificate, + Assign, +}; + +export { AddressDataDefualt, FamilyDataDefualt }; diff --git a/src/modules/10_order/interface/request/Main.ts b/src/modules/10_order/interface/request/Main.ts new file mode 100644 index 000000000..1cbcc63ba --- /dev/null +++ b/src/modules/10_order/interface/request/Main.ts @@ -0,0 +1,12 @@ +interface FormOrderPlacementMainData { + Order: string; + OrderNum: string; + fiscalYear: number; + OrderDate: string; + OrderBy: string; + Signer: string; + OrderStatus: string; + OrderType: string; +} + +export type { FormOrderPlacementMainData }; \ No newline at end of file diff --git a/src/modules/10_order/interface/request/Order.ts b/src/modules/10_order/interface/request/Order.ts new file mode 100644 index 000000000..d7e306c25 --- /dev/null +++ b/src/modules/10_order/interface/request/Order.ts @@ -0,0 +1,7 @@ +interface RequestCopyOrder { + personalId: string; + emailChannel: boolean; + inboxChannel: boolean; +} + +export type { RequestCopyOrder }; diff --git a/src/modules/10_order/interface/response/Main.ts b/src/modules/10_order/interface/response/Main.ts new file mode 100644 index 000000000..e4ea7770c --- /dev/null +++ b/src/modules/10_order/interface/response/Main.ts @@ -0,0 +1 @@ +export type {}; diff --git a/src/modules/10_order/interface/response/Order.ts b/src/modules/10_order/interface/response/Order.ts new file mode 100644 index 000000000..375361a97 --- /dev/null +++ b/src/modules/10_order/interface/response/Order.ts @@ -0,0 +1,44 @@ +interface ResponseData { + education: string; + idCard: string; + name: string; + personalId: string; + selectStatus: boolean; + sequence: number; + refRecordId: string +} + +interface ResponseOrganiz { + firstName: string; + idCard: string; + lastName: string; + name: string; + position: string; + prefixId: string; + profileId: string; + unit: string; +} + +interface ResponseCopyOrder { + emailChannel: boolean; + idCard: string; + inboxChannel: boolean; + name: string; + personalId: string; + position: string; + selectStatus: boolean; + sequence: number; + unit: string; +} + +interface DataCopyOrder { + personalId: string; + name: string; + idCard: string; + position: string; + unit: string; + send: string; + mutiselect: number[]; +} + +export type { ResponseData, ResponseOrganiz, ResponseCopyOrder, DataCopyOrder }; diff --git a/src/modules/10_order/router.ts b/src/modules/10_order/router.ts new file mode 100644 index 000000000..a059df203 --- /dev/null +++ b/src/modules/10_order/router.ts @@ -0,0 +1,40 @@ +/** + * Router บรรจุ แต่งตั้ง ย้าย โอน (Placement) + */ + +const AddPage = () => + import("@/modules/10_order/components/Add.vue"); +const MainOrder = () => import("@/modules/10_order/components/Main.vue"); +const DetailPage = () => + import("@/modules/10_order/components/Detail.vue"); + +export default [ + { + path: "/order", + name: "order", + component: MainOrder, + meta: { + Auth: true, + Key: [10], + Role: "placement", + }, + }, + { + path: "/order/add", + name: "OrderAdd", + component: AddPage, + meta: { + Auth: true, + Role: "placement", + }, + }, + { + path: "/order/detail/:orderid", + name: "OrderDetail", + component: DetailPage, + meta: { + Auth: true, + Role: "placement", + }, + }, +]; diff --git a/src/modules/10_order/store.ts b/src/modules/10_order/store.ts new file mode 100644 index 000000000..dff32467e --- /dev/null +++ b/src/modules/10_order/store.ts @@ -0,0 +1,100 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; +import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main"; + +export const useOrderPlacementDataStore = defineStore("placementOrder", () => { + interface placementOrder { + mappingPosition: { columns: String[] }; + } + const placementOrderData = ref({ + mappingPosition: { columns: [] }, + }); + const changePlacementColumns = (system: String, val: String[]) => { + if (system == "mappingPosition") + placementOrderData.value.mappingPosition.columns = val; + localStorage.setItem( + "placementOrder", + JSON.stringify(placementOrderData.value) + ); + }; + + if (localStorage.getItem("placementOrder") !== null) { + placementOrderData.value = JSON.parse( + localStorage.getItem("placementOrder") || "{}" + ); + } + + const DataMainYearOrder = ref([]); // ข้อมูลจำนวนปี + const DataMainOrigOrder = ref([]); // ข้อมูลหลักดั้งเดิม + const DataMainUpdateOrder = ref([]); // ข้อมูลเปลี่ยนแปลง + const DataMainYearSetOrder = (val: FormOrderPlacementMainData[]) => + (DataMainYearOrder.value = val); + + const DataMainOrder = (val: FormOrderPlacementMainData[]) => + (DataMainOrigOrder.value = val); + + const DataUpdateOrder = ( + filter_1: string, + filter_2: string, + filterYear: number | null + ) => { + DataMainUpdateOrder.value = []; + + if (filter_1 === "" && filter_2 === "" && filterYear === 0) { + DataMainUpdateOrder.value = DataMainOrigOrder.value; + } else if (filter_1 !== "" && filter_2 === "" && filterYear === 0) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => item.OrderType === filter_1 + ); + } else if (filter_1 !== "" && filter_2 !== "" && filterYear === null) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => item.OrderType === filter_1 && item.OrderStatus === filter_2 + ); + } else if (filter_1 !== "" && filter_2 === "" && filterYear !== 0) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => item.OrderType === filter_1 && item.fiscalYear === filterYear + ); + } else if (filter_1 === "" && filter_2 !== "" && filterYear === 0) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => item.OrderStatus === filter_2 + ); + } else if (filter_1 === "" && filter_2 === "" && filterYear !== 0) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => item.fiscalYear === filterYear + ); + } else if (filter_1 === "" && filter_2 !== "" && filterYear !== null) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => + item.OrderStatus === filter_2 && item.fiscalYear === filterYear + ); + } else if (filter_1 !== "" && filter_2 !== "" && filterYear === 0) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => item.OrderStatus === filter_2 && item.OrderType === filter_1 + ); + } else if (filter_1 !== "" && filter_2 !== "" && filterYear !== null) { + DataMainUpdateOrder.value = DataMainOrigOrder.value.filter( + (item) => + item.OrderType === filter_1 && + item.OrderStatus === filter_2 && + item.fiscalYear === filterYear + ); + } else if ( + filter_1 == "ทั้งหมด" && + filter_2 == "ทั้งหมด" && + filterYear !== null + ) { + DataMainUpdateOrder.value = DataMainOrigOrder.value; + } + }; + + return { + placementOrderData, + changePlacementColumns, + DataMainYearOrder, + DataMainOrigOrder, + DataMainUpdateOrder, + DataUpdateOrder, + DataMainYearSetOrder, + DataMainOrder, + }; +}); \ No newline at end of file diff --git a/src/modules/10_order/views/Main.vue b/src/modules/10_order/views/Main.vue new file mode 100644 index 000000000..dc47857b9 --- /dev/null +++ b/src/modules/10_order/views/Main.vue @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 28211f6e6..ee4354771 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -13,6 +13,7 @@ import ModuleRetirement from "@/modules/06_retirement/router"; import ModuleInsignia from "@/modules/07_insignia/router"; import ModuleRegistryEmployee from "@/modules/08_registryEmployee/router"; import ModuleCoin from "@/modules/09_coin/router"; +import ModuleOrder from "@/modules/10_order/router"; // TODO: ใช้หรือไม่? import keycloak from "@/plugins/keycloak"; @@ -44,6 +45,7 @@ const router = createRouter({ ...ModuleInsignia, ...ModuleRegistryEmployee, ...ModuleCoin, + ...ModuleOrder, ], }, /** diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 76ee21a07..04eee3f99 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -221,9 +221,11 @@ const myEventHandler = (e: any, setSCroll: boolean) => { */ const activeMenu = (path: string) => { if (path == "dashboard" && route.fullPath == "/") return true; - + if (path == "registry" && route.fullPath == "/registry-employee") return false; if (path == "registry" && route.fullPath == "/") return false; - const bool = route.fullPath.includes(path); + // if (path != "registry" && path == "registryEmployee" && route.fullPath == "/registryEmployee") return true; + const bool = route.fullPath.includes(`/${path}`); + return bool; }; /** From 5b800ed351b5b3b605d22c713feff9c5f3b8391c Mon Sep 17 00:00:00 2001 From: waruneeta Date: Thu, 10 Aug 2023 20:13:12 +0700 Subject: [PATCH 080/113] =?UTF-8?q?-=20=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20step?= =?UTF-8?q?=204=20hide=20download=20-=20=E0=B8=9B=E0=B8=A3=E0=B8=B1?= =?UTF-8?q?=E0=B8=9A=E0=B9=80=E0=B8=A1=E0=B8=99=E0=B8=B9=E0=B9=83=E0=B8=99?= =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4?= =?UTF-8?q?=20=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B9=80=E0=B8=A1=E0=B8=99?= =?UTF-8?q?=E0=B8=B9=20(=E0=B9=81=E0=B8=95=E0=B9=88=E0=B8=87=E0=B8=95?= =?UTF-8?q?=E0=B8=B1=E0=B9=89=E0=B8=87-=E0=B9=80=E0=B8=A5=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface/request/main/main.ts | 19 +- .../04_registry/components/Profile.vue | 8 +- .../10_order/components/step/step04.vue | 290 ++++-------------- 3 files changed, 64 insertions(+), 253 deletions(-) diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 1dc23be57..ab401c6ff 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -235,8 +235,7 @@ const menuList = readonly([ { key: 6.6, label: "รายการช่วยราชการ" /* */, - // path: "help-government", - path: "repatriation-order", + path: "help-government", role: "placement", }, { @@ -247,26 +246,20 @@ const menuList = readonly([ }, { key: 6.8, - label: "รายการแต่งตั้ง" /* */, - // path: "repatriate", + label: "รายการแต่งตั้ง-เลื่อน" /* */, + path: "appoint-promote", role: "placement", }, { key: 6.9, - label: "รายการเลื่อน" /* */, - path: "postpone", - role: "placement", - }, - { - key: 6.1, label: "รายการย้าย" /* */, - path: "move-order", + path: "move-list", role: "placement", }, { - key: 6.1, + key: 6.10, label: "รายการอื่นๆ" /* */, - path: "other-order", + path: "other", role: "placement", }, ], diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index ee54e19eb..b2cda7dd5 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -172,13 +172,7 @@ - แต่งตั้ง - - - - - - เลื่อน + แต่งตั้ง-เลื่อน diff --git a/src/modules/10_order/components/step/step04.vue b/src/modules/10_order/components/step/step04.vue index 182c2598a..f6945d914 100644 --- a/src/modules/10_order/components/step/step04.vue +++ b/src/modules/10_order/components/step/step04.vue @@ -1,36 +1,22 @@ - - - - + diff --git a/src/modules/06_retirement/components/DismissOrder/outRegistry.vue b/src/modules/06_retirement/components/DismissOrder/outRegistry.vue new file mode 100644 index 000000000..42287dfb1 --- /dev/null +++ b/src/modules/06_retirement/components/DismissOrder/outRegistry.vue @@ -0,0 +1,443 @@ + + + diff --git a/src/modules/06_retirement/components/DismissOrder/step01.vue b/src/modules/06_retirement/components/DismissOrder/step01.vue deleted file mode 100644 index 92ce9bc7d..000000000 --- a/src/modules/06_retirement/components/DismissOrder/step01.vue +++ /dev/null @@ -1,353 +0,0 @@ - - - diff --git a/src/modules/06_retirement/components/DismissOrder/step02.vue b/src/modules/06_retirement/components/DismissOrder/step02.vue deleted file mode 100644 index 8d58d929e..000000000 --- a/src/modules/06_retirement/components/DismissOrder/step02.vue +++ /dev/null @@ -1,684 +0,0 @@ - - - diff --git a/src/modules/06_retirement/components/DismissOrder/step03.vue b/src/modules/06_retirement/components/DismissOrder/step03.vue deleted file mode 100644 index d7521a80d..000000000 --- a/src/modules/06_retirement/components/DismissOrder/step03.vue +++ /dev/null @@ -1,580 +0,0 @@ - - - diff --git a/src/modules/06_retirement/components/Expulsion/expulsionMain.vue b/src/modules/06_retirement/components/Expulsion/expulsionMain.vue new file mode 100644 index 000000000..1e5895491 --- /dev/null +++ b/src/modules/06_retirement/components/Expulsion/expulsionMain.vue @@ -0,0 +1,576 @@ + + + diff --git a/src/modules/06_retirement/components/Expulsion/expulsionRegistry.vue b/src/modules/06_retirement/components/Expulsion/expulsionRegistry.vue new file mode 100644 index 000000000..11a0c84ce --- /dev/null +++ b/src/modules/06_retirement/components/Expulsion/expulsionRegistry.vue @@ -0,0 +1,443 @@ + + + diff --git a/src/modules/06_retirement/interface/response/discharged.ts b/src/modules/06_retirement/interface/response/discharged.ts new file mode 100644 index 000000000..8a575f438 --- /dev/null +++ b/src/modules/06_retirement/interface/response/discharged.ts @@ -0,0 +1,45 @@ +interface ResponseData { + createdAt: Date; + date: Date; + firstName: string; + id: string; + isActive: boolean; + lastName: string; + organization: string; + organizationPositionOld: string; + posNo: string; + position: string; + positionLevel: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + prefix: string; + reason: string; + salary: number; + status: string; + fullname: string; + statustext: string; +} + +interface TypeFile { + fileName: string; + pathName: string; +} + +interface ResponseDataDetail { + avataPath: string; + createdAt: Date; + date: Date; + id: string; + organization: string; + organizationPositionOld: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + reason: string; + salary: number; + status: string; + fullname: string; +} + +export type { ResponseData, ResponseDataDetail, TypeFile }; diff --git a/src/modules/06_retirement/interface/response/expulsion.ts b/src/modules/06_retirement/interface/response/expulsion.ts new file mode 100644 index 000000000..8a575f438 --- /dev/null +++ b/src/modules/06_retirement/interface/response/expulsion.ts @@ -0,0 +1,45 @@ +interface ResponseData { + createdAt: Date; + date: Date; + firstName: string; + id: string; + isActive: boolean; + lastName: string; + organization: string; + organizationPositionOld: string; + posNo: string; + position: string; + positionLevel: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + prefix: string; + reason: string; + salary: number; + status: string; + fullname: string; + statustext: string; +} + +interface TypeFile { + fileName: string; + pathName: string; +} + +interface ResponseDataDetail { + avataPath: string; + createdAt: Date; + date: Date; + id: string; + organization: string; + organizationPositionOld: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + reason: string; + salary: number; + status: string; + fullname: string; +} + +export type { ResponseData, ResponseDataDetail, TypeFile }; diff --git a/src/modules/06_retirement/interface/response/out.ts b/src/modules/06_retirement/interface/response/out.ts new file mode 100644 index 000000000..8a575f438 --- /dev/null +++ b/src/modules/06_retirement/interface/response/out.ts @@ -0,0 +1,45 @@ +interface ResponseData { + createdAt: Date; + date: Date; + firstName: string; + id: string; + isActive: boolean; + lastName: string; + organization: string; + organizationPositionOld: string; + posNo: string; + position: string; + positionLevel: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + prefix: string; + reason: string; + salary: number; + status: string; + fullname: string; + statustext: string; +} + +interface TypeFile { + fileName: string; + pathName: string; +} + +interface ResponseDataDetail { + avataPath: string; + createdAt: Date; + date: Date; + id: string; + organization: string; + organizationPositionOld: string; + positionLevelOld: string; + positionNumberOld: string; + positionTypeOld: string; + reason: string; + salary: number; + status: string; + fullname: string; +} + +export type { ResponseData, ResponseDataDetail, TypeFile }; diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index af06080ef..2a70e733f 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -3,14 +3,34 @@ */ const Main = () => import("@/modules/06_retirement/views/Main.vue"); -const Listretirement = () => import("@/modules/06_retirement/components/ListRetirement/TableList.vue") -const resignOrder = () => import("@/modules/06_retirement/components/resign/ResignOrder.vue"); -const resign = () => import("@/modules/06_retirement/components/resign/Resign.vue"); -const resignByid = () => import("@/modules/06_retirement/components/resign/ResignByid.vue"); -const deceased = () => import("@/modules/06_retirement/components/resign/Deceased.vue"); -const detaildeceased = () => import("@/modules/06_retirement/components/resign/DetailDeceased.vue"); -const dismissOrder = () => import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue"); -const addOrder = () => import("@/modules/06_retirement/components/DismissOrder/AddOrder.vue"); +const Listretirement = () => + import("@/modules/06_retirement/components/ListRetirement/TableList.vue"); +const resignOrder = () => + import("@/modules/06_retirement/components/resign/ResignOrder.vue"); +const resign = () => + import("@/modules/06_retirement/components/resign/Resign.vue"); +const resignByid = () => + import("@/modules/06_retirement/components/resign/ResignByid.vue"); +const deceased = () => + import("@/modules/06_retirement/components/resign/Deceased.vue"); +const detaildeceased = () => + import("@/modules/06_retirement/components/resign/DetailDeceased.vue"); +const dismissOrder = () => + import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue"); +const outDetail = () => + import("@/modules/06_retirement/components/DismissOrder/outRegistry.vue"); +const dischargedMain = () => + import("@/modules/06_retirement/components/Discharged/dischargedMain.vue"); +const dischargedDetails = () => + import( + "@/modules/06_retirement/components/Discharged/dischargedRegistry.vue" + ); +const expulsionMain = () => + import("@/modules/06_retirement/components/Expulsion/expulsionMain.vue"); + +const expulsionDetails = () => + import("@/modules/06_retirement/components/Expulsion/expulsionRegistry.vue"); + export default [ { path: "/retirement", @@ -96,6 +116,26 @@ export default [ path: "/dismiss-order", name: "dismiss-order", component: dismissOrder, + meta: { + Auth: true, + Key: [7.5], + Role: "retirement", + }, + }, + { + path: "/retirement/out/:id", + name: "outDetail", + component: outDetail, + meta: { + Auth: true, + Key: [7.5], + Role: "retirement", + }, + }, + { + path: "/discharged", + name: "discharged", + component: dischargedMain, meta: { Auth: true, Key: [7.6], @@ -103,14 +143,33 @@ export default [ }, }, { - path: "/dismiss-order/add", - name: "dismiss-order-add", - component: addOrder, + path: "/retirement/discharged/:id", + name: "dischargedDetails", + component: dischargedDetails, + meta: { + Auth: true, + Key: [7.6], + Role: "retirement", + }, + }, + { + path: "/expulsion", + name: "expulsion", + component: expulsionMain, + meta: { + Auth: true, + Key: [7.7], + Role: "retirement", + }, + }, + { + path: "/retirement/expulsion/:id", + name: "expulsionDetails", + component: expulsionDetails, meta: { Auth: true, Key: [7.7], Role: "retirement", }, }, - ]; diff --git a/src/modules/07_insignia/components/1_Proposals/listProposals.vue b/src/modules/07_insignia/components/1_Proposals/listProposals.vue index 7ea3a1235..8702e4e49 100644 --- a/src/modules/07_insignia/components/1_Proposals/listProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/listProposals.vue @@ -389,7 +389,7 @@ const clickDelete = (id: string) => { await http .delete(config.API.RoundInsignia(id)) .then((res) => { - success($q, "ลบข้อมูลการสอบสำเร็จ"); + success($q, "ลบข้อมูลการเสนอขอสำเร็จ"); fetchData(); }) .catch((e) => { From f7e686fbec58a3e201c05186e649ef7ce8878887 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 15 Aug 2023 17:58:41 +0700 Subject: [PATCH 104/113] =?UTF-8?q?api=20=E0=B9=81=E0=B8=95=E0=B9=88?= =?UTF-8?q?=E0=B8=87=E0=B8=95=E0=B8=B1=E0=B9=89=E0=B8=87=20-=20=E0=B9=80?= =?UTF-8?q?=E0=B8=A5=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=99=20,=E0=B8=AD?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 18 +- .../AppointMent/AppointmentModal.vue | 803 ++++++++++++++++++ .../components/AppointMent/Detail.vue | 446 ++++++++++ .../components/AppointMent/DialogHeader.vue | 29 + .../components/AppointMent/Main.vue | 734 ++++++++++++++++ .../05_placement/components/Other/Detail.vue | 135 +++ .../components/Other/DialogHeader.vue | 29 + .../05_placement/components/Other/Main.vue | 735 ++++++++++++++++ .../components/Other/OtherModal.vue | 799 +++++++++++++++++ src/modules/05_placement/router.ts | 46 + 10 files changed, 3770 insertions(+), 4 deletions(-) create mode 100644 src/modules/05_placement/components/AppointMent/AppointmentModal.vue create mode 100644 src/modules/05_placement/components/AppointMent/Detail.vue create mode 100644 src/modules/05_placement/components/AppointMent/DialogHeader.vue create mode 100644 src/modules/05_placement/components/AppointMent/Main.vue create mode 100644 src/modules/05_placement/components/Other/Detail.vue create mode 100644 src/modules/05_placement/components/Other/DialogHeader.vue create mode 100644 src/modules/05_placement/components/Other/Main.vue create mode 100644 src/modules/05_placement/components/Other/OtherModal.vue diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 655b9b247..36877c240 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -108,23 +108,33 @@ export default { // แต่งตั้ง-เลื่อน placemenAppointment, + appointmentMain: () => `${placement}/appointment`, + appointmentByid: (id: string) => `${placement}/appointment/${id}`, + appointmentDelete: (id: string) => `${placement}/appointment/${id}`, + appointmentPosition: (id: string) => `${placement}/appointment/position/${id}`, + apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`, // ช่วยราชการ placemenHelpGov, officerMain: () => `${placement}/officer`, - officerDetail: (id:string) => `${placement}/officer/${id}`, - officerMainDelete: (id:string) => `${placement}/officer/${id}`, + officerDetail: (id: string) => `${placement}/officer/${id}`, + officerMainDelete: (id: string) => `${placement}/officer/${id}`, officerMainReport: () => `${placement}/officer/report`, // ส่งตัวกลับ placemenRepatriation, repatriationMain: () => `${placement}/repatriation`, - repatriationDetail: (id:string) => `${placement}/repatriation/${id}`, - repatriationMainDelete: (id:string) => `${placement}/repatriation/${id}`, + repatriationDetail: (id: string) => `${placement}/repatriation/${id}`, + repatriationMainDelete: (id: string) => `${placement}/repatriation/${id}`, repatriationMainReport: () => `${placement}/repatriation/report`, // ขอย้าย placemenRelocation, // อื่นๆ placemenOther, + otherMain: () => `${placemenOther}`, + otherPosition: (id: string) => `${placemenOther}/position/${id}`, + otherReport: (id: string) => `${placemenOther}/report/${id}`, + otherByid: (id: string) => `${placemenOther}/${id}`, + }; diff --git a/src/modules/05_placement/components/AppointMent/AppointmentModal.vue b/src/modules/05_placement/components/AppointMent/AppointmentModal.vue new file mode 100644 index 000000000..8625c2b2a --- /dev/null +++ b/src/modules/05_placement/components/AppointMent/AppointmentModal.vue @@ -0,0 +1,803 @@ + + + + + diff --git a/src/modules/05_placement/components/AppointMent/Detail.vue b/src/modules/05_placement/components/AppointMent/Detail.vue new file mode 100644 index 000000000..c06310ff1 --- /dev/null +++ b/src/modules/05_placement/components/AppointMent/Detail.vue @@ -0,0 +1,446 @@ + + + diff --git a/src/modules/05_placement/components/AppointMent/DialogHeader.vue b/src/modules/05_placement/components/AppointMent/DialogHeader.vue new file mode 100644 index 000000000..a20e917b0 --- /dev/null +++ b/src/modules/05_placement/components/AppointMent/DialogHeader.vue @@ -0,0 +1,29 @@ + + + + diff --git a/src/modules/05_placement/components/AppointMent/Main.vue b/src/modules/05_placement/components/AppointMent/Main.vue new file mode 100644 index 000000000..2aa65f1e8 --- /dev/null +++ b/src/modules/05_placement/components/AppointMent/Main.vue @@ -0,0 +1,734 @@ + + + diff --git a/src/modules/05_placement/components/Other/Detail.vue b/src/modules/05_placement/components/Other/Detail.vue new file mode 100644 index 000000000..a03165d3c --- /dev/null +++ b/src/modules/05_placement/components/Other/Detail.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/modules/05_placement/components/Other/DialogHeader.vue b/src/modules/05_placement/components/Other/DialogHeader.vue new file mode 100644 index 000000000..a20e917b0 --- /dev/null +++ b/src/modules/05_placement/components/Other/DialogHeader.vue @@ -0,0 +1,29 @@ + + + + diff --git a/src/modules/05_placement/components/Other/Main.vue b/src/modules/05_placement/components/Other/Main.vue new file mode 100644 index 000000000..2e7b50c3c --- /dev/null +++ b/src/modules/05_placement/components/Other/Main.vue @@ -0,0 +1,735 @@ + + + diff --git a/src/modules/05_placement/components/Other/OtherModal.vue b/src/modules/05_placement/components/Other/OtherModal.vue new file mode 100644 index 000000000..b39a8d1a8 --- /dev/null +++ b/src/modules/05_placement/components/Other/OtherModal.vue @@ -0,0 +1,799 @@ + + + + + diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index 639e5a7b7..662b19093 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -57,6 +57,12 @@ const FormSaveResultAdd = () => import( "@/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue" ); +//แต่งตั้ง-เลื่อน +const AppointmentMain = () => import("@/modules/05_placement/components/AppointMent/Main.vue"); +const AppointmentDetail = () => import("@/modules/05_placement/components/AppointMent/Detail.vue"); +//อื่นๆ +const OtherMain = () => import("@/modules/05_placement/components/Other/Main.vue") +const OthertDetail = () => import("@/modules/05_placement/components/Other/Detail.vue"); export default [ { @@ -269,4 +275,44 @@ export default [ Role: "placement", }, }, + { + path: "appoint-promote", + name: "appoint-promote", + component: AppointmentMain, + meta: { + Auth: true, + Key: [6.8], + Role: "placement", + }, + }, + { + path: "appoint-promote/detail/:id", + name: "appoint-promote-detail", + component: AppointmentDetail, + meta: { + Auth: true, + Key: [6.8], + Role: "placement", + }, + }, + { + path: "other", + name: "other", + component: OtherMain, + meta: { + Auth: true, + Key: [6.9], + Role: "placement", + }, + }, + { + path: "other/detail/:id", + name: "other-detail", + component: OthertDetail, + meta: { + Auth: true, + Key: [6.9], + Role: "placement", + }, + }, ]; From 0decf3206e447503b65be40bf2eeb76264e75f45 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Tue, 15 Aug 2023 18:12:52 +0700 Subject: [PATCH 105/113] fix bug url api appointment --- src/api/05_placement/api.placement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 5e3012bdd..cb1e3ff68 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -8,7 +8,7 @@ const placemenHelpGov = `${placement}/officer`; const placemenRepatriation = `${placement}/repatriation`; const placemenRelocation = `${placement}/relocation`; const placemenOther = `${env.API_URI}/retirement/other`; -const placemenAppointment = `${env.API_URI}/retirement/appointment`; +const placemenAppointment = `${placement}/appointment`; export default { MainDetail: (year: number) => `${placement}/exam/${year}`, From f9f2b6dcbdf90b3e37ae4e686904e06bcaa6ceed Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Tue, 15 Aug 2023 20:51:07 +0700 Subject: [PATCH 106/113] Update api.retirement.ts --- src/api/06_retirement/api.retirement.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/api/06_retirement/api.retirement.ts b/src/api/06_retirement/api.retirement.ts index 3b0993b5b..24aea972b 100644 --- a/src/api/06_retirement/api.retirement.ts +++ b/src/api/06_retirement/api.retirement.ts @@ -28,10 +28,19 @@ export default { resignReject: (id: string) => `${retirement}/resign/reject/${id}`, // ปลดออก retirementDischarge, + listDischared: () => `${retirement}/dischared`, + discharedByid: (id: string) => `${retirement}/dischared/${id}`, + discharedReport: `${retirement}/dischared/report`, // ไล่ออก retirementExpulsion, + listExpulsion: () => `${retirement}/expulsion`, + expulsionByid: (id: string) => `${retirement}/expulsion/${id}`, + expulsionReport: `${retirement}/expulsion/report`, // ให้ออก retirementOut, + listOut: () => `${retirement}/out`, + outByid: (id: string) => `${retirement}/out/${id}`, + outReport: `${retirement}/out/report`, }; From 0b7fe157a6bcadefd859771c52b77f40b9ccab1c Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Tue, 15 Aug 2023 20:53:32 +0700 Subject: [PATCH 107/113] Update api.retirement.ts --- src/api/06_retirement/api.retirement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/06_retirement/api.retirement.ts b/src/api/06_retirement/api.retirement.ts index cfa582ad8..24aea972b 100644 --- a/src/api/06_retirement/api.retirement.ts +++ b/src/api/06_retirement/api.retirement.ts @@ -22,10 +22,10 @@ export default { // RetirementResign ระบบลาออก listResign: () => `${retirement}/resign`, + resignReport: `${retirement}/resign/report`, resingByid: (id: string) => `${retirement}/resign/${id}`, resignConfirm: (id: string) => `${retirement}/resign/confirm/${id}`, resignReject: (id: string) => `${retirement}/resign/reject/${id}`, - // ปลดออก retirementDischarge, listDischared: () => `${retirement}/dischared`, From 928c487126ce6476f3906ba9db0067dd46608a8f Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 16 Aug 2023 11:18:04 +0700 Subject: [PATCH 108/113] =?UTF-8?q?API=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=AD=E0=B8=B7=E0=B9=88=E0=B8=99?= =?UTF-8?q?=E0=B9=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_placement/components/Other/Detail.vue | 327 +++++++++++++- .../05_placement/components/Other/Main.vue | 411 +++++++----------- 2 files changed, 494 insertions(+), 244 deletions(-) diff --git a/src/modules/05_placement/components/Other/Detail.vue b/src/modules/05_placement/components/Other/Detail.vue index a03165d3c..d8f09f9b1 100644 --- a/src/modules/05_placement/components/Other/Detail.vue +++ b/src/modules/05_placement/components/Other/Detail.vue @@ -5,17 +5,30 @@ import { useRoute, useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive"; +import type { + TypeFile, + ResponseDataDetail, +} from "@/modules/05_placement/interface/response/Transfer"; +import type { QTableProps, QForm } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; +import keycloak from "@/plugins/keycloak"; const $q = useQuasar(); const route = useRoute(); const router = useRouter(); const mixin = useCounterMixin(); - const paramsId = route.params.id; -const { messageError, showLoader, hideLoader } = mixin; +const { + messageError, + showLoader, + hideLoader, + date2Thai, + dialogConfirm, + success, +} = mixin; +const roleAdmin = ref(false); const title = ref({ fullname: "", @@ -23,8 +36,37 @@ const title = ref({ positionLevelOld: "", positionTypeOld: "", }); +const responseData = ref({ + avataPath: "", + createdAt: new Date(), + date: new Date(), + id: "", + organization: "", + organizationPositionOld: "", + positionLevelOld: "", + positionNumberOld: "", + positionTypeOld: "", + reason: "", + salary: 0, + status: "", + fullname: "", +}); +const edit = ref(false); +const organizationPositionOld = ref(""); +const positionTypeOld = ref(""); +const positionLevelOld = ref(""); +const posNo = ref(""); +const salary = ref(0); +const organization = ref(""); +const date = ref(null); +const reason = ref(""); +const Otherdata = ref([]); onMounted(async () => { + if (keycloak.tokenParsed != null) { + roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1"); + console.log("roleAdmin===>", roleAdmin.value); + } await fecthOther(); }); @@ -32,22 +74,92 @@ const fecthOther = async () => { showLoader(); await http .get(config.API.otherByid(paramsId.toString())) + // .get(config.API.transferId(paramsId.toString())) .then((res: any) => { const data = res.data.result; + Otherdata.value = res.data.result; console.log(data); title.value.fullname = `${data.firstName ?? "-"} ${data.lastName ?? "-"}`; title.value.organizationPositionOld = data.organizationPositionOld ?? "-"; title.value.positionLevelOld = data.positionLevelOld ?? "-"; title.value.positionTypeOld = data.positionTypeOld ?? "-"; + + responseData.value.createdAt = data.createdAt; + responseData.value.date = + data.date !== null ? new Date(data.date) : new Date(); + responseData.value.id = data.id ?? ""; + responseData.value.organization = data.organization ?? ""; + responseData.value.organizationPositionOld = + data.organizationPositionOld ?? ""; + responseData.value.positionLevelOld = data.positionLevelOld ?? ""; + responseData.value.positionNumberOld = data.positionNumberOld ?? ""; + responseData.value.positionTypeOld = data.positionTypeOld ?? ""; + responseData.value.reason = data.reason ?? ""; + responseData.value.salary = data.salary !== null ? data.salary : 0; + responseData.value.status = data.status ?? ""; + responseData.value.avataPath = data.avataPath ?? ""; + responseData.value.fullname = `${data.firstName ?? "-"} ${ + data.lastName ?? "-" + }`; + + organizationPositionOld.value = data.organizationPositionOld ?? ""; + positionTypeOld.value = data.positionTypeOld ?? ""; + positionLevelOld.value = data.positionLevelOld ?? ""; + posNo.value = data.positionNumberOld ?? ""; + salary.value = data.amountOld ?? ""; + organization.value = data.organization ?? ""; + date.value = + data.positionDate !== null ? new Date(data.positionDate) : null; + reason.value = data.reason ?? ""; }) .catch((e) => { messageError($q, e); }) .finally(() => { hideLoader(); + edit.value = false; }); }; +const clickEdit = () => { + dialogConfirm($q, () => saveOther()); +}; +const saveOther = async () => { + // showLoader(); + let data = { + citizenId: Otherdata.value.citizenId, + prefixId: Otherdata.value.prefixId, + firstname: Otherdata.value.firstname, + lastname: Otherdata.value.lastname, + reason: reason.value, + organizationPositionOld: organizationPositionOld.value, + positionDate: date.value, + positionTypeOld: positionTypeOld.value, + positionLevelOld: positionLevelOld.value, + positionNumberOld: posNo.value, + amountOld: Number(salary.value), + }; + console.log(data); + + await http + .put(config.API.otherByid(paramsId.toString()), data) + .then(() => { + success($q, "แก้ไข้ข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + console.log(e); + }) + .finally(async () => { + await fecthOther(); + }); +}; +const getClass = (val: boolean) => { + return { + "full-width inputgreen cursor-pointer": val, + "full-width cursor-pointer": !val, + }; +}; From 1a7b4bf41808945f429524cd85a274734cfa25c5 Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Wed, 16 Aug 2023 12:55:07 +0700 Subject: [PATCH 109/113] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=A5?= =?UTF-8?q?=E0=B8=B0=E0=B9=80=E0=B8=AD=E0=B8=B5=E0=B8=A2=E0=B8=94=E0=B8=A3?= =?UTF-8?q?=E0=B8=B1=E0=B8=9A=E0=B9=82=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/00_dashboard/api.message.ts | 11 + src/api/index.ts | 14 +- src/app.config.ts | 6 + src/interface/request/main/main.ts | 6 +- src/interface/response/dashboard/dashboard.ts | 27 + .../components/Receive/receiveDetail2.vue | 881 +++++++++++++++++- .../components/Receive/receiveMain.vue | 267 +++--- .../components/Transfer/transferRegistry.vue | 2 +- .../interface/response/Receive.ts | 53 +- src/views/Dashboard.vue | 102 +- src/views/MainLayout.vue | 56 +- 11 files changed, 1283 insertions(+), 142 deletions(-) create mode 100644 src/api/00_dashboard/api.message.ts create mode 100644 src/interface/response/dashboard/dashboard.ts diff --git a/src/api/00_dashboard/api.message.ts b/src/api/00_dashboard/api.message.ts new file mode 100644 index 000000000..85e0c7b86 --- /dev/null +++ b/src/api/00_dashboard/api.message.ts @@ -0,0 +1,11 @@ +/** + * API Structure + Org Chart + */ +import env from "../index"; + +const message = `${env.API_DASHBOARD_URI}/message`; + +export default { + msgNotificate: `${message}/my-notifications`, + msgInbox: `${message}/my-inboxes`, +}; diff --git a/src/api/index.ts b/src/api/index.ts index 51f162272..be3edd2bf 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -28,6 +28,7 @@ const config = ref({ API_RETIREMENT_URI: "https://bma-ehr.frappet.synology.me/api/v1", API_PROBATION_URI: "https://bmaehr.joolsoft.com/nodeapi/v1", // API_PROBATION_URI: "http://192.168.1.151:7776/v1", + API_DASHBOARD_URI: "http://192.168.1.9:6026/api/v1", }, test: { API_URI: "http://localhost:5010/api/v1", @@ -72,7 +73,13 @@ const API_RETIREMENT_URI = ref( config.value[env.value].API_RETIREMENT_URI ); const API_URI_ORG_TREE = ref(config.value[env.value].API_URI_ORG_TREE); -const API_PROBATION_URI = ref(config.value[env.value].API_PROBATION_URI); +const API_PROBATION_URI = ref( + config.value[env.value].API_PROBATION_URI +); + +const API_DASHBOARD_URI = ref( + config.value[env.value].API_DASHBOARD_URI +); export default { env: env.value, @@ -86,6 +93,7 @@ export default { API_PLACEMENT_URI: API_PLACEMENT_URI.value, API_URI_ORG_TREE: API_URI_ORG_TREE.value, MEET_URI: MEET_URI.value, - API_RETIREMENT_URI:API_RETIREMENT_URI.value, - API_PROBATION_URI: API_PROBATION_URI.value + API_RETIREMENT_URI: API_RETIREMENT_URI.value, + API_PROBATION_URI: API_PROBATION_URI.value, + API_DASHBOARD_URI: API_DASHBOARD_URI.value, }; diff --git a/src/app.config.ts b/src/app.config.ts index ef0aa5f39..b8bb88983 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -37,6 +37,9 @@ import retirement from "./api/06_retirement/api.retirement"; /** API ระบบงานเครื่องราชอิสริยาภรณ์ List */ import insignia from "./api/07_insignia/api.insignia"; +/** API dashboard */ +import message from "./api/00_dashboard/api.message"; + // environment variables export const compettitivePanel = import.meta.env.VITE_COMPETITIVE_EXAM_PANEL; export const qualifyDisableExamPanel = import.meta.env @@ -74,6 +77,9 @@ const API = { ...probation, ...retirement, ...insignia, + + //dashboard + ...message, }; export default { diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index ad8f16e68..ff5bc5dfe 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -28,10 +28,10 @@ interface menuType { } interface notiType { - id: number; + id: string; sender: string; body: string; - timereceive: string; + timereceive: Date; } interface optionType { @@ -257,7 +257,7 @@ const menuList = readonly([ role: "placement", }, { - key: 6.10, + key: 6.1, label: "รายการอื่นๆ" /* */, path: "other", role: "placement", diff --git a/src/interface/response/dashboard/dashboard.ts b/src/interface/response/dashboard/dashboard.ts new file mode 100644 index 000000000..e6320ecfa --- /dev/null +++ b/src/interface/response/dashboard/dashboard.ts @@ -0,0 +1,27 @@ +interface ResponseInbox { + body: string; + createdAt: Date; + createdFullName: string; + createdUserId: string; + id: string; + isOpen: boolean; + lastUpdateFullName: string; + lastUpdateUserId: string; + lastUpdatedAt: Date; + openDate: Date | null; + payload: string; + receiveDate: Date; + receiverUserId: string; + subject: string; +} + +interface DataInbox { + no: string; + sender: string; + subject: string; + timereceive: Date; + body: string; + ratingModel: number; +} + +export type { ResponseInbox, DataInbox }; diff --git a/src/modules/05_placement/components/Receive/receiveDetail2.vue b/src/modules/05_placement/components/Receive/receiveDetail2.vue index 77c473d6d..258159c26 100644 --- a/src/modules/05_placement/components/Receive/receiveDetail2.vue +++ b/src/modules/05_placement/components/Receive/receiveDetail2.vue @@ -65,14 +65,525 @@
+ + +
+
+ แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย +
+ +
+ +
+
+ + +
+
+
+ +
+
+
+
+
ข้อมูลส่วนตัว
+
+
+ + +
+
+ +
+ +
+ +
+
+ +
+
+ + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ ตำแหน่งและหน่วยงานเดิม +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue index f3bc20646..5e5fe6e53 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore.vue @@ -39,20 +39,18 @@ const props = defineProps({ tab: String, }); onMounted(() => { - console.log(props); - console.log(assignId.value); - fecthAssign(assignId.value); if (props.tab !== undefined) { round.value = props.tab.charAt(4); - fetchEvaluate(assignId.value, round.value); + // fetchEvaluate(assignId.value, round.value); } + fecthAssign(assignId.value); }); const fecthAssign = async (id: string) => { showLoader(); await http .get(config.API.evaluateChairman(id)) - .then((res: any) => { - console.log(res); + .then(async (res: any) => { + // console.log(res); assign.value = res.data.data.assign; evaluate_no.value = res.data.data.evaluate_no; start_date.value = res.data.data.start_date; @@ -60,7 +58,10 @@ const fecthAssign = async (id: string) => { chairman.value = res.data.data.chairman; commander.value = res.data.data.commander; mentors.value = res.data.data.mentors; - console.log(mentors.value[0].name); + + if (res.data.data.evaluate_no > round.value) { + await fetchEvaluate(assignId.value, round.value); + } }) .catch((e) => { messageError($q, e); @@ -122,7 +123,9 @@ const fetchEvaluate = async (id: string, round: string) => { status.value = false; }) .catch((e) => { - console.log(e); + if (e.data.message !== "Data not found!") { + messageError($q, e); + } }) .finally(() => { hideLoader(); diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue new file mode 100644 index 000000000..1273a3578 --- /dev/null +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue @@ -0,0 +1,1462 @@ + + + + + diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue index 65b2ce444..a3e1ed7b7 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue @@ -40,18 +40,19 @@ const props = defineProps({ }); onMounted(async () => { - console.log("tab===>",props.tab) + console.log("tab===>", props.tab); - await fecthFormdata(assignId.value); if (props.tab !== undefined) { round.value = props.tab.charAt(4); - await fecthFormRound(assignId.value, round.value); + + // await fecthFormRound(assignId.value, round.value); } + await fecthFormdata(assignId.value); }); const fecthFormdata = async (id: string) => { await http .get(config.API.formevaluateRecord(id)) - .then((res: any) => { + .then(async (res: any) => { console.log(res); evaluate_no.value = res.data.data.evaluate_no; start_date.value = res.data.data.start_date; @@ -70,6 +71,12 @@ const fecthFormdata = async (id: string) => { id: e.id, })); checkArray.value = list1_1.value.length; + + console.log(res.data.data.evaluate_no, round.value); + + if (res.data.data.evaluate_no > round.value) { + await fecthFormRound(assignId.value, round.value); + } }) .catch((e: any) => { console.log(e); @@ -1321,8 +1328,7 @@ const saveformdata = async (data: any) => {
- - +
diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue index d665e8273..5dfe426c7 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue @@ -25,6 +25,8 @@ const start_date = ref(new Date()); const date_finish = ref(new Date()); const round = ref(); +const checkArray = ref(0); + onMounted(async () => { await fecthFormdata(assignId.value); }); @@ -42,19 +44,30 @@ const fecthFormdata = async (id: string) => { assign.value = res.data.data.assign; option.value.push(res.data.data.director); Autherise.value = res.data.data.director.name; + + list1_1.value = res.data.data.assign_output; + evaluate_expenct_level.value = res.data.data.assign_output.map((e) => ({ + id: e.id, + labal: e.output_desc, + })); + evaluate_ouptut.value = res.data.data.assign_output.map((e) => ({ + id: e.id, + text: "", + })); + checkArray.value = list1_1.value.length; }) .catch((e: any) => { console.log(e); }); }; -const list1_1 = [ - { id: "1", label: "ผลผลิตของงานที่คาดหวัง 1" }, - { id: "2", label: "ผลผลิตของงานที่คาดหวัง 2" }, - { id: "3", label: "ผลผลิตของงานที่คาดหวัง 3" }, - { id: "4", label: "ผลผลิตของงานที่คาดหวัง 4" }, - { id: "5", label: "ผลผลิตของงานที่คาดหวัง 5" }, -]; +const list1_1 = ref([ + // { id: "1", label: "ผลผลิตของงานที่คาดหวัง 1" }, + // { id: "2", label: "ผลผลิตของงานที่คาดหวัง 2" }, + // { id: "3", label: "ผลผลิตของงานที่คาดหวัง 3" }, + // { id: "4", label: "ผลผลิตของงานที่คาดหวัง 4" }, + // { id: "5", label: "ผลผลิตของงานที่คาดหวัง 5" }, +]); const list1_2 = [ { id: "1", label: "ผลผลิตของงานที่เกิดขึ้น 1" }, { id: "2", label: "ผลผลิตของงานที่เกิดขึ้น 2" }, @@ -115,18 +128,18 @@ const period = ref(1); // part 1 const evaluate_expenct_level = ref([ - { id: "1", label: "ผลผลิตของงานที่คาดหวัง 1", level: 0 }, - { id: "2", label: "ผลผลิตของงานที่คาดหวัง 2", level: 0 }, - { id: "3", label: "ผลผลิตของงานที่คาดหวัง 3", level: 0 }, - { id: "4", label: "ผลผลิตของงานที่คาดหวัง 4", level: 0 }, - { id: "5", label: "ผลผลิตของงานที่คาดหวัง 5", level: 0 }, + // { id: "1", label: "ผลผลิตของงานที่คาดหวัง 1", level: 0 }, + // { id: "2", label: "ผลผลิตของงานที่คาดหวัง 2", level: 0 }, + // { id: "3", label: "ผลผลิตของงานที่คาดหวัง 3", level: 0 }, + // { id: "4", label: "ผลผลิตของงานที่คาดหวัง 4", level: 0 }, + // { id: "5", label: "ผลผลิตของงานที่คาดหวัง 5", level: 0 }, ]); const evaluate_ouptut = ref([ - { level: 0, text: "" }, - { level: 0, text: "" }, - { level: 0, text: "" }, - { level: 0, text: "" }, - { level: 0, text: "" }, + // { level: 0, text: "" }, + // { level: 0, text: "" }, + // { level: 0, text: "" }, + // { level: 0, text: "" }, + // { level: 0, text: "" }, ]); const knowledge_level = ref(0); const skill_level = ref(0); @@ -187,16 +200,16 @@ const savaForm = () => { behavio_inproveRef.value.validate(); let hasError = false; - const filterlevel1_1 = evaluate_expenct_level.value.filter( - (e: any) => e.level == 0 - ); - const filter_ouptut1_2 = evaluate_ouptut.value.filter( - (e: any) => e.level == 0 || e.text == "" - ); + // const filterlevel1_1 = evaluate_expenct_level.value.filter( + // (e: any) => e.level == 0 + // ); + // const filter_ouptut1_2 = evaluate_ouptut.value.filter( + // (e: any) => e.level == 0 || e.text == "" + // ); if ( - filterlevel1_1.length != 0 || - filter_ouptut1_2.length != 0 || + // filterlevel1_1.length != 0 || + // filter_ouptut1_2.length != 0 || knowledge_level.value === 0 || skill_level.value === 0 || competency_level.value === 0 || @@ -350,9 +363,7 @@ const saveformdata = async (data: any) => {
- {{ - "ครั้งที่" + round - }} + {{ "ครั้งที่" + round }} ระหว่างวันที่ {{ date2Thai(start_date) @@ -387,7 +398,7 @@ const saveformdata = async (data: any) => { - {{ list.label }} + {{ list.output_desc }} { class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1" > - + { }; const addData = () => { router.push( - `/probation/detail/add/${personalId.value}/${assignId.value}` + `/probation/detail/addresult/${personalId.value}/${assignId.value}` ); }; diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue index 8c7ac36af..16d721f29 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue @@ -1,21 +1,74 @@ + () => + import( + "@/modules/05_placement/components/probation/FormEvaluation/FormEvaluate.vue" + ) +); + +const router = useRouter(); +const route = useRoute(); +const mixin = useCounterMixin(); +const $q = useQuasar(); +const { showLoader, hideLoader, messageError, success } = mixin; +const assignId = ref(route.params.form.toString()); +const personalId = ref(route.params.personalId.toString()); + +const tab = ref("save1"); +const tabs = ref([]); +const activeTab = ref("tab2"); + +const changeTab = (tabVal: string) => { + tab.value = tabVal; +}; + +onMounted(() => { + fecthAssign(assignId.value); +}); + +const fecthAssign = async (id: string) => { + showLoader(); + await http + .get(config.API.evaluateCreate(id)) + .then((res: any) => { + if (res.data.data.evaluate_no > 2) { + tabs.value = res.data.data.evaluate; + } else tabs.value.push({ no: 1 }, { no: 2 }); + }) + .catch((e: any) => { + console.log(e); + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +}; +const addData = () => { + router.push(`/probation/detail/addevalua/${personalId.value}/${assignId.value}`); +}; + \ No newline at end of file + diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue index 85be758b1..e655c7f8d 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue @@ -1,9 +1,10 @@ diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index 7596d1944..adc8da847 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -27,6 +27,18 @@ const transfer = () => import("@/modules/05_placement/components/Transfer/transferMain.vue"); const transferbyId = () => import("@/modules/05_placement/components/Transfer/transferRegistry.vue"); +const FormSaveResultAdd = () => + import( + "@/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue" + ); +const FormEvaluateAdd = () => + import( + "@/modules/05_placement/components/probation/FormEvaluation/FormEvaluateAdd.vue" + ); +const FormEvaluateScoreAdd = () => + import( + "@/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScoreAdd.vue" + ); // คำสั่งช่วยราชการ/ส่งตัวกลับ const RepatriationOrder = () => @@ -49,10 +61,7 @@ const receiveDetail2 = () => import("@/modules/05_placement/components/Receive/receiveDetail2.vue"); const ReceiveAdd = () => import("@/modules/05_placement/components/Receive/FormAdd.vue"); -const FormSaveResultAdd = () => - import( - "@/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue" - ); + //แต่งตั้ง-เลื่อน const AppointmentMain = () => import("@/modules/05_placement/components/AppointMent/Main.vue"); const AppointmentDetail = () => import("@/modules/05_placement/components/AppointMent/Detail.vue"); @@ -122,8 +131,8 @@ export default [ }, }, { - path: "/probation/detail/add/:id/:form", - name: "probationFormAdd", + path: "/probation/detail/addresult/:id/:form", + name: "probationFormAddresult", component: FormSaveResultAdd, meta: { Auth: true, @@ -131,6 +140,26 @@ export default [ Role: "placement", }, }, + { + path: "/probation/detail/addevalua/:id/:form", + name: "probationFormAddevalua", + component: FormEvaluateAdd, + meta: { + Auth: true, + Key: [6.3], + Role: "placement", + }, + }, + { + path: "/probation/detail/addevaluascore/:id/:form", + name: "probationFormAddevaluascore", + component: FormEvaluateScoreAdd, + meta: { + Auth: true, + Key: [6.3], + Role: "placement", + }, + }, { path: "/probation/work/add", name: "probationWorkAdd",