add product

This commit is contained in:
Timi
2026-09-03 14:27:40 +08:00
parent 7f669621fb
commit 333999fe21
63 changed files with 5662 additions and 2210 deletions
+91
View File
@@ -0,0 +1,91 @@
import type { Attachment, Model, PageResult, User } from "timi-web-api";
export type FulfillmentType = "PACKAGE_ENTITLEMENT" | "DIRECT_PRODUCT";
export type FulfillmentStatus = "WAITING_STOCK" | "PENDING" | "VERIFIED" | "REJECTED" | "CANCELLED" | "REVOKED";
export type OrderFulfillmentItem = {
fulfillmentId?: string;
productId?: string;
productUnitId?: string;
sourceOrderItemId?: string;
sourceCustomerPackageItemId?: string;
quantity?: number | string;
baseQuantity?: number | string;
reservedBefore?: number | string;
reservedAfter?: number | string;
fulfilledBefore?: number | string;
fulfilledAfter?: number | string;
productNameSnapshot?: string;
unitSnapshot?: string;
baseQuantityPerUnitSnapshot?: number | string;
} & Model;
export type OrderFulfillment = {
salesOrderId?: string;
storeId?: string;
customerId?: string;
fulfillmentType?: FulfillmentType;
status?: FulfillmentStatus;
requestNo?: string;
operatorUserId?: string;
deliveredAt?: number;
verifierUserId?: string;
verifiedAt?: number;
sourceFulfillmentId?: string;
reason?: string | null;
remark?: string | null;
operator?: Partial<User>;
verifier?: Partial<User>;
sourceFulfillment?: OrderFulfillment;
itemList?: OrderFulfillmentItem[];
stockRecordList?: Record<string, unknown>[];
attachmentList?: Partial<Attachment>[];
} & Model;
export type FulfillmentPage = {
storeId?: string;
salesOrderId?: string;
customerId?: string;
fulfillmentType?: FulfillmentType;
status?: FulfillmentStatus;
beginAt?: number;
endAt?: number;
index: number;
size: number;
};
export type OrderFulfillmentCreateRequest = {
salesOrderId: string;
requestNo: string;
deliveredAt?: number;
itemList: OrderFulfillmentItemRequest[];
attachmentList?: Partial<Attachment>[];
remark?: string | null;
};
export type OrderFulfillmentItemRequest = {
sourceOrderItemId?: string;
sourceCustomerPackageItemId?: string;
quantity: number | string;
};
export type FulfillmentActionRequest = { fulfillmentId: string; reason: string };
export type FulfillmentPrepareStockRequest = {
fulfillmentId: string;
reason?: string;
remark?: string | null;
attachmentList?: Partial<Attachment>[];
};
export type FulfillmentRevokeRequest = {
fulfillmentId: string;
requestNo: string;
deliveredAt?: number;
reason: string;
returnedToStore: boolean;
attachmentList?: Partial<Attachment>[];
remark?: string | null;
};
export type FulfillmentPageResult<T> = PageResult<T> & { pages?: number };