From fd462e8c1366f1f159a47a919d58a1d9e47f2b80 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Wed, 15 Jun 2022 13:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E5=BD=93=E5=89=8D=E6=89=B9=E6=AC=A1=E5=8F=B7?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/knockGold/index.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/knockGold/index.jsx b/src/components/knockGold/index.jsx index 20dbc0d8..20d2a381 100644 --- a/src/components/knockGold/index.jsx +++ b/src/components/knockGold/index.jsx @@ -361,6 +361,16 @@ export default class addKnockGold extends Component { //字段转换 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) sessionStorage.setItem('knockGoldData', JSON.stringify(data)) return true