|
@@ -144,7 +144,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) {
|
|
@@ -190,7 +190,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 },
|
|
@@ -198,6 +198,7 @@ class AccountDetails extends React.Component {
|
|
|
{ field:"status", operate: "equal",value: this.state.searchStatusValue },
|
|
|
]
|
|
|
console.log(filters)
|
|
|
+
|
|
|
this.setState({
|
|
|
filters
|
|
|
}, () => { this.loadDataList() })
|
|
@@ -452,9 +453,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) => {
|
|
@@ -464,7 +465,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
startTimeStamp: moment(dateStr).valueOf(),
|
|
|
- startTime: dateStr + ' 00:00'
|
|
|
+ startTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
@@ -473,9 +474,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) => {
|
|
@@ -485,7 +486,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
endtTimeStamp: moment(dateStr).valueOf(),
|
|
|
- endTime: dateStr + ' 00:00'
|
|
|
+ endTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
@@ -497,9 +498,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) {
|
|
@@ -508,7 +508,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
orderStartTimeStamp: moment(dateStr).valueOf(),
|
|
|
- orderStartTime: dateStr + ' 00:00'
|
|
|
+ orderStartTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
@@ -517,9 +517,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) {
|
|
@@ -528,7 +527,7 @@ class AccountDetails extends React.Component {
|
|
|
}
|
|
|
this.setState({
|
|
|
orderEndtTimeStamp: moment(dateStr).valueOf(),
|
|
|
- orderEndTime: dateStr + ' 00:00'
|
|
|
+ orderEndTime: !date ? null : dateStr + ' 00:00'
|
|
|
})
|
|
|
}}
|
|
|
>
|