code review:优惠劵管理
This commit is contained in:
parent
7c6d7e8061
commit
51e76ffd53
@ -1,5 +1,7 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// TODO @dhb52:vo 缺少
|
||||
|
||||
// 删除优惠劵
|
||||
export const deleteCoupon = async (id: number) => {
|
||||
return request.delete({
|
||||
|
@ -281,28 +281,6 @@ export const PromotionConditionTypeEnum = {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 促销活动的状态枚举
|
||||
*/
|
||||
export const PromotionActivityStatusEnum = {
|
||||
WAIT: {
|
||||
type: 10,
|
||||
name: '未开始'
|
||||
},
|
||||
RUN: {
|
||||
type: 20,
|
||||
name: '进行中'
|
||||
},
|
||||
END: {
|
||||
type: 30,
|
||||
name: '已结束'
|
||||
},
|
||||
CLOSE: {
|
||||
type: 40,
|
||||
name: '已关闭'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 优惠类型枚举
|
||||
*/
|
||||
|
@ -142,17 +142,6 @@ const statusTabs = reactive([
|
||||
|
||||
const queryFormRef = ref<FormInstance | null>(null)
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
// 设置 statuses 过滤
|
||||
for (const dict of getIntDictOptions(DICT_TYPE.PROMOTION_COUPON_STATUS)) {
|
||||
statusTabs.push({
|
||||
label: dict.label,
|
||||
value: dict.value as string
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@ -197,4 +186,15 @@ const onTabChange = (tabName) => {
|
||||
queryParams.status = tabName === 'all' ? undefined : tabName
|
||||
getList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
// 设置 statuses 过滤
|
||||
for (const dict of getIntDictOptions(DICT_TYPE.PROMOTION_COUPON_STATUS)) {
|
||||
statusTabs.push({
|
||||
label: dict.label,
|
||||
value: dict.value as string
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user