98 lines
2.6 KiB
TypeScript
98 lines
2.6 KiB
TypeScript
import type { Attachment, Model, PageResult, User } from "timi-web-api";
|
|
import type { Customer } from "@/types/Customer";
|
|
import type { ProductSkuSpecSnapshot, StockRecord } from "@/types/Product";
|
|
|
|
export type GaoFulfillmentStatus = "WAITING_STOCK" | "PENDING" | "VERIFIED" | "REJECTED" | "CANCELLED" | "REVOKED";
|
|
|
|
export type OrderFulfillmentItem = {
|
|
fulfillmentId?: string;
|
|
skuId?: string;
|
|
skuUnitId?: string;
|
|
attachmentList?: Attachment[];
|
|
sourceOrderItemId?: string;
|
|
quantity?: number | string;
|
|
baseQuantity?: number | string;
|
|
reservedBaseBefore?: number | string;
|
|
reservedBaseAfter?: number | string;
|
|
fulfilledBaseBefore?: number | string;
|
|
fulfilledBaseAfter?: number | string;
|
|
productNameSnapshot?: string;
|
|
productIdSnapshot?: string;
|
|
skuCodeSnapshot?: string;
|
|
skuNameSnapshot?: string;
|
|
specSummarySnapshot?: string;
|
|
skuSpecSnapshot?: ProductSkuSpecSnapshot[];
|
|
unitSnapshot?: string;
|
|
baseQuantityPerUnitSnapshot?: number | string;
|
|
} & Model;
|
|
|
|
export type OrderFulfillment = {
|
|
salesOrderId?: string;
|
|
storeId?: string;
|
|
customerId?: string;
|
|
status?: GaoFulfillmentStatus;
|
|
requestNo?: string;
|
|
operatorUserId?: string;
|
|
customer?: Customer;
|
|
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?: StockRecord[];
|
|
attachmentList?: Partial<Attachment>[];
|
|
} & Model;
|
|
|
|
export type FulfillmentPage = {
|
|
storeId?: string;
|
|
salesOrderId?: string;
|
|
customerId?: string;
|
|
skuIdList?: string[];
|
|
status?: GaoFulfillmentStatus;
|
|
beginAt?: number;
|
|
endAt?: number;
|
|
index: number;
|
|
size: number;
|
|
};
|
|
|
|
export type OrderFulfillmentCreateRequest = {
|
|
salesOrderId: string;
|
|
requestNo: string;
|
|
deliveredAt?: number;
|
|
itemList: GaoOrderFulfillmentItemRequest[];
|
|
attachmentList?: Partial<Attachment>[];
|
|
remark?: string | null;
|
|
};
|
|
|
|
export type GaoOrderFulfillmentItemRequest = {
|
|
sourceOrderItemId: string;
|
|
skuUnitId: 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 };
|