diff --git a/src/pages/travelMember/OrderAfterSalesManage/index.tsx b/src/pages/travelMember/OrderAfterSalesManage/index.tsx
index e757ca9..5c5fe04 100644
--- a/src/pages/travelMember/OrderAfterSalesManage/index.tsx
+++ b/src/pages/travelMember/OrderAfterSalesManage/index.tsx
@@ -51,8 +51,8 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
dataIndex: 'searchText',
title: '查询内容',
hideInTable: true,
- fieldProp: {
- placeholder: "请输入购买的商品/订单编号/联系电话/会员名称"
+ fieldProps: {
+ placeholder: "请输入购买的商品/订单编号"
}
},
{
@@ -78,7 +78,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
valueEnum: {
"0": "全部",
"8000": "退款申请中",
- "8020": "退款申请中",
+ "8020": "退款审核中",
"8900": "订单已退款",
"9000": "订单已关闭",
},
@@ -170,7 +170,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
valueType: "select",
valueEnum: {
"8000": "退款申请中",
- "8020": "退款申请中",
+ "8020": "退款审核中",
"8900": "订单已退款",
"9000": "订单已关闭",
},
@@ -276,16 +276,17 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
ORDER_DATE_Start: params?.ORDER_DATE_Start || "",
ORDER_DATE_End: params?.ORDER_DATE_End || "",
SALEBILL_STATES: params?.orderStatus === "0" ? "8000,8020,8900,9000" : params?.orderStatus,
- SALEBILL_TYPES: "3999"
+ SALEBILL_TYPES: "3999",
+ SearchKeyValue: params?.searchText || ""
// CHANNEL_TYPE: params?.PAY_METHOD === "0" ? "" : params?.PAY_METHOD
},
PageIndex: 1,
PageSize: 999999,
SortStr: "ORDER_DATE desc",
- keyWord: {
- Key: "ORDER_PERSON,ORDER_PERSONTEL,SALEBILL_CODE,COMMODITY_NAME",
- Value: params?.searchText || ""
- },
+ // keyWord: {
+ // Key: "ORDER_PERSON,ORDER_PERSONTEL,SALEBILL_CODE,COMMODITY_NAME",
+ // Value: params?.searchText || ""
+ // },
}
console.log('reqreqreqreqreq', req);
diff --git a/src/pages/travelMember/ProductListingManagement/component/LeftSelectMallType.tsx b/src/pages/travelMember/ProductListingManagement/component/LeftSelectMallType.tsx
index 72cebb8..39ecc96 100644
--- a/src/pages/travelMember/ProductListingManagement/component/LeftSelectMallType.tsx
+++ b/src/pages/travelMember/ProductListingManagement/component/LeftSelectMallType.tsx
@@ -44,6 +44,7 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
if (USERDEFINEDTYPEList && USERDEFINEDTYPEList.length > 0) {
setTreeView(USERDEFINEDTYPEList)
setData(USERDEFINEDTYPEList)
+ setAllTreeViews(USERDEFINEDTYPEList)
return USERDEFINEDTYPEList
} else {
const req = {
@@ -57,7 +58,7 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
setData(data)
session.set("USERDEFINEDTYPEList", data)
-
+ setAllTreeViews(data)
return data
}
@@ -71,18 +72,20 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
// 筛选左侧的服务区树
const handleFilterServiceTree = async (value?: string) => {
const resList: any = JSON.parse(JSON.stringify(allTreeViews))
+ console.log('resListresListresListresList', resList);
+
setSelectedId('')
if (resList && resList.length > 0 && value) {
setTreeView([])
const list: any = []
resList.forEach((item: any) => {
- if (item.label.indexOf(value) !== -1) {
+ if (item.USERDEFINEDTYPE_NAME.indexOf(value) !== -1) {
list.push(item)
} else {
if (item.children && item.children.length > 0) {
const childrenList: any = []
item.children.forEach((subItem: any) => {
- if (subItem.label.indexOf(value) !== -1) {
+ if (subItem.USERDEFINEDTYPE_NAME.indexOf(value) !== -1) {
childrenList.push(subItem)
}
})
@@ -144,9 +147,9 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
className="pageTable-leftnav"
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? width ? `${width}px` : "300px" : "60px" }}
extra={
- {/*

{
+

{
setShowServiceSearchBox(true)
- }} /> */}
+ }} />
{
setCollapsible(!collapsible);
}} />
@@ -195,32 +198,21 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
>
{treeView && treeView.length > 0 ? 0 ? treeShowRow : ['0-0'] : []}
+ defaultExpandedKeys={['0-0']}
onCheck={(checkedKeys: React.Key[] | any, info) => {
console.log('checkedKeyscheckedKeyscheckedKeys', checkedKeys);
console.log('infoinfoinfoinfoinfoinfo', info);
// 多选逻辑
// const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_PID !== -1)
- const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_ID)
+ const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_ID !== '0-0')
console.log('selectedIdsselectedIds', selectedIds);
setSelectedId(selectedIds.map((n: any) => n?.USERDEFINEDTYPE_ID)?.toString() || '')
if (reload) {
diff --git a/src/pages/travelMember/ProductListingManagement/index.tsx b/src/pages/travelMember/ProductListingManagement/index.tsx
index 94849ed..1e69088 100644
--- a/src/pages/travelMember/ProductListingManagement/index.tsx
+++ b/src/pages/travelMember/ProductListingManagement/index.tsx
@@ -960,7 +960,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
// },
showSearch: true,
filterOption: (input, node) =>
- (node.BRAND_NAME || '').toLowerCase().includes(input.toLowerCase())
+ (node.label || '').toLowerCase().includes(input.toLowerCase())
}}
rules={[
{
diff --git a/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx b/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx
index 70c4fa2..a5809a7 100644
--- a/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx
+++ b/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx
@@ -253,7 +253,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
- const handleGetTableData = async () => {
+ const handleGetTableData = async (paramsObj?: any) => {
const res: any = formRef.current?.getFieldsValue()
console.log('resresres', res);
let params: any = {
@@ -272,8 +272,8 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
USER_MOBILEPHONE: parentDetail?.MEMBERSHIP_MOBILEPHONE
},
SortStr: 'BEHAVIORRECORD_TIME desc',
- PageIndex: 1,
- PageSize: 999999
+ PageIndex: paramsObj.current || 1,
+ PageSize: paramsObj?.pageSize || 999999
} : {
SearchParameter: {
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
@@ -403,7 +403,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
setting: true
}}
request={async (params) => {
- handleGetTableData()
+ handleGetTableData(params)
// if (!isFirst) {
// handleGetTableData()
// }
diff --git a/src/pages/travelMember/SupplierOrderStatistics/SupplierOrderStatistics.less b/src/pages/travelMember/SupplierOrderStatistics/SupplierOrderStatistics.less
new file mode 100644
index 0000000..33e621f
--- /dev/null
+++ b/src/pages/travelMember/SupplierOrderStatistics/SupplierOrderStatistics.less
@@ -0,0 +1,258 @@
+.SupplierOrderStatisticsMain {
+ width: 100%;
+
+ .SupplierOrderStatisticsTop {
+ width: 100%;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2);
+ border-radius: 4px;
+ box-sizing: border-box;
+ padding: 16px;
+
+ .SupplierOrderStatisticsTitleBox {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .SupplierOrderStatisticsTitle {
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 600;
+ font-size: 18px;
+ color: #333333;
+ line-height: 18px;
+ text-align: left;
+ font-style: normal;
+ margin-left: 12px;
+ position: relative;
+ }
+
+ .SupplierOrderStatisticsTitle::after {
+ content: "";
+ width: 4px;
+ height: 18px;
+ background: #1492FF;
+ border-radius: 2px;
+ position: absolute;
+ left: -12px;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
+
+ .SupplierOrderStatisticsContentBox {
+ width: 100%;
+ margin-top: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ // .SupplierOrderStatisticsItemFirst {
+ // width: 280px;
+ // height: 180px;
+ // background-image: url('../../../assets/detail/staticSumTotalBg.png');
+ // background-size: 100% 100%;
+ // background-repeat: no-repeat;
+ // box-sizing: border-box;
+ // padding: 26px 39px;
+ // margin-right: 16px;
+
+ // .firstItemTitle {
+ // font-family: PingFangSC, PingFang SC;
+ // font-weight: 500;
+ // font-size: 18px;
+ // color: #FFFFFF;
+ // line-height: 13px;
+ // text-align: left;
+ // font-style: normal;
+ // }
+
+ // .firstItemValue {
+ // font-family: DINAlternate, DINAlternate;
+ // font-weight: bold;
+ // font-size: 28px;
+ // color: #FFFFFF;
+ // line-height: 32px;
+ // text-align: left;
+ // font-style: normal;
+ // margin-top: 12px;
+ // }
+ // }
+
+ .SupplierOrderStatisticsItemOther {
+ width: 100%;
+ height: 180px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .SupplierOrderStatisticsOtherItem {
+ width: calc((100% - 112px) / 7);
+ height: 100%;
+ background: #F6F9FF;
+ border-radius: 8px;
+ box-sizing: border-box;
+ padding: 29px 24px;
+ position: relative;
+ cursor: pointer;
+
+ .otherItemTitle {
+ height: 36px;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 600;
+ font-size: 16px;
+ color: #333333;
+ line-height: 18px;
+ text-align: left;
+ font-style: normal;
+ }
+
+ .otherItemValue {
+ font-family: DINAlternate, DINAlternate;
+ font-weight: bold;
+ font-size: 32px;
+ color: #1492FF;
+ line-height: 38px;
+ text-align: left;
+ margin-top: 17px;
+ font-style: normal;
+ }
+
+ .addLabel {
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 12px;
+ color: rgba(0, 0, 0, 0.65);
+ line-height: 12px;
+ text-align: left;
+ font-style: normal;
+ margin-right: 5px;
+ margin-top: 10px;
+ }
+
+
+ .otherItemAddBox {
+ display: flex;
+ align-items: center;
+ margin-top: 10px;
+
+
+ .addIcon {
+ width: 7px;
+ height: 10px;
+ margin-right: 6px;
+ }
+
+ .addValue {
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 16px;
+ color: rgba(0, 0, 0, 0.65);
+ line-height: 16px;
+ text-align: center;
+ font-style: normal;
+ }
+ }
+
+ // .otherBgIcon {
+ // width: 76px;
+ // height: 51px;
+ // position: absolute;
+ // top: 29px;
+ // right: 4px;
+ // background-image: url(../../../assets/detail/otherBgIcon.png);
+ // background-repeat: no-repeat;
+ // background-size: 100% 100%;
+ // }
+ }
+
+ .SupplierOrderStatisticsOtherItemSelect {
+ background-image: url('../../../assets/detail/staticSumTotalBg.png');
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+
+ .otherItemTitle {
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 600;
+ font-size: 16px;
+ color: #fff;
+ line-height: 18px;
+ text-align: left;
+ font-style: normal;
+ }
+
+ .otherItemValue {
+ font-family: DINAlternate, DINAlternate;
+ font-weight: bold;
+ font-size: 32px;
+ color: #fff;
+ line-height: 38px;
+ text-align: left;
+ margin-top: 17px;
+ font-style: normal;
+ }
+
+ .addLabel {
+ color: #fff;
+ }
+
+ .otherItemAddBox {
+
+ .addValue {
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 14px;
+ color: #fff;
+ line-height: 16px;
+ text-align: center;
+ font-style: normal;
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ .SupplierOrderStatisticsBottom {
+ width: 100%;
+ margin-top: 16px;
+ box-sizing: border-box;
+ background: #FFFFFF;
+ box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2);
+ border-radius: 4px;
+ padding: 16px;
+
+ .SupplierOrderStatisticsTitleBox {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .SupplierOrderStatisticsTitle {
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 600;
+ font-size: 18px;
+ color: #333333;
+ line-height: 18px;
+ text-align: left;
+ font-style: normal;
+ margin-left: 12px;
+ position: relative;
+ }
+
+ .SupplierOrderStatisticsTitle::after {
+ content: "";
+ width: 4px;
+ height: 18px;
+ background: #1492FF;
+ border-radius: 2px;
+ position: absolute;
+ left: -12px;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/pages/travelMember/SupplierOrderStatistics/components/SupplierLeftSelectTree.tsx b/src/pages/travelMember/SupplierOrderStatistics/components/SupplierLeftSelectTree.tsx
new file mode 100644
index 0000000..1e6fd36
--- /dev/null
+++ b/src/pages/travelMember/SupplierOrderStatistics/components/SupplierLeftSelectTree.tsx
@@ -0,0 +1,242 @@
+import { connect } from "umi";
+import type { ConnectState } from "@/models/connect";
+import ProCard from "@ant-design/pro-card";
+import searchIcon from '@/assets/ai/searchIcon.png'
+import { useRef, useState } from "react";
+import { MenuFoldOutlined } from "@ant-design/icons";
+import ProForm, { ProFormText } from "@ant-design/pro-form";
+import { Button, Col, FormInstance, Row, Tree } from "antd";
+import close from '@/assets/ai/close.png'
+import { getServerpartTree } from "@/services/options";
+import useRequest from "@ahooksjs/use-request";
+import './style.less'
+import { getMerchantShopTree } from "@/pages/Setting/Users/service";
+import session from "@/utils/session";
+import { handeGetMERCHANTSList } from "../../service";
+
+
+type DetailProps = {
+ setSelectedId: any; // 把选择的服务区 可以带给外层
+ reload?: boolean; // 选择服务区 是否可以刷新组件之外的内容
+ actionRef?: any; // 和reload配合使用 确认要刷新的内容
+ currentUser: any; // 当前用户的信息
+ width?: number; // 组件的宽度
+ otherFun?: any; // 点击之后要进行的其他操作 多个操作可以写在一个方法里面传进来
+ setCollapsible: any; // 是否收缩组件
+ collapsible: boolean; // 收缩组件的判断依据
+ haveTest?: boolean;// 是否有测试服务区
+ handleGetLeftTreeData?: any // 拿到树数据的方法 必须要有输出值的
+ noWj?: any // 把万佳商贸隐藏
+ selectOnly?: boolean// 传入的时候 仅支持单选
+}
+const SupplierLeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width, otherFun, setCollapsible, collapsible, haveTest, handleGetLeftTreeData, noWj, selectOnly }: DetailProps) => {
+ const searchTreeRef = useRef();
+ // 默认的服务区树
+ const [allTreeViews, setAllTreeViews] = useState()
+ // 是否要显示全部
+ const [isShowAllInTree, setIsShowAllInTree] = useState(false)
+ // 加载服务区树
+ const { loading: treeLoading, data: treeViews } = useRequest(async () => {
+ const req = {
+ searchParameter: {
+ OWNERUNIT_ID: currentUser?.OwnerUnitId,
+ PROVINCE_CODE: currentUser?.ProvinceCode,
+ MERCHANTS_TYPE: '',
+ MERCHANTS_AUTOTYPE: '',
+ MERCHANTS_STATE: 1
+ },
+ PageIndex: 1,
+ PageSize: 999999,
+ }
+ const data = await handeGetMERCHANTSList(req);
+ console.log('data', data);
+
+ let list: any = data.List
+ setTreeView(list)
+ return list
+ })
+ // 显示服务区树搜索框
+ const [showServiceSearchBox, setShowServiceSearchBox] = useState(false)
+ // 实际显示在左侧的服务区树
+ const [treeView, setTreeView] = useState()
+ // 树要展开的行
+ const [treeShowRow, setTreeShowRow] = useState()
+ // 筛选左侧的服务区树
+ const handleFilterServiceTree = async (value?: string) => {
+ const resList: any = JSON.parse(JSON.stringify(allTreeViews))
+ setSelectedId('')
+ if (resList && resList.length > 0 && value) {
+ setTreeView([])
+ const list: any = []
+ resList.forEach((item: any) => {
+ if (item.label.indexOf(value) !== -1) {
+ list.push(item)
+ } else {
+ if (item.children && item.children.length > 0) {
+ const childrenList: any = []
+ item.children.forEach((subItem: any) => {
+ if (subItem.label.indexOf(value) !== -1) {
+ childrenList.push(subItem)
+ }
+ })
+ item.children = childrenList
+ if (childrenList && childrenList.length > 0) {
+ list.push(item)
+ }
+ }
+ }
+ })
+ if (list && list.length > 0) {
+ const keyList: any = ['0-0']
+ list.forEach((item: any) => {
+ keyList.push(item.key)
+ })
+ setTreeShowRow(keyList)
+ }
+ setTimeout(() => {
+ setTreeView(list)
+ }, 100)
+ } else {
+ setTreeView([])
+ setTreeShowRow([])
+ setTreeView(allTreeViews)
+ }
+ }
+ // 根据传入的服务区id筛选剔除掉这个服务区
+ const handleFilterList = (list: any, id: any) => {
+ let res: any = []
+ list.forEach((item: any) => {
+ if (item.value === id) {
+
+ } else {
+ res.push(item)
+ }
+ })
+ console.log('res', res);
+ return res
+ }
+
+ // 仅支持单选一个服务区的时候 调用的方法
+ const convertTreeForSelectOnly = (treeData: any[]): any[] => {
+ return treeData.map(item => {
+ const newItem = {
+ ...item,
+ disabled: item.type !== 1,
+ };
+ if (item.children) {
+ newItem.children = convertTreeForSelectOnly(item.children);
+ }
+ return newItem;
+ });
+ };
+
+ return (
+
+
+
{
+ setShowServiceSearchBox(true)
+ }} />
+ {
+ setCollapsible(!collapsible);
+ }} />
+
+
{
+ return []
+ }
+ }}
+ isKeyPressSubmit
+ onFinish={(values: any) => {
+ return handleFilterServiceTree(values?.searchValue || '')
+ }}
+ >
+
+
+
+
+
+
+
+
+
+
+
+

{
+ setShowServiceSearchBox(false)
+ }} />
+
+ }
+ colSpan={!collapsible ? "300px" : "60px"}
+ title={!collapsible ? "请选择服务区" : ""}
+ headerBordered
+ collapsed={collapsible}
+ >
+ {treeView && treeView.length > 0 ? {
+ if (selectOnly) {
+ // 只允许单选且只允许type为1
+ const checked = Array.isArray(checkedKeys.checked) ? checkedKeys.checked : checkedKeys;
+ const node = info.node;
+ if (node.type === 1) {
+ setSelectedId(node.value);
+ if (reload) {
+ actionRef?.current?.reload();
+ }
+ if (otherFun) {
+ otherFun(info);
+ }
+ } else {
+ // 取消非type=1的勾选
+ setSelectedId('');
+ }
+ } else {
+ // 多选逻辑
+ const selectedIds = info.checkedNodes.filter((n: any) => n?.MERCHANTS_ID)
+ // const selectedIds = info.checkedNodes
+ setSelectedId(selectedIds.map((n: any) => n?.MERCHANTS_ID)?.toString() || '')
+ if (reload) {
+ actionRef?.current?.reload()
+ }
+ if (otherFun) {
+ otherFun(info)
+ }
+ }
+ }}
+ fieldNames={{
+ title: "MERCHANTS_NAME",
+ key: "MERCHANTS_ID"
+ }}
+ /> : ''}
+
+
+ )
+}
+
+export default connect(({ user }: ConnectState) => ({
+ currentUser: user.currentUser,
+}))(SupplierLeftSelectTree);
diff --git a/src/pages/travelMember/SupplierOrderStatistics/components/style.less b/src/pages/travelMember/SupplierOrderStatistics/components/style.less
new file mode 100644
index 0000000..2b979a6
--- /dev/null
+++ b/src/pages/travelMember/SupplierOrderStatistics/components/style.less
@@ -0,0 +1,29 @@
+.pageTable-leftnav{
+ .leftSelectBox{
+ position: relative;
+ .searchIcon{
+ width: 20px;
+ height: 20px;
+ cursor: pointer;
+ margin-right: 15px;
+ }
+ .fixedBox{
+ position: absolute;
+ width: 275px;
+ background: #fff;
+ right: -10px;
+ box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
+ border-radius: 8px;
+ box-sizing: border-box;
+ padding: 12px;
+ z-index: 2;
+ display: flex;
+ align-items: center;
+ .noBottom{
+ .ant-form-item{
+ margin-bottom: 0!important;
+ }
+ }
+ }
+ }
+ }
\ No newline at end of file
diff --git a/src/pages/travelMember/SupplierOrderStatistics/index.tsx b/src/pages/travelMember/SupplierOrderStatistics/index.tsx
new file mode 100644
index 0000000..3f35040
--- /dev/null
+++ b/src/pages/travelMember/SupplierOrderStatistics/index.tsx
@@ -0,0 +1,785 @@
+import { connect } from "umi";
+import type { CurrentUser } from "umi";
+import type { ConnectState } from "@/models/connect";
+import React, { useRef, useState } from "react";
+import ProCard from "@ant-design/pro-card";
+import { MenuFoldOutlined } from "@ant-design/icons";
+import type { FormInstance } from "antd";
+import { Button, message, Space, Spin, Tree } from "antd";
+import useRequest from "@ahooksjs/use-request";
+import { getServerpartTree } from "@/services/options";
+import type { ActionType } from "@ant-design/pro-table";
+import ProTable from "@ant-design/pro-table";
+import ReactHTMLTableToExcel from "react-html-table-to-excel";
+import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
+import PageTitleBox from "@/components/PageTitleBox";
+import SupplierLeftSelectTree from "./components/SupplierLeftSelectTree";
+import { handeGetGetOnlineOrderSummary } from "../service";
+import moment from 'moment'
+
+
+const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props) => {
+ const { currentUser } = props
+ const downloadBtnRef = useRef
()
+ const actionRef = useRef();
+ const formRef = useRef();
+ const [reqDetailList, setReqDetailList] = useState(); // 合计项数据源
+ const [printOut, setPrintOut] = useState(); // 打印数据的内容
+ const [collapsible, setCollapsible] = useState(false)
+ const [treeView, setTreeView] = useState()
+ const [printIndex, setPrintIndex] = useState(new Date().getTime())
+
+
+ // 树相关的属性和方法
+ const [selectedId, setSelectedId] = useState()
+ // 导出的加载效果
+ const [showLoading, setShowLoading] = useState(false)
+ // 是否显示打印的表格
+ const [showExportTable, setShowExportTable] = useState(false)
+ // 查询的条件
+ const [searchParams, setSearchParams] = useState()
+
+ const [columnsStateMap, setColumnsStateMap] = useState({
+ 'TotalActualAmount.maxData': { show: false },
+ 'TotalActualAmount.minData': { show: false },
+ 'TotalActualAmount.avgData': { show: false },
+ 'TotalActualAmount.YOYData': { show: false },
+ 'TotalActualAmount.QOQData': { show: false },
+
+ 'TotalSuccAmount.maxData': { show: false },
+ 'TotalSuccAmount.minData': { show: false },
+ 'TotalSuccAmount.avgData': { show: false },
+ 'TotalSuccAmount.YOYData': { show: false },
+ 'TotalSuccAmount.QOQData': { show: false },
+
+ 'TotalSuccTicket.maxData': { show: false },
+ 'TotalSuccTicket.minData': { show: false },
+ 'TotalSuccTicket.avgData': { show: false },
+ 'TotalSuccTicket.YOYData': { show: false },
+ 'TotalSuccTicket.QOQData': { show: false },
+
+ 'TotalCount.maxData': { show: false },
+ 'TotalCount.minData': { show: false },
+ 'TotalCount.avgData': { show: false },
+ 'TotalCount.YOYData': { show: false },
+ 'TotalCount.QOQData': { show: false },
+
+ 'TotalFailureTicket.maxData': { show: false },
+ 'TotalFailureTicket.minData': { show: false },
+ 'TotalFailureTicket.avgData': { show: false },
+ 'TotalFailureTicket.YOYData': { show: false },
+ 'TotalFailureTicket.QOQData': { show: false },
+
+ 'TotalRefundTicket.maxData': { show: false },
+ 'TotalRefundTicket.minData': { show: false },
+ 'TotalRefundTicket.avgData': { show: false },
+ 'TotalRefundTicket.YOYData': { show: false },
+ 'TotalRefundTicket.QOQData': { show: false },
+
+ 'TotalRefundAmount.maxData': { show: false },
+ 'TotalRefundAmount.minData': { show: false },
+ 'TotalRefundAmount.avgData': { show: false },
+ 'TotalRefundAmount.YOYData': { show: false },
+ 'TotalRefundAmount.QOQData': { show: false },
+ });
+
+ const columns: any = [
+ {
+ title: '统计时间',
+ dataIndex: 'search_date',
+ valueType: 'dateRange',
+ hideInTable: true,
+ hideInDescriptions: true,
+ initialValue: [moment().subtract(1, 'month'), moment()],
+ search: {
+ transform: (value: any) => {
+ return {
+ StartDate: value[0],
+ EndDate: value[1],
+ };
+ },
+ },
+ },
+ {
+ dataIndex: 'StatisticalName',
+ title: '供应商名称',
+ width: 250,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ fixed: 'left'
+ },
+ {
+ dataIndex: 'TotalActualAmount',
+ title: '实际销售金额(扣除退款)',
+ hideInSearch: true,
+ children: [
+ {
+ dataIndex: ['TotalActualAmount', 'summaryData'],
+ key: "TotalActualAmount.summaryData",
+ title: '合计值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalActualAmount', 'maxData'],
+ key: "TotalActualAmount.maxData",
+ title: '最大值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalActualAmount', 'minData'],
+ key: "TotalActualAmount.minData",
+ title: '最小值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalActualAmount', 'avgData'],
+ key: "TotalActualAmount.avgData",
+ title: '平均值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalActualAmount', 'YOYData'],
+ key: "TotalActualAmount.YOYData",
+ title: '同比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalActualAmount', 'YOYDataAdd'],
+ key: "TotalActualAmount.YOYDataAdd",
+ title: '同比增长',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.TotalActualAmount?.YOYData && record?.TotalActualAmount?.summaryData ? (((record?.TotalActualAmount?.summaryData - record?.TotalActualAmount?.YOYData) / record?.TotalActualAmount?.YOYData) * 100).toFixed(2) + '%' : "-"
+ }
+ },
+ {
+ dataIndex: ['TotalActualAmount', 'QOQData'],
+ key: "TotalActualAmount.QOQData",
+ title: '环比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ ]
+ },
+ {
+ dataIndex: 'TotalSuccAmount',
+ title: '成交销售金额',
+ hideInSearch: true,
+ children: [
+ {
+ dataIndex: ['TotalSuccAmount', 'summaryData'],
+ key: "TotalSuccAmount.summaryData",
+ title: '合计值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccAmount', 'maxData'],
+ key: "TotalSuccAmount.maxData",
+ title: '最大值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccAmount', 'minData'],
+ key: "TotalSuccAmount.minData",
+ title: '最小值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccAmount', 'avgData'],
+ key: "TotalSuccAmount.avgData",
+ title: '平均值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccAmount', 'YOYData'],
+ key: "TotalSuccAmount.YOYData",
+ title: '同比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccAmount', 'YOYDataAdd'],
+ key: "TotalSuccAmount.YOYDataAdd",
+ title: '同比增长',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.TotalSuccAmount?.YOYData && record?.TotalSuccAmount?.summaryData ? (((record?.TotalSuccAmount?.summaryData - record?.TotalSuccAmount?.YOYData) / record?.TotalSuccAmount?.YOYData) * 100).toFixed(2) + '%' : "-"
+ }
+ },
+ {
+ dataIndex: ['TotalSuccAmount', 'QOQData'],
+ key: "TotalSuccAmount.QOQData",
+ title: '环比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ ]
+ },
+ {
+ dataIndex: 'TotalSuccTicket',
+ title: '成交订单笔数',
+ hideInSearch: true,
+ children: [
+ {
+ dataIndex: ['TotalSuccTicket', 'summaryData'],
+ key: "TotalSuccTicket.summaryData",
+ title: '合计值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccTicket', 'maxData'],
+ key: "TotalSuccTicket.maxData",
+ title: '最大值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccTicket', 'minData'],
+ key: "TotalSuccTicket.minData",
+ title: '最小值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccTicket', 'avgData'],
+ key: "TotalSuccTicket.avgData",
+ title: '平均值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccTicket', 'YOYData'],
+ key: "TotalSuccTicket.YOYData",
+ title: '同比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalSuccTicket', 'YOYDataAdd'],
+ key: "TotalSuccTicket.YOYDataAdd",
+ title: '同比增长',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.TotalSuccTicket?.YOYData && record?.TotalSuccTicket?.summaryData ? (((record?.TotalSuccTicket?.summaryData - record?.TotalSuccTicket?.YOYData) / record?.TotalSuccTicket?.YOYData) * 100).toFixed(2) + '%' : "-"
+ }
+ },
+ {
+ dataIndex: ['TotalSuccTicket', 'QOQData'],
+ key: "TotalSuccTicket.QOQData",
+ title: '环比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ ]
+ },
+ {
+ dataIndex: 'TotalCount',
+ title: '成交销售数量',
+ hideInSearch: true,
+ children: [
+ {
+ dataIndex: ['TotalCount', 'summaryData'],
+ key: "TotalCount.summaryData",
+ title: '合计值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalCount', 'maxData'],
+ key: "TotalCount.maxData",
+ title: '最大值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalCount', 'minData'],
+ key: "TotalCount.minData",
+ title: '最小值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalCount', 'avgData'],
+ key: "TotalCount.avgData",
+ title: '平均值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalCount', 'YOYData'],
+ key: "TotalCount.YOYData",
+ title: '同比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalCount', 'YOYDataAdd'],
+ key: "TotalCount.YOYDataAdd",
+ title: '同比增长',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.TotalCount?.YOYData && record?.TotalCount?.summaryData ? (((record?.TotalCount?.summaryData - record?.TotalCount?.YOYData) / record?.TotalCount?.YOYData) * 100).toFixed(2) + '%' : "-"
+ }
+ },
+ {
+ dataIndex: ['TotalCount', 'QOQData'],
+ key: "TotalCount.QOQData",
+ title: '环比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ ]
+ },
+ {
+ dataIndex: 'TotalFailureTicket',
+ title: '交易失败笔数',
+ hideInSearch: true,
+ children: [
+ {
+ dataIndex: ['TotalFailureTicket', 'summaryData'],
+ key: "TotalFailureTicket.summaryData",
+ title: '合计值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalFailureTicket', 'maxData'],
+ key: "TotalFailureTicket.maxData",
+ title: '最大值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalFailureTicket', 'minData'],
+ key: "TotalFailureTicket.minData",
+ title: '最小值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalFailureTicket', 'avgData'],
+ key: "TotalFailureTicket.avgData",
+ title: '平均值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalFailureTicket', 'YOYData'],
+ key: "TotalFailureTicket.YOYData",
+ title: '同比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalFailureTicket', 'YOYDataAdd'],
+ key: "TotalFailureTicket.YOYDataAdd",
+ title: '同比增长',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.TotalFailureTicket?.YOYData && record?.TotalFailureTicket?.summaryData ? (((record?.TotalFailureTicket?.summaryData - record?.TotalFailureTicket?.YOYData) / record?.TotalFailureTicket?.YOYData) * 100).toFixed(2) + '%' : "-"
+ }
+ },
+ {
+ dataIndex: ['TotalFailureTicket', 'QOQData'],
+ key: "TotalFailureTicket.QOQData",
+ title: '环比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ ]
+ },
+ {
+ dataIndex: 'TotalRefundTicket',
+ title: '退款订单笔数',
+ hideInSearch: true,
+ children: [
+ {
+ dataIndex: ['TotalRefundTicket', 'summaryData'],
+ key: "TotalRefundTicket.summaryData",
+ title: '合计值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundTicket', 'maxData'],
+ key: "TotalRefundTicket.maxData",
+ title: '最大值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundTicket', 'minData'],
+ key: "TotalRefundTicket.minData",
+ title: '最小值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundTicket', 'avgData'],
+ key: "TotalRefundTicket.avgData",
+ title: '平均值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundTicket', 'YOYData'],
+ key: "TotalRefundTicket.YOYData",
+ title: '同比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundTicket', 'YOYDataAdd'],
+ key: "TotalRefundTicket.YOYDataAdd",
+ title: '同比增长',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.TotalRefundTicket?.YOYData && record?.TotalRefundTicket?.summaryData ? (((record?.TotalRefundTicket?.summaryData - record?.TotalRefundTicket?.YOYData) / record?.TotalRefundTicket?.YOYData) * 100).toFixed(2) + '%' : "-"
+ }
+ },
+ {
+ dataIndex: ['TotalRefundTicket', 'QOQData'],
+ key: "TotalRefundTicket.QOQData",
+ title: '环比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ ]
+ },
+ {
+ dataIndex: 'TotalRefundAmount',
+ title: '退款订单金额',
+ hideInSearch: true,
+ children: [
+ {
+ dataIndex: ['TotalRefundAmount', 'summaryData'],
+ key: "TotalRefundAmount.summaryData",
+ title: '合计值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundAmount', 'maxData'],
+ key: "TotalRefundAmount.maxData",
+ title: '最大值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundAmount', 'minData'],
+ key: "TotalRefundAmount.minData",
+ title: '最小值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundAmount', 'avgData'],
+ key: "TotalRefundAmount.avgData",
+ title: '平均值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundAmount', 'YOYData'],
+ key: "TotalRefundAmount.YOYData",
+ title: '同比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ {
+ dataIndex: ['TotalRefundAmount', 'YOYDataAdd'],
+ key: "TotalRefundAmount.YOYDataAdd",
+ title: '同比增长',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.TotalRefundAmount?.YOYData && record?.TotalRefundAmount?.summaryData ? (((record?.TotalRefundAmount?.summaryData - record?.TotalRefundAmount?.YOYData) / record?.TotalRefundAmount?.YOYData) * 100).toFixed(2) + '%' : "-"
+ }
+ },
+ {
+ dataIndex: ['TotalRefundAmount', 'QOQData'],
+ key: "TotalRefundAmount.QOQData",
+ title: '环比数值',
+ width: 120,
+ align: 'center',
+ hideInSearch: true,
+ ellipsis: true,
+ },
+ ]
+ },
+ ]
+
+ const exportTable = (e) => {
+ e.stopPropagation(); // 防止Collapse组件收起
+ const main = document.getElementsByClassName(`saleReportHideBox${printIndex}`)[0]
+ const thead = main.querySelector('thead').cloneNode(true); // 深克隆DOM节点
+ const tbody = main.querySelector('tbody').cloneNode(true); // 深克隆DOM节点
+ const container = document.querySelector('#hiddenBox');
+
+ const tempTable = document.createElement('table');
+ tempTable.appendChild(thead);
+ tempTable.appendChild(tbody);
+
+ tempTable.setAttribute('id', 'table-to-xls-SupplierOrderStatistics'); // 给table添加id,值与按钮上的table字段对应
+
+ container.appendChild(tempTable); // 把创建的节点添加到页面容器中
+
+ setShowLoading(false)
+
+ downloadBtnRef.current.handleDownload();
+ setShowExportTable(false)
+ tempTable.remove() // 防止重复打印一个内容
+ }
+
+
+ return (
+ {
+ // 打印报表
+ if (!reqDetailList || reqDetailList.length === 0) return;
+ setPrintOut(el);
+ }} >
+
+ {
+ showLoading ?
+
: ''
+ }
+
+
+ {
+ showExportTable && reqDetailList && reqDetailList.length > 0 ?
+
: ''
+ }
+
+
+
+
+
+
+
} // 列表表头
+ search={{ span: 6 }}
+ request={async (params) => {
+ if (!selectedId) {
+ return
+ }
+
+ const req: any = {
+ CalcType: 2,
+ OwnerUnitId: currentUser?.OwnerUnitId,
+ StartDate: params?.StartDate || "",
+ EndDate: params?.EndDate || "",
+ SalebillType: "",
+ MerchantId: selectedId,
+ }
+ setSearchParams(req)
+ const data = await handeGetGetOnlineOrderSummary(req)
+ console.log('datadatadatadata', data);
+ if (data && data.length > 0) {
+ setReqDetailList(data)
+ return { data: data, success: true, total: data.length }
+ }
+ return { data: [], success: true }
+ }}
+ columnsState={{
+ value: columnsStateMap,
+ onChange: setColumnsStateMap,
+ }}
+ toolbar={{
+ actions: [
+
+
+ ,
+
+ ]
+ }}
+ />
+
+
+
+ )
+}
+
+export default connect(({ user }: ConnectState) => ({
+ currentUser: user.currentUser
+}))(SupplierOrderStatistics);
diff --git a/src/pages/travelMember/memberInfor/component/memberDetail.tsx b/src/pages/travelMember/memberInfor/component/memberDetail.tsx
index 8948f52..c1fe76c 100644
--- a/src/pages/travelMember/memberInfor/component/memberDetail.tsx
+++ b/src/pages/travelMember/memberInfor/component/memberDetail.tsx
@@ -42,6 +42,7 @@ const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentU
const [disabled, setDraggleDisabled] = useState() // 是否拖动
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj');
+ let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj');
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList');
let COMPANY_STATEList = session.get('COMPANY_STATEList');
let SCORETYPETree = session.get('SCORETYPETree')
@@ -366,6 +367,12 @@ const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentU
{MEMBERSHIPTYPEYNObj[currentRow?.MEMBERSHIP_TYPE]} : ""
}
+
+ {
+ currentRow?.MEMBERSHIP_LEVEL && MEMBERSHIPLEVELYNObj && MEMBERSHIPLEVELYNObj[currentRow?.MEMBERSHIP_LEVEL] ?
+ {MEMBERSHIPLEVELYNObj[currentRow?.MEMBERSHIP_LEVEL]} : ""
+ }
+