|
@@ -164,6 +164,14 @@ class PublicContent extends Component{
|
|
|
Taro.showToast({
|
|
|
title:'修改成功',
|
|
|
})
|
|
|
+ Taro.eventCenter.trigger('listOperation',{
|
|
|
+ type:this.props.type,
|
|
|
+ index:this.props.index,
|
|
|
+ status: 1,
|
|
|
+ userName: this.props.locationInfor.name,
|
|
|
+ releaseStarts:this.state.rangeStartMinuteVal,
|
|
|
+ releaseEnds:this.state.rangeEndMinuteVal,
|
|
|
+ })
|
|
|
this.props.onClose();
|
|
|
}else{
|
|
|
Taro.showToast({
|
|
@@ -218,6 +226,13 @@ class PublicContent extends Component{
|
|
|
<DateTimePicker ref={ref=>this.rangeStartRef = ref} onOk={(current)=>{
|
|
|
let arr = [];
|
|
|
if(this.state.rangeEndVal){
|
|
|
+ if(dayjs(current.current).isAfter(dayjs(this.state.rangeEndVal.split('-')))){
|
|
|
+ Taro.showToast({title:'开始时间不能在结束时间之后',icon:'none'})
|
|
|
+ this.rangeStartRef.clear();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.state.rangeEndVal){
|
|
|
let str = dayjs(current.current).format('YYYY-MM-DD');
|
|
|
arr.push({value:str});
|
|
|
let a = dayjs(this.state.rangeEndVal.split('-'));
|
|
@@ -257,6 +272,13 @@ class PublicContent extends Component{
|
|
|
<DateTimePicker ref={ref=>this.rangeEndRef = ref} onOk={(current)=>{
|
|
|
let arr = [];
|
|
|
if(this.state.rangeStartVal){
|
|
|
+ if(dayjs(current.current).isBefore(dayjs(this.state.rangeStartVal.split('-')))){
|
|
|
+ Taro.showToast({title:'结束时间不能在开始时间之前',icon:'none'})
|
|
|
+ this.rangeEndRef.clear();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.state.rangeStartVal){
|
|
|
let str = dayjs(current.current).format('YYYY-MM-DD');
|
|
|
arr.push({value:this.state.rangeStartVal});
|
|
|
let a = dayjs(this.state.rangeStartVal.split('-'));
|