เพิ่ม interface
This commit is contained in:
parent
1bbadfe271
commit
3664bff957
3 changed files with 28 additions and 10 deletions
|
|
@ -21,11 +21,15 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const titleReport = ref<string>("");
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue