From dc39ad0cd1b5bc4a12983b971449ca1a6792d4b9 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 14 Jul 2023 17:35:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E6=8B=BC=E5=9B=A2?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=20CRUD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combination/combinationactivity.ts | 9 +-- .../activity/CombinationActivityForm.vue | 79 +++++++++++++------ .../activity/combinationActivity.data.ts | 2 +- .../promotion/combination/activity/index.vue | 28 +++++++ .../seckill/activity/SeckillActivityForm.vue | 3 +- 5 files changed, 89 insertions(+), 32 deletions(-) diff --git a/src/api/mall/promotion/combination/combinationactivity.ts b/src/api/mall/promotion/combination/combinationactivity.ts index 8ecf85bd..1e211c86 100644 --- a/src/api/mall/promotion/combination/combinationactivity.ts +++ b/src/api/mall/promotion/combination/combinationactivity.ts @@ -4,7 +4,7 @@ import { Sku, Spu } from '@/api/mall/product/spu' export interface CombinationActivityVO { id?: number name?: string - spuIds?: number[] + spuId?: number totalLimitCount?: number singleLimitCount?: number startTime?: Date @@ -27,7 +27,7 @@ export interface CombinationProductVO { } // 扩展 Sku 配置 -type SkuExtension = Sku & { +export type SkuExtension = Sku & { productConfig: CombinationProductVO } @@ -59,8 +59,3 @@ export const updateCombinationActivity = async (data: CombinationActivityVO) => export const deleteCombinationActivity = async (id: number) => { return await request.delete({ url: '/promotion/combination-activity/delete?id=' + id }) } - -// 导出拼团活动 Excel -export const exportCombinationActivity = async (params) => { - return await request.download({ url: '/promotion/combination-activity/export-excel', params }) -} diff --git a/src/views/mall/promotion/combination/activity/CombinationActivityForm.vue b/src/views/mall/promotion/combination/activity/CombinationActivityForm.vue index cfbe107f..36ede848 100644 --- a/src/views/mall/promotion/combination/activity/CombinationActivityForm.vue +++ b/src/views/mall/promotion/combination/activity/CombinationActivityForm.vue @@ -7,7 +7,7 @@ :rules="rules" :schema="allSchemas.formSchema" > - diff --git a/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue b/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue index b71b3b90..ac7a06b6 100644 --- a/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue +++ b/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue @@ -87,7 +87,6 @@ const selectSpu = (spuId: number, skuIds: number[]) => { } /** * 获取 SPU 详情 - * @param spuIds */ const getSpuDetails = async ( spuId: number, @@ -113,7 +112,7 @@ const getSpuDetails = async ( if (typeof products !== 'undefined') { const product = products.find((item) => item.skuId === sku.id) if (product) { - // 元转分 + // 分转元 product.seckillPrice = formatToFraction(product.seckillPrice) } config = product || config