Commit a18d32d0 authored by Bill's avatar Bill

修改结算以及首页

parent 17db8a33
......@@ -15,6 +15,7 @@ import logo from '../../mockStatic/logo.png'
import MenuSlider from './components/MenuSlider'
import { getMatchMenu } from '@umijs/route-utils';
import { useGlobal } from '@/models/useGlobal';
import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
export interface BasicLayoutProps extends ProLayoutProps {
breadcrumbNameMap: {
......@@ -71,9 +72,13 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const [collapsed, setCollapsed] = useState(false)
const [selectedKeys, setSelectedKeys] = useState<string[] | undefined>([]);
// 获取全局状态
const [globalState, globalDispatch] = useGlobal()
const [globalState, globalDispatch] = useGlobal();
const isHome = location.pathname === '/memberCenter/home'
const handleMenuCollapse = (payload: boolean): void => {
if(isHome) {
return ;
}
setCollapsed(payload)
if (payload) {
setOpenKeys([])
......@@ -131,17 +136,24 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
}, [currentRouter, collapsed])
useLayoutEffect(() => {
if(location.pathname === '/memberCenter/home') {
if(isHome) {
setCollapsed(true)
} else {
setCollapsed(false);
}
}, [location.pathname])
const prolayoutStyle = isHome
? {
minHeight: '100vh',
minWidth: '1280px'
}
: {}
return (
<ProLayout
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
style={{ minHeight: '100vh', minWidth: "1500px" }}
style={prolayoutStyle}
logo={logo}
formatMessage={formatMessage}
menuHeaderRender={(logoDom, titleDom) => (
......@@ -151,6 +163,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
</Link>
)}
collapsed={collapsed}
collapsedButtonRender={(flag) => (isHome ? null : flag ? <MenuUnfoldOutlined /> : <MenuFoldOutlined/>) }
onCollapse={handleMenuCollapse}
disableContentMargin={currentRouter?.noMargin !== undefined}
breadcrumbRender={(routers = []) => [
......
......@@ -159,6 +159,10 @@ const SettlementList = () => {
}}
schema={schema}
onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/>
}
/>
......
......@@ -40,14 +40,17 @@ export const schema: ISchema = {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: "结算时间(开始时间)"
}
},
endTime: {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: "结算时间(结束时间)"
}
},
status: {
......
......@@ -183,6 +183,7 @@ const SettlementList = () => {
}}
schema={schema}
onSubmit={reload}
/>
}
/>
......
......@@ -170,6 +170,10 @@ const SettlementList = () => {
}}
schema={schema}
onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/>
}
/>
......
......@@ -148,6 +148,10 @@ const logisticsDetail: React.FC = () => {
}}
schema={logisticsDetailSchema}
onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/>
}
/>
......
......@@ -152,6 +152,12 @@ const ProductNoticeSettlementDetail: React.FC = () => {
}}
schema={detailSchema}
onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
formActions.setFieldValue('receiveStartTime', null);
formActions.setFieldValue('receiveEndTime', null);
}}
/>
}
/>
......
......@@ -40,14 +40,17 @@ export const schema: ISchema = {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: '结算日期(开始时间)'
}
},
endTime: {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: '结算日期(开始时间)'
}
},
status: {
......
......@@ -167,6 +167,10 @@ const AccountReceivable = () => {
}}
schema={schema}
onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/>
}
/>
......
......@@ -36,14 +36,16 @@ export const schema: ISchema = {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: '结算日期(开始时间)'
}
},
endTime: {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: '结算日期(结束时间)'
}
},
status: {
......
......@@ -168,6 +168,10 @@ const Integral: React.FC = () => {
}}
schema={schema}
onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
}}
/>
}
/>
......
......@@ -41,14 +41,16 @@ export const schema: ISchema = {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: '结算日期(开始时间)'
}
},
endTime: {
type: 'string',
'x-component': 'DatePicker',
'x-component-props': {
allowClear: true
allowClear: true,
placeholder: '结算日期(结束时间)'
}
},
status: {
......
......@@ -73,6 +73,9 @@ const MemberSettle: React.FC<{}> = () => {
{
title: '操作',
render: (text, record) => {
if(record.status == 1) {
return null
}
return (
<Space>
<Link to={`/memberCenter/balance/settleRules/memberSettleList/edit?id=${record.id}`}>修改</Link>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment