diff --git a/src/api/09_leave/api.leave.ts b/src/api/09_leave/api.leave.ts index 6fc2d10a2..e290a261b 100644 --- a/src/api/09_leave/api.leave.ts +++ b/src/api/09_leave/api.leave.ts @@ -38,6 +38,7 @@ export default { leaveReportReject: (id: string) => `${leave}/report/reject/${id}`, leaveDeleteApprove: (id: string) => `${leave}/admin/delete/approve/${id}`, leaveDeleteReject: (id: string) => `${leave}/admin/delete/reject/${id}`, + leaveBeginning: `${leave}-beginning`, /**รายงาน */ leaveReportTimeRecords: (type: string) => diff --git a/src/modules/02_organization/components/DialogStructureDetail.vue b/src/modules/02_organization/components/DialogStructureDetail.vue index 14e9dc543..aaaa56ba4 100644 --- a/src/modules/02_organization/components/DialogStructureDetail.vue +++ b/src/modules/02_organization/components/DialogStructureDetail.vue @@ -156,19 +156,13 @@ watch(
เบอร์โทร
-

+

{{ `ภายนอก ${formData.orgPhoneEx}` }}

-

+

{{ `ภายใน ${formData.orgPhoneIn}` }}

-

- - -

+

-

diff --git a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue new file mode 100644 index 000000000..c71aee677 --- /dev/null +++ b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue @@ -0,0 +1,505 @@ + + + + + diff --git a/src/modules/09_leave/interface/index/Main.ts b/src/modules/09_leave/interface/index/Main.ts index 0f0a59dd5..ff9221e9f 100644 --- a/src/modules/09_leave/interface/index/Main.ts +++ b/src/modules/09_leave/interface/index/Main.ts @@ -11,4 +11,11 @@ interface DataDateMonthObject { month: number; year: number; } -export type { DataOption, DataOption2, DataDateMonthObject }; + +interface DataPagination { + descending: boolean; + page: number; + rowsPerPage: number; + sortBy: string; +} +export type { DataOption, DataOption2, DataDateMonthObject, DataPagination }; diff --git a/src/modules/09_leave/interface/response/leaveHistory.ts b/src/modules/09_leave/interface/response/leaveHistory.ts new file mode 100644 index 000000000..502cae1ea --- /dev/null +++ b/src/modules/09_leave/interface/response/leaveHistory.ts @@ -0,0 +1,32 @@ +interface DataLeaveType { + code?: string; + createdAt?: string; + createdFullName?: string; + createdUserId?: string; + id: string; + lastUpdateFullName?: string; + lastUpdateUserId?: string; + lastUpdatedAt?: string; + limit?: number; + name: string; +} + +interface DataLeaveBeginning { + createdAt: string; + createdFullName: string; + firstName: string; + id: string; + lastName: string; + lastUpdateFullName: string; + lastUpdatedAt: string; + leaveDays: number; + leaveDaysUsed: number; + leaveType: string; + leaveTypeCode: string; + leaveTypeId: string; + leaveYear: number; + prefix: string; + profileId: string; +} + +export type { DataLeaveType, DataLeaveBeginning }; diff --git a/src/modules/09_leave/router.ts b/src/modules/09_leave/router.ts index 5ec1f7604..8c745e47d 100644 --- a/src/modules/09_leave/router.ts +++ b/src/modules/09_leave/router.ts @@ -13,6 +13,9 @@ const leaveReport = () => import("@/modules/09_leave/views/06_ReportMain.vue"); // const CheckinReport = () => // import("@/modules/09_leave/views/!07_ReportCheckin.vue"); + +const LeaveHistoryMain = () => + import("@/modules/09_leave/views/07_LeaveHistoryMain.vue"); export default [ { path: "/round-time", @@ -94,7 +97,6 @@ export default [ Role: "STAFF", }, }, - { path: "/checkin-report", name: "checkinReport", @@ -105,4 +107,14 @@ export default [ Role: "STAFF", }, }, + { + path: "/leave-history", + name: "leaveHistory", + component: LeaveHistoryMain, + meta: { + Auth: true, + Key: "SYS_LEAVE_HISTORY", + Role: "STAFF", + }, + }, ]; diff --git a/src/modules/09_leave/stores/LeaveHistoryStore.ts b/src/modules/09_leave/stores/LeaveHistoryStore.ts new file mode 100644 index 000000000..bafe489a7 --- /dev/null +++ b/src/modules/09_leave/stores/LeaveHistoryStore.ts @@ -0,0 +1,16 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + +import type { DataLeaveType } from "@/modules/09_leave/interface/response/leaveHistory"; + +export const useLeaveHistoryDataStore = defineStore("leaveHistory", () => { + const leaveTypeData = ref([ + { + id: "00000000-0000-0000-0000-000000000000", + name: "ทั้งหมด", + }, + ]); + return { + leaveTypeData, + }; +}); diff --git a/src/modules/09_leave/views/07_LeaveHistoryMain.vue b/src/modules/09_leave/views/07_LeaveHistoryMain.vue new file mode 100644 index 000000000..06da571b3 --- /dev/null +++ b/src/modules/09_leave/views/07_LeaveHistoryMain.vue @@ -0,0 +1,420 @@ + + + + + diff --git a/src/modules/12_evaluatePersonal/components/Detail/step/step2.vue b/src/modules/12_evaluatePersonal/components/Detail/step/step2.vue index 122218c2e..8c82e9109 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/step/step2.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/step/step2.vue @@ -136,7 +136,6 @@ onMounted(async () => { outlined v-model="formCommand.elementaryFullName" label="ชื่อ-นามสกุล" - lazy-rules hide-bottom-space /> @@ -144,42 +143,38 @@ onMounted(async () => {
- +
@@ -202,50 +197,44 @@ onMounted(async () => { outlined v-model="formCommand.abovelevelFullname" label="ชื่อ-นามสกุล" - :rules="[(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]" - lazy-rules hide-bottom-space />
- +
diff --git a/src/modules/12_evaluatePersonal/components/Detail/step/step5.vue b/src/modules/12_evaluatePersonal/components/Detail/step/step5.vue index f2ea25601..5c01eaa20 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/step/step5.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/step/step5.vue @@ -72,17 +72,17 @@ async function save() { ) { dialogConfirm($q, async () => { showLoader(); - http + await http .put(config.API.evaluationNext5To6(id.value)) .then(() => { success($q, "บันทึกแจ้งผลการประกาศคัดเลือกสำเร็จ"); + store.step = 6; + store.currentStep = 6; }) .catch((e) => { messageError($q, e); }) .finally(() => { - store.step = 6; - store.currentStep = 6; hideLoader(); }); }); @@ -164,7 +164,6 @@ async function copyLink(name: string) { /** function เรียกข้อมูลวันที่ประกาศ */ async function getDate() { - showLoader(); await http .get(config.API.evaluationDateAnnounce(id.value)) .then((res) => { @@ -174,11 +173,6 @@ async function getDate() { }) .catch((e) => { messageError($q, e); - }) - .finally(() => { - setTimeout(() => { - hideLoader(); - }, 1500); }); } @@ -186,7 +180,6 @@ const download10Url = ref(""); /** function เช็คไฟล์อัปโหลด*/ async function checkDocResult() { - showLoader(); await http .get( config.API.evaluationPatchData( @@ -197,11 +190,6 @@ async function checkDocResult() { ) .then((res: any) => { download10Url.value = res.data.downloadUrl; - }) - .finally(() => { - setTimeout(() => { - hideLoader(); - }, 1500); }); } @@ -209,7 +197,6 @@ async function checkDocResult() { * function เรียกข้อมูลผลงาน */ async function fetchDataSigner() { - showLoader(); await http .get(config.API.evaluationSigner(id.value, 1)) .then((res) => { @@ -221,16 +208,18 @@ async function fetchDataSigner() { }) .catch((e) => { messageError($q, e); - }) - .finally(() => { - setTimeout(() => { - hideLoader(); - }, 1500); }); } onMounted(async () => { - await Promise.all([getDate(), checkDocResult(), fetchDataSigner()]); + try { + showLoader(); + await Promise.all([getDate(), checkDocResult(), fetchDataSigner()]); + } catch (error) { + console.log(error); + } finally { + hideLoader(); + } }); diff --git a/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue b/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue index 29227328f..4af879af6 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/step/step6.vue @@ -179,52 +179,44 @@ onMounted(async () => { outlined label="ชื่อ-นามสกุล" v-model="formCommand.elementaryFullName" - lazy-rules hide-bottom-space />
- - - +
@@ -247,8 +239,6 @@ onMounted(async () => { outlined v-model="formCommand.abovelevelFullname" label="ชื่อ-นามสกุล" - :rules="[(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]" - lazy-rules hide-bottom-space /> @@ -256,45 +246,39 @@ onMounted(async () => {
- - +
diff --git a/src/modules/13_salary/components/04_salaryLists/DialogMoveLevelMulti.vue b/src/modules/13_salary/components/04_salaryLists/DialogMoveLevelMulti.vue index 0777f5f88..1f2c3b884 100644 --- a/src/modules/13_salary/components/04_salaryLists/DialogMoveLevelMulti.vue +++ b/src/modules/13_salary/components/04_salaryLists/DialogMoveLevelMulti.vue @@ -166,6 +166,11 @@ function inputEdit(val: boolean) { }; } +const pagination = ref({ + page: 1, + rowsPerPage: 50, +}); + watch( () => modal.value, () => { @@ -177,6 +182,8 @@ watch( keyword.value = ""; type.value = ""; selectedData.value = []; + pagination.value.page = 1; + pagination.value.rowsPerPage = 50; } } ); @@ -267,8 +274,7 @@ watch(
ทั้งหมด {{ rows.length }} รายการ
- - +
@@ -358,31 +358,4 @@ watch( - + diff --git a/src/modules/13_salary/components/04_salaryLists/TableTypePending.vue b/src/modules/13_salary/components/04_salaryLists/TableTypePending.vue index 76477f805..153ec2db1 100644 --- a/src/modules/13_salary/components/04_salaryLists/TableTypePending.vue +++ b/src/modules/13_salary/components/04_salaryLists/TableTypePending.vue @@ -14,7 +14,6 @@ import DialogFormEdit from "@/modules/13_salary/components/04_salaryLists/Dialog import DialogMoveGroup from "@/modules/13_salary/components/04_salaryLists/DialogMoveGroup.vue"; // ย้ายกลุ่ม import DialogMoveLevel from "@/modules/13_salary/components/04_salaryLists/DialogMoveLevel.vue"; // เลื่อนขั้น import DialogMoveLevelMulti from "@/modules/13_salary/components/04_salaryLists/DialogMoveLevelMulti.vue"; - import DialogProperties from "@/modules/13_salary/components/04_salaryLists/DialogProperties.vue"; //แก้ไขคุณสมบัติ import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue"; @@ -76,6 +75,9 @@ const columns = ref([ label: "ชื่อ-นามสกุล", sortable: false, field: "fullName", + format(val, row) { + return `${row.prefix}${row.firstName} ${row.lastName}`; + }, headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -331,11 +333,7 @@ function onProperties(data: any) { isLeave.value = data.isLeave; } -/** - * function openPopup ย้ายกขั้น - * @param id profileId - * - */ +/** function openPopup ย้ายกขั้น*/ function onClickMoveLevelMulti() { modalDialogMoveLeveMulti.value = !modalDialogMoveLeve.value; } @@ -381,11 +379,7 @@ function onClickViewInfo(type: string, id: string) { -
- {{ - `${props.row.prefix}${props.row.firstName} ${props.row.lastName}` - }} -
{{ findOrgNameHtml(props.row) }}
diff --git a/src/modules/13_salary/components/05_salaryListsEmployee/DialogMoveLevelMulti.vue b/src/modules/13_salary/components/05_salaryListsEmployee/DialogMoveLevelMulti.vue new file mode 100644 index 000000000..bb4bc9ca9 --- /dev/null +++ b/src/modules/13_salary/components/05_salaryListsEmployee/DialogMoveLevelMulti.vue @@ -0,0 +1,360 @@ + + + + + diff --git a/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue b/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue index 8cef3686d..eb7675cf3 100644 --- a/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue +++ b/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue @@ -40,7 +40,7 @@ const props = defineProps({ const splitterModel = ref(13); const modalDialogInfoCriteria = ref(false); //popup หลักเกณฑ์การพิจารณาเลื่อนขั้นเงินข้าราชการ -const isRetire = ref(false); //แสดงเฉพาะผู้เกษียณอายุราชการ +const isRetire = ref(false); //แสดงเฉพาะผู้เกษียณอายุราชการ const rows = ref([]); //ข้อมูลรายชื่อ const total = ref(0); //จำนวนรายการ const maxPage = ref(1); //จำนวนหน้า @@ -515,6 +515,8 @@ onMounted(() => { :rows="rows" :total="total" :snap-shot="props?.snapShot" + :is-retire="isRetire" + :is-close="props.periodLatest?.group1IsClose ?? false" /> { :total="total" :type="item.type" :snap-shot="props?.snapShot" + :is-close="props.periodLatest?.group1IsClose ?? false" /> diff --git a/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue b/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue index 306e3ce17..74fe96c70 100644 --- a/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue +++ b/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue @@ -28,6 +28,7 @@ const { dialogRemove, messageError, showLoader, hideLoader, success } = /** props*/ const formFilter = defineModel("formFilter", { required: true }); const maxPage = defineModel("maxPage", { required: true }); +const isClose = defineModel("isClose", { required: true }); const snapShot = defineModel("snapShot"); const props = defineProps({ rows: { type: Array }, @@ -311,7 +312,11 @@ watch( ("formFilter", { required: true }); const maxPage = defineModel("maxPage", { required: true }); +const isClose = defineModel("isClose", { required: true }); const snapShot = defineModel("snapShot"); const props = defineProps({ @@ -49,10 +52,13 @@ const props = defineProps({ total: { type: Number, }, + isRetire: { + type: Boolean, + }, }); /** ข้อมูล Table*/ -const columns = ref([ +const columns = ref([ { name: "no", align: "left", @@ -68,6 +74,9 @@ const columns = ref([ label: "ชื่อ-นามสกุล", sortable: false, field: "fullName", + format(val, row) { + return `${row.prefix}${row.firstName} ${row.lastName}`; + }, headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -149,6 +158,9 @@ const columns = ref([ label: "สังกัด", sortable: false, field: "organization", + format(val, row) { + return findOrgName(row); + }, headerStyle: "font-size: 14px;min-width:280px", style: "font-size: 14px", }, @@ -223,6 +235,7 @@ const modalDialogMoveGroup = ref(false); //popup ย้ายกลุ const modalDialogMoveLeve = ref(false); //popup เลื่อนขั้น const modalDialogProperties = ref(false); //popup คุณสมบัติ const modalDialogInfo = ref(false); //popup ข้อมูลส่วนตัว +const modalDialogMoveLeveMulti = ref(false); //popup เลื่อนขั้น /** ตัวแปร*/ const profileId = ref(""); //id คน @@ -256,9 +269,7 @@ function onClickDelete(id: string) { }); } -/** - * function openPopup เพิ่มคนเลื่อนค่าจ้าง - */ +/** function openPopup เพิ่มคนเลื่อนค่าจ้าง*/ function onClickAddPerson() { modalDialogAddPerson.value = !modalDialogAddPerson.value; } @@ -297,9 +308,7 @@ function onClickMoveLevel(id: string, typeVal: string, isReserveVal: boolean) { isReserve.value = isReserveVal; } -/** - * function updatePageTable - */ +/** function updatePageTable*/ function updatePagePagination() { props.fetchDataTable?.(); } @@ -312,9 +321,7 @@ function updatePageSizePagination(newPagination: NewPagination) { formFilter.value.pageSize = newPagination.rowsPerPage; } -/** - * function ค้นหาข้อมูล Table - */ +/** function ค้นหาข้อมูล Table*/ function searchData() { formFilter.value.page = 1; props.fetchDataTable?.(); @@ -345,6 +352,11 @@ function onClickViewInfo(type: string, id: string) { modalDialogInfo.value = true; } +/** function openPopup ย้ายกขั้น*/ +function onClickMoveLevelMulti() { + modalDialogMoveLeveMulti.value = !modalDialogMoveLeve.value; +} + /** * callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize */ @@ -361,7 +373,11 @@ watch( เพิ่ม + + + เลื่อนขั้น + -
- {{ - `${props.row.prefix}${props.row.firstName} ${props.row.lastName}` - }} -
{{ findOrgNameHtml(props.row) }}
@@ -600,6 +624,23 @@ watch( :type="infoType" :employee-class="'-employee'" /> + + + diff --git a/src/modules/13_salary/views/04_salaryLists.vue b/src/modules/13_salary/views/04_salaryLists.vue index 62646e971..19f593ebf 100644 --- a/src/modules/13_salary/views/04_salaryLists.vue +++ b/src/modules/13_salary/views/04_salaryLists.vue @@ -4,6 +4,7 @@ import { useQuasar } from "quasar"; import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; import { useCounterMixin } from "@/stores/mixin"; +import { checkPermission } from "@/utils/permissions"; import config from "@/app.config"; import http from "@/plugins/http"; @@ -392,31 +393,36 @@ async function fetchCheckisOfficer() { } function onClosePeriodSalalry() { - dialogConfirm($q, async () => { - showLoader(); - await http - .put( - config.API.salaryChangeIsclose + - `/${snapFilter.value}/${roundFilter.value.id}`, - { - isClose: true, - } - ) - .then(async () => { - await fetchSalalyPeriod( - agencyFilter.value, - roundFilter.value.id, - snapFilter.value - ); - success($q, "ปิดการแก้ไขสำเร็จ"); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); - }); + dialogConfirm( + $q, + async () => { + showLoader(); + await http + .put( + config.API.salaryChangeIsclose + + `/${snapFilter.value}/${roundFilter.value.id}`, + { + isClose: true, + } + ) + .then(async () => { + await fetchSalalyPeriod( + agencyFilter.value, + roundFilter.value.id, + snapFilter.value + ); + success($q, "ปิดการแก้ไขสำเร็จ"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + }, + "ปิดการแก้ไข", + "ต้องการปิดการแก้ไขรอบการขึ้นเงินเดือนนี้ใข่หรือไม่" + ); } onMounted(async () => { @@ -542,6 +548,7 @@ onMounted(async () => { /> { ไม่มีข้อมูล -