From 6bf8e740efdd65403267f64a3619c47918a3cbe3 Mon Sep 17 00:00:00 2001 From: zhangds Date: Fri, 6 Jan 2023 18:15:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/exchangecodeAdd/index.jsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pages/exchangecode/exchangecodeAdd/index.jsx b/src/pages/exchangecode/exchangecodeAdd/index.jsx index a55399a8..c5254411 100644 --- a/src/pages/exchangecode/exchangecodeAdd/index.jsx +++ b/src/pages/exchangecode/exchangecodeAdd/index.jsx @@ -202,7 +202,7 @@ export default class exchangeAdd extends React.Component { codeInfo: codeInfo, isload: true, tempdata: reqCopy.goods || [], - plan_time: [reqCopy.plan.start_time, reqCopy.plan.end_time], + plan_time: [reqCopy.plan.begin_time, reqCopy.plan.end_time], rank: checkedArray, rankoptions: arr }) @@ -862,7 +862,7 @@ export default class exchangeAdd extends React.Component { const isDay = moment(this.state.plan_time[1]).format("HH:mm:ss") /* 新增和复制时才生效 */ - if (type === "start" && this.state.isState !== 2) { + if (type === "start") { if (isDay < "23:59:59") { isdisabled = moment(str).isBefore(this.state.plan_time[0]) || @@ -875,13 +875,9 @@ export default class exchangeAdd extends React.Component { } if (type === "end") { - if (this.state.isState !== 2) { - isdisabled = + isdisabled = moment(str).add(1, "days").isBefore(this.state.plan_time[0]) || moment(str).isAfter(this.state.plan_time[1]) - } else { - isdisabled = moment(str).isAfter(this.state.plan_time) - } } return isdisabled