修复 新建、编辑立减金,可用时间段不允许输入0天

This commit is contained in:
wangsongsole 2022-06-17 09:50:09 +08:00
parent 0cf86dff04
commit 01d9f2c263
1 changed files with 6 additions and 3 deletions

View File

@ -455,10 +455,12 @@ export default class addKnockGold extends Component {
this.state.model.entry_time[0], this.state.model.entry_time[0],
this.state.model.entry_time[1] this.state.model.entry_time[1]
) )
if (TimeDiffer < Number(this.state.model.effect_date)) { if (
TimeDiffer < Number(this.state.model.effect_date) ||
1 > Number(this.state.model.effect_date)
) {
Notify.error( Notify.error(
`有限期不允许大于生效时间段 `有限期不允许大于生效时间段 注:当前有效期最小时间为 1 天,最大时间为 ${TimeDiffer}`
当前有效期最大时间为 ${TimeDiffer} `
) )
return false return false
} }
@ -964,6 +966,7 @@ export default class addKnockGold extends Component {
disabled={this.props?.data?.id ? true : false} disabled={this.props?.data?.id ? true : false}
width='195px' width='195px'
popupWidth='195px' popupWidth='195px'
disableSearch
/> />
</div> </div>
<span className='effect_dates'>有效期</span> <span className='effect_dates'>有效期</span>