From 77ccaec4e3dd3e1eccbe00f25d55e439f497f857 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 22 Sep 2023 16:10:30 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20interface=20=E0=B9=83=E0=B8=AB=E0=B9=89=20any?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../04_registry/components/profileType.ts | 11 ++++ .../components/AppointMent/Detail.vue | 10 +++- .../components/AppointMent/Dialogbody.vue | 13 ++-- .../components/AppointMent/Main.vue | 20 +++---- .../05_placement/components/Other/Detail.vue | 18 +++--- .../components/Receive/AddEmployee/Main.vue | 13 ++-- .../components/Receive/Dialogbody.vue | 2 +- .../components/Receive/receiveDetail2.vue | 20 ++++--- .../components/Receive/receiveMain.vue | 22 +++---- .../components/Repatriate/RepatriatebyId.vue | 6 +- .../components/Transfer/transferRegistry.vue | 3 +- .../helpgovernment/governmentDetail.vue | 6 +- .../components/probation/MainProbation.vue | 12 ++-- .../05_placement/interface/request/Main.ts | 10 ++++ .../interface/response/AppointMent.ts | 48 ++++++++++++++- .../interface/response/OhterMain.ts | 52 ++++++++++++++++ .../interface/response/Transfer.ts | 7 ++- .../interface/response/officer.ts | 59 ++++++++++++++++++- 18 files changed, 259 insertions(+), 73 deletions(-) diff --git a/src/modules/04_registry/components/profileType.ts b/src/modules/04_registry/components/profileType.ts index a3e94f836..4126189c2 100644 --- a/src/modules/04_registry/components/profileType.ts +++ b/src/modules/04_registry/components/profileType.ts @@ -93,6 +93,15 @@ interface DataOption { zipCode?: string; } +interface DataOptioninfo { + id: string; + name: string; +} +interface docList { + pathName: string; + fileName: string; +} + interface zipCodeOption { id: string; name: string; @@ -207,4 +216,6 @@ export type { Goverment, DataOption, zipCodeOption, + DataOptioninfo, + docList }; diff --git a/src/modules/05_placement/components/AppointMent/Detail.vue b/src/modules/05_placement/components/AppointMent/Detail.vue index 90e93056e..ca9dc62b9 100644 --- a/src/modules/05_placement/components/AppointMent/Detail.vue +++ b/src/modules/05_placement/components/AppointMent/Detail.vue @@ -5,6 +5,7 @@ import { useRoute, useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import CurrencyInput from "@/components/CurruncyInput.vue"; import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive"; +import type { appointmentData,ResponseData } from "@/modules/05_placement/interface/response/AppointMent"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -14,7 +15,12 @@ const route = useRoute(); const router = useRouter(); const mixin = useCounterMixin(); -const appointment = ref([]); +const appointment = ref({ +citizenId:"", +prefixId:"", +firstname:"", +lastname:"" +}); const myform = ref(); const edit = ref(false); const profileId = ref(""); @@ -52,7 +58,7 @@ const fecthappointmentByid = async () => { showLoader(); await http .get(config.API.appointmentByid(paramsId.toString())) - .then((res: any) => { + .then((res: ResponseData) => { const data = res.data.result; appointment.value = data; profileId.value = data.profileId; diff --git a/src/modules/05_placement/components/AppointMent/Dialogbody.vue b/src/modules/05_placement/components/AppointMent/Dialogbody.vue index 8be6c90e6..8ffaa5f6e 100644 --- a/src/modules/05_placement/components/AppointMent/Dialogbody.vue +++ b/src/modules/05_placement/components/AppointMent/Dialogbody.vue @@ -3,6 +3,7 @@ import { ref, computed,watchEffect } from "vue"; import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import type { QTableProps } from "quasar"; +import type { UserData } from "@/modules/05_placement/interface/response/AppointMent"; import http from "@/plugins/http"; @@ -12,7 +13,7 @@ const { showLoader, success, messageError, dialogConfirm,hideLoader } = mixin; const $q = useQuasar(); import DialogHeader from "@/modules/05_placement/components/AppointMent/DialogHeader.vue"; -const selected = ref([]); +const selected = ref([]); const checkSelected = computed(() => { if (selected.value.length === 0 || props.type === "") { return true; @@ -98,7 +99,7 @@ const updateInput = (value: any) => { emit("update:filterKeyword2", value); }; -const updateInputType = (value: any) => { +const updateInputType = (value: string) => { emit("update:type", value); }; //รีเซ็ตค่าในช่องค้นหา @@ -115,7 +116,7 @@ const clickAddlist = () => { const createdAppoint = async () => { let pId: string[] = []; let Type = props.type as string - selected.value.forEach((e: any) => { + selected.value.forEach((e: UserData) => { pId.push(e.personalId); }); let data = { @@ -124,10 +125,10 @@ const createdAppoint = async () => { showLoader(); await http .put(config.API.apppointmentReport(Type), data) - .then((res: any) => { + .then((res) => { success($q, "บันทึกสำเร็จ"); }) - .catch((e: any) => { + .catch((e) => { messageError($q, e); }) .finally(() => { @@ -145,7 +146,7 @@ watchEffect(() => { });