|
|
@ -371,14 +371,36 @@ function CouponRules() { |
|
|
|
message.error('优惠券类型不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if(currentCouponInfo.type == 1){ // 折扣券 |
|
|
|
if(!currentCouponInfo.discount_ratio){ |
|
|
|
message.error('打折比例不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if(!currentCouponInfo.discount_limit){ |
|
|
|
message.error('折扣金额上限不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
}else if(currentCouponInfo.type == 2){ // 满减 |
|
|
|
if(!currentCouponInfo.value){ |
|
|
|
message.error('优惠券面值不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if(!currentCouponInfo.value_condition){ |
|
|
|
message.error('满减使用条件不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
if(currentCouponInfo.value > currentCouponInfo.value_condition){ |
|
|
|
message.error('优惠券面值不能大于满减使用条件') |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!currentCouponInfo.hour){ |
|
|
|
message.error('欠费时长不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(currentCouponInfo.use_scope == 1 && currentCouponInfo.use_content == ''){ |
|
|
|
message.error('路段不能为空') |
|
|
|
return false |
|
|
@ -386,6 +408,11 @@ function CouponRules() { |
|
|
|
message.error('商户不能为空') |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
if(currentCouponInfo.illustrate?.length > 200){ |
|
|
|
message.error('使用说明不能超过200字') |
|
|
|
return false |
|
|
|
} |
|
|
|
return flag |
|
|
|
} |
|
|
|
|
|
|
@ -736,6 +763,7 @@ function CouponRules() { |
|
|
|
disabled={justCheck} |
|
|
|
value={currentCouponInfo.value} |
|
|
|
showClose={true} |
|
|
|
max={10000} |
|
|
|
showCount={false} |
|
|
|
suffixWord="元" |
|
|
|
onChange={e => { setCurrentCouponInfo({ ...currentCouponInfo,value: e }) } } |
|
|
|