周期次数等于绑定数

This commit is contained in:
zhangguoping 2024-10-31 18:55:27 +08:00
parent 943465c8ba
commit 58957f011e
4 changed files with 15 additions and 5 deletions

View File

@ -140,6 +140,11 @@ export default class add extends React.Component {
}
if (data) {
for(let j=0; j<data.code_batch.length; j++) {
if(data.code_batch[j].recharge_type == 1 && String(data.code_batch[j].period_type) != '1' && data.code_batch[j].period_num != data.code_batch[j].restrict){
return Notify.error(`${data.batch_name}兑换码绑定数必须等于周期次数`)
}
}
temp.push(data)
} else {
return

View File

@ -284,6 +284,11 @@ export default class add extends React.Component {
}
if (data) {
for(let j=0; j<data.code_batch.length; j++) {
if(data.code_batch[j].recharge_type == 1 && String(data.code_batch[j].period_type) != '1' && data.code_batch[j].period_num != data.code_batch[j].restrict){
return Notify.error(`${data.batch_name}兑换码绑定数必须等于周期次数`)
}
}
temp.push(data)
} else {
return

View File

@ -238,6 +238,11 @@ export default class add extends React.Component {
}
if (data) {
for(let j=0; j<data.code_batch.length; j++) {
if(data.code_batch[j].recharge_type == 1 && String(data.code_batch[j].period_type) != '1' && data.code_batch[j].period_num != data.code_batch[j].restrict){
return Notify.error(`${data.batch_name}兑换码绑定数必须等于周期次数`)
}
}
temp.push(data)
} else {
return

View File

@ -293,11 +293,6 @@ export default class acclist extends React.Component {
Notify.error("请输入接口调取后有效期")
return false
}
for (let i = 0; i < this.state.distdata.length; i++) {
if(this.state.distdata[i].recharge_type == 1 && String(this.state.distdata[i].period_type) != '1' && this.state.distdata[i].period_num != this.state.distdata[i].restrict){
return Notify.error(`兑换码绑定数必须等于周期次数`)
}
}
// 兑换码
if (this.props.keyType === 1) {
if (this.refs.form1.validator()) {