fix: 处理积分最低0.01的问题
This commit is contained in:
parent
e0d48b59f6
commit
bebbcab19b
|
@ -72,7 +72,10 @@
|
|||
</el-form-item>
|
||||
|
||||
<el-form-item label="积分类型" prop="exchangePointsType" required>
|
||||
<el-radio-group v-model="configForm.exchangePointsType">
|
||||
<el-radio-group
|
||||
v-model="configForm.exchangePointsType"
|
||||
@change="handleChangeRadio"
|
||||
>
|
||||
<el-radio :label="2">积分优惠购</el-radio>
|
||||
<el-radio :label="1">积分换购</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -132,7 +135,8 @@
|
|||
>
|
||||
<el-input
|
||||
v-model="configForm.exchangeRequiredAmount"
|
||||
placeholder="请输入优惠购价格"
|
||||
placeholder="请输入最低兑换金额"
|
||||
:readonly="true"
|
||||
style="width: 200px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
@ -210,6 +214,11 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
handleChangeRadio() {
|
||||
if (this.configForm.exchangePointsType === 1) {
|
||||
this.configForm.exchangeRequiredAmount = 0.01;
|
||||
}
|
||||
},
|
||||
show(productData, editData = null, exchangeType = 1) {
|
||||
this.visible = true;
|
||||
this.isEdit = !!editData;
|
||||
|
@ -289,12 +298,6 @@ export default {
|
|||
: 0.01 // 如果不是积分优惠购,固定传0.01
|
||||
};
|
||||
}
|
||||
console.log(submitData);
|
||||
if (submitData.exchangeRequiredAmount < 0.01) {
|
||||
this.$message.error("请输入正确的优惠购价格, 不能小于0.01");
|
||||
this.submitting = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 根据是否编辑模式调用不同的API
|
||||
const apiCall = this.isEdit
|
||||
|
|
Loading…
Reference in New Issue