【功能修复】商城:满减送的条件类型的满足价格不对的问题

This commit is contained in:
YunaiV
2024-09-15 20:22:34 +08:00
parent 48e78c38c8
commit 8a225e66b7
2 changed files with 18 additions and 1 deletions

View File

@ -119,6 +119,9 @@ const open = async (type: string, id?: number) => {
// 规则分转元
data.rules?.forEach((item: any) => {
item.discountPrice = fenToYuan(item.discountPrice || 0)
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
item.limit = fenToYuan(item.limit || 0)
}
})
formData.value = data
// 获得商品范围
@ -151,6 +154,9 @@ const submitForm = async () => {
// 规则元转分
data.rules.forEach((item) => {
item.discountPrice = yuanToFen(item.discountPrice || 0)
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
item.limit = yuanToFen(item.limit || 0)
}
})
// 设置商品范围
setProductScopeValues(data)