Commit 96f570dd11130375f2432f16830aca5ddcbb6723
1 parent
2de89892
refactor(order): 确保枚举值在引用前正确定义
重构订单页面的枚举值引用,确保在使用之前已经定义。这避免了在组件中直接引用枚举值可能导致的错误。
Showing
1 changed file
with
4 additions
and
2 deletions
src/pages/Order/OrderWarning/index.tsx
... | ... | @@ -124,6 +124,7 @@ import ShippingWarehouseChangeModal from './components/ShippingWarehouseChangeMo |
124 | 124 | import UploadPayBillModal from './components/UploadPayBillModal'; |
125 | 125 | import './index.less'; |
126 | 126 | import { OrderListItemType, OrderType } from './type.d'; |
127 | + | |
127 | 128 | const OrderPage = () => { |
128 | 129 | const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); |
129 | 130 | const [checkVisible, setCheckVisible] = useState<boolean>(false); |
... | ... | @@ -196,8 +197,10 @@ const OrderPage = () => { |
196 | 197 | const [sorted] = useState(false); |
197 | 198 | const mainTableRef = useRef<ActionType>(); |
198 | 199 | const mainTableFormRef = useRef<ProFormInstance>(); |
199 | - let [setSearchParam] = useState(Object); //表格的查询条件存储 | |
200 | + let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储 | |
201 | + console.log(searchParams); | |
200 | 202 | const [messageApi, contextHolder] = message.useMessage(); |
203 | + console.log(messageApi); | |
201 | 204 | const [ |
202 | 205 | shippingWarehouseChangeModalVisible, |
203 | 206 | setShippingWarehouseChangeModalVisible, |
... | ... | @@ -206,7 +209,6 @@ const OrderPage = () => { |
206 | 209 | const [recordOptNode, setRecordOptNode] = useState(null); |
207 | 210 | const roleCode = userInfo?.roleSmallVO?.code; |
208 | 211 | |
209 | - console.log(messageApi); | |
210 | 212 | const triggerRecordOptNode = async (id) => { |
211 | 213 | const res = await postServiceOrderGetCurrentOptNode({ |
212 | 214 | query: { | ... | ... |