From f916e326661b45a0497a6368216ab20e9659f79c Mon Sep 17 00:00:00 2001 From: waruneeta Date: Tue, 21 Nov 2023 12:53:05 +0700 Subject: [PATCH 1/4] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87?= =?UTF-8?q?=E0=B8=9C=E0=B8=A5=20action=20=E0=B9=83=E0=B8=99=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=89=E0=B8=B2=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=82?= =?UTF-8?q?=E0=B8=AD=E0=B8=87=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2_InvestigateFacts/EditPage.vue | 74 +++++++++++++++---- .../2_InvestigateFacts/MainPage.vue | 14 ---- 2 files changed, 61 insertions(+), 27 deletions(-) diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue index 402afa4b0..7ae23e726 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue @@ -3,17 +3,16 @@ import { onMounted, reactive, ref } from "vue"; import Form from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; import type { FormData } from "@/modules/11_discipline/interface/request/investigate"; import { useRouter, useRoute } from "vue-router"; -import { useCounterMixin } from "@/stores/mixin"; +import { useCounterMixin } from "@/stores/mixin"; import { useQuasar } from "quasar"; -const $q = useQuasar() -const mixin = useCounterMixin() -const { dialogConfirm } = mixin +const $q = useQuasar(); +const mixin = useCounterMixin(); +const { dialogConfirm } = mixin; const router = useRouter(); const route = useRoute(); const id = ref(route.params.id as string); - /** ข้อมูล v-model ของฟอร์ม */ const data = reactive({ complaint: "", @@ -30,7 +29,7 @@ const data = reactive({ daysExtend: null, statusResult: "", causeText: "", - complaintStatus: "" + complaintStatus: "NEW", }); /** จำลองข้อมูลจาก api */ @@ -56,20 +55,55 @@ const fetchData = async () => { * บันทึกข้อมูลที่เเก้ไข * @param id ระบุ บุคคล */ -async function onSubmit(id:string){ +async function onSubmit(id: string) { // put - console.log("edit",id); + console.log("edit", id); router.push(`/discipline/investigatefacts`); -}; +} /** ยืนยัน ส่งไปสอบสวน */ -function sentInvestigate(){ - dialogConfirm($q,()=> confirmSentInvestigate(),'ยืนยันส่งไปสอบสวน','ต้องการยืนยันส่งไปสอบสวนใช่หรือไม่?') +function sentInvestigate() { + dialogConfirm( + $q, + () => confirmSentInvestigate(), + "ยืนยันส่งไปสอบสวน", + "ต้องการยืนยันส่งไปสอบสวนใช่หรือไม่?" + ); +} + +/** ยืนยัน ยุติเรื่อง */ +function endInvestigate() { + dialogConfirm( + $q, + () => confirmEndInvestigate(), + "ยืนยันยุติเรื่อง", + "ต้องการยืนยันยุติเรื่องใช่หรือไม่?" + ); +} + +/** ยืนยัน ยกเลิกการยุติเรื่อง */ +function cancelInvestigate() { + dialogConfirm( + $q, + () => confirmCancelInvestigate(), + "ยืนยันยกเลิกการยุติเรื่อง", + "ต้องการยืนยันยกเลิกการยุติเรื่องใช่หรือไม่?" + ); } /** ฟังชั่น ส่งไปสอบสวน*/ -function confirmSentInvestigate(){ - console.log('sent') +function confirmSentInvestigate() { + console.log("sent"); +} + +/** ฟังชั่น ยุติเรื่อง*/ +function confirmEndInvestigate() { + console.log("sent"); +} + +/** ฟังชั่น ยกเลิกการยุติเรื่อง*/ +function confirmCancelInvestigate() { + console.log("sent"); } /** โหลดข้อมูลเมื่อเข้าหน้านี้ */ @@ -95,10 +129,24 @@ onMounted(() => {
+ + +
diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue index 7cf1198fe..44800e122 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue @@ -184,7 +184,6 @@ onMounted(async () => { {{ col.label }} - From 412bd910f1756790e2da73202d5a28eff6944d0c Mon Sep 17 00:00:00 2001 From: waruneeta Date: Tue, 21 Nov 2023 13:02:34 +0700 Subject: [PATCH 2/4] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=A2=E0=B8=B8=E0=B8=95=E0=B8=B4=E0=B9=80=E0=B8=A3?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B9=83=E0=B8=99=E0=B8=82?= =?UTF-8?q?=E0=B8=B1=E0=B9=89=E0=B8=99=E0=B8=AA=E0=B8=AD=E0=B8=9A=E0=B8=AA?= =?UTF-8?q?=E0=B8=A7=E0=B8=99=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B8=A7=E0=B8=B4?= =?UTF-8?q?=E0=B8=99=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../3_InvestigateDisciplinary/EditPage.vue | 46 ++++++++++++++++++- .../interface/request/disciplinary.ts | 1 + 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue index 14be718e6..969fbc0aa 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue @@ -33,6 +33,7 @@ const data = reactive({ filesRecordAccuser: null, filesWitnesses: null, filesEtc: null, + complaintStatus: 'NEW' }); /** จำลองข้อมูลจาก api */ @@ -77,11 +78,41 @@ function sentIssue() { ); } +/** ยืนยัน ยุติเรื่อง */ +function endInvestigate() { + dialogConfirm( + $q, + () => confirmEndInvestigate(), + "ยืนยันยุติเรื่อง", + "ต้องการยืนยันยุติเรื่องใช่หรือไม่?" + ); +} + +/** ยืนยัน ยกเลิกการยุติเรื่อง */ +function cancelInvestigate() { + dialogConfirm( + $q, + () => confirmCancelInvestigate(), + "ยืนยันยกเลิกการยุติเรื่อง", + "ต้องการยืนยันยกเลิกการยุติเรื่องใช่หรือไม่?" + ); +} + /** ฟังชั่น ส่งไปออกคำสั่ง*/ function confirmSentIssue() { console.log("sent"); } +/** ฟังชั่น ยุติเรื่อง*/ +function confirmEndInvestigate() { + console.log("sent"); +} + +/** ฟังชั่น ยกเลิกการยุติเรื่อง*/ +function confirmCancelInvestigate() { + console.log("sent"); +} + /** โหลดข้อมูลเมื่อเข้าหน้านี้ */ onMounted(() => { fetchData(); @@ -103,7 +134,20 @@ onMounted(() => {
แก้ไขการสอบสวนความผิดทางวินัย {{ id }}#id
- + + + +
diff --git a/src/modules/11_discipline/interface/request/disciplinary.ts b/src/modules/11_discipline/interface/request/disciplinary.ts index 8642393cb..848512f76 100644 --- a/src/modules/11_discipline/interface/request/disciplinary.ts +++ b/src/modules/11_discipline/interface/request/disciplinary.ts @@ -18,6 +18,7 @@ interface FormData { recordAccuser: string; witnesses: string; InvestResults: string; + complaintStatus: string } interface disciplinaryRef { From 651f2e51b42b9a767f321288b8cabb7780c09688 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 21 Nov 2023 15:29:02 +0700 Subject: [PATCH 3/4] =?UTF-8?q?UI=20=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2=20(Admin)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface/request/main/main.ts | 2 +- src/interface/request/main/main.ts.rej | 2 +- .../components/1_Work/DialogDetail.vue | 44 +- .../09_leave/components/1_Work/Tab2.vue | 14 +- .../09_leave/components/2_Leave/Calendar.vue | 590 ++++++++++++++++++ .../components/2_Leave/DetailLeave.vue | 107 +++- .../components/2_Leave/DetailLeaveReject.vue | 567 +++++++++++++++++ .../09_leave/components/2_Leave/Tab1.vue | 116 ++++ .../09_leave/components/2_Leave/Tab2.vue | 73 +++ .../09_leave/components/2_Leave/TableList.vue | 78 ++- .../2_Leave/{ToolBar.vue => ToolBarLeave.vue} | 24 +- .../09_leave/interface/request/leave.ts | 1 + .../09_leave/interface/response/leave.ts | 8 +- src/modules/09_leave/router.ts | 18 +- src/modules/09_leave/stores/LeaveStore.ts | 53 +- src/modules/09_leave/stores/ListLeave.ts | 5 + src/modules/09_leave/views/LeaveListMain.vue | 75 +-- src/modules/09_leave/views/WorkingMain.vue | 2 +- 18 files changed, 1691 insertions(+), 88 deletions(-) create mode 100644 src/modules/09_leave/components/2_Leave/Calendar.vue create mode 100644 src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue create mode 100644 src/modules/09_leave/components/2_Leave/Tab1.vue create mode 100644 src/modules/09_leave/components/2_Leave/Tab2.vue rename src/modules/09_leave/components/2_Leave/{ToolBar.vue => ToolBarLeave.vue} (91%) diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index dec0d773f..39bb0ed30 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -403,7 +403,7 @@ const menuList = readonly([ { key: 9.5, label: "รายการลา", - path: "/leave-list", + path: "/leave", role: "leave", }, { diff --git a/src/interface/request/main/main.ts.rej b/src/interface/request/main/main.ts.rej index a4c8b102d..d7a8871c1 100644 --- a/src/interface/request/main/main.ts.rej +++ b/src/interface/request/main/main.ts.rej @@ -118,7 +118,7 @@ diff a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts ( + { + key: 9.2, + label: "รายการลา", -+ path: "/leave-list", ++ path: "/leave", + role: "coin", + }, + { diff --git a/src/modules/09_leave/components/1_Work/DialogDetail.vue b/src/modules/09_leave/components/1_Work/DialogDetail.vue index 656fdc222..35edb002f 100644 --- a/src/modules/09_leave/components/1_Work/DialogDetail.vue +++ b/src/modules/09_leave/components/1_Work/DialogDetail.vue @@ -68,18 +68,24 @@ async function fetchDetailByid(id: string) { const data = res.data.result; formData.checkInDate = data.checkInDate && date2Thai(data.checkInDate); formData.checkInImg = data.checkInImg; - formData.checkInLat = data.checkInLat; - formData.checkInLon = data.checkInLon; - formData.checkInLocation = data.checkInLocation; - formData.checkInTime = data.checkInTime; + formData.checkInLat = data.checkInLat ? data.checkInLat : ""; + formData.checkInLon = data.checkInLon ? data.checkInLon : ""; + formData.checkInLocation = data.checkInLocation + ? data.checkInLocation + : "-"; + formData.checkInTime = data.checkInTime ? data.checkInTime : "-"; formData.checkOutDate = data.checkOutDate && date2Thai(data.checkOutDate); formData.checkOutImg = data.checkOutImg; - formData.checkOutLat = data.checkOutLat; - formData.checkOutLon = data.checkOutLon; - formData.checkOutLocation = data.checkOutLocation; - formData.checkOutTime = data.checkOutTime; + formData.checkOutLat = data.checkOutLat ? data.checkOutLat : ""; + formData.checkOutLon = data.checkOutLon ? data.checkOutLon : ""; + formData.checkOutLocation = data.checkOutLocation + ? data.checkOutLocation + : "-"; + formData.checkOutTime = data.checkOutTime ? data.checkOutTime : "-"; formData.fullName = data.fullName; - formData.checkOutLocation = data.checkOutLocation; + formData.checkOutLocation = data.checkOutLocation + ? data.checkOutLocation + : "-"; formData.checkInDescription = data.checkInDescription ? data.checkInDescription : "-"; @@ -177,6 +183,7 @@ function colsePopup() {
รูปภาพ
+
@@ -213,6 +229,7 @@ function colsePopup() {
รูปภาพ
+
diff --git a/src/modules/09_leave/components/1_Work/Tab2.vue b/src/modules/09_leave/components/1_Work/Tab2.vue index 626f1d8cd..2052ef9b8 100644 --- a/src/modules/09_leave/components/1_Work/Tab2.vue +++ b/src/modules/09_leave/components/1_Work/Tab2.vue @@ -94,7 +94,7 @@ const rows = ref([]); /** QueryString*/ const keyword = ref(""); const page = ref(1); -const rowsPerPage = ref(10); +const rowsPerPage = ref(2); const maxPage = ref(1); /** เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */ @@ -114,13 +114,13 @@ async function fetchListLogRecord() { id: e.id, fullName: e.fullName, checkInDate: e.checkInDate && date2Thai(e.checkInDate), - checkInTime: e.checkInTime, - checkInLocation: e.checkInLocation, - checkInLat: e.checkInLat, - checkInLon: e.checkInLon, + checkInTime: e.checkInTime ? e.checkInTime : "-", + checkInLocation: e.checkInLocation ? e.checkInLocation : "-", + checkInLat: e.checkInLat ? e.checkInLat : "", + checkInLon: e.checkInLon ? e.checkInLon : "", checkOutDate: e.checkOutDate && date2Thai(e.checkOutDate), - checkOutLocation: e.checkOutLocation, - checkOutTime: e.checkOutTime, + checkOutLocation: e.checkOutLocation ? e.checkOutLocation : "-", + checkOutTime: e.checkOutTime ? e.checkOutTime : "-", checkOutLat: e.checkOutLat ? e.checkOutLat : "", checkOutLon: e.checkOutLon ? e.checkOutLon : "", })); diff --git a/src/modules/09_leave/components/2_Leave/Calendar.vue b/src/modules/09_leave/components/2_Leave/Calendar.vue new file mode 100644 index 000000000..1409cc630 --- /dev/null +++ b/src/modules/09_leave/components/2_Leave/Calendar.vue @@ -0,0 +1,590 @@ + + + + diff --git a/src/modules/09_leave/components/2_Leave/DetailLeave.vue b/src/modules/09_leave/components/2_Leave/DetailLeave.vue index a01681764..1c37941e7 100644 --- a/src/modules/09_leave/components/2_Leave/DetailLeave.vue +++ b/src/modules/09_leave/components/2_Leave/DetailLeave.vue @@ -107,6 +107,7 @@ const formData = reactive({ coupleDayStartDateHistory: new Date(), //ประวัติ ตั้งแต่วันที่ (ลาติดตามคู่สมรส) coupleDayEndDateHistory: new Date(), //ประวัติ ถึงวันที่ (ลาติดตามคู่สมรส) coupleDaySumTotalHistory: "", //ประวัติ ในกรณีลาติดต่อกับครั้งก่อน รวมทั้งนี้ด้วย เป็นเวลา กี่ปี กี่เดือน กี่วัน (ลาติดตามคู่สมรส) + step: "", }); onMounted(() => { @@ -189,6 +190,7 @@ function fetchDetailLeave(paramsId: string) { formData.coupleDayEndDateHistory = e.coupleDayEndDateHistory && date2Thai(e.coupleDayEndDateHistory); formData.coupleDaySumTotalHistory = e.coupleDaySumTotalHistory; + formData.step = e.step; }); /** ส่งประเภทของการลาไป Function เช็คประเภทการลา*/ @@ -237,9 +239,23 @@ const openModal = async (data: string) => { modalApprove.value = true; dialogTitle.value = "ไม่อนุมัติ"; } + if (data === "authority") { + modalApprove.value = true; + dialogTitle.value = "ส่งไปยังผู้มีอำนาจ"; + } }; -/** Function Save*/ +/** function ส่งไปผู้บังคับบัญชา*/ +function sendToCommand() { + dialogConfirm( + $q, + () => console.log("ส่งไปผู้บังคับบัญชา"), + "ยืนยันการส่งไปผู้บังคับบัญชา", + "ต้องการยืนยันการส่งไปผู้บังคับบัญชานี้ใช่หรือไม่ ?" + ); +} + +/** Function Save */ function clickSave() { if (dialogTitle.value === "อนุมัติ") { dialogConfirm( @@ -261,6 +277,14 @@ function clickSave() { modalApprove.value = false; console.log("NOT"); } + if (dialogTitle.value === "ส่งไปยังผู้มีอำนาจ") { + dialogConfirm( + $q, + () => ((modalApprove.value = false), console.log("ส่งไปยังผู้มีอำนาจ")), + "ยืนยันการส่งไปยังผู้มีอำนาจ", + "ต้องการยืนยันการส่งไปยังผู้มีอำนาจใช่หรือไม่ ?" + ); + } }