【BUG】修改满减送减的金额显示小100倍的问题
parent
6375cd98df
commit
0fd5904104
|
|
@ -158,6 +158,7 @@ import { getSpuSimpleList } from '@/api/mall/product/spu'
|
|||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import * as RewardActivityApi from '@/api/mall/promotion/reward/rewardActivity'
|
||||
import { PromotionConditionTypeEnum, PromotionProductScopeEnum } from '@/utils/constants'
|
||||
import {convertToInteger, formatToFraction} from "@/utils";
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
|
|
@ -231,6 +232,7 @@ const open = async (type: string, id?: number) => {
|
|||
if (item.discountPrice) {
|
||||
array.push('订单金额优惠')
|
||||
}
|
||||
item.discountPrice = formatToFraction(item.discountPrice)
|
||||
activityRules.push(array)
|
||||
})
|
||||
formData.value = data
|
||||
|
|
@ -253,6 +255,7 @@ const submitForm = async () => {
|
|||
formData.value.endTime = +new Date(formData.value.startAndEndTime[1])
|
||||
activityRules.forEach((item, index) => {
|
||||
formData.value.rules[index].freeDelivery = !!item.includes('包邮')
|
||||
formData.value.rules[index].discountPrice = convertToInteger(formData.value.rules[index].discountPrice)
|
||||
if (!item.includes('送积分')) {
|
||||
formData.value.rules[index].point = undefined
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue