Skip to content

Commit

Permalink
排序
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Sep 22, 2017
1 parent a97f4ea commit 39e8efb
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/modules/PROPERTY/containers/WaterCharge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ class ChargeWaterBill extends React.Component {
filters['page'] = pagination.current
filters['rows'] = pagination.pageSize
}
filters['sort'] = 'a.id'
filters['order'] = 'desc'
if (sorter !== null && typeof (sorter) !== 'undefined' && typeof (sorter.order) !== 'undefined') {
console.log(sorter)
filters['sort'] = sorter.columnKey
filters['order'] = sorter.order.substring(0, sorter.order.length - 3)
} else {
filters['sort'] = 'a.id'
filters['order'] = 'desc'
}
let result = await apiPost(
'/WaterBill/WaterBillList',
filters
Expand Down Expand Up @@ -335,6 +341,15 @@ class ChargeWaterBill extends React.Component {
<span>{index}</span>
)
}
}, {
title: '审核时间',
sorter: true,
dataIndex: 'audit_date',
render: function (text, record, index) {
return (
record.auditDate
)
}
}, {
title: '所属楼宇',
dataIndex: 'buildName'
Expand Down Expand Up @@ -521,7 +536,7 @@ class ChargeWaterBill extends React.Component {
pageSizeOptions: ['15', '30', '45'],
defaultPageSize: 15}}
// onChange={this.refresh}
scroll={{ x: 1450 }}
scroll={{ x: 1650 }}
bordered
dataSource={this.state.dataSource4}
columns={this.state.columns4}
Expand Down

0 comments on commit 39e8efb

Please sign in to comment.