Merge remote-tracking branch 'refs/remotes/update/dev' into develop-mall

This commit is contained in:
痴货
2024-09-15 20:40:30 +08:00
2 changed files with 18 additions and 1 deletions

View File

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