Browse Source

导出

dev
txb 1 year ago
parent
commit
2a4e871947
1 changed files with 35 additions and 14 deletions
  1. +35
    -14
      src/pages/card/reservation/index.jsx

+ 35
- 14
src/pages/card/reservation/index.jsx View File

@@ -45,16 +45,27 @@ const ReservationUserColums = [
},
{
title: '预定部门',
dataIndex: 'qty',
dataIndex: 'orgName',
sortDirections: ['ascend', 'descend'],
sorter: (a, b) => a.value - b.value
},
{
title: '操作',
dataIndex: 'qty',
sortDirections: ['ascend', 'descend'],
sorter: (a, b) => a.value - b.value
}
title: '操作',
dataIndex: 'option',
valueType: 'option',
render: (_, record) => (
<>
<a
// onClick={() => {
// handleModalVisible(true);
// setStepFormValues(record);
// }}
>
查看详情
</a>
</>
),
}
]


@@ -174,10 +185,15 @@ export default () => {
current: currentPage,
pageSize
}
const response = await API.GetReservationGoodsExcel(jsonData);
if (response.statusCode === 200) {

}
API.GetReservationGoodsExcel(jsonData).then((res) => {
let url = URL.createObjectURL(new Blob([res]));
let filename = '预定商品信息.xlsx';
let a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
});
}

const onExportUserExcel = async () => {
@@ -190,10 +206,15 @@ export default () => {
current: currentPage,
pageSize
}
const response = await API.GetReservationUserExcel(jsonData);
if (response.statusCode === 200) {
}
API.GetReservationUserExcel(jsonData).then((res) => {
let url = URL.createObjectURL(new Blob([res]));
let filename = '获取预定人员信息.xlsx';
let a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
});
}

useEffect(() => {


Loading…
Cancel
Save