111 lines
2.5 KiB
TypeScript
111 lines
2.5 KiB
TypeScript
export type BoxStatus = 'READY_TO_INVOICE' | 'READY';
|
|
export type PrintStatus = 'false' | 'true';
|
|
export const BoxStatusList: BoxStatus[] = ['READY_TO_INVOICE', 'READY'];
|
|
|
|
export interface IBox {
|
|
packetNetWeight: string;
|
|
totalNetWeight: string;
|
|
cargoId: string;
|
|
passportName: string;
|
|
id: number;
|
|
partyName: string;
|
|
boxType: string;
|
|
name: string;
|
|
volume: string;
|
|
boxWeight: number;
|
|
brutto: number;
|
|
hasInvoice: boolean;
|
|
totalItems: number;
|
|
status: BoxStatus;
|
|
print: PrintStatus;
|
|
totalBrutto: number;
|
|
}
|
|
|
|
export interface IBoxDetail {
|
|
packet: {
|
|
id: number;
|
|
cargoId: string;
|
|
packetNetWeight: number;
|
|
passportName: string;
|
|
totalItems: number;
|
|
totalNetWeight: number;
|
|
partyName: string;
|
|
partyId: string;
|
|
boxType: string;
|
|
name: string;
|
|
volume: string;
|
|
boxWeight: number;
|
|
brutto: number;
|
|
print: PrintStatus;
|
|
hasInvoice: boolean;
|
|
status: BoxStatus;
|
|
};
|
|
client: {
|
|
passportId: number;
|
|
passportName: string;
|
|
};
|
|
items: [
|
|
{
|
|
id: number;
|
|
partyName: string;
|
|
boxName: string;
|
|
cargoId: string;
|
|
trekId: string;
|
|
name: string;
|
|
nameRu: string;
|
|
amount: number;
|
|
weight: number;
|
|
acceptedNumber: number;
|
|
cargoType: 'AUTO' | 'AVIA';
|
|
price: number;
|
|
totalPrice: number;
|
|
hasImage: boolean;
|
|
imageUrl: string | null;
|
|
packetName: string;
|
|
status: BoxStatus;
|
|
},
|
|
];
|
|
}
|
|
|
|
export type CreateBoxBodyType = {
|
|
status: BoxStatus;
|
|
cargoId: string;
|
|
passportId: string;
|
|
cargoType: 'AUTO' | 'AVIA';
|
|
partyId: string;
|
|
items: {
|
|
trekId: string;
|
|
name: string;
|
|
amount: number;
|
|
weight: number;
|
|
cargoType: 'AUTO' | 'AVIA';
|
|
}[];
|
|
};
|
|
|
|
export type UpdateBoxBodyType = {
|
|
passportId?: number;
|
|
status?: BoxStatus;
|
|
packetId?: string;
|
|
print?: boolean;
|
|
// clientId: number;
|
|
cargoId?: string;
|
|
cargoType: 'AUTO' | 'AVIA';
|
|
|
|
// type: string;
|
|
// name: string;
|
|
// volume: string;
|
|
// boxWeight: number;
|
|
// brutto: number;
|
|
items?: {
|
|
cargoId: string;
|
|
trekId: string;
|
|
name: string;
|
|
amount: number;
|
|
weight: number;
|
|
cargoType: 'AUTO' | 'AVIA';
|
|
id: number;
|
|
price: number;
|
|
totalPrice: number;
|
|
}[];
|
|
};
|