add product sku
This commit is contained in:
@@ -5,8 +5,8 @@ export type GaoFulfillmentStatus = "WAITING_STOCK" | "PENDING" | "VERIFIED" | "R
|
||||
|
||||
export type OrderFulfillmentItem = {
|
||||
fulfillmentId?: string;
|
||||
productId?: string;
|
||||
productUnitId?: string;
|
||||
skuId?: string;
|
||||
skuUnitId?: string;
|
||||
attachmentList?: Attachment[];
|
||||
sourceOrderItemId?: string;
|
||||
quantity?: number | string;
|
||||
@@ -16,6 +16,10 @@ export type OrderFulfillmentItem = {
|
||||
fulfilledBefore?: number | string;
|
||||
fulfilledAfter?: number | string;
|
||||
productNameSnapshot?: string;
|
||||
productIdSnapshot?: string;
|
||||
skuCodeSnapshot?: string;
|
||||
skuNameSnapshot?: string;
|
||||
specSummarySnapshot?: string;
|
||||
unitSnapshot?: string;
|
||||
baseQuantityPerUnitSnapshot?: number | string;
|
||||
} & Model;
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { ProductType } from "@/types/Product";
|
||||
export type GaoProductChartReq = {
|
||||
storeId?: string;
|
||||
productId?: string;
|
||||
skuId?: string;
|
||||
categoryId?: string;
|
||||
productType?: ProductType;
|
||||
beginAt?: number;
|
||||
@@ -13,6 +14,8 @@ export type GaoProductChartReq = {
|
||||
export type GaoSalesOrderChartReq = {
|
||||
storeId?: string;
|
||||
customerId?: string;
|
||||
productId?: string;
|
||||
skuId?: string;
|
||||
orderType?: "PACKAGE" | "DIRECT_PRODUCT";
|
||||
status?: "ACTIVE" | "FULFILLED" | "CANCELLED";
|
||||
paymentStatus?: "UNPAID" | "PARTIALLY_PAID" | "PAID";
|
||||
@@ -26,6 +29,8 @@ export type GaoProductSalesDailyStatView = {
|
||||
orderCount?: number;
|
||||
directQuantity?: number;
|
||||
packageQuantity?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
directSaleAmount?: number;
|
||||
};
|
||||
|
||||
@@ -35,6 +40,8 @@ export type GaoProductSalesRankView = {
|
||||
orderCount?: number;
|
||||
directQuantity?: number;
|
||||
packageQuantity?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
directSaleAmount?: number;
|
||||
};
|
||||
|
||||
@@ -43,11 +50,13 @@ export type GaoProductSkuUnitSalesRankView = {
|
||||
productName?: string;
|
||||
skuId?: string;
|
||||
skuUnitId?: string;
|
||||
productUnitId?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
unitName?: string;
|
||||
orderCount?: number;
|
||||
quantity?: number;
|
||||
baseQuantity?: number;
|
||||
saleAmount?: number;
|
||||
};
|
||||
|
||||
@@ -55,6 +64,8 @@ export type GaoProductFulfillmentDailyStatView = {
|
||||
dateValue?: number;
|
||||
directQuantity?: number;
|
||||
packageQuantity?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
baseQuantity?: number;
|
||||
};
|
||||
|
||||
@@ -67,6 +78,11 @@ export type GaoProductFulfillmentRankView = {
|
||||
reservedQuantity?: number;
|
||||
fulfilledQuantity?: number;
|
||||
availableQuantity?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
reservedBaseQuantity?: number;
|
||||
fulfilledBaseQuantity?: number;
|
||||
availableBaseQuantity?: number;
|
||||
};
|
||||
|
||||
export type GaoProductStockMovementDailyStatView = {
|
||||
@@ -89,6 +105,95 @@ export type GaoProductStockHealthView = {
|
||||
availableQuantity?: number;
|
||||
minStockQuantity?: number;
|
||||
lowStock?: number;
|
||||
skuCount?: number;
|
||||
lowStockSkuCount?: number;
|
||||
};
|
||||
|
||||
export type GaoProductSkuSalesDailyStatView = {
|
||||
dateValue?: number;
|
||||
skuId?: string;
|
||||
skuCode?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
productId?: string;
|
||||
productName?: string;
|
||||
orderCount?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
directSaleAmount?: number;
|
||||
};
|
||||
|
||||
export type GaoProductSkuSalesRankView = {
|
||||
skuId?: string;
|
||||
skuCode?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
productId?: string;
|
||||
productName?: string;
|
||||
orderCount?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
directSaleAmount?: number;
|
||||
};
|
||||
|
||||
export type GaoProductSkuFulfillmentDailyStatView = {
|
||||
dateValue?: number;
|
||||
skuId?: string;
|
||||
skuCode?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
productId?: string;
|
||||
productName?: string;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
baseQuantity?: number;
|
||||
};
|
||||
|
||||
export type GaoProductSkuFulfillmentRankView = {
|
||||
skuId?: string;
|
||||
skuCode?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
productId?: string;
|
||||
productName?: string;
|
||||
orderCount?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
reservedBaseQuantity?: number;
|
||||
fulfilledBaseQuantity?: number;
|
||||
availableBaseQuantity?: number;
|
||||
};
|
||||
|
||||
export type GaoProductSkuStockMovementDailyStatView = {
|
||||
dateValue?: number;
|
||||
skuId?: string;
|
||||
skuCode?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
productId?: string;
|
||||
productName?: string;
|
||||
inQuantity?: number;
|
||||
outQuantity?: number;
|
||||
netOnHandQuantity?: number;
|
||||
reserveQuantity?: number;
|
||||
releaseQuantity?: number;
|
||||
};
|
||||
|
||||
export type GaoProductSkuStockHealthView = {
|
||||
skuId?: string;
|
||||
skuCode?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
productId?: string;
|
||||
productName?: string;
|
||||
categoryId?: string | null;
|
||||
categoryName?: string;
|
||||
productType?: ProductType;
|
||||
onHandQuantity?: number;
|
||||
reservedQuantity?: number;
|
||||
availableQuantity?: number;
|
||||
minStockQuantity?: number;
|
||||
lowStock?: number;
|
||||
};
|
||||
|
||||
export type GaoProductTypeStatView = {
|
||||
@@ -170,6 +275,27 @@ export type GaoCustomerOrderProductRankView = {
|
||||
fulfilledQuantity?: number;
|
||||
availableQuantity?: number;
|
||||
directSaleAmount?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
reservedBaseQuantity?: number;
|
||||
fulfilledBaseQuantity?: number;
|
||||
availableBaseQuantity?: number;
|
||||
};
|
||||
|
||||
export type GaoCustomerOrderSkuRankView = {
|
||||
skuId?: string;
|
||||
skuCode?: string;
|
||||
skuName?: string;
|
||||
specSummary?: string;
|
||||
productId?: string;
|
||||
productName?: string;
|
||||
orderCount?: number;
|
||||
directBaseQuantity?: number;
|
||||
packageBaseQuantity?: number;
|
||||
reservedBaseQuantity?: number;
|
||||
fulfilledBaseQuantity?: number;
|
||||
availableBaseQuantity?: number;
|
||||
directSaleAmount?: number;
|
||||
};
|
||||
|
||||
export type GaoSalesOrderConsumptionDailyStatView = {
|
||||
|
||||
+10
-6
@@ -1,22 +1,26 @@
|
||||
import type { Attachment, Model, PageResult, User } from "timi-web-api";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
import type { OrderFulfillment } from "@/types/Fulfillment";
|
||||
import type { Product } from "@/types/Product";
|
||||
import type { ProductSku } from "@/types/Product";
|
||||
import type { GaoSalesOrderItem, GaoSalesOrderStatus, SalesOrder } from "@/types/SalesOrder";
|
||||
|
||||
export type PackageConfigStatus = "DRAFT" | "ACTIVE" | "INACTIVE";
|
||||
|
||||
export type PackageConfigItem = {
|
||||
packageConfigId?: string;
|
||||
productId: string;
|
||||
productUnitId: string;
|
||||
skuId: string;
|
||||
skuUnitId: string;
|
||||
productNameSnapshot?: string;
|
||||
productIdSnapshot?: string;
|
||||
skuCodeSnapshot?: string;
|
||||
skuNameSnapshot?: string;
|
||||
specSummarySnapshot?: string;
|
||||
unitSnapshot?: string;
|
||||
baseQuantityPerUnitSnapshot?: number | string;
|
||||
defaultQuantity: number | string;
|
||||
sort?: number;
|
||||
remark?: string | null;
|
||||
product?: Product;
|
||||
sku?: ProductSku;
|
||||
} & Model;
|
||||
|
||||
export type GaoPackageConfig = {
|
||||
@@ -54,8 +58,8 @@ export type GaoCustomerPackage = {
|
||||
} & Model;
|
||||
|
||||
export type PackagePurchaseItem = {
|
||||
productId: string;
|
||||
productUnitId: string;
|
||||
skuId: string;
|
||||
skuUnitId: string;
|
||||
totalQuantity: number | string;
|
||||
sort?: number;
|
||||
remark?: string | null;
|
||||
|
||||
+57
-10
@@ -25,9 +25,23 @@ export type ProductCategory = {
|
||||
status?: ProductCategoryStatus;
|
||||
} & Model;
|
||||
|
||||
export type ProductUnit = {
|
||||
export type ProductSpecValue = {
|
||||
specId?: string;
|
||||
name: string;
|
||||
enabled?: boolean;
|
||||
sort?: number;
|
||||
} & Model;
|
||||
|
||||
export type ProductSpec = {
|
||||
productId?: string;
|
||||
name: string;
|
||||
sort?: number;
|
||||
valueList?: ProductSpecValue[];
|
||||
} & Model;
|
||||
|
||||
export type ProductSkuUnit = {
|
||||
skuId?: string;
|
||||
name: string;
|
||||
baseQuantityPerUnit: number | string;
|
||||
salePrice?: number | null;
|
||||
isBase?: boolean;
|
||||
@@ -36,6 +50,25 @@ export type ProductUnit = {
|
||||
sort?: number;
|
||||
} & Model;
|
||||
|
||||
export type ProductSku = {
|
||||
storeId?: string;
|
||||
productId?: string;
|
||||
code: string;
|
||||
barcode?: string | null;
|
||||
name: string;
|
||||
specSummary?: string | null;
|
||||
stockEnabled: boolean;
|
||||
allowDecimalQuantity: boolean;
|
||||
minStockQuantity?: number | string | null;
|
||||
status?: ProductStatus;
|
||||
sort?: number;
|
||||
remark?: string | null;
|
||||
updatedBy?: string;
|
||||
specValueIdList?: string[];
|
||||
unitList?: ProductSkuUnit[];
|
||||
attachmentList?: Attachment[];
|
||||
} & Model;
|
||||
|
||||
export type Product = {
|
||||
storeId?: string;
|
||||
categoryId?: string;
|
||||
@@ -43,14 +76,13 @@ export type Product = {
|
||||
name: string;
|
||||
productType: ProductType;
|
||||
stockEnabled: boolean;
|
||||
allowDecimalQuantity: boolean;
|
||||
status?: ProductStatus;
|
||||
minStockQuantity?: number | string | null;
|
||||
sort?: number;
|
||||
remark?: string | null;
|
||||
updatedBy?: string;
|
||||
category?: ProductCategory;
|
||||
unitList?: ProductUnit[];
|
||||
specList?: ProductSpec[];
|
||||
skuList?: ProductSku[];
|
||||
attachmentList?: Attachment[];
|
||||
} & Model;
|
||||
|
||||
@@ -75,14 +107,25 @@ export type ProductPage = {
|
||||
|
||||
export type ProductStock = {
|
||||
storeId?: string;
|
||||
productId?: string;
|
||||
skuId?: string;
|
||||
onHandQuantity?: number | string;
|
||||
reservedQuantity?: number | string;
|
||||
updatedBy?: string;
|
||||
product?: Product;
|
||||
sku?: ProductSku;
|
||||
availableQuantity?: number | string;
|
||||
} & Model;
|
||||
|
||||
export type ProductStockProduct = {
|
||||
productId: string;
|
||||
productCode: string;
|
||||
productName: string;
|
||||
productType?: ProductType;
|
||||
skuCount?: number;
|
||||
onHandQuantity?: number | string;
|
||||
reservedQuantity?: number | string;
|
||||
availableQuantity?: number | string;
|
||||
};
|
||||
|
||||
export type ProductStockPage = {
|
||||
storeId?: string;
|
||||
productId?: string;
|
||||
@@ -93,9 +136,13 @@ export type ProductStockPage = {
|
||||
|
||||
export type StockRecord = {
|
||||
storeId?: string;
|
||||
productId?: string;
|
||||
productUnitId?: string;
|
||||
skuId?: string;
|
||||
skuUnitId?: string;
|
||||
productNameSnapshot?: string;
|
||||
productIdSnapshot?: string;
|
||||
skuCodeSnapshot?: string;
|
||||
skuNameSnapshot?: string;
|
||||
specSummarySnapshot?: string;
|
||||
unitSnapshot?: string;
|
||||
baseQuantityPerUnitSnapshot?: number | string;
|
||||
quantity?: number | string;
|
||||
@@ -137,8 +184,8 @@ export type StockRecordPage = {
|
||||
export type ProductStockChangeRequest = {
|
||||
requestNo: string;
|
||||
storeId?: string;
|
||||
productId: string;
|
||||
productUnitId: string;
|
||||
skuId: string;
|
||||
skuUnitId: string;
|
||||
quantity: number | string;
|
||||
remark: string;
|
||||
attachmentList: Partial<Attachment>[];
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Attachment } from "timi-web-api";
|
||||
import type { PhotoItem } from "@/types/Photo";
|
||||
import type { Product, ProductAttachmentType, ProductSku, ProductSkuUnit, ProductSpec, ProductSpecValue } from "@/types/Product";
|
||||
|
||||
export type ProductSpecValueForm = ProductSpecValue & {
|
||||
clientKey: string;
|
||||
};
|
||||
|
||||
export type ProductSpecForm = Omit<ProductSpec, "valueList"> & {
|
||||
clientKey: string;
|
||||
valueList: ProductSpecValueForm[];
|
||||
};
|
||||
|
||||
export type ProductSkuUnitForm = ProductSkuUnit & {
|
||||
clientKey: string;
|
||||
salePriceText: string;
|
||||
};
|
||||
|
||||
export type ProductSkuForm = Omit<ProductSku, "unitList"> & {
|
||||
clientKey: string;
|
||||
unitList: ProductSkuUnitForm[];
|
||||
minStockQuantityText: string;
|
||||
photoItemList: PhotoItem[];
|
||||
};
|
||||
|
||||
export type ProductForm = Omit<Product, "specList" | "skuList"> & {
|
||||
specList: ProductSpecForm[];
|
||||
skuList: ProductSkuForm[];
|
||||
};
|
||||
|
||||
export type ProductAttachmentItem = PhotoItem & {
|
||||
attachment?: Attachment;
|
||||
attachType: ProductAttachmentType;
|
||||
isSolidColorCover?: boolean;
|
||||
solidColor?: string;
|
||||
};
|
||||
@@ -14,10 +14,14 @@ export type FundRecordStatus = "PENDING" | "VERIFIED" | "REJECTED" | "CANCELLED"
|
||||
export type GaoSalesOrderItem = {
|
||||
salesOrderId?: string;
|
||||
itemType?: GaoSalesOrderItemType;
|
||||
productId?: string;
|
||||
productUnitId?: string;
|
||||
skuId?: string;
|
||||
skuUnitId?: string;
|
||||
attachmentList?: Attachment[];
|
||||
productNameSnapshot?: string;
|
||||
productIdSnapshot?: string;
|
||||
skuCodeSnapshot?: string;
|
||||
skuNameSnapshot?: string;
|
||||
specSummarySnapshot?: string;
|
||||
unitSnapshot?: string;
|
||||
baseQuantityPerUnitSnapshot?: number | string;
|
||||
quantity?: number | string;
|
||||
@@ -80,8 +84,8 @@ export type SalesOrderPage = {
|
||||
};
|
||||
|
||||
export type DirectProductOrderItemRequest = {
|
||||
productId: string;
|
||||
productUnitId: string;
|
||||
skuId: string;
|
||||
skuUnitId: string;
|
||||
quantity: number | string;
|
||||
unitPrice?: number;
|
||||
sort?: number;
|
||||
|
||||
Reference in New Issue
Block a user