Compare commits

..

No commits in common. "ea27a3213f1b786445317c7bd5a6472518bbc79e" and "4073d23d664c31bb0e5b6428f90e1048d20eff32" have entirely different histories.

21 changed files with 757 additions and 910 deletions

View File

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

View File

@ -16,42 +16,10 @@ const SmartLoading: React.FC<SmartLoadingProps> = ({
fallback, fallback,
enablePreload = true enablePreload = true
}) => { }) => {
const location = useLocation();
const [loadingType, setLoadingType] = useState<'page' | 'table' | 'form' | 'card'>('page'); const [loadingType, setLoadingType] = useState<'page' | 'table' | 'form' | 'card'>('page');
const [shouldShow, setShouldShow] = useState(false);
const [location, setLocation] = useState<any>(null);
// 安全获取location避免在路由未准备好时出错
try {
const currentLocation = useLocation();
if (!location) {
setLocation(currentLocation);
}
} catch (error) {
// 如果useLocation失败使用window.location作为fallback
if (!location && typeof window !== 'undefined') {
setLocation({ pathname: window.location.pathname });
}
}
useEffect(() => { useEffect(() => {
// 对于页面切换,立即显示骨架屏,但对于初始加载延迟显示
const isInitialLoad = !location?.pathname || location.pathname === '/';
if (isInitialLoad) {
// 初始加载时延迟显示,避免刷新时闪烁
const timer = setTimeout(() => {
setShouldShow(true);
}, 200);
return () => clearTimeout(timer);
} else {
// 页面切换时立即显示,保持骨架屏效果
setShouldShow(true);
}
}, [location?.pathname]);
useEffect(() => {
if (!location?.pathname) return;
// 根据路径判断页面类型,选择合适的骨架屏 // 根据路径判断页面类型,选择合适的骨架屏
const path = location.pathname; const path = location.pathname;
@ -65,24 +33,17 @@ const SmartLoading: React.FC<SmartLoadingProps> = ({
setLoadingType('page'); setLoadingType('page');
} }
// 预加载相关路由(降低优先级,避免影响主流程) // 预加载相关路由
if (enablePreload) { if (enablePreload) {
setTimeout(() => { routePreloader.preloadBasedOnUserBehavior(path);
routePreloader.preloadBasedOnUserBehavior(path);
}, 500);
} }
}, [location?.pathname, enablePreload]); }, [location.pathname, enablePreload]);
// 如果提供了自定义fallback使用它 // 如果提供了自定义fallback使用它
if (fallback) { if (fallback) {
return <>{fallback}</>; return <>{fallback}</>;
} }
// 延迟显示,避免闪烁
if (!shouldShow) {
return null;
}
// 根据页面类型返回对应的骨架屏 // 根据页面类型返回对应的骨架屏
return <SkeletonLoading type={loadingType} rows={getRowsByType(loadingType)} />; return <SkeletonLoading type={loadingType} rows={getRowsByType(loadingType)} />;
}; };

View File

@ -1041,7 +1041,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
tab={item.title} key={item?.path} tab={item.title} key={item?.path}
style={{ padding: 24, paddingTop: 0 }}> style={{ padding: 24, paddingTop: 0 }}>
<SimplePageTransition> <SimplePageTransition>
<Suspense fallback={null}> <Suspense fallback={<div>Loading...</div>}>
<Authorized authority={authorized!.authority} noMatch={noMatch}> <Authorized authority={authorized!.authority} noMatch={noMatch}>
{item.children} {item.children}
</Authorized> </Authorized>

View File

@ -15,101 +15,68 @@ type SecurityLayoutProps = {
type SecurityLayoutState = { type SecurityLayoutState = {
isReady: boolean; isReady: boolean;
shouldShowLoading: boolean;
initialLoadComplete: boolean;
}; };
class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayoutState> { class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayoutState> {
state: SecurityLayoutState = { state: SecurityLayoutState = {
isReady: false, isReady: false,
shouldShowLoading: false,
initialLoadComplete: false,
}; };
private loadingTimer?: NodeJS.Timeout;
componentDidMount() { componentDidMount() {
const { location } = history;
const { dispatch } = this.props;
// 检查是否有缓存的用户信息,避免不必要的加载状态
const cachedUser = session.get("currentUser");
// 设置防闪烁定时器只有加载时间超过300ms才显示loading
this.loadingTimer = setTimeout(() => {
if (!this.state.isReady && !this.state.initialLoadComplete) {
this.setState({
shouldShowLoading: true,
});
}
}, 300);
const { location } = history
const { dispatch } = this.props;
if (dispatch) { if (dispatch) {
dispatch({ dispatch({
type: 'user/fetch', type: 'user/fetch', callback: (user) => {
callback: (user) => {
// 清除定时器
if (this.loadingTimer) {
clearTimeout(this.loadingTimer);
}
if (user.code && location.pathname !== '/user/login') { if (user.code && location.pathname !== '/user/login') {
history.push('/user/login'); history.push('/user/login');
return; return
} }
console.log('secur')
dispatch({ dispatch({
type: 'global/getMenuData', type: 'global/getMenuData', payload: user.ID, callback: (menu) => {
payload: user.ID,
callback: (menu) => {
if (menu) { if (menu) {
this.setState({ this.setState({
isReady: true, isReady: true,
shouldShowLoading: false,
initialLoadComplete: true,
}); });
} }
} }
}); })
} }
}); })
} else { } else {
// 清除定时器
if (this.loadingTimer) {
clearTimeout(this.loadingTimer);
}
this.setState({ this.setState({
isReady: true, isReady: true,
shouldShowLoading: false,
initialLoadComplete: true,
}); });
} }
}
componentWillUnmount() {
if (this.loadingTimer) {
clearTimeout(this.loadingTimer);
}
} }
render() { render() {
const { isReady, shouldShowLoading, initialLoadComplete } = this.state; const { isReady } = this.state;
const { children, currentUser } = this.props; const { children, loading, currentUser } = this.props;
// const { location } = history;
// 用户认证规则
// You can replace it to your authentication rule (such as check token exists)
// You can replace it with your own login authentication rules (such as judging whether the token exists)
const isLogin = currentUser && currentUser.ID; const isLogin = currentUser && currentUser.ID;
// 如果初始化未完成且需要显示加载状态,才显示骨架屏
if (!isReady && shouldShowLoading) { if ((!isLogin && loading) || !isReady) {
return <PageLoading />; return <PageLoading />;
} }
// if (!isLogin && location.pathname !== '/user/login') {
// 如果还在初始化过程中但不需要显示loading返回null避免闪烁 // history.push('/user/login');
if (!isReady && !shouldShowLoading) { // }
return null;
}
return children; return children;
} }
} }

View File

@ -1298,7 +1298,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={area} /> <img className={'itemLeftIcon'} src={area} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.FLOORAREA ? fmoney(serviceDetail?.ServerpartInfo?.FLOORAREA, 2) : '-'}m²</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.FLOORAREA ? fmoney(serviceDetail.ServerpartInfo.FLOORAREA, 2) : '-'}m²</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -1306,7 +1306,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={stopArea} /> <img className={'itemLeftIcon'} src={stopArea} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SHAREAREA ? fmoney(serviceDetail?.ServerpartInfo?.SHAREAREA, 2) : '-'}m²</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SHAREAREA ? fmoney(serviceDetail.ServerpartInfo.SHAREAREA, 2) : '-'}m²</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -1314,7 +1314,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={buildArea} /> <img className={'itemLeftIcon'} src={buildArea} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_AREA ? fmoney(serviceDetail?.ServerpartInfo?.SERVERPART_AREA, 2) : '-'}m²</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_AREA ? fmoney(serviceDetail.ServerpartInfo.SERVERPART_AREA, 2) : '-'}m²</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -1322,7 +1322,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={water} /> <img className={'itemLeftIcon'} src={water} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.WATERINTAKE_TYPE === 1 ? '自来水' : serviceDetail?.ServerpartInfo?.WATERINTAKE_TYPE === 2 ? '井水' : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.WATERINTAKE_TYPE === 1 ? '自来水' : serviceDetail.ServerpartInfo.WATERINTAKE_TYPE === 2 ? '井水' : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -1330,7 +1330,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={badWater} /> <img className={'itemLeftIcon'} src={badWater} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 1 ? '市政' : serviceDetail?.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 2 ? '污水处理设备' : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 1 ? '市政' : serviceDetail.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 2 ? '污水处理设备' : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -1338,7 +1338,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={fixed} /> <img className={'itemLeftIcon'} src={fixed} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_ADDRESS ? serviceDetail?.ServerpartInfo?.SERVERPART_ADDRESS : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_ADDRESS ? serviceDetail.ServerpartInfo.SERVERPART_ADDRESS : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -1346,7 +1346,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={managerUnit} /> <img className={'itemLeftIcon'} src={managerUnit} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.MANAGERCOMPANY ? serviceDetail?.ServerpartInfo?.MANAGERCOMPANY : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.MANAGERCOMPANY ? serviceDetail.ServerpartInfo.MANAGERCOMPANY : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -1354,7 +1354,7 @@ const BrandTable: React.FC<{ currentUser: CurrentUser }> = ({ currentUser }) =>
<img className={'itemLeftIcon'} src={propryRight} /> <img className={'itemLeftIcon'} src={propryRight} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.OWNEDCOMPANY ? serviceDetail?.ServerpartInfo?.OWNEDCOMPANY : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.OWNEDCOMPANY ? serviceDetail.ServerpartInfo.OWNEDCOMPANY : ''}</div>
</div> </div>
</div> </div>
: '' : ''

View File

@ -333,7 +333,6 @@ const BusinessTradeModelTable: React.FC<{ currentUser: CurrentUser }> = (props)
<Drawer <Drawer
width={600} width={600}
visible={showDetail} visible={showDetail}
bodyStyle={{ padding: '24px' }}
onClose={() => { onClose={() => {
setCurrentRow(undefined); setCurrentRow(undefined);
setShowDetail(false); setShowDetail(false);

View File

@ -141,7 +141,6 @@ const serviceArea: React.FC<{ currentUser: CurrentUser }> = (props) => {
dataIndex: 'BUSINESS_UNIT', dataIndex: 'BUSINESS_UNIT',
align: 'center', align: 'center',
hideInSearch: true, hideInSearch: true,
ellipsis: true
}, },
] ]
@ -272,7 +271,6 @@ const serviceArea: React.FC<{ currentUser: CurrentUser }> = (props) => {
}} }}
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }} search={{ span: 6 }}
scroll={{ x: "100%", y: 'calc(100vh - 430px)' }}
request={async (params) => { request={async (params) => {
if (!selectedId) { if (!selectedId) {
return return

View File

@ -354,7 +354,6 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
setEditModal(false) setEditModal(false)
setCurrentRow(undefined) setCurrentRow(undefined)
setPersonDetail(undefined) setPersonDetail(undefined)
setShowPROWERSETList([])
}} }}
footer={<div style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> footer={<div style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div> <div>
@ -419,7 +418,6 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
setEditModal(false) setEditModal(false)
setCurrentRow(undefined) setCurrentRow(undefined)
setPersonDetail(undefined) setPersonDetail(undefined)
setShowPROWERSETList([])
}}></Button> }}></Button>
</div> </div>
</div>} </div>}
@ -446,25 +444,6 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
}) })
} }
console.log('author', author); console.log('author', author);
let list: any = []
let nowValueList: any = []
if (currentRow?.CASHWORKER_TYPE === 1) {
nowValueList = ['1', '2', '4', '5', '6', '8', '9', '10', '13', '15', '35', '47', '52', '53']
} else if (currentRow?.CASHWORKER_TYPE === 2) {
nowValueList = ['1', '2', '3', '4', '5', '6', '8', '9', '10', '13', '15', '18', '35', '36', '47', '50', '51', '52', '53', '120']
} else if (currentRow?.CASHWORKER_TYPE === 20) {
nowValueList = ['2', '3', '4', '6', '8', '9', '10', '18', '35', '47', '51']
}
if (PROWERSET && PROWERSET.length > 0) {
PROWERSET.forEach((item: any) => {
if (nowValueList.indexOf(item.value.toString()) !== -1) {
list.push(item)
}
})
}
setShowPROWERSETList(list)
setPersonDetail({ setPersonDetail({
...data, ...data,
WORKER_OTHER: author WORKER_OTHER: author

View File

@ -944,7 +944,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<div style={{ backgroundColor: '#fff', display: 'flex' }}> <div style={{ backgroundColor: '#fff', display: 'flex' }}>
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
<div style={{ <div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)', width: !collapsible ? 'calc(100% - 340px)' : 'calc(100% - 60px)',
paddingTop: 0, paddingTop: 0,
paddingBottom: 0, paddingBottom: 0,
paddingRight: 0 paddingRight: 0
@ -1279,8 +1279,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
formRef?.current?.validateFields().then(() => { formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true) handleConfirmLoading(true)
formRef?.current?.submit() formRef?.current?.submit()
}).catch((err) => {
message.error('请检查表单输入是否完整!')
}) })
}}></Button> }}></Button>
</div> </div>

File diff suppressed because it is too large Load Diff

View File

@ -99,7 +99,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
if (element) { if (element) {
element.scrollIntoView({ behavior: 'auto', block: 'start' }); element.scrollIntoView({ behavior: 'auto', block: 'start' });
} }
}; };
// 在营项目列表的请求方法 // 在营项目列表的请求方法
const handleTableList = async (id: any, type?: number, shopList?: any) => { const handleTableList = async (id: any, type?: number, shopList?: any) => {
// 需要默认选中的门店数组 // 需要默认选中的门店数组
@ -369,7 +369,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={area} /> <img className={'itemLeftIcon'} src={area} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.FLOORAREA ? fmoney(serviceDetail?.ServerpartInfo?.FLOORAREA, 2) : '-'}m²</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.FLOORAREA ? fmoney(serviceDetail.ServerpartInfo.FLOORAREA, 2) : '-'}m²</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -377,7 +377,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={stopArea} /> <img className={'itemLeftIcon'} src={stopArea} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SHAREAREA ? fmoney(serviceDetail?.ServerpartInfo?.SHAREAREA, 2) : '-'}m²</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SHAREAREA ? fmoney(serviceDetail.ServerpartInfo.SHAREAREA, 2) : '-'}m²</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -385,7 +385,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={buildArea} /> <img className={'itemLeftIcon'} src={buildArea} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_AREA ? fmoney(serviceDetail?.ServerpartInfo?.SERVERPART_AREA, 2) : '-'}m²</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_AREA ? fmoney(serviceDetail.ServerpartInfo.SERVERPART_AREA, 2) : '-'}m²</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -393,7 +393,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={water} /> <img className={'itemLeftIcon'} src={water} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.WATERINTAKE_TYPE === 1 ? '自来水' : serviceDetail?.ServerpartInfo?.WATERINTAKE_TYPE === 2 ? '井水' : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.WATERINTAKE_TYPE === 1 ? '自来水' : serviceDetail.ServerpartInfo.WATERINTAKE_TYPE === 2 ? '井水' : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -401,7 +401,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={badWater} /> <img className={'itemLeftIcon'} src={badWater} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 1 ? '市政' : serviceDetail?.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 2 ? '污水处理设备' : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 1 ? '市政' : serviceDetail.ServerpartInfo?.SEWAGEDISPOSAL_TYPE === 2 ? '污水处理设备' : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -409,7 +409,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={fixed} /> <img className={'itemLeftIcon'} src={fixed} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_ADDRESS ? serviceDetail?.ServerpartInfo?.SERVERPART_ADDRESS : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.SERVERPART_ADDRESS ? serviceDetail.ServerpartInfo.SERVERPART_ADDRESS : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -417,7 +417,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={managerUnit} /> <img className={'itemLeftIcon'} src={managerUnit} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.MANAGERCOMPANY ? serviceDetail?.ServerpartInfo?.MANAGERCOMPANY : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.MANAGERCOMPANY ? serviceDetail.ServerpartInfo.MANAGERCOMPANY : ''}</div>
</div> </div>
<div className={'detailItem'}> <div className={'detailItem'}>
@ -425,7 +425,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
<img className={'itemLeftIcon'} src={propryRight} /> <img className={'itemLeftIcon'} src={propryRight} />
<span className={'itemLeftLabel'}></span> <span className={'itemLeftLabel'}></span>
</div> </div>
<div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.OWNEDCOMPANY ? serviceDetail?.ServerpartInfo?.OWNEDCOMPANY : ''}</div> <div className={'detailItemRight'}>{serviceDetail?.ServerpartInfo?.OWNEDCOMPANY ? serviceDetail.ServerpartInfo.OWNEDCOMPANY : ''}</div>
</div> </div>
</div> </div>
: '' : ''
@ -693,7 +693,7 @@ const serviceAreaDetails = ({ onRef, onShow, id, width, onClose }: DetailProps)
} }
</div> </div>
<div className={'topRight'}> <div className={'topRight'}>
<div className={'dailyItem'}> <div className={'dailyItem'}>
<img className={'itemIcon'} src={proportion} /> <img className={'itemIcon'} src={proportion} />
<span className={'itemLabel'}></span> <span className={'itemLabel'}></span>

View File

@ -1,25 +1,25 @@
import { connect } from "umi"; import {connect} from "umi";
import type { CurrentUser } from "umi"; import type {CurrentUser} from "umi";
import type { ConnectState } from "@/models/connect"; import type {ConnectState} from "@/models/connect";
import React, { useRef, useState } from "react"; import React, {useRef, useState} from "react";
import ProCard from "@ant-design/pro-card"; import ProCard from "@ant-design/pro-card";
import { MenuFoldOutlined } from "@ant-design/icons"; import {MenuFoldOutlined} from "@ant-design/icons";
import type { FormInstance } from "antd"; import type {FormInstance} from "antd";
import { Avatar, Button, Drawer, Menu, message, Space, Spin, Tree } from "antd"; import {Avatar, Button, Drawer, Menu, message, Space, Spin, Tree} from "antd";
import useRequest from "@ahooksjs/use-request"; import useRequest from "@ahooksjs/use-request";
import { getServerpartTree, handleCallLogs } from "@/services/options"; import {getServerpartTree, handleCallLogs} from "@/services/options";
import type { ActionType } from "@ant-design/pro-table"; import type {ActionType} from "@ant-design/pro-table";
import ProTable from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table";
import ReactHTMLTableToExcel from "react-html-table-to-excel"; import ReactHTMLTableToExcel from "react-html-table-to-excel";
import SubMenu from "antd/lib/menu/SubMenu"; import SubMenu from "antd/lib/menu/SubMenu";
import moment from "moment/moment"; import moment from "moment/moment";
import { handleGetCHECKACCOUNTList, handleUpLoadAuditExplain } from "@/pages/reports/audit/feedback/service"; import {handleGetCHECKACCOUNTList, handleUpLoadAuditExplain} from "@/pages/reports/audit/feedback/service";
import AuditDetail from "@/pages/DataVerification/list/components/auditDetail"; import AuditDetail from "@/pages/DataVerification/list/components/auditDetail";
import upload from '@/assets/upload.png' import upload from '@/assets/upload.png'
import PageTitleBox from "@/components/PageTitleBox"; import PageTitleBox from "@/components/PageTitleBox";
const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => { const checkAcount: React.FC<{ currentUser: CurrentUser}> = (props) => {
const { currentUser } = props const { currentUser } = props
const downloadBtnRef = useRef<any>() const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
@ -27,24 +27,24 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源 const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容 const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
const [collapsible, setCollapsible] = useState<boolean>(false) const [collapsible, setCollapsible] = useState<boolean>(false)
const [treeView, setTreeView] = useState<any>() const [treeView,setTreeView] = useState<any>()
// 加载服务区树 // 加载服务区树
const { loading: treeLoading, data: treeViews } = useRequest(async () => { const { loading: treeLoading, data: treeViews } = useRequest(async () => {
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true) const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
setTreeView(data) setTreeView(data)
return data return data
}) })
// 树相关的属性和方法 // 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>() const [selectedId, setSelectedId] = useState<string>()
// 导出的加载效果 // 导出的加载效果
const [showLoading, setShowLoading] = useState<boolean>(false) const [showLoading,setShowLoading] = useState<boolean>(false)
// 是否显示打印的表格 // 是否显示打印的表格
const [showExportTable, setShowExportTable] = useState<boolean>(false) const [showExportTable,setShowExportTable] = useState<boolean>(false)
const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点 const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点
// 点击稽查反馈出现的弹框 // 点击稽查反馈出现的弹框
const [inspectionModal, setInspectionModal] = useState<boolean>(false) const [inspectionModal,setInspectionModal] = useState<boolean>(false)
const auditDetailRef = useRef<any>() const auditDetailRef = useRef<any>()
const [currentRow, setCurrentRow] = useState<any>() const [currentRow,setCurrentRow] = useState<any>()
const columns: any = [ const columns: any = [
{ {
@ -53,9 +53,9 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
dataIndex: 'TREATMENT_MARKSTATE', dataIndex: 'TREATMENT_MARKSTATE',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
0: '全部', 0:'全部',
1: '未反馈', 1:'未反馈',
2: '未冲正' 2:'未冲正'
}, },
initialValue: '0' initialValue: '0'
}, },
@ -66,7 +66,7 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
hideInTable: true, hideInTable: true,
hideInDescriptions: true, hideInDescriptions: true,
colSize: 1, colSize: 1,
initialValue: [moment().add(-1, 'month').format('YYYY-MM-DD'), moment().add(-1, "day").format('YYYY-MM-DD')], initialValue: [moment().add(-1, 'month').format('YYYY-MM-DD'), moment().add(-1,"day").format('YYYY-MM-DD')],
search: { search: {
transform: (value) => { transform: (value) => {
return { return {
@ -80,20 +80,20 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
} }
}, },
{ {
title: '稽查类型', title:'稽查类型',
hideInTable: true, hideInTable: true,
dataIndex: 'CHECK_TYPE', dataIndex:'CHECK_TYPE',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum:{
"": "全部", "":"全部",
"现场稽查": "现场稽查", "现场稽查":"现场稽查",
"区域稽查": "区域稽查", "区域稽查":"区域稽查",
"公司稽查": "公司稽查", "公司稽查":"公司稽查",
}, },
initialValue: "" initialValue: ""
}, },
{ {
title: '图片上传', title:'图片上传',
hideInTable: true, hideInTable: true,
hideInSearch: true, hideInSearch: true,
dataIndex: '' dataIndex: ''
@ -115,25 +115,23 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
dataIndex: 'HasImage', dataIndex: 'HasImage',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
"0": '全部', "0":'全部',
"1": '支持', "1": '支持',
"2": '不支持' "2": '不支持'
}, },
initialValue: "0" initialValue: "0"
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'序号'}</div>, title: <div style={{textAlign:'center'}}>{'序号'}</div>,
hideInSearch: true, hideInSearch: true,
width: 70, width: 70,
align: 'center',
valueType: 'index', valueType: 'index',
dataIndex: 'index' dataIndex: ''
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'服务区名称'}</div>, title: <div style={{textAlign:'center'}}>{'服务区名称'}</div>,
hideInSearch: true, hideInSearch: true,
width: 120, width: 120,
ellipsis: true,
dataIndex: 'SERVERPART_NAME', dataIndex: 'SERVERPART_NAME',
// render:(_,record)=>{ // render:(_,record)=>{
// return <div style={{display:'flex',alignItems:'center'}}> // return <div style={{display:'flex',alignItems:'center'}}>
@ -147,34 +145,34 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
// } // }
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'门店名称'}</div>, title: <div style={{textAlign:'center'}}>{'门店名称'}</div>,
hideInSearch: true, hideInSearch: true,
ellipsis: true, ellipsis: true,
width: 150, width: 150,
dataIndex: 'SHOPNAME', dataIndex: 'SHOPNAME',
render: (_, record) => { render:(_,record)=>{
return <div style={{ display: 'flex', alignItems: 'center' }}> return <div style={{display:'flex',alignItems:'center'}}>
{ {
record?.HasImage ? record?.HasImage ?
<img style={{ width: '20px', height: '20px' }} src={upload} /> <img style={{width:'20px',height:'20px'}} src={upload}/>
: '' :''
} }
{record?.SHOPNAME || ''} {record?.SHOPNAME ||''}
</div> </div>
} }
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'稽核反馈'}</div>, title: <div style={{textAlign:'center'}}>{'稽核反馈'}</div>,
width: 200, width: 200,
ellipsis: true, ellipsis: true,
hideInSearch: true, hideInSearch: true,
dataIndex: 'CHECKACCOUNT_DESC', dataIndex: 'CHECKACCOUNT_DESC',
render: (_, record) => { render:(_,record)=>{
return <a onClick={() => { return <a onClick={()=>{
setCurrentRow({ setCurrentRow({
...record, ...record,
Audit_Id: record.CHECKACCOUNT_ID, Audit_Id: record.CHECKACCOUNT_ID,
MachineCode: record.MACHINECODE MachineCode:record.MACHINECODE
}) })
setInspectionModal(true) setInspectionModal(true)
}}> }}>
@ -183,54 +181,54 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
} }
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'稽核误差率'}</div>, title: <div style={{textAlign:'center'}}>{'稽核误差率'}</div>,
width: 140, width: 140,
hideInSearch: true, hideInSearch: true,
align: 'right', align: 'right',
dataIndex: 'ERROR_RATE', dataIndex: 'ERROR_RATE',
render: (_, record) => { render:(_,record)=>{
return record?.ERROR_RATE ? return record?.ERROR_RATE?
<span style={{ color: 'red', fontWeight: 'bold' }}>{`${record?.ERROR_RATE}%`}</span> <span style={{color: 'red',fontWeight:'bold'}}>{`${record?.ERROR_RATE}%`}</span>
: '-' :'-'
} }
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'长短款/冲正流水'}</div>, title: <div style={{textAlign:'center'}}>{'长短款/冲正流水'}</div>,
width: 160, width: 160,
hideInSearch: true, hideInSearch: true,
align: 'right', align: 'right',
dataIndex: 'DIFFERENT_PRICE', dataIndex: 'DIFFERENT_PRICE',
render: (_, record) => { render:(_,record)=>{
return <span style={{ color: record.DIFFERENT_PRICE < 0 || record?.REPLENISH_AMOUNT < 0 ? 'red' : record.DIFFERENT_PRICE > 0 || record?.REPLENISH_AMOUNT > 0 ? '#008000' : '', fontWeight: 'bold' }}> return <span style={{color:record.DIFFERENT_PRICE <0||record?.REPLENISH_AMOUNT<0?'red':record.DIFFERENT_PRICE >0||record?.REPLENISH_AMOUNT>0?'#008000':'',fontWeight:'bold' }}>
{`${record.DIFFERENT_PRICE || '0'}/${record?.REPLENISH_AMOUNT || '0'}`} {`${record.DIFFERENT_PRICE || '0'}/${record?.REPLENISH_AMOUNT || '0'}`}
</span> </span>
} }
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'稽核现金/对客现金'}</div>, title: <div style={{textAlign:'center'}}>{'稽核现金/对客现金'}</div>,
width: 160, width: 160,
hideInSearch: true, hideInSearch: true,
dataIndex: 'CASH', dataIndex: 'CASH',
align: 'right', align: 'right',
render: (_, record) => { render:(_,record)=>{
return `${record.CASHPAY || ''}/${record?.CASH || ''}` return `${record.CASHPAY || ''}/${record?.CASH || ''}`
} }
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'对客营收'}</div>, title: <div style={{textAlign:'center'}}>{'对客营收'}</div>,
width: 120, width: 120,
hideInSearch: true, hideInSearch: true,
align: 'right', align: 'right',
dataIndex: 'TOTALSELLAMOUNT' dataIndex: 'TOTALSELLAMOUNT'
}, },
{ {
title: <div style={{ textAlign: 'center' }}>{'稽查时间'}</div>, title: <div style={{textAlign:'center'}}>{'稽查时间'}</div>,
width: 160, width: 160,
hideInSearch: true, hideInSearch: true,
align: 'right', align: 'right',
dataIndex: 'CHECK_ENDDATE', dataIndex: 'CHECK_ENDDATE',
render: (_, record) => { render: (_,record)=>{
return record?.CALIBRATOR_DATE ? moment(record?.CHECK_ENDDATE).format('YYYY-MM-DD HH:mm:ss') : '-' return record?.CALIBRATOR_DATE?moment(record?.CHECK_ENDDATE).format('YYYY-MM-DD HH:mm:ss'):'-'
} }
} }
] ]
@ -257,7 +255,7 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
tempTable.remove() // 防止重复打印一个内容 tempTable.remove() // 防止重复打印一个内容
} }
// 查询的条件 // 查询的条件
const [searchParams, setSearchParams] = useState<any>() const [searchParams,setSearchParams] = useState<any>()
return ( return (
<div ref={(el) => { <div ref={(el) => {
@ -289,13 +287,13 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
borderRadius: '8px', borderRadius: '8px',
width: '200px' width: '200px'
}}> }}>
<Spin /> <Spin/>
<span style={{ marginLeft: '5px' }}>...</span> <span style={{marginLeft: '5px'}}>...</span>
</div> </div>
</div> : '' </div> : ''
} }
<div className={'saleReportHideBox'} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}> <div className={'saleReportHideBox'} style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}>
{ {
showExportTable && reqDetailList && reqDetailList.length > 0 ? showExportTable && reqDetailList && reqDetailList.length > 0 ?
<ProTable <ProTable
@ -308,16 +306,16 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
/> : '' /> : ''
} }
</div> </div>
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} /> <div id='hiddenBox' style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}/>
<div style={{ backgroundColor: '#fff', display: 'flex' }}> <div style={{backgroundColor: '#fff',display:'flex'}}>
<ProCard <ProCard
style={{ width: !collapsible ? "300px" : "60px" }} style={{width:!collapsible ? "300px" : "60px"}}
className="pageTable-leftnav" className="pageTable-leftnav"
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }} bodyStyle={{padding: 0, paddingTop: 20, paddingLeft: 20,width:!collapsible ? "300px" : "60px"}}
extra={<MenuFoldOutlined onClick={() => { extra={<MenuFoldOutlined onClick={() => {
setCollapsible(!collapsible) setCollapsible(!collapsible)
}} />} }}/>}
colSpan={!collapsible ? "300px" : "60px"} colSpan={!collapsible ? "300px" : "60px"}
title={!collapsible ? "请选择服务区" : ""} title={!collapsible ? "请选择服务区" : ""}
headerBordered headerBordered
@ -343,11 +341,11 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
// actionRef?.current?.reload() // actionRef?.current?.reload()
// getData(selectedIds.map(n => n?.value)?.toString() || '') // getData(selectedIds.map(n => n?.value)?.toString() || '')
}} }}
// switcherIcon={<PlusOutlined />} // switcherIcon={<PlusOutlined />}
/> : ''} /> : ''}
</ProCard> </ProCard>
<div style={{ <div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)', width:!collapsible?'calc(100% - 300px)':'calc(100% - 60px)',
paddingTop: 0, paddingTop: 0,
paddingBottom: 0, paddingBottom: 0,
paddingRight: 0 paddingRight: 0
@ -358,34 +356,34 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
columns={columns} columns={columns}
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }} search={{span: 6}}
request={async (params) => { request={async(params)=>{
if (!selectedId) { if (!selectedId){
return return
} }
const req = { const req = {
SearchParameter: { SearchParameter:{
...params, ...params,
TREATMENT_MARKSTATE: params.TREATMENT_MARKSTATE === '0' ? '' : params.TREATMENT_MARKSTATE, TREATMENT_MARKSTATE:params.TREATMENT_MARKSTATE==='0'?'':params.TREATMENT_MARKSTATE,
SERVERPART_IDS: selectedId, SERVERPART_IDS: selectedId,
HasImage: params.HasImage === '0' ? null : params.HasImage === '1' ? true : params.HasImage === '2' ? false : '', HasImage: params.HasImage==='0'?null:params.HasImage==='1'?true:params.HasImage==='2'?false:'',
VALID: 1,// 有效 VALID:1 ,// 有效
}, },
PageIndex: 1, PageIndex:1,
PageSize: 99999 PageSize:99999
} }
handleCallLogs() handleCallLogs()
setSearchParams(params) setSearchParams(params)
const data = await handleGetCHECKACCOUNTList(req) const data = await handleGetCHECKACCOUNTList(req)
if (data && data.length > 0) { if (data && data.length>0){
setReqDetailList(data) setReqDetailList(data)
return { data, success: true } return {data,success: true}
} }
return { data: [], success: true } return {data: [],success: true}
}} }}
toolbar={{ toolbar={{
actions: [ actions: [
<span style={{ visibility: 'hidden' }}> <span style={{visibility: 'hidden'}}>
<ReactHTMLTableToExcel <ReactHTMLTableToExcel
buttonText={'导出excel'} buttonText={'导出excel'}
ref={downloadBtnRef} ref={downloadBtnRef}
@ -429,29 +427,29 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
setInspectionModal(false); setInspectionModal(false);
}} }}
destroyOnClose={true} destroyOnClose={true}
footer={<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', alignItems: 'center' }}> footer={<div style={{display: 'flex', width: '100%', justifyContent: 'space-between',alignItems:'center'}}>
<div> <div>
<Button danger onClick={() => { <Button danger onClick={() => {
auditDetailRef.current.setShowMoadl(!auditDetailRef.current.showModal) auditDetailRef.current.setShowMoadl(!auditDetailRef.current.showModal)
}}></Button> }}></Button>
</div> </div>
<div> <div>
<Button style={{ marginRight: '8px' }} onClick={() => { <Button style={{marginRight: '8px'}} onClick={()=>{
setCurrentRow(undefined) setCurrentRow(undefined)
setInspectionModal(false); setInspectionModal(false);
}}></Button> }}></Button>
<Button type='primary' onClick={async () => { <Button type='primary' onClick={async () => {
auditDetailRef.current?.auditFormRef.current.validateFields().then(async (res: any) => { auditDetailRef.current?.auditFormRef.current.validateFields().then(async (res: any)=>{
if (res) { if (res){
const res: any = auditDetailRef.current?.auditFormRef.current.getFieldsValue() const res: any = auditDetailRef.current?.auditFormRef.current.getFieldsValue()
const detailObj: any = auditDetailRef.current?.detailRow const detailObj: any = auditDetailRef.current?.detailRow
const imgList: any = auditDetailRef.current?.picList const imgList: any = auditDetailRef.current?.picList
let imgStr: string = '' let imgStr: string = ''
if (imgList && imgList.length > 0) { if (imgList && imgList.length>0){
imgList.forEach((item: any) => { imgList.forEach((item: any)=>{
if (imgStr) { if (imgStr){
imgStr += `,${item.url}` imgStr+=`,${item.url}`
} else { }else{
imgStr = item.url imgStr = item.url
} }
}) })
@ -459,19 +457,19 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
const req: any = { const req: any = {
CheckAccount_Id: currentRow.Audit_Id, CheckAccount_Id: currentRow.Audit_Id,
auditExplain: res?.CheckAccount_Desc, auditExplain: res?.CheckAccount_Desc,
isAddIn: !detailObj?.Add_Amount && detailObj?.Add_Amount !== 0, // 有值false 没值true isAddIn: !detailObj?.Add_Amount && detailObj?.Add_Amount!==0, // 有值false 没值true
imageInfo: imgStr, imageInfo:imgStr,
// memberShipId:'', // memberShipId:'',
provinceCode: currentUser.ProvinceCode, provinceCode: currentUser.ProvinceCode,
addAmout: res?.Add_Amount addAmout: res?.Add_Amount
} }
const data = await handleUpLoadAuditExplain(req) const data = await handleUpLoadAuditExplain(req)
if (data.Result_Code === 100) { if (data.Result_Code===100){
message.success(data.Result_Desc) message.success(data.Result_Desc)
setCurrentRow(undefined) setCurrentRow(undefined)
setInspectionModal(false); setInspectionModal(false);
actionRef.current?.reload() actionRef.current?.reload()
} else { }else{
message.error(data.Result_Desc) message.error(data.Result_Desc)
} }
} }
@ -480,12 +478,12 @@ const checkAcount: React.FC<{ currentUser: CurrentUser }> = (props) => {
</div> </div>
</div>} </div>}
> >
<AuditDetail onRef={auditDetailRef} isShow={inspectionModal} rowDetail={currentRow} currentDetail={currentRow} /> <AuditDetail onRef={auditDetailRef} isShow={inspectionModal} rowDetail={currentRow} currentDetail={currentRow}/>
</Drawer> </Drawer>
</div> </div>
) )
} }
export default connect(({ user }: ConnectState) => ({ export default connect(({user}: ConnectState) => ({
currentUser: user.currentUser currentUser: user.currentUser
}))(checkAcount); }))(checkAcount);

View File

@ -110,6 +110,17 @@ const commodityInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
}) })
const [customClassList, setCustomClassList] = useState<any>() const [customClassList, setCustomClassList] = useState<any>()
const columns: any = [ const columns: any = [
{
title: '状态',
dataIndex: 'CommodityState',
hideInTable: true,
valueType: 'select',
valueEnum: {
0: { text: '无效' },
1: { text: '有效' }
},
initialValue: '1'
},
{ {
title: '服务区', title: '服务区',
dataIndex: 'ServerpartID', dataIndex: 'ServerpartID',
@ -141,17 +152,6 @@ const commodityInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
} }
}, },
{
title: '状态',
dataIndex: 'CommodityState',
hideInTable: true,
valueType: 'select',
valueEnum: {
0: { text: '无效' },
1: { text: '有效' }
},
initialValue: '1'
},
{ {
dataIndex: 'searchText', dataIndex: 'searchText',
title: '查询内容', title: '查询内容',

View File

@ -104,6 +104,17 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
}) })
const columns: any = [ const columns: any = [
{
title: '状态',
dataIndex: 'COMMODITY_STATE',
hideInTable: true,
valueType: 'select',
valueEnum: {
0: { text: '无效' },
1: { text: '有效' }
},
initialValue: '1'
},
{ {
title: '服务区', title: '服务区',
dataIndex: 'ServerpartID', dataIndex: 'ServerpartID',
@ -120,32 +131,11 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
} }
}, },
{
title: '状态',
dataIndex: 'COMMODITY_STATE',
hideInTable: true,
valueType: 'select',
valueEnum: {
0: { text: '无效' },
1: { text: '有效' }
},
initialValue: '1'
},
{
dataIndex: 'searchText',
title: '查询内容',
hideInTable: true,
fieldProps: {
placeholder: "请输入商品名称/商品条码/商品类型"
}
},
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
width: 70, width: 70,
dataIndex: 'index', dataIndex: 'index',
hideInSearch: true, hideInSearch: true,
align: 'center',
valueType: 'index' valueType: 'index'
}, },
{ {
@ -414,14 +404,12 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
} }
const req: any = { const req: any = {
SearchType: 3, SearchType: 3,
ProvinceCode: currentUser?.ProvinceCode, ProvinceCode: currentUser?.USER_PROVINCE,
CommodityTypeId: currenMenu === '999999' ? '' : currenMenu, CommodityTypeId: currenMenu === '999999' ? '' : currenMenu,
CommodityState: params?.COMMODITY_STATE, CommodityState: params?.COMMODITY_STATE,
ServerpartID: params?.ServerpartID, ServerpartID: params?.ServerpartID,
PageIndex: 1, PageIndex: 1,
PageSize: 999999, PageSize: 999999
SearchKey: "COMMODITY_NAME,COMMODITY_BARCODE",
SearchValue: params?.searchText || ""
// PageSize: 20 // PageSize: 20
} }
handleCallLogs() handleCallLogs()
@ -880,7 +868,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
<Drawer <Drawer
width={'60%'} width={1000}
open={showDetail} open={showDetail}
onClose={() => { onClose={() => {
setCurrentRow(undefined) setCurrentRow(undefined)
@ -888,7 +876,6 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
}} }}
closable={false} closable={false}
destroyOnClose destroyOnClose
bodyStyle={{ padding: "24px" }}
> >
<Detail currentRow={currentRow} currentUser={currentUser} treeView={treeView} /> <Detail currentRow={currentRow} currentUser={currentUser} treeView={treeView} />
</Drawer> </Drawer>

View File

@ -1,7 +1,7 @@
import type { CurrentUser } from "umi"; import type { CurrentUser} from "umi";
import { connect } from "umi"; import {connect} from "umi";
import type { ConnectState } from "@/models/connect"; import type {ConnectState} from "@/models/connect";
import { Col, Row } from "antd"; import {Col, Row} from "antd";
import ProForm, { import ProForm, {
ProFormDateTimePicker, ProFormDigit, ProFormDateTimePicker, ProFormDigit,
ProFormSelect, ProFormSelect,
@ -9,35 +9,35 @@ import ProForm, {
ProFormTextArea, ProFormTextArea,
ProFormTreeSelect ProFormTreeSelect
} from "@ant-design/pro-form"; } from "@ant-design/pro-form";
import { getServerpartTree } from "@/services/options"; import {getServerpartTree} from "@/services/options";
import moment from "moment/moment"; import moment from "moment/moment";
import React, { useEffect, useRef, useState } from "react"; import React, {useEffect, useRef, useState} from "react";
import './detail.less' import './detail.less'
import { handleGetServerpartShopTrade } from "@/pages/reports/productControl/commodityInfo/service"; import {handleGetServerpartShopTrade} from "@/pages/reports/productControl/commodityInfo/service";
const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHotKey }: { currentUser?: any, treeView?: any, currentRow: any, showHotKeyEdit?: boolean, setGetNewHotKey: any }) => { const detail = ({currentUser,treeView,currentRow,showHotKeyEdit,setGetNewHotKey}: {currentUser?: any,treeView?: any,currentRow: any,showHotKeyEdit?: boolean,setGetNewHotKey: any}) => {
const modalFormRef = useRef<any>(); const modalFormRef = useRef<any>();
const [commodityList, setCommodityList] = useState<any>([]) const [commodityList,setCommodityList] = useState<any>([])
useEffect(() => { useEffect(()=>{
handleGetCommodity() handleGetCommodity()
}, [currentRow]) },[currentRow])
const handleGetCommodity = async (id: any) => { const handleGetCommodity = async (id: any)=>{
const req: any = { const req: any = {
ProvinceCode: currentUser?.USER_PROVINCE, ProvinceCode: currentUser?.USER_PROVINCE,
ServerpartId: currentRow?.SERVERPART_ID ServerpartId: currentRow?.SERVERPART_ID
} }
const data = await handleGetServerpartShopTrade(req) const data = await handleGetServerpartShopTrade(req)
console.log('data', data) console.log('data',data)
setCommodityList(data) setCommodityList(data)
} }
return ( return (
<div style={{ width: '100%', boxSizing: 'border-box', padding: '24rpx' }}> <div>
<ProForm <ProForm
formRef={modalFormRef} formRef={modalFormRef}
submitter={false} submitter={false}
initialValues={{ ...currentRow, ADDTIME: moment(currentRow?.ADDTIME).format('YYYY-MM-DD HH:mm:ss') }} initialValues={currentRow}
layout={'horizontal'} layout={'horizontal'}
> >
<div className={'modalTitle'}></div> <div className={'modalTitle'}></div>
@ -70,12 +70,12 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
data.forEach((item: any) => { data.forEach((item: any) => {
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
item.children.forEach((subItem: any) => { item.children.forEach((subItem: any) => {
list.push({ label: subItem.label, value: subItem.value }) list.push({label: subItem.label, value: subItem.value})
}) })
} }
}) })
data.forEach((item: any) => { data.forEach((item: any) => {
list.push({ label: item.label, value: item.value }) list.push({label: item.label, value: item.value})
}) })
} }
return list return list
@ -133,7 +133,7 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
label="快捷键值" label="快捷键值"
readonly={!showHotKeyEdit} readonly={!showHotKeyEdit}
fieldProps={{ fieldProps={{
onChange: (e: any) => { onChange:(e: any)=>{
setGetNewHotKey(e.target.value) setGetNewHotKey(e.target.value)
} }
}} }}
@ -145,7 +145,7 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
label="质量等级" label="质量等级"
readonly readonly
initialValue={1000} initialValue={1000}
options={[{ label: '一等品', value: 1000 }, { label: '二等品', value: 2000 }, { label: '三等品', value: 5000 }, { label: '优等品', value: 3000 }, { label: '合格品', value: 4000 },]} options={[{label:'一等品',value:1000},{label:'二等品',value:2000},{label:'三等品',value:5000},{label:'优等品',value:3000},{label:'合格品',value:4000},]}
/> />
</Col> </Col>
<Col span={8}> <Col span={8}>
@ -179,9 +179,9 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
</Col> </Col>
<Col span={24}> <Col span={24}>
<div style={{ marginBottom: '24px', display: 'flex', alignItems: "flex-start" }}> <div style={{marginBottom:'24px',display:'flex',alignItems:"flex-start"}}>
<span style={{ display: 'inline-block', width: '70px' }}></span> <span style={{display:'inline-block',width:'70px'}}></span>
<span style={{ display: 'inline-block', whiteSpace: 'pre-line', lineHeight: '22px' }}>{currentRow?.COMMODITY_DESC}</span> <span style={{display:'inline-block',whiteSpace:'pre-line',lineHeight:'22px'}}>{currentRow?.COMMODITY_DESC}</span>
</div> </div>
{/* <ProFormTextArea */} {/* <ProFormTextArea */}
{/* name="COMMODITY_DESC" */} {/* name="COMMODITY_DESC" */}
@ -198,7 +198,7 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
label="是否销售" label="是否销售"
readonly readonly
initialValue={1} initialValue={1}
options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]} options={[{label:'是',value:1},{label:'否',value:0}]}
/> />
</Col> </Col>
<Col span={8}> <Col span={8}>
@ -207,7 +207,7 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
label="是否散装" label="是否散装"
readonly readonly
initialValue={0} initialValue={0}
options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]} options={[{label:'是',value:1},{label:'否',value:0}]}
/> />
</Col> </Col>
<Col span={8}> <Col span={8}>
@ -216,7 +216,7 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
label="称重方式" label="称重方式"
readonly readonly
initialValue={1} initialValue={1}
options={[{ label: '计价', value: 1 }, { label: '散装称重', value: 0 }]} options={[{label:'计价',value:1},{label:'散装称重',value:0}]}
/> />
</Col> </Col>
@ -227,7 +227,7 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
label="审核状态" label="审核状态"
readonly readonly
initialValue={1} initialValue={1}
options={[{ label: '有效', value: 1 }, { label: '审核中', value: 2 }, { label: '无效', value: 0 }]} options={[{label:'有效',value:1},{label:'审核中',value:2},{label:'无效',value:0}]}
/> />
</Col> </Col>
<Col span={8}> <Col span={8}>
@ -314,7 +314,7 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
name="COMMODITY_FROZENCOUNT" name="COMMODITY_FROZENCOUNT"
label="采购状态" label="采购状态"
readonly readonly
options={[{ label: '允许', value: 1000 }, { label: '禁止', value: 2000 }]} options={[{label:'允许',value:1000},{label:'禁止',value:2000}]}
/> />
</Col> </Col>
</Row> </Row>
@ -322,6 +322,6 @@ const detail = ({ currentUser, treeView, currentRow, showHotKeyEdit, setGetNewHo
</div> </div>
) )
} }
export default connect(({ user }: ConnectState) => ({ export default connect(({user}: ConnectState) => ({
currentUser: user.currentUser currentUser: user.currentUser
}))(detail); }))(detail);

View File

@ -432,14 +432,13 @@ const hotkeyset: React.FC<{ currentUser: CurrentUser }> = (props) => {
</div> </div>
<Drawer <Drawer
width={'60%'} width={1000}
open={showDetail} open={showDetail}
onClose={() => { onClose={() => {
setCurrentRow(undefined) setCurrentRow(undefined)
setShowDetail(false) setShowDetail(false)
setShowHotKeyEdit(false) setShowHotKeyEdit(false)
}} }}
bodyStyle={{ padding: '24px' }}
closable={false} closable={false}
destroyOnClose destroyOnClose
footer={ footer={

View File

@ -2054,11 +2054,8 @@ const compareList: React.FC<{
MobilePayCorrect: MobilePayCorrect || 0, MobilePayCorrect: MobilePayCorrect || 0,
CashPayCorrect: CashPayCorrect || 0 CashPayCorrect: CashPayCorrect || 0
} }
console.log('reqreqrsdasda', req);
const data = await handleGetProjectPeriodIncome(req) const data = await handleGetProjectPeriodIncome(req)
console.log('data3232', data) console.log('data3232', data)
console.log('compareCurrent3232', compareCurrent)
if (data && data.length > 0) { if (data && data.length > 0) {
const secondItem: any = data[0] const secondItem: any = data[0]
@ -2160,6 +2157,9 @@ const compareList: React.FC<{
} }
} }
// setSecondTable([data[0]])
} }
if (handleGetRefreshTableData) { if (handleGetRefreshTableData) {
handleGetRefreshTableData() handleGetRefreshTableData()

View File

@ -2422,10 +2422,6 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
if (isFirst.current) { if (isFirst.current) {
isFirst.current = false isFirst.current = false
console.log('isShowClosebtn.currentisShowClosebtn.current', isShowClosebtn.current);
console.log('parentRowparentRowparentRowparentRow', parentRow);
if (isYear && isShowClosebtn.current && parentRow?.PeriodClosed) { if (isYear && isShowClosebtn.current && parentRow?.PeriodClosed) {
handleCloseSettlement(closeReqTableDataRef.current) handleCloseSettlement(closeReqTableDataRef.current)
} else if (isShowClosebtn.current && parentRow?.CLOSED_DATE && !isYear && parentRow?.PeriodClosed) { } else if (isShowClosebtn.current && parentRow?.CLOSED_DATE && !isYear && parentRow?.PeriodClosed) {

View File

@ -100,14 +100,8 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined
// 当前查询的文字 // 当前查询的文字
const [currentSearchText, setCurrentSearchText] = useState<string>('') const [currentSearchText, setCurrentSearchText] = useState<string>('')
// 预览上传后的图片 // 预览上传后的图片
const handlePreview = async (type: number) => { const handlePreview = async () => {
if (type === 1) { setFileList(fileList)
setFileList(mainImgList)
} else if (type === 2) {
setFileList(headerImgList)
} else if (type === 3) {
setFileList(detailImgList)
}
setImagePreviewVisible(true) setImagePreviewVisible(true)
}; };
const handleChangePreview = (val: any) => { const handleChangePreview = (val: any) => {
@ -695,26 +689,6 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined
pagination={{ defaultPageSize: 10 }} pagination={{ defaultPageSize: 10 }}
/> />
</div> </div>
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
<Image.PreviewGroup
preview={{
visible: imagePreviewVisible,
onVisibleChange: vis => {
setImagePreviewVisible(vis)
}
}}>
{
fileList.map((n) =>
<Image src={n.url} key={n.url} />
)
}
</Image.PreviewGroup>
</div>}
{/* 添加商品的悬浮框 */} {/* 添加商品的悬浮框 */}
<Modal <Modal
// title={currentRow ? '更新商品管理' : '新建商品管理'} // title={currentRow ? '更新商品管理' : '新建商品管理'}
@ -1340,9 +1314,7 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined
disabled disabled
fieldProps={{ fieldProps={{
beforeUpload, beforeUpload,
onPreview: () => { onPreview: handlePreview,
handlePreview(1)
},
fileList: mainImgList, // 绑定 fileList fileList: mainImgList, // 绑定 fileList
customRequest: ({ file, onSuccess }) => { customRequest: ({ file, onSuccess }) => {
// 自定义上传,不实际发送请求 // 自定义上传,不实际发送请求
@ -1400,9 +1372,7 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined
accept="image/*" accept="image/*"
fieldProps={{ fieldProps={{
beforeUpload, beforeUpload,
onPreview: () => { onPreview: handlePreview,
handlePreview(2)
},
fileList: headerImgList, // 绑定 fileList fileList: headerImgList, // 绑定 fileList
customRequest: ({ file, onSuccess }) => { customRequest: ({ file, onSuccess }) => {
// 自定义上传,不实际发送请求 // 自定义上传,不实际发送请求
@ -1462,9 +1432,7 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined
accept="image/*" accept="image/*"
fieldProps={{ fieldProps={{
beforeUpload, beforeUpload,
onPreview: () => { onPreview: handlePreview,
handlePreview(3)
},
fileList: detailImgList, // 绑定 fileList fileList: detailImgList, // 绑定 fileList
customRequest: ({ file, onSuccess }) => { customRequest: ({ file, onSuccess }) => {
// 自定义上传,不实际发送请求 // 自定义上传,不实际发送请求

View File

@ -552,7 +552,6 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
// 编辑数据 // 编辑数据
newValue = { ...values, SCENICAREA_ID: currentRow.SCENICAREA_ID }; newValue = { ...values, SCENICAREA_ID: currentRow.SCENICAREA_ID };
} }
handleConfirmLoading(true)
// 如果有开关,要把开关的代码写进去 // 如果有开关,要把开关的代码写进去
await handleAddUpdate(newValue); await handleAddUpdate(newValue);

View File

@ -1,4 +1,4 @@
// 由 scripts/writeVersion.js 自动生成 // 由 scripts/writeVersion.js 自动生成
export const VERSION = "4.5.54"; export const VERSION = "4.5.51";
export const GIT_HASH = "26ef480"; export const GIT_HASH = "a4729f7";
export const BUILD_TIME = "2025-09-10T08:05:17.397Z"; export const BUILD_TIME = "2025-09-08T03:14:16.308Z";