|
@@ -135,7 +135,30 @@ function header(props) {
|
135
|
135
|
props.form.resetFields();
|
136
|
136
|
getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket' })
|
137
|
137
|
}
|
138
|
|
-
|
|
138
|
+ // 导出
|
|
139
|
+ const exportList = () => {
|
|
140
|
+ let { LocalDate, ...submitValue } = props.form.getFieldsValue()
|
|
141
|
+ if (null != LocalDate && LocalDate.length > 0) {
|
|
142
|
+ const [startDate, endDate] = LocalDate
|
|
143
|
+ submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
|
|
144
|
+ submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
|
|
145
|
+ } else {
|
|
146
|
+ submitValue.startDate = null
|
|
147
|
+ submitValue.endDate = null
|
|
148
|
+ }
|
|
149
|
+ request({ ...apis.fund.orderExport, params: { orderType: 'redPacket', orgId, ...submitValue } }).then(data => {
|
|
150
|
+ if (!data) {
|
|
151
|
+ return
|
|
152
|
+ }
|
|
153
|
+ const url = window.URL.createObjectURL(new Blob([data]))
|
|
154
|
+ const link = document.createElement('a')
|
|
155
|
+ link.style.display = 'none'
|
|
156
|
+ link.href = url
|
|
157
|
+ link.setAttribute('download', '消费订单表.xlsx')
|
|
158
|
+ document.body.append(link)
|
|
159
|
+ link.click()
|
|
160
|
+ }).catch()
|
|
161
|
+ }
|
139
|
162
|
const { getFieldDecorator } = props.form
|
140
|
163
|
return (
|
141
|
164
|
|
|
@@ -146,7 +169,7 @@ function header(props) {
|
146
|
169
|
onCancel={() => setVisible(false)}
|
147
|
170
|
footer={null}
|
148
|
171
|
>
|
149
|
|
- <div style={{ paddingLeft:'36%'}}>
|
|
172
|
+ <div style={{ paddingLeft: '36%' }}>
|
150
|
173
|
<p>昵称:{personInfo.nickname || ''}</p>
|
151
|
174
|
<p>头像:<img src={personInfo.avatarurl || ''} className={styles.touxiang} /></p>
|
152
|
175
|
<p>姓名:{personInfo.name || ''}</p>
|
|
@@ -211,6 +234,9 @@ function header(props) {
|
211
|
234
|
</Button>
|
212
|
235
|
</Form.Item>
|
213
|
236
|
</Form>
|
|
237
|
+ <div>
|
|
238
|
+ <Button type="danger" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => exportList()} >导出</Button>
|
|
239
|
+ </div>
|
214
|
240
|
<Table rowKey={r => r.tradeNo} dataSource={data.records} columns={columns} pagination={false} />
|
215
|
241
|
<div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
|
216
|
242
|
<Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
|