This commit is contained in:
ylj20011123 2025-07-30 20:28:29 +08:00
parent edeca3457f
commit 524c0abc26
43 changed files with 2731 additions and 219 deletions

View File

@ -1074,8 +1074,24 @@ 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'
},
]
},
{
@ -1321,7 +1337,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.11",
"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,15 +1,247 @@
// 卡券领取查询
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>
)
}
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(CardVoucherSearch);
}))(CardVoucherSearch);

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>();
@ -316,7 +319,13 @@ const DataDictionary: React.FC = () => {
actionRef={actionRef}
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 +362,6 @@ const DataDictionary: React.FC = () => {
formRef.current?.resetFields();
setCurrentRow(undefined);
}
}}
onFinish={async (value) => {
@ -626,4 +633,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

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

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

@ -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,20 @@ const MerchantSalesRanking: React.FC<{ currentUser: CurrentUser | undefined }> =
/>
</div>
<Drawer
width={'80%'}
visible={showDetailDrawer}
onClose={() => {
setCurrentRow(undefined)
setShowDetailDrawer(false)
}}
closable={false}
destroyOnClose
>
<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

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

@ -1,11 +1,16 @@
// 商户评价汇总
import { ConnectState } from "@/models/connect";
import { ConnectState } from "@/models/connect";
import { connect, CurrentUser } from "umi";
const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
const { currentUser } = props
return (
<div>
</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,52 @@ 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
}

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.11";
export const GIT_HASH = "edeca34";
export const BUILD_TIME = "2025-07-30T12:19:28.444Z";