From 78062dd474a9fcecbeec46b436b17d8f7f43883b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 6 Oct 2023 10:58:31 +0800 Subject: [PATCH] =?UTF-8?q?promotion=EF=BC=9A=E8=B0=83=E6=95=B4=E6=8B=BC?= =?UTF-8?q?=E5=9B=A2=E6=B4=BB=E5=8A=A8=E7=9A=84=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/bargain/bargainActivity.ts | 5 + .../combination/combinationActivity.ts | 5 + .../mall/promotion/bargain/activity/index.vue | 5 +- .../activity/combinationActivity.data.ts | 31 -- .../promotion/combination/activity/index.vue | 273 +++++++++++++----- 5 files changed, 210 insertions(+), 109 deletions(-) diff --git a/src/api/mall/promotion/bargain/bargainActivity.ts b/src/api/mall/promotion/bargain/bargainActivity.ts index a4b543a6..d16f422c 100644 --- a/src/api/mall/promotion/bargain/bargainActivity.ts +++ b/src/api/mall/promotion/bargain/bargainActivity.ts @@ -57,6 +57,11 @@ export const updateBargainActivity = async (data: BargainActivityVO) => { return await request.put({ url: '/promotion/bargain-activity/update', data }) } +// 关闭砍价活动 +export const closeBargainActivity = async (id: number) => { + return await request.put({ url: '/promotion/bargain-activity/close?id=' + id }) +} + // 删除砍价活动 export const deleteBargainActivity = async (id: number) => { return await request.delete({ url: '/promotion/bargain-activity/delete?id=' + id }) diff --git a/src/api/mall/promotion/combination/combinationActivity.ts b/src/api/mall/promotion/combination/combinationActivity.ts index f89264e4..15b7eef3 100644 --- a/src/api/mall/promotion/combination/combinationActivity.ts +++ b/src/api/mall/promotion/combination/combinationActivity.ts @@ -55,6 +55,11 @@ export const updateCombinationActivity = async (data: CombinationActivityVO) => return await request.put({ url: '/promotion/combination-activity/update', data }) } +// 关闭拼团活动 +export const closeCombinationActivity = async (id: number) => { + return await request.put({ url: '/promotion/bargain-combination/close?id=' + id }) +} + // 删除拼团活动 export const deleteCombinationActivity = async (id: number) => { return await request.delete({ url: '/promotion/combination-activity/delete?id=' + id }) diff --git a/src/views/mall/promotion/bargain/activity/index.vue b/src/views/mall/promotion/bargain/activity/index.vue index a665fa7a..21047e65 100644 --- a/src/views/mall/promotion/bargain/activity/index.vue +++ b/src/views/mall/promotion/bargain/activity/index.vue @@ -149,7 +149,6 @@ import * as BargainActivityApi from '@/api/mall/promotion/bargain/bargainActivit import BargainActivityForm from './BargainActivityForm.vue' import { formatDate } from '@/utils/formatTime' import { fenToYuanFormat } from '@/utils/formatter' -import { fenToYuan } from '@/utils' defineOptions({ name: 'PromotionBargainActivity' }) @@ -203,7 +202,7 @@ const openForm = (type: string, id?: number) => { const handleClose = async (id: number) => { try { // 关闭的二次确认 - await message.confirm('确认关闭该秒杀活动吗?') + await message.confirm('确认关闭该砍价活动吗?') // 发起关闭 await BargainActivityApi.closeSeckillActivity(id) message.success('关闭成功') @@ -218,7 +217,7 @@ const handleDelete = async (id: number) => { // 删除的二次确认 await message.delConfirm() // 发起删除 - await BargainActivityApi.deleteBargainActivity(id) + await BargainActivityApi.closeBargainActivity(id) message.success(t('common.delSuccess')) // 刷新列表 await getList() diff --git a/src/views/mall/promotion/combination/activity/combinationActivity.data.ts b/src/views/mall/promotion/combination/activity/combinationActivity.data.ts index ad80bfd1..4307a547 100644 --- a/src/views/mall/promotion/combination/activity/combinationActivity.data.ts +++ b/src/views/mall/promotion/combination/activity/combinationActivity.data.ts @@ -114,32 +114,6 @@ const crudSchemas = reactive([ value: 0 } }, - { - label: '购买人数', - field: 'userSize', - isSearch: false, - isForm: false - }, - { - label: '开团组数', - field: 'totalCount', - isSearch: false, - isForm: false - }, - { - label: '成团组数', - field: 'successCount', - isSearch: false, - isForm: false - }, - { - label: '活动状态', - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true, - isForm: false - }, { label: '拼团商品', field: 'spuId', @@ -149,11 +123,6 @@ const crudSchemas = reactive([ span: 24 } } - }, - { - label: '操作', - field: 'action', - isForm: false } ]) export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/src/views/mall/promotion/combination/activity/index.vue b/src/views/mall/promotion/combination/activity/index.vue index 2080d287..a6839a74 100644 --- a/src/views/mall/promotion/combination/activity/index.vue +++ b/src/views/mall/promotion/combination/activity/index.vue @@ -1,91 +1,194 @@ -