From e9da54b1008f860caaccc8181dcd29646d603e79 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 19 Oct 2023 17:33:42 +0800 Subject: [PATCH] =?UTF-8?q?SPU:=20=E6=96=B0=E5=A2=9E=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=8D=B7=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 3464bb9c74a0f3de9efc6ee5a4c42bac81c67485) --- src/api/mall/product/spu.ts | 8 +- src/utils/dict.ts | 1 + .../mall/product/spu/form/CouponSelect.vue | 217 ++++++++++++++++++ .../product/spu/form/OtherSettingsForm.vue | 26 ++- src/views/mall/product/spu/index.vue | 13 +- 5 files changed, 251 insertions(+), 14 deletions(-) create mode 100644 src/views/mall/product/spu/form/CouponSelect.vue diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 21018c0d..3b434440 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -28,14 +28,14 @@ export interface Sku { export interface Spu { id?: number name?: string // 商品名称 - categoryId?: number | null // 商品分类 + categoryId?: number | undefined // 商品分类 keyword?: string // 关键字 - unit?: number | null // 单位 + unit?: number | undefined // 单位 picUrl?: string // 商品封面图 sliderPicUrls?: string[] // 商品轮播图 introduction?: string // 商品简介 - deliveryTemplateId?: number | null // 运费模版 - brandId?: number | null // 商品品牌编号 + deliveryTemplateId?: number | undefined // 运费模版 + brandId?: number | undefined // 商品品牌编号 specType?: boolean // 商品规格 subCommissionType?: boolean // 分销类型 skus?: Sku[] // sku数组 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 556b3468..5c0cd012 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -156,6 +156,7 @@ export enum DICT_TYPE { // ========== MALL - 商品模块 ========== PRODUCT_UNIT = 'product_unit', // 商品单位 PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态 + PROMOTION_TYPE_ENUM = 'promotion_type_enum', // 营销类型枚举 // ========== MALL - 交易模块 ========== EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式 diff --git a/src/views/mall/product/spu/form/CouponSelect.vue b/src/views/mall/product/spu/form/CouponSelect.vue new file mode 100644 index 00000000..de0a2ed4 --- /dev/null +++ b/src/views/mall/product/spu/form/CouponSelect.vue @@ -0,0 +1,217 @@ + + + diff --git a/src/views/mall/product/spu/form/OtherSettingsForm.vue b/src/views/mall/product/spu/form/OtherSettingsForm.vue index a2f2afc6..0576427d 100644 --- a/src/views/mall/product/spu/form/OtherSettingsForm.vue +++ b/src/views/mall/product/spu/form/OtherSettingsForm.vue @@ -43,16 +43,22 @@ - 默认 - 秒杀 - 砍价 - 拼团 + + {{ type.label }} + - - 选择优惠券 + + {{ coupon.name }} + + 选择优惠券 @@ -82,6 +88,7 @@ 拼团 +