From 74b8362523128e1e114f09bbea8a16a3b96500d1 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 15 Aug 2023 13:58:07 +0700 Subject: [PATCH 1/4] no message --- src/api/05_placement/api.placement.ts | 5 ++++- src/api/index.ts | 4 ++-- .../interface/response/officer.ts | 4 ++-- src/modules/05_placement/router.ts | 22 +++++++++++++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index f86b18453..58ced9b93 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -123,7 +123,10 @@ export default { repatriationMainReport: () => `${placement}/repatriation/report`, // ขอย้าย placemenRelocation, - + relocationMain: () => `${placement}/relocation`, + relocationDetail: (id:string) => `${placement}/relocation/${id}`, + relocationMainDelete: (id:string) => `${placement}/relocation/${id}`, + relocationMainReport: () => `${placement}/relocation/report`, // อื่นๆ placemenOther, }; diff --git a/src/api/index.ts b/src/api/index.ts index 244b63653..64e6c3ecc 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -26,8 +26,8 @@ const config = ref({ "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230712_172702.json", MEET_URI: "meet.frappet.com", API_RETIREMENT_URI: "https://bma-ehr.frappet.synology.me/api/v1", - // API_PROBATION_URI: "https://ehr.joolsoft.com/v1", - API_PROBATION_URI: "http://192.168.1.151:7776/v1", + API_PROBATION_URI: "https://ehr.joolsoft.com/v1", + // API_PROBATION_URI: "http://192.168.1.151:7776/v1", }, test: { API_URI: "http://localhost:5010/api/v1", diff --git a/src/modules/05_placement/interface/response/officer.ts b/src/modules/05_placement/interface/response/officer.ts index 64d298641..4cf58b1bb 100644 --- a/src/modules/05_placement/interface/response/officer.ts +++ b/src/modules/05_placement/interface/response/officer.ts @@ -2,8 +2,8 @@ interface officerType { no:number, id: string, prefix: string, - firstName: string, - lastName: string, + firstname: string, + lastname: string, position: string, posNo: string, positionLevel: string, diff --git a/src/modules/05_placement/router.ts b/src/modules/05_placement/router.ts index 373a42352..72f561168 100644 --- a/src/modules/05_placement/router.ts +++ b/src/modules/05_placement/router.ts @@ -37,6 +37,8 @@ const RepatriationOrderAdd = () => 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"); @@ -258,4 +260,24 @@ export default [ Role: "placement", }, }, + { + path: "/relocation", + name: "relocation", + component: relocation, + meta: { + Auth: true, + Key: [6.9], + Role: "placement", + }, + }, + { + path: "/relocation/detail/:id", + name: "relocationId", + component: relocationbyId, + meta: { + Auth: true, + Key: [6.9], + Role: "placement", + }, + }, ]; From 62a8fa99139eff00b6c0d41d3921b348a2ea948d Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 15 Aug 2023 13:59:38 +0700 Subject: [PATCH 2/4] no message --- .../components/Relocation/RelocationMain.vue | 723 ++++++++++++++++ .../components/Relocation/RelocationModal.vue | 799 ++++++++++++++++++ .../components/Relocation/RelocationbyId.vue | 508 +++++++++++ .../interface/response/Relocation.ts | 38 + 4 files changed, 2068 insertions(+) create mode 100644 src/modules/05_placement/components/Relocation/RelocationMain.vue create mode 100644 src/modules/05_placement/components/Relocation/RelocationModal.vue create mode 100644 src/modules/05_placement/components/Relocation/RelocationbyId.vue create mode 100644 src/modules/05_placement/interface/response/Relocation.ts diff --git a/src/modules/05_placement/components/Relocation/RelocationMain.vue b/src/modules/05_placement/components/Relocation/RelocationMain.vue new file mode 100644 index 000000000..1f84c5212 --- /dev/null +++ b/src/modules/05_placement/components/Relocation/RelocationMain.vue @@ -0,0 +1,723 @@ + + + diff --git a/src/modules/05_placement/components/Relocation/RelocationModal.vue b/src/modules/05_placement/components/Relocation/RelocationModal.vue new file mode 100644 index 000000000..89208163a --- /dev/null +++ b/src/modules/05_placement/components/Relocation/RelocationModal.vue @@ -0,0 +1,799 @@ + + + + + diff --git a/src/modules/05_placement/components/Relocation/RelocationbyId.vue b/src/modules/05_placement/components/Relocation/RelocationbyId.vue new file mode 100644 index 000000000..7cf80c7e8 --- /dev/null +++ b/src/modules/05_placement/components/Relocation/RelocationbyId.vue @@ -0,0 +1,508 @@ + + + + + \ No newline at end of file diff --git a/src/modules/05_placement/interface/response/Relocation.ts b/src/modules/05_placement/interface/response/Relocation.ts new file mode 100644 index 000000000..4972a366f --- /dev/null +++ b/src/modules/05_placement/interface/response/Relocation.ts @@ -0,0 +1,38 @@ +interface relocationType { + no:number, + id: string, + citizenId: "0000000000005", + prefix: string, + firstname: string, + lastname: string, + dateOfBirth: Date, + gender: string, + status: string, + recruitDate: Date, + positionNumber: number, + positionPath: string, + positionPathSide: string, + positionType: string, + positionLine: string, + positionLevel: string, + posNoId: string, + positionId: string, + positionPathSideId: string, + positionTypeId: string, + positionLineId: string, + positionLevelId: string, + organizationPositionId: string, + organizationName: string, + organizationShortName: string, + isActive: boolean, + reason: string, + educationOld: string, + salary: number, + positionTypeOld: string, + positionLevelOld: string, + positionNumberOld: string, + organizationPositionOld: string, + createdAt: Date +} + +export type { relocationType}; \ No newline at end of file From 077f12a34df0196803ae0c3aeb6841d8e7b4b893 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 15 Aug 2023 17:21:26 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=8A=E0=B9=88=E0=B8=A7=E0=B8=A2=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3=20=20=E0=B8=AA?= =?UTF-8?q?=E0=B9=88=E0=B8=87=E0=B8=95=E0=B8=B1=E0=B8=A7=E0=B8=81=E0=B8=A5?= =?UTF-8?q?=E0=B8=B1=E0=B8=9A=20=E0=B8=A2=E0=B9=89=E0=B8=B2=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 4 + .../components/Relocation/RelocationMain.vue | 16 +- .../components/Relocation/RelocationModal.vue | 2 +- .../components/Relocation/RelocationbyId.vue | 523 +++++++++--------- .../components/Repatriate/RepatriateMain.vue | 2 +- .../components/Repatriate/RepatriatebyId.vue | 3 +- .../helpgovernment/governmentDetail.vue | 2 +- .../components/helpgovernment/mainHelp.vue | 2 +- 8 files changed, 290 insertions(+), 264 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 5e3012bdd..b655b8a73 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -115,6 +115,7 @@ export default { officerDetail: (id:string) => `${placement}/officer/${id}`, officerMainDelete: (id:string) => `${placement}/officer/${id}`, officerMainReport: () => `${placement}/officer/report`, + officerMainEdit: (id:string) => `${placemenHelpGov}/${id}`, // ส่งตัวกลับ placemenRepatriation, @@ -122,12 +123,15 @@ export default { 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, }; diff --git a/src/modules/05_placement/components/Relocation/RelocationMain.vue b/src/modules/05_placement/components/Relocation/RelocationMain.vue index 1f84c5212..86e3bf520 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; }; @@ -645,7 +638,7 @@ onMounted(async () => { :columns="columns2" :rows="rows2" :filter="filterKeyword2" - row-key="personalId" + row-key="id" flat :visible-columns="visibleColumns2" selection="multiple" @@ -664,7 +657,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" From a8036f2353c842cd90bc83f5a3873804b6731cb6 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 15 Aug 2023 17:39:32 +0700 Subject: [PATCH 4/4] status text --- .../05_placement/components/Relocation/RelocationMain.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/05_placement/components/Relocation/RelocationMain.vue b/src/modules/05_placement/components/Relocation/RelocationMain.vue index 86e3bf520..03122f023 100644 --- a/src/modules/05_placement/components/Relocation/RelocationMain.vue +++ b/src/modules/05_placement/components/Relocation/RelocationMain.vue @@ -297,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,