From 2d0073be98773d1357330a2352abe5b9c8107f14 Mon Sep 17 00:00:00 2001 From: yangwenhua <1289978696@qq.com> Date: Sat, 3 Dec 2022 13:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/card/reservation/index.jsx | 36 +++++++++++++++++++++++++-- src/pages/card/reservation/service.js | 27 ++++++++++++++++++-- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/src/pages/card/reservation/index.jsx b/src/pages/card/reservation/index.jsx index 962e6d1..59e8efa 100644 --- a/src/pages/card/reservation/index.jsx +++ b/src/pages/card/reservation/index.jsx @@ -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 () => {
预定菜品统计
- @@ -262,7 +294,7 @@ export default () => {
预定人员列表
- diff --git a/src/pages/card/reservation/service.js b/src/pages/card/reservation/service.js index f36febb..918ba8c 100644 --- a/src/pages/card/reservation/service.js +++ b/src/pages/card/reservation/service.js @@ -1,7 +1,7 @@ import { request } from 'umi'; export default { - //获取所有门店 + //获取预定人员 GetReservationUser(data) { return request('/kitchen/api/Reservation/GetReservationUser', { method: 'POST', @@ -9,7 +9,7 @@ export default { }); }, - //获取会员分页 + //获取预定商品 GetReservationGoods(data) { return request('/kitchen/api/Reservation/GetReservationGoods', { method: 'POST', @@ -25,5 +25,28 @@ export default { method: 'POST', data }); + }, + + /** + * 获取预定商品Excel + * @param {*} data + * @returns + */ + GetReservationGoodsExcel(data) { + return request('/kitchen/api/Reservation/GetReservationGoodsExcel', { + method: 'POST', + data + }); + }, + + /** + * 获取预定人员Excel + * @param {*} data + */ + GetReservationUserExcel(data) { + return request('/kitchen/api/Reservation/GetReservationUserExcel', { + method: 'POST', + data + }); } }