diff --git a/config/routes.ts b/config/routes.ts index e2b385f..9a52f9e 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -464,6 +464,12 @@ export default [ name: 'ProductApprovalProcess', component: './reports/productControl/ProductApprovalProcess', }, + // 便利店商品审核 + { + path: 'ConvenienceStoreProductReview', + name: 'ConvenienceStoreProductReview', + component: './reports/productControl/ConvenienceStoreProductReview', + }, // 新增商品流程 { path: 'NewProductApproval', @@ -1092,6 +1098,12 @@ export default [ name: 'ProductWarningRuleSetting', component: './travelMember/ProductWarningRuleSetting/index' }, + // 注册途径统计 + { + path: 'RegistrationStatistics', + name: 'RegistrationStatistics', + component: './travelMember/RegistrationStatistics/index' + }, ] }, { diff --git a/package.json b/package.json index 5d08647..09d3003 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "4.5.11", + "version": "4.5.13", "private": true, "description": "An out-of-box UI solution for enterprise applications", "scripts": { diff --git a/src/pages/Setting/Module/index.tsx b/src/pages/Setting/Module/index.tsx index 718ddfe..f1ebf15 100644 --- a/src/pages/Setting/Module/index.tsx +++ b/src/pages/Setting/Module/index.tsx @@ -317,6 +317,7 @@ const DataDictionary: React.FC<{ currentUser: CurrentUser }> = (props) => { headerTitle="菜单管理" rowKey="SYSTEMMENU_ID" actionRef={actionRef} + scroll={{ x: '100%', y: 'calc(100vh - 430px)' }} pagination={{ defaultPageSize: 20 }} request={async (params) => { console.log('currentUsercurrentUsercurrentUser', currentUser); diff --git a/src/pages/reports/productControl/ConvenienceStoreProductReview/components/ShopDetailModal.tsx b/src/pages/reports/productControl/ConvenienceStoreProductReview/components/ShopDetailModal.tsx new file mode 100644 index 0000000..29779af --- /dev/null +++ b/src/pages/reports/productControl/ConvenienceStoreProductReview/components/ShopDetailModal.tsx @@ -0,0 +1,260 @@ +import { connect } from "umi"; +import type { ConnectState } from "@/models/connect"; +import { Button, Col, FormInstance, Modal, Popconfirm, Row } from "antd"; +import { useEffect, useRef, useState } from "react"; +import Draggable from "react-draggable"; +import React from "react"; +import ProForm, { ProFormSelect, ProFormText } from "@ant-design/pro-form"; +import { handleGetCOMMODITYList } from "../service"; +import session from "@/utils/session"; + +type DetailProps = { + showDetailDrawer: boolean + handleCloseModal: any + parentRow?: any + handleDelete?: any +} +const ShopDetailModal = ({ showDetailDrawer, handleCloseModal, parentRow, handleDelete }: DetailProps) => { + + const modalRef = useRef(); + const draggleRef = React.createRef() + // 弹出框拖动效果 + const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 + const [disabled, setDraggleDisabled] = useState() // 是否拖动 + + 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), + }); + }; + + + useEffect(() => { + + }, [showDetailDrawer]) + + return ( + +
+ { + if (handleDelete) { + handleDelete(parentRow?.COMMODITY_ID) + } + }} + onCancel={() => { + }} + okText="确认" + cancelText="取消" + > + + +
+
+ } + afterClose={() => { + modalRef.current?.resetFields(); + // setCurrentRow(undefined); + }} + maskClosable={true} + bodyStyle={{ + maxHeight: '850px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} + onCancel={() => { + handleCloseModal() + }} + modalRender={(modal) => { + return onDraggaleStart(event, uiData)} + handle=".modalTop" + > +
{modal}
+
+ }} + > + + { + if (parentRow?.COMMODITY_ID) { + let req: any = { + SearchParameter: { + COMMODITY_IDS: parentRow?.COMMODITY_ID + } + } + const data = await handleGetCOMMODITYList(req) + console.log('datadatadatadata', data); + let list: any = data.Result_Data.List + if (list && list.length > 0) { + return list[0] + } else { + return [] + } + } + }} + > + + + + + + + + + + + + + + + + + { + let list = session.get('SHOPTRADEList') + return list + }} + /> + + + + + + + + + + + + + { + let list = session.get('COMMODITYGRADEList') + return list + }} + readonly + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ) +} + +export default connect(({ user, }: ConnectState) => ({ + currentUser: user.currentUser, +}))(ShopDetailModal); diff --git a/src/pages/reports/productControl/ConvenienceStoreProductReview/index.tsx b/src/pages/reports/productControl/ConvenienceStoreProductReview/index.tsx new file mode 100644 index 0000000..98e7b31 --- /dev/null +++ b/src/pages/reports/productControl/ConvenienceStoreProductReview/index.tsx @@ -0,0 +1,322 @@ +// 便利店商品审核 +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, Input, InputNumber, message, Popconfirm, 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 { handleApproveCommodityInfo_AHJG, handleDeleteCOMMODITY_RUNNING, handleGetCOMMODITY_RUNNINGList } from "./service"; +import session from "@/utils/session"; +import ShopDetailModal from "./components/ShopDetailModal"; + + +const ConvenienceStoreProductReview: 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 serverpartObj = session.get('serverpartObj') + + + // 树相关的属性和方法 + const [selectedId, setSelectedId] = useState() + // 导出的加载效果 + const [showLoading, setShowLoading] = useState(false) + // 是否显示打印的表格 + const [showExportTable, setShowExportTable] = useState(false) + // 查询的条件 + const [searchParams, setSearchParams] = useState() + // 表格数据 + const [tableData, setTableData] = useState() + // 审批的loading效果 + const [loading, setLoading] = useState(false) + // 选中的行 + const [selectedModalOrderRowKeys, setSelectedModalOrderRowKeys] = useState() + // 选中的行数据 + const [selectModalRowList, setSelectModalRowList] = useState() + // 显示商品详情悬浮框 + const [showShopDetail, setShowShopDetail] = useState(false) + // 行数据 + const [currentRow, setCurrentRow] = useState() + + const columns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true, + fieldProps: { + placeholder: '请输入商品名称' + } + }, + { + title: "服务区", + width: 200, + dataIndex: "SERVERPART_ID", + hideInSearch: true, + valueType: 'select', + valueEnum: serverpartObj, + align: 'center', + ellipsis: true, + }, + { + title: "商品名称", + width: 200, + dataIndex: "COMMODITY_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + render: (_, record) => { + return record?.COMMODITY_NAME ? + { + setCurrentRow(record) + setShowShopDetail(true) + }}>{record?.COMMODITY_NAME} : "-" + } + }, + { + title: "商品规格", + width: 150, + dataIndex: "COMMODITY_RULE", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "商品类型", + width: 150, + dataIndex: "COMMODITY_TYPE", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "商品价格", + width: 150, + dataIndex: "COMMODITY_CURRPRICE", + hideInSearch: true, + align: 'center', + ellipsis: true, + render: (_, record) => { + return { + // 拿到当前输入的内容 + let newPrice = e.target.value + let list = JSON.parse(JSON.stringify(tableData)) + let newTableData: any = [] + list.forEach((item: any) => { + if (item.COMMODITY_ID === record?.COMMODITY_ID) { + item.COMMODITY_CURRPRICE = newPrice + newTableData.push(item) + } else { + newTableData.push(item) + } + }) + setTableData(newTableData) + }} /> + } + }, + { + title: "商品税率", + width: 150, + dataIndex: "DUTY_PARAGRAPH", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "商品说明", + width: 250, + dataIndex: "COMMODITY_DESC", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + ] + + // 批量审核 + const handleBatchReviewCommodity = async () => { + // 拿到当前的审批列表 + if (selectModalRowList && selectModalRowList.length > 0) { + // 商品勾选的行 + let list: any = JSON.parse(JSON.stringify(selectedModalOrderRowKeys)) + console.log('listlistlist', list); + console.log('tableDatatableDatatableData', tableData); + let reqList: any = [] + // 判断是不是所有的价格都已经输入了 + let isAllOk: boolean = true + // 没有价格的商品名称 + let noPriceName: string = '' + tableData.forEach((item: any) => { + if (list.indexOf(item.COMMODITY_ID.toString()) !== -1) { + reqList.push(item) + } + if (!item.COMMODITY_CURRPRICE) { + isAllOk = false + if (noPriceName) { + noPriceName += `【${item.COMMODITY_NAME}】` + } else { + noPriceName = `【${item.COMMODITY_NAME}】` + } + } + }) + + if (!isAllOk) { + message.error(`${noPriceName}为输入价格!`) + return + } + + let req: any = { + list: reqList + } + const data = await handleApproveCommodityInfo_AHJG(req) + console.log('datadatadatadata', data); + + if (data.Result_Code === 100) { + message.success(data.Result_Desc) + setSelectedModalOrderRowKeys([]) + setSelectModalRowList([]) + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + } else { + message.error('请选择审批商品!') + } + } + + // 删除商品 + const handleBatchDeleteCommodity = async (id: any) => { + const req: any = { + COMMODITY_RUNNINGId: id + } + const data = await handleDeleteCOMMODITY_RUNNING(req) + if (data.Result_Code === 100) { + message.success('删除成功!') + handleCloseModal() + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + } + + // 关闭的方法 + const handleCloseModal = () => { + setCurrentRow(undefined) + setShowShopDetail(false) + } + + return ( +
{ + // 打印报表 + if (!reqDetailList || reqDetailList.length === 0) return; + setPrintOut(el); + }} > + +
+ +
+ { + return `${record?.COMMODITY_ID}` + }} + scroll={{ x: "100%", y: "calc(100vh - 430px)" }} + headerTitle={} // 列表表头 + search={{ span: 6 }} + dataSource={tableData} + request={async (params) => { + if (!selectedId) { + return + } + + setSearchParams(params) + let req: any = { + SearchParameter: { + SERVERPART_IDS: selectedId, + BUSINESSTYPES: 1005 + }, + keyWord: { + Key: "COMMODITY_NAME", + Value: params?.searchText || "" + }, + PageIndex: 1, + PageSize: 999999, + } + + const data = await handleGetCOMMODITY_RUNNINGList(req) + if (data.List && data.List.length > 0) { + setTableData(data.List) + return + // return { data: data.List, success: true } + } + setTableData([]) + return + // return { data: [], success: true } + }} + toolbar={{ + actions: [ + { + if (loading) { + return + } + setLoading(true) + await handleBatchReviewCommodity() + setLoading(false) + }} + onCancel={() => { + }} + okText="确认" + cancelText="取消" + > + + + ] + }} + rowSelection={{ + type: 'checkbox', + selectedRowKeys: selectedModalOrderRowKeys, + onChange: (selectedRowKeys: any, selectedRows: any) => { + setSelectModalRowList(selectedRows) + setSelectedModalOrderRowKeys(selectedRowKeys) + }, + }} + /> +
+
+ + + +
+ ) +} + +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(ConvenienceStoreProductReview); diff --git a/src/pages/reports/productControl/ConvenienceStoreProductReview/service.ts b/src/pages/reports/productControl/ConvenienceStoreProductReview/service.ts new file mode 100644 index 0000000..3520d60 --- /dev/null +++ b/src/pages/reports/productControl/ConvenienceStoreProductReview/service.ts @@ -0,0 +1,51 @@ +import request from "@/utils/request" + +// 拿到便利店商品的审核列表 +export async function handleGetCOMMODITY_RUNNINGList(params: any) { + const data = await request(`/Commodity/GetCOMMODITY_RUNNINGList`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return [] + } + return data.Result_Data +} + +// 审核安徽建工便利店商品数据 +export async function handleApproveCommodityInfo_AHJG(params: any) { + const data = await request(`/Commodity/ApproveCommodityInfo_AHJG`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return [] + } + return data +} + + +// 获取商品详情 +export async function handleGetCOMMODITYList(params: any) { + const data = await request(`/Commodity/GetCOMMODITY_RUNNINGList`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return [] + } + return data +} + + +// 删除商品审核 +export async function handleDeleteCOMMODITY_RUNNING(params: any) { + const data = await request(`/Commodity/DeleteCOMMODITY_RUNNING`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return [] + } + return data +} \ No newline at end of file diff --git a/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx b/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx index 9fdce0e..c63665e 100644 --- a/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx +++ b/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx @@ -22,6 +22,7 @@ import { deletePicture, uploadPicture } from "@/services/picture"; import PrintContent from "./printContent"; import { handleHighPrecision } from "@/utils/utils"; import HistoricalProjects from "./HistoricalProjects"; +import { getProjectDetail } from "@/pages/BussinessProject/service"; const { confirm } = Modal; type DetailProps = { @@ -131,6 +132,8 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS const [showRentReduction, setShowRentReduction] = useState(false) // 悬浮框的加载效果 const [rentReductionLoading, setRentReductionLoading] = useState(false) + // 项目详情 + const [dataProjectDetail, setDataProjectDetail] = useState() const columns: any = [ @@ -2420,6 +2423,8 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS } + const dataProject = await getProjectDetail(parentRow?.BUSINESSPROJECT_ID) + setDataProjectDetail(dataProject) // if (parentRow?.BUSINESSAPPROVAL_ID) { // handleGetProcessProgress(parentRow?.BUSINESSAPPROVAL_ID) // } @@ -2480,8 +2485,8 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS , <> { - parentRow?.CLOSED_DATE ? - 撤场时间:{parentRow?.CLOSED_DATE} + parentRow?.CLOSED_DATE || dataProjectDetail?.CLOSED_DATE ? + 撤场时间:{parentRow?.CLOSED_DATE || dataProjectDetail?.CLOSED_DATE} : '' } { diff --git a/src/pages/reports/settlementAccount/component/yearExamineProcess.tsx b/src/pages/reports/settlementAccount/component/yearExamineProcess.tsx index 81e8254..7872dba 100644 --- a/src/pages/reports/settlementAccount/component/yearExamineProcess.tsx +++ b/src/pages/reports/settlementAccount/component/yearExamineProcess.tsx @@ -1,7 +1,7 @@ import { connect } from "umi"; import type { ConnectState } from "@/models/connect"; import { Button, Col, Drawer, message, Modal, Popconfirm, Row } from "antd"; -import { useRef, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import moment from 'moment' import { handleApprovePeriodAccount, handleGetPictureList } from "../service"; import YearContentTable from "./yearContentTable"; @@ -19,6 +19,7 @@ import React from "react"; import { handleCreateSettlement, handleSynchroRevenueConfirmList } from "@/pages/reports/settlementDetail/service"; import Item from "antd/lib/list/Item"; import { deletePicture, uploadPicture } from "@/services/picture"; +import { getProjectDetail } from "@/pages/BussinessProject/service"; const { confirm } = Modal; type DetailProps = { @@ -74,6 +75,8 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare const [fileLists, setFileLists] = useState() // 判断拿到驳回类型 const [rejectTypeDetail, setRejectTypeDetail] = useState() + // 项目详情 + const [ProjectDetail, setProjectDetail] = useState() // 新建结算申请 const handleCreateSettlementApplication = async () => { @@ -842,6 +845,10 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
{modal}
}} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} > @@ -995,14 +1002,34 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare } - // 剔除 结算时间在2025年4月1日 之后的数据 不给孙青 - if (parentRow?.ENDDATE && new Date(parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime()) { - list = list.filter((item: any) => item.value !== 827); + // 拿个项目撤场时间 + const dataProject = await getProjectDetail(parentRow?.BUSINESSPROJECT_ID) + console.log('dataProjectdataProjectdataProjectdataProject', dataProject); + setProjectDetail(dataProject) + + // 剔除 结算时间在2025年4月1日 之后的数据 不给孙青 如果提前撤场时间还在 4月1号之前的话 那还是给孙青 + // 先判断是不是撤场项目 如果是 那就看时间 如果4月1号之前的 就不排除孙青 如果4月1号之后 就排除孙青 + if (dataProject?.CLOSED_DATE) { + if (new Date(dataProject?.CLOSED_DATE).getTime() > new Date('2025-04-01 00:00:00').getTime()) { + list = list.filter((item: any) => item.value !== 827); + } + } else { + if (parentRow?.ENDDATE && new Date(parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime()) { + list = list.filter((item: any) => item.value !== 827); + } } // 剔除 结算时间在2025年4月1日 之前的数据 不给陶杰 - if (parentRow?.ENDDATE && new Date(parentRow?.ENDDATE).getTime() < new Date('2025-04-01 00:00:00').getTime()) { - list = list.filter((item: any) => item.value !== 1802); + // 这里也同理 如果 撤场时间在4月1号之前 那么就要排除陶杰 + if (dataProject?.CLOSED_DATE) { + if (new Date(dataProject?.CLOSED_DATE).getTime() <= new Date('2025-04-01 00:00:00').getTime()) { + list = list.filter((item: any) => item.value !== 1802); + } + } else { + if (parentRow?.ENDDATE && new Date(parentRow?.ENDDATE).getTime() < new Date('2025-04-01 00:00:00').getTime()) { + list = list.filter((item: any) => item.value !== 1802); + } + } diff --git a/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx b/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx index 1135a27..1b48d97 100644 --- a/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx +++ b/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx @@ -1,11 +1,156 @@ // 热销滞销分析 -import { ConnectState } from "@/models/connect"; +import PageTitleBox from "@/components/PageTitleBox"; +import { ConnectState } from "@/models/connect"; +import ProTable, { ActionType } from "@ant-design/pro-table"; +import { FormInstance } from "antd"; +import { useRef, useState } from "react"; import { connect, CurrentUser } from "umi"; +import { handeGetCommoditySaleSummary } from "../service"; +import moment from 'moment' const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const actionRef = useRef(); + const formRef = useRef(); + // 树相关的属性和方法 + const [selectedId, setSelectedId] = useState() + // 查询的条件 + const [searchParams, setSearchParams] = useState() + + 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], + }; + }, + }, + }, + { + title: "订单类型", + dataIndex: "SaleBillType", + valueType: 'select', + hideInTable: true, + valueEnum: { + "3000": "零售商城", + "3001": "工会商城", + "3002": "品诺商城", + "3010": "积分商城", + "6000": "点餐订单", + }, + initialValue: "3000", + }, + { + title:
商品名称
, + width: 300, + dataIndex: "Commodity_Name", + hideInSearch: true, + align: 'left', + ellipsis: true, + }, + { + title: "商品条码", + width: 150, + dataIndex: "Commodity_Barcode", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "商品规格", + width: 150, + dataIndex: "Commodity_Rule", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "零售价格", + width: 150, + dataIndex: "Commodity_RetailPrice", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "订单笔数", + width: 150, + dataIndex: "Ticket_Count", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "销售数量", + width: 150, + dataIndex: "Total_Count", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "订单金额", + width: 150, + dataIndex: "Total_Amount", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "实付金额", + width: 150, + dataIndex: "Actual_Amount", + hideInSearch: true, + align: 'center', + ellipsis: true, + } + ] + + return (
+ } // 列表表头 + search={{ span: 6 }} + request={async (params) => { + const req: any = { + OwnerUnitId: currentUser?.OwnerUnitId, + ServerpartId: "", + StartDate: params?.StartDate || "", + EndDate: params?.EndDate || "", + SaleBillType: params?.SaleBillType || "" + } + + setSearchParams(params) + const data = await handeGetCommoditySaleSummary(req) + console.log('datadatadatadata', data); + if (data.List && data.List.length > 0) { + return { data: data.List, success: true } + } + return { data: [], success: true } + }} + toolbar={{ + actions: [ + ] + }} + />
) } diff --git a/src/pages/travelMember/LostandFoundAPPliance/index.tsx b/src/pages/travelMember/LostandFoundAPPliance/index.tsx index 2245941..f72a888 100644 --- a/src/pages/travelMember/LostandFoundAPPliance/index.tsx +++ b/src/pages/travelMember/LostandFoundAPPliance/index.tsx @@ -1,11 +1,584 @@ -// 失物招领申请 -import { ConnectState } from "@/models/connect"; -import { connect, CurrentUser } from "umi"; +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 { ExclamationCircleOutlined, MenuFoldOutlined } from "@ant-design/icons"; +import { Col, FormInstance, Modal, Popconfirm, Row } from "antd"; +import { Button, message, Space, Spin, Tree, Image } from "antd"; +import useRequest from "@ahooksjs/use-request"; +import { getFieldEnumTree, 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 moment from 'moment' +import ProForm, { ProFormDatePicker, ProFormDateRangePicker, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect, ProFormUploadButton } from "@ant-design/pro-form"; +import { handleGetPictureList } from "@/pages/reports/settlementAccount/service"; +import session from "@/utils/session"; +import { handeDeleteSUGGESTION, handeGetPictureList, handeGetSUGGESTIONList, handeSynchroSUGGESTION } from "../service"; +import { deletePicture, uploadPicture } from "@/services/picture"; -const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { +const beforeUpload = (file: any) => { + const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; + if (!isJpgOrPng) { + message.error('请上传JPEG、jpg、png格式的图片文件!'); + } + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + message.error('图片大小不超过 5MB!'); + } + return isJpgOrPng && isLt2M; +} + +const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) => { + const { confirm } = Modal; + const { currentUser } = props + const downloadBtnRef = useRef() + const actionRef = useRef(); + const formRef = useRef(); + const modalRef = 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 [lostTypeList, setLostTypeList] = useState() + const [lostTypeObj, setLostTypeObj] = useState() + // 显示新增窗口 + const [showAddModal, setShowAddModal] = useState(false) + + + + // 树相关的属性和方法 + const [selectedId, setSelectedId] = useState() + // 导出的加载效果 + const [showLoading, setShowLoading] = useState(false) + // 是否显示打印的表格 + const [showExportTable, setShowExportTable] = useState(false) + // 查询的条件 + const [searchParams, setSearchParams] = useState() + // 当前选中行数据 + const [currentRow, setCurrentRow] = useState() + // 弹出框的确认效果 + const [confirmLoading, setConfirmLoading] = useState(false) + // 图片列表 + const [fileList, setFileList] = useState() + + const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 + + const { loading: serverpartloading, data: myServerpartList = [] } = useRequest(async () => { + const list = await getFieldEnumTree({ FieldExplainField: 'business_target' }) + let lostList: any = [] + if (list && list.length > 0) { + list.forEach((item: any) => { + if (item.value === 6000) { + lostList = item.children + } + }) + } + setLostTypeList(lostList) + let obj: any = {} + if (lostList && lostList.length > 0) { + lostList.forEach((item: any) => { + item.disabled = true + if (item.children && item.children.length > 0) { + item.children.forEach((subItem: any) => { + obj[subItem.value] = subItem.label + }) + } + }) + } + setLostTypeObj(obj) + return lostList + }) + + 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], + }; + }, + }, + }, + // { + // title: '失物类型', + // width: 150, + // dataIndex: 'ENUM_LABEL', + // valueType: 'treeSelect', + // request: async () => { + // return myServerpartList + // }, + // // valueEnum: lostTypeList, + // fieldProps: { + // showSearch: true, + // allowClear: true, + // treeDefaultExpandAll: true, + // filterTreeNode: (inputValue: any, treeNode: any) => { + // // 通过 label 搜索 + // return treeNode.label.toLowerCase().includes(inputValue.toLowerCase()); + // }, + // }, + // render: (_, record) => { + // return record?.ENUM_LABEL && lostTypeObj ? lostTypeObj[record?.ENUM_LABEL] : '-' + // } + // }, + { + title: '服务区名称', + width: 150, + dataIndex: 'SERVERPART_NAME', + align: 'center', + ellipsis: true, + hideInSearch: true, + }, + { + title: '物品名称', + width: 150, + dataIndex: 'SUGGESTION_TITLE', + align: 'center', + ellipsis: true, + hideInSearch: true, + render: (_, record) => { + return record?.SUGGESTION_TITLE ? { + setCurrentRow(record) + setShowAddModal(true) + }}>{record?.SUGGESTION_TITLE || "-"} : "-" + } + }, + { + title: '申请状态', + width: 150, + dataIndex: 'SUGGESTION_STATE', + align: 'center', + valueType: 'select', + valueEnum: { + "2": "审核中", + "9": "已驳回" + }, + ellipsis: true, + hideInSearch: true, + }, + { + title: '发现时间', + width: 150, + dataIndex: 'SUGGESTION_CREATEDATE', + align: 'center', + ellipsis: true, + hideInSearch: true, + render: (_, record) => { + return record?.SUGGESTION_CREATEDATE ? moment(record?.SUGGESTION_CREATEDATE).format('YYYY-MM-DD HH:mm') : '' + } + }, + { + title: '联系电话', + width: 150, + dataIndex: 'PHONE_NUMBER', + align: 'center', + ellipsis: true, + hideInSearch: true, + }, + // { + // title: '操作', + // dataIndex: "options", + // hideInSearch: true, + // width: 120, + // align: 'center', + // ellipsis: true, + // render: (_, record) => { + // return
+ // { + // setCurrentRow(record) + // setShowAddModal(true) + // }}> + // 编辑 + // + // { + // handleDeleteThing(record?.SUGGESTION_ID) + // }} + // > + // 删除 + // + + //
+ // } + // } + ] + + + // 悬浮框的关闭事件 + const handleModalClose = () => { + setConfirmLoading(false) + setCurrentRow(undefined) + setFileList([]) + setShowAddModal(false) + } + + // 新增 + const handleAddLostThing = async (obj: any) => { + let serverpartObj: any = session.get('serverpartObj') + let req: any = {} + if (currentRow?.SUGGESTION_ID) { + req = { + ...currentRow, + ...obj, + SUGGESTION_ID: currentRow?.SUGGESTION_ID, + SUGGESTION_STATE: 2, + OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + SUGGESTION_CREATEDATE: obj?.SUGGESTION_CREATEDATE ? moment(obj?.SUGGESTION_CREATEDATE).format('YYYY-MM-DD HH:mm:ss') : '', + SERVERPART_NAME: obj.SERVERPART_ID ? serverpartObj[obj.SERVERPART_ID] : '' + } + } else { + req = { + ...obj, + OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + PROVINCE_CODE: currentUser?.ProvinceCode, + SUGGESTION_CREATEDATE: obj?.SUGGESTION_CREATEDATE ? moment(obj?.SUGGESTION_CREATEDATE).format('YYYY-MM-DD HH:mm:ss') : '', + SUGGESTION_STATE: 2, + SUGGESTION_TYPE: 4000, + SERVERPART_NAME: obj.SERVERPART_ID ? serverpartObj[obj.SERVERPART_ID] : '' + } + } + + console.log('req', req); + const data = await handeSynchroSUGGESTION(req) + if (data.Result_Code === 100) { + console.log('datadatadatadata', data); + message.success(data.Result_Desc) + if (obj.SCENICAREA_Image && obj.SCENICAREA_Image.length > 0) { + handleSaveImg(obj.SCENICAREA_Image, data.Result_Data) + } + handleModalClose() + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + setConfirmLoading(false) + } + } + + // 保存图片 + const handleSaveImg = async (imgList: any, objData: any) => { + // objData 保存之后的数据 + const formData = new FormData(); + imgList.forEach((file: any) => { + formData.append('files[]', file.originFileObj); + formData.append('ImageName', typeof file !== 'string' ? file?.name : ''); + }); + formData.append('TableId', objData.SUGGESTION_ID); + // formData.append('TableId', shopData.COMMODITY_ID); + formData.append('TableType', "1306"); + + console.log('formData', formData); + let res = await uploadPicture(formData) + } + + // 删除 + const handleDeleteThing = async (id: any) => { + const data = await handeDeleteSUGGESTION({ SUGGESTIONId: id }) + if (data.Result_Code === 100) { + message.success(data.Result_Desc) + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + } + + // 预览上传后的图片 + const handlePreview = async () => { + setFileList(fileList) + setImagePreviewVisible(true) + }; + const handleChangePreview = (val: any) => { + setImagePreviewVisible(val) + } return ( -
+
{ + // 打印报表 + if (!reqDetailList || reqDetailList.length === 0) return; + setPrintOut(el); + }} > +
+ { + showExportTable && reqDetailList && reqDetailList.length > 0 ? + : '' + } +
+
+ +
+ +
+ } + search={{ span: 6 }} + request={async (params) => { + if (!selectedId) { + return + } + const req: any = { + SearchParameter: { + SUGGESTION_TYPES: 4000, + SERVERPART_IDS: selectedId, + SUGGESTION_STATES: "2,9", + ENUM_LABEL: params?.ENUM_LABEL || '' + }, + PageIndex: 1, + PageSize: 999999, + } + setSearchParams(params) + + const data = await handeGetSUGGESTIONList(req) + if (data && data.length > 0) { + return { data, success: true } + } + return { data: [], success: true } + }} + toolbar={{ + actions: [ + + ] + }} + /> +
+
+ + {/* 图片预览组件 */} + {fileList && fileList.length > 0 &&
+ { + handleChangePreview(vis) + } + }}> + { + fileList.map((n) => ) + } + +
} + + { + handleModalClose() + }} + okText={"发起申请"} + onOk={async () => { // 提交框内的数据 + modalRef.current?.validateFields().then(async (res: any) => { + setConfirmLoading(true) + await handleAddLostThing(res) + setConfirmLoading(false) + }) + }} + > + { + if (currentRow?.SUGGESTION_ID) { + let imgList: any = [] + if (currentRow?.ImageList && currentRow?.ImageList.length > 0) { + currentRow?.ImageList.forEach((item: any) => { + imgList.push({ + label: item.ImageName, + url: item.ImageUrl + }) + }) + } + setFileList(imgList) + return { ...currentRow, SCENICAREA_Image: imgList } + } + return {} + }} + labelCol={{ style: { width: 80 } }} + > + + + { + let serverpartList = session.get('serverpartList') + let list: any = [] + if (serverpartList && serverpartList.length > 0) { + serverpartList.forEach((item: any) => { + if (item.value !== 586 && item.value !== 650 && item.value !== 680 && item.value !== 897 && item.value !== 841) { + list.push(item) + } + }) + } + return list + }} + fieldProps={{ + showSearch: true, // 启用搜索框 + filterOption: (inputValue: any, option: any) => { + // 通过 label 搜索 + return option.label.toLowerCase().includes(inputValue.toLowerCase()); + } + }} + /> + + {/* + { + // 通过label进行模糊匹配 + return treeNode.label.toLowerCase().includes(inputValue.toLowerCase()); + }, + options: lostTypeList // 传入树形节点数据 + }} + /> + */} + + + + + + + + + + + + + + + { + console.log('info', info); + console.log('fileList', fileList); + if (info.file.status === 'removed') { + const index = fileList.findIndex(n => n.uid === info.file.uid); + confirm({ + title: '确认删除该文件吗?', + icon: , + async onOk() { + if (info.file.ImageId) { + const deleteLoading = message.loading('正在删除...') + const success = await deletePicture(info.file?.ImagePath, info.file?.uid, '') + deleteLoading() + + if (success) { + const files = [...fileList] + files.splice(index, 1) + setFileList(files) + message.success("删除成功") + } + else { + message.error("删除失败") + } + } else { + const files = [...fileList]; + files.splice(index, 1); + setFileList(files); + } + }, + onCancel() { + }, + }); + } else { + setFileList(info.fileList) + } + // else { + // setFileList(info.fileList) + // } + } + }} + /> + + + + + +
) } diff --git a/src/pages/travelMember/LostandFoundReview/index.tsx b/src/pages/travelMember/LostandFoundReview/index.tsx index a34a8b5..3572e4d 100644 --- a/src/pages/travelMember/LostandFoundReview/index.tsx +++ b/src/pages/travelMember/LostandFoundReview/index.tsx @@ -1,12 +1,399 @@ // 失物招领审核 +import PageTitleBox from "@/components/PageTitleBox"; import { ConnectState } from "@/models/connect"; +import ProTable, { ActionType } from "@ant-design/pro-table"; +import { Button, Col, FormInstance, Image, message, Modal, Popconfirm, Row } from "antd"; +import { useRef, useState } from "react"; import { connect, CurrentUser } from "umi"; +import { handeGetSUGGESTIONList, handeSynchroSUGGESTION } from "../service"; +import moment from 'moment' +import ProForm, { ProFormDatePicker, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form"; +import session from "@/utils/session"; +import { ExclamationCircleOutlined } from "@ant-design/icons"; +import { deletePicture } from "@/services/picture"; + +const beforeUpload = (file: any) => { + const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; + if (!isJpgOrPng) { + message.error('请上传JPEG、jpg、png格式的图片文件!'); + } + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + message.error('图片大小不超过 5MB!'); + } + return isJpgOrPng && isLt2M; +} const LostandFoundReview: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const { confirm } = Modal; + const actionRef = useRef(); + const formRef = useRef(); + const modalRef = useRef(); + // 当前选中行数据 + const [currentRow, setCurrentRow] = useState() + // 显示新增窗口 + const [showAddModal, setShowAddModal] = useState(false) + // 图片列表 + const [fileList, setFileList] = useState() + const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 + // 弹出框的确认效果 + const [confirmLoading, setConfirmLoading] = useState(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], + }; + }, + }, + }, + { + title: '服务区名称', + width: 150, + dataIndex: 'SERVERPART_NAME', + align: 'center', + ellipsis: true, + hideInSearch: true, + }, + { + title: '物品名称', + width: 150, + dataIndex: 'SUGGESTION_TITLE', + align: 'center', + ellipsis: true, + hideInSearch: true, + render: (_, record) => { + return record?.SUGGESTION_TITLE ? { + setCurrentRow(record) + setShowAddModal(true) + }}>{record?.SUGGESTION_TITLE || "-"} : "-" + } + }, + { + title: '发现时间', + width: 150, + dataIndex: 'SUGGESTION_CREATEDATE', + align: 'center', + ellipsis: true, + hideInSearch: true, + render: (_, record) => { + return record?.SUGGESTION_CREATEDATE ? moment(record?.SUGGESTION_CREATEDATE).format('YYYY-MM-DD HH:mm') : '' + } + }, + { + title: '联系电话', + width: 150, + dataIndex: 'PHONE_NUMBER', + align: 'center', + ellipsis: true, + hideInSearch: true, + }, + ] + + const handleChangePreview = (val: any) => { + setImagePreviewVisible(val) + } + + // 悬浮框的关闭事件 + const handleModalClose = () => { + setConfirmLoading(false) + setCurrentRow(undefined) + setFileList([]) + setShowAddModal(false) + } + + + // 新增 + const handleAddLostThing = async (type: number) => { + // type 1 审核通过 2 驳回 + let req: any = {} + req = { + ...currentRow, + SUGGESTION_STATE: type === 1 ? 1 : 9, + } + + console.log('req', req); + const data = await handeSynchroSUGGESTION(req) + if (data.Result_Code === 100) { + message.success('审核通过!') + handleModalClose() + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + setConfirmLoading(false) + } + + } + // 预览上传后的图片 + const handlePreview = async () => { + setFileList(fileList) + setImagePreviewVisible(true) + }; + + return (
+ } // 列表表头 + search={{ span: 6 }} + request={async (params) => { + const req: any = { + SearchParameter: { + SUGGESTION_TYPES: 4000, + SUGGESTION_STATES: 2, + ENUM_LABEL: params?.ENUM_LABEL || '' + }, + PageIndex: 1, + PageSize: 999999, + } -
+ const data = await handeGetSUGGESTIONList(req) + console.log('1111', data); + if (data && data.length > 0) { + return { data, success: true } + } + return { data: [], success: true } + }} + /> + + + {/* 图片预览组件 */} + {fileList && fileList.length > 0 &&
+ { + handleChangePreview(vis) + } + }}> + { + fileList.map((n) => ) + } + +
} + + { + handleModalClose() + }} + footer={ +
+
+
+ { + handleAddLostThing(2) + }} + > + + + + { + handleAddLostThing(1) + }} + > + + +
+
+ } + okText={"审核通过"} + onOk={async () => { // 提交框内的数据 + modalRef.current?.validateFields().then(async (res: any) => { + setConfirmLoading(true) + await handleAddLostThing(res) + setConfirmLoading(false) + }) + }} + > + { + if (currentRow?.SUGGESTION_ID) { + let imgList: any = [] + if (currentRow?.ImageList && currentRow?.ImageList.length > 0) { + currentRow?.ImageList.forEach((item: any) => { + imgList.push({ + label: item.ImageName, + url: item.ImageUrl + }) + }) + } + setFileList(imgList) + return { ...currentRow, SCENICAREA_Image: imgList } + } + return {} + }} + labelCol={{ style: { width: 80 } }} + > + + + { + let serverpartList = session.get('serverpartList') + let list: any = [] + if (serverpartList && serverpartList.length > 0) { + serverpartList.forEach((item: any) => { + if (item.value !== 586 && item.value !== 650 && item.value !== 680 && item.value !== 897 && item.value !== 841) { + list.push(item) + } + }) + } + return list + }} + fieldProps={{ + showSearch: true, // 启用搜索框 + filterOption: (inputValue: any, option: any) => { + // 通过 label 搜索 + return option.label.toLowerCase().includes(inputValue.toLowerCase()); + } + }} + readonly + /> + + + + + + + + + + + + + + + + { + console.log('info', info); + console.log('fileList', fileList); + if (info.file.status === 'removed') { + const index = fileList.findIndex(n => n.uid === info.file.uid); + confirm({ + title: '确认删除该文件吗?', + icon: , + async onOk() { + if (info.file.ImageId) { + const deleteLoading = message.loading('正在删除...') + const success = await deletePicture(info.file?.ImagePath, info.file?.uid, '') + deleteLoading() + + if (success) { + const files = [...fileList] + files.splice(index, 1) + setFileList(files) + message.success("删除成功") + } + else { + message.error("删除失败") + } + } else { + const files = [...fileList]; + files.splice(index, 1); + setFileList(files); + } + }, + onCancel() { + }, + }); + } else { + setFileList(info.fileList) + } + // else { + // setFileList(info.fileList) + // } + } + }} + /> + + + + + +
+ +
) } diff --git a/src/pages/travelMember/MerchantSalesRanking/index.tsx b/src/pages/travelMember/MerchantSalesRanking/index.tsx index cb1229e..dcf6d5f 100644 --- a/src/pages/travelMember/MerchantSalesRanking/index.tsx +++ b/src/pages/travelMember/MerchantSalesRanking/index.tsx @@ -222,7 +222,9 @@ const MerchantSalesRanking: React.FC<{ currentUser: CurrentUser | undefined }> = }} closable={false} destroyOnClose + bodyStyle={{ padding: 32 }} > +
diff --git a/src/pages/travelMember/RegistrationStatistics/RegistrationStatistics.less b/src/pages/travelMember/RegistrationStatistics/RegistrationStatistics.less new file mode 100644 index 0000000..1c0e8de --- /dev/null +++ b/src/pages/travelMember/RegistrationStatistics/RegistrationStatistics.less @@ -0,0 +1,443 @@ +.ActiveMemberStatisticsMain { + width: 100%; + height: calc(100vh - 150px); + background: #FFFFFF; + position: relative; + + .ActiveMemberStatisticsTop { + 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; + + .ActiveMemberStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + // justify-content: space-between; + + + .ActiveMemberStatisticsTitle { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 18px; + color: #757575; + line-height: 18px; + text-align: left; + font-style: normal; + margin-left: 12px; + position: relative; + cursor: pointer; + } + + .ActiveMemberStatisticsTitleSelect { + 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; + } + + .ActiveMemberStatisticsTitleSelect::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + .ActiveMemberStatisticsContentBox { + width: 100%; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: space-between; + + // .ActiveMemberStatisticsItemFirst { + // 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; + // } + // } + + .ActiveMemberStatisticsItemOther { + width: 100%; + height: 180px; + display: flex; + align-items: center; + justify-content: space-between; + + .ActiveMemberStatisticsOtherItem { + width: calc((100% - 112px) / 7); + height: 100%; + background: #F6F9FF; + border-radius: 8px; + box-sizing: border-box; + padding: 20px 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: 4px; + 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%; + // } + } + + .ActiveMemberStatisticsOtherItemSelect { + 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; + } + } + } + } + } + } + + + .ActiveMemberStatisticsBottom { + 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; + + .ActiveMemberStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .ActiveMemberStatisticsTitle { + 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; + } + + .ActiveMemberStatisticsTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + + + .ActiveMemberStatisticsContentBox { + width: 100%; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: space-between; + + .ActiveMemberStatisticsItemOther { + width: 100%; + height: 180px; + display: flex; + flex-wrap: wrap; + align-items: center; + // justify-content: space-between; + + .ActiveMemberStatisticsOtherItem { + width: calc((100% - 112px) / 7); + height: 100%; + background: #F6F9FF; + border-radius: 8px; + box-sizing: border-box; + padding: 29px 24px; + position: relative; + cursor: pointer; + margin-right: 16px; + + .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; + + .otherItemValueUnit { + 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; + } + } + + .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%; + // } + } + + .ActiveMemberStatisticsOtherItemSelect { + 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; + + .otherItemValueUnit { + + font-family: DINAlternate, DINAlternate; + font-weight: bold; + font-size: 14px; + color: #fff; + line-height: 20px; + 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; + } + } + } + } + } + + } +} \ No newline at end of file diff --git a/src/pages/travelMember/RegistrationStatistics/index.tsx b/src/pages/travelMember/RegistrationStatistics/index.tsx new file mode 100644 index 0000000..2f87ae2 --- /dev/null +++ b/src/pages/travelMember/RegistrationStatistics/index.tsx @@ -0,0 +1,278 @@ +// 活跃会员统计 +import { connect, CurrentUser } from "umi"; +import { ConnectState } from "@/models/connect"; +import { useEffect, useRef, useState } from "react"; +import { Button, Col, Drawer, FormInstance, Row, Spin } from "antd"; +import ProForm, { ProFormDateRangePicker, ProFormSelect } from "@ant-design/pro-form"; +import './RegistrationStatistics.less' +import { handeGetMembershipCount } from "../service"; +import session from "@/utils/session"; +import ProTable, { ActionType } from "@ant-design/pro-table"; +import MemberInfor from "../memberInfor"; +import moment from 'moment' + +const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const formRef = useRef(); + const actionRef = useRef(); + + // 选择的tab + const [selectPageTab, setSelectPageTab] = useState(1) + // 会员类型数据 + const [membershipType, setMembershipType] = useState() + // 会员数量 + const [memberShipTotal, setMemberShipTotal] = useState(1) + // 会员等级数据 + const [revenueList, setRevenueList] = useState() + // 显示详情抽屉 + const [showDetail, setShowDetail] = useState(false) + const [currentRow, setCurrentRow] = useState() + // 抽屉显示的标题 + const [currentDrawerTitle, setCurrentDrawerTitle] = useState() + // 1 是 会员类型 2是 会员等级 + const [searchType, setSearchType] = useState() + // 对应的枚举类型 + const [valueType, setValueType] = useState() + // 显示加载效果 + const [showLoading, setShowLoading] = useState(false) + + let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') + let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') + let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList') + + + const handleGetData = async (formData?: any) => { + console.log('formDataformDataformData', formData); + let [start, end] = ['', ''] + if (formData && formData?.searchTime) { + [start, end] = formData.searchTime + } else { + [start, end] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')] + } + + const req: any = { + CalcType: 5, // 注册途径 + OwnerUnitId: currentUser?.OwnerUnitId, + ExcludeTest: formData ? formData?.ExcludeTest === 1 ? true : false : true, + StartDate: start ? start : "", + EndDate: end ? end : "", + MembershipType: formData?.MembershipType === 1 ? "" : formData?.MembershipType || "", + // MembershipLevel: formData?.MembershipLevel || "", + MembershipLevel: "", + } + + console.log('reqreqreq', req); + + + setShowLoading(true) + const data = await handeGetMembershipCount(req) + setShowLoading(false) + console.log('datadatadatadata', data); + + setMembershipType(data.List) + setMemberShipTotal(data.OtherData) + } + + // 点击事件 + const handleShowTableData = async (type: number, memberType: any) => { + // type 1 的话是 会员类型 2 的话是 会员等级 memberType 对应的枚举值 + setCurrentDrawerTitle(`${type === 1 ? '会员类型' : type === 2 ? '会员等级' : ''}【${type === 1 ? MEMBERSHIPTYPEYNObj && memberType ? MEMBERSHIPTYPEYNObj[memberType] : '' : type === 2 ? MEMBERSHIPLEVELYNObj && memberType ? MEMBERSHIPLEVELYNObj[memberType] : '' : ''}】`) + setSearchType(type) + setValueType(memberType) + setShowDetail(true) + } + + useEffect(() => { + handleGetData() + }, []) + + return ( +
+ { + showLoading ? +
+
+ + 加载中... +
+
: '' + } + +
+ {/*
+
{ + setSelectPageTab(1) + }}>会员类型
+
{ + setSelectPageTab(2) + }}>会员等级
+
*/} + { + console.log('valuesvaluesvaluesvalues', values); + handleGetData(values) + }} + > + + + + + + + + + {/* + + */} + + + + + + {/* */} + +
+ + +
+ +
+
+
+ + +
+ { + membershipType && membershipType.length > 0 ? + <> +
+
拉新活动
+
+ +
+
+ { + membershipType.map((item: any) => { + return
+
{item.label || ''}
+
{item.value}
+
占比
+
+ {item.key ? item.key + '%' : ""} +
+
+ }) + } + +
+
+ + : "" + } + +
+ +
+ { + revenueList && revenueList.length > 0 ? + <> +
+
营销活动
+
+ +
+
+ { + revenueList.map((item: any) => { + return
+
{item.label}
+
{item.value}
+
占比
+
+ {item.key ? item.key + '%' : ""} +
+
+ }) + } + +
+
+ + : "" + } + +
+ { + setSearchType(null) + setValueType(null) + setShowDetail(false) + }} + > + + +
+ ) +} + +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(RegistrationStatistics); \ No newline at end of file diff --git a/src/pages/travelMember/SummaryofMerchantReviews/SummaryofMerchantReviews.less b/src/pages/travelMember/SummaryofMerchantReviews/SummaryofMerchantReviews.less new file mode 100644 index 0000000..88e65de --- /dev/null +++ b/src/pages/travelMember/SummaryofMerchantReviews/SummaryofMerchantReviews.less @@ -0,0 +1,10 @@ +.proformList { + .ant-form-item-control-input-content>div:first-of-type { + width: 100% !important; + max-width: none !important; + + .ant-pro-form-list-item { + display: block !important; + } + } +} \ No newline at end of file diff --git a/src/pages/travelMember/SummaryofMerchantReviews/index.tsx b/src/pages/travelMember/SummaryofMerchantReviews/index.tsx index da5503e..accd9c8 100644 --- a/src/pages/travelMember/SummaryofMerchantReviews/index.tsx +++ b/src/pages/travelMember/SummaryofMerchantReviews/index.tsx @@ -1,17 +1,585 @@ // 商户评价汇总 -import { ConnectState } from "@/models/connect"; -import { connect, CurrentUser } from "umi"; +import { connect } from "umi"; +import type { CurrentUser } from "umi"; +import type { ConnectState } from "@/models/connect"; +import React, { useRef, useState } from "react"; +import type { FormInstance } from "antd"; +import { Button, Col, message, Modal, Row, Space, Spin, Tree, Image } from "antd"; +import useRequest from "@ahooksjs/use-request"; +import type { ActionType } from "@ant-design/pro-table"; +import ProTable from "@ant-design/pro-table"; +import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree"; +import PageTitleBox from "@/components/PageTitleBox"; +import { handeDeleteCOMMENT, handeDeleteREPLY, handeGetCOMMENTDetail, handeGetCOMMENTList, handeGetREPLYDetail, handeSynchroCOMMENT, handeSynchroREPLY, handeSynchroReplyList } from "../service"; +import moment from 'moment' +import session from "@/utils/session"; +import { handleSetlogSave } from "@/utils/format"; +import Draggable from "react-draggable"; +import ProForm, { ProFormList, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form"; +import { getBase64 } from "@/utils/utils"; +import './SummaryofMerchantReviews.less' -const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { - const { currentUser } = props + + +const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentDetail?: any, come?: string }> = (props) => { + const draggleRef = React.createRef() + // come 来自哪里 + const { currentUser, isComponent, parentDetail, come } = props + const actionRef = useRef(); + const formRef = useRef(); + const modalFormRef = useRef(); + const [collapsible, setCollapsible] = useState(false) + // 弹出框拖动效果 + const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 + const [disabled, setDraggleDisabled] = useState() // 是否拖动 + // 显示回复抽屉 + const [showDetailDrawer, setShowDetailDrawer] = useState(false) + // 点击的当前数据 + const [currentRow, setCurrentRow] = useState() + // 评论的附件 + const [fileList, setFileList] = useState() + const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 + const [priviewImage, setPriviewImage] = useState(); // 预览的图片地址 + // 删除回复的加载效果 + const [deleteREPLYLoading, setDeleteREPLYLoading] = useState(false) + + + const MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') + // 树相关的属性和方法 + const [selectedId, setSelectedId] = useState() + + 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), + }); + }; + + + const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProps: { + placeholder: "请输入评价人员/商家名称/评价内容" + } + }, + { + title: '评价时间', + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value) => { + return { + CREATE_DATE_Start: value[0], + CREATE_DATE_End: value[1], + }; + }, + }, + fieldProps: { + ranges: { + "本月": [moment().startOf('M'), moment()], + "上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')], + "近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')], + "近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')], + } + }, + // initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + initialValue: [moment().startOf('M'), moment()], + }, + { + title: "序号", + dataIndex: "index", + valueType: "index", + hideInSearch: true, + align: "center", + width: 60, + }, + { + title: "商家名称", + dataIndex: "SELLER_NAME", + width: 270, + hideInSearch: true, + ellipsis: true, + align: "center", + }, + { + title: "评价时间", + dataIndex: "CREATE_DATE", + width: 170, + hideInSearch: true, + ellipsis: true, + align: "center", + sorter: (a, b) => new Date(a.CREATE_DATE).getTime() - new Date(b.CREATE_DATE).getTime(), + defaultSortOrder: 'descend', + render: (_, record) => { + return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" + } + }, + { + title: "评价人员", + dataIndex: "MEMBERSHIP_NAME", + width: 150, + hideInSearch: true, + ellipsis: true, + align: "center", + }, + { + title: "会员类型", + dataIndex: "MEMBERSHIP_TYPE", + width: 150, + hideInSearch: true, + ellipsis: true, + align: "center", + valueType: "select", + valueEnum: MEMBERSHIPTYPEYNObj + }, + { + title: "消费评价", + dataIndex: "SALEBILL_ID", + width: 120, + hideInSearch: true, + ellipsis: true, + align: "center", + render: (_, record) => { + return record?.SALEBILL_ID ? '是' : '否' + } + }, + { + title: "评分", + dataIndex: "COMMENT_SCORE", + width: 120, + hideInSearch: true, + ellipsis: true, + align: "center", + sorter: (a, b) => a.COMMENT_SCORE - b.COMMENT_SCORE, + }, + { + title: "评价内容", + dataIndex: "COMMENT_CONTENT", + width: 250, + hideInSearch: true, + ellipsis: true, + align: "center", + render: (_, record) => { + return record?.COMMENT_CONTENT ? { + console.log('recordrecord', record); + + if (record?.ImageList && record?.ImageList.length > 0) { + let list: any = [] + record?.ImageList.forEach((item: any) => { + list.push({ + name: "", + url: item?.ImageUrl + }) + }) + setFileList(list) + } + + setCurrentRow({ + ...record, + ReplyList: record?.ReplyList || [] + }) + setShowDetailDrawer(true) + }}>{record?.COMMENT_CONTENT} : "-" + } + }, + // { + // title: "回复内容", + // dataIndex: "回复内容", + // width: 250, + // hideInSearch: true, + // ellipsis: true, + // align: "center", + // }, + ] + + // 删除评论 + const handleDeleteEvaluation = async () => { + const req: any = { + COMMENTId: currentRow?.COMMENT_ID + } + const data = await handeDeleteCOMMENT(req) + if (data.Result_Code === 100) { + message.success(data.Result_Desc) + setShowDetailDrawer(false) + setCurrentRow(undefined); + setFileList([]) + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + } + + + // 删除回复 + const handleDeleteEvaluationREPLY = async (REPLY_ID: string) => { + const req: any = { + REPLYId: REPLY_ID + } + setDeleteREPLYLoading(true) + const data = await handeDeleteREPLY(req) + setDeleteREPLYLoading(false) + if (data.Result_Code === 100) { + message.success(data.Result_Desc) + actionRef?.current?.reload() + return true + } else { + message.error(data.Result_Desc) + return false + } + } + + + // 预览上传后的图片 + const handlePreview = async () => { + setFileList(fileList) + setImagePreviewVisible(true) + }; + const handleChangePreview = (val: any) => { + setImagePreviewVisible(val) + } return (
+
+ { + isComponent ? '' : + + + } +
+ } // 列表表头 + search={isComponent ? false : { span: 8 }} + request={async (params) => { + if (!selectedId && !isComponent) { + return + } + console.log('parentDetailparentDetailparentDetail', parentDetail); + + const req: any = isComponent ? come === 'MerchantSalesRanking' ? { + SearchParameter: { + OWNERUNIT_ID: currentUser?.OwnerUnitId, + SERVERPART_IDS: parentDetail?.SERVERPART_ID || "", + COMMENT_ISVALID: 1, + // MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID, + MERCHANTS_ID: parentDetail?.SELLER_ID + }, + PageIndex: 1, + PageSize: 999999, + keyWord: { + Key: "SELLER_NAME,MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + SortStr: "CREATE_DATE desc" + } : { + SearchParameter: { + OWNERUNIT_ID: currentUser?.OwnerUnitId, + // PROVINCE_CODE: currentUser?.ProvinceCode, + COMMENT_ISVALID: 1, + CREATE_DATE_Start: params?.CREATE_DATE_Start || "", + CREATE_DATE_End: params?.CREATE_DATE_End || "", + MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID, + }, + PageIndex: 1, + PageSize: 999999, + keyWord: { + Key: "SELLER_NAME,MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + SortStr: "CREATE_DATE desc" + } : { + SearchParameter: { + OWNERUNIT_ID: currentUser?.OwnerUnitId, + // PROVINCE_CODE: currentUser?.ProvinceCode, + COMMENT_ISVALID: 1, + CREATE_DATE_Start: params?.CREATE_DATE_Start || "", + CREATE_DATE_End: params?.CREATE_DATE_End || "", + }, + PageIndex: 1, + PageSize: 999999, + keyWord: { + Key: "SELLER_NAME,MEMBERSHIP_NAME,COMMENT_CONTENT", + Value: params?.searchText || "" + }, + SortStr: "CREATE_DATE desc" + } + const data = await handeGetCOMMENTList(req) + console.log('datadatadatadatadata222', data); + + handleSetlogSave(`点击查询按钮`) + + if (data.List && data.List.length > 0) { + return { data: data.List, success: true, total: data.TotalCount } + } + return { data: [], success: true } + }} + toolbar={{ + actions: [ + ] + }} + /> +
+
+ {/* 图片预览组件 */} + {fileList && fileList.length > 0 &&
+ { + handleChangePreview(vis) + } + }}> + { + fileList.map((n) => ) + } + +
} + + 评价回复 +
+ } + destroyOnClose={true} + width={900} + visible={showDetailDrawer} + afterClose={() => { + }} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} + onCancel={() => { + setShowDetailDrawer(false) + setCurrentRow(undefined); + setFileList([]) + }} + footer={false} + modalRender={(modal) => { + return onDraggaleStart(event, uiData)} + handle=".SummaryofMerchantReviews" + > +
{modal}
+
+ }} + > + + { + if (res.ReplyList && res.ReplyList.length > 0) { + let list: any = [] + res.ReplyList.forEach((item: any) => { + if (!item.REPLY_ID) { + list.push({ + COMMENT_ID: currentRow?.COMMENT_ID || "", + COMMENT_CONTENT: currentRow?.COMMENT_CONTENT || "", + // COMMENT_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + STAFF_ID: currentUser?.ID, + STAFF_NAME: currentUser?.Name, + REPLY_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + REPLY_CONTENT: item.REPLY_CONTENT, + REPLY_STATE: 1 + }) + } + }) + console.log('list', list); + + const data = await handeSynchroReplyList({ + list: list + }) + console.log('datadatadatadata', data); + if (data.Result_Code === 100) { + message.success(data.Result_Desc) + setFileList([]) + setShowDetailDrawer(false) + setCurrentRow(undefined); + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + } else { + setFileList([]) + setShowDetailDrawer(false) + setCurrentRow(undefined); + actionRef.current?.reload() + } + }} + // request={async () => { + // if (currentRow?.ReplyList && currentRow?.ReplyList.length > 0) { + // const req: any = { + // REPLYId: currentRow?.ReplyList[0].REPLY_ID + // } + // const data = await handeGetREPLYDetail(req) + // console.log('datadatadata', data); + // return { + // ...data, + // ReplyToEvaluation: data.REPLY_CONTENT + // } + // } else { + // return {} + // } + + // }} + > + + + + + + + + - + + + {(field, index, action) => { + const isInitialItem = index < (currentRow?.ReplyList?.length || 0); + return ( +
+
+ +
+
+ {/* {isInitialItem ? ( + + ) : ( + + )} */} +
+
+ ); + }} +
+ + + {/* + 0 ? true : false} + /> + */} +
+ +
+ + + ) } diff --git a/src/pages/travelMember/service.ts b/src/pages/travelMember/service.ts index 8bbf457..d963286 100644 --- a/src/pages/travelMember/service.ts +++ b/src/pages/travelMember/service.ts @@ -1169,3 +1169,54 @@ export async function handeGetDeleteCOMMODITYWARNING(params: any) { } return data } + + +// 统计商品销售汇总情况 热销滞销分析 +export async function handeGetCommoditySaleSummary(params: any) { + const data = await requestEncryption(`/MallBasic/GetCommoditySaleSummary`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data.Result_Data +} + + +// 查看投诉建议 失物招领的列表 +export async function handeGetSUGGESTIONList(params: any) { + const data = await requestEncryption(`/WisdomServerpart/GetSUGGESTIONList`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data.Result_Data.List +} + + +// 删除失物招领 +export async function handeDeleteSUGGESTION(params: any) { + const data = await requestEncryption(`/WisdomServerpart/DeleteSUGGESTION`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data +} + +// 同步失物招领 +export async function handeSynchroSUGGESTION(params: any) { + const data = await requestEncryption(`/WisdomServerpart/SynchroSUGGESTION`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data +} \ No newline at end of file diff --git a/src/versionEnv.ts b/src/versionEnv.ts index bc28337..20c7dcb 100644 --- a/src/versionEnv.ts +++ b/src/versionEnv.ts @@ -1,4 +1,4 @@ // 由 scripts/writeVersion.js 自动生成 -export const VERSION = "4.5.11"; -export const GIT_HASH = "edeca34"; -export const BUILD_TIME = "2025-07-30T12:19:28.444Z"; +export const VERSION = "4.5.13"; +export const GIT_HASH = "524c0ab"; +export const BUILD_TIME = "2025-08-04T10:43:20.278Z";