{
@@ -371,16 +392,16 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
expandable={{
expandRowByClick: true
}}
- scroll={{ y: 'calc(100vh - 450px)' }}
- headerTitle={
} // 列表表头
- search={{ span: 6 }}
+ scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 430px)' }}
+ search={isComponent ? false : { span: 6 }}
pagination={{ pageSize: 100 }}
dataSource={tableData}
loading={tableLoading}
request={async (params) => {
- if (!isFirst) {
- handleGetTableData()
- }
+ handleGetTableData()
+ // if (!isFirst) {
+ // handleGetTableData()
+ // }
// console.log('data', data);
// if (data && data.length > 0) {
diff --git a/src/pages/travelMember/TradingLedger/index.tsx b/src/pages/travelMember/TradingLedger/index.tsx
index ef307d7..aff15a5 100644
--- a/src/pages/travelMember/TradingLedger/index.tsx
+++ b/src/pages/travelMember/TradingLedger/index.tsx
@@ -1,4 +1,4 @@
-// 商城交易台账
+// 商城交易台账 交易台账管理
import { connect } from "umi";
import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect";
@@ -78,7 +78,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
{
dataIndex: 'SALEBILL_CODE',
title:
订单编码
,
- align: 'left',
+ align: 'center',
width: 220,
ellipsis: true,
hideInSearch: true,
@@ -90,6 +90,14 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
}}>{record?.SALEBILL_CODE} : "-"
}
},
+ {
+ dataIndex: 'PAYMENT_CODE',
+ title:
交易单号
,
+ align: 'center',
+ width: 220,
+ ellipsis: true,
+ hideInSearch: true,
+ },
{
dataIndex: 'COMMODITY_NAME',
title:
购买商品
,
@@ -117,7 +125,6 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
title: "订单状态",
dataIndex: "SALEBILL_STATE",
width: 150,
- hideInSearch: true,
ellipsis: true,
valueType: "select",
valueEnum: {
@@ -167,6 +174,14 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
align: "center",
initialValue: '0',
},
+ {
+ dataIndex: 'ORDER_PERSON',
+ title: '收货人',
+ align: 'center',
+ width: 150,
+ ellipsis: true,
+ hideInSearch: true,
+ },
{
dataIndex: 'ORDER_DATE',
title: '下单时间',
@@ -281,7 +296,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
const req: any = {
SearchParameter: {
SALEBILL_IDS: "",
- SALEBILL_TYPES: params?.SALEBILL_TYPE === '0' ? '' : params?.SALEBILL_TYPE,
+ SALEBILL_TYPES: params?.SALEBILL_TYPE === '0' ? '3000,3001,3002,3010' : params?.SALEBILL_TYPE,
MEMBERSHIP_IDS: "",
MERCHANTS_IDS: "",
// PROVINCE_CODE: currentUser?.ProvinceCode,
diff --git a/src/pages/travelMember/components/pubilcColumns.ts b/src/pages/travelMember/components/pubilcColumns.ts
new file mode 100644
index 0000000..e69de29
diff --git a/src/pages/travelMember/memberInfor/component/CollectProducts.tsx b/src/pages/travelMember/memberInfor/component/CollectProducts.tsx
new file mode 100644
index 0000000..7df6d4d
--- /dev/null
+++ b/src/pages/travelMember/memberInfor/component/CollectProducts.tsx
@@ -0,0 +1,159 @@
+// 会员优惠券
+import { connect } from "umi";
+import type { ConnectState } from "@/models/connect";
+import PageTitleBox from "@/components/PageTitleBox";
+import ProTable, { ActionType } from "@ant-design/pro-table";
+import { useRef, useState } from "react";
+import { FormInstance, Image } from "antd";
+import { handeGetCommodityCollectionList, handeGetCOUPON_SENDList, handeGetMemberShipLicenseList } from "../../service";
+import moment from 'moment'
+
+type DetailProps = {
+ parentDetail?: any
+ currentUser?: any
+}
+const CollectProducts = ({ parentDetail, currentUser }: DetailProps) => {
+ const actionRef = useRef
();
+ const formRef = useRef();
+
+ // 文件列表
+ const [fileList, setFileList] = useState([])
+ const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片
+
+ const columns: any = [
+ {
+ title: "商品图片",
+ width: 150,
+ dataIndex: "list_img",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.list_img ?
{
+ setFileList([{ url: record?.list_img }])
+ setImagePreviewVisible(true)
+ }} /> : "-"
+ }
+ },
+ {
+ title: "商品分类",
+ width: 150,
+ dataIndex: "USERDEFINEDTYPE_NAME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+
+ },
+ {
+ title: "品牌名称",
+ width: 150,
+ dataIndex: "BRAND_NAME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "商品名称",
+ width: 250,
+ dataIndex: "COMMODITY_NAME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "商品单位",
+ width: 250,
+ dataIndex: "COMMODITY_UNIT",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "商品规格",
+ width: 250,
+ dataIndex: "COMMODITY_RULE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "商品价格",
+ width: 250,
+ dataIndex: "COMMODITY_MEMBERPRICE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ }
+ ]
+
+ const handleChangePreview = (val: any) => {
+ setImagePreviewVisible(val)
+ }
+
+
+
+
+ return (
+
+
} // 列表表头
+ request={async (params) => {
+ const req: any = {
+ ProvinceCode: currentUser?.ProvinceCode,
+ OwnerUnitId: currentUser?.OwnerUnitId,
+ MemberShipId: parentDetail?.MEMBERSHIP_ID,
+ AppGuid: "wxee018fb96955552a",
+ PageIndex: params?.current,
+ PageSize: params?.pageSize,
+ SortStr: 'COMMODITY_MEMBERPRICE desc',
+ }
+ const data = await handeGetCommodityCollectionList(req)
+ console.log('datadatadata', data);
+ if (data && data.length > 0) {
+ return { data, success: true }
+ }
+ return { data: [], success: true }
+ }}
+ pagination={{
+ defaultPageSize: 20,
+ showTotal: (total) => `共 ${total} 条记录`
+ }}
+ // toolbar={{
+ // actions: [
+
+ // ]
+ // }}
+ />
+ {/* 图片预览组件 */}
+ {
+ fileList && fileList.length > 0 &&
+ {
+ handleChangePreview(vis)
+ }
+ }}>
+ {
+ fileList.map((n) => )
+ }
+
+
+ }
+
+
+ )
+}
+
+export default connect(({ user, }: ConnectState) => ({
+ currentUser: user.currentUser,
+}))(CollectProducts);
diff --git a/src/pages/travelMember/memberInfor/component/LicensePlateManage.tsx b/src/pages/travelMember/memberInfor/component/LicensePlateManage.tsx
new file mode 100644
index 0000000..a5b107f
--- /dev/null
+++ b/src/pages/travelMember/memberInfor/component/LicensePlateManage.tsx
@@ -0,0 +1,95 @@
+// 车牌管理
+import { connect } from "umi";
+import type { ConnectState } from "@/models/connect";
+import PageTitleBox from "@/components/PageTitleBox";
+import ProTable, { ActionType } from "@ant-design/pro-table";
+import { useRef } from "react";
+import { FormInstance } from "antd";
+import { handeGetMemberShipLicenseList } from "../../service";
+
+type DetailProps = {
+ parentDetail?: any
+}
+const LicensePlateManage = ({ parentDetail }: DetailProps) => {
+ const actionRef = useRef();
+ const formRef = useRef();
+
+ const columns: any = [
+ {
+ title: "会员姓名",
+ width: 150,
+ dataIndex: "MEMBERSHIP_NAME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "车辆类型",
+ width: 150,
+ dataIndex: "VEHICLE_TYPE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "车牌号码",
+ width: 150,
+ dataIndex: "PLATE_NUMBER",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "手机号码",
+ width: 150,
+ dataIndex: "MEMBERSHIP_MOBILEPHONE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ }
+ ]
+
+ return (
+
+
} // 列表表头
+ request={async (params) => {
+ const req: any = {
+ searchParameter: {
+ MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
+ OWNERUNIT_ID: 911,
+ },
+ PageIndex: 1,
+ PageSize: 20,
+ }
+ const data = await handeGetMemberShipLicenseList(req)
+ console.log('datadatadata', data);
+ if (data && data.length > 0) {
+ return { data, success: true }
+ }
+ return { data: [], success: true }
+ }}
+ // toolbar={{
+ // actions: [
+
+ // ]
+ // }}
+ />
+
+
+
+ )
+}
+
+export default connect(({ user, }: ConnectState) => ({
+ currentUser: user.currentUser,
+}))(LicensePlateManage);
diff --git a/src/pages/travelMember/memberInfor/component/MemberDiscounts.tsx b/src/pages/travelMember/memberInfor/component/MemberDiscounts.tsx
new file mode 100644
index 0000000..f4574c8
--- /dev/null
+++ b/src/pages/travelMember/memberInfor/component/MemberDiscounts.tsx
@@ -0,0 +1,128 @@
+// 会员优惠券
+import { connect } from "umi";
+import type { ConnectState } from "@/models/connect";
+import PageTitleBox from "@/components/PageTitleBox";
+import ProTable, { ActionType } from "@ant-design/pro-table";
+import { useRef } from "react";
+import { FormInstance } from "antd";
+import { handeGetCOUPON_SENDList, handeGetMemberShipLicenseList } from "../../service";
+import moment from 'moment'
+
+type DetailProps = {
+ parentDetail?: any
+}
+const MemberDiscounts = ({ parentDetail }: DetailProps) => {
+ const actionRef = useRef();
+ const formRef = useRef();
+
+ const columns: any = [
+ {
+ title: "优惠券名称",
+ width: 150,
+ dataIndex: "COUPON_NAME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "优惠券状态",
+ width: 150,
+ dataIndex: "COUPON_STATE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ valueType: 'select',
+ valueEnum: {
+ "0": { text: '未使用', status: 'processing' },
+ "1": { text: '已使用', status: 'success' },
+ "2": { text: '失效', status: 'error' }
+ }
+ },
+ {
+ title: "使用说明",
+ width: 250,
+ dataIndex: "COUPON_DESC",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "优惠形式",
+ width: 150,
+ dataIndex: "COUPON_TYPE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ valueType: 'select',
+ valueEnum: {
+ "1000": "满减券",
+ "2000": "折扣券",
+ "3000": "抵扣券",
+ "4000": "兑换券",
+ }
+ },
+ {
+ title: "有效期至",
+ width: 180,
+ dataIndex: "VALID_END_TIME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ render: (_, record) => {
+ return record?.VALID_END_TIME ? moment(record?.VALID_END_TIME).format('YYYY-MM-DD HH:mm:ss') : "-"
+ }
+ },
+ {
+ title: "适用门店",
+ width: 250,
+ dataIndex: "COOPSHOP_DESC",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ }
+ ]
+
+ return (
+
+
} // 列表表头
+ request={async (params) => {
+ const req: any = {
+ searchParameter: {
+ MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID,
+ // OWNERUNIT_ID: 911,
+ },
+ PageIndex: 1,
+ PageSize: 999999,
+ }
+ const data = await handeGetCOUPON_SENDList(req)
+ console.log('datadatadata', data);
+ if (data && data.length > 0) {
+ return { data, success: true }
+ }
+ return { data: [], success: true }
+ }}
+ // toolbar={{
+ // actions: [
+
+ // ]
+ // }}
+ />
+
+
+
+ )
+}
+
+export default connect(({ user, }: ConnectState) => ({
+ currentUser: user.currentUser,
+}))(MemberDiscounts);
diff --git a/src/pages/travelMember/memberInfor/component/memberDetail.tsx b/src/pages/travelMember/memberInfor/component/memberDetail.tsx
new file mode 100644
index 0000000..91c3ae7
--- /dev/null
+++ b/src/pages/travelMember/memberInfor/component/memberDetail.tsx
@@ -0,0 +1,732 @@
+// 会员详情组件
+import { connect } from "umi";
+import type { ConnectState } from "@/models/connect";
+import { Col, FormInstance, Modal, Row } from "antd";
+import { useEffect, useRef, useState } from "react";
+import Draggable from "react-draggable";
+import React from "react";
+import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
+import moment from 'moment';
+import memberInfoIcon from '@/assets/detail/memberInfoIcon.png'
+import closeIcon from '@/assets/detail/closeIcon.png'
+import session from "@/utils/session";
+import memberDetailIcon from '@/assets/detail/memberDetailIcon.png'
+import ProTable from "@ant-design/pro-table";
+import { handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetPOINTRECORDList } from "../../service";
+import AddressDetail from "../../MemberAddress/components/addressDetail";
+import './style.less'
+import ConsumptionRecordSearch from "../../ConsumptionRecordSearch";
+import GrowthValueRecordSearch from "../../GrowthValueRecordSearch";
+import PointsRecordSearch from "../../PointsRecordSearch";
+import RegistrationRetentionAnalysis from "../../RegistrationRetentionAnalysis";
+import LicensePlateManage from "./LicensePlateManage";
+import MemberDiscounts from "./MemberDiscounts";
+import CollectProducts from "./CollectProducts";
+import MerchantEvaluationManage from "../../MerchantEvaluationManage";
+import MallEvaluationManage from "../../MallEvaluationManage";
+import { handleSetlogSave } from "@/utils/format";
+
+
+type DetailProps = {
+ showDetailDrawer: boolean
+ currentRow: any
+ handleCloseModal: any
+ currentUser: any
+}
+const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentUser }: DetailProps) => {
+
+ const modalRef = useRef();
+ const draggleRef = React.createRef()
+ // 弹出框拖动效果
+ const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
+ const [disabled, setDraggleDisabled] = useState() // 是否拖动
+
+ let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj');
+ let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList');
+ let COMPANY_STATEList = session.get('COMPANY_STATEList');
+ let SCORETYPETree = session.get('SCORETYPETree')
+ let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj')
+
+ // 当前选中在详情里面要查看的内容
+ const [selectTab, setSelectTab] = useState(1)
+
+ const onDraggaleStart = (event, uiData) => {
+ const { clientWidth, clientHeight } = window.document.documentElement;
+ const targetRect = draggleRef.current?.getBoundingClientRect();
+ if (!targetRect) {
+ return;
+ }
+ setBounds({
+ left: -targetRect.left + uiData.x,
+ right: clientWidth - (targetRect.right - uiData.x),
+ top: -targetRect.top + uiData.y,
+ bottom: clientHeight - (targetRect.bottom - uiData.y),
+ });
+ };
+
+ // 消费的列表
+ let consumptionColumns: any = [
+ {
+ title: "服务区名称",
+ width: 150,
+ dataIndex: "SERVERPART_NAME",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "门店名称",
+ width: 150,
+ dataIndex: "SHOPNAME",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "消费类型",
+ width: 120,
+ dataIndex: "CONSUMPTIONRECORD_TYPE",
+ hideInSearch: true,
+ ellipsis: true,
+ valueType: 'select',
+ valueEnum: CONSUMPTIONRECORDTYPEObj,
+ align: 'center'
+ },
+ {
+ title: "订单金额",
+ width: 120,
+ dataIndex: "CONSUME_AMOUNT",
+ hideInSearch: true,
+ valueType: 'digit',
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "消费金额",
+ width: 120,
+ dataIndex: "CONSUME_PRICE",
+ hideInSearch: true,
+ valueType: 'digit',
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "消费积分",
+ width: 120,
+ dataIndex: "CONSUME_SCORE",
+ hideInSearch: true,
+ valueType: 'digit',
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "实付金额",
+ width: 120,
+ dataIndex: "PAY_AMOUNT",
+ hideInSearch: true,
+ valueType: 'digit',
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "优惠金额",
+ width: 150,
+ dataIndex: "COUPON_AMOUNT",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "消费时间 ",
+ width: 150,
+ dataIndex: "CONSUMPTIONRECORD_DATE",
+ hideInSearch: true,
+ align: 'center',
+ render: (_, record) => {
+ return record?.CONSUMPTIONRECORD_DATE ? moment(record?.CONSUMPTIONRECORD_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
+ }
+ },
+ ]
+ // 积分的列表
+ let PointColumns: any = [
+ {
+ title: "服务区名称",
+ width: 150,
+ dataIndex: "SERVERPART_NAME",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "门店名称",
+ width: 150,
+ dataIndex: "SHOPNAME",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center'
+ },
+ {
+ title: "积分方式",
+ width: 120,
+ dataIndex: "POINT_TYPE",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center',
+ valueType: 'select',
+ valueEnum: {
+ "1": "累计",
+ "-1": "消耗"
+ },
+ },
+ {
+ title: "积分来源",
+ width: 120,
+ dataIndex: "POINT_SOURCE",
+ hideInSearch: true,
+ ellipsis: true,
+ valueType: 'treeSelect',
+ align: 'center',
+ request: () => {
+ return SCORETYPETree
+ }
+ },
+ {
+ title: "本次积分",
+ width: 120,
+ dataIndex: "CURRENT_POINT",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center',
+ valueType: "digit"
+ },
+ {
+ title: "累计积分",
+ width: 120,
+ dataIndex: "MEMBERSHIP_POINT",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center',
+ valueType: "digit"
+ },
+ {
+ title: "获取时间",
+ width: 120,
+ dataIndex: "CREATE_DATE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ ]
+ // 成长值的列表
+ let GrowthValueColumns: any = [
+ {
+ title: "服务区名称",
+ width: 150,
+ dataIndex: "SERVERPART_NAME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "门店名称",
+ width: 150,
+ dataIndex: "SHOPNAME",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ },
+ {
+ title: "累计成长值",
+ width: 120,
+ dataIndex: "MEMBERSHIP_GROWTH",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center',
+ valueType: 'digit'
+ },
+ {
+ title: "本次成长值",
+ width: 120,
+ dataIndex: "CURRENT_GROWTH",
+ hideInSearch: true,
+ ellipsis: true,
+ align: 'center',
+ valueType: 'digit'
+ },
+ {
+ title: "成长来源",
+ width: 120,
+ dataIndex: "GROWTH_SOURCE",
+ hideInSearch: true,
+ ellipsis: true,
+ valueType: 'treeSelect',
+ align: 'center',
+ request: () => {
+ return SCORETYPETree
+ }
+ },
+ {
+ title: "成长方式",
+ width: 120,
+ dataIndex: "GROWTH_TYPE",
+ hideInSearch: true,
+ align: 'center',
+ ellipsis: true,
+ valueType: 'select',
+ valueEnum: {
+ "1": "积累",
+ "-1": "消耗",
+ }
+ },
+ {
+ title: "操作时间",
+ width: 120,
+ dataIndex: "OPERATE_DATE",
+ align: 'center',
+ hideInSearch: true,
+ render: (_, record) => {
+ return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-"
+ }
+ },
+ ]
+
+ useEffect(() => {
+ if (showDetailDrawer) {
+ setSelectTab(1)
+ }
+ }, [showDetailDrawer])
+
+ return (
+ }
+ destroyOnClose={true}
+ width={1200}
+ visible={showDetailDrawer}
+ footer={false}
+ afterClose={() => {
+ modalRef.current?.resetFields();
+ // setCurrentRow(undefined);
+ }}
+ bodyStyle={{
+ maxHeight: '850px', // 你可以根据需要调整高度
+ overflowY: 'auto',
+ }}
+ onCancel={() => {
+ // setShowDetailDrawer(false)
+ // setCurrentRow(undefined);
+ }}
+ modalRender={(modal) => {
+ return