Skip to content

Commit e86dfa3

Browse files
author
puhui999
committed
Merge remote-tracking branch 'yudao/dev' into dev-to-dev
2 parents c445173 + 24fc36e commit e86dfa3

File tree

6 files changed

+212
-107
lines changed

6 files changed

+212
-107
lines changed

src/api/mall/promotion/bargain/bargainActivity.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ export const updateBargainActivity = async (data: BargainActivityVO) => {
5757
return await request.put({ url: '/promotion/bargain-activity/update', data })
5858
}
5959

60+
// 关闭砍价活动
61+
export const closeBargainActivity = async (id: number) => {
62+
return await request.put({ url: '/promotion/bargain-activity/close?id=' + id })
63+
}
64+
6065
// 删除砍价活动
6166
export const deleteBargainActivity = async (id: number) => {
6267
return await request.delete({ url: '/promotion/bargain-activity/delete?id=' + id })

src/api/mall/promotion/combination/combinationActivity.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ export const updateCombinationActivity = async (data: CombinationActivityVO) =>
5555
return await request.put({ url: '/promotion/combination-activity/update', data })
5656
}
5757

58+
// 关闭拼团活动
59+
export const closeCombinationActivity = async (id: number) => {
60+
return await request.put({ url: '/promotion/bargain-combination/close?id=' + id })
61+
}
62+
5863
// 删除拼团活动
5964
export const deleteCombinationActivity = async (id: number) => {
6065
return await request.delete({ url: '/promotion/combination-activity/delete?id=' + id })

src/views/mall/promotion/bargain/activity/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ import * as BargainActivityApi from '@/api/mall/promotion/bargain/bargainActivit
149149
import BargainActivityForm from './BargainActivityForm.vue'
150150
import { formatDate } from '@/utils/formatTime'
151151
import { fenToYuanFormat } from '@/utils/formatter'
152-
import { fenToYuan } from '@/utils'
153152
154153
defineOptions({ name: 'PromotionBargainActivity' })
155154
@@ -203,7 +202,7 @@ const openForm = (type: string, id?: number) => {
203202
const handleClose = async (id: number) => {
204203
try {
205204
// 关闭的二次确认
206-
await message.confirm('确认关闭该秒杀活动吗')
205+
await message.confirm('确认关闭该砍价活动吗')
207206
// 发起关闭
208207
await BargainActivityApi.closeSeckillActivity(id)
209208
message.success('关闭成功')
@@ -218,7 +217,7 @@ const handleDelete = async (id: number) => {
218217
// 删除的二次确认
219218
await message.delConfirm()
220219
// 发起删除
221-
await BargainActivityApi.deleteBargainActivity(id)
220+
await BargainActivityApi.closeBargainActivity(id)
222221
message.success(t('common.delSuccess'))
223222
// 刷新列表
224223
await getList()

src/views/mall/promotion/combination/activity/combinationActivity.data.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -114,32 +114,6 @@ const crudSchemas = reactive<CrudSchema[]>([
114114
value: 0
115115
}
116116
},
117-
{
118-
label: '购买人数',
119-
field: 'userSize',
120-
isSearch: false,
121-
isForm: false
122-
},
123-
{
124-
label: '开团组数',
125-
field: 'totalCount',
126-
isSearch: false,
127-
isForm: false
128-
},
129-
{
130-
label: '成团组数',
131-
field: 'successCount',
132-
isSearch: false,
133-
isForm: false
134-
},
135-
{
136-
label: '活动状态',
137-
field: 'status',
138-
dictType: DICT_TYPE.COMMON_STATUS,
139-
dictClass: 'number',
140-
isSearch: true,
141-
isForm: false
142-
},
143117
{
144118
label: '拼团商品',
145119
field: 'spuId',
@@ -149,11 +123,6 @@ const crudSchemas = reactive<CrudSchema[]>([
149123
span: 24
150124
}
151125
}
152-
},
153-
{
154-
label: '操作',
155-
field: 'action',
156-
isForm: false
157126
}
158127
])
159128
export const { allSchemas } = useCrudSchemas(crudSchemas)

0 commit comments

Comments
 (0)