feat: 重构规格做法页并对齐原型抽屉样式
This commit is contained in:
@@ -22,6 +22,12 @@ export type ProductCategoryChannel = 'dine_in' | 'pickup' | 'wm';
|
||||
/** 通用启停状态。 */
|
||||
export type ProductSwitchStatus = 'disabled' | 'enabled';
|
||||
|
||||
/** 规格做法模板类型。 */
|
||||
export type ProductSpecType = 'method' | 'spec';
|
||||
|
||||
/** 规格做法选择方式。 */
|
||||
export type ProductSpecSelectionType = 'multi' | 'single';
|
||||
|
||||
/** 商品选择器项。 */
|
||||
export interface ProductPickerItemDto {
|
||||
categoryId: string;
|
||||
@@ -242,13 +248,15 @@ export interface ProductSpecValueDto {
|
||||
|
||||
/** 规格配置。 */
|
||||
export interface ProductSpecDto {
|
||||
description: string;
|
||||
id: string;
|
||||
isRequired: boolean;
|
||||
name: string;
|
||||
productCount: number;
|
||||
productIds: string[];
|
||||
selectionType: ProductSpecSelectionType;
|
||||
sort: number;
|
||||
status: ProductSwitchStatus;
|
||||
type: ProductSpecType;
|
||||
updatedAt: string;
|
||||
values: ProductSpecValueDto[];
|
||||
}
|
||||
@@ -258,17 +266,20 @@ export interface ProductSpecQuery {
|
||||
keyword?: string;
|
||||
status?: ProductSwitchStatus;
|
||||
storeId: string;
|
||||
type?: ProductSpecType;
|
||||
}
|
||||
|
||||
/** 保存规格参数。 */
|
||||
export interface SaveProductSpecDto {
|
||||
description: string;
|
||||
id?: string;
|
||||
isRequired: boolean;
|
||||
name: string;
|
||||
productIds: string[];
|
||||
selectionType: ProductSpecSelectionType;
|
||||
sort: number;
|
||||
status: ProductSwitchStatus;
|
||||
storeId: string;
|
||||
type: ProductSpecType;
|
||||
values: Array<{
|
||||
extraPrice: number;
|
||||
id?: string;
|
||||
@@ -290,6 +301,13 @@ export interface ChangeProductSpecStatusDto {
|
||||
storeId: string;
|
||||
}
|
||||
|
||||
/** 复制规格参数。 */
|
||||
export interface CopyProductSpecDto {
|
||||
newName?: string;
|
||||
specId: string;
|
||||
storeId: string;
|
||||
}
|
||||
|
||||
/** 加料项。 */
|
||||
export interface ProductAddonItemDto {
|
||||
id: string;
|
||||
@@ -641,6 +659,11 @@ export async function changeProductSpecStatusApi(
|
||||
return requestClient.post('/product/spec/status', data);
|
||||
}
|
||||
|
||||
/** 复制规格模板。 */
|
||||
export async function copyProductSpecApi(data: CopyProductSpecDto) {
|
||||
return requestClient.post<ProductSpecDto>('/product/spec/copy', data);
|
||||
}
|
||||
|
||||
/** 获取加料组列表。 */
|
||||
export async function getProductAddonGroupListApi(params: ProductAddonQuery) {
|
||||
return requestClient.get<ProductAddonGroupDto[]>(
|
||||
|
||||
Reference in New Issue
Block a user