|
@@ -144,7 +144,7 @@ class AccountDetails extends React.Component {
|
|
|
|
|
|
componentWillMount() {
|
|
componentWillMount() {
|
|
let str = formatDate(new Date())
|
|
let str = formatDate(new Date())
|
|
-
|
|
|
|
|
|
+ console.log(str)
|
|
this.props.history.listen(router => {
|
|
this.props.history.listen(router => {
|
|
console.log('router:', router)
|
|
console.log('router:', router)
|
|
if(router.pathname == '/ymall/accountDetails' && !!router.query.id) {
|
|
if(router.pathname == '/ymall/accountDetails' && !!router.query.id) {
|
|
@@ -190,7 +190,7 @@ class AccountDetails extends React.Component {
|
|
|
|
|
|
formatSearch() {
|
|
formatSearch() {
|
|
let filters = [
|
|
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:"endDate", operate: "equal",value: this.state.endTime },
|
|
{ field:"beginSynOrderTime", operate: "equal",value: this.state.orderStartTime },
|
|
{ field:"beginSynOrderTime", operate: "equal",value: this.state.orderStartTime },
|
|
{ field:"endSynOrderTime", operate: "equal",value: this.state.orderEndTime },
|
|
{ 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 },
|
|
{ field:"status", operate: "equal",value: this.state.searchStatusValue },
|
|
]
|
|
]
|
|
console.log(filters)
|
|
console.log(filters)
|
|
|
|
+
|
|
this.setState({
|
|
this.setState({
|
|
filters
|
|
filters
|
|
}, () => { this.loadDataList() })
|
|
}, () => { this.loadDataList() })
|
|
@@ -452,9 +453,9 @@ class AccountDetails extends React.Component {
|
|
<Col span={10}>
|
|
<Col span={10}>
|
|
收益开始时间:
|
|
收益开始时间:
|
|
<DatePicker
|
|
<DatePicker
|
|
- allowClear={false}
|
|
|
|
|
|
+ // allowClear={false}
|
|
showNow={true}
|
|
showNow={true}
|
|
- value={moment(this.state.startTime)}
|
|
|
|
|
|
+ value={!this.state.startTime ? null : moment(this.state.startTime)}
|
|
defaultValue={ moment(this.state.startTime, 'YYYY-MM-DD')}
|
|
defaultValue={ moment(this.state.startTime, 'YYYY-MM-DD')}
|
|
// format={['YYYY-MM-DD hh:mm']}
|
|
// format={['YYYY-MM-DD hh:mm']}
|
|
onChange={(date, dateStr) => {
|
|
onChange={(date, dateStr) => {
|
|
@@ -464,7 +465,7 @@ class AccountDetails extends React.Component {
|
|
}
|
|
}
|
|
this.setState({
|
|
this.setState({
|
|
startTimeStamp: moment(dateStr).valueOf(),
|
|
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}>
|
|
<Col span={10}>
|
|
收益结束时间:
|
|
收益结束时间:
|
|
<DatePicker
|
|
<DatePicker
|
|
- allowClear={false}
|
|
|
|
|
|
+ // allowClear={false}
|
|
showNow={true}
|
|
showNow={true}
|
|
- value={moment(this.state.endTime)}
|
|
|
|
|
|
+ value={!this.state.endTime ? null : moment(this.state.endTime)}
|
|
defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
|
|
defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
|
|
// format={['YYYY-MM-DD hh:mm']}
|
|
// format={['YYYY-MM-DD hh:mm']}
|
|
onChange={(date, dateStr) => {
|
|
onChange={(date, dateStr) => {
|
|
@@ -485,7 +486,7 @@ class AccountDetails extends React.Component {
|
|
}
|
|
}
|
|
this.setState({
|
|
this.setState({
|
|
endtTimeStamp: moment(dateStr).valueOf(),
|
|
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}>
|
|
<Col span={10}>
|
|
下单开始时间:
|
|
下单开始时间:
|
|
<DatePicker
|
|
<DatePicker
|
|
- allowClear={false}
|
|
|
|
showNow={true}
|
|
showNow={true}
|
|
- value={moment(this.state.orderStartTime)}
|
|
|
|
|
|
+ value={!this.state.orderStartTime ? null : moment(this.state.orderStartTime)}
|
|
defaultValue={ moment(this.state.orderStartTime, 'YYYY-MM-DD')}
|
|
defaultValue={ moment(this.state.orderStartTime, 'YYYY-MM-DD')}
|
|
onChange={(date, dateStr) => {
|
|
onChange={(date, dateStr) => {
|
|
if(moment(dateStr).valueOf() > this.state.orderEndtTimeStamp) {
|
|
if(moment(dateStr).valueOf() > this.state.orderEndtTimeStamp) {
|
|
@@ -508,7 +508,7 @@ class AccountDetails extends React.Component {
|
|
}
|
|
}
|
|
this.setState({
|
|
this.setState({
|
|
orderStartTimeStamp: moment(dateStr).valueOf(),
|
|
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}>
|
|
<Col span={10}>
|
|
下单结束时间:
|
|
下单结束时间:
|
|
<DatePicker
|
|
<DatePicker
|
|
- allowClear={false}
|
|
|
|
showNow={true}
|
|
showNow={true}
|
|
- value={moment(this.state.orderEndTime)}
|
|
|
|
|
|
+ value={!this.state.orderEndTime ? null : moment(this.state.orderEndTime)}
|
|
defaultValue={moment(this.state.orderEndTime, 'YYYY-MM-DD')}
|
|
defaultValue={moment(this.state.orderEndTime, 'YYYY-MM-DD')}
|
|
onChange={(date, dateStr) => {
|
|
onChange={(date, dateStr) => {
|
|
if(moment(dateStr).valueOf() < this.state.orderStartTimeStamp) {
|
|
if(moment(dateStr).valueOf() < this.state.orderStartTimeStamp) {
|
|
@@ -528,7 +527,7 @@ class AccountDetails extends React.Component {
|
|
}
|
|
}
|
|
this.setState({
|
|
this.setState({
|
|
orderEndtTimeStamp: moment(dateStr).valueOf(),
|
|
orderEndtTimeStamp: moment(dateStr).valueOf(),
|
|
- orderEndTime: dateStr + ' 00:00'
|
|
|
|
|
|
+ orderEndTime: !date ? null : dateStr + ' 00:00'
|
|
})
|
|
})
|
|
}}
|
|
}}
|
|
>
|
|
>
|