From 3664bff957172eaa8e339eddf2f854efee9171a6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 22 Sep 2023 16:41:40 +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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/2_Manage/downloadFile.vue | 6 +++++- src/modules/10_order/components/step/step01.vue | 17 +++++++++-------- src/modules/10_order/interface/index/Main.ts | 15 ++++++++++++++- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/modules/07_insignia/components/2_Manage/downloadFile.vue b/src/modules/07_insignia/components/2_Manage/downloadFile.vue index 7778ebd9b..69972577f 100644 --- a/src/modules/07_insignia/components/2_Manage/downloadFile.vue +++ b/src/modules/07_insignia/components/2_Manage/downloadFile.vue @@ -21,11 +21,15 @@ const props = defineProps({ }); const titleReport = ref(""); +interface Optionround { + profileId: string; + id: string; +} const downloadDocument = async (type: string) => { let round = []; if (props.optionRound) { - round = props.optionRound.find((e: any) => e.id === props.round); + round = props.optionRound.find((e: Optionround) => e.id === props.round); } titleReport.value = round.name; const download: boolean = true; diff --git a/src/modules/10_order/components/step/step01.vue b/src/modules/10_order/components/step/step01.vue index 9b15951ed..6c8467534 100644 --- a/src/modules/10_order/components/step/step01.vue +++ b/src/modules/10_order/components/step/step01.vue @@ -10,6 +10,7 @@ import config from "@/app.config"; import type { treeTab } from "@/modules/05_placement/interface/index/Main"; import type { ResponseOrganiz } from "@/modules/05_placement/interface/response/Order"; import type { QTableProps } from "quasar"; +import type { OrederResult } from "@/modules/10_order/interface/index/Main"; import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue"; import { useOrderPlacementDataStore } from "@/modules/10_order/store"; @@ -122,10 +123,10 @@ onMounted(async () => { watch(byOrder, async () => { await http .get(config.API.approverOC(byOrder.value)) - .then((res: any) => { + .then((res) => { CommandOption.value = res.data.result; }) - .catch((e: any) => { + .catch((e) => { console.log(e); }); }); @@ -141,7 +142,7 @@ const fecthTypeOption = async (actions: string) => { await http .get(config.API.typeOrder()) .then((res) => { - typeOrderOption.value = res.data.result.map((e: any) => ({ + typeOrderOption.value = res.data.result.map((e: OrederResult) => ({ id: e.id, name: e.name, category: e.category, @@ -165,7 +166,7 @@ const fetchdetailOrder = async () => { let orderIdString = orderId.toString(); await http .get(config.API.detailOrder(orderIdString)) - .then((res: any) => { + .then((res) => { const data = res.data.result; typeOrder.value = typeOrderOption.value.find( (e) => e.id === data.orderTypeValue @@ -240,14 +241,14 @@ const fetchdetailOrder = async () => { const fecthCommand = async () => { await http .get(config.API.organizationsOrder()) - .then((res: any) => { + .then((res) => { byOrderOption.value = res.data.result; }) - .catch((e: any) => { + .catch((e) => { console.log(e); }); }; -const selectCMP = (selectOrder: any) => { +const selectCMP = (selectOrder: OrederResult) => { fecthExamRoundOption(selectOrder.commandCode); if (selectOrder.commandCode === "C-PM-10") { nodeTree(); @@ -530,7 +531,7 @@ const nodeTree = async () => { showLoader(); await http .get(config.API.profileOrganizRoot) - .then((res: any) => { + .then((res) => { const data = res.data.result; nodesTree.value = data; if (data.length > 0) { diff --git a/src/modules/10_order/interface/index/Main.ts b/src/modules/10_order/interface/index/Main.ts index e770515ad..65032e391 100644 --- a/src/modules/10_order/interface/index/Main.ts +++ b/src/modules/10_order/interface/index/Main.ts @@ -239,6 +239,18 @@ interface DataOptionInsigniaType { lastUpdatedAt: string | null; name: string; } +interface OrederResult { + category: string + commandCode: string + createdAt: Date + createdFullName: string + createdUserId: string + id: string + lastUpdateFullName: string + lastUpdateUserId: string + lastUpdatedAt: string + name: string +} export type { DataOption, DataOptionInsignia, @@ -260,7 +272,8 @@ export type { OrderResult, history, ColumnData, - DataOptionInsigniaType + DataOptionInsigniaType, + OrederResult }; export { AddressDataDefualt, FamilyDataDefualt };