From bdba2223a5d851438ad92dfa30a36c3d6ffe7865 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 16 Jan 2025 18:18:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/order/index.js | 10 +++--- pages/work/index.vue | 76 +++++++++++++++++--------------------------- 2 files changed, 35 insertions(+), 51 deletions(-) diff --git a/api/order/index.js b/api/order/index.js index 78d55ed..95fc8d9 100644 --- a/api/order/index.js +++ b/api/order/index.js @@ -1,12 +1,12 @@ import request from '@/utils/request' /** - * @data 获取 + * @data 获取订单列表 */ -export function getWeekCookbookAPI(data) { +export function getOrderInfoListAPI(data) { return request({ - url: '/smart-canteen/week/recipe/detail', - method: 'post', - data + url: '/smart-canteen/order_info/list', + method: 'get', + params: data }) } diff --git a/pages/work/index.vue b/pages/work/index.vue index 8767c17..25fe213 100644 --- a/pages/work/index.vue +++ b/pages/work/index.vue @@ -18,14 +18,14 @@ - -
+ +
-
-
+
+
订单来源:{{ item.sourceType }}
@@ -69,14 +69,8 @@
- - + @@ -109,19 +103,9 @@ 订单类型 - - - + + + {{ item }} @@ -134,11 +118,11 @@ text="清空" shape="circle" :customStyle="{ - border: '2rpx solid #DDDDDD', - color: '#666666', - background: '#ffffff', - marginRight: '24px' - }" + border: '2rpx solid #DDDDDD', + color: '#666666', + background: '#ffffff', + marginRight: '24px' + }" @click="clearAll" > @@ -175,6 +159,7 @@ import { getOrderList } from '@/api/dining-hall' import Tabs from '@/pages/components/Tabs.vue' import { getDate } from '../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/util' +import { getOrderInfoListAPI } from '../../api/order/index' export default { components: { Tabs }, @@ -241,7 +226,7 @@ export default { ], localShow: this.show, monthNum: 12, - minData:getDate(new Date()), + minData: getDate(new Date()), dateOptions: [ { label: '近1个月', value: 1 }, { label: '近3个月', value: 3 }, @@ -252,23 +237,13 @@ export default { endDate: '', showStartCalendar: false, showEndCalendar: false, - orderTypes: [ - '当餐点餐', - '预订餐', - '报餐', - '自助餐', - '商城', - '设备', - '收款码', - '美团-到店', - '美团-外卖' - ], + orderTypes: ['当餐点餐', '预订餐', '报餐', '自助餐', '商城', '设备', '收款码', '美团-到店', '美团-外卖'], selectedOrderTypes: [] } }, watch: { show(newVal) { - this.localShow = newVal; // 监听 prop 变化并更新本地数据属性 + this.localShow = newVal // 监听 prop 变化并更新本地数据属性 } }, methods: { @@ -335,11 +310,11 @@ export default { }, openPopup() { - this.localShow = true; + this.localShow = true }, closePopup() { - this.localShow = false; + this.localShow = false }, selectDateOption(index) { this.currentDateOption = index @@ -404,7 +379,16 @@ export default { uni.navigateTo({ url: `/pages/work/details?params=${JSON.stringify(item)}` }) + }, + + // 获取订单 + async getOrderInfoListData() { + const res = await getOrderInfoListAPI() + console.log(res, '获取订单信息') } + }, + created() { + this.getOrderInfoListData() } }