重构商品模块,支持多规格

This commit is contained in:
2024-07-26 02:47:33 +08:00
parent cf0961afdd
commit 049a6f7476
18 changed files with 2594 additions and 59 deletions

View File

@@ -38,6 +38,11 @@ export interface PageParam {
companyId?: number;
// 商户ID
merchantId?: number;
merchantName?: string;
categoryIds?: any;
// 商品分类
categoryId?: number;
categoryName?: string;
// 搜素关键词
keywords?: string;
// 起始时间

View File

@@ -1,6 +1,6 @@
import type { PageParam } from '@/api';
import { GoodsSpec } from '@/api/shop/goodsSpec/model';
import { GoodsSku } from '@/api/shop/goodsSku/model';
import { GoodsSpec } from "@/api/shop/goodsSpec/model";
import { GoodsSku } from "@/api/shop/goodsSku/model";
export interface GoodsCount {
totalNum: number;
@@ -18,59 +18,64 @@ export interface Goods {
type?: number;
// 商品编码
code?: string;
// 商品名称
// 商品标题
goodsName?: string;
// 商品封面图
image?: string;
// 商品详情
content?: string;
// 商品附件
files?: string;
// 分类ID
// 商品分类ID
categoryId?: number;
// 一级分类
categoryParent?: string;
// 二级分类
categoryChildren?: string;
// 分类名称
categoryName?: string;
// 规格
// 商品规格 0单规格 1多规格
specs?: number;
// 货架
position?: string;
// 进货价格
price?: number;
price?: string;
// 销售价格
salePrice?: string;
// 库存计算方式(10下单减库存 20付款减库存)
deductStockType?: number;
// 封面图
files?: string;
// 销量
sales?: number;
// 库存
stock?: number;
// 商品重量
goodsWeight?: number;
// 库存计算方式
deductStockType?: number;
// 消费赚取积分
gainIntegral?: number;
// 推荐
recommend?: number;
// 状态, 0正常, 1待修,2异常已修3异常未修
// 商户ID
merchantId?: number;
// 商户名称
merchantName?: string;
// 状态0未上架1上架
isShow?: number;
// 状态, 0上架 1待上架 2待审核 3审核不通过
status?: number;
// 备注
comments?: string;
// 排序号
sortNumber?: number;
// 所有人
// 用户ID
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 商户ID
merchantId?: number;
// 店铺名称
merchantName?: string;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
// 显示规格名
specName?: string;
// 商品规格
goodsSpecs?: GoodsSpec[];
// 商品sku列表
@@ -89,7 +94,6 @@ export interface BathSet {
*/
export interface GoodsParam extends PageParam {
goodsId?: number;
status?: number;
isShow?: number;
stock?: number;
keywords?: string;

View File

@@ -36,6 +36,7 @@ export interface GoodsSku {
tenantId?: number;
// 创建时间
createTime?: string;
images?: any;
}
/**

View File

@@ -14,7 +14,7 @@ export interface GoodsSpec {
specName?: string;
// 规格值
valueList?: any[];
specValues?: string;
specValue?: string;
// 活动类型 0=商品1=秒杀2=砍价3=拼团
type?: string;
// 租户id
@@ -26,5 +26,6 @@ export interface GoodsSpec {
*/
export interface GoodsSpecParam extends PageParam {
id?: number;
goodsId: number;
keywords?: string;
}

View File

@@ -20,6 +20,7 @@ export interface SpecValue {
label?: string;
value?: string;
detail?: [string];
specName?: string;
}
/**

View File

@@ -35,6 +35,8 @@ export interface FileRecord {
createNickname?: string;
// 是否编辑状态
isUpdate?: boolean;
// 商品SKU索引
index?: any;
}
/**