added pakets
This commit is contained in:
@@ -7,6 +7,7 @@ export type Product = {
|
||||
cargoId: string;
|
||||
trekId: string;
|
||||
name: string;
|
||||
nameRu: string;
|
||||
amount: number;
|
||||
weight: number;
|
||||
price?: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BoxStatus } from '@/data/box/box.model';
|
||||
import { Product, CreateProductBodyType, UpdateProductBodyType } from '@/data/item/item.mode';
|
||||
import { CreateProductBodyType, Product, UpdateProductBodyType } from '@/data/item/item.mode';
|
||||
import { CommonResponseType, PageAble } from '@/helpers/types';
|
||||
import { request } from '@/services/request';
|
||||
|
||||
@@ -29,6 +29,9 @@ export const item_requests = {
|
||||
async find(params: { itemId?: number | string }) {
|
||||
return request.get<CommonResponseType<Product[]>>('/items/find', { params });
|
||||
},
|
||||
async list(params: { packetId?: number | string }) {
|
||||
return request.get<CommonResponseType<{ data: Product[] }>>('/items/list', { params });
|
||||
},
|
||||
async delete(params: { itemId: number | string }) {
|
||||
return request.delete<CommonResponseType>('/items/delete', { params });
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ export const BoxStatusList: BoxStatus[] = ['READY_TO_INVOICE', 'READY'];
|
||||
export interface IRealBox {
|
||||
boxName: string;
|
||||
id: number;
|
||||
packetsCount: number;
|
||||
itemCount: number;
|
||||
partyName: string;
|
||||
}
|
||||
|
||||
@@ -26,19 +26,22 @@ export interface IRealBoxDetail {
|
||||
|
||||
export interface RealCreateBoxBodyType {
|
||||
partyName: string;
|
||||
packetDtos: number[];
|
||||
packetItemDtos: { packetId: number; itemDtos: number[] }[];
|
||||
}
|
||||
|
||||
export interface UpdateRealBoxBodyType {
|
||||
boxId: string;
|
||||
partyName: string;
|
||||
packetDtos: number[];
|
||||
packetItemDtos: { packetId: number; itemDtos: number[] }[];
|
||||
}
|
||||
|
||||
export interface FormValues {
|
||||
partyName: string;
|
||||
paketIds: Array<{ id: string | number }>;
|
||||
id?: number;
|
||||
boxId?: string;
|
||||
partyName: string;
|
||||
partyId?: number;
|
||||
}
|
||||
packetItemDtos: Array<{
|
||||
packetId: number;
|
||||
itemDtos: number[];
|
||||
}>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user