mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-02-01 19:24:58 +08:00
【功能修复】商城:满减送的条件类型的满足价格不对的问题
This commit is contained in:
parent
48e78c38c8
commit
8a225e66b7
@ -119,6 +119,9 @@ const open = async (type: string, id?: number) => {
|
|||||||
// 规则分转元
|
// 规则分转元
|
||||||
data.rules?.forEach((item: any) => {
|
data.rules?.forEach((item: any) => {
|
||||||
item.discountPrice = fenToYuan(item.discountPrice || 0)
|
item.discountPrice = fenToYuan(item.discountPrice || 0)
|
||||||
|
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
|
||||||
|
item.limit = fenToYuan(item.limit || 0)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
formData.value = data
|
formData.value = data
|
||||||
// 获得商品范围
|
// 获得商品范围
|
||||||
@ -151,6 +154,9 @@ const submitForm = async () => {
|
|||||||
// 规则元转分
|
// 规则元转分
|
||||||
data.rules.forEach((item) => {
|
data.rules.forEach((item) => {
|
||||||
item.discountPrice = yuanToFen(item.discountPrice || 0)
|
item.discountPrice = yuanToFen(item.discountPrice || 0)
|
||||||
|
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
|
||||||
|
item.limit = yuanToFen(item.limit || 0)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// 设置商品范围
|
// 设置商品范围
|
||||||
setProductScopeValues(data)
|
setProductScopeValues(data)
|
||||||
|
@ -10,14 +10,25 @@
|
|||||||
<el-form ref="formRef" :model="rule">
|
<el-form ref="formRef" :model="rule">
|
||||||
<el-form-item label="优惠门槛:" label-width="100px" prop="limit">
|
<el-form-item label="优惠门槛:" label-width="100px" prop="limit">
|
||||||
满
|
满
|
||||||
|
<el-input-number
|
||||||
|
v-if="PromotionConditionTypeEnum.PRICE.type === formData.conditionType"
|
||||||
|
v-model="rule.limit"
|
||||||
|
:min="0"
|
||||||
|
:precision="2"
|
||||||
|
:step="0.1"
|
||||||
|
class="w-150px! p-x-20px!"
|
||||||
|
placeholder=""
|
||||||
|
type="number"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
<el-input
|
<el-input
|
||||||
|
v-else
|
||||||
v-model="rule.limit"
|
v-model="rule.limit"
|
||||||
:min="0"
|
:min="0"
|
||||||
class="w-150px! p-x-20px!"
|
class="w-150px! p-x-20px!"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
<!-- TODO @puhui999:走字典数据? -->
|
|
||||||
{{ PromotionConditionTypeEnum.PRICE.type === formData.conditionType ? '元' : '件' }}
|
{{ PromotionConditionTypeEnum.PRICE.type === formData.conditionType ? '元' : '件' }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="优惠内容:" label-width="100px">
|
<el-form-item label="优惠内容:" label-width="100px">
|
||||||
|
Loading…
Reference in New Issue
Block a user