修复bug

This commit is contained in:
wangsongsole 2022-08-19 15:37:00 +08:00
parent c5a13b5bc8
commit 3de1c2fd75
3 changed files with 5 additions and 4 deletions

View File

@ -287,14 +287,15 @@ export default class addKnockGold extends Component {
let step1 = JSON.parse(sessionStorage.getItem('knockGold_effectDate')) let step1 = JSON.parse(sessionStorage.getItem('knockGold_effectDate'))
let isdisabled = false let isdisabled = false
let str = moment(date).format('YYYY-MM-DD HH:mm:ss') let str = moment(date).format('YYYY-MM-DD HH:mm:ss')
const isDay = moment(step1.begin_time).format('HH:mm:ss') const isDay = moment(step1.end_time).format('HH:mm:ss')
if (type == 'start') { if (type == 'start') {
if (isDay < '23:59:59') { if (isDay < '23:59:59') {
isdisabled = isdisabled =
moment(str).isBefore(step1.begin_time) || moment(str).isBefore(step1.begin_time) ||
moment(str).subtract(1, 'days').isAfter(step1.end_time) moment(str).subtract(1, 'days').isAfter(step1.end_time)
} else { } else {
moment(str).isBefore(step1.begin_time) || isdisabled =
moment(str).isBefore(step1.begin_time) ||
moment(str).isAfter(step1.end_time) moment(str).isAfter(step1.end_time)
} }
} }

View File

@ -816,7 +816,7 @@ export default class acclist extends React.Component {
let str = moment(date).format('YYYY-MM-DD HH:mm:ss') let str = moment(date).format('YYYY-MM-DD HH:mm:ss')
let beign_time = this.state.begintime let beign_time = this.state.begintime
let end_time = this.state.endtime let end_time = this.state.endtime
const isDay = moment(beign_time).format('HH:mm:ss') const isDay = moment(end_time).format('HH:mm:ss')
if (type == 'start') { if (type == 'start') {
if (isDay < '23:59:59') { if (isDay < '23:59:59') {
isdisabled = isdisabled =

View File

@ -542,7 +542,7 @@ export default class acclist extends React.Component {
let step1 = JSON.parse(sessionStorage.getItem('knockGold_effectDate')) let step1 = JSON.parse(sessionStorage.getItem('knockGold_effectDate'))
let isdisabled = false let isdisabled = false
let str = moment(date).format('YYYY-MM-DD HH:mm:ss') let str = moment(date).format('YYYY-MM-DD HH:mm:ss')
let isDay = moment(step1.begin_time).format('HH:mm:ss') let isDay = moment(step1.end_time).format('HH:mm:ss')
if (type == 'start') { if (type == 'start') {
if (isDay < '23:59:59') { if (isDay < '23:59:59') {
isdisabled = isdisabled =