diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 7ddc04753..3838b0228 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -10,6 +10,7 @@ const placemenRelocation = `${placement}/relocation`; const placemenOther = `${env.API_URI}/retirement/other`; const placemenAppointment = `${placement}/appointment`; + export default { MainDetail: (year: number) => `${placement}/exam/${year}`, yearOptions: () => `${placement}/fiscal`, @@ -59,6 +60,10 @@ export default { // clear Position clearPosition: (personalId: string) => `${placement}/position/clear/${personalId}`, + // Document + documentByid: (personalId: string) => `${placement}/doc/${personalId}`, + documentDelid: (personalId: string, docid: string) => `${placement}/doc/${personalId}/${docid}`, + // order organizationsOrder: () => `${order}/order/organizations`, diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 17cdc587a..10cb37f18 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -374,34 +374,34 @@ const menuList = readonly([ }, ], }, - // { - // key: 9, - // icon: "mdi-calendar", - // activeIcon: "mdi-calendar", - // label: "การลา", - // path: "leave", - // role: "coin", - // children: [ - // { - // key: 9.1, - // label: "รายการลงเวลาปฏิบัติงาน", - // path: "/work-list", - // role: "coin", - // }, - // { - // key: 9.2, - // label: "รายการลา", - // path: "/leave-list", - // role: "coin", - // }, - // { - // key: 9.3, - // label: "รายงานสถิติ", - // path: "/statistics-report", - // role: "coin", - // }, - // ], - // }, + { + key: 9, + icon: "mdi-calendar", + activeIcon: "mdi-calendar", + label: "การลา", + path: "leave", + role: "coin", + children: [ + { + key: 9.1, + label: "รายการลงเวลาปฏิบัติงาน", + path: "/work-list", + role: "coin", + }, + { + key: 9.2, + label: "รายการลา", + path: "/leave-list", + role: "coin", + }, + { + key: 9.3, + label: "รายงานสถิติ", + path: "/statistics-report", + role: "coin", + }, + ], + }, ]); const tabList = readonly([ diff --git a/src/modules/05_placement/components/PersonalDetail/Detail.vue b/src/modules/05_placement/components/PersonalDetail/Detail.vue index a13b796e7..1d2f87603 100644 --- a/src/modules/05_placement/components/PersonalDetail/Detail.vue +++ b/src/modules/05_placement/components/PersonalDetail/Detail.vue @@ -9,6 +9,8 @@ import { useQuasar } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; +import { usePersonalDataStore } from "@/modules/05_placement/storePersona"; + import Informationvue from "@/modules/05_placement/components/PersonalDetail/Information/Information.vue"; import Addressvue from "@/modules/05_placement/components/PersonalDetail/Information/Address.vue"; import EducationVue from "@/modules/05_placement/components/PersonalDetail/Education.vue"; @@ -16,7 +18,7 @@ import Certicate from "@/modules/05_placement/components/PersonalDetail/Informat import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamResult.vue"; import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue"; import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue"; -// import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue"; +import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue"; import { AddressDataDefualt, @@ -38,6 +40,7 @@ const $q = useQuasar(); // show dialog const router = useRouter(); const store = useDataStore(); const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง +const storePersonal = usePersonalDataStore(); const { showLoader, hideLoader, messageError } = mixin; const { changeTab } = store; const statusEdit = ref(false); @@ -115,7 +118,7 @@ const fetchData = async () => { .get(config.API.placementPersonalId(examId.value)) .then((res: any) => { const data = res.data.result; - + storePersonal.fecthDataInformation(data); personalData.value.fullName = data.fullName; personalData.value.id = data.personalId; @@ -253,7 +256,7 @@ const fetchData = async () => { รายละเอียดของ {{ personalData.fullName }} -
+
{
- +
diff --git a/src/modules/05_placement/components/PersonalDetail/Education.vue b/src/modules/05_placement/components/PersonalDetail/Education.vue index 750d237f8..10ed86e72 100644 --- a/src/modules/05_placement/components/PersonalDetail/Education.vue +++ b/src/modules/05_placement/components/PersonalDetail/Education.vue @@ -284,7 +284,7 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => { onMounted(async () => { await fetchLevel(); await fetchPositionPath(); - await props.fetch(); + // await props.fetch(); rows.value = props.data; }); diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue index e83889aa4..36737904c 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Address.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Address.vue @@ -67,17 +67,17 @@ const registAddress = reactive({ zipCode: "", districtId: "", provinceId: "", -}) +}); const currentAddress = reactive({ subDistrictId: "", zipCode: "", districtId: "", provinceId: "", -}) +}); onMounted(async () => { - await getNewData(); + // await getNewData(); emit("update:statusEdit", false); }); @@ -126,7 +126,9 @@ const filterSelector = (val: any, update: Function, refData: string) => { const refreshData = async () => { myform.value.reset(); - await getNewData(); + await props.fetch(); + await fetchProvince(); + // await getNewData(); }; const getNewData = async () => { @@ -179,7 +181,9 @@ const editData = async () => { .finally(async () => { edit.value = false; emit("update:statusEdit", false); - await getNewData(); + // await getNewData(); + await props.fetch(); + await fetchProvince(); }); }; @@ -196,13 +200,13 @@ const saveData = async () => { const selectProvince = async (e: string | null, name: string) => { if (e != null) { if (name == "1") { - registAddress.subDistrictId = "" - registAddress.zipCode = "" - registAddress.districtId = "" + registAddress.subDistrictId = ""; + registAddress.zipCode = ""; + registAddress.districtId = ""; } else { - currentAddress.subDistrictId = "" - currentAddress.zipCode = "" - currentAddress.districtId = "" + currentAddress.subDistrictId = ""; + currentAddress.zipCode = ""; + currentAddress.districtId = ""; } myform.value.resetValidation(); await fetchDistrict(e, name); @@ -253,36 +257,58 @@ const fetchProvince = async () => { Ops.value.provinceOps = option; OpsFilter.value.provinceOps = option; - const checkRegistProvinceId = await option.find((e: any) => e.id === addressData.value.registProvinceId) + const checkRegistProvinceId = await option.find( + (e: any) => e.id === addressData.value.registProvinceId + ); // ที่อยู่ถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์ - if (addressData.value.registProvinceId == '' || addressData.value.registProvinceId == '00000000-0000-0000-0000-000000000000' || !checkRegistProvinceId) { - registAddress.subDistrictId = "" - registAddress.zipCode = "" - registAddress.districtId = "" + if ( + addressData.value.registProvinceId == "" || + addressData.value.registProvinceId == + "00000000-0000-0000-0000-000000000000" || + !checkRegistProvinceId + ) { + registAddress.subDistrictId = ""; + registAddress.zipCode = ""; + registAddress.districtId = ""; } else { - registAddress.provinceId = await addressData.value.registProvinceId - registAddress.zipCode = await addressData.value.registZipCode + registAddress.provinceId = await addressData.value.registProvinceId; + registAddress.zipCode = await addressData.value.registZipCode; await fetchDistrict(addressData.value.registProvinceId, "1"); - if (addressData.value.registDistrictId != null && addressData.value.registDistrictId != '00000000-0000-0000-0000-000000000000') { + if ( + addressData.value.registDistrictId != null && + addressData.value.registDistrictId != + "00000000-0000-0000-0000-000000000000" + ) { await fetchSubDistrict(addressData.value.registDistrictId, "1"); } } - const checkCurrentProvinceId = await option.find((e: any) => e.id === addressData.value.currentProvinceId) + const checkCurrentProvinceId = await option.find( + (e: any) => e.id === addressData.value.currentProvinceId + ); // ที่อยู่ปัจจุบันถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์ - if (addressData.value.currentProvinceId == '' || addressData.value.currentProvinceId == '00000000-0000-0000-0000-000000000000' || !checkCurrentProvinceId) { - currentAddress.subDistrictId = "" - currentAddress.zipCode = "" - currentAddress.districtId = "" + if ( + addressData.value.currentProvinceId == "" || + addressData.value.currentProvinceId == + "00000000-0000-0000-0000-000000000000" || + !checkCurrentProvinceId + ) { + currentAddress.subDistrictId = ""; + currentAddress.zipCode = ""; + currentAddress.districtId = ""; } else { - currentAddress.provinceId = addressData.value.currentProvinceId - currentAddress.zipCode = addressData.value.currentZipCode + currentAddress.provinceId = addressData.value.currentProvinceId; + currentAddress.zipCode = addressData.value.currentZipCode; await fetchDistrict(addressData.value.currentProvinceId, "2"); - if (addressData.value.currentDistrictId != null && addressData.value.currentDistrictId != '00000000-0000-0000-0000-000000000000') { + if ( + addressData.value.currentDistrictId != null && + addressData.value.currentDistrictId != + "00000000-0000-0000-0000-000000000000" + ) { await fetchSubDistrict(addressData.value.currentDistrictId, "2"); } } @@ -312,19 +338,23 @@ const fetchDistrict = async (id: string | null, position: string) => { OpsFilter.value.districtOps = option; // ที่อยู่ เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล - const checkRegistDistrictId = option.find((e: any) => e.id === addressData.value.registDistrictId) + const checkRegistDistrictId = option.find( + (e: any) => e.id === addressData.value.registDistrictId + ); if (checkRegistDistrictId) { - registAddress.districtId = addressData.value.registDistrictId + registAddress.districtId = addressData.value.registDistrictId; } } else { Ops.value.districtCOps = option; OpsFilter.value.districtCOps = option; // ที่อยู่ปัจจุบัน เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล - const checkCurrentDistrictId = await option.find((e: any) => e.id === addressData.value.currentDistrictId) + const checkCurrentDistrictId = await option.find( + (e: any) => e.id === addressData.value.currentDistrictId + ); if (checkCurrentDistrictId) { - currentAddress.districtId = addressData.value.currentDistrictId + currentAddress.districtId = addressData.value.currentDistrictId; } } }) @@ -358,18 +388,23 @@ const fetchSubDistrict = async (id: string | null, position: string) => { OpsFilter.value.subdistrictOps = option; // ที่อยู่ เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล - const checkRegistSubDistrictId = await option.find((e: any) => e.id === addressData.value.registSubDistrictId) + const checkRegistSubDistrictId = await option.find( + (e: any) => e.id === addressData.value.registSubDistrictId + ); if (checkRegistSubDistrictId) { - registAddress.subDistrictId = addressData.value.registSubDistrictId + registAddress.subDistrictId = addressData.value.registSubDistrictId; } } else { Ops.value.subdistrictCOps = option; OpsFilter.value.subdistrictCOps = option; // ที่อยู่ปัจจุบัน เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล - const checkCurrentSubDistrictId = await option.find((e: any) => e.id === addressData.value.currentSubDistrictId) + const checkCurrentSubDistrictId = await option.find( + (e: any) => e.id === addressData.value.currentSubDistrictId + ); if (checkCurrentSubDistrictId) { - currentAddress.subDistrictId = addressData.value.currentSubDistrictId + currentAddress.subDistrictId = + addressData.value.currentSubDistrictId; } } }) @@ -405,91 +440,268 @@ const getClass = (val: boolean) => { +
{ ) " class="cursor-pointer" /> +
diff --git a/src/modules/07_insignia/components/2_Manage/Tab2.vue b/src/modules/07_insignia/components/2_Manage/Tab2.vue index b7601b306..c30cbf972 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab2.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab2.vue @@ -314,6 +314,13 @@ const clearInsigniaFilters = (name: string) => { class="cursor-pointer" /> +
{ class="cursor-pointer" /> +
diff --git a/src/modules/07_insignia/components/2_Manage/Tab3.vue b/src/modules/07_insignia/components/2_Manage/Tab3.vue index 90c698360..e16e9e537 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab3.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab3.vue @@ -311,6 +311,13 @@ const clearInsigniaFilters = (name: string) => { class="cursor-pointer" /> +
{ class="cursor-pointer" /> +
diff --git a/src/modules/07_insignia/components/3_result/Dialogbody.vue b/src/modules/07_insignia/components/3_result/Dialogbody.vue index 11d94823a..c19440bd9 100644 --- a/src/modules/07_insignia/components/3_result/Dialogbody.vue +++ b/src/modules/07_insignia/components/3_result/Dialogbody.vue @@ -37,6 +37,7 @@ const props = defineProps({ fecthlistInsignia: Function, dateCheckReceive: String, dateCheckReturn: String, + dataModal: Object, }); // reset วันที่ประกาศราชกิจจานุเบกษา @@ -126,6 +127,8 @@ watch(props, () => { Datereceive.value = props.dataModal.dateReceiveInsignia; Datereturn.value = props.dataModal.dateReturnInsignia; OrganazationId.value = props.dataModal.orgReceiveInsignia; + files.value = props.dataModal.docReceiveInsignia + filesReturn.value =props.dataModal.docReturnInsignia OrganazationId2.value = Datereturn.value != null ? props.dataModal.orgReturnInsignia == null || @@ -211,7 +214,7 @@ onMounted(() => {
-
+
{ :disable="dateCheckReceive !== null" />
+ + ดาวน์โหลดเอกสาร รับเครื่องราชฯ +
{
-
+
{ :disable="dateCheckReturn !== null" />
+ + ดาวน์โหลดเอกสาร คืนเครื่องราชฯ +
diff --git a/src/modules/07_insignia/components/4_Allocate/Main.vue b/src/modules/07_insignia/components/4_Allocate/Main.vue index 5f59ec1da..edaad2878 100644 --- a/src/modules/07_insignia/components/4_Allocate/Main.vue +++ b/src/modules/07_insignia/components/4_Allocate/Main.vue @@ -316,6 +316,7 @@ const filterSelector = (val: any, update: Function, name: any) => { ) } const clearInsigniaFilters = (name: string) => { + console.log(insigniaOp.value) if (name === "filterInsigniaOp") { DataStore.insignia = ''; filterInsigniaOp.value = insigniaOp.value; @@ -352,6 +353,13 @@ const clearInsigniaFilters = (name: string) => { input-class="text-bold text-grey" @update:model-value="selectorRound(selectRound)" > + @@ -412,6 +420,13 @@ const clearInsigniaFilters = (name: string) => { class="cursor-pointer" /> + diff --git a/src/modules/07_insignia/components/5_Borrow/Main.vue b/src/modules/07_insignia/components/5_Borrow/Main.vue index bea7ee40f..383894ec0 100644 --- a/src/modules/07_insignia/components/5_Borrow/Main.vue +++ b/src/modules/07_insignia/components/5_Borrow/Main.vue @@ -30,7 +30,7 @@ const roundYear = ref(); const insigniaList = ref([]); const fileterInsigniaList = ref([]); const loadView = ref(false); -const employeeClassOps = ref(DataStore.employeeClassOps) +const employeeClassOps = ref(DataStore.employeeClassOps); onMounted(async () => { await fecthRound(); }); @@ -61,10 +61,10 @@ const fecthRound = async () => { year: e.year, }); }); - filterSelectRoundAllOption.value = selectRoundAllOption.value + filterSelectRoundAllOption.value = selectRoundAllOption.value; selectRound.value = data[0].id; - filterSelectRoundOption.value = selectRoundOption.value - console.log(filterSelectRoundOption.value) + filterSelectRoundOption.value = selectRoundOption.value; + console.log(filterSelectRoundOption.value); yearRound.value = data[0].year; roundYear.value = data[0].year; if (roundYear.value) { @@ -331,7 +331,7 @@ watch(tab, async () => { (x: any) => x.type == tab.value || x.type == "" ); DataStore.insignia = ""; - fileterInsigniaList.value = insigniaList.value + fileterInsigniaList.value = insigniaList.value; fecthlistInsignia(); }); @@ -401,34 +401,30 @@ const paginationLabel = (start: number, end: number, total: number) => { const filterSelector = (val: any, update: Function, name: any) => { update(() => { const needle = val.toLowerCase(); - if (name === 'employeeClassOps') { - DataStore.employeeClass = '' - employeeClassOps.value = DataStore.employeeClassOps.filter( - (v: any) => v.name.toLowerCase().indexOf(needle) > -1 - ); - } - else if (name === 'fileterInsigniaList') { - DataStore.insignia = null as any + if (name === "employeeClassOps") { + DataStore.employeeClass = ""; + employeeClassOps.value = DataStore.employeeClassOps.filter( + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 + ); + } else if (name === "fileterInsigniaList") { + DataStore.insignia = null as any; fileterInsigniaList.value = insigniaList.value.filter( - (v: any) => v.name.toLowerCase().indexOf(needle) > -1 - ); - } - else if (name === 'filterSelectRoundAllOption') { - yearRound.value = null as any + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 + ); + } else if (name === "filterSelectRoundAllOption") { + yearRound.value = null as any; filterSelectRoundAllOption.value = selectRoundAllOption.value.filter( - (v: any) => v.name.toLowerCase().indexOf(needle) > -1 - ); + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 + ); } - } - ) -} + }); +}; const clearInsigniaFilters = (name: string) => { if (name === "employeeClassOps") { DataStore.employeeClass = "all"; employeeClassOps.value = DataStore.employeeClassOps; - } - else if (name === "fileterInsigniaList") { + } else if (name === "fileterInsigniaList") { DataStore.insignia = ""; fileterInsigniaList.value = insigniaList.value; } @@ -470,27 +466,34 @@ const clearInsigniaFilters = (name: string) => { >
- - + > + +
{ DataStore.employeeClass ) " - @filter="(inputValue:any, + @filter="(inputValue:any, doneFn:Function) => filterSelector(inputValue, doneFn,'fileterInsigniaList' ) " - > - + + +
+
+ - - -
-
- - - - + > + + +
diff --git a/src/modules/07_insignia/components/report/Report_02.vue b/src/modules/07_insignia/components/report/Report_02.vue index 23c2a6177..b7741a6e4 100644 --- a/src/modules/07_insignia/components/report/Report_02.vue +++ b/src/modules/07_insignia/components/report/Report_02.vue @@ -185,7 +185,15 @@ const filterSelector = (val: any, update: Function, name: any) => { @update:model-value="updateSelect" @filter="(inputValue:any,doneFn:Function) => filterSelector(inputValue, doneFn,'selectList') " - /> + > + +
diff --git a/src/modules/07_insignia/views/ResultPage.vue b/src/modules/07_insignia/views/ResultPage.vue index 06e6c6173..46900cc12 100644 --- a/src/modules/07_insignia/views/ResultPage.vue +++ b/src/modules/07_insignia/views/ResultPage.vue @@ -637,6 +637,13 @@ const clearInsigniaFilters = (name: string) => { class="cursor-pointer" /> + { class="cursor-pointer" /> +
{ class="cursor-pointer" /> +
diff --git a/src/modules/09_leave/components/1_Work/DialogDetail.vue b/src/modules/09_leave/components/1_Work/DialogDetail.vue index 28ca10a94..f7b561a0b 100644 --- a/src/modules/09_leave/components/1_Work/DialogDetail.vue +++ b/src/modules/09_leave/components/1_Work/DialogDetail.vue @@ -11,7 +11,7 @@ const props = defineProps({ type: Function, }, }); -// +// รายละเอียดข้อมูง const titlename = ref(""); const timeIn = ref(""); const timeOut = ref(""); @@ -32,6 +32,7 @@ watch(props, () => { } } }); +// ปิด popup function colsePopup() { props.colse ? props.colse() : false; } diff --git a/src/modules/09_leave/components/1_Work/TableList.vue b/src/modules/09_leave/components/1_Work/TableList.vue index 7a23e9d18..78028f5de 100644 --- a/src/modules/09_leave/components/1_Work/TableList.vue +++ b/src/modules/09_leave/components/1_Work/TableList.vue @@ -1,4 +1,3 @@ -