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