diff --git a/config/proxy.js b/config/proxy.js
index ebf3438..7674626 100644
--- a/config/proxy.js
+++ b/config/proxy.js
@@ -16,6 +16,14 @@
'/saasbase/': '',
},
},
+ '/storemanagement/': {
+ target: 'http://192.168.1.50:5248/',
+ changeOrigin: true,
+ secure: false, //关闭证书验证
+ pathRewrite: {
+ '/storemanagement/': '',
+ },
+ },
'/ordermanage/': {
target: 'http://localhost:5248',
changeOrigin: true,
diff --git a/config/routes.js b/config/routes.js
index 477f327..b992db8 100644
--- a/config/routes.js
+++ b/config/routes.js
@@ -294,17 +294,30 @@ export default [
],
},
{
- name: '订单管理',
- icon: 'BankFilled',
- path: '/order',
- routes: [
- {
- name: '订单流水',
- icon: 'smile',
- path: '/order/orderflow',
- component: './order/orderflow',
- },]
- },
+ name: '订单管理',
+ icon: 'BankFilled',
+ path: '/order',
+ routes: [
+ {
+ name: '订单流水',
+ icon: 'smile',
+ path: '/order/orderflow',
+ component: './order/orderflow',
+ },
+ {
+ name: '第三方订单',
+ icon: 'smile',
+ path: '/order/thirdOrder',
+ component: './order/thirdOrder',
+ },
+ {
+ name: '授权管理',
+ icon: 'smile',
+ path: '/order/thirdAuthorize',
+ component: './order/thirdAuthorize',
+ },
+ ],
+ },
{
path: '/',
redirect: '/welcome',
diff --git a/src/.umi-production/.cache/webpack/default-production/0.pack b/src/.umi-production/.cache/webpack/default-production/0.pack
deleted file mode 100644
index e708d1e..0000000
Binary files a/src/.umi-production/.cache/webpack/default-production/0.pack and /dev/null differ
diff --git a/src/.umi-production/.cache/webpack/default-production/index.pack b/src/.umi-production/.cache/webpack/default-production/index.pack
deleted file mode 100644
index c49e587..0000000
Binary files a/src/.umi-production/.cache/webpack/default-production/index.pack and /dev/null differ
diff --git a/src/app.jsx b/src/app.jsx
index 5051afc..f577839 100644
--- a/src/app.jsx
+++ b/src/app.jsx
@@ -343,17 +343,30 @@ export async function getInitialState() {
],
},
{
- name: '订单管理',
- icon: 'BankFilled',
- path: '/order',
- routes: [
- {
+ name: '订单管理',
+ icon: 'BankFilled',
+ path: '/order',
+ routes: [
+ {
name: '订单流水',
icon: 'smile',
path: '/order/orderflow',
component: './order/orderflow',
- },]
- },
+ },
+ {
+ name: '第三方订单',
+ icon: 'smile',
+ path: '/order/thirdOrder',
+ component: './order/thirdOrder',
+ },
+ {
+ name: '授权管理',
+ icon: 'smile',
+ path: '/order/thirdAuthorize',
+ component: './order/thirdAuthorize',
+ },
+ ],
+ },
];
// api.queryMenus();
return data;
diff --git a/src/pages/order/orderflow/index.jsx b/src/pages/order/orderflow/index.jsx
index c6e95a7..7be80f7 100644
--- a/src/pages/order/orderflow/index.jsx
+++ b/src/pages/order/orderflow/index.jsx
@@ -199,22 +199,22 @@ const Manage = () => {
>
查看详情
,
- {
- api.printsmallticket({ "orderId": record.id })
- .then(re => {
- if (re.data) {
- message.success('打印成功');
- } else {
- message.error('打印失败');
- }
+ // {
+ // api.printsmallticket({ "orderId": record.id })
+ // .then(re => {
+ // if (re.data) {
+ // message.success('打印成功');
+ // } else {
+ // message.error('打印失败');
+ // }
- })
+ // })
- }} >
- 打印小票
- ,
+ // }} >
+ // 打印小票
+ // ,
],
},
];
@@ -249,7 +249,10 @@ const Manage = () => {
}
return (
-
+
{
labelWidth: 120,
}}
toolBarRender={() => [
- ,
+ // ,
]}
columns={columns}
//数据绑定
diff --git a/src/pages/order/orderflow/service.js b/src/pages/order/orderflow/service.js
index b2da263..9c4e989 100644
--- a/src/pages/order/orderflow/service.js
+++ b/src/pages/order/orderflow/service.js
@@ -13,7 +13,30 @@ export default {
// params: { ...params },
// ...(options || {}),
});
- },5
+ },
+
+ /**
+ * 查询店铺信息(设备信息)
+ */
+ srdList(data) {
+ return request('/groupmeal/api/shop/alllist', {
+ method: 'GET'
+ });
+},
+
+GetFlowExport(data) {
+ return request(`/ordermanage/api/Order/GetFlowExport`, {
+ method: 'Post',
+ data: data
+
+ // params: { ...params },
+ // ...(options || {}),
+ });
+},
+
+
+
+
@@ -37,17 +60,7 @@ export default {
// ...(options || {}),
});
},
- /**
- * 查询店铺信息(设备信息)
- */
- srdList(data) {
- return request(`/kitchen/api/store/list`, {
- method: 'Post',
- data: data,
- // params: { ...params },
- // ...(options || {}),
- });
- },
+
/**
* 查询商品信息
@@ -87,15 +100,7 @@ export default {
// ...(options || {}),
});
},
- GetFlowExport(data) {
- return request(`/kitchen/api/Order/GetFlowExport`, {
- method: 'Post',
- data: data
-
- // params: { ...params },
- // ...(options || {}),
- });
- },
+
// 打印小票
printsmallticket(data) {
diff --git a/src/pages/order/thirdAuthorize/index.jsx b/src/pages/order/thirdAuthorize/index.jsx
new file mode 100644
index 0000000..2cb8728
--- /dev/null
+++ b/src/pages/order/thirdAuthorize/index.jsx
@@ -0,0 +1,209 @@
+import { DropboxOutlined, PlusOutlined, DownloadOutlined } from '@ant-design/icons';
+import { Button, message, Modal, Input, Form, Select, Popconfirm } from 'antd';
+import React, { useState, useRef, useEffect } from 'react';
+import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
+import ProTable from '@ant-design/pro-table';
+import ProDescriptions from '@ant-design/pro-descriptions';
+import api from './service';
+
+const Manage = () => {
+ const [row, setRow] = useState();
+ //获取店铺(店铺信息)
+ const [shopList, setShopList] = useState([]);
+ //绑定
+ const actionRef = useRef();
+
+ const [isModalOpen, setIsModalOpen] = useState(false);
+ const [form] = Form.useForm();
+
+
+ // 获取店铺分类、商品名称信息
+ useEffect(() => {
+ getShopList();
+ }, []);
+ const getShopList = async () => {
+ const response = await api.GetAllStore();
+ if (response.statusCode == 200) {
+ setShopList(response.data);
+ } else {
+ message.error(response.msg || '获取店铺列表失败');
+ }
+
+ }
+
+ const columns = [
+ {
+ title: '主键',
+ dataIndex: 'id',
+ tip: '规则名称是唯一的 key',
+ hideInSearch: true,
+ hideInTable: true,
+ },
+ {
+ title: '归属场景',
+ dataIndex: 'storeId',
+ ellipsis: true,
+ render: (_, record) => {
+ const find = shopList.find(item => item.id === record.storeId);
+ if (find) {
+ return {find.name}
+ }
+ }
+ },
+ {
+ title: '授权码',
+ dataIndex: 'authorizeCode',
+ hideInSearch: true,
+ },
+ {
+ title: '操作',
+ dataIndex: 'option',
+ valueType: 'option',
+ width: 200,
+ render: (_, record) => [
+ {
+ api.Update({ id: record.id }).then((re) => {
+ if (re.data) {
+ message.success('修改成功');
+ setIsModalOpen(false);
+ actionRef.current.reload();
+ } else {
+ message.error('修改失败');
+ }
+ });
+ }}
+ okText="确定"
+ cancelText="取消" >
+ {
+
+ }} >
+ 重新授权
+
+ ,
+ {
+ api.Del(record.id).then((re) => {
+ if (re.data) {
+ message.success('删除成功');
+ setIsModalOpen(false);
+ actionRef.current.reload();
+ } else {
+ message.error('删除成功');
+ }
+ });
+ }}
+ okText="确定"
+ cancelText="取消" >
+ {
+
+ }} >
+ 删除
+
+
+
+ ],
+ },
+ ];
+
+
+
+ return (
+
+ [
+ ,
+ ]}
+ columns={columns}
+ //数据绑定
+ request={async (params, sorter, filter) => {
+ const msg = await api.page(params);
+ return {
+ data: msg.data.data,
+ success: true,
+ total: msg.data.total,
+ };
+ }}
+ >
+
+ <>
+ { form.submit() }} onCancel={() => {
+ setIsModalOpen(false);
+ }}>
+
+
+
+
+
+
+
+
+
+ >
+
+ );
+};
+
+export default Manage;
diff --git a/src/pages/order/thirdAuthorize/service.js b/src/pages/order/thirdAuthorize/service.js
new file mode 100644
index 0000000..9b26fb4
--- /dev/null
+++ b/src/pages/order/thirdAuthorize/service.js
@@ -0,0 +1,42 @@
+// @ts-ignore
+
+/* eslint-disable */
+import { request } from 'umi';
+
+export default {
+
+ page(data) {
+ data.isreport = true;
+ return request(`/ordermanage/api/ThirdAuthorize/Page`, {
+ method: 'Post',
+ data: data,
+ });
+ },
+ GetAllStore() {
+ return request('/groupmeal/api/shop/alllist', {
+ method: 'GET'
+ });
+ },
+ Create(data) {
+ return request('/ordermanage/api/ThirdAuthorize/Create', {
+ method: 'Post',
+ data: data,
+ });
+ },
+ Update(data) {
+ return request('/ordermanage/api/ThirdAuthorize/Update', {
+ method: 'Post',
+ data: data,
+ });
+ },
+ Del(data) {
+ return request('/ordermanage/api/ThirdAuthorize/Del?id='+data, {
+ method: 'Post',
+ });
+ },
+
+
+
+};
+
+
diff --git a/src/pages/order/thirdOrder/index.jsx b/src/pages/order/thirdOrder/index.jsx
new file mode 100644
index 0000000..90582ad
--- /dev/null
+++ b/src/pages/order/thirdOrder/index.jsx
@@ -0,0 +1,124 @@
+import { DropboxOutlined, PlusOutlined, DownloadOutlined } from '@ant-design/icons';
+import { message, Modal, Input, Form, Space, Table, Tag } from 'antd';
+import React, { useState, useRef, useEffect } from 'react';
+import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
+import ProTable from '@ant-design/pro-table';
+import ProDescriptions from '@ant-design/pro-descriptions';
+import api from './service';
+const handlerefund = async (value) => {
+ var data = { number: value };
+ const hide = message.loading('正在发起退款');
+ try {
+ api.StartRefund(data);
+ hide();
+ message.success('发起退款成功,即将刷新');
+ return true;
+ } catch (error) {
+ hide();
+ message.error('发起退款失败,请重试');
+ return false;
+ }
+};
+const Manage = () => {
+ const [row, setRow] = useState();
+ //绑定
+ const actionRef = useRef();
+ const [form] = Form.useForm();
+ const [isModalOpen, setIsModalOpen] = useState(false);
+
+ const [thirdOrderInfo, setThirdOrderInfo] = useState(false);
+
+
+ // 获取店铺分类、商品名称信息
+ useEffect(() => {
+
+ }, []);
+
+ const columns = [
+ {
+ title: '主键',
+ dataIndex: 'id',
+ tip: '规则名称是唯一的 key',
+ hideInSearch: true,
+ hideInTable: true,
+ },
+ {
+ title: '订单编号',
+ dataIndex: 'orderNum',
+ },
+ {
+ title: '同步时间',
+ dataIndex: 'createAt',
+ hideInSearch: true,
+ },
+ {
+ title: '操作',
+ dataIndex: 'option',
+ valueType: 'option',
+ width: 200,
+ render: (_, record) => [
+ {
+ var data = await api.getThirdOrderInfo(record.id);
+ setThirdOrderInfo(data.data.thirdOrderInfos);
+ setIsModalOpen(true);
+ }} >
+ 查看详情
+
+ ],
+ },
+ ];
+
+ const columnInfos = [
+ {
+ title: '商品名称',
+ dataIndex: 'goodsName',
+ key: 'goodsName',
+ render: (text) => {text},
+ },
+ {
+ title: '数量',
+ dataIndex: 'count',
+ key: 'count',
+ }
+ ];
+ return (
+
+ [
+ // ,
+ // ]}
+ columns={columns}
+ //数据绑定
+ request={async (params, sorter, filter) => {
+ const msg = await api.page(params);
+ return {
+ data: msg.data.data,
+ success: true,
+ total: msg.data.total,
+ };
+ }}
+ >
+
+ <>
+ { }} onCancel={() => { setIsModalOpen(false); }}>
+
+
+ >
+
+ );
+};
+
+export default Manage;
diff --git a/src/pages/order/thirdOrder/service.js b/src/pages/order/thirdOrder/service.js
new file mode 100644
index 0000000..8f66f56
--- /dev/null
+++ b/src/pages/order/thirdOrder/service.js
@@ -0,0 +1,135 @@
+// @ts-ignore
+
+/* eslint-disable */
+import { request } from 'umi';
+
+export default {
+
+ page(data) {
+ data.isreport = true;
+ return request(`/ordermanage/api/Order/ThirdOrderPage`, {
+ method: 'Post',
+ data: data,
+ });
+ },
+
+ getThirdOrderInfo(data) {
+ return request(`/ordermanage/api/Order/GetThirdOrderInfo?thirdOrderId=`+data, {
+ method: 'get',
+ });
+ },
+
+
+
+
+
+ /** 获取订单流水信息*/
+ orderList(data) {
+ data.isreport = true;
+ return request(`/ordermanage/api/Order/PostDetail`, {
+ method: 'Post',
+ data: data,
+ // params: { ...params },
+ // ...(options || {}),
+ });
+ },
+
+ /**
+ * 查询店铺信息(设备信息)
+ */
+ srdList(data) {
+ return request('/groupmeal/api/shop/alllist', {
+ method: 'GET'
+ });
+},
+
+GetFlowExport(data) {
+ return request(`/ordermanage/api/Order/GetFlowExport`, {
+ method: 'Post',
+ data: data
+
+ // params: { ...params },
+ // ...(options || {}),
+ });
+},
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /**
+ * 查询店铺分类(设备类型)信息
+ */
+ srdTypeList(data) {
+ return request(`/kitchen/api/storetype/list`, {
+ method: 'Post',
+ data: data,
+ // params: { ...params },
+ // ...(options || {}),
+ });
+ },
+
+
+ /**
+ * 查询商品信息
+ */
+ goodsList(data) {
+ return request(`/kitchen/api/goodes/list`, {
+ method: 'Post',
+ data: data,
+ // params: { ...params },
+ // ...(options || {}),
+ });
+ },
+ /**
+ * 查询商品类型
+ */
+ goodsTypeList(data) {
+ return request(`/kitchen/api/goodstype/list`, {
+ method: 'Post',
+ data: data,
+ // params: { ...params },
+ // ...(options || {}),
+ });
+ },
+ StartRefund(data) {
+ return request(`/kitchen/api/refund/StartOrderRefund`, {
+ method: 'Post',
+ params: data,
+ // params: { ...params },
+ // ...(options || {}),
+ });
+ },
+ GetOrderDetails(data) {
+ return request(`/kitchen/api/Order/GetOrderDetails`, {
+ method: 'Post',
+ params: data,
+ // params: { ...params },
+ // ...(options || {}),
+ });
+ },
+
+
+ // 打印小票
+ printsmallticket(data) {
+ return request(`/kitchen/api/printer/print-small-ticket`, {
+ method: 'Post',
+ data: data,
+ // params: { ...params },
+ // ...(options || {}),
+ });
+ },
+};
+
+