|
|
@@ -164,6 +164,38 @@ export default () => { |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
const onExportGoodsExcel = async () => { |
|
|
|
const findDepart = department.find(item => item.value === currentDepartment); |
|
|
|
let jsonData = { |
|
|
|
beginTime: timeRange[0]._i, |
|
|
|
endTime: timeRange[1]._i, |
|
|
|
orgName: findDepart?.label || '', |
|
|
|
mealType: dinnerTime || '', |
|
|
|
current: currentPage, |
|
|
|
pageSize |
|
|
|
} |
|
|
|
const response = await API.GetReservationGoodsExcel(jsonData); |
|
|
|
if (response.statusCode === 200) { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const onExportUserExcel = async () => { |
|
|
|
const findDepart = department.find(item => item.value === currentDepartment); |
|
|
|
let jsonData = { |
|
|
|
beginTime: timeRange[0]._i, |
|
|
|
endTime: timeRange[1]._i, |
|
|
|
orgName: findDepart?.label || '', |
|
|
|
mealType: dinnerTime || '', |
|
|
|
current: currentPage, |
|
|
|
pageSize |
|
|
|
} |
|
|
|
const response = await API.GetReservationUserExcel(jsonData); |
|
|
|
if (response.statusCode === 200) { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
onFetchDetartment(); |
|
|
|
}, []); |
|
|
@@ -244,7 +276,7 @@ export default () => { |
|
|
|
<div className={styles['tabs-title']}> |
|
|
|
预定菜品统计 |
|
|
|
</div> |
|
|
|
<Button type="primary" icon={<DownloadOutlined />} size="middle"> |
|
|
|
<Button type="primary" icon={<DownloadOutlined />} size="middle" onClick={onExportGoodsExcel}> |
|
|
|
报表下载 |
|
|
|
</Button> |
|
|
|
</Space> |
|
|
@@ -262,7 +294,7 @@ export default () => { |
|
|
|
<div className={styles['tabs-title']}> |
|
|
|
预定人员列表 |
|
|
|
</div> |
|
|
|
<Button type="primary" icon={<DownloadOutlined />} size="middle"> |
|
|
|
<Button type="primary" icon={<DownloadOutlined />} size="middle" onClick={onExportUserExcel}> |
|
|
|
报表下载 |
|
|
|
</Button> |
|
|
|
</Space> |
|
|
|