diff --git a/http/yskApi/order.js b/http/yskApi/order.js new file mode 100644 index 0000000..c31569c --- /dev/null +++ b/http/yskApi/order.js @@ -0,0 +1,93 @@ +import http from './http.js' +const request=http.request + +/** + * 查询订单 + * @param {*} data + * @returns + */ +export function tbOrderInfoData(data) { + return request({ + url: "/api/tbOrderInfo/date", + method: "post", + data: { + shopId: uni.getStorageSync('shopId'), + ...data + } + }); +} + +/** + * 导出数据 + * @param {*} data + * @returns + */ +export function tbOrderInfoDownload(data) { + return request({ + url: "/api/tbOrderInfo/download", + method: "post", + data: { + shopId: uni.getStorageSync('shopId'), + ...data + }, + responseType: "blob" + }); +} + +/** + * 通过Id查询订单 + * @param {*} id + * @returns + */ +export function tbOrderInfoDetail(id) { + return request({ + url: `/api/tbOrderInfo/${id}`, + method: "get" + }); +} + +/** + * 通过Id查询订单 + * @param {*} createdAt + * @returns + */ +export function payCount(createdAt) { + console.log(createdAt); + return request({ + url: `/api/tbOrderInfo/payCount`, + method: "post", + data: { + shopId: uni.getStorageSync('shopId'), + createdAt: createdAt + } + }); +} + +/** + * 订单列表 + * @param {*} createdAt + * @returns + */ +export function tbGroupOrderInfo(params) { + return request({ + url: `/api/tbGroupOrderInfo`, + method: "post", + data: { + shopId: uni.getStorageSync('shopId'), + ...params + } + }); +} + +/** + * 退单 + * @param {*} data + * @returns + */ +export function returnGpOrder(data) { + return request({ + url: `/api/tbGroupOrderInfo/returnGpOrder`, + method: "post", + data + }); +} diff --git a/http/yskApi/table.js b/http/yskApi/table.js index 383baf4..f055135 100644 --- a/http/yskApi/table.js +++ b/http/yskApi/table.js @@ -10,4 +10,5 @@ import infoBox from '@/commons/utils/infoBox.js' /* 台桌区域 */ export const $tableArea=new $API('/api/tbShopArea',http.req) /* 台桌 */ -export const $table=new $API('/api/tbShopTable',http.req) \ No newline at end of file +export const $table=new $API('/api/tbShopTable',http.req) +