From ce3ca7c6cef7dbe18b224f831be4fae75d9407b2 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 5 Jul 2023 17:12:53 +0800 Subject: [PATCH] fix: mall SeckillActivity --- .../mall/promotion/seckill/seckillActivity.ts | 34 +++++++++--------- .../mall/product/spu/components/SkuList.vue | 10 ++++-- .../promotion/components/SpuAndSkuList.vue | 9 +++-- .../mall/promotion/components/SpuSelect.vue | 6 ++++ .../seckill/activity/SeckillActivityForm.vue | 36 ++++++++++++++----- 5 files changed, 64 insertions(+), 31 deletions(-) diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts index f460b013..42c1c31c 100644 --- a/src/api/mall/promotion/seckill/seckillActivity.ts +++ b/src/api/mall/promotion/seckill/seckillActivity.ts @@ -2,23 +2,23 @@ import request from '@/config/axios' import { Sku, Spu } from '@/api/mall/product/spu' export interface SeckillActivityVO { - id: number - spuIds: number[] - name: string - status: number - remark: string - startTime: Date - endTime: Date - sort: number - configIds: string - orderCount: number - userCount: number - totalPrice: number - totalLimitCount: number - singleLimitCount: number - stock: number - totalStock: number - products: SeckillProductVO[] + id?: number + spuId?: number + name?: string + status?: number + remark?: string + startTime?: Date + endTime?: Date + sort?: number + configIds?: string + orderCount?: number + userCount?: number + totalPrice?: number + totalLimitCount?: number + singleLimitCount?: number + stock?: number + totalStock?: number + products?: SeckillProductVO[] } // 秒杀活动所需属性 diff --git a/src/views/mall/product/spu/components/SkuList.vue b/src/views/mall/product/spu/components/SkuList.vue index 1af341e8..a4cd5d24 100644 --- a/src/views/mall/product/spu/components/SkuList.vue +++ b/src/views/mall/product/spu/components/SkuList.vue @@ -113,6 +113,7 @@ >() +const clearSelection = () => { + activitySkuListRef.value.clearSelection() +} // 暴露出生成 sku 方法,给添加属性成功时调用 -defineExpose({ generateTableData, validateSku }) +defineExpose({ generateTableData, validateSku, clearSelection }) diff --git a/src/views/mall/promotion/components/SpuAndSkuList.vue b/src/views/mall/promotion/components/SpuAndSkuList.vue index 20ade584..8efb7f83 100644 --- a/src/views/mall/promotion/components/SpuAndSkuList.vue +++ b/src/views/mall/promotion/components/SpuAndSkuList.vue @@ -1,5 +1,5 @@