From 1c197bb68553d33a66fcec7bd4db277e126e5dcc Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Thu, 18 Aug 2022 15:17:03 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=20=E5=85=91?= =?UTF-8?q?=E6=8D=A2=E7=A0=81=E5=A4=8D=E5=88=B6=E7=8A=B6=E6=80=81=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=94=99=E8=AF=AF=202=E3=80=81=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?=E5=85=91=E6=8D=A2=E7=A0=81=E5=A4=8D=E5=88=B6=20=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=B8=8D=E8=83=BD=E9=80=89=E5=BA=A7=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/copyCode/index.jsx | 3 ++- src/pages/exchangecode/list/list.js | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/pages/exchangecode/copyCode/index.jsx b/src/pages/exchangecode/copyCode/index.jsx index bd6eccba..688d0538 100644 --- a/src/pages/exchangecode/copyCode/index.jsx +++ b/src/pages/exchangecode/copyCode/index.jsx @@ -822,7 +822,8 @@ export default class acclist extends React.Component { if (type == 'end') { isdisabled = - moment(str).isBefore(beign_time) || moment(str).isAfter(end_time) + moment(str).add(1, 'days').isBefore(beign_time) || + moment(str).isAfter(end_time) } return isdisabled } diff --git a/src/pages/exchangecode/list/list.js b/src/pages/exchangecode/list/list.js index 7f84b043..063fc4bc 100644 --- a/src/pages/exchangecode/list/list.js +++ b/src/pages/exchangecode/list/list.js @@ -188,11 +188,17 @@ export default class acclist extends React.Component { /* 处理可复制数据逻辑 */ copyElementFunction({ key_batch_id, status, keyBatch, id, title }) { let element = '' - if ( - ![-1, 6, 7].includes(status) && - ![6, 7].includes(keyBatch?.status) && - keyBatch?.discard === 0 - ) { + /* + 条件一 如果兑换码状态为1(进行中)、2(暂停中)、3(未开始)可直接复制 + 条件二 如果兑换码状态为4(已完结)、5(已作废)则判断key批次是否是 生效中、暂停中、审核驳回状态且营销计划是待生效、进行中、暂停中 + */ + const isCopy = + [1, 2, 3].includes(status) || + ([4, 5].includes(status) && + [4, 5, 8].includes(keyBatch.status) && + [3, 5, 4].includes(keyBatch.plan.status)) + + if (isCopy) { element = (