新增 前端验证当前批次号不能重复

This commit is contained in:
wangsongsole 2022-06-15 13:38:00 +08:00
parent 09c21769e3
commit fd462e8c13
1 changed files with 10 additions and 0 deletions

View File

@ -361,6 +361,16 @@ export default class addKnockGold extends Component {
// //
const models = this.transformDataCode() const models = this.transformDataCode()
const isRepeat = data.find(
(item) => item.channel_activity_id === models.channel_activity_id
)
if (isRepeat) {
Notify.error('不允许输入重复的平台批次号')
return false
}
data.push(models) data.push(models)
sessionStorage.setItem('knockGoldData', JSON.stringify(data)) sessionStorage.setItem('knockGoldData', JSON.stringify(data))
return true return true