Commit d8d19164 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:订单详情发货明细中添加跳转,处理再次点击同样的菜单重载页面没有清空筛选的数据问题

parent 49863d81
......@@ -75,12 +75,19 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
}
const clickMenuItem = ({ item, key, keyPath, domEvent }) => {
// 对比url和点击项的key 相同的话重载页面
// 对比url和点击项的key 相同的话重载页面 并清空筛选的store
if(key === currentSelectKey[currentSelectKey.length-1]) {
clearHeightSearchParams()
window.location.reload()
}
}
const clearHeightSearchParams = () => {
let currentState = JSON.parse(sessionStorage.getItem("currentState"))
let result = {...currentState, queryParams: {}, current: 1}
sessionStorage.setItem("currentState", JSON.stringify(result))
}
return <>
<OuterSider {...props} />
<Sider theme="light" className="menu_sider" collapsed={props.collapseState}>
......
......@@ -193,6 +193,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
dataIndex: 'logisticsNo',
align: 'center',
key: 'logisticsNo',
render: text => <a href="">{text}</a>
},
{
title: '物流公司',
......@@ -205,6 +206,7 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
dataIndex: 'storageNo',
align: 'center',
key: 'storageNo',
render: text => <a href="">{text}</a>
},
{
title: '入库时间',
......
......@@ -139,7 +139,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const clearModalParams = () => {
let currentState = JSON.parse(sessionStorage.getItem("currentState"))
let result = {...currentState, queryParams: { currentPage: 1}}
let result = {...currentState, queryParams: {}, current: 1}
sessionStorage.setItem("currentState", JSON.stringify(result))
}
......
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