update
This commit is contained in:
parent
fbad9d08e7
commit
c58125e253
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ant-design-pro",
|
||||
"version": "4.5.58",
|
||||
"version": "4.5.60",
|
||||
"private": true,
|
||||
"description": "An out-of-box UI solution for enterprise applications",
|
||||
"scripts": {
|
||||
|
||||
@ -40,12 +40,10 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
// 表格表头 显示的时间
|
||||
const [tableTitle, setTableTitle] = useState<any>({
|
||||
thisMonthStart: "",
|
||||
thisMonthEnd: "",
|
||||
thisYearStart: "",
|
||||
thisYearEnd: "",
|
||||
thisYear: "",
|
||||
lastYear: ""
|
||||
staticDate: "",
|
||||
compareDate: "",
|
||||
AccDate: "",
|
||||
AccCompareDate: "",
|
||||
})
|
||||
|
||||
const columns: any = [
|
||||
@ -64,14 +62,76 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
initialValue: 3
|
||||
},
|
||||
{
|
||||
title: '统计月份',
|
||||
dataIndex: 'searchMonth',
|
||||
valueType: "date",
|
||||
title: '统计日期',
|
||||
dataIndex: 'statisticalDate',
|
||||
valueType: "dateRange",
|
||||
hideInTable: true,
|
||||
initialValue: moment(),
|
||||
initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().subtract(1, 'd').format('YYYY-MM-DD')],
|
||||
search: {
|
||||
transform: (value: any) => {
|
||||
return {
|
||||
StartDate: moment(value[0]).format('YYYY-MM-DD'),
|
||||
EndDate: moment(value[1]).format('YYYY-MM-DD'),
|
||||
};
|
||||
},
|
||||
},
|
||||
fieldProps: {
|
||||
picker: "month",
|
||||
format: 'YYYY-MM',
|
||||
picker: "date",
|
||||
format: 'YYYY-MM-DD',
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '对比日期',
|
||||
dataIndex: 'CompareDate',
|
||||
valueType: "dateRange",
|
||||
hideInTable: true,
|
||||
search: {
|
||||
transform: (value: any) => {
|
||||
return {
|
||||
CompareStartDate: moment(value[0]).format('YYYY-MM-DD'),
|
||||
CompareEndDate: moment(value[1]).format('YYYY-MM-DD'),
|
||||
};
|
||||
},
|
||||
},
|
||||
fieldProps: {
|
||||
picker: "date",
|
||||
format: 'YYYY-MM-DD',
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '累计日期',
|
||||
dataIndex: 'AccDate',
|
||||
valueType: "dateRange",
|
||||
hideInTable: true,
|
||||
search: {
|
||||
transform: (value: any) => {
|
||||
return {
|
||||
AccStartDate: moment(value[0]).format('YYYY-MM-DD'),
|
||||
AccEndDate: moment(value[1]).format('YYYY-MM-DD'),
|
||||
};
|
||||
},
|
||||
},
|
||||
fieldProps: {
|
||||
picker: "date",
|
||||
format: 'YYYY-MM-DD',
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '累计对比日期',
|
||||
dataIndex: 'AccCompareDate',
|
||||
valueType: "dateRange",
|
||||
hideInTable: true,
|
||||
search: {
|
||||
transform: (value: any) => {
|
||||
return {
|
||||
AccCompareStartDate: moment(value[0]).format('YYYY-MM-DD'),
|
||||
AccCompareEndDate: moment(value[1]).format('YYYY-MM-DD'),
|
||||
};
|
||||
},
|
||||
},
|
||||
fieldProps: {
|
||||
picker: "date",
|
||||
format: 'YYYY-MM-DD',
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -92,138 +152,123 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
dataIndex: "Serverpart_Name",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: `本月${tableTitle?.thisMonthStart && tableTitle?.thisMonthEnd ? `(${tableTitle?.thisMonthStart}-${tableTitle?.thisMonthEnd})` : ""}`,
|
||||
dataIndex: "RevenueAmount",
|
||||
// title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.lastYear}年`}</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.compareDate || ""}`}</div>,
|
||||
dataIndex: "RevenueAmountFirst",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.lastYear}年`}</div>,
|
||||
dataIndex: "RevenueAmountFirst",
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 150,
|
||||
dataIndex: ["RevenueAmount", "compareData"],
|
||||
hideInSearch: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 120,
|
||||
dataIndex: ["RevenueAmount", "curData"],
|
||||
hideInSearch: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
ellipsis: true,
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.thisYear}年`}</div>,
|
||||
dataIndex: "RevenueAmountSecond",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 120,
|
||||
dataIndex: ["RevenueAmount", "compareData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>增长</div>,
|
||||
width: 120,
|
||||
dataIndex: ["RevenueAmount", "increaseData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>增幅</div>,
|
||||
width: 120,
|
||||
dataIndex: "RevenueAmount.increaseRate",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
render: (_, record) => {
|
||||
return record?.RevenueAmount?.increaseRate ? `${record?.RevenueAmount?.increaseRate}%` : "-"
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
title: `年度累计${tableTitle?.thisYearStart && tableTitle?.thisYearEnd ? `(${tableTitle?.thisYearStart}-${tableTitle?.thisYearEnd})` : ""}`,
|
||||
dataIndex: "ACCRevenueAmount",
|
||||
// title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.thisYear}年`}</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.staticDate || ""}`}</div>,
|
||||
dataIndex: "RevenueAmountSecond",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.lastYear}年`}</div>,
|
||||
dataIndex: "ACCRevenueAmountFirst",
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 120,
|
||||
dataIndex: ["RevenueAmount", "curData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 120,
|
||||
dataIndex: ["ACCRevenueAmount", "curData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
]
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.thisYear}年`}</div>,
|
||||
dataIndex: "ACCRevenueAmountSecond",
|
||||
title: <div style={{ textAlign: 'center' }}>增长</div>,
|
||||
width: 120,
|
||||
dataIndex: ["RevenueAmount", "increaseData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 120,
|
||||
dataIndex: ["ACCRevenueAmount", "compareData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>增长</div>,
|
||||
width: 120,
|
||||
dataIndex: ["ACCRevenueAmount", "increaseData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>增幅</div>,
|
||||
width: 120,
|
||||
dataIndex: "ACCRevenueAmount.increaseRate",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
render: (_, record) => {
|
||||
return record?.ACCRevenueAmount?.increaseRate ? `${record?.ACCRevenueAmount?.increaseRate}%` : "-"
|
||||
}
|
||||
},
|
||||
]
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>增幅</div>,
|
||||
width: 120,
|
||||
dataIndex: "RevenueAmount.increaseRate",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
render: (_, record) => {
|
||||
return record?.RevenueAmount?.increaseRate ? `${record?.RevenueAmount?.increaseRate}%` : "-"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
// title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.lastYear}年`}</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.AccCompareDate || ""}`}</div>,
|
||||
dataIndex: "ACCRevenueAmountFirst",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 150,
|
||||
dataIndex: ["ACCRevenueAmount", "compareData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>{`${tableTitle?.AccDate || ""}`}</div>,
|
||||
dataIndex: "ACCRevenueAmountSecond",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
children: [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>总额</div>,
|
||||
width: 120,
|
||||
dataIndex: ["ACCRevenueAmount", "curData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>增长</div>,
|
||||
width: 120,
|
||||
dataIndex: ["ACCRevenueAmount", "increaseData"],
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>增幅</div>,
|
||||
width: 120,
|
||||
dataIndex: "ACCRevenueAmount.increaseRate",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
render: (_, record) => {
|
||||
return record?.ACCRevenueAmount?.increaseRate ? `${record?.ACCRevenueAmount?.increaseRate}%` : "-"
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@ -264,7 +309,7 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
}
|
||||
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} noWj={true} />
|
||||
<div style={{
|
||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||
paddingTop: 0,
|
||||
@ -280,9 +325,9 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
expandRowByClick: true
|
||||
}}
|
||||
rowKey={'LineIndex'}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 520px)" }}
|
||||
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
||||
search={{ span: 6 }}
|
||||
search={{ span: 6, defaultCollapsed: false }}
|
||||
request={async (params) => {
|
||||
if (!selectedId) {
|
||||
return
|
||||
@ -293,23 +338,30 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
DataType: params?.DataType || 3,
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
ServerpartId: selectedId,
|
||||
StartDate: params?.searchMonth ? moment(params?.searchMonth).startOf('M').format('YYYY-MM-DD') : "",
|
||||
EndDate: params?.searchMonth ? new Date(moment().subtract(1, 'd').format('YYYY-MM-DD')).getTime() < new Date(moment(params?.searchMonth).endOf('M').format('YYYY-MM-DD')).getTime() ? moment().subtract(1, 'd').format('YYYY-MM-DD') : moment(params?.searchMonth).endOf('M').format('YYYY-MM-DD') : "",
|
||||
StartDate: params?.StartDate ? moment(params?.StartDate).startOf('M').format('YYYY-MM-DD') : "",
|
||||
EndDate: params?.EndDate ? new Date(moment().subtract(1, 'd').format('YYYY-MM-DD')).getTime() < new Date(params?.EndDate).getTime() ? moment().subtract(1, 'd').format('YYYY-MM-DD') : params?.EndDate : "",
|
||||
|
||||
CompareStartDate: params?.CompareStartDate ? moment(params?.CompareStartDate).startOf('M').format('YYYY-MM-DD') : "",
|
||||
CompareEndDate: params?.CompareEndDate ? new Date(moment().subtract(1, 'd').format('YYYY-MM-DD')).getTime() < new Date(params?.CompareEndDate).getTime() ? moment().subtract(1, 'd').format('YYYY-MM-DD') : params?.CompareEndDate : "",
|
||||
|
||||
AccStartDate: params?.AccStartDate ? moment(params?.AccStartDate).startOf('M').format('YYYY-MM-DD') : "",
|
||||
AccEndDate: params?.AccEndDate ? new Date(moment().subtract(1, 'd').format('YYYY-MM-DD')).getTime() < new Date(params?.AccEndDate).getTime() ? moment().subtract(1, 'd').format('YYYY-MM-DD') : params?.AccEndDate : "",
|
||||
|
||||
AccCompareStartDate: params?.AccCompareStartDate ? moment(params?.AccCompareStartDate).startOf('M').format('YYYY-MM-DD') : "",
|
||||
AccCompareEndDate: params?.AccCompareEndDate ? new Date(moment().subtract(1, 'd').format('YYYY-MM-DD')).getTime() < new Date(params?.AccCompareEndDate).getTime() ? moment().subtract(1, 'd').format('YYYY-MM-DD') : params?.AccCompareEndDate : "",
|
||||
}
|
||||
setSearchParams(params)
|
||||
console.log('reqreqreq', req);
|
||||
|
||||
const data = await handleGetBusinessItemSummary(req)
|
||||
if (params?.searchMonth) {
|
||||
setTableTitle(
|
||||
{
|
||||
thisMonthStart: moment(params?.searchMonth).startOf('M').format('MM.DD'),
|
||||
thisMonthEnd: new Date(moment().subtract(1, 'd').format('YYYY-MM-DD')).getTime() < new Date(moment(params?.searchMonth).endOf('M').format('YYYY-MM-DD')).getTime() ? moment().subtract(1, 'd').format('MM.DD') : moment(params?.searchMonth).endOf('M').format('MM.DD'),
|
||||
thisYearStart: moment(params?.searchMonth).startOf('y').format('MM.DD'),
|
||||
thisYearEnd: new Date(moment().subtract(1, 'd').format('YYYY-MM-DD')).getTime() < new Date(moment(params?.searchMonth).endOf('M').format('YYYY-MM-DD')).getTime() ? moment().subtract(1, 'd').format('MM.DD') : moment(params?.searchMonth).endOf('M').format('MM.DD'),
|
||||
thisYear: moment(params?.searchMonth).format('YYYY'),
|
||||
lastYear: moment(params?.searchMonth).subtract(1, 'y').format('YYYY')
|
||||
}
|
||||
)
|
||||
}
|
||||
setTableTitle(
|
||||
{
|
||||
staticDate: `${params?.StartDate ? moment(params?.StartDate).format('YYYY.MM.DD') : ""}${params?.EndDate ? '-' + moment(params?.EndDate).format('YYYY.MM.DD') : ''}`,
|
||||
compareDate: `${params?.CompareStartDate ? moment(params?.CompareStartDate).format('YYYY.MM.DD') : ""}${params?.CompareEndDate ? '-' + moment(params?.CompareEndDate).format('YYYY.MM.DD') : ''}`,
|
||||
AccDate: `${params?.AccStartDate ? moment(params?.AccStartDate).format('YYYY.MM.DD') : ""}${params?.AccEndDate ? '-' + moment(params?.AccEndDate).format('YYYY.MM.DD') : ''}`,
|
||||
AccCompareDate: `${params?.AccCompareStartDate ? moment(params?.AccCompareStartDate).format('YYYY.MM.DD') : ""}${params?.AccCompareEndDate ? '-' + moment(params?.AccCompareEndDate).format('YYYY.MM.DD') : ''}`,
|
||||
}
|
||||
)
|
||||
console.log('data', data);
|
||||
if (data && data.length > 0) {
|
||||
let list: any = JSON.parse(JSON.stringify(data))
|
||||
@ -367,7 +419,7 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
reqDetailList,
|
||||
`月度营收分析${searchParams?.searchMonth ? moment(searchParams?.searchMonth).format('YYYYMM') : ""}`,
|
||||
{
|
||||
topTitle: `服务区${searchParams?.searchMonth ? moment(searchParams?.searchMonth).format('MM') : ""}月营业额统计表`, // 顶部大标题
|
||||
// topTitle: `服务区${searchParams?.searchMonth ? moment(searchParams?.searchMonth).format('MM') : ""}月营业额统计表`, // 顶部大标题
|
||||
}
|
||||
)
|
||||
} else {
|
||||
@ -379,6 +431,7 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
</Button>
|
||||
]
|
||||
}}
|
||||
pagination={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -736,9 +736,14 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props
|
||||
modalApproveFormRef?.current?.submit()
|
||||
})
|
||||
} else {
|
||||
modalFormRef?.current?.validateFields().then(() => {
|
||||
modalFormRef?.current?.submit()
|
||||
})
|
||||
if (shopData && shopData.length > 0) {
|
||||
modalFormRef?.current?.validateFields().then(() => {
|
||||
modalFormRef?.current?.submit()
|
||||
})
|
||||
} else {
|
||||
message.error("请选选择申请的商品!")
|
||||
return
|
||||
}
|
||||
}
|
||||
}}>确认</Button>
|
||||
</div>}
|
||||
@ -1214,10 +1219,10 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props
|
||||
</Card>
|
||||
: ''
|
||||
}
|
||||
</Modal>
|
||||
</Modal >
|
||||
|
||||
{/* 新增商品的悬浮框 */}
|
||||
<Modal
|
||||
< Modal
|
||||
open={showAddShopModal}
|
||||
width={1200}
|
||||
wrapClassName={'shopModal'}
|
||||
@ -1659,7 +1664,7 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props
|
||||
</Col>
|
||||
</Row>
|
||||
</ProForm>
|
||||
</Modal>
|
||||
</Modal >
|
||||
</div >
|
||||
)
|
||||
}
|
||||
|
||||
@ -903,6 +903,9 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop
|
||||
allRight = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
message.error("请选选择申请的商品!")
|
||||
return
|
||||
}
|
||||
if (!allRight) {
|
||||
message.error("请先完善表格数据!")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 由 scripts/writeVersion.js 自动生成
|
||||
export const VERSION = "4.5.58";
|
||||
export const GIT_HASH = "f7e3cc6";
|
||||
export const BUILD_TIME = "2025-09-18T14:27:48.181Z";
|
||||
export const VERSION = "4.5.60";
|
||||
export const GIT_HASH = "fbad9d0";
|
||||
export const BUILD_TIME = "2025-09-19T09:46:28.489Z";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user