From 5d613e69b3d651806f7710eebb2b14e5c7034097 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 24 Jun 2023 18:53:57 +0800 Subject: [PATCH] =?UTF-8?q?review=20=E8=90=A5=E9=94=80=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/product/spu.ts | 1 + .../mall/promotion/seckill/seckillActivity.ts | 5 ----- src/api/mall/promotion/seckill/seckillConfig.ts | 5 ----- src/utils/formatTime.ts | 15 +++++++++++++++ .../seckill/activity/SeckillActivityForm.vue | 5 ++++- .../activity/components/SpuAndSkuList.vue | 9 ++++++--- .../activity/components/SpuAndSkuSelectForm.vue | 6 ++++++ .../seckill/activity/seckillActivity.data.ts | 17 +++++++++-------- .../mall/promotion/seckill/config/index.vue | 5 ++++- 9 files changed, 45 insertions(+), 23 deletions(-) diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 5ddaa92e..eae9ddb8 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -49,6 +49,7 @@ export interface Spu { recommendGood?: boolean // 是否优品 } +// TODO @puhui999: SpuRespVO 合并到 SPU 里?前端少点 VO 类哈; export interface SpuRespVO extends Spu { price: number salesCount: number diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts index fc2d1871..93b128f3 100644 --- a/src/api/mall/promotion/seckill/seckillActivity.ts +++ b/src/api/mall/promotion/seckill/seckillActivity.ts @@ -60,8 +60,3 @@ export const updateSeckillActivity = async (data: SeckillActivityVO) => { export const deleteSeckillActivity = async (id: number) => { return await request.delete({ url: '/promotion/seckill-activity/delete?id=' + id }) } - -// 导出秒杀活动 Excel -export const exportSeckillActivityApi = async (params) => { - return await request.download({ url: '/promotion/seckill-activity/export-excel', params }) -} diff --git a/src/api/mall/promotion/seckill/seckillConfig.ts b/src/api/mall/promotion/seckill/seckillConfig.ts index aff72821..07b7d55c 100644 --- a/src/api/mall/promotion/seckill/seckillConfig.ts +++ b/src/api/mall/promotion/seckill/seckillConfig.ts @@ -47,8 +47,3 @@ export const updateSeckillConfigStatus = (id: number, status: number) => { export const deleteSeckillConfig = async (id: number) => { return await request.delete({ url: '/promotion/seckill-config/delete?id=' + id }) } - -// 导出秒杀时段配置 Excel -export const exportSeckillConfigApi = async (params) => { - return await request.download({ url: '/promotion/seckill-config/export-excel', params }) -} diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index b27cabdf..c9d80618 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -149,6 +149,21 @@ export const dateFormatter = (row, column, cellValue) => { return formatDate(cellValue) } +/** + * element plus 的时间 Formatter 实现,使用 YYYY-MM-DD 格式 + * + * @param row 行数据 + * @param column 字段 + * @param cellValue 字段值 + */ +// @ts-ignore +export const dateFormatter2 = (row, column, cellValue) => { + if (!cellValue) { + return + } + return formatDate(cellValue, 'YYYY-MM-DD') +} + /** * 设置起始日期,时间为00:00:00 * @param param 传入日期 diff --git a/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue b/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue index 37cc836d..e3356ec1 100644 --- a/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue +++ b/src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue @@ -9,7 +9,8 @@ > @@ -18,6 +19,7 @@ 取 消 +