diff --git a/src/api/index.ts b/src/api/index.ts index 401f07f..a5b707f 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -38,6 +38,11 @@ export interface PageParam { companyId?: number; // 商户ID merchantId?: number; + merchantName?: string; + categoryIds?: any; + // 商品分类 + categoryId?: number; + categoryName?: string; // 搜素关键词 keywords?: string; // 起始时间 diff --git a/src/api/shop/goods/model/index.ts b/src/api/shop/goods/model/index.ts index 759b98c..c3d6839 100644 --- a/src/api/shop/goods/model/index.ts +++ b/src/api/shop/goods/model/index.ts @@ -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; diff --git a/src/api/shop/goodsSku/model/index.ts b/src/api/shop/goodsSku/model/index.ts index f3950af..c0a2266 100644 --- a/src/api/shop/goodsSku/model/index.ts +++ b/src/api/shop/goodsSku/model/index.ts @@ -36,6 +36,7 @@ export interface GoodsSku { tenantId?: number; // 创建时间 createTime?: string; + images?: any; } /** diff --git a/src/api/shop/goodsSpec/model/index.ts b/src/api/shop/goodsSpec/model/index.ts index 99da558..0d4cfd5 100644 --- a/src/api/shop/goodsSpec/model/index.ts +++ b/src/api/shop/goodsSpec/model/index.ts @@ -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; } diff --git a/src/api/shop/specValue/model/index.ts b/src/api/shop/specValue/model/index.ts index a794343..eb1e717 100644 --- a/src/api/shop/specValue/model/index.ts +++ b/src/api/shop/specValue/model/index.ts @@ -20,6 +20,7 @@ export interface SpecValue { label?: string; value?: string; detail?: [string]; + specName?: string; } /** diff --git a/src/api/system/file/model/index.ts b/src/api/system/file/model/index.ts index bcd0541..1977ed2 100644 --- a/src/api/system/file/model/index.ts +++ b/src/api/system/file/model/index.ts @@ -35,6 +35,8 @@ export interface FileRecord { createNickname?: string; // 是否编辑状态 isUpdate?: boolean; + // 商品SKU索引 + index?: any; } /** diff --git a/src/components/SelectGoodsCategory/index.vue b/src/components/SelectGoodsCategory/index.vue index 9ae183c..9ead2a0 100644 --- a/src/components/SelectGoodsCategory/index.vue +++ b/src/components/SelectGoodsCategory/index.vue @@ -47,6 +47,7 @@ }; const onChange = (item: any, value: ValueType) => { + console.log(item,value); emit('done', item, value); }; diff --git a/src/components/SelectSpec/components/select-data.vue b/src/components/SelectSpec/components/select-data.vue new file mode 100644 index 0000000..64ecc69 --- /dev/null +++ b/src/components/SelectSpec/components/select-data.vue @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + {{ item.value }} : + + {{ sub }} + + + + + + + + + + + + + + + diff --git a/src/components/SelectSpec/index.vue b/src/components/SelectSpec/index.vue index 515f516..bd3421c 100644 --- a/src/components/SelectSpec/index.vue +++ b/src/components/SelectSpec/index.vue @@ -1,58 +1,61 @@ - - + + + + + + + + + + diff --git a/src/views/booking/goods/add/index.vue b/src/views/booking/goods/add/index.vue index 79ba709..643c1d2 100644 --- a/src/views/booking/goods/add/index.vue +++ b/src/views/booking/goods/add/index.vue @@ -792,7 +792,7 @@ specId: d.specId, name: d.specName, value: d.specName, - list: d.specValues?.map(v => { + list: d.specValue?.map(v => { return { specId: v.specId, specValueId: v.specValueId, diff --git a/src/views/shop/goods.bak/add/index.vue b/src/views/shop/demo/add/index.vue similarity index 100% rename from src/views/shop/goods.bak/add/index.vue rename to src/views/shop/demo/add/index.vue diff --git a/src/views/shop/goods.bak/components/goodsEdit.vue b/src/views/shop/demo/components/goodsEdit.vue similarity index 100% rename from src/views/shop/goods.bak/components/goodsEdit.vue rename to src/views/shop/demo/components/goodsEdit.vue diff --git a/src/views/shop/goods.bak/components/search.vue b/src/views/shop/demo/components/search.vue similarity index 100% rename from src/views/shop/goods.bak/components/search.vue rename to src/views/shop/demo/components/search.vue diff --git a/src/views/shop/goods.bak/index.vue b/src/views/shop/demo/index.vue similarity index 100% rename from src/views/shop/goods.bak/index.vue rename to src/views/shop/demo/index.vue diff --git a/src/views/shop/goods/add/index.vue b/src/views/shop/goods/add/index.vue new file mode 100644 index 0000000..ac07895 --- /dev/null +++ b/src/views/shop/goods/add/index.vue @@ -0,0 +1,1046 @@ + + + + + + + + + + + + + + 实物商品 + 虚拟商品 + + + {{ form.type == 1 + ? `支持快递邮寄、同城配送或到店自提方式发货` + : '电子券码等,线下到店核销,无需备货' }} + + + + + + 去新增 + + + + + 上传视频(mp4格式),视频时长不超过60秒,视频大小不超过200M。 + + + + + + + + + + + + + + + + 单规格 + 多规格 + + + + + 商品的实际购买金额,最低0.01 + + + + 划线价仅用于商品页展示 + + + + 商品的实际库存数量,为0时用户无法下单 + + + + + + + {{ + `属性${index + 1}` + }} + + + + 删除属性 + + + + + {{ val.specValue }} + + + + + + + 创建新属性 + + skuList: {{ skuList }} + + + + + + + + + + {{ index + 1 }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量设置 + + + + + + 下单减库存 + 付款减库存 + + + + + + + + + + + 最多上传20个素材,拖拽可进行排序,单张图片需限制在10M以内 + + + + + + + 保存 + + + + + + + + + + + + + + 保存 + + + + + + + + + + + + + + + + + + + diff --git a/src/views/shop/goods/components/goodsEdit.vue b/src/views/shop/goods/components/goodsEdit.vue new file mode 100644 index 0000000..443cbaa --- /dev/null +++ b/src/views/shop/goods/components/goodsEdit.vue @@ -0,0 +1,765 @@ + + + + + + + + + 实物商品 + 虚拟商品 + + + {{ + form.type == 1 + ? `支持快递邮寄、同城配送或到店自提方式发货` + : '电子券码等,线下到店核销,无需备货' + }} + + + + + + + + + + + + + + + + + + + + 商品的实际购买金额,最低0.01 + + + + 划线价仅用于商品页展示 + + + + 划线价仅用于商品页展示 + + + + 支持上传视频(mp4格式),视频时长不超过60秒,视频大小不超过200M。 + + + + + + + 上架 + 下架 + + + + + + + 单规格 + 多规格 + + + + + + + + + + + + + {{ item.value }} : + + + + + + + + + + + + + 确定 + 取消 + + + + 添加新规格 + 生成SKU + + + + + + + + + + {{ index + 1 }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 付款减库存 + 下单减库存 + + + + + + + + + + + + diff --git a/src/views/shop/goods/components/search.vue b/src/views/shop/goods/components/search.vue new file mode 100644 index 0000000..fdd46b1 --- /dev/null +++ b/src/views/shop/goods/components/search.vue @@ -0,0 +1,145 @@ + + + + + + + + 添加 + + + 出售中({{ goodsCount?.totalNum }}) + 待上架({{ goodsCount?.totalNum2 }}) + 已售罄({{ goodsCount?.totalNum3 }}) + + + + + 重置 + + + + diff --git a/src/views/shop/goods/index.vue b/src/views/shop/goods/index.vue new file mode 100644 index 0000000..6c83d2b --- /dev/null +++ b/src/views/shop/goods/index.vue @@ -0,0 +1,392 @@ + + + + + + + + + + + 虚拟商品 + 实物商品 + + + + + + ¥{{ formatNumber(record.salePrice) }} + + + 出售中 + 已下架 + + + 显示 + 隐藏 + + + + 修改 + + + 删除 + + + + + + + + + + + + + + + + + +