From f7fcdb6453ba6b4711499550f6ea4306f469a4d7 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Tue, 18 Mar 2025 16:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=B6=88=E8=B4=B9=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BA=BF=E4=B8=8A=E7=BA=BF=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order/offline.js | 21 + src/api/order/reserve.js | 195 ++++ src/views/order/offlineManagement/index.vue | 156 ++- src/views/order/reserveManagement/index.vue | 1166 +++++++++++++++---- 4 files changed, 1329 insertions(+), 209 deletions(-) create mode 100644 src/api/order/reserve.js diff --git a/src/api/order/offline.js b/src/api/order/offline.js index af599837..ae7fd5c9 100644 --- a/src/api/order/offline.js +++ b/src/api/order/offline.js @@ -152,3 +152,24 @@ export function writeOffOrderApi(data) { }) } + + + + + + + + + +// 订单-同步订单状态 +export function syncOrderPayStateApi(data) { + return request({ + url: '/smart-canteen/api/v2/web/order/sync-pay-state', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + diff --git a/src/api/order/reserve.js b/src/api/order/reserve.js new file mode 100644 index 00000000..495d4c34 --- /dev/null +++ b/src/api/order/reserve.js @@ -0,0 +1,195 @@ +import request from '@/utils/request' + +// 系统区域权限树 +export function systemAreaTreeApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/area/system-auth/tree', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 通过区域Id查询食堂 +export function getCanteenByAreaApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/list-all-auth-canteen', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 通过食堂Id查询档口 +export function getStallByCanteenApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/list-multiple-auth-stall', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 订单类型 +export function orderTypeListApi(data) { + return request({ + url: '/smart-canteen/api/v2/order/enums/type-list', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 配送方式 +export function deliveryTypeListApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/list-delivery-type-enum', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + +// 订单状态 +export function orderStateListApi(data) { + return request({ + url: '/smart-canteen/api/v2/order/enums/state-mix-list', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 订单支付状态 +export function orderPayAllTypeApi(data) { + return request({ + url: '/smart-canteen/api/v2/pay/all/type', + method: 'get', + headers: { + "merchant-id":"378915229716713472", + }, + params: data + }) +} +// 核身方式 +export function orderNuclearModeListApi(data) { + return request({ + url: '/smart-canteen/api/v2/order/enums/nuclear/mode-list', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 用户类型 +export function queryPsnTypeByPageApi(data) { + return request({ + url: '/smart-canteen/api/v1/cust/psntype/queryPsnTypeByPage', + method: 'get', + headers: { + "merchant-id":"378915229716713472", + }, + params: data + }) +} +// 组织 +export function custOrgTreeApi(data) { + return request({ + url: '/smart-canteen/custOrg/tenant/tree', + method: 'get', + headers: { + "merchant-id":"378915229716713472", + }, + params: data + }) +} + +// 订单列表-分页 +export function orderPageListApi(data) { + return request({ + url: '/smart-canteen/api/v2/web/order/page/detail', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 订单详情 +export function orderDetailInfoApi(data) { + return request({ + url: '/smart-canteen/api/v2/web/order/info', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 订单-部分退款 +export function refundOrderPartApi(data) { + return request({ + url: '/smart-canteen/api/v2/web/order/part/refund', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 订单-退单 +export function refundOrderApi(data) { + return request({ + url: '/smart-canteen/api/v2/web/order/refund', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 订单-核销 +export function writeOffOrderApi(data) { + return request({ + url: '/smart-canteen/api/v2/web/order/write/off', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + + + + + + + + +// 订单-同步订单状态 +export function syncOrderPayStateApi(data) { + return request({ + url: '/smart-canteen/api/v2/web/order/sync-pay-state', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + diff --git a/src/views/order/offlineManagement/index.vue b/src/views/order/offlineManagement/index.vue index 384f75e3..aae9e678 100644 --- a/src/views/order/offlineManagement/index.vue +++ b/src/views/order/offlineManagement/index.vue @@ -143,19 +143,32 @@ - + type="primary" + size="mini" :disabled="multiple" + @click="handleSyncPayState" + >同步订单状态 + - + + - \ No newline at end of file + }) + this.$modal.msgSuccess("同步已完成"); + this.getList() + this.$refs.multipleTable.clearSelection() + }else{ + this.$modal.msgError("请先勾选订单数据!"); + } + }, + + + + + + //日期 + formatDate(date) { + // 格式化为 YYYY-MM-DD + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始 + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + } + } +}; + +