update
This commit is contained in:
parent
e90dabf9fa
commit
46eeaca296
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ant-design-pro",
|
||||
"version": "4.5.64",
|
||||
"version": "4.5.65",
|
||||
"private": true,
|
||||
"description": "An out-of-box UI solution for enterprise applications",
|
||||
"scripts": {
|
||||
|
||||
@ -7,7 +7,7 @@ import { EllipsisOutlined, MenuFoldOutlined } from "@ant-design/icons";
|
||||
import type { FormInstance } from "antd";
|
||||
import { Button, message, Modal, Popconfirm, Row, Space, Spin, Tree } from "antd";
|
||||
import useRequest from "@ahooksjs/use-request";
|
||||
import { getServerpartTree } from "@/services/options";
|
||||
import { getServerpartTree, getServerpartTreeNosessoin } from "@/services/options";
|
||||
import type { ActionType } from "@ant-design/pro-table";
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||
@ -74,11 +74,39 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const [selectedRowsInfoList, setSelectedRowsInfoList] = useState<any>()
|
||||
// 这次显示的全部服务区code
|
||||
const [allServerPartCodeList, setAllServerPartCodeList] = useState<any>()
|
||||
|
||||
// 实际显示在左侧的服务区树
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
// 选择的要移除用户id列表
|
||||
const [selectedDeleteRowKeysList, setSelectedDeleteRowKeysList] = useState<any>()
|
||||
// 选择的要移除用户信息列表
|
||||
const [selectedDeleteRowsInfoList, setSelectedDeleteRowsInfoList] = useState<any>()
|
||||
// 加载服务区树
|
||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||
let data: any = await getServerpartTreeNosessoin({
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
ServerpartType: 1000,
|
||||
StatisticsType: 1000,
|
||||
ShowWholePower: true,
|
||||
})
|
||||
// console.log('datadatadatadata', data);
|
||||
|
||||
let list: any = []
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
// 判断 item这一层已经是片区了 如果item.children 只有一个的话 那就说明 也只有一个服务区 那么就可以判断不显示全部和片区的树形选择层了
|
||||
if (item.children && item.children.length === 1) {
|
||||
list.push(item.children[0])
|
||||
} else {
|
||||
if (item.value !== 89 &&item.value !== 424 && item.value !== 586) {
|
||||
list.push(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
setTreeView(list)
|
||||
return data
|
||||
})
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -148,7 +176,37 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
setPrintOut(el);
|
||||
}} >
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||
{/* <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> */}
|
||||
<ProCard
|
||||
style={{ width: !collapsible ? "300px" : "60px" }}
|
||||
className="pageTable-leftnav"
|
||||
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20 }}
|
||||
extra={<MenuFoldOutlined onClick={() => { setCollapsible(!collapsible) }} />}
|
||||
colSpan={!collapsible ? "300px" : "60px"}
|
||||
title={!collapsible ? "请选择服务区" : ""}
|
||||
headerBordered
|
||||
collapsed={collapsible}
|
||||
>
|
||||
{treeView && treeView.length > 0 ? <Tree
|
||||
checkable
|
||||
treeData={!treeLoading ? [{
|
||||
label: '全部',
|
||||
value: 0,
|
||||
key: '0-0',
|
||||
children: treeView
|
||||
}] : []}
|
||||
fieldNames={{
|
||||
title: "label",
|
||||
key: "key"
|
||||
}}
|
||||
blockNode
|
||||
defaultExpandedKeys={['0-0']}
|
||||
onCheck={(checkedKeys: React.Key[] | any, info) => {
|
||||
const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
||||
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
}}
|
||||
/> : ''}
|
||||
</ProCard>
|
||||
<div style={{
|
||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||
paddingTop: 0,
|
||||
@ -176,6 +234,7 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const req: any = {
|
||||
USER_STATUS: 1,
|
||||
current: 1,
|
||||
ServerpartIds: selectedId,
|
||||
pageSize: 999999,
|
||||
USER_PROVINCE: currentUser?.ProvinceCode,
|
||||
keyWord: {
|
||||
|
||||
@ -17,6 +17,7 @@ import { handleGetWillSettleProject } from "./service";
|
||||
import moment from 'moment'
|
||||
import session from "@/utils/session";
|
||||
import ProjectDetail from "@/pages/BussinessProject/detail";
|
||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||
|
||||
|
||||
const settlementProjectForNextMonth: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -286,33 +287,41 @@ const settlementProjectForNextMonth: React.FC<{ currentUser: CurrentUser }> = (p
|
||||
const data = await handleGetWillSettleProject(req)
|
||||
console.log('datadatadatadatadata', data);
|
||||
if (data && data.length > 0) {
|
||||
let exportList: any = []
|
||||
data.forEach((item: any) => {
|
||||
item.STARTDATEENDDATE = `${item?.STARTDATE ? moment(item?.STARTDATE).format('YYYY/MM/DD') : ""}${item?.ENDDATE ? '-' : ''}${item?.ENDDATE ? moment(item?.ENDDATE).format('YYYY/MM/DD') : ""}`
|
||||
item.PeriodClosed = item?.PeriodClosed ? '是' : "否"
|
||||
exportList.push(item)
|
||||
})
|
||||
setReqDetailList(exportList)
|
||||
return { data, success: true }
|
||||
}
|
||||
setReqDetailList([])
|
||||
return { data: [], success: true }
|
||||
}}
|
||||
toolbar={{
|
||||
actions: [
|
||||
<span style={{ visibility: 'hidden' }}>
|
||||
<ReactHTMLTableToExcel
|
||||
buttonText={'导出excel'}
|
||||
ref={downloadBtnRef}
|
||||
table="table-to-xls-settlementProjectForNextMonth"
|
||||
filename={`单品销售排行统计${searchParams?.StartDate}-${searchParams?.EndDate}`}
|
||||
sheet="sheet1"
|
||||
/>
|
||||
</span>,
|
||||
// <span style={{ visibility: 'hidden' }}>
|
||||
// <ReactHTMLTableToExcel
|
||||
// buttonText={'导出excel'}
|
||||
// ref={downloadBtnRef}
|
||||
// table="table-to-xls-settlementProjectForNextMonth"
|
||||
// filename={`单品销售排行统计${searchParams?.StartDate}-${searchParams?.EndDate}`}
|
||||
// sheet="sheet1"
|
||||
// />
|
||||
// </span>,
|
||||
<Button
|
||||
key="new"
|
||||
type="primary"
|
||||
onClick={(e) => {
|
||||
if (reqDetailList && reqDetailList.length > 0) {
|
||||
setShowLoading(true)
|
||||
setTimeout(() => {
|
||||
setShowExportTable(true)
|
||||
setTimeout(() => {
|
||||
exportTable(e)
|
||||
}, 100)
|
||||
}, 100)
|
||||
exportXlsxFromProColumnsExcelJS(columns,
|
||||
reqDetailList,
|
||||
`单品销售排行统计${searchParams?.StartDate}-${searchParams?.EndDate}`,
|
||||
{
|
||||
// topTitle: `进销存类别报表`, // 顶部大标题
|
||||
}
|
||||
)
|
||||
} else {
|
||||
message.error('暂无数据可导出!')
|
||||
}
|
||||
|
||||
@ -1370,7 +1370,8 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
|
||||
{
|
||||
showFirstNotice ?
|
||||
<div style={{
|
||||
width: `calc(100% - ${!collapsible ? 520 : 340}px)`,
|
||||
// width: `calc(100% - ${!collapsible ? 520 : 340}px)`,
|
||||
width: `calc(100% - ${collapsible ? 50 : 360}px)`,
|
||||
position: 'fixed',
|
||||
top: '100px',
|
||||
right: '24px',
|
||||
@ -1394,15 +1395,17 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
|
||||
<span style={{
|
||||
color: 'rgba(0, 0, 0, 0.45)',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'normal'
|
||||
fontWeight: 'normal',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>到账金额:</span>
|
||||
<div style={{ display: 'flex', alignItems: 'flex-end', height: '22px' }}>
|
||||
<span style={{ fontWeight: 'normal', marginRight: '2px' }}>¥</span>
|
||||
<span style={{
|
||||
fontSize: '28px',
|
||||
fontSize: '26px',
|
||||
color: '#faad14',
|
||||
fontWeight: 500,
|
||||
lineHeight: '34px'
|
||||
lineHeight: '34px',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>{numeral(reduceTableData.Royalty_Price).format('0,0.00')}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -1410,15 +1413,17 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
|
||||
<span style={{
|
||||
color: 'rgba(0, 0, 0, 0.45)',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'normal'
|
||||
fontWeight: 'normal',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>分润项目:</span>
|
||||
<div style={{ display: 'flex', alignItems: 'flex-end', height: '22px' }}>
|
||||
<span style={{ fontWeight: 'normal', marginRight: '2px' }}></span>
|
||||
<span style={{
|
||||
fontSize: '28px',
|
||||
fontSize: '26px',
|
||||
color: '#faad14',
|
||||
fontWeight: 500,
|
||||
lineHeight: '34px'
|
||||
lineHeight: '34px',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>{numeral(allProjectSum).format('0,0')}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -1427,11 +1432,13 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
|
||||
<span style={{
|
||||
color: 'rgba(0, 0, 0, 0.45)',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'normal'
|
||||
fontWeight: 'normal',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>项目到账:</span>
|
||||
<span style={{
|
||||
color: 'rgba(0, 0, 0, 0.85',
|
||||
fontWeight: 'bold'
|
||||
fontWeight: 'bold',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>{numeral(reduceTableData.RoyaltyProject_Price).format('0,0.00')}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -1440,11 +1447,13 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
|
||||
<span style={{
|
||||
color: 'rgba(0, 0, 0, 0.45)',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'normal'
|
||||
fontWeight: 'normal',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>差额:</span>
|
||||
<span style={{
|
||||
color: 'rgba(0, 0, 0, 0.85',
|
||||
fontWeight: 'bold'
|
||||
fontWeight: 'bold',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>{numeral(reduceTableData.Royalty_DiffPrice).format('0,0.00')}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -1452,7 +1461,8 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
|
||||
<span style={{
|
||||
color: 'rgba(0, 0, 0, 0.45)',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'normal'
|
||||
fontWeight: 'normal',
|
||||
whiteSpace: 'nowrap'
|
||||
}}>统计时间:</span>
|
||||
{
|
||||
isComponents ? '' :
|
||||
|
||||
@ -251,6 +251,20 @@ export async function getServerpartTree(ProvinceCode?: number | string, Serverpa
|
||||
return data.Result_Data.List;
|
||||
}
|
||||
|
||||
// 获取服务区树形列表 不走缓存 真实调用
|
||||
export async function getServerpartTreeNosessoin(params?: any) {
|
||||
const data = await request('/BaseInfo/GetServerpartTree', {
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return []
|
||||
}
|
||||
|
||||
return data.Result_Data.List;
|
||||
}
|
||||
|
||||
/* 获取业主单位树形列表 */
|
||||
export async function getOwnerUnitTree(DataType?: number | string): Promise<CommonTypeModel[]> {
|
||||
const ownerTree = session.get(`ownerTree_${DataType}`);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 由 scripts/writeVersion.js 自动生成
|
||||
export const VERSION = "4.5.64";
|
||||
export const GIT_HASH = "5a7f174";
|
||||
export const BUILD_TIME = "2025-09-26T03:21:11.008Z";
|
||||
export const VERSION = "4.5.65";
|
||||
export const GIT_HASH = "e90dabf";
|
||||
export const BUILD_TIME = "2025-10-21T01:48:13.490Z";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user