|
@@ -164,7 +164,7 @@ class AccountDetails extends React.Component {
|
|
|
|
|
|
componentWillMount() {
|
|
|
let str = formatDate(new Date())
|
|
|
-
|
|
|
+ console.log(str)
|
|
|
this.props.history.listen(router => {
|
|
|
console.log('router:', router)
|
|
|
if(router.pathname == '/ymall/accountDetails' && !!router.query.id) {
|
|
@@ -210,7 +210,7 @@ class AccountDetails extends React.Component {
|
|
|
|
|
|
formatSearch() {
|
|
|
let filters = [
|
|
|
- { field:"beginDate", operate: "equal",value: this.state.startTime }, //beginSynOrderTime
|
|
|
+ { field:"beginDate", operate: "equal",value: this.state.startTime },
|
|
|
{ field:"endDate", operate: "equal",value: this.state.endTime },
|
|
|
{ field:"beginSynOrderTime", operate: "equal",value: this.state.orderStartTime },
|
|
|
{ field:"endSynOrderTime", operate: "equal",value: this.state.orderEndTime },
|
|
@@ -218,6 +218,7 @@ class AccountDetails extends React.Component {
|
|
|
{ field:"status", operate: "equal",value: this.state.searchStatusValue },
|
|
|
]
|
|
|
console.log(filters)
|
|
|
+
|
|
|
this.setState({
|
|
|
filters
|
|
|
}, () => { this.loadDataList() })
|
|
@@ -487,9 +488,9 @@ class AccountDetails extends React.Component {
|
|
|
<Col span={10}>
|
|
|
收益开始时间:
|
|
|
<DatePicker
|
|
|
- allowClear={false}
|
|
|
+ // allowClear={false}
|
|
|
showNow={true}
|
|
|
- value={moment(this.state.startTime)}
|
|
|
+ value={!this.state.startTime ? null : moment(this.state.startTime)}
|
|
|
defaultValue={ moment(this.state.startTime, 'YYYY-MM-DD')}
|
|
|
// format={['YYYY-MM-DD hh:mm']}
|
|
|
onChange={(date, dateStr) => {
|
|
@@ -499,7 +500,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
startTimeStamp: moment(dateStr).valueOf(),
|
|
|
- startTime: dateStr + ' 00:00'
|
|
|
+ startTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
@@ -508,9 +509,9 @@ class AccountDetails extends React.Component {
|
|
|
<Col span={10}>
|
|
|
收益结束时间:
|
|
|
<DatePicker
|
|
|
- allowClear={false}
|
|
|
+ // allowClear={false}
|
|
|
showNow={true}
|
|
|
- value={moment(this.state.endTime)}
|
|
|
+ value={!this.state.endTime ? null : moment(this.state.endTime)}
|
|
|
defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
|
|
|
// format={['YYYY-MM-DD hh:mm']}
|
|
|
onChange={(date, dateStr) => {
|
|
@@ -520,7 +521,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
endtTimeStamp: moment(dateStr).valueOf(),
|
|
|
- endTime: dateStr + ' 00:00'
|
|
|
+ endTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
@@ -532,9 +533,8 @@ class AccountDetails extends React.Component {
|
|
|
<Col span={10}>
|
|
|
下单开始时间:
|
|
|
<DatePicker
|
|
|
- allowClear={false}
|
|
|
showNow={true}
|
|
|
- value={moment(this.state.orderStartTime)}
|
|
|
+ value={!this.state.orderStartTime ? null : moment(this.state.orderStartTime)}
|
|
|
defaultValue={ moment(this.state.orderStartTime, 'YYYY-MM-DD')}
|
|
|
onChange={(date, dateStr) => {
|
|
|
if(moment(dateStr).valueOf() > this.state.orderEndtTimeStamp) {
|
|
@@ -543,7 +543,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
orderStartTimeStamp: moment(dateStr).valueOf(),
|
|
|
- orderStartTime: dateStr + ' 00:00'
|
|
|
+ orderStartTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
@@ -552,9 +552,8 @@ class AccountDetails extends React.Component {
|
|
|
<Col span={10}>
|
|
|
下单结束时间:
|
|
|
<DatePicker
|
|
|
- allowClear={false}
|
|
|
showNow={true}
|
|
|
- value={moment(this.state.orderEndTime)}
|
|
|
+ value={!this.state.orderEndTime ? null : moment(this.state.orderEndTime)}
|
|
|
defaultValue={moment(this.state.orderEndTime, 'YYYY-MM-DD')}
|
|
|
onChange={(date, dateStr) => {
|
|
|
if(moment(dateStr).valueOf() < this.state.orderStartTimeStamp) {
|
|
@@ -563,7 +562,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
orderEndtTimeStamp: moment(dateStr).valueOf(),
|
|
|
- orderEndTime: dateStr + ' 00:00'
|
|
|
+ orderEndTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|