Compare commits

...

2 Commits

Author SHA1 Message Date
ylj20011123
a14b50b7f6 update 2025-08-04 18:47:37 +08:00
ylj20011123
524c0abc26 update 2025-07-30 20:28:29 +08:00
54 changed files with 5884 additions and 237 deletions

View File

@ -464,6 +464,12 @@ export default [
name: 'ProductApprovalProcess',
component: './reports/productControl/ProductApprovalProcess',
},
// 便利店商品审核
{
path: 'ConvenienceStoreProductReview',
name: 'ConvenienceStoreProductReview',
component: './reports/productControl/ConvenienceStoreProductReview',
},
// 新增商品流程
{
path: 'NewProductApproval',
@ -1074,8 +1080,30 @@ export default [
name: 'ActiveMemberStatistics',
component: './travelMember/ActiveMemberStatistics/index'
},
// 消费类型配置
{
path: 'ConsumptionTypeConfig',
name: 'ConsumptionTypeConfig',
component: './travelMember/ConsumptionTypeConfig/index'
},
// 操作类型配置
{
path: 'OperationTypeConfig',
name: 'OperationTypeConfig',
component: './travelMember/OperationTypeConfig/index'
},
// 商品预警规则设置
{
path: 'ProductWarningRuleSetting',
name: 'ProductWarningRuleSetting',
component: './travelMember/ProductWarningRuleSetting/index'
},
// 注册途径统计
{
path: 'RegistrationStatistics',
name: 'RegistrationStatistics',
component: './travelMember/RegistrationStatistics/index'
},
]
},
{
@ -1321,7 +1349,7 @@ export default [
component: './merchantManagement/BusniessProInst/result',
},
{
path: 'busniessproinst/examineAndApprove/:id',
path: 'examineBusniessproinst/examineAndApprove/:id',
name: 'examineAndApprove',
component: './merchantManagement/BusniessProInst/examineAndApprove',
},

View File

@ -1,6 +1,6 @@
{
"name": "ant-design-pro",
"version": "4.5.10",
"version": "4.5.13",
"private": true,
"description": "An out-of-box UI solution for enterprise applications",
"scripts": {

View File

@ -7,6 +7,8 @@ import type { FormInstance } from "antd";
import type { ActionType } from "@ant-design/pro-table";
import ProTable from "@ant-design/pro-table";
import PageTitleBox from "@/components/PageTitleBox";
import { handeGetCouponStockList } from "@/pages/travelMember/service";
import moment from 'moment'
const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => {
@ -32,71 +34,99 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) =>
const columns: any = [
{
title: "卡券类型",
dataIndex: "",
dataIndex: "COUPON_TYPE",
width: 120,
align: 'center',
hideInSearch: true,
ellipsis: true,
valueType: 'select',
valueEnum: {
"1000": "满减券",
"2000": "折扣券",
"3000": "抵扣券",
"4000": "兑换券",
}
},
{
title: '查询时间',
dataIndex: 'search_date',
valueType: 'dateRange',
hideInTable: true,
hideInDescriptions: true,
search: {
transform: (value) => {
return {
STARTDATE: value[0],
ENDDATE: value[1],
};
},
},
initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().add(-1, 'day').format('YYYY-MM-DD')],
},
{
title: "卡券名称",
dataIndex: "",
width: 250,
dataIndex: "COUPON_NAME",
align: 'center',
hideInSearch: true,
ellipsis: true,
},
{
title: "发放数量",
dataIndex: "",
dataIndex: "COUPON_QUOTA",
width: 120,
align: 'center',
sorter: (a, b) => a.COUPON_QUOTA - b.COUPON_QUOTA,
hideInSearch: true,
ellipsis: true,
},
{
title: "发放金额",
dataIndex: "",
dataIndex: "QUOTA_AMOUNT",
width: 120,
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.QUOTA_AMOUNT - b.QUOTA_AMOUNT,
},
{
title: "领取数量",
dataIndex: "",
dataIndex: "TAKE_COUNT",
width: 120,
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TAKE_COUNT - b.TAKE_COUNT,
},
{
title: "领取金额",
dataIndex: "",
dataIndex: "TAKE_AMOUNT",
width: 120,
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TAKE_AMOUNT - b.TAKE_AMOUNT,
},
{
title: "剩余数量",
dataIndex: "",
dataIndex: "LAST_COUNT",
width: 120,
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.LAST_COUNT - b.LAST_COUNT,
},
{
title: "活动开始时间",
dataIndex: "",
width: 120,
dataIndex: "START_TIME",
width: 180,
align: 'center',
hideInSearch: true,
ellipsis: true,
},
{
title: "活动结束时间",
dataIndex: "",
width: 120,
dataIndex: "END_TIME",
width: 180,
align: 'center',
hideInSearch: true,
ellipsis: true,
@ -129,11 +159,29 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) =>
expandable={{
expandRowByClick: true
}}
scroll={{ y: 'calc(100vh - 430px)' }}
// headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>单品销售排行统计</span>}
headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }}
request={async (params) => {
const req: any = {
SearchParameter: {
COUPON_TYPES: params?.COUPON_TYPE || "",
END_TIME_Start: params?.STARTDATE || "",// 开始时间
START_TIME_End: params?.ENDDATE || "",// 结束时间
COUPON_ISVALID: 1
},
PageIndex: 1,
PageSize: 999999,
}
setSearchParams(params)
const data = await handeGetCouponStockList(req)
console.log('datadatadatadatadata', data);
if (data.List && data.List.length > 0) {
return { data: data.List, success: true }
}
return { data: [], success: true }
}}
toolbar={{
actions: [

View File

@ -0,0 +1,240 @@
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 { handleGetCOOPSHOP_RULEList, handleGetCOUPONList } 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 selectCardVouch = ({ setSelectedId, reload, actionRef, currentUser, width, otherFun, setCollapsible, collapsible, haveTest, handleGetLeftTreeData, noWj, selectOnly }: DetailProps) => {
const searchTreeRef = useRef<FormInstance>();
// 默认的服务区树
const [allTreeViews, setAllTreeViews] = useState<any>()
// 是否要显示全部
const [isShowAllInTree, setIsShowAllInTree] = useState<boolean>(false)
// 加载服务区树
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
const req: any = {
SearchParameter: {
OWNERUNIT_ID: 911,
COUPON_TYPES: "",
COUPON_ISVALID: 1
},
PageIndex: 1,
PageSize: 999999
}
const data = await handleGetCOUPONList(req)
console.log('datadatadatadatadatadata', data);
setAllTreeViews(data)
setTreeView(data)
})
// 显示服务区树搜索框
const [showServiceSearchBox, setShowServiceSearchBox] = useState<boolean>(false)
// 实际显示在左侧的服务区树
const [treeView, setTreeView] = useState<any>()
// 树要展开的行
const [treeShowRow, setTreeShowRow] = useState<any>()
// 筛选左侧的服务区树
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 (
<div>
<ProCard
style={{ width: !collapsible ? width ? `${width}px` : "300px" : "60px" }}
className="pageTable-leftnav"
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? width ? `${width}px` : "300px" : "60px" }}
extra={<div className="leftSelectBox">
<img className="searchIcon" src={searchIcon} onClick={() => {
setShowServiceSearchBox(true)
}} />
<MenuFoldOutlined onClick={() => {
setCollapsible(!collapsible);
}} />
<div className="fixedBox" style={{ display: showServiceSearchBox ? 'flex' : 'none', width: width ? `${width}px` : '275px' }}>
<ProForm
formRef={searchTreeRef}
layout={'horizontal'}
submitter={{
render: () => {
return []
}
}}
isKeyPressSubmit
onFinish={(values: any) => {
return handleFilterServiceTree(values?.searchValue || '')
}}
>
<Row>
<Col span={15} className={'noBottom'}>
<ProFormText
name={'searchValue'}
fieldProps={{
placeholder: '请输入服务区名称'
}}
allowClear
/>
</Col>
<Col span={2}></Col>
<Col span={5}>
<Button type={'primary'} onClick={() => {
searchTreeRef.current?.submit()
}}></Button>
</Col>
</Row>
</ProForm>
<img style={{ width: '20px', height: '20px', cursor: 'pointer', marginLeft: '5px' }} src={close} onClick={() => {
setShowServiceSearchBox(false)
}} />
</div>
</div>}
colSpan={!collapsible ? "300px" : "60px"}
title={!collapsible ? "请选择服务区" : ""}
headerBordered
collapsed={collapsible}
>
{treeView && treeView.length > 0 ? <Tree
checkable
treeData={[{
COUPON_NAME: '全部',
COUPON_ID: 0,
key: '0-0',
children: treeView
}]}
blockNode
defaultExpandAll={isShowAllInTree ? false : true}
defaultExpandedKeys={isShowAllInTree ? treeShowRow && treeShowRow.length > 0 ? treeShowRow : ['0-0'] : []}
onCheck={(checkedKeys: React.Key[] | any, info) => {
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?.COUPON_ID > 0)
setSelectedId(selectedIds.map((n: any) => n?.COUPON_ID)?.toString() || '')
if (reload) {
actionRef?.current?.reload()
}
if (otherFun) {
otherFun(info)
}
}
}}
fieldNames={{
title: "COUPON_NAME",
key: "COUPON_ID"
}}
/> : ''}
</ProCard>
</div>
)
}
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser,
}))(selectCardVouch);

View File

@ -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;
}
}
}
}
}

View File

@ -1,11 +1,243 @@
// 卡券领取查询
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 { 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 SelectCardVouch from "./components/selectCardVouch";
import { handeGetCOUPON_SENDList } from "@/pages/travelMember/service";
import moment from 'moment'
const CardVoucherSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props
const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
const [collapsible, setCollapsible] = useState<boolean>(false)
const [treeView, setTreeView] = useState<any>()
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
// 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>()
// 导出的加载效果
const [showLoading, setShowLoading] = useState<boolean>(false)
// 是否显示打印的表格
const [showExportTable, setShowExportTable] = useState<boolean>(false)
// 查询的条件
const [searchParams, setSearchParams] = useState<any>()
const columns: any = [
{
title: "查询类型",
dataIndex: "searchType",
valueType: "select",
hideInTable: true,
valueEnum: {
"1": "领取时间",
"2": "核销时间"
},
initialValue: "1"
},
{
title: '查询时间',
dataIndex: 'search_date',
valueType: 'dateRange',
hideInTable: true,
hideInDescriptions: true,
search: {
transform: (value) => {
return {
STARTDATE: value[0],
ENDDATE: value[1],
};
},
},
initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().add(-1, 'day').format('YYYY-MM-DD')],
},
{
title: "优惠状态",
dataIndex: "COUPON_STATES",
hideInTable: true,
valueType: 'select',
valueEnum: {
"0": "未使用",
"1": "已使用",
"2": "失效",
}
},
{
title: "序号",
dataIndex: "index",
valueType: "index",
width: 70,
hideInSearch: true,
ellipsis: true,
align: "center",
},
{
title: "优惠券名称",
dataIndex: "COUPON_NAME",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
},
{
title: "优惠券编码",
dataIndex: "COUPON_CODE",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
},
{
title: "会员名称",
dataIndex: "MEMBERSHIP_NAME",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
},
{
title: "优惠券状态",
dataIndex: "COUPON_STATE",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
valueType: 'select',
valueEnum: {
"0": "未使用",
"1": "已使用",
"2": "已过期",
}
},
{
title: "领取时间",
dataIndex: "CREATE_DATE",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
render: (_, record) => {
return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
title: "核销时间",
dataIndex: "USED_DATE",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
render: (_, record) => {
return record?.USED_DATE ? moment(record?.USED_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
title: "适用门店",
dataIndex: "COOPSHOP_DESC",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
},
{
title: "消费金额",
dataIndex: "WITH_AMOUNT",
width: 150,
hideInSearch: true,
ellipsis: true,
align: "center",
},
]
const CardVoucherSearch: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
return (
<div>
<div ref={(el) => {
// 打印报表
if (!reqDetailList || reqDetailList.length === 0) return;
setPrintOut(el);
}} >
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
{/* <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> */}
<SelectCardVouch setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
<div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
}}>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
search={{ span: 6 }}
request={async (params) => {
console.log('selectedIdselectedIdselectedIdselectedId', selectedId);
if (!selectedId) {
return
}
const req: any = {
SearchParameter: {
COUPON_IDS: selectedId,
WECHATAPP_APPID: "wxee018fb96955552a",
// 领取时间
CREATE_DATE_Start: params?.searchType === '1' ? params?.STARTDATE : '',
CREATE_DATE_End: params?.searchType === '1' ? params?.ENDDATE : '',
// 核销时间
USED_DATE_Start: params?.searchType === '2' ? params?.STARTDATE : '',
USED_DATE_End: params?.searchType === '2' ? params?.ENDDATE : '',
COUPON_STATE: params?.COUPON_STATE || ""
},
PageIndex: 1,
PageSize: 999999,
// keyWord: {
// Key: "SELLER_NAME,MEMBERSHIP_NAME",
// Value: params?.searchText || ""
// },
// SortStr: "CREATE_DATE desc"
}
setSearchParams(params)
const data = await handeGetCOUPON_SENDList(req)
console.log('datadatadatadata', data);
if (data && data.length > 0) {
return { data: data, success: true }
}
return { data: [], success: true }
}}
toolbar={{
actions: [
]
}}
/>
</div>
</div>
</div>
)
}

View File

@ -9,6 +9,8 @@
// 菜单管理列表
import ProTable from '@ant-design/pro-table';
import React, { useState, useRef } from 'react';
import type { ConnectState } from "@/models/connect";
import { connect } from "umi";
import { PageContainer } from '@ant-design/pro-layout';
import { PlusOutlined } from '@ant-design/icons';
import { Button, message, TreeSelect, Form, Space } from 'antd';
@ -21,6 +23,7 @@ import type { ProColumns, ActionType } from '@ant-design/pro-table';
import { getSystemMenu, deleteSystemMenu, updataSystemMenu, updataModule } from './service'
import './modelStyle.less'
import { CurrentUser } from 'umi';
/**
* @en-US Add node
@ -74,8 +77,8 @@ const handleDelete = async (nodeId: number) => {
* @param {*}
* @return {*}
*/
const DataDictionary: React.FC = () => {
const DataDictionary: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const modelFormRef = useRef<FormInstance>();
@ -314,9 +317,16 @@ const DataDictionary: React.FC = () => {
headerTitle="菜单管理"
rowKey="SYSTEMMENU_ID"
actionRef={actionRef}
scroll={{ x: '100%', y: 'calc(100vh - 430px)' }}
pagination={{ defaultPageSize: 20 }}
request={async (params) => {
const data: any = await getSystemMenu({ ...params, ShowModule: true })
console.log('currentUsercurrentUsercurrentUser', currentUser);
const data: any = await getSystemMenu({
...params,
ShowModule: true,
SystemMenuPID: currentUser?.ID === 4653 ? '95' : '-1'
})
setMenuTree(data)
return { data, success: true }
@ -353,8 +363,6 @@ const DataDictionary: React.FC = () => {
formRef.current?.resetFields();
setCurrentRow(undefined);
}
}}
onFinish={async (value) => {
@ -626,4 +634,8 @@ const DataDictionary: React.FC = () => {
)
}
export default DataDictionary;
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(DataDictionary);
// export default DataDictionary;

View File

@ -275,7 +275,9 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
}
setSearchParams(params)
const data = await handleGetBEHAVIORRECORDList(req)
setTableData(data)
console.log('djakjkasdjas', data);
setTableData(data.List)
setTableLoading(false)
@ -296,7 +298,7 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
PageSize: 999999
}
const allData = await handleGetBEHAVIORRECORDList(allReq)
setTableData(allData)
setTableData(allData.List)
setIsFirst(false)
}

View File

@ -343,6 +343,14 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
// 关联商家的表格
const merchantColumns: any = [
{
dataIndex: 'searchText',
title: '查询内容',
hideInTable: true,
fieldProps: {
placeholder: "请输入服务区名称/门店名称"
}
},
{
dataIndex: 'SERVERPART_NAME',
title: '服务区名称',
@ -364,7 +372,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
title: '所属方位',
align: 'center',
width: 120,
hideInSearch: true,
valueType: "select",
valueEnum: shopregionObj
},
@ -386,8 +393,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
align: 'center',
width: 120,
valueType: "select",
hideInSearch: true,
valueEnum: businessStateObj
valueEnum: businessStateObj,
initialValue: '1000'
},
// {
// dataIndex: 'SHOPDIRECTION',
@ -907,14 +914,15 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
<div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
width: !collapsible ? 'calc(100% - 340px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
}}>
<ProTable
style={{ height: 'calc(100vh - 135px)', background: '#fff' }}
scroll={{ y: 'calc(100vh - 410px)' }}
// height: 'calc(100vh - 160px)',
style={{ background: '#fff' }}
scroll={{ y: 'calc(100vh - 430px)' }}
rowKey={(record) => {
return `${record?.SERVERPARTSELLER_ID}`
}}
@ -970,7 +978,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
</Button>,
],
}}
pagination={{ defaultPageSize: 20 }}
// pagination={{ defaultPageSize: 20 }}
/>
</div>
</div>
@ -1043,14 +1051,15 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
// handleModalOk()
// }} />}
>
<div style={{ display: 'flex', alignItems: 'flex-start' }}>
<div style={{ display: 'flex', alignItems: 'flex-start', height: '600px' }}>
<LeftSelectTree setSelectedId={setSelectAssociationServerpart} />
<div style={{ width: 'calc(100% - 300px)' }}>
<div>
<ProTable
actionRef={associationActionRef}
columns={merchantColumns}
scroll={{ x: '100%', y: '400px' }}
bordered
search={{ defaultCollapsed: false }}
rowKey={"SERVERPARTSHOP_ID"}
request={async (params) => {
if (!selectAssociationServerpart) {
@ -1059,7 +1068,13 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
const req: any = {
SearchParameter: {
SERVERPART_IDS: selectAssociationServerpart,
ISVALID: 1
ISVALID: 1,
SHOPREGION: params?.SHOPREGION || "",
BUSINESS_STATE: params?.BUSINESS_STATE || ""
},
keyWord: {
Key: "SERVERPART_NAME,SHOPNAME",
Value: params?.searchText || ""
},
PageIndex: 1,
PageSize: 999999,

View File

@ -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<FormInstance>();
const draggleRef = React.createRef<any>()
// 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
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 (
<Modal
title={parentRow?.COMMODITY_NAME || ""}
destroyOnClose={true}
width={1200}
visible={showDetailDrawer}
footer={<div style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between', boxSizing: 'border-box', padding: '0 32px' }}>
<div>
<Popconfirm
title="确认删除该商品?"
onConfirm={async () => {
if (handleDelete) {
handleDelete(parentRow?.COMMODITY_ID)
}
}}
onCancel={() => {
}}
okText="确认"
cancelText="取消"
>
<Button danger></Button>
</Popconfirm>
</div>
<div></div>
</div>}
afterClose={() => {
modalRef.current?.resetFields();
// setCurrentRow(undefined);
}}
maskClosable={true}
bodyStyle={{
maxHeight: '850px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
onCancel={() => {
handleCloseModal()
}}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle=".modalTop"
>
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
>
<ProForm
layout={'horizontal'}
formRef={modalRef}
submitter={false}
request={async () => {
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 []
}
}
}}
>
<Row gutter={8}>
<Col span={8}>
<ProFormText
label={"商品名称"}
name={"COMMODITY_NAME"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"商品编码"}
name={"COMMODITY_CODE"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"商品类型"}
name={"COMMODITY_TYPE"}
readonly
/>
</Col>
<Col span={8}>
<ProFormSelect
label={"商品状态"}
name={"COMMODITY_STATE"}
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
readonly
/>
</Col>
<Col span={8}>
<ProFormSelect
label={"商品业态"}
name={"BUSINESSTYPE"}
readonly
request={() => {
let list = session.get('SHOPTRADEList')
return list
}}
/>
</Col>
<Col span={8}>
<ProFormText
label={"商品单位"}
name={"COMMODITY_UNIT"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"商品规格"}
name={"COMMODITY_RULE"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"商品产地"}
name={"COMMODITY_ORI"}
readonly
/>
</Col>
<Col span={8}>
<ProFormSelect
label={"商品质量"}
name={"COMMODITY_GRADE"}
request={() => {
let list = session.get('COMMODITYGRADEList')
return list
}}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"零售价"}
name={"COMMODITY_RETAILPRICE"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"会员价"}
name={"COMMODITY_MEMBERPRICE"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"进货价"}
name={"COMMODITY_PURCHASEPRICE"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"进货税率"}
name={"DUTY_PARAGRAPH"}
readonly
/>
</Col>
<Col span={8}>
<ProFormText
label={"零售税率"}
name={"RETAIL_DUTY"}
readonly
/>
</Col>
<Col span={8}>
<ProFormSelect
label={"是否可售"}
name={"CANSALE"}
options={[{ label: "是", value: 1 }, { label: "否", value: 0 }]}
readonly
/>
</Col>
<Col span={8}>
<ProFormSelect
label={"是否散装"}
name={"ISBULK"}
options={[{ label: "是", value: 1 }, { label: "否", value: 0 }]}
readonly
/>
</Col>
<Col span={8}>
<ProFormSelect
label={"称重方式"}
name={"METERINGMETHOD"}
options={[{ label: '计价', value: 1 }, { label: '散装称重', value: 0 }]}
readonly
/>
</Col>
</Row>
</ProForm>
</Modal >
)
}
export default connect(({ user, }: ConnectState) => ({
currentUser: user.currentUser,
}))(ShopDetailModal);

View File

@ -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<any>()
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
const [collapsible, setCollapsible] = useState<boolean>(false)
const [treeView, setTreeView] = useState<any>()
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
const serverpartObj = session.get('serverpartObj')
// 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>()
// 导出的加载效果
const [showLoading, setShowLoading] = useState<boolean>(false)
// 是否显示打印的表格
const [showExportTable, setShowExportTable] = useState<boolean>(false)
// 查询的条件
const [searchParams, setSearchParams] = useState<any>()
// 表格数据
const [tableData, setTableData] = useState<any>()
// 审批的loading效果
const [loading, setLoading] = useState<boolean>(false)
// 选中的行
const [selectedModalOrderRowKeys, setSelectedModalOrderRowKeys] = useState<any>()
// 选中的行数据
const [selectModalRowList, setSelectModalRowList] = useState<any>()
// 显示商品详情悬浮框
const [showShopDetail, setShowShopDetail] = useState<boolean>(false)
// 行数据
const [currentRow, setCurrentRow] = useState<any>()
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 ?
<a onClick={() => {
setCurrentRow(record)
setShowShopDetail(true)
}}>{record?.COMMODITY_NAME}</a> : "-"
}
},
{
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 <InputNumber min={0} defaultValue={record?.COMMODITY_CURRPRICE} onBlur={(e: any) => {
// 拿到当前输入的内容
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 (
<div ref={(el) => {
// 打印报表
if (!reqDetailList || reqDetailList.length === 0) return;
setPrintOut(el);
}} >
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
<div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
}}>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
rowKey={(record: any) => {
return `${record?.COMMODITY_ID}`
}}
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
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: [
<Popconfirm
title="确认批量审核已选商品?"
onConfirm={async () => {
if (loading) {
return
}
setLoading(true)
await handleBatchReviewCommodity()
setLoading(false)
}}
onCancel={() => {
}}
okText="确认"
cancelText="取消"
>
<Button type={"primary"} loading={loading}></Button>
</Popconfirm>
]
}}
rowSelection={{
type: 'checkbox',
selectedRowKeys: selectedModalOrderRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectModalRowList(selectedRows)
setSelectedModalOrderRowKeys(selectedRowKeys)
},
}}
/>
</div>
</div>
<ShopDetailModal showDetailDrawer={showShopDetail} handleCloseModal={handleCloseModal} parentRow={currentRow} handleDelete={handleBatchDeleteCommodity} />
</div>
)
}
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(ConvenienceStoreProductReview);

View File

@ -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
}

View File

@ -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<boolean>(false)
// 悬浮框的加载效果
const [rentReductionLoading, setRentReductionLoading] = useState<boolean>(false)
// 项目详情
const [dataProjectDetail, setDataProjectDetail] = useState<any>()
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
</span>,
<>
{
parentRow?.CLOSED_DATE ?
<Typography.Text type="secondary" style={{ marginRight: '4px' }}>{parentRow?.CLOSED_DATE}</Typography.Text>
parentRow?.CLOSED_DATE || dataProjectDetail?.CLOSED_DATE ?
<Typography.Text type="secondary" style={{ marginRight: '4px' }}>{parentRow?.CLOSED_DATE || dataProjectDetail?.CLOSED_DATE}</Typography.Text>
: ''
}
{

View File

@ -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<any>()
// 判断拿到驳回类型
const [rejectTypeDetail, setRejectTypeDetail] = useState<any>()
// 项目详情
const [ProjectDetail, setProjectDetail] = useState<any>()
// 新建结算申请
const handleCreateSettlementApplication = async () => {
@ -842,6 +845,10 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
>
<YearExamineTable examineDetail={parentRow} />
@ -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);
}
}

View File

@ -55,7 +55,7 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
ExcludeTest: formData ? formData?.ExcludeTest === 1 ? true : false : true,
StartDate: start ? start : "",
EndDate: end ? end : "",
MembershipType: formData?.MembershipType || "",
MembershipType: formData?.MembershipType === 1 ? "" : formData?.MembershipType || "",
// MembershipLevel: formData?.MembershipLevel || "",
MembershipLevel: "",
}

View File

@ -1,11 +1,156 @@
// 热销滞销分析
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<ActionType>();
const formRef = useRef<FormInstance>();
// 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>()
// 查询的条件
const [searchParams, setSearchParams] = useState<any>()
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: <div style={{ textAlign: 'center' }}></div>,
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 (
<div>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
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: [
]
}}
/>
</div>
)
}

View File

@ -128,6 +128,8 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
hideInSearch: true,
width: 170,
ellipsis: true,
sorter: (a, b) => new Date(a.ORDER_DATE).getTime() - new Date(b.ORDER_DATE).getTime(),
defaultSortOrder: 'descend',
render: (_, record) => {
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : ''
}
@ -159,6 +161,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
hideInSearch: true,
width: 120,
ellipsis: true,
sorter: (a, b) => a.ORDER_AMOUNT - b.ORDER_AMOUNT,
},
{
dataIndex: 'COUPON_AMOUNT',
@ -167,6 +170,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
hideInSearch: true,
width: 120,
ellipsis: true,
sorter: (a, b) => a.COUPON_AMOUNT - b.COUPON_AMOUNT,
},
{
dataIndex: 'PAY_AMOUNT',
@ -175,6 +179,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
hideInSearch: true,
width: 120,
ellipsis: true,
sorter: (a, b) => a.PAY_AMOUNT - b.PAY_AMOUNT,
},
{
title: "获得积分",
@ -183,6 +188,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => a.MEMBERSHIP_POINT - b.MEMBERSHIP_POINT,
},
{
title: "获得成长值",
@ -191,6 +197,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => a.MEMBERGROWTH_VALUE - b.MEMBERGROWTH_VALUE,
},
{
dataIndex: 'SERVERPART_NAME',

View File

@ -59,8 +59,8 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine
ExcludeTest: formData ? formData?.ExcludeTest === 1 ? true : false : true,
StartDate: start ? start : "",
EndDate: end ? end : "",
MembershipType: formData?.MembershipType || "",
MembershipLevel: formData?.MembershipLevel || "",
MembershipType: formData?.MembershipType === 1 ? '' : formData?.MembershipType || "",
MembershipLevel: formData?.MembershipLevel === '1' ? '' : formData?.MembershipLevel || "",
}
const req2: any = {
@ -68,8 +68,8 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine
StartDate: start ? start : "",
EndDate: end ? end : "",
SalebillType: "",
MembershipType: formData?.MembershipType || "",
MembershipLevel: formData?.MembershipLevel || "",
MembershipType: formData?.MembershipType === 1 ? '' : formData?.MembershipType || "",
MembershipLevel: formData?.MembershipLevel === '1' ? '' : formData?.MembershipLevel || "",
}

View File

@ -147,7 +147,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
align: 'center',
ellipsis: true,
valueType: 'select',
valueEnum: MEMBERSHIPLEVELYNObj
valueEnum: MEMBERSHIPLEVELYNObj,
sorter: true,
},
{
title: "会员类型",
@ -160,6 +161,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
valueEnum: {
...MEMBERSHIPTYPEYNObj,
},
sorter: true,
},
{
title: "订单编号",
@ -184,9 +186,11 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
align: 'center',
dataIndex: "CONSUMPTIONRECORD_DATE",
hideInSearch: true,
sorter: true,
render: (_, record) => {
return record?.CONSUMPTIONRECORD_DATE ? moment(record?.CONSUMPTIONRECORD_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
defaultSortOrder: 'descend',
},
{
title: "消费类型",
@ -199,7 +203,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
"0": "全部",
...CONSUMPTIONRECORDTYPEObj
},
initialValue: "0"
initialValue: "0",
sorter: true,
},
{
title: "订单状态",
@ -218,6 +223,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
"9000": "订单已关闭",
"9999": "订单已撤销",
},
sorter: true
},
{
title: "获得积分",
@ -226,6 +232,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
hideInSearch: true,
align: 'center',
ellipsis: true,
sorter: true
},
{
title: "获得成长值",
@ -234,6 +241,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
hideInSearch: true,
align: 'center',
ellipsis: true,
sorter: true
},
{
title: "订单金额",
@ -243,6 +251,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
align: 'center',
valueType: 'digit',
ellipsis: true,
sorter: true
},
{
title: "消费金额",
@ -252,6 +261,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
valueType: 'digit',
align: 'center',
ellipsis: true,
sorter: true
},
{
title: "消费积分",
@ -261,6 +271,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
align: 'center',
valueType: 'digit',
ellipsis: true,
sorter: true
},
{
title: "实付金额",
@ -270,6 +281,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
valueType: 'digit',
align: 'center',
ellipsis: true,
sorter: true
},
{
title: "优惠金额",
@ -278,6 +290,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
hideInSearch: true,
align: 'center',
ellipsis: true,
sorter: true
},
{
@ -331,16 +344,23 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
expandRowByClick: true
}}
headerTitle={isComponent ? '' : <PageTitleBox props={props} />}
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 430px)' }}
search={isComponent ? false : { span: 6 }}
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 450px)' }}
search={isComponent ? false : { span: 6, defaultCollapsed: false }}
options={isComponent ? false : {
density: true,
reload: true,
setting: true
}}
request={async (params) => {
request={async (params, sorter) => {
let req: any = {}
const sortstr = Object.keys(sorter).map(n => {
const value = sorter[n]
return value ? `${n} ${value.replace('end', '')}` : ''
})
console.log('sortstrsortstrsortstr', sortstr);
if (isComponent) {
req = {
SearchParameter: {
@ -351,7 +371,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
},
PageIndex: params?.current,
PageSize: params?.pageSize,
sortStr: "CONSUMPTIONRECORD_DATE desc"
// sortStr: "CONSUMPTIONRECORD_DATE desc"
sortStr: sortstr.toString()
}
} else {
if (!selectedId) {
@ -373,7 +394,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,TICKET_CODE",
Value: params?.searchText || ""
},
sortStr: "CONSUMPTIONRECORD_DATE desc"
// sortStr: "CONSUMPTIONRECORD_DATE desc"
sortStr: sortstr.toString()
}
}
@ -390,10 +412,10 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
]
}}
pagination={{
defaultPageSize: 20,
showTotal: (total) => `${total} 条记录`
}}
// pagination={{
// defaultPageSize: 20,
// showTotal: (total) => `共 ${total} 条记录`
// }}
/>
</div>
</div>

View File

@ -0,0 +1,527 @@
// 消费类型配置
import React, { useRef, useState, Suspense } from 'react';
import moment from 'moment'; // 时间相关引用,没有使用可以删除
import numeral from "numeral"; // 数字相关引用,没有使用可以删除
import { connect } from 'umi';
import useRequest from '@ahooksjs/use-request'; // 请求数据的引用
import Draggable from 'react-draggable';
import SubMenu from "antd/lib/menu/SubMenu";
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import ProForm, { ProFormDatePicker, ProFormDateTimePicker, ProFormDateTimeRangePicker, ProFormDigit, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect, ProFormUploadButton } from '@ant-design/pro-form';
import { MenuFoldOutlined, PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-layout';
import { Button, Col, Drawer, message, Row, Popconfirm, Space, Image, Modal, Form, Switch, Upload, Tooltip, Descriptions, TreeSelect } from 'antd';
import type { CurrentUser } from "umi";
import type { ConnectState } from '@/models/connect';
import type { ActionType, ProColumns } from '@ant-design/pro-table';
import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import type { FormInstance } from 'antd';
import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚举的引用,没有使用可以删除
import { handeDeleteFIELDENUM, handeGetFIELDENUMList, handeGetFIELDEXPLAINList, handeGetNestingFIELDENUMList, handeSynchroFIELDENUM, handlDeleteUSERDEFINEDTYPE, handlGetUSERDEFINEDTYPEList, handlSynchroUSERDEFINEDTYPE } from '../service';
import PageTitleBox from '@/components/PageTitleBox';
import { uploadPicture } from '@/services/picture';
import defaultIcon from '../../../assets/brand/defaultIcon.png'
import classNames from 'classnames';
import session from '@/utils/session';
import ModalFooter from '../scenicSpotConfig/component/modalFooter';
import { handleSetlogSave } from '@/utils/format';
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 < 2;
if (!isLt2M) {
message.error('图片大小不超过 2MB!');
}
return isJpgOrPng && isLt2M;
}
const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
const { currentUser } = props
const { confirm } = Modal;
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [currentRow, setCurrentRow] = useState<any>();
const [showDetail, setShowDetail] = useState<boolean>();
const [modalVisible, handleModalVisible] = useState<boolean>();
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
const [searchParams, setSearchParams] = useState<any>();
// 分类的树形结构数据
const [typeTreeData, setTypeTreeData] = useState<any>()
// 表单里面的是否预售
const [formPRESALE_TYPE, setFormPRESALE_TYPE] = useState<boolean>(false)
// 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
const draggleRef = React.createRef<any>()
let AFTERSALETYPEObj = session.get('AFTERSALETYPEObj')
const { data: FIELDEXPLAIN_ID } = useRequest(async () => {
const req: any = {
SearchParameter: {
FIELDEXPLAIN_FIELD: "CONSUMPTIONRECORD_TYPE"
}
}
const data = await handeGetFIELDEXPLAINList(req)
if (data && data.length > 0) {
let obj: any = data[0]
return obj.FIELDEXPLAIN_ID
}
})
// 文件列表
const [fileList, setFileList] = useState<any>([])
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
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: 'FIELDENUM_NAME',
title: '类别名称',
align: 'center',
width: 300,
ellipsis: true,
hideInSearch: true,
hideInDescriptions: true,
render: (_, record) => {
return <a
onClick={() => {
setCurrentRow({ ...record });
handleModalVisible(true);
}}
>{record?.FIELDENUM_NAME || ""}</a>
}
},
{
dataIndex: 'FIELDENUM_VALUE',
title: '类型枚举',
align: 'center',
width: 120,
ellipsis: true,
// valueType: 'treeSelect',
// valueEnum: typeTreeData,
hideInSearch: true,
},
{
dataIndex: 'FIELDENUM_INDEX',
title: '类别索引',
align: 'center',
width: 120,
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'FIELDENUM_STATUS',
title: '有效状态',
align: 'center',
width: 120,
ellipsis: true,
valueType: "select",
valueEnum: {
"1": "有效",
"0": "无效"
},
initialValue: "1"
},
{
dataIndex: 'FIELDENUM_DESC',
title: '备注说明',
align: 'center',
ellipsis: true,
hideInSearch: true,
},
// {
// dataIndex: 'option',
// title: '操作',
// width: 100,
// ellipsis: true,
// valueType: 'option',
// align: 'center',
// hideInSearch: true,
// render: (_, record) => {
// return (
// <Space>
// <a
// onClick={() => {
// setCurrentRow({ ...record });
// handleModalVisible(true);
// }}
// >
// 编辑
// </a>
// <Popconfirm
// title="确认删除该点餐自定义类别列表信息吗?"
// onConfirm={async () => {
// handelDelete(record.FIELDENUM_ID);
// }}
// >
// <a>删除</a>
// </Popconfirm>
// </Space>
// );
// },
// },
];
// 预览上传后的图片
const handlePreview = async () => {
setFileList(fileList)
setImagePreviewVisible(true)
};
const handleChangePreview = (val: any) => {
setImagePreviewVisible(val)
}
// 删除点餐类别
const handelDelete = async (id: any) => {
const req: any = {
FIELDENUMId: id
}
const result = await handeDeleteFIELDENUM(req)
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
} else {
message.success('删除成功!');
handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
}
}
// 同步点餐列表
const handleAddUpdate = async (res: any) => {
let req: any = {}
if (currentRow?.FIELDENUM_ID) {
req = {
...currentRow,
...res,
}
} else {
req = {
...res,
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
FIELDENUM_PID: -1,
}
}
const data = await handeSynchroFIELDENUM(req)
handleConfirmLoading(false)
if (data.Result_Code === 100) {
handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}${data.Result_Data.FIELDENUM_NAME}`)
message.success("新增成功!")
setCurrentRow(undefined)
formRef?.current?.resetFields()
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
}
}
return (
<PageContainer header={{
title: '',
breadcrumb: {}
}}>
<ProTable
style={{ height: 'calc(100vh - 160px)', background: '#fff' }}
scroll={{ y: 'calc(100vh - 430px)' }}
rowKey={(record) => {
return `${record?.FIELDENUM_PID}-${record?.FIELDENUM_ID}`
}}
formRef={formRef}
headerTitle={<PageTitleBox props={props} />} // 列表表头
actionRef={actionRef}
search={{ span: 6, labelWidth: 'auto' }}
bordered
// 请求数据
request={async (params, sorter) => {
const req = {
FIELDEXPLAIN_FIELD: 'CONSUMPTIONRECORD_TYPE',
FIELDEXPLAIN_ID: "",
FIELDENUM_PID: "",
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
SearchKey: ""
}
const data = await handeGetNestingFIELDENUMList(req);
handleSetlogSave(`点击查询按钮`)
console.log('datadatadatadatadata', data);
if (data && data.length > 0) {
setTypeTreeData(data)
return { data: data, success: true, total: data.length }
}
return { data: [], success: true }
}}
columns={columns}
toolbar={{
actions: [
// 新增按钮
<Button
key="new"
icon={<PlusOutlined />}
type="primary"
onClick={() => {
handleModalVisible(true);
}}
>
</Button>,
],
}}
/>
{/* 图片预览组件 */}
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
<Image.PreviewGroup
preview={{
visible: imagePreviewVisible,
onVisibleChange: vis => {
handleChangePreview(vis)
}
}}>
{
fileList.map((n) => <Image src={n.url} key={n.url} />)
}
</Image.PreviewGroup>
</div>}
<Modal
title={
<div
className='membershipLevel'
style={{
width: '100%',
cursor: 'move',
}}
onMouseOver={() => {
if (disabled) {
setDraggleDisabled(false)
}
}}
onMouseOut={() => {
setDraggleDisabled(true)
}}
onFocus={() => { }}
onBlur={() => { }}
>
{currentRow ? '更新会员等级类别' : '新建会员等级类别'}
</div>
}
destroyOnClose={true}
width={900}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
visible={modalVisible}
confirmLoading={confirmLoading}
afterClose={() => {
formRef.current?.resetFields();
setCurrentRow(undefined);
}}
footer={<ModalFooter
hideDelete={!currentRow?.FIELDENUM_ID}
handleDelete={async () => {
await handelDelete(currentRow?.FIELDENUM_ID)
}}
handleCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
}}
handleOK={() => {
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}
/>}
onCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
}}
onOk={async () => { // 提交框内的数据
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle='.membershipLevel'
>
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
>
<ProForm
layout={'horizontal'}
formRef={formRef}
autoFocusFirstInput
labelCol={{ style: { width: 80 } }}
submitter={false}
preserve={false}
initialValues={currentRow ? {
...currentRow,
} : {
FIELDENUM_STATUS: 1,
}}
onFinish={async (values) => {
let newValue = { ...values };
if (currentRow) {
// 编辑数据
newValue = { ...values, FIELDENUM_ID: currentRow.FIELDENUM_ID };
}
// 如果有开关,要把开关的代码写进去
await handleAddUpdate(newValue);
handleConfirmLoading(false)
setFormPRESALE_TYPE(false)
}}
>
<Row gutter={8}>
{/* <Col span={12}>
<ProFormTreeSelect
name="FIELDENUM_PID"
label="上级类别"
request={async () => {
if (typeTreeData && typeTreeData.length > 0) {
let list: any = [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }, ...typeTreeData]
return list
} else {
const req = {
FIELDEXPLAIN_FIELD: 'CONSUMPTIONRECORD_TYPE',
FIELDEXPLAIN_ID: "",
FIELDENUM_PID: "",
FIELDENUM_STATUS: 1,
SearchKey: ""
}
const data = await handeGetNestingFIELDENUMList(req);
if (data && data.length > 0) {
data.unshirft({ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 })
setTypeTreeData(data)
return data
} else {
return [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }]
}
}
}}
fieldProps={{
fieldNames: {
label: 'FIELDENUM_NAME',
value: 'FIELDENUM_ID',
children: 'children'
},
showSearch: true,
filterTreeNode: (input, node) =>
(node.FIELDENUM_NAME || '').toLowerCase().includes(input.toLowerCase())
}}
rules={[
{
required: true,
message: "请选择上级类别"
}
]}
/>
</Col> */}
<Col span={12}>
<ProFormText
name="FIELDENUM_NAME"
label="类别名称"
rules={[
{
required: true,
message: "请输入类别名称"
}
]}
/>
</Col>
<Col span={12}>
<ProFormDigit
name="FIELDENUM_INDEX"
label="类别索引"
rules={[
{
required: true,
message: "请输入类别索引"
}
]}
/>
</Col>
<Col span={12}>
<ProFormDigit
name="FIELDENUM_VALUE"
label="等级枚举"
rules={[
{
required: true,
message: "请输入等级枚举"
}
]}
/>
</Col>
<Col span={12}>
<ProFormSelect
name="FIELDENUM_STATUS"
label="有效状态"
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
rules={[
{
required: true,
message: "请选择有效状态"
}
]}
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="FIELDENUM_DESC"
label="备注"
/>
</Col>
</Row>
</ProForm>
</Modal>
</PageContainer >
);
};
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(ConsumptionTypeConfig);

View File

@ -114,7 +114,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
align: 'center',
ellipsis: true,
valueType: 'select',
valueEnum: MEMBERSHIPLEVELYNObj
valueEnum: MEMBERSHIPLEVELYNObj,
sorter: true
},
{
title: "会员类型",
@ -127,6 +128,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
valueEnum: {
...MEMBERSHIPTYPEYNObj,
},
sorter: true
},
{
title: "成长来源",
@ -143,7 +145,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
treeDefaultExpandAll: true, // 默认展开所有节点(可选)
showSearch: true, // 允许搜索(可选)
treeNodeFilterProp: 'title', // 按 title 搜索(可选)
}
},
sorter: true
// valueEnum: {
// "0": "全部",
// "1000": "消费赠送",
@ -159,11 +162,12 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
align: 'center',
valueType: 'select',
valueEnum: {
"-2": "全部",
// "-2": "全部",
"1": "积累",
"-1": "消耗",
},
initialValue: "-2"
// initialValue: "-2",
sorter: true
},
{
title: "订单编号",
@ -180,6 +184,18 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
}}>{record?.TICKET_CODE}</a> : "-"
}
},
{
title: "下单时间",
width: 180,
dataIndex: "OPERATE_DATE",
align: 'center',
hideInSearch: true,
render: (_, record) => {
return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
},
sorter: true,
defaultSortOrder: 'descend',
},
{
title: "累计成长值",
width: 120,
@ -187,7 +203,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
hideInSearch: true,
align: 'center',
ellipsis: true,
valueType: 'digit'
valueType: 'digit',
sorter: true
},
{
title: "本次成长值",
@ -196,7 +213,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
hideInSearch: true,
align: 'center',
ellipsis: true,
valueType: 'digit'
valueType: 'digit',
sorter: true
},
{
title: "实付金额",
@ -205,7 +223,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
hideInSearch: true,
align: 'center',
ellipsis: true,
valueType: 'digit'
valueType: 'digit',
sorter: true
},
{
title: "服务区名称",
@ -223,16 +242,6 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
align: 'center',
ellipsis: true,
},
{
title: "操作时间",
width: 180,
dataIndex: "OPERATE_DATE",
align: 'center',
hideInSearch: true,
render: (_, record) => {
return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
}
},
]
const handleCloseModal = () => {
@ -269,14 +278,21 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
expandRowByClick: true
}}
headerTitle={isComponent ? '' : <PageTitleBox props={props} />}
scroll={{ x: '100%', y: isComponent ? height ? `${height}` : '300px' : 'calc(100vh - 430px)' }}
search={isComponent ? false : { span: 6 }}
scroll={{ x: '100%', y: isComponent ? height ? `${height}` : '300px' : 'calc(100vh - 480px)' }}
search={isComponent ? false : { span: 6, defaultCollapsed: false }}
options={isComponent ? false : {
density: true,
reload: true,
setting: true
}}
request={async (params) => {
request={async (params, sorter) => {
const sortstr = Object.keys(sorter).map(n => {
const value = sorter[n]
return value ? `${n} ${value.replace('end', '')}` : ''
})
const req: any = isComponent ? searchReq ? {
...searchReq,
PageIndex: params?.current,
@ -289,7 +305,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
},
PageIndex: params?.current,
PageSize: 20,
sortStr: "OPERATE_DATE desc"
// sortStr: "OPERATE_DATE desc"
sortStr: sortstr.toString()
} : {
searchParameter: {
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
@ -302,7 +319,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
},
PageIndex: params?.current,
PageSize: 20,
sortStr: "OPERATE_DATE desc",
// sortStr: "OPERATE_DATE desc",
sortStr: sortstr.toString(),
keyWord: {
Key: "MEMBERSHIP_NAME,SHOPNAME",
Value: params?.searchText

View File

@ -250,7 +250,8 @@ const MEMBERSHIPTYPEConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
breadcrumb: {}
}}>
<ProTable
style={{ height: 'calc(100vh - 135px)', background: '#fff' }}
// height: 'calc(100vh - 135px)',
style={{ background: '#fff' }}
scroll={{ y: 'calc(100vh - 410px)' }}
rowKey={(record) => {
return `${record?.FIELDENUM_PID}-${record?.FIELDENUM_ID}`

View File

@ -250,7 +250,8 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
breadcrumb: {}
}}>
<ProTable
style={{ height: 'calc(100vh - 135px)', background: '#fff' }}
// height: 'calc(100vh - 135px)',
style={{ background: '#fff' }}
scroll={{ y: 'calc(100vh - 410px)' }}
rowKey={(record) => {
return `${record?.FIELDENUM_PID}-${record?.FIELDENUM_ID}`

View File

@ -402,6 +402,22 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
return true
}
// 拿到最全的规则的数据
const handleGetAllRuleData = async () => {
const req: any = {
searchParameter: {
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
GROWTHSETTING_STATE: "",
MEMBERSHIP_TYPES: ""
},
SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL,PROMOTION_LEVEL desc",
PageIndex: 1,
PageSize: 999999
}
const data = await handleGetGROWTHSETTINGList(req);
setTableData(data.List)
}
return (
<PageContainer header={{
@ -428,17 +444,18 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
GROWTHSETTING_STATE: params?.GROWTHSETTING_STATE,
MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE
},
SortStr: "PROMOTION_LEVEL desc",
SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL,PROMOTION_LEVEL desc",
PageIndex: 1,
PageSize: 20
}
const data = await handleGetGROWTHSETTINGList(req);
if (data.List && data.List.length > 0) {
handleSetlogSave(`查看了成长规则配置列表`)
if (isFirst) {
setTableData(data.List);
setIsFirst(false)
}
// if (isFirst) {
// setTableData(data.List);
// setIsFirst(false)
// }
handleGetAllRuleData()
return { data: data.List, success: true, total: data.TotalCount }
}
return { data: [], success: true }

View File

@ -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<any>()
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const modalRef = useRef<FormInstance>();
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
const [collapsible, setCollapsible] = useState<boolean>(false)
const [treeView, setTreeView] = useState<any>()
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
const [lostTypeList, setLostTypeList] = useState<any>()
const [lostTypeObj, setLostTypeObj] = useState<any>()
// 显示新增窗口
const [showAddModal, setShowAddModal] = useState<boolean>(false)
// 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>()
// 导出的加载效果
const [showLoading, setShowLoading] = useState<boolean>(false)
// 是否显示打印的表格
const [showExportTable, setShowExportTable] = useState<boolean>(false)
// 查询的条件
const [searchParams, setSearchParams] = useState<any>()
// 当前选中行数据
const [currentRow, setCurrentRow] = useState<any>()
// 弹出框的确认效果
const [confirmLoading, setConfirmLoading] = useState<boolean>(false)
// 图片列表
const [fileList, setFileList] = useState<any>()
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(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 ? <a onClick={() => {
setCurrentRow(record)
setShowAddModal(true)
}}>{record?.SUGGESTION_TITLE || "-"}</a> : "-"
}
},
{
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 <div>
// <a onClick={() => {
// setCurrentRow(record)
// setShowAddModal(true)
// }}>
// 编辑
// </a>
// <Popconfirm
// title={'确认删除?'}
// onConfirm={() => {
// handleDeleteThing(record?.SUGGESTION_ID)
// }}
// >
// <a style={{ marginLeft: '8px' }}>删除</a>
// </Popconfirm>
// </div>
// }
// }
]
// 悬浮框的关闭事件
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 (
<div>
<div ref={(el) => {
// 打印报表
if (!reqDetailList || reqDetailList.length === 0) return;
setPrintOut(el);
}} >
<div className={`saleReportHideBox${printIndex}`} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
{
showExportTable && reqDetailList && reqDetailList.length > 0 ?
<ProTable
columns={columns}
dataSource={reqDetailList}
pagination={false}
expandable={{
defaultExpandAllRows: true
}}
/> : ''
}
</div>
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
<div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
}}>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
headerTitle={<PageTitleBox props={props} />}
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: [
<Button type="primary" onClick={() => {
setShowAddModal(true)
}}></Button>
]
}}
/>
</div>
</div>
{/* 图片预览组件 */}
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
<Image.PreviewGroup
preview={{
visible: imagePreviewVisible,
onVisibleChange: vis => {
handleChangePreview(vis)
}
}}>
{
fileList.map((n) => <Image src={n.url} key={n.url} />)
}
</Image.PreviewGroup>
</div>}
<Modal
title={currentRow ? "编辑失物信息" : "新增失物信息"}
destroyOnClose={true}
width={900}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
visible={showAddModal}
confirmLoading={confirmLoading}
onCancel={() => {
handleModalClose()
}}
okText={"发起申请"}
onOk={async () => { // 提交框内的数据
modalRef.current?.validateFields().then(async (res: any) => {
setConfirmLoading(true)
await handleAddLostThing(res)
setConfirmLoading(false)
})
}}
>
<ProForm
formRef={modalRef}
layout={'horizontal'}
submitter={false}
request={async () => {
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 } }}
>
<Row gutter={16}>
<Col span={12}>
<ProFormSelect
label={'服务区'}
name={'SERVERPART_ID'}
rules={[{
required: true,
message: '请选择服务区'
}]}
request={async () => {
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());
}
}}
/>
</Col>
{/* <Col span={12}>
<ProFormTreeSelect
label={'失物类型'}
name={'ENUM_LABEL'}
rules={[{
required: true,
message: '请选择失物类型'
}]}
fieldProps={{
showSearch: true, // 启用搜索框
treeDefaultExpandAll: true, // 默认展开所有节点
filterTreeNode: (inputValue: string, treeNode: any) => {
// 通过label进行模糊匹配
return treeNode.label.toLowerCase().includes(inputValue.toLowerCase());
},
options: lostTypeList // 传入树形节点数据
}}
/>
</Col> */}
<Col span={12}>
<ProFormText
label={'物品名称'}
name={'SUGGESTION_TITLE'}
rules={[{
required: true,
message: '请输入物品名称'
}]}
/>
</Col>
<Col span={12}>
<ProFormDatePicker
label={'发现时间'}
name={'SUGGESTION_CREATEDATE'}
width="lg"
fieldProps={{
showTime: {
format: 'HH:mm', // 只显示时和分
minuteStep: 1, // 分钟步长,可以设置为 5、10 等
hourStep: 1, // 小时步长
},
format: 'YYYY-MM-DD HH:mm', // 格式化为日期和时间(只显示时分)
}}
/>
</Col>
<Col span={12}>
<ProFormText
name={"PHONE_NUMBER"}
label={"联系电话"}
placeholder="请输入手机号"
/>
</Col>
<Col span={24}>
<ProFormTextArea
name={"SUGGESTION_REASON"}
label={"描述信息"}
/>
</Col>
<Col span={24}>
<ProFormUploadButton
name="SCENICAREA_Image"
label={'附件图片'}
listType="picture-card"
accept="image/*"
fieldProps={{
beforeUpload,
onPreview: handlePreview,
// fileList: fileList, // 绑定 fileList
onChange: async (info: any) => {
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: <ExclamationCircleOutlined />,
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)
// }
}
}}
/>
</Col>
</Row>
</ProForm>
</Modal>
</div>
)
}

View File

@ -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<ActionType>();
const formRef = useRef<FormInstance>();
const modalRef = useRef<FormInstance>();
// 当前选中行数据
const [currentRow, setCurrentRow] = useState<any>()
// 显示新增窗口
const [showAddModal, setShowAddModal] = useState<boolean>(false)
// 图片列表
const [fileList, setFileList] = useState<any>()
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
// 弹出框的确认效果
const [confirmLoading, setConfirmLoading] = useState<boolean>(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 ? <a onClick={() => {
setCurrentRow(record)
setShowAddModal(true)
}}>{record?.SUGGESTION_TITLE || "-"}</a> : "-"
}
},
{
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 (
<div>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
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,
}
</div>
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 && <div style={{ display: 'none' }}>
<Image.PreviewGroup
preview={{
visible: imagePreviewVisible,
onVisibleChange: vis => {
handleChangePreview(vis)
}
}}>
{
fileList.map((n) => <Image src={n.url} key={n.url} />)
}
</Image.PreviewGroup>
</div>}
<Modal
title={"审核失物"}
destroyOnClose={true}
width={900}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
visible={showAddModal}
confirmLoading={confirmLoading}
onCancel={() => {
handleModalClose()
}}
footer={
<div style={{ width: '100%', boxSizing: 'border-box', padding: '0 8px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div></div>
<div>
<Popconfirm
title={'确认驳回?'}
onConfirm={() => {
handleAddLostThing(2)
}}
>
<Button danger></Button>
</Popconfirm>
<Popconfirm
title={'确认审核通过?'}
onConfirm={() => {
handleAddLostThing(1)
}}
>
<Button style={{ marginLeft: '8px' }} type={"primary"}></Button>
</Popconfirm>
</div>
</div>
}
okText={"审核通过"}
onOk={async () => { // 提交框内的数据
modalRef.current?.validateFields().then(async (res: any) => {
setConfirmLoading(true)
await handleAddLostThing(res)
setConfirmLoading(false)
})
}}
>
<ProForm
formRef={modalRef}
layout={'horizontal'}
submitter={false}
request={async () => {
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 } }}
>
<Row gutter={16}>
<Col span={12}>
<ProFormSelect
label={'服务区'}
name={'SERVERPART_ID'}
rules={[{
required: true,
message: '请选择服务区'
}]}
request={async () => {
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
/>
</Col>
<Col span={12}>
<ProFormText
label={'物品名称'}
name={'SUGGESTION_TITLE'}
rules={[{
required: true,
message: '请输入物品名称'
}]}
readonly
/>
</Col>
<Col span={12}>
<ProFormDatePicker
label={'发现时间'}
name={'SUGGESTION_CREATEDATE'}
width="lg"
fieldProps={{
showTime: {
format: 'HH:mm', // 只显示时和分
minuteStep: 1, // 分钟步长,可以设置为 5、10 等
hourStep: 1, // 小时步长
},
format: 'YYYY-MM-DD HH:mm', // 格式化为日期和时间(只显示时分)
}}
readonly
/>
</Col>
<Col span={12}>
<ProFormText
name={"PHONE_NUMBER"}
label={"联系电话"}
placeholder="请输入手机号"
readonly
/>
</Col>
<Col span={24}>
<ProFormTextArea
name={"SUGGESTION_REASON"}
label={"描述信息"}
readonly
/>
</Col>
<Col span={24}>
<ProFormUploadButton
name="SCENICAREA_Image"
label={'附件图片'}
listType="picture-card"
accept="image/*"
readonly
disabled
fieldProps={{
beforeUpload,
onPreview: handlePreview,
// fileList: fileList, // 绑定 fileList
onChange: async (info: any) => {
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: <ExclamationCircleOutlined />,
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)
// }
}
}}
/>
</Col>
</Row>
</ProForm>
</Modal >
</div >
)
}

View File

@ -308,7 +308,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
rowKey={(record: any) => {
return `${record.BRAND_PID}-${record.BRAND_ID}`
}}
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
request={async (params) => {
setSearchParams(params)

View File

@ -272,7 +272,7 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC
}}>
{/* 最外层的列表 */}
<ProTable<COMMODITYModel>
scroll={{ x: "100%", y: isComponent ? '300px' : 'calc(100vh - 370px)' }}
scroll={{ x: "100%", y: isComponent ? '300px' : 'calc(100vh - 390px)' }}
rowKey={(record) => {
return `${record?.COMMODITY_ID}`
}}

View File

@ -186,7 +186,9 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
align: "center",
render: (_, record) => {
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
}
},
sorter: (a, b) => new Date(a.ORDER_DATE).getTime() - new Date(b.ORDER_DATE).getTime(),
defaultSortOrder: 'descend',
},
{
title: "订单状态",
@ -207,6 +209,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
"9999": "订单已撤销"
},
align: "center",
sorter: (a, b) => a.SALEBILL_STATE - b.SALEBILL_STATE
},
{
title: "获得积分",
@ -215,6 +218,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => a.MEMBERSHIP_POINT - b.MEMBERSHIP_POINT
},
{
title: "获得成长值",
@ -223,6 +227,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => a.MEMBERGROWTH_VALUE - b.MEMBERGROWTH_VALUE
},
{
title: "购买的商品",
@ -239,6 +244,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => a.ORDER_AMOUNT - b.ORDER_AMOUNT
},
{
title: "实付金额",
@ -247,6 +253,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => a.PAY_AMOUNT - b.PAY_AMOUNT
},
{
title: "订单类型",

View File

@ -90,7 +90,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
},
{
dataIndex: 'USER_NAME',
title: '收货人名称',
title: '用户昵称',
width: 150,
align: 'center',
hideInSearch: true,
@ -103,7 +103,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
},
{
dataIndex: 'USER_SEX',
title: '收货人性别',
title: '用户性别',
width: 120,
align: 'center',
hideInSearch: true,

View File

@ -21,9 +21,10 @@ import './MerchantEvaluationManage.less'
const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentDetail?: any }> = (props) => {
const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentDetail?: any, come?: string }> = (props) => {
const draggleRef = React.createRef<any>()
const { currentUser, isComponent, parentDetail } = props
// come 来自哪里
const { currentUser, isComponent, parentDetail, come } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const modalFormRef = useRef<FormInstance>();
@ -119,6 +120,8 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent
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') : "-"
}
@ -277,7 +280,24 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent
if (!selectedId && !isComponent) {
return
}
const req: any = isComponent ? {
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,

View File

@ -1,14 +1,16 @@
// 商户销售排行
import { ConnectState } from "@/models/connect";
import { Button, FormInstance } from "antd";
import { Button, Drawer, FormInstance } from "antd";
import { connect, CurrentUser } from "umi";
import { handeGetSERVERPARTSELLERList } from "../service";
import { useRef, useState } from "react";
import ProTable, { ActionType } from "@ant-design/pro-table";
import PageTitleBox from "@/components/PageTitleBox";
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
import MerchantEvaluationManage from "../MerchantEvaluationManage";
const MerchantSalesRanking: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
const { currentUser } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [collapsible, setCollapsible] = useState<boolean>(false)
@ -20,6 +22,11 @@ const MerchantSalesRanking: React.FC<{ currentUser: CurrentUser | undefined }> =
// 当前查询的文字
const [currentSearchText, setCurrentSearchText] = useState<string>('')
// 行数据
const [currentRow, setCurrentRow] = useState<any>()
// 显示详情抽屉
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
const columns: any = [
{
dataIndex: 'searchText',
@ -85,7 +92,18 @@ const MerchantSalesRanking: React.FC<{ currentUser: CurrentUser | undefined }> =
align: 'right',
width: 120,
hideInSearch: true,
sorter: true
sorter: true,
render: (_, record) => {
return record?.COMMENT_COUNT ? <a onClick={() => {
setCurrentRow({
...record,
MEMBERSHIP_ID: currentUser?.ID
})
setShowDetailDrawer(true)
}}>
{record?.COMMENT_COUNT}
</a> : "-"
}
},
{
dataIndex: 'MONTHLYSALES',
@ -193,6 +211,22 @@ const MerchantSalesRanking: React.FC<{ currentUser: CurrentUser | undefined }> =
/>
</div>
<Drawer
width={'80%'}
visible={showDetailDrawer}
onClose={() => {
setCurrentRow(undefined)
setShowDetailDrawer(false)
}}
closable={false}
destroyOnClose
bodyStyle={{ padding: 32 }}
>
<MerchantEvaluationManage isComponent={true} parentDetail={currentRow} come={'MerchantSalesRanking'} />
</Drawer>
</div>
)
}

View File

@ -0,0 +1,554 @@
// 操作类型配置
import React, { useRef, useState, Suspense } from 'react';
import moment from 'moment'; // 时间相关引用,没有使用可以删除
import numeral from "numeral"; // 数字相关引用,没有使用可以删除
import { connect } from 'umi';
import useRequest from '@ahooksjs/use-request'; // 请求数据的引用
import Draggable from 'react-draggable';
import SubMenu from "antd/lib/menu/SubMenu";
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import ProForm, { ProFormDatePicker, ProFormDateTimePicker, ProFormDateTimeRangePicker, ProFormDigit, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect, ProFormUploadButton } from '@ant-design/pro-form';
import { MenuFoldOutlined, PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-layout';
import { Button, Col, Drawer, message, Row, Popconfirm, Space, Image, Modal, Form, Switch, Upload, Tooltip, Descriptions, TreeSelect } from 'antd';
import type { CurrentUser } from "umi";
import type { ConnectState } from '@/models/connect';
import type { ActionType, ProColumns } from '@ant-design/pro-table';
import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import type { FormInstance } from 'antd';
import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚举的引用,没有使用可以删除
import { handeDeleteFIELDENUMNoEncryption, handeGetFIELDEXPLAINListNoEncryption, handeGetNestingFIELDENUMListNoEncryption, handeSynchroFIELDENUMNoEncryption, handlDeleteUSERDEFINEDTYPE, handlGetUSERDEFINEDTYPEList, handlSynchroUSERDEFINEDTYPE } from '../service';
import PageTitleBox from '@/components/PageTitleBox';
import { uploadPicture } from '@/services/picture';
import defaultIcon from '../../../assets/brand/defaultIcon.png'
import classNames from 'classnames';
import session from '@/utils/session';
import ModalFooter from '../scenicSpotConfig/component/modalFooter';
import { handleSetlogSave } from '@/utils/format';
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 < 2;
if (!isLt2M) {
message.error('图片大小不超过 2MB!');
}
return isJpgOrPng && isLt2M;
}
const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
const { currentUser } = props
const { confirm } = Modal;
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [currentRow, setCurrentRow] = useState<any>();
const [showDetail, setShowDetail] = useState<boolean>();
const [modalVisible, handleModalVisible] = useState<boolean>();
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
const [searchParams, setSearchParams] = useState<any>();
// 分类的树形结构数据
const [typeTreeData, setTypeTreeData] = useState<any>()
// 表单里面的是否预售
const [formPRESALE_TYPE, setFormPRESALE_TYPE] = useState<boolean>(false)
// 表格数据
const [tableData, setTableData] = useState<any>()
// 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
const draggleRef = React.createRef<any>()
let AFTERSALETYPEObj = session.get('AFTERSALETYPEObj')
const { data: FIELDEXPLAIN_ID } = useRequest(async () => {
const req: any = {
SearchParameter: {
FIELDEXPLAIN_FIELD: "BEHAVIORRECORD_TYPE"
}
}
const data = await handeGetFIELDEXPLAINListNoEncryption(req)
if (data && data.length > 0) {
let obj: any = data[0]
return obj.FIELDEXPLAIN_ID
}
})
// 文件列表
const [fileList, setFileList] = useState<any>([])
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
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: 'FIELDENUM_NAME',
title: '类别名称',
align: 'center',
width: 300,
ellipsis: true,
hideInSearch: true,
hideInDescriptions: true,
render: (_, record) => {
return <a
onClick={() => {
setCurrentRow({ ...record });
handleModalVisible(true);
}}
>{record?.FIELDENUM_NAME || ""}</a>
}
},
{
dataIndex: 'FIELDENUM_VALUE',
title: '类型枚举',
align: 'center',
width: 120,
ellipsis: true,
// valueType: 'treeSelect',
// valueEnum: typeTreeData,
hideInSearch: true,
},
{
dataIndex: 'FIELDENUM_INDEX',
title: '类别索引',
align: 'center',
width: 120,
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'FIELDENUM_STATUS',
title: '有效状态',
align: 'center',
width: 120,
ellipsis: true,
valueType: "select",
valueEnum: {
"1": "有效",
"0": "无效"
},
initialValue: "1"
},
{
dataIndex: 'FIELDENUM_DESC',
title: '备注说明',
align: 'center',
ellipsis: true,
hideInSearch: true,
},
// {
// dataIndex: 'option',
// title: '操作',
// width: 100,
// ellipsis: true,
// valueType: 'option',
// align: 'center',
// hideInSearch: true,
// render: (_, record) => {
// return (
// <Space>
// <a
// onClick={() => {
// setCurrentRow({ ...record });
// handleModalVisible(true);
// }}
// >
// 编辑
// </a>
// <Popconfirm
// title="确认删除该点餐自定义类别列表信息吗?"
// onConfirm={async () => {
// handelDelete(record.FIELDENUM_ID);
// }}
// >
// <a>删除</a>
// </Popconfirm>
// </Space>
// );
// },
// },
];
// 预览上传后的图片
const handlePreview = async () => {
setFileList(fileList)
setImagePreviewVisible(true)
};
const handleChangePreview = (val: any) => {
setImagePreviewVisible(val)
}
// 删除点餐类别
const handelDelete = async (id: any) => {
const req: any = {
FIELDENUMId: id
}
const result = await handeDeleteFIELDENUMNoEncryption(req)
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
} else {
message.success('删除成功!');
handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
}
}
// 同步点餐列表
const handleAddUpdate = async (res: any) => {
let req: any = {}
if (currentRow?.FIELDENUM_ID) {
req = {
...currentRow,
...res,
}
} else {
req = {
...res,
FIELDEXPLAIN_ID: FIELDEXPLAIN_ID,
FIELDENUM_PID: -1,
}
}
console.log('reqfdshfasjjl', req);
const data = await handeSynchroFIELDENUMNoEncryption(req)
handleConfirmLoading(false)
if (data.Result_Code === 100) {
handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}${data.Result_Data.FIELDENUM_NAME}`)
message.success("新增成功!")
setCurrentRow(undefined)
formRef?.current?.resetFields()
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
}
}
// 拿到完整的列表数据
const handleGetAllTypeData = async () => {
const req = {
FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE',
FIELDEXPLAIN_ID: "",
FIELDENUM_PID: "",
FIELDENUM_STATUS: 1,
SearchKey: ""
}
const data = await handeGetNestingFIELDENUMListNoEncryption(req);
setTableData(data)
}
return (
<PageContainer header={{
title: '',
breadcrumb: {}
}}>
<ProTable
style={{ height: 'calc(100vh - 135px)', background: '#fff' }}
scroll={{ y: 'calc(100vh - 410px)' }}
rowKey={(record) => {
return `${record?.FIELDENUM_PID}-${record?.FIELDENUM_ID}`
}}
formRef={formRef}
headerTitle={<PageTitleBox props={props} />} // 列表表头
actionRef={actionRef}
search={{ span: 6, labelWidth: 'auto' }}
bordered
// 请求数据
request={async (params, sorter) => {
const req = {
FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE',
FIELDEXPLAIN_ID: "",
FIELDENUM_PID: "",
FIELDENUM_STATUS: params?.FIELDENUM_STATUS,
SearchKey: ""
}
const data = await handeGetNestingFIELDENUMListNoEncryption(req);
handleSetlogSave(`点击查询按钮`)
console.log('datadatadatadatadata', data);
if (data && data.length > 0) {
setTypeTreeData(data)
handleGetAllTypeData()
return { data: data, success: true, total: data.length }
}
return { data: [], success: true }
}}
columns={columns}
toolbar={{
actions: [
// 新增按钮
<Button
key="new"
icon={<PlusOutlined />}
type="primary"
onClick={() => {
handleModalVisible(true);
}}
>
</Button>,
],
}}
/>
{/* 图片预览组件 */}
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
<Image.PreviewGroup
preview={{
visible: imagePreviewVisible,
onVisibleChange: vis => {
handleChangePreview(vis)
}
}}>
{
fileList.map((n) => <Image src={n.url} key={n.url} />)
}
</Image.PreviewGroup>
</div>}
<Modal
title={
<div
className='membershipLevel'
style={{
width: '100%',
cursor: 'move',
}}
onMouseOver={() => {
if (disabled) {
setDraggleDisabled(false)
}
}}
onMouseOut={() => {
setDraggleDisabled(true)
}}
onFocus={() => { }}
onBlur={() => { }}
>
{currentRow ? '更新操作类型' : '新建操作类型'}
</div>
}
destroyOnClose={true}
width={900}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
visible={modalVisible}
confirmLoading={confirmLoading}
afterClose={() => {
formRef.current?.resetFields();
setCurrentRow(undefined);
}}
footer={<ModalFooter
hideDelete={!currentRow?.FIELDENUM_ID}
handleDelete={async () => {
await handelDelete(currentRow?.FIELDENUM_ID)
}}
handleCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
}}
handleOK={() => {
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}
/>}
onCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
setFormPRESALE_TYPE(false)
setFileList([])
}}
onOk={async () => { // 提交框内的数据
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle='.membershipLevel'
>
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
>
<ProForm
layout={'horizontal'}
formRef={formRef}
autoFocusFirstInput
labelCol={{ style: { width: 80 } }}
submitter={false}
preserve={false}
initialValues={currentRow ? {
...currentRow,
} : {
FIELDENUM_STATUS: 1,
FIELDENUM_PID: -1
}}
onFinish={async (values) => {
let newValue = { ...values };
if (currentRow) {
// 编辑数据
newValue = { ...values, FIELDENUM_ID: currentRow.FIELDENUM_ID };
}
// 如果有开关,要把开关的代码写进去
await handleAddUpdate(newValue);
handleConfirmLoading(false)
setFormPRESALE_TYPE(false)
}}
>
<Row gutter={8}>
<Col span={12}>
<ProFormTreeSelect
name="FIELDENUM_PID"
label="上级类别"
request={async () => {
let list: any = [{
FIELDENUM_NAME: "默认类别",
FIELDENUM_ID: -1,
children: tableData
}]
return list
// if (typeTreeData && typeTreeData.length > 0) {
// let list: any = [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }, ...typeTreeData]
// return list
// } else {
// const req = {
// FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE',
// FIELDEXPLAIN_ID: "",
// FIELDENUM_PID: "",
// FIELDENUM_STATUS: 1,
// SearchKey: ""
// }
// const data = await handeGetNestingFIELDENUMList(req);
// if (data && data.length > 0) {
// data.unshirft({ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 })
// setTypeTreeData(data)
// return data
// } else {
// return [{ FIELDENUM_NAME: "默认类别", FIELDENUM_ID: -1 }]
// }
// }
}}
fieldProps={{
// treeData: tableData,
fieldNames: {
label: 'FIELDENUM_NAME',
value: 'FIELDENUM_VALUE',
children: 'children'
},
treeDefaultExpandAll: true,
showSearch: true,
filterTreeNode: (input, node) =>
(node.FIELDENUM_NAME || '').toLowerCase().includes(input.toLowerCase())
}}
rules={[
{
required: true,
message: "请选择上级类别"
}
]}
/>
</Col>
<Col span={12}>
<ProFormText
name="FIELDENUM_NAME"
label="类别名称"
rules={[
{
required: true,
message: "请输入类别名称"
}
]}
/>
</Col>
<Col span={12}>
<ProFormDigit
name="FIELDENUM_INDEX"
label="类别索引"
rules={[
{
required: true,
message: "请输入类别索引"
}
]}
/>
</Col>
<Col span={12}>
<ProFormDigit
name="FIELDENUM_VALUE"
label="类型枚举"
rules={[
{
required: true,
message: "请输入类型枚举"
}
]}
/>
</Col>
<Col span={12}>
<ProFormSelect
name="FIELDENUM_STATUS"
label="有效状态"
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
rules={[
{
required: true,
message: "请选择有效状态"
}
]}
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="FIELDENUM_DESC"
label="备注"
/>
</Col>
</Row>
</ProForm>
</Modal>
</PageContainer >
);
};
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(OperationTypeConfig);

View File

@ -165,6 +165,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => a.ORDER_AMOUNT - b.ORDER_AMOUNT,
},
{
title: "申请时间",
@ -173,6 +174,8 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
hideInSearch: true,
ellipsis: true,
align: "center",
sorter: (a, b) => new Date(a.ORDER_DATE).getTime() - new Date(b.ORDER_DATE).getTime(),
defaultSortOrder: 'descend',
render: (_, record) => {
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
}
@ -183,6 +186,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
width: 120,
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => new Date(a.RESERVATION_ENDDATE).getTime() - new Date(b.RESERVATION_ENDDATE).getTime(),
align: "center",
},
{

View File

@ -179,6 +179,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
width: 120,
ellipsis: true,
hideInSearch: true,
sorter: (a, b) => a.COMMODITY_RETAILPRICE - b.COMMODITY_RETAILPRICE,
},
{
dataIndex: 'COMMODITY_UNIT',
@ -217,6 +218,8 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
width: 180,
ellipsis: true,
hideInSearch: true,
sorter: (a, b) => new Date(a.OPERATE_DATE).getTime() - new Date(b.OPERATE_DATE).getTime(),
defaultSortOrder: 'descend',
},
{
dataIndex: 'SERVERPART_NAME',

View File

@ -112,7 +112,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
align: 'center',
ellipsis: true,
valueType: 'select',
valueEnum: MEMBERSHIPLEVELYNObj
valueEnum: MEMBERSHIPLEVELYNObj,
sorter: true
},
{
title: "会员类型",
@ -125,6 +126,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
valueEnum: {
...MEMBERSHIPTYPEYNObj,
},
sorter: true
},
{
title: "积分方式",
@ -134,11 +136,11 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
valueType: 'select',
align: 'center',
valueEnum: {
"0": "全部",
// "0": "全部",
"1": "累计",
"-1": "消耗"
},
initialValue: "0"
// initialValue: "0"
},
{
title: "积分来源",
@ -176,6 +178,19 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
}}>{record?.TICKET_CODE}</a> : "-"
}
},
{
title: "获取时间",
width: 150,
dataIndex: "CREATE_DATE",
hideInSearch: true,
align: 'center',
ellipsis: true,
render: (_, record) => {
return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
},
sorter: true,
defaultSortOrder: 'descend',
},
{
title: "本次积分",
width: 120,
@ -183,7 +198,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: "digit"
valueType: "digit",
sorter: true
},
{
title: "累计积分",
@ -192,7 +208,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: "digit"
valueType: "digit",
sorter: true
},
{
title: "实付金额",
@ -201,7 +218,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: "digit"
valueType: "digit",
sorter: true
},
{
title: "服务区名称",
@ -219,17 +237,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
ellipsis: true,
align: 'center',
},
{
title: "获取时间",
width: 150,
dataIndex: "CREATE_DATE",
hideInSearch: true,
align: 'center',
ellipsis: true,
render: (_, record) => {
return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
}
},
]
const handleCloseModal = () => {
@ -266,14 +274,20 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
expandRowByClick: true
}}
headerTitle={isComponent ? '' : <PageTitleBox props={props} />}
search={isComponent ? false : { span: 6 }}
scroll={{ x: '100%', y: isComponent ? height ? `${height}` : '300px' : 'calc(100vh - 430px)' }}
search={isComponent ? false : { span: 6, defaultCollapsed: false }}
scroll={{ x: '100%', y: isComponent ? height ? `${height}` : '300px' : 'calc(100vh - 480px)' }}
options={isComponent ? false : {
density: true,
reload: true,
setting: true
}}
request={async (params) => {
request={async (params, sorter) => {
const sortstr = Object.keys(sorter).map(n => {
const value = sorter[n]
return value ? `${n} ${value.replace('end', '')}` : ''
})
const req: any = isComponent ? searchReq ? {
...searchReq,
PageIndex: params?.current,
@ -285,8 +299,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
},
PageIndex: params?.current,
PageSize: 20,
sortstr: "OPERATE_DATE desc",
// sortstr: "OPERATE_DATE desc",
sortStr: sortstr.toString()
} : {
SearchParameter: {
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
@ -298,7 +312,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
},
PageIndex: params?.current,
PageSize: 20,
sortstr: "OPERATE_DATE desc",
// sortstr: "OPERATE_DATE desc",
sortStr: sortstr.toString(),
keyWord: {
Key: "MEMBERSHIP_NAME,SHOPNAME",
Value: params?.searchText

View File

@ -249,8 +249,9 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
title: '',
breadcrumb: {}
}}>
{/* height: 'calc(100vh - 135px)', */}
<ProTable
style={{ height: 'calc(100vh - 135px)', background: '#fff' }}
style={{ background: '#fff' }}
scroll={{ y: 'calc(100vh - 410px)' }}
rowKey={(record) => {
return `${record?.FIELDENUM_PID}-${record?.FIELDENUM_ID}`
@ -303,7 +304,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
handleModalVisible(true);
}}
>
</Button>,
],
}}
@ -345,7 +346,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
onFocus={() => { }}
onBlur={() => { }}
>
{currentRow ? '更新售后类别' : '新建售后类别'}
{currentRow ? '更新积分类型' : '新建积分类型'}
</div>
}
destroyOnClose={true}

View File

@ -116,14 +116,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
// </a> : '-'
// }
// },
{
dataIndex: 'MEMBERSHIP_LEVEL',
title: '会员等级',
width: 120,
align: 'center',
valueType: 'select',
valueEnum: MEMBERSHIPLEVELYNObj
},
{
dataIndex: 'MEMBERSHIP_TYPE',
title: '会员类型',
@ -132,9 +124,17 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
valueType: 'select',
valueEnum: MEMBERSHIPTYPEYNObj
},
{
dataIndex: 'MEMBERSHIP_LEVEL',
title: '会员等级',
width: 120,
align: 'center',
valueType: 'select',
valueEnum: MEMBERSHIPLEVELYNObj
},
{
dataIndex: 'EXCHANGE_BASE',
title: '兑换基数',
title: '积分兑换基数',
width: 120,
tooltip: "每1个[兑换单位]可获得的积分数(具体单位由业务决定,如:元、次、件等)",
align: 'center',
@ -142,7 +142,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
},
{
dataIndex: 'CONVERTIBLE_PROPORTION',
title: '兑换比例',
title: '成长值兑换基数',
width: 120,
align: 'center',
hideInSearch: true,
@ -367,7 +367,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
// 判断 会员类型、会员等级、规则类型 是否一致
if (Number(tableItem.MEMBERSHIP_TYPE) === Number(item.value) && Number(subItem?.value) === Number(tableItem.MEMBERSHIP_LEVEL) && Number(newValue?.SCORE_TYPE) === Number(tableItem.SCORE_TYPE) && tableItem.SCORESETTING_STATE === 1) {
console.log('tableItemtableItemtableItem', tableItem);
// 而且这一项的 枚举类型 不能是所有类型 和 所有等级
req = {
...tableItem
}
@ -383,7 +383,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
MEMBERSHIP_TYPE: item.value,
MEMBERSHIP_LEVEL: subItem.value
})
reqListUpdateMsg.push(`${item.label}${subItem.label}${SCORETYPEObj[newValue.SCORE_TYPE]}`)
reqListUpdateMsg.push(`${item.label}${subItem.label}${SCORETYPEObj && SCORETYPEObj[newValue.SCORE_TYPE] ? SCORETYPEObj[newValue.SCORE_TYPE] : "-"}`)
} else {
req = {
...newValue,
@ -391,7 +391,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
MEMBERSHIP_LEVEL: subItem.value
}
reqList.push(req)
reqListAddMsg.push(`${item.label}${subItem.label}${SCORETYPEObj[newValue.SCORE_TYPE]}`)
reqListAddMsg.push(`${item.label}${subItem.label}${SCORETYPEObj && SCORETYPEObj[newValue.SCORE_TYPE] ? SCORETYPEObj[newValue.SCORE_TYPE] : "-"}`)
}
})
@ -452,6 +452,25 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
return true
}
// 拿到最全的规则的数据
const handleGetAllRuleData = async () => {
const searchWholeParams = {
searchParameter: {
SCORE_TYPES: "",
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
SCORESETTING_STATE: '',
MEMBERSHIP_TYPE: "",
MEMBERSHIP_LEVEL: "",
},
PageIndex: 1,
PageSize: 999999,
SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL desc",
}
const data = await handleGetSCORESETTINGList(searchWholeParams);
setTableData(data.List)
}
return (
<PageContainer header={{
@ -459,8 +478,8 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
breadcrumb: {}
}}>
<ProTable
style={{ height: 'calc(100vh - 135px)', background: '#fff' }}
scroll={{ y: 'calc(100vh - 410px)' }}
style={{ height: 'calc(100vh - 170px)', background: '#fff' }}
scroll={{ y: 'calc(100vh - 490px)' }}
rowKey={(record) => {
return `${record?.SCORESETTING_ID}`
}}
@ -468,31 +487,29 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
formRef={formRef}
headerTitle={<PageTitleBox props={props} />}
actionRef={actionRef}
search={{ span: 6, labelWidth: 'auto' }}
search={{ span: 6, labelWidth: 'auto', defaultCollapsed: false }}
// 请求数据
request={async (params, sorter) => {
console.log('paramsparamsparams', params);
const searchWholeParams = {
searchParameter: {
SCORE_TYPES: params?.SCORE_TYPE || "",
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
SCORESETTING_STATE: params?.SCORESETTING_STATE,
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE || "",
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL || "",
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === '1' ? '' : params?.MEMBERSHIP_TYPE || "",
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === '1' ? '' : params?.MEMBERSHIP_LEVEL || "",
},
PageIndex: 1,
PageSize: 999999,
SortStr: "OPERATE_DATE desc"
SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL desc",
}
setSearchParams(searchWholeParams)
const data = await handleGetSCORESETTINGList(searchWholeParams);
handleSetlogSave(`点击查询按钮`)
if (data.List && data.List.length > 0) {
if (isFirst) {
setTableData(data.List)
setIsFirst(false)
}
handleGetAllRuleData()
return { data: data.List, success: true, total: data.TotalCount }
}
return { data: [], success: true }
@ -651,7 +668,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
let levelList: any = []
// 等级选择所有 和 选择单个的情况
if (newValue.MEMBERSHIP_LEVEL === 1) {
if (Number(newValue.MEMBERSHIP_LEVEL) === 1) {
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
if (MEMBERSHIPLEVELYNList && MEMBERSHIPLEVELYNList.length > 0) {
MEMBERSHIPLEVELYNList.forEach((item: any) => {
@ -668,7 +685,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
}
// 会员类型选择 所有和单个
if (newValue.MEMBERSHIP_TYPE === 1) {
if (Number(newValue.MEMBERSHIP_TYPE) === 1) {
let list: any = JSON.parse(JSON.stringify(MEMBERSHIPTYPEYNList))
if (list && list.length > 0) {
list.forEach((item: any) => {
@ -849,7 +866,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
</Modal>
<Modal
title={"成长值枚举配置"}
title={"积分类别枚举配置"}
destroyOnClose={true}
width={1200}
bodyStyle={{

View File

@ -133,6 +133,17 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
// 定义列表字段内容
const columns: any = [
{
dataIndex: 'searchText',
title: '查询内容',
align: 'center',
hideInTable: true,
width: 120,
ellipsis: true,
fieldProps: {
placeholder: "请输入商品名称/品牌名称"
}
},
{
dataIndex: 'index',
title: '序号',
@ -690,6 +701,11 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
COMMODITY_TYPE: 4000,
COMMODITY_STATE: 1,
},
keyWord: {
Key: "COMMODITY_NAME,BRAND_NAME,USERDEFINEDTYPE_NAME",
Value: params?.searchText || ""
},
PageIndex: 1,
PageSize: 999999,
}

View File

@ -0,0 +1,420 @@
// 商品预警规则设置
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, PlusOutlined } from "@ant-design/icons";
import type { FormInstance } from "antd";
import { Button, Col, message, Modal, Row, 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 ModalFooter from "../scenicSpotConfig/component/modalFooter";
import Draggable from "react-draggable";
import ProForm, { ProFormDigit, ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
import { handleSetlogSave } from "@/utils/format";
import { handeGetCOMMODITYWARNINGList, handeGetDeleteCOMMODITYWARNING, handeSynchroCOMMODITYWARNING } from "../service";
const ProductWarningRuleSetting: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
const [currentRow, setCurrentRow] = useState<any>();
// 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>()
// 查询的条件
const [searchParams, setSearchParams] = useState<any>()
const [modalVisible, handleModalVisible] = useState<boolean>(false);
// 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const draggleRef = React.createRef<any>()
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: "预警名称",
width: 150,
align: 'center',
dataIndex: "WARNING_NAME",
hideInSearch: true,
ellipsis: true,
render: (_, record) => {
return record?.WARNING_NAME ? <a onClick={() => {
setCurrentRow(record)
handleModalVisible(true)
}}>
{record?.WARNING_NAME}
</a> : "-"
}
},
{
title: "显示顺序",
width: 150,
align: 'center',
dataIndex: "WARNING_INDEX",
hideInSearch: true,
ellipsis: true,
},
{
title: "商品结算单位",
width: 150,
align: 'center',
dataIndex: "STATISTIC_UNIT",
hideInSearch: true,
ellipsis: true,
},
{
title: "商品销售单位",
width: 150,
align: 'center',
dataIndex: "COMMODITY_UNIT",
hideInSearch: true,
ellipsis: true,
},
{
title: "商品折算数量",
width: 150,
align: 'center',
dataIndex: "CONVERT_COUNT",
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.CONVERT_COUNT - b.CONVERT_COUNT
},
{
title: "自动预警数量",
width: 150,
align: 'center',
dataIndex: "WARNING_COUNT",
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.WARNING_COUNT - b.WARNING_COUNT
},
{
title: "自动预警期限",
width: 150,
align: 'center',
dataIndex: "WARNING_DAYS",
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.WARNING_DAYS - b.WARNING_DAYS
}
]
// 同步点餐列表
const handleAddUpdate = async (res: any) => {
let req: any = {}
if (currentRow?.COMMODITYWARNING_ID) {
req = {
...currentRow,
...res,
}
} else {
req = {
...res,
}
}
const data = await handeSynchroCOMMODITYWARNING(req)
handleConfirmLoading(false)
if (data.Result_Code === 100) {
message.success("新增成功!")
handleSetlogSave(`${currentRow?.COMMODITYWARNING_ID ? '更新' : '新增'}${data.Result_Data?.WARNING_NAME}】规则`)
setCurrentRow(undefined)
formRef?.current?.resetFields()
handleModalVisible(false)
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
}
}
const handelDelete = async (id: number) => {
const result = await handeGetDeleteCOMMODITYWARNING({
COMMODITYWARNINGId: id
});
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
} else {
message.success('删除成功!');
handleSetlogSave(`删除【${currentRow?.WARNING_NAME}】规则`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
}
};
return (
<div ref={(el) => {
// 打印报表
if (!reqDetailList || reqDetailList.length === 0) return;
setPrintOut(el);
}} >
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
<div style={{
width: '100%',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
}}>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
search={{ span: 6 }}
request={async (params) => {
let req: any = {
searchParameter: {
WARNING_VALID: 1
},
PageIndex: 1,
PageSize: 999999,
keyWord: {
Key: "WARNING_NAME",
Value: params?.searchText || ""
},
SortStr: "WARNING_INDEX asc"
}
setSearchParams(params)
const data = await handeGetCOMMODITYWARNINGList(req)
console.log('datadatadatadata', data);
if (data && data.length > 0) {
return { data, success: true }
}
return { data: [], success: true }
}}
toolbar={{
actions: [
<Button
key="new"
icon={<PlusOutlined />}
type="primary"
onClick={() => {
handleModalVisible(true);
}}
>
</Button>,
]
}}
/>
</div>
</div>
<Modal
title={
<div
className='orderCategoryModal'
style={{
width: '100%',
cursor: 'move',
}}
onMouseOver={() => {
if (disabled) {
setDraggleDisabled(false)
}
}}
onMouseOut={() => {
setDraggleDisabled(true)
}}
onFocus={() => { }}
onBlur={() => { }}
>
{currentRow ? '更新商品预警类型' : '新建商品预警类型'}
</div>
}
destroyOnClose={true}
width={900}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
visible={modalVisible}
confirmLoading={confirmLoading}
afterClose={() => {
formRef.current?.resetFields();
setCurrentRow(undefined);
}}
footer={<ModalFooter
hideDelete={!currentRow?.COMMODITYWARNING_ID}
handleDelete={async () => {
await handelDelete(currentRow?.COMMODITYWARNING_ID)
}}
handleCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
formRef.current?.resetFields();
setCurrentRow(undefined);
}}
handleOK={() => {
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}
/>}
onCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
}}
onOk={async () => { // 提交框内的数据
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle='.orderCategoryModal'
>
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
>
<ProForm
layout={'horizontal'}
formRef={formRef}
autoFocusFirstInput
labelCol={{ style: { width: 120 } }}
submitter={false}
preserve={false}
initialValues={currentRow ? {
...currentRow,
} : {
FIELDENUM_STATUS: 1,
}}
onFinish={async (values) => {
let newValue = { ...values };
if (currentRow) {
// 编辑数据
newValue = { ...values, FIELDENUM_ID: currentRow.FIELDENUM_ID };
}
// 如果有开关,要把开关的代码写进去
await handleAddUpdate(newValue);
handleConfirmLoading(false)
}}
>
<Row gutter={8}>
<Col span={12}>
<ProFormText
name="WARNING_NAME"
label="预警名称"
rules={[
{
required: true,
message: "请输入预警名称"
}
]}
/>
</Col>
<Col span={12}>
<ProFormDigit
name="WARNING_INDEX"
label="显示顺序"
/>
</Col>
<Col span={12}>
<ProFormText
name="STATISTIC_UNIT"
label="商品结算单位"
/>
</Col>
<Col span={12}>
<ProFormText
name="COMMODITY_UNIT"
label="商品销售单位"
/>
</Col>
<Col span={12}>
<ProFormText
name="CONVERT_COUNT"
label="商品折算数量"
/>
</Col>
<Col span={12}>
<ProFormText
name="WARNING_COUNT"
label="自动预警数量"
/>
</Col>
<Col span={12}>
<ProFormText
name="WARNING_DAYS"
label="自动预警期限"
/>
</Col>
<Col span={12}>
<ProFormSelect
name="WARNING_VALID"
label="有效状态"
options={[{ label: "有效", value: 1 }, { label: '无效', value: 0 }]}
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="WARNING_DESC"
label="备注"
/>
</Col>
</Row>
</ProForm>
</Modal>
</div>
)
}
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(ProductWarningRuleSetting);

View File

@ -18,6 +18,7 @@ import PageTitleBox from "@/components/PageTitleBox";
import { handleGetBEHAVIORRECORDList } from "@/pages/Setting/OperationLog/service";
import MemberDetail from "../memberInfor/component/memberDetail";
import { handleSetlogSave } from "@/utils/format";
import { handeGetNestingFIELDENUMListNoEncryption } from "../service";
const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComponent?: Boolean, parentDetail?: any }> = (props) => {
@ -134,15 +135,36 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
dataIndex: 'BEHAVIORRECORD_TYPE',
// hideInSearch: true,
width: 100,
valueType: 'select',
valueType: 'treeSelect',
align: 'center',
valueEnum: {
"1000": '操作',
"1001": '编辑',
"1002": '删除',
"2000": '查询'
request: async () => {
const req = {
FIELDEXPLAIN_FIELD: 'BEHAVIORRECORD_TYPE',
FIELDEXPLAIN_ID: "",
FIELDENUM_PID: "",
FIELDENUM_STATUS: 1,
SearchKey: ""
}
const data = await handeGetNestingFIELDENUMListNoEncryption(req);
console.log('djskadjsaivbsjavbcv', data);
return data
},
initialValue: "2000",
// valueEnum: {
// "1000": '操作',
// "1001": '编辑',
// "1002": '删除',
// "2000": '查询'
// },
initialValue: 1000,
fieldProps: {
fieldNames: {
label: 'FIELDENUM_NAME',
value: 'FIELDENUM_VALUE',
children: 'children'
},
treeDefaultExpandAll: true,
}
},
{
title: '操作人员',
@ -164,6 +186,8 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
{
title: '操作地址',
hideInSearch: true,
// hideInTable: isComponent,
hideInTable: true,
dataIndex: 'USER_LOGINIP',
align: 'center',
width: 150,
@ -211,6 +235,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
align: 'center',
dataIndex: 'BEHAVIORRECORD_TIME',
hideInSearch: true,
sorter: true,
render: (_, record) => {
return record?.BEHAVIORRECORD_TIME
}
@ -473,7 +498,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME_Start).format('YYYY-MM-DD'),
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME_End).format('YYYY-MM-DD'),
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
// BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
},
SortStr: 'BEHAVIORRECORD_TIME desc',
KeyWord: {

View File

@ -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;
}
}
}
}
}
}
}

View File

@ -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<FormInstance>();
const actionRef = useRef<ActionType>();
// 选择的tab
const [selectPageTab, setSelectPageTab] = useState<any>(1)
// 会员类型数据
const [membershipType, setMembershipType] = useState<any>()
// 会员数量
const [memberShipTotal, setMemberShipTotal] = useState<number>(1)
// 会员等级数据
const [revenueList, setRevenueList] = useState<any>()
// 显示详情抽屉
const [showDetail, setShowDetail] = useState<boolean>(false)
const [currentRow, setCurrentRow] = useState<any>()
// 抽屉显示的标题
const [currentDrawerTitle, setCurrentDrawerTitle] = useState<string>()
// 1 是 会员类型 2是 会员等级
const [searchType, setSearchType] = useState<any>()
// 对应的枚举类型
const [valueType, setValueType] = useState<any>()
// 显示加载效果
const [showLoading, setShowLoading] = useState<boolean>(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 (
<div className="ActiveMemberStatisticsMain">
{
showLoading ?
<div
style={{
width: '100%',
height: '100%',
background: 'rgba(0,0,0,0.1)',
position: 'absolute',
zIndex: 5,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}
>
<div style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '15px 20px 10px',
background: '#fff',
borderRadius: '8px',
width: '200px'
}}>
<Spin />
<span style={{ marginLeft: '5px' }}>...</span>
</div>
</div> : ''
}
<div className="ActiveMemberStatisticsTop">
{/* <div className="ActiveMemberStatisticsTitleBox">
<div className={selectPageTab === 1 ? 'ActiveMemberStatisticsTitle ActiveMemberStatisticsTitleSelect' : 'ActiveMemberStatisticsTitle'} onClick={() => {
setSelectPageTab(1)
}}></div>
<div style={{ marginLeft: '48px' }} className={selectPageTab === 2 ? 'ActiveMemberStatisticsTitle ActiveMemberStatisticsTitleSelect' : 'ActiveMemberStatisticsTitle'} onClick={() => {
setSelectPageTab(2)
}}></div>
</div> */}
<ProForm
layout={'horizontal'}
formRef={formRef}
submitter={false}
onFinish={async (values: any) => {
console.log('valuesvaluesvaluesvalues', values);
handleGetData(values)
}}
>
<Row gutter={16} style={{ marginTop: "16px" }}>
<Col span={6}>
<ProFormDateRangePicker
label={"查询时间"}
name={"searchTime"}
// initialValue={[moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]}
initialValue={[moment().startOf('M'), moment()]}
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')],
}
}}
/>
</Col>
<Col span={6}>
<ProFormSelect
label={"会员类型"}
name={"MembershipType"}
options={MEMBERSHIPTYPEYNList}
/>
</Col>
{/* <Col span={6}>
<ProFormSelect
label={"会员等级"}
name={"MembershipLevel"}
options={MEMBERSHIPLEVELYNList}
/>
</Col> */}
<Col span={6}>
<ProFormSelect
label={"是否排除测试会员"}
name={"ExcludeTest"}
options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]}
initialValue={1}
/>
</Col>
{/* <Col span={18}></Col> */}
<Col span={6}>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Button style={{ marginRight: '8px' }} onClick={() => {
formRef.current?.resetFields()
}}></Button>
<Button type={"primary"} onClick={() => {
formRef.current?.submit()
}}></Button>
</div>
</Col>
</Row>
</ProForm>
</div>
<div className="ActiveMemberStatisticsBottom">
{
membershipType && membershipType.length > 0 ?
<>
<div className="ActiveMemberStatisticsTitleBox">
<div className="ActiveMemberStatisticsTitle"></div>
</div>
<div className="ActiveMemberStatisticsContentBox">
<div className="ActiveMemberStatisticsItemOther">
{
membershipType.map((item: any) => {
return <div className="ActiveMemberStatisticsOtherItem">
<div className="otherItemTitle">{item.label || ''}</div>
<div className="otherItemValue">{item.value}<span className="otherItemValueUnit"></span></div>
<div className="addLabel"></div>
<div className="otherItemAddBox">
<span className="addValue">{item.key ? item.key + '%' : ""}</span>
</div>
</div>
})
}
</div>
</div>
</>
: ""
}
</div>
<div className="ActiveMemberStatisticsBottom">
{
revenueList && revenueList.length > 0 ?
<>
<div className="ActiveMemberStatisticsTitleBox">
<div className="ActiveMemberStatisticsTitle"></div>
</div>
<div className="ActiveMemberStatisticsContentBox">
<div className="ActiveMemberStatisticsItemOther">
{
revenueList.map((item: any) => {
return <div className="ActiveMemberStatisticsOtherItem">
<div className="otherItemTitle">{item.label}</div>
<div className="otherItemValue">{item.value}<span className="otherItemValueUnit"></span></div>
<div className="addLabel"></div>
<div className="otherItemAddBox">
<span className="addValue">{item.key ? item.key + '%' : ""}</span>
</div>
</div>
})
}
</div>
</div>
</>
: ""
}
</div>
<Drawer
width={'80%'}
title={currentDrawerTitle || ""}
visible={showDetail}
destroyOnClose
closable={false}
onClose={() => {
setSearchType(null)
setValueType(null)
setShowDetail(false)
}}
>
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} />
</Drawer>
</div >
)
}
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(RegistrationStatistics);

View File

@ -104,49 +104,10 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
title: '销售数量',
align: 'center',
hideInSearch: true,
width: 250,
width: 200,
sorter: (a, b) => a.TOTAL_COUNT - b.TOTAL_COUNT,
ellipsis: true,
},
{
dataIndex: 'ORDER_AMOUNT',
title: '订单金额',
align: 'center',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
dataIndex: 'COUPON_AMOUNT',
title: '优惠金额',
align: 'center',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
dataIndex: 'PAY_AMOUNT',
title: '实付金额',
align: 'center',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
title: "获得积分",
dataIndex: "MEMBERSHIP_POINT",
width: 120,
hideInSearch: true,
ellipsis: true,
align: "center",
},
{
title: "获得成长值",
dataIndex: "MEMBERGROWTH_VALUE",
width: 120,
hideInSearch: true,
ellipsis: true,
align: "center",
},
{
dataIndex: 'ORDER_DATE',
title: '订单时间',
@ -156,14 +117,64 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
ellipsis: true,
render: (_, record) => {
return record?.SALEBILL_CODE === '合计' ? '' : record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : ''
}
},
sorter: (a, b) => new Date(a.ORDER_DATE).getTime() - new Date(b.ORDER_DATE).getTime(),
defaultSortOrder: 'descend',
},
{
dataIndex: 'ORDER_AMOUNT',
title: '订单金额',
align: 'center',
hideInSearch: true,
width: 120,
// sorter: true,
sorter: (a, b) => a.ORDER_AMOUNT - b.ORDER_AMOUNT,
ellipsis: true,
},
{
dataIndex: 'COUPON_AMOUNT',
title: '优惠金额',
align: 'center',
hideInSearch: true,
width: 120,
sorter: (a, b) => a.COUPON_AMOUNT - b.COUPON_AMOUNT,
ellipsis: true,
},
{
dataIndex: 'PAY_AMOUNT',
title: '实付金额',
align: 'center',
hideInSearch: true,
width: 120,
sorter: (a, b) => a.PAY_AMOUNT - b.PAY_AMOUNT,
ellipsis: true,
},
{
title: "获得积分",
dataIndex: "MEMBERSHIP_POINT",
width: 120,
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.MEMBERSHIP_POINT - b.MEMBERSHIP_POINT,
align: "center",
},
{
title: "获得成长值",
dataIndex: "MEMBERGROWTH_VALUE",
width: 120,
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.MEMBERGROWTH_VALUE - b.MEMBERGROWTH_VALUE,
align: "center",
},
{
dataIndex: 'SALEBILL_STATE',
title: '订单状态',
align: 'center',
width: 120,
ellipsis: true,
sorter: (a, b) => a.SALEBILL_STATE - b.SALEBILL_STATE,
valueType: 'select',
valueEnum: {
"0": "全部",
@ -523,9 +534,8 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
<div className="SummaryOfReservationBottom">
<ProTable
scroll={{ x: "100%", y: 'calc(100vh - 500px)' }}
scroll={{ x: "100%", y: 'calc(100vh - 590px)' }}
rowKey={(record) => `${record?.SALEBILL_CODE}-${record?.ORDER_DATE}`}
formRef={formRef}
bordered
@ -533,6 +543,14 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
search={false}
options={false}
request={async (params, sorter) => {
const sortstr = Object.keys(sorter).map(n => {
const value = sorter[n]
return value ? `${n} ${value.replace('end', '')}` : ''
})
console.log('sortstrsortstrsortstr', sortstr);
const req = {
searchParameter: {
SALEBILL_TYPES: selectPageTab === 1 ? 6000 : "3000,3001,3002",
@ -553,7 +571,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
},
PageIndex: 1,
PageSize: 999999,
SortStr: "ORDER_DATE desc",
// sortStr: sortstr.toString()
}
const data = await handeGetSaleBillWholeList(req)

View File

@ -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;
}
}
}

View File

@ -1,12 +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, isComponent?: boolean, parentDetail?: any, come?: string }> = (props) => {
const draggleRef = React.createRef<any>()
// come 来自哪里
const { currentUser, isComponent, parentDetail, come } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const modalFormRef = useRef<FormInstance>();
const [collapsible, setCollapsible] = useState<boolean>(false)
// 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
// 显示回复抽屉
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
// 点击的当前数据
const [currentRow, setCurrentRow] = useState<any>()
// 评论的附件
const [fileList, setFileList] = useState<any>()
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
const [priviewImage, setPriviewImage] = useState<string>(); // 预览的图片地址
// 删除回复的加载效果
const [deleteREPLYLoading, setDeleteREPLYLoading] = useState<boolean>(false)
const MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
// 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>()
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 ? <a onClick={() => {
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}</a> : "-"
}
},
// {
// 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)
}
const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
return (
<div>
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
{
isComponent ? '' :
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
</div>
}
<div style={{
width: isComponent ? '100%' : !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
}}>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
options={false}
scroll={{ x: "100%", y: isComponent ? '300px' : "calc(100vh - 410px)" }}
headerTitle={isComponent ? '' : <PageTitleBox props={props} />} // 列表表头
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: [
]
}}
/>
</div>
</div>
{/* 图片预览组件 */}
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
<Image.PreviewGroup
preview={{
visible: imagePreviewVisible,
onVisibleChange: vis => {
handleChangePreview(vis)
}
}}>
{
fileList.map((n) => <Image src={n.url} key={n.url} />)
}
</Image.PreviewGroup>
</div>}
<Modal
title={
<div
className="SummaryofMerchantReviews"
>
</div>
}
destroyOnClose={true}
width={900}
visible={showDetailDrawer}
afterClose={() => {
}}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
onCancel={() => {
setShowDetailDrawer(false)
setCurrentRow(undefined);
setFileList([])
}}
footer={false}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle=".SummaryofMerchantReviews"
>
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
>
<ProForm
formRef={modalFormRef}
submitter={false}
labelCol={{ style: { width: 80 } }}
initialValues={currentRow}
onFinish={async (res: any) => {
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 {}
// }
// }}
>
<Row>
<Col span={24}>
<ProFormTextArea
label={"评论内容"}
name={"COMMENT_CONTENT"}
readonly
/>
</Col>
<Col span={24}>
<ProFormUploadButton
label={""}
name={"ImageList"}
disabled
readonly
max={0}
fileList={fileList || []}
listType="picture-card"
accept="image/*"
fieldProps={{
onPreview: handlePreview,
}}
/>
</Col>
<Col span={24} className="proformList">
<ProFormList
name="ReplyList"
label="回复评价"
copyIconProps={false}
deleteIconProps={false}
// creatorButtonProps={{
// position: 'bottom',
// creatorButtonText: '新增一条回复',
// }}
creatorButtonProps={false}
style={{ width: '100%' }}
itemContainerStyle={{ width: '100%' }}
>
{(field, index, action) => {
const isInitialItem = index < (currentRow?.ReplyList?.length || 0);
return (
<div
key={field.key}
style={{
width: '100%',
display: 'flex',
alignItems: 'flex-start',
marginBottom: '10px',
padding: '12px',
borderRadius: '4px'
}}
>
<div style={{ flex: 1 }}>
<ProFormTextArea
name={"REPLY_CONTENT"} // 确保使用 field.name
placeholder="请输入回复内容"
readonly={isInitialItem} // 直接使用 isInitialItem
readonly
fieldProps={{
style: { width: '100%' },
autoSize: { minRows: 3, maxRows: 6 },
}}
rules={[{ required: true, message: '请输入回复内容' }]}
/>
</div>
<div style={{
width: '50px',
marginLeft: '8px',
gap: '8px'
}}>
{/* {isInitialItem ? (
<Button
danger
loading={deleteREPLYLoading}
onClick={async () => {
const replyId = currentRow?.ReplyList?.[index]?.REPLY_ID;
if (replyId) {
const success = await handleDeleteEvaluationREPLY(replyId);
if (success) {
action?.remove(index);
}
} else {
action?.remove(index);
}
}}
>
</Button>
) : (
<Button
danger
onClick={() => action?.remove(index)}
>
</Button>
)} */}
</div>
</div>
);
}}
</ProFormList>
</Col>
{/* <Col span={24}>
<ProFormTextArea
label={"回复评价"}
name={"ReplyToEvaluation"}
rules={[{
required: true,
message: '请输入回复内容'
}]}
readonly={currentRow?.ReplyList && currentRow?.ReplyList.length > 0 ? true : false}
/>
</Col> */}
</Row>
</ProForm>
</Modal >
</div >
)
}

View File

@ -182,7 +182,7 @@ const SupplierLeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser,
</div>
</div>}
colSpan={!collapsible ? "300px" : "60px"}
title={!collapsible ? "请选择服务区" : ""}
title={!collapsible ? "请选择供应商" : ""}
headerBordered
collapsed={collapsible}
>

View File

@ -1,3 +1,4 @@
// 供应商订单汇总
import { connect } from "umi";
import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect";
@ -122,6 +123,8 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalActualAmount.summaryData - b.TotalActualAmount.summaryData,
defaultSortOrder: 'descend',
},
{
dataIndex: ['TotalActualAmount', 'maxData'],
@ -131,6 +134,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalActualAmount.maxData - b.TotalActualAmount.maxData
},
{
dataIndex: ['TotalActualAmount', 'minData'],
@ -140,6 +144,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalActualAmount.maxData - b.TotalActualAmount.maxData
},
{
dataIndex: ['TotalActualAmount', 'avgData'],
@ -149,6 +154,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalActualAmount.avgData - b.TotalActualAmount.avgData
},
{
dataIndex: ['TotalActualAmount', 'YOYData'],
@ -158,6 +164,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalActualAmount.YOYData - b.TotalActualAmount.YOYData
},
{
dataIndex: ['TotalActualAmount', 'YOYDataAdd'],
@ -167,6 +174,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalActualAmount.YOYDataAdd - b.TotalActualAmount.YOYDataAdd,
render: (_, record) => {
return record?.TotalActualAmount?.YOYData && record?.TotalActualAmount?.summaryData ? (((record?.TotalActualAmount?.summaryData - record?.TotalActualAmount?.YOYData) / record?.TotalActualAmount?.YOYData) * 100).toFixed(2) + '%' : "-"
}
@ -179,6 +187,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalActualAmount.QOQData - b.TotalActualAmount.QOQData,
},
]
},
@ -195,6 +204,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccAmount.summaryData - b.TotalSuccAmount.summaryData,
},
{
dataIndex: ['TotalSuccAmount', 'maxData'],
@ -204,6 +214,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccAmount.maxData - b.TotalSuccAmount.maxData,
},
{
dataIndex: ['TotalSuccAmount', 'minData'],
@ -213,6 +224,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccAmount.minData - b.TotalSuccAmount.minData,
},
{
dataIndex: ['TotalSuccAmount', 'avgData'],
@ -222,6 +234,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccAmount.avgData - b.TotalSuccAmount.avgData,
},
{
dataIndex: ['TotalSuccAmount', 'YOYData'],
@ -231,6 +244,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccAmount.YOYData - b.TotalSuccAmount.YOYData,
},
{
dataIndex: ['TotalSuccAmount', 'YOYDataAdd'],
@ -240,6 +254,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccAmount.YOYDataAdd - b.TotalSuccAmount.YOYDataAdd,
render: (_, record) => {
return record?.TotalSuccAmount?.YOYData && record?.TotalSuccAmount?.summaryData ? (((record?.TotalSuccAmount?.summaryData - record?.TotalSuccAmount?.YOYData) / record?.TotalSuccAmount?.YOYData) * 100).toFixed(2) + '%' : "-"
}
@ -252,6 +267,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccAmount.QOQData - b.TotalSuccAmount.QOQData,
},
]
},
@ -268,6 +284,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccTicket.summaryData - b.TotalSuccTicket.summaryData,
},
{
dataIndex: ['TotalSuccTicket', 'maxData'],
@ -277,6 +294,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccTicket.maxData - b.TotalSuccTicket.maxData,
},
{
dataIndex: ['TotalSuccTicket', 'minData'],
@ -286,6 +304,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccTicket.minData - b.TotalSuccTicket.minData,
},
{
dataIndex: ['TotalSuccTicket', 'avgData'],
@ -295,6 +314,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccTicket.avgData - b.TotalSuccTicket.avgData,
},
{
dataIndex: ['TotalSuccTicket', 'YOYData'],
@ -304,6 +324,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccTicket.YOYData - b.TotalSuccTicket.YOYData,
},
{
dataIndex: ['TotalSuccTicket', 'YOYDataAdd'],
@ -313,6 +334,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
hideInSearch: true,
ellipsis: true,
sorter: (a, b) => a.TotalSuccTicket.YOYDataAdd - b.TotalSuccTicket.YOYDataAdd,
render: (_, record) => {
return record?.TotalSuccTicket?.YOYData && record?.TotalSuccTicket?.summaryData ? (((record?.TotalSuccTicket?.summaryData - record?.TotalSuccTicket?.YOYData) / record?.TotalSuccTicket?.YOYData) * 100).toFixed(2) + '%' : "-"
}
@ -324,6 +346,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalSuccTicket.QOQData - b.TotalSuccTicket.QOQData,
ellipsis: true,
},
]
@ -340,6 +363,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalCount.summaryData - b.TotalCount.summaryData,
ellipsis: true,
},
{
@ -349,6 +373,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalCount.maxData - b.TotalCount.maxData,
ellipsis: true,
},
{
@ -358,6 +383,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalCount.minData - b.TotalCount.minData,
ellipsis: true,
},
{
@ -367,6 +393,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalCount.avgData - b.TotalCount.avgData,
ellipsis: true,
},
{
@ -376,6 +403,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalCount.YOYData - b.TotalCount.YOYData,
ellipsis: true,
},
{
@ -385,6 +413,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalCount.YOYDataAdd - b.TotalCount.YOYDataAdd,
ellipsis: true,
render: (_, record) => {
return record?.TotalCount?.YOYData && record?.TotalCount?.summaryData ? (((record?.TotalCount?.summaryData - record?.TotalCount?.YOYData) / record?.TotalCount?.YOYData) * 100).toFixed(2) + '%' : "-"
@ -397,6 +426,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalCount.QOQData - b.TotalCount.QOQData,
ellipsis: true,
},
]
@ -412,6 +442,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
title: '合计值',
width: 120,
align: 'center',
sorter: (a, b) => a.TotalFailureTicket.summaryData - b.TotalFailureTicket.summaryData,
hideInSearch: true,
ellipsis: true,
},
@ -422,6 +453,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalFailureTicket.maxData - b.TotalFailureTicket.maxData,
ellipsis: true,
},
{
@ -431,6 +463,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalFailureTicket.minData - b.TotalFailureTicket.minData,
ellipsis: true,
},
{
@ -440,6 +473,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalFailureTicket.avgData - b.TotalFailureTicket.avgData,
ellipsis: true,
},
{
@ -447,6 +481,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
key: "TotalFailureTicket.YOYData",
title: '同比数值',
width: 120,
sorter: (a, b) => a.TotalFailureTicket.YOYData - b.TotalFailureTicket.YOYData,
align: 'center',
hideInSearch: true,
ellipsis: true,
@ -458,6 +493,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalFailureTicket.YOYDataAdd - b.TotalFailureTicket.YOYDataAdd,
ellipsis: true,
render: (_, record) => {
return record?.TotalFailureTicket?.YOYData && record?.TotalFailureTicket?.summaryData ? (((record?.TotalFailureTicket?.summaryData - record?.TotalFailureTicket?.YOYData) / record?.TotalFailureTicket?.YOYData) * 100).toFixed(2) + '%' : "-"
@ -468,6 +504,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
key: "TotalFailureTicket.QOQData",
title: '环比数值',
width: 120,
sorter: (a, b) => a.TotalFailureTicket.QOQData - b.TotalFailureTicket.QOQData,
align: 'center',
hideInSearch: true,
ellipsis: true,
@ -486,11 +523,13 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
width: 120,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TotalRefundTicket.summaryData - b.TotalRefundTicket.summaryData,
ellipsis: true,
},
{
dataIndex: ['TotalRefundTicket', 'maxData'],
key: "TotalRefundTicket.maxData",
sorter: (a, b) => a.TotalRefundTicket.maxData - b.TotalRefundTicket.maxData,
title: '最大值',
width: 120,
align: 'center',
@ -500,6 +539,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundTicket', 'minData'],
key: "TotalRefundTicket.minData",
sorter: (a, b) => a.TotalRefundTicket.minData - b.TotalRefundTicket.minData,
title: '最小值',
width: 120,
align: 'center',
@ -509,6 +549,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundTicket', 'avgData'],
key: "TotalRefundTicket.avgData",
sorter: (a, b) => a.TotalRefundTicket.avgData - b.TotalRefundTicket.avgData,
title: '平均值',
width: 120,
align: 'center',
@ -518,6 +559,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundTicket', 'YOYData'],
key: "TotalRefundTicket.YOYData",
sorter: (a, b) => a.TotalRefundTicket.YOYData - b.TotalRefundTicket.YOYData,
title: '同比数值',
width: 120,
align: 'center',
@ -527,6 +569,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundTicket', 'YOYDataAdd'],
key: "TotalRefundTicket.YOYDataAdd",
sorter: (a, b) => a.TotalRefundTicket.YOYDataAdd - b.TotalRefundTicket.YOYDataAdd,
title: '同比增长',
width: 120,
align: 'center',
@ -539,6 +582,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundTicket', 'QOQData'],
key: "TotalRefundTicket.QOQData",
sorter: (a, b) => a.TotalRefundTicket.QOQData - b.TotalRefundTicket.QOQData,
title: '环比数值',
width: 120,
align: 'center',
@ -555,6 +599,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundAmount', 'summaryData'],
key: "TotalRefundAmount.summaryData",
sorter: (a, b) => a.TotalRefundAmount.summaryData - b.TotalRefundAmount.summaryData,
title: '合计值',
width: 120,
align: 'center',
@ -564,6 +609,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundAmount', 'maxData'],
key: "TotalRefundAmount.maxData",
sorter: (a, b) => a.TotalRefundAmount.maxData - b.TotalRefundAmount.maxData,
title: '最大值',
width: 120,
align: 'center',
@ -573,6 +619,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundAmount', 'minData'],
key: "TotalRefundAmount.minData",
sorter: (a, b) => a.TotalRefundAmount.minData - b.TotalRefundAmount.minData,
title: '最小值',
width: 120,
align: 'center',
@ -582,6 +629,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundAmount', 'avgData'],
key: "TotalRefundAmount.avgData",
sorter: (a, b) => a.TotalRefundAmount.avgData - b.TotalRefundAmount.avgData,
title: '平均值',
width: 120,
align: 'center',
@ -591,6 +639,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundAmount', 'YOYData'],
key: "TotalRefundAmount.YOYData",
sorter: (a, b) => a.TotalRefundAmount.YOYData - b.TotalRefundAmount.YOYData,
title: '同比数值',
width: 120,
align: 'center',
@ -600,6 +649,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundAmount', 'YOYDataAdd'],
key: "TotalRefundAmount.YOYDataAdd",
sorter: (a, b) => a.TotalRefundAmount.YOYDataAdd - b.TotalRefundAmount.YOYDataAdd,
title: '同比增长',
width: 120,
align: 'center',
@ -612,6 +662,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
{
dataIndex: ['TotalRefundAmount', 'QOQData'],
key: "TotalRefundAmount.QOQData",
sorter: (a, b) => a.TotalRefundAmount.QOQData - b.TotalRefundAmount.QOQData,
title: '环比数值',
width: 120,
align: 'center',
@ -712,7 +763,7 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
expandable={{
expandRowByClick: true
}}
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
scroll={{ x: "100%", y: "calc(100vh - 470px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
search={{ span: 6 }}
request={async (params) => {

View File

@ -135,7 +135,9 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
hideInSearch: true,
render: (_, record) => {
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
}
},
sorter: (a, b) => new Date(a.ORDER_DATE).getTime() - new Date(b.ORDER_DATE).getTime(),
defaultSortOrder: 'descend',
},
{
title: "订单类型",
@ -179,6 +181,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
width: 150,
ellipsis: true,
hideInSearch: true,
sorter: (a, b) => a.ORDER_AMOUNT - b.ORDER_AMOUNT,
},
{
dataIndex: 'PAY_AMOUNT',
@ -187,6 +190,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
width: 150,
ellipsis: true,
hideInSearch: true,
sorter: (a, b) => a.PAY_AMOUNT - b.PAY_AMOUNT,
},
{
title: "支付方式",
@ -301,7 +305,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
expandable={{
expandRowByClick: true
}}
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
search={{ span: 6 }}
request={async (params) => {

View File

@ -25,6 +25,7 @@ import memberDetailIcon from '@/assets/detail/memberDetailIcon.png'
import AddressDetail from "../MemberAddress/components/addressDetail";
import { handleSetlogSave } from "@/utils/format";
import MemberDetail from "./component/memberDetail";
import { request } from "express";
// searchType 1 会员类型 2 会员等级
@ -48,6 +49,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj');
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList');
let MEMBERSHIP_LEVELList = session.get('MEMBERSHIP_LEVELList');
let COMPANY_STATEObj = session.get('COMPANY_STATEObj');
let COMPANY_STATEList = session.get('COMPANY_STATEList');
@ -76,6 +78,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
const [selectTab, setSelectTab] = useState<number>(1)
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
let SCORETYPETree = session.get('SCORETYPETree')
const [columnsStateMap, setColumnsStateMap] = useState<any>({
@ -118,7 +121,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
</a>
},
fieldProps: {
placeholder: "请输入用户昵称/联系电话"
placeholder: "请输入用户昵称/联系电话/证件号/车牌号"
}
},
{
@ -130,10 +133,23 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
hideInSearch: noMemberType,
align: 'center',
valueType: 'select',
// request: () => {
// let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList')
// let newList: any = []
// if (MEMBERSHIPTYPEYNList && MEMBERSHIPTYPEYNList.length > 0) {
// MEMBERSHIPTYPEYNList.forEach((item: any) => {
// if (item.value !== 1) {
// // && item.value < 9000
// newList.push(item)
// }
// })
// }
// return newList
// }
valueEnum: {
...MEMBERSHIPTYPEYNObj,
},
// initialValue: "0"
initialValue: "1"
},
{
title: "会员类型",
@ -185,7 +201,20 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
hideInSearch: noMemberLevel,
valueType: 'select',
valueEnum: MEMBERSHIPLEVELYNObj,
// initialValue: "0"
initialValue: "1"
// request: () => {
// let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
// let newList: any = []
// if (MEMBERSHIPLEVELYNList && MEMBERSHIPLEVELYNList.length > 0) {
// MEMBERSHIPLEVELYNList.forEach((item: any) => {
// if (item.value !== '1') {
// // && item.value < 9000
// newList.push(item)
// }
// })
// }
// return newList
// }
},
{
title: "会员积分",
@ -709,13 +738,14 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
SearchParameter: {
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "0" ? "0" : params?.MEMBERSHIP_TYPE,
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "0" ? "" : params?.MEMBERSHIP_LEVEL,
MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE,
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "1" ? "" : params?.MEMBERSHIP_LEVEL,
MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE,
// PLATE_NUMBER: params?.MEMBERSHIP_NAME || ""
},
keyWord: {
// PLATE_NUMBER
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS",
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS,PLATE_NUMBER",
value: params?.MEMBERSHIP_NAME || ""
},
PageIndex: params.current || 1,

View File

@ -90,8 +90,8 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
dataIndex: 'searchText',
title: '查询内容',
hideInTable: true,
fieldprop: {
placeholder: '请输入景区名称/景区位置'
fieldProps: {
placeholder: "输入景区名称/景区位置"
}
},
{
@ -175,6 +175,8 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
ellipsis: true,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.TICKET_PRICE - b.TICKET_PRICE,
defaultSortOrder: 'descend'
},
{
dataIndex: 'SCENICAREA_LEVEL',
@ -191,6 +193,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
ellipsis: true,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.SCENICAREA_SCORE - b.SCENICAREA_SCORE
},
{
dataIndex: 'SCENICAREA_EVALUATENUM',
@ -199,6 +202,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
ellipsis: true,
align: 'center',
hideInSearch: true,
sorter: (a, b) => a.SCENICAREA_EVALUATENUM - b.SCENICAREA_EVALUATENUM
},
{
dataIndex: 'SCENICAREA_PHONE',

View File

@ -95,11 +95,14 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
let list: any = []
data.forEach((item: any) => {
if (item.value !== 424) {
if (item.value !== 424 && item.value !== 1245) {
list.push(item)
}
})
console.log('listlistlistlist', list);
setTreeView(list)
setMenuData(list)

View File

@ -688,6 +688,18 @@ export async function handeGetNestingFIELDENUMList(params: any) {
return wrapTreeNode(data.Result_Data.List)
}
// 获取售后类型的列表数据 不加密
export async function handeGetNestingFIELDENUMListNoEncryption(params: any) {
const data = await request(`/Dictionary/GetNestingFIELDENUMList`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return []
}
return wrapTreeNode(data.Result_Data.List)
}
// 同步售后类别
export async function handeSynchroFIELDENUM(params: any) {
const data = await requestEncryption(`/Dictionary/SynchroFIELDENUM`, {
@ -700,6 +712,18 @@ export async function handeSynchroFIELDENUM(params: any) {
return data
}
// 同步枚举 不加密
export async function handeSynchroFIELDENUMNoEncryption(params: any) {
const data = await request(`/Dictionary/SynchroFIELDENUM`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return []
}
return data
}
// 删除售后类别
export async function handeDeleteFIELDENUM(params: any) {
const data = await requestEncryption(`/Dictionary/DeleteFIELDENUM`, {
@ -712,6 +736,18 @@ export async function handeDeleteFIELDENUM(params: any) {
return data
}
// 删除售后类别 不走枚举
export async function handeDeleteFIELDENUMNoEncryption(params: any) {
const data = await request(`/Dictionary/DeleteFIELDENUM`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return []
}
return data
}
// 获取字段类型列表
export async function handeGetFIELDEXPLAINList(params: any) {
@ -725,6 +761,18 @@ export async function handeGetFIELDEXPLAINList(params: any) {
return data.Result_Data.List
}
// 不加密的那个 获取字段类型列表
export async function handeGetFIELDEXPLAINListNoEncryption(params: any) {
const data = await request(`/Dictionary/GetFIELDEXPLAINList`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return []
}
return data.Result_Data.List
}
// 交易台账列表接口
export async function handeGetSupplierSaleBillList(params: any) {
const data = await requestEncryption(`/OnlineOrder/GetSupplierSaleBillList`, {
@ -1072,3 +1120,103 @@ export async function handeGetSALEADDRESSList(params: any) {
}
return data.Result_Data
}
// 统计卡券库存数据
export async function handeGetCouponStockList(params: any) {
const data = await requestEncryption(`/Coupon/GetCouponStockList`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data.Result_Data
}
// 同步商品预警表
export async function handeSynchroCOMMODITYWARNING(params: any) {
const data = await requestEncryption(`/MallBasic/SynchroCOMMODITYWARNING`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data
}
// 获取商品预警表列表
export async function handeGetCOMMODITYWARNINGList(params: any) {
const data = await requestEncryption(`/MallBasic/GetCOMMODITYWARNINGList`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data.Result_Data.List
}
// 删除商品预警规则
export async function handeGetDeleteCOMMODITYWARNING(params: any) {
const data = await requestEncryption(`/MallBasic/DeleteCOMMODITYWARNING`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
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
}

View File

@ -1,4 +1,4 @@
// 由 scripts/writeVersion.js 自动生成
export const VERSION = "4.5.10";
export const GIT_HASH = "158052e";
export const BUILD_TIME = "2025-07-29T11:53:30.567Z";
export const VERSION = "4.5.13";
export const GIT_HASH = "524c0ab";
export const BUILD_TIME = "2025-08-04T10:43:20.278Z";