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 @@ -120,6 +120,9 @@ const open = async (type: string, id?: number) => {
120
120
data .rules ?.forEach ((item : any ) => {
121
121
item .limit = fenToYuan (item .limit || 0 )
122
122
item .discountPrice = fenToYuan (item .discountPrice || 0 )
123
+ if (data .conditionType === PromotionConditionTypeEnum .PRICE .type ) {
124
+ item .limit = fenToYuan (item .limit || 0 )
125
+ }
123
126
})
124
127
formData .value = data
125
128
// 获得商品范围
@@ -153,6 +156,9 @@ const submitForm = async () => {
153
156
data .rules .forEach ((item ) => {
154
157
item .limit = yuanToFen (item .limit || 0 )
155
158
item .discountPrice = yuanToFen (item .discountPrice || 0 )
159
+ if (data .conditionType === PromotionConditionTypeEnum .PRICE .type ) {
160
+ item .limit = yuanToFen (item .limit || 0 )
161
+ }
156
162
})
157
163
// 设置商品范围
158
164
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