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..1190e2ab2 --- /dev/null +++ b/src/modules/09_leave/components/2_Leave/Calendar.vue @@ -0,0 +1,585 @@ + + + + diff --git a/src/modules/09_leave/components/2_Leave/DetailLeave.vue b/src/modules/09_leave/components/2_Leave/DetailLeave.vue index a01681764..7d9e5cf2a 100644 --- a/src/modules/09_leave/components/2_Leave/DetailLeave.vue +++ b/src/modules/09_leave/components/2_Leave/DetailLeave.vue @@ -38,6 +38,7 @@ const paramsId = route.params.id.toString(); const modalApprove = ref(false); const dialogTitleUnapprove = ref("ไม่อนุมัติ"); const dialogTitle = ref("อนุมัติ"); +const dialogLabel = ref("เหตุผล"); const closeDialog = () => { modalApprove.value = false; }; @@ -107,6 +108,7 @@ const formData = reactive({ coupleDayStartDateHistory: new Date(), //ประวัติ ตั้งแต่วันที่ (ลาติดตามคู่สมรส) coupleDayEndDateHistory: new Date(), //ประวัติ ถึงวันที่ (ลาติดตามคู่สมรส) coupleDaySumTotalHistory: "", //ประวัติ ในกรณีลาติดต่อกับครั้งก่อน รวมทั้งนี้ด้วย เป็นเวลา กี่ปี กี่เดือน กี่วัน (ลาติดตามคู่สมรส) + step: "", }); onMounted(() => { @@ -189,6 +191,7 @@ function fetchDetailLeave(paramsId: string) { formData.coupleDayEndDateHistory = e.coupleDayEndDateHistory && date2Thai(e.coupleDayEndDateHistory); formData.coupleDaySumTotalHistory = e.coupleDaySumTotalHistory; + formData.step = e.step; }); /** ส่งประเภทของการลาไป Function เช็คประเภทการลา*/ @@ -237,9 +240,24 @@ const openModal = async (data: string) => { modalApprove.value = true; dialogTitle.value = "ไม่อนุมัติ"; } + if (data === "authority") { + modalApprove.value = true; + dialogTitle.value = "ส่งไปยังผู้มีอำนาจ"; + dialogLabel.value = "ความคิดเห็นผู้มีอำนาจ"; + } }; -/** Function Save*/ +/** function ส่งไปผู้บังคับบัญชา*/ +function sendToCommand() { + dialogConfirm( + $q, + () => console.log("ส่งไปผู้บังคับบัญชา"), + "ยืนยันการส่งไปผู้บังคับบัญชา", + "ต้องการยืนยันการส่งไปผู้บังคับบัญชานี้ใช่หรือไม่ ?" + ); +} + +/** Function Save */ function clickSave() { if (dialogTitle.value === "อนุมัติ") { dialogConfirm( @@ -261,6 +279,14 @@ function clickSave() { modalApprove.value = false; console.log("NOT"); } + if (dialogTitle.value === "ส่งไปยังผู้มีอำนาจ") { + dialogConfirm( + $q, + () => ((modalApprove.value = false), console.log("ส่งไปยังผู้มีอำนาจ")), + "ยืนยันการส่งไปยังผู้มีอำนาจ", + "ต้องการยืนยันการส่งไปยังผู้มีอำนาจใช่หรือไม่ ?" + ); + } } diff --git a/src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue b/src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue new file mode 100644 index 000000000..d2d2021e5 --- /dev/null +++ b/src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue @@ -0,0 +1,567 @@ + + + + diff --git a/src/modules/09_leave/components/2_Leave/Tab1.vue b/src/modules/09_leave/components/2_Leave/Tab1.vue new file mode 100644 index 000000000..e28b3c0dd --- /dev/null +++ b/src/modules/09_leave/components/2_Leave/Tab1.vue @@ -0,0 +1,116 @@ + + + + diff --git a/src/modules/09_leave/components/2_Leave/Tab2.vue b/src/modules/09_leave/components/2_Leave/Tab2.vue new file mode 100644 index 000000000..0cd0fdcb7 --- /dev/null +++ b/src/modules/09_leave/components/2_Leave/Tab2.vue @@ -0,0 +1,73 @@ + + + + diff --git a/src/modules/09_leave/components/2_Leave/TableList.vue b/src/modules/09_leave/components/2_Leave/TableList.vue index 56eaf4e88..eefba63b8 100644 --- a/src/modules/09_leave/components/2_Leave/TableList.vue +++ b/src/modules/09_leave/components/2_Leave/TableList.vue @@ -15,8 +15,8 @@ const router = useRouter(); // const { date2Thai } = mixin; // const { optionYear, searchDataFn, filterOption } = leaveStore; -/** ข้อมูลหัวตาราง */ -const columns = ref([ +/** ข้อมูลหัวตาราง รายการลา */ +const columnsLeave = ref([ { name: "no", align: "left", @@ -63,7 +63,62 @@ const columns = ref([ style: "font-size: 14px", }, ]); -const visibleColumns = ref([ +const visibleColumnsLeave = ref([ + "no", + "leaveTypeName", + "fullname", + "dateSendLeave", + "status", +]); + +const columnsReject = ref([ + { + name: "no", + align: "left", + label: "ลำดับ", + sortable: false, + field: "no", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "leaveTypeName", + align: "left", + label: "ประเภทการลา", + sortable: true, + field: "leaveTypeName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "fullname", + align: "left", + label: "ผู้ยื่นยกเลิกใบลา", + sortable: true, + field: "fullname", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "dateSendLeave", + align: "left", + label: "วันที่ขอยกเลิก", + sortable: true, + field: "dateSendLeave", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "status", + align: "left", + label: "สถานะ", + sortable: true, + field: "status", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, +]); +const visibleReject = ref([ "no", "leaveTypeName", "fullname", @@ -103,6 +158,10 @@ const pagination = ref({ page: props.page, rowsPerPage: props.rowsPerPage, }); +function redirectToDetail(id: string) { + const routePrefix = leaveStore.tabMenu === "1" ? "/leave" : "/leave-reject"; + router.push(`${routePrefix}/detail/${id}`); +} watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => { // updateProp(pagination.value, currentPage.value); @@ -113,14 +172,21 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => { /** Hook*/ onMounted(() => { - leaveStore.visibleColumns = visibleColumns.value; + console.log(leaveStore.tabMenu); + if (leaveStore.tabMenu === "1") { + leaveStore.visibleColumns = visibleColumnsLeave.value; + leaveStore.columns = columnsLeave.value; + } else if (leaveStore.tabMenu === "2") { + leaveStore.visibleColumns = visibleReject.value; + leaveStore.columns = columnsReject.value; + } }); 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 {