Skip to content

Commit f7217a5

Browse files
committed
【功能修复】商城:修复满减送批量合并的错误部分
1 parent 1a8c04d commit f7217a5

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/views/mall/promotion/coupon/components/CouponSelect.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ import {
116116
validityTypeFormat
117117
} from '@/views/mall/promotion/coupon/formatter'
118118
import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate'
119+
import { CouponTemplateTakeTypeEnum } from '@/utils/constants'
119120
120121
defineOptions({ name: 'CouponSelect' })
121122
@@ -138,7 +139,7 @@ const queryParams = reactive({
138139
pageSize: 10,
139140
name: null,
140141
discountType: null,
141-
canTakeTypes:[1]//只获得直接领取的券
142+
canTakeTypes: [CouponTemplateTakeTypeEnum.USER.type] // 只获得直接领取的券
142143
})
143144
const queryFormRef = ref() // 搜索的表单
144145
const selectedCouponList = ref<CouponTemplateApi.CouponTemplateVO[]>([]) // 选择的数据

src/views/mall/promotion/coupon/formatter.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ export const discountFormat = (row: CouponTemplateVO) => {
1616

1717
// 格式化【领取上限】
1818
export const takeLimitCountFormat = (row: CouponTemplateVO) => {
19-
if(row.takeLimitCount){
19+
if (row.takeLimitCount) {
2020
if (row.takeLimitCount === -1) {
2121
return '无领取限制'
2222
}
2323
return `${row.takeLimitCount} 张/人`
24-
}else{
24+
} else {
2525
return ' '
2626
}
27-
2827
}
2928

3029
// 格式化【有效期限】

src/views/mall/promotion/rewardActivity/RewardForm.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ const open = async (type: string, id?: number) => {
118118
data.startAndEndTime = [data.startTime, data.endTime]
119119
// 规则分转元
120120
data.rules?.forEach((item: any) => {
121-
item.limit = fenToYuan(item.limit || 0)
122121
item.discountPrice = fenToYuan(item.discountPrice || 0)
123122
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
124123
item.limit = fenToYuan(item.limit || 0)
@@ -154,7 +153,6 @@ const submitForm = async () => {
154153
delete data.startAndEndTime
155154
// 规则元转分
156155
data.rules.forEach((item) => {
157-
item.limit = yuanToFen(item.limit || 0)
158156
item.discountPrice = yuanToFen(item.discountPrice || 0)
159157
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
160158
item.limit = yuanToFen(item.limit || 0)

0 commit comments

Comments
 (0)