Skip to content

Commit f069f80

Browse files
committed
Merge remote-tracking branch 'refs/remotes/update/dev' into develop-mall
2 parents f086b9c + 8a225e6 commit f069f80

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ const open = async (type: string, id?: number) => {
120120
data.rules?.forEach((item: any) => {
121121
item.limit = fenToYuan(item.limit || 0)
122122
item.discountPrice = fenToYuan(item.discountPrice || 0)
123+
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
124+
item.limit = fenToYuan(item.limit || 0)
125+
}
123126
})
124127
formData.value = data
125128
// 获得商品范围
@@ -153,6 +156,9 @@ const submitForm = async () => {
153156
data.rules.forEach((item) => {
154157
item.limit = yuanToFen(item.limit || 0)
155158
item.discountPrice = yuanToFen(item.discountPrice || 0)
159+
if (data.conditionType === PromotionConditionTypeEnum.PRICE.type) {
160+
item.limit = yuanToFen(item.limit || 0)
161+
}
156162
})
157163
// 设置商品范围
158164
setProductScopeValues(data)

src/views/mall/promotion/rewardActivity/components/RewardRule.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,25 @@
1010
<el-form ref="formRef" :model="rule">
1111
<el-form-item label="优惠门槛:" label-width="100px" prop="limit">
1212
13+
<el-input-number
14+
v-if="PromotionConditionTypeEnum.PRICE.type === formData.conditionType"
15+
v-model="rule.limit"
16+
:min="0"
17+
:precision="2"
18+
:step="0.1"
19+
class="w-150px! p-x-20px!"
20+
placeholder=""
21+
type="number"
22+
controls-position="right"
23+
/>
1324
<el-input
25+
v-else
1426
v-model="rule.limit"
1527
:min="0"
1628
class="w-150px! p-x-20px!"
1729
placeholder=""
1830
type="number"
1931
/>
20-
<!-- TODO @puhui999:走字典数据? -->
2132
{{ PromotionConditionTypeEnum.PRICE.type === formData.conditionType ? '元' : '件' }}
2233
</el-form-item>
2334
<el-form-item label="优惠内容:" label-width="100px">

0 commit comments

Comments
 (0)