💊 fix: 修复【新增红包】随机红包,输入最大面额,大于了前端计算的最大面额值时,应该不允许提交
This commit is contained in:
parent
38f27f606a
commit
0a9b637d8a
|
@ -484,7 +484,10 @@ export default class addKnockGold extends Component {
|
|||
} else {
|
||||
data = b
|
||||
}
|
||||
return data.toFixed(2)
|
||||
this.setState({
|
||||
computeMin: data.toFixed(2)
|
||||
})
|
||||
this.onHandleChange("", "max_denomination")
|
||||
}
|
||||
|
||||
//tag关闭
|
||||
|
@ -501,7 +504,7 @@ export default class addKnockGold extends Component {
|
|||
return "请输入"
|
||||
}
|
||||
if (this.state.computeMax) {
|
||||
return `最大面额为${this.computeMin()} ~ ${this.state.computeMax}`
|
||||
return `最大面额为${this.state.computeMin} ~ ${this.state.computeMax}`
|
||||
}
|
||||
return "请输入"
|
||||
}
|
||||
|
|
|
@ -208,6 +208,16 @@ export function additionalRules(params) {
|
|||
return false
|
||||
}
|
||||
|
||||
if (params.computeMax < model.max_denomination) {
|
||||
Notify.error("随机最大面额不得大于计算最大面额")
|
||||
return false
|
||||
}
|
||||
|
||||
if (params.computeMin < model.min_denomination) {
|
||||
Notify.error("随机最小面额不得大于计算最小面额")
|
||||
return false
|
||||
}
|
||||
|
||||
if (model.day_budget < model.denomination || model.day_budget > model.all_budget) {
|
||||
Notify.error("单日发放预算不得小于面额且不大于总预算")
|
||||
return false
|
||||
|
|
|
@ -65,6 +65,7 @@ export function model({ data }) {
|
|||
userSelectList: [] /* 预警人数据 */,
|
||||
form_data: {},
|
||||
isEdit: !!data?.id /* 是否为编辑 */,
|
||||
computeMax: "" /* 随机最大面额 */
|
||||
computeMax: "" /* 随机最大面额 */,
|
||||
computeMin: "" /* 随机最小面额 */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue