File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
src/views/mall/promotion/rewardActivity Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ const open = async (type: string, id?: number) => {
119
119
// 规则分转元
120
120
data .rules ?.forEach ((item : any ) => {
121
121
item .discountPrice = fenToYuan (item .discountPrice || 0 )
122
+ if (data .conditionType === PromotionConditionTypeEnum .PRICE .type ) {
123
+ item .limit = fenToYuan (item .limit || 0 )
124
+ }
122
125
})
123
126
formData .value = data
124
127
// 获得商品范围
@@ -151,6 +154,9 @@ const submitForm = async () => {
151
154
// 规则元转分
152
155
data .rules .forEach ((item ) => {
153
156
item .discountPrice = yuanToFen (item .discountPrice || 0 )
157
+ if (data .conditionType === PromotionConditionTypeEnum .PRICE .type ) {
158
+ item .limit = yuanToFen (item .limit || 0 )
159
+ }
154
160
})
155
161
// 设置商品范围
156
162
setProductScopeValues (data )
Original file line number Diff line number Diff line change 10
10
<el-form ref =" formRef" :model =" rule" >
11
11
<el-form-item label =" 优惠门槛:" label-width =" 100px" prop =" limit" >
12
12
满
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
+ />
13
24
<el-input
25
+ v-else
14
26
v-model =" rule.limit"
15
27
:min =" 0"
16
28
class =" w-150px! p-x-20px!"
17
29
placeholder =" "
18
30
type =" number"
19
31
/>
20
- <!-- TODO @puhui999:走字典数据? -->
21
32
{{ PromotionConditionTypeEnum.PRICE.type === formData.conditionType ? '元' : '件' }}
22
33
</el-form-item >
23
34
<el-form-item label =" 优惠内容:" label-width =" 100px" >
You can’t perform that action at this time.
0 commit comments