fetchMoment

dev_forum
hjm 5 years ago
parent bd56fb15fd
commit 01ee77ab6f

@ -49,6 +49,8 @@ class CommonWorkSetting extends Component{
super(props)
this.publishModal = React.createRef();
this.endModal = React.createRef();
this.fetchMoment = moment()
this.state={
unified_setting: true,
rules: [],
@ -123,6 +125,7 @@ class CommonWorkSetting extends Component{
} else if (result.data.publish_time && moment(result.data.publish_time) < moment()) {
disable_unified_setting = true
}
this.fetchMoment = moment()
this.setState({
// starttimetype:starttype,
// endtimetype:endtype,
@ -1042,7 +1045,7 @@ class CommonWorkSetting extends Component{
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_publish_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(this.state.init_publish_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
@ -1074,7 +1077,7 @@ class CommonWorkSetting extends Component{
<span>截止时间</span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_end_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(this.state.init_end_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
@ -1133,7 +1136,7 @@ class CommonWorkSetting extends Component{
<RadioGroup onChange={this.allow_late_change} value={allow_late}>
<Radio style={radioStyle} value={true} disabled={noAuth}>允许补交</Radio>
<Radio style={radioStyle} value={true} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>允许补交</Radio>
<div className={"h21 mb10 ml30 mt20"}>
<span>迟交扣分</span>
@ -1146,7 +1149,7 @@ class CommonWorkSetting extends Component{
<div className={" mb10 ml30"}>
<span>结束时间</span>
<ConditionToolTip condition={moment(init_late_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_late_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
showToday={false}
@ -1175,7 +1178,7 @@ class CommonWorkSetting extends Component{
</div>
<Radio style={radioStyle} value={false} disabled={noAuth}>禁止补交</Radio>
<Radio style={radioStyle} value={false} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>禁止补交</Radio>
</RadioGroup>
@ -1194,7 +1197,7 @@ class CommonWorkSetting extends Component{
<div className={"h20 mb30 ml60"}>
<span>开启时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<ConditionToolTip condition={moment(init_evaluation_start) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_evaluation_start) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
@ -1227,7 +1230,7 @@ class CommonWorkSetting extends Component{
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(init_evaluation_end) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_evaluation_end) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
@ -1324,7 +1327,7 @@ class CommonWorkSetting extends Component{
<span>结束时间</span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(init_appeal_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_appeal_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"

Loading…
Cancel
Save