diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index cb1e3ff68..f844d90b4 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -108,26 +108,40 @@ 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`, + officerMainEdit: (id:string) => `${placemenHelpGov}/${id}`, // ส่งตัวกลับ 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`, + repatriationMainEdit: (id:string) => `${placemenRepatriation}/${id}`, // ขอย้าย placemenRelocation, relocationMain: () => `${placement}/relocation`, relocationDetail: (id:string) => `${placement}/relocation/${id}`, relocationMainDelete: (id:string) => `${placement}/relocation/${id}`, relocationMainReport: () => `${placement}/relocation/report`, + relocationMainPut: (id:string) => `${placement}/relocation/position/${id}`, + relocationMainEdit: (id:string) => `${placemenRelocation}/${id}`, // อื่นๆ 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/components/Relocation/RelocationMain.vue b/src/modules/05_placement/components/Relocation/RelocationMain.vue index 1f84c5212..03122f023 100644 --- a/src/modules/05_placement/components/Relocation/RelocationMain.vue +++ b/src/modules/05_placement/components/Relocation/RelocationMain.vue @@ -23,13 +23,7 @@ const checkSelected = computed(() => { return true; } }); -const getSelectedString = computed(() => { - return selected.value.length === 0 - ? '' - : `${selected.value.length} record${ - selected.value.length > 1 ? 's' : '' - } selected of ${rows.value.length}`; -}); + const $q = useQuasar(); const router = useRouter(); const mixin = useCounterMixin(); @@ -283,7 +277,6 @@ const openModalOrder = () => { const openModalTree = (id: string) => { personalId.value = id; console.log(personalId.value); - personal.value = rows.value.filter((e: any) => e.id === id); modalTree.value = true; }; @@ -304,6 +297,7 @@ const getData = async () => { dateOfBirth: item.dateOfBirth, gender: item.gender, status: item.status, + statusText:statusText(item.status), recruitDate: item.recruitDate, positionNumber: item.positionNumber, positionPath: item.positionPath, @@ -645,7 +639,7 @@ onMounted(async () => { :columns="columns2" :rows="rows2" :filter="filterKeyword2" - row-key="personalId" + row-key="id" flat :visible-columns="visibleColumns2" selection="multiple" @@ -664,7 +658,6 @@ onMounted(async () => { { - + /> diff --git a/src/modules/05_placement/components/Relocation/RelocationModal.vue b/src/modules/05_placement/components/Relocation/RelocationModal.vue index 89208163a..2318223cf 100644 --- a/src/modules/05_placement/components/Relocation/RelocationModal.vue +++ b/src/modules/05_placement/components/Relocation/RelocationModal.vue @@ -178,7 +178,7 @@ const saveAppoint = async () => { console.log("save appoint===>", dataAppoint); showLoader(); await http - .put(config.API.receivePosition(id.value), dataAppoint) + .put(config.API.relocationMainPut(id.value), dataAppoint) .then((res) => { console.log("respone=>", res); success($q, "บันทึกสำเร็จ"); diff --git a/src/modules/05_placement/components/Relocation/RelocationbyId.vue b/src/modules/05_placement/components/Relocation/RelocationbyId.vue index 7cf80c7e8..4e1825af8 100644 --- a/src/modules/05_placement/components/Relocation/RelocationbyId.vue +++ b/src/modules/05_placement/components/Relocation/RelocationbyId.vue @@ -37,19 +37,31 @@ const institution = ref("ฝ่ายบริหารงานทั const fullname = ref(""); const id = ref(""); const prefix = ref(""); -const firstName = ref(""); -const lastName = ref(""); +const prefixId = ref(""); +const firstname = ref(""); +const citizenId = ref("") +const lastname = ref(""); const position = ref(""); const posNo = ref(""); const positionLevel = ref(""); +const educationOld = ref(""); const createdAt = ref(""); const organization = ref(""); const reason = ref(""); const status = ref(""); const date = ref(null); const salary = ref(""); +const salaryNew = ref(""); const positionTypeOld = ref(""); const positionLevelOld = ref(""); +const dateOfBirth = ref() +const genderId = ref("") +const nationality = ref("") +const race = ref("") +const religionId = ref("") +const bloodGroupId = ref("") +const relationshipId = ref("") +const telephoneNumber = ref("") const positionNumberOld = ref(""); const organizationPositionOld = ref(""); const isActive = ref(""); @@ -104,10 +116,13 @@ const getData = async () => { .get(config.API.relocationDetail(personId)) .then((res: any) => { const data = res.data.result; - fullname.value = `${data.firstname} ${data.lastname}` + citizenId.value = data.citizenId + fullname.value = `${data.prefix}${data.firstname} ${data.lastname}`; + prefixId.value = data.prefixId; prefix.value = data.prefix; - firstName.value = data.firstname; - lastName.value = data.lastname; + firstname.value = data.firstname; + lastname.value = data.lastname; + educationOld.value = data.educationOld; position.value = data.position; posNo.value = data.posNo; positionLevel.value = data.positionLevel; @@ -121,6 +136,14 @@ const getData = async () => { positionLevelOld.value = data.positionLevelOld; positionNumberOld.value = data.positionNumberOld; organizationPositionOld.value = data.organizationPositionOld; + dateOfBirth.value = data.dateOfBirth; + genderId.value = data.genderId; + nationality.value = data.nationality; + race.value = data.race; + religionId.value = data.religionId; + bloodGroupId.value = data.bloodGroupId; + relationshipId.value = data.relationshipId; + telephoneNumber.value = data.telephoneNumber; isActive.value = data.isActive; }) .catch((e) => { @@ -157,18 +180,29 @@ const conditionSave = async () => { }; const saveData = async () => { const body = { - organization: organization.value, + educationOld: educationOld.value, + prefixId:prefixId.value, + citizenId:citizenId.value, + firstname:firstname.value, + lastname:lastname.value, reason: reason.value, organizationPositionOld: organizationPositionOld.value, - date: date.value, positionTypeOld: positionTypeOld.value, positionLevelOld: positionLevelOld.value, - positionNumberOld: posNo.value, + positionNumberOld: positionNumberOld.value, amountOld: salary.value, + dateOfBirth:dateOfBirth.value , + genderId:genderId.value , + nationality:nationality.value , + race:race.value , + religionId:religionId.value , + bloodGroupId:bloodGroupId.value , + relationshipId:relationshipId.value , + telephoneNumber:telephoneNumber.value , }; showLoader(); await http - .put(config.API.transferId(personId.toString()), body) + .put(config.API.relocationMainEdit(personId.toString()), body) .then((res: any) => { // const data = res.data.result; // console.log(data); @@ -218,199 +252,219 @@ onMounted(async () => { }); + + + + - - \ No newline at end of file + diff --git a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue index 2deb571b2..c678620e9 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue @@ -534,7 +534,7 @@ onMounted(async () => { :columns="columns2" :rows="rows2" :filter="filterKeyword2" - row-key="personalId" + row-key="id" class="custom-header-table" :visible-columns="visibleColumns2" selection="multiple" diff --git a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue index 2f214ec16..0d7bf023a 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue @@ -439,10 +439,11 @@ positionLevelOld: positionLevelOld.value, positionNumberOld: posNo.value, amountOld: salary.value, + }; showLoader(); await http - .put(config.API.transferId(personId.toString()), body) + .put(config.API.repatriationMainEdit(personId.toString()), body) .then((res: any) => { // const data = res.data.result; // console.log(data); diff --git a/src/modules/05_placement/components/helpgovernment/governmentDetail.vue b/src/modules/05_placement/components/helpgovernment/governmentDetail.vue index 716269933..944de9a45 100644 --- a/src/modules/05_placement/components/helpgovernment/governmentDetail.vue +++ b/src/modules/05_placement/components/helpgovernment/governmentDetail.vue @@ -442,7 +442,7 @@ const saveData = async () => { }; showLoader(); await http - .put(config.API.transferId(personId.toString()), body) + .put(config.API.officerMainEdit(personId.toString()), body) .then((res: any) => { // const data = res.data.result; // console.log(data); diff --git a/src/modules/05_placement/components/helpgovernment/mainHelp.vue b/src/modules/05_placement/components/helpgovernment/mainHelp.vue index 26c1e5a24..0b66418ce 100644 --- a/src/modules/05_placement/components/helpgovernment/mainHelp.vue +++ b/src/modules/05_placement/components/helpgovernment/mainHelp.vue @@ -534,7 +534,7 @@ onMounted(async () => { :columns="columns2" :rows="rows2" :filter="filterKeyword2" - row-key="personalId" + row-key="id" class="custom-header-table" :visible-columns="visibleColumns2" selection="multiple" diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index e599f38a0..7596d1944 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -33,12 +33,12 @@ const RepatriationOrder = () => import("@/modules/05_placement/components/RepatriationOrder/List.vue"); const RepatriationOrderAdd = () => import("@/modules/05_placement/components/RepatriationOrder/AddOrder.vue"); - const helpgovernment = () => import("@/modules/05_placement/components/helpgovernment/mainHelp.vue") - const helpgovernmentbyId = () => import("@/modules/05_placement/components/helpgovernment/governmentDetail.vue") - const repatriate = () => import("@/modules/05_placement/components/Repatriate/RepatriateMain.vue") - const repatriatebyId = () => import("@/modules/05_placement/components/Repatriate/RepatriatebyId.vue") - const relocation = () => import("@/modules/05_placement/components/Relocation/RelocationMain.vue") - const relocationbyId = () => import("@/modules/05_placement/components/Relocation/RelocationbyId.vue") +const helpgovernment = () => import("@/modules/05_placement/components/helpgovernment/mainHelp.vue") +const helpgovernmentbyId = () => import("@/modules/05_placement/components/helpgovernment/governmentDetail.vue") +const repatriate = () => import("@/modules/05_placement/components/Repatriate/RepatriateMain.vue") +const repatriatebyId = () => import("@/modules/05_placement/components/Repatriate/RepatriatebyId.vue") +const relocation = () => import("@/modules/05_placement/components/Relocation/RelocationMain.vue") +const relocationbyId = () => import("@/modules/05_placement/components/Relocation/RelocationbyId.vue") //รับโอน const receiveMain = () => import("@/modules/05_placement/components/Receive/receiveMain.vue"); @@ -53,6 +53,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 [ { @@ -266,6 +272,35 @@ export default [ }, }, { + 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: "/relocation", name: "relocation", component: relocation, @@ -276,6 +311,15 @@ export default [ }, }, { + path: "other/detail/:id", + name: "other-detail", + component: OthertDetail, + meta: { + Auth: true, + Key: [6.9], + Role: "placement", + }, + }, { path: "/relocation/detail/:id", name: "relocationId", component: relocationbyId,