diff --git a/src/pages/order/order-flow-manage/index.jsx b/src/pages/order/order-flow-manage/index.jsx index 77e0d7a..8556cfe 100644 --- a/src/pages/order/order-flow-manage/index.jsx +++ b/src/pages/order/order-flow-manage/index.jsx @@ -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: () => ( - - ), - }, { title: '交易单号', dataIndex: 'order_Number', hideInSearch: true, - // renderText: (dom, entity) => { - // return - // setRow(entity), - // handleModalVisible(true) - // }>{dom}; - // }, - }, - { - title: '店铺分类', - dataIndex: 'storeTypeName', - hideInSearch: true, }, { diff --git a/src/pages/order/order-flow-manage/orderflowDetail.jsx b/src/pages/order/order-flow-manage/orderflowDetail.jsx index b7d8c73..470d6f5 100644 --- a/src/pages/order/order-flow-manage/orderflowDetail.jsx +++ b/src/pages/order/order-flow-manage/orderflowDetail.jsx @@ -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', diff --git a/src/pages/order/order-summary-manage/index.jsx b/src/pages/order/order-summary-manage/index.jsx index 386b6c6..1d9ac16 100644 --- a/src/pages/order/order-summary-manage/index.jsx +++ b/src/pages/order/order-summary-manage/index.jsx @@ -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: () => ( { hideInTable: true, initialValue: [], }, - // { - // title: '商品类型', - // dataIndex: 'goodsTypeId', - // hideInTable: true, - // valueType: 'select', - // fixed: 'left', - // width: 120, - // renderFormItem: () => ( - // - // ), - // }, - // { - // 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,