Browse Source

🐞 fix(订单流水): 订单流水

订单流失
tags/小炒逻辑变更前
txb 2 years ago
parent
commit
f99f040c2a
3 changed files with 5 additions and 314 deletions
  1. +0
    -91
      src/pages/order/order-flow-manage/index.jsx
  2. +0
    -42
      src/pages/order/order-flow-manage/orderflowDetail.jsx
  3. +5
    -181
      src/pages/order/order-summary-manage/index.jsx

+ 0
- 91
src/pages/order/order-flow-manage/index.jsx View File

@@ -25,8 +25,6 @@ const handlerefund = async (value) => {
const Manage = () => {
const [row, setRow] = useState();
const [createModalVisible, handleModalVisible] = useState(false);
//获取店铺分类(店铺类型)
const [srdTypeList, setsrdTypeList] = useState([]);
//获取店铺(店铺信息)
const [srdList, setsrdList] = useState([]);
const [dataList, setdataList] = useState([]);
@@ -35,28 +33,6 @@ const Manage = () => {
const [Selectparams, setparams] = useState([]);
// 获取店铺分类、商品名称信息
useEffect(() => {
// //加盟商
// function initfranchList() {
// api.franchList({ current: 1, pageSize: 20, status: '0' }).then((r) => {
// var arr2 = r.data.data;
// arr2.forEach((element) => {
// element.text = element.name;
// element.franchiseeId = element.id;
// });
// setfranchList(arr2);
// });
// }
//店铺分类(店铺类型)
function initsrdTypeList() {
api.srdTypeList().then((r) => {
var arr = r.data;
arr?.forEach((element) => {
element.storeTypeId = element.id;
element.text = element.name;
});
setsrdTypeList(arr);
});
}
//店铺名称(店铺信息)
function initsrdList() {
api.srdList().then((r) => {
@@ -68,35 +44,8 @@ const Manage = () => {
setsrdList(arr);
});
}
//商品信息
function initgoodsList() {
api.goodsList().then((r) => {
var arr1 = r.data;
arr1.forEach((element) => {
element.label = element.name;
element.value = element.id;
});
console.log('获取下拉数据', arr1);
setgoodList(arr1);
});
}

//查询商品类型
function initgoodsTypeList() {
api.goodsTypeList().then((r) => {
var arr2 = r.data;
arr2.forEach((element) => {
element.label = element.name;
element.value = element.id;
});
setgoodsTypeList(arr2);
});
}
//initfranchList();
initsrdList();
initsrdTypeList();
// initgoodsList();
// initgoodsTypeList();
}, []);
/**导出 */
function handleExport() {
@@ -139,13 +88,6 @@ const Manage = () => {
dataIndex: 'Customer_Tel',
hideInTable: true,
},
{
title: '店铺分类',
dataIndex: 'storeTypeId',
hideInTable: true,
valueType: 'select',
valueEnum: srdTypeList,
},
{
title: '店铺名称',
dataIndex: 'storeId',
@@ -162,43 +104,10 @@ const Manage = () => {
/>
),
},
{
title: '订单状态',
dataIndex: 'status',
hideInTable: true,
valueType: 'select',
renderFormItem: () => (
<Select mode="multiple" showArrow placeholder="订单状态" style={{ width: '100%' }}>
<Option key={2}>支付成功</Option>
<Option key={3}>等待制作</Option>
<Option key={4}>制作中</Option>
<Option key={5}>制作完成待取餐</Option>
<Option key={6}>取餐完成</Option>
<Option key={7}>受保护订单</Option>
<Option key={8}>无主状态</Option>
<Option key={9}>立即吃面</Option>
<Option key={10}>无效订单</Option>
<Option key={11}>废弃订单</Option>
<Option key={20}>退款订单</Option>
<Option key={21}>订单不可做</Option>
</Select>
),
},
{
title: '交易单号',
dataIndex: 'order_Number',
hideInSearch: true,
// renderText: (dom, entity) => {
// return <a onClick={() =>
// setRow(entity),
// handleModalVisible(true)
// }>{dom}</a>;
// },
},
{
title: '店铺分类',
dataIndex: 'storeTypeName',
hideInSearch: true,
},

{


+ 0
- 42
src/pages/order/order-flow-manage/orderflowDetail.jsx View File

@@ -123,16 +123,6 @@ const OrderflowDetail = (props) => {
};
}}
columns={[
{
title: '店铺分类',
key: 'storeTypeName',
dataIndex: 'storeTypeName',
},
{
title: '店铺名称',
key: 'storeName',
dataIndex: 'storeName',
},
{
title: '商品分类',
key: 'goodsTypeName',
@@ -160,38 +150,6 @@ const OrderflowDetail = (props) => {
moneySymbol: '¥',
},
},
{
title: '子订单状态',
dataIndex: 'cookingStatus',
key: 'cookingStatus',
hideInSearch: true,
valueEnum: {
0: {
text: '等待制作',
status: 'Success',
},
1: {
text: '制作中',
status: 'Success',
},
2: {
text: '等待取餐',
status: 'Success',
},
3: {
text: '取餐完成',
status: 'Processing',
},
99998: {
text: '正常订单',
status: 'Default',
},
99999: {
text: '异常订单',
status: 'Default',
},
},
},
{
title: '操作',
dataIndex: 'option',


+ 5
- 181
src/pages/order/order-summary-manage/index.jsx View File

@@ -40,7 +40,7 @@ const Manage = () => {
}else{
datas[i]['disabled']=true;
}
if (datas[i].children) {
inittree(datas[i].children);
}
@@ -61,17 +61,6 @@ const Manage = () => {
setOrgListArray(list);
});
}
// //加盟商
// function initfranchList() {
// api.franchList({ current: 1, pageSize: 20, status: '0' }).then((r) => {
// var arr2 = r.data.data;
// arr2.forEach((element) => {
// element.text = element.name;
// element.franchiseeId = element.id;
// });
// setfranchList(arr2);
// });
// }
//店铺分类(店铺类型)
function initsrdTypeList() {
api.srdTypeList().then((r) => {
@@ -128,8 +117,9 @@ const Manage = () => {
const { ReqDetailList } = dataList; // 网络请求命名空间
const option = {};
var Excelcolumns = [];
//debugger
columns.map((item, index) => {
if (index > 5) {
if (index > 2) {
Excelcolumns.push(item);
}
});
@@ -139,7 +129,7 @@ const Manage = () => {
sheetData: dataList.map((item) => {
const result = {};
columns.forEach((c, index) => {
if (index > 5) {
if (index > 2) {
result[c.dataIndex] = item[c.dataIndex];
}
});
@@ -148,7 +138,7 @@ const Manage = () => {
sheetName: '订单汇总', // Excel文件名称
sheetFilter: Excelcolumns.map((item) => item.dataIndex),
sheetHeader: Excelcolumns.map((item) => item.title),
columnWidths: Excelcolumns.map(() => 10),
columnWidths: Excelcolumns.map(() => 9),
},
];

@@ -165,47 +155,10 @@ const Manage = () => {
hideInSearch: true,
hideInTable: true,
},
// {
// title: '加盟商',
// dataIndex: 'franchiseeId',
// hideInTable: true,
// valueType: 'select',
// valueEnum: franchList,
// },
// {
// title: '加盟商',
// dataIndex: 'franchiseeName',
// hideInSearch: true,
// // },
// {
// title: '店铺分类',
// dataIndex: 'storeTypeId',
// hideInTable: true,
// valueType: 'select',
// valueEnum: srdTypeList,
// fixed: 'left',
// width: 120,
// },
// {
// title: '订单时间',
// dataIndex: 'order_CreateTime',
// valueType: 'dateRange',
// width: 120,
// hideInTable: true,
// search: {
// transform: (value) => {
// return {
// order_CreateTime: value[0],
// order_EndTime: value[1],
// };
// },
// },
// },
{
title: '店铺名称',
dataIndex: 'storeId',
hideInTable: true,
fixed: 'left',
width: 120,
renderFormItem: () => (
<TreeSelect
@@ -224,78 +177,17 @@ const Manage = () => {
hideInTable: true,
initialValue: [],
},
// {
// title: '商品类型',
// dataIndex: 'goodsTypeId',
// hideInTable: true,
// valueType: 'select',
// fixed: 'left',
// width: 120,
// renderFormItem: () => (
// <Select
// mode="multiple"
// showArrow
// placeholder="请选择商品类型"
// style={{ width: '100%' }}
// options={goodsTypeList}
// />
// ),
// },
// {
// title: '商品名称',
// dataIndex: 'goodsId',
// hideInTable: true,
// valueType: 'select',
// fixed: 'left',
// width: 120,
// renderFormItem: () => (
// <Select
// mode="multiple"
// showArrow
// optionFilterProp="label"
// placeholder="请选择商品"
// style={{ width: '100%' }}
// options={goodList}
// />
// ),
// },
// {
// title: '店铺分类',
// dataIndex: 'storeTypeName',
// hideInSearch: true,
// fixed: 'left',
// width: 120,
// },

{
title: '店铺名称',
dataIndex: 'storeName',
hideInSearch: true,
fixed: 'left',
width: 120,
},

// {
// title: '商品类型',
// dataIndex: 'goodsTypeName',
// hideInSearch: true,
// fixed: 'left',
// width: 120,
// },

// {
// title: '商品名称',
// dataIndex: 'goodsName',
// hideInSearch: true,
// fixed: 'left',
// width: 120,
// },
{
title: '应付款金额',
dataIndex: 'orderOriginalMoney',
renderText: (val) => `${val}¥`,
hideInSearch: true,
fixed: 'left',
width: 160,
},
{
@@ -303,7 +195,6 @@ const Manage = () => {
dataIndex: 'orderRealMoney',
hideInSearch: true,
renderText: (val) => `${val}¥`,
fixed: 'left',
width: 160,
},
{
@@ -311,74 +202,26 @@ const Manage = () => {
dataIndex: 'refundRealMoney',
hideInSearch: true,
renderText: (val) => `${val}¥`,
fixed: 'left',
width: 120,
},
{
title: '总订单',
dataIndex: 'sumOrder',
hideInSearch: true,
fixed: 'left',
width: 120,
},
// {
// title: '下单总碗数(碗)',
// dataIndex: 'countDetail',
// hideInSearch: true,
// fixed: 'left',
// width: 160,
// },
{
title: '正常订单',
dataIndex: 'successfulCount',
hideInSearch: true,
fixed: 'left',
width: 120,
},
{
title: '退款订单',
dataIndex: 'refundCount',
hideInSearch: true,
fixed: 'left',
width: 120,
},
// {
// title: '退款碗数(碗)',
// dataIndex: 'refundNum',
// hideInSearch: true,
// fixed: 'left',
// width: 120,
// },
// {
// title: '正常订单(碗)',
// dataIndex: 'orderNum',
// hideInSearch: true,
// width: 120,
// },
// {
// title: '盲盒订单(碗)',
// dataIndex: 'boxNum',
// hideInSearch: true,
// width: 120,
// },
// {
// title: '立即吃面订单(碗)',
// dataIndex: 'nowNum',
// hideInSearch: true,
// width: 160,
// },
// {
// title: '废弃订单(碗)',
// dataIndex: 'abandoned',
// hideInSearch: true,
// width: 120,
// },
// {
// title: '下单总人数',
// dataIndex: 'customer',
// hideInSearch: true,
// width: 120,
// },
];

return (
@@ -401,29 +244,10 @@ const Manage = () => {
request={async (params, sorter, filter) => {
var orderSummayData = [];
var total = 0;
// if (params.franchiseeId != null) {
// //加盟商
// params.franchiseeId = franchList[params.franchiseeId].franchiseeId;
// }
if (params.storeTypeId != undefined) {
//店铺分类
params.storeTypeId = srdTypeList[params.storeTypeId].storeTypeId;
}
// if (params.storeId != undefined) {
// //店铺名称
// params.storeId = srdList[params.storeId].storeId;
// }
// if (params.goodsId != undefined) {
// //商品名称
// params.goodsId = goodList[params.goodsId].goodsId;
// }
// if (params.goodsTypeId) {
// //商品类型
// params.goodsTypeId = goodsTypeList[params.goodsTypeId].goodsTypeId;
// }
// 表单搜索项会从 params 传入,传递给后端接口。
//const msg = await api.orderSummaryList(params);

var obj=
{
current:params.current,


Loading…
Cancel
Save