Commit 1598a7eabdd83a0247960f6d20585a0c2f395eb7

Authored by 曾国涛
2 parents 1a0e794e 11b8315a

Merge branch 'warning' of http://39.108.227.113:8001/zhusen/canrd-erp-front into warning

src/pages/Order/OrderWarning/index.tsx
... ... @@ -192,7 +192,9 @@ const OrderPage = () => {
192 192 const [subOrderCount, setSubOrderCount] = useState(0);
193 193 const [sorted] = useState(false);
194 194 const mainTableRef = useRef<ActionType>();
  195 + const mainTableSecondRef = useRef<ActionType>();
195 196 const mainTableFormRef = useRef<ProFormInstance>();
  197 + const mainTableSecondFormRef = useRef<ProFormInstance>();
196 198 let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储
197 199 console.log(searchParams);
198 200 const [messageApi, contextHolder] = message.useMessage();
... ... @@ -4211,7 +4213,8 @@ const OrderPage = () =&gt; {
4211 4213 // 监听 calDate 变化,触发请求
4212 4214 useEffect(() => {
4213 4215 if (calDate2) {
4214   - mainTableRef.current?.reload();
  4216 + // mainTableRef.current?.reload();
  4217 + mainTableSecondRef.current?.reload();
4215 4218 }
4216 4219 }, [calDate2]);
4217 4220  
... ... @@ -4235,8 +4238,9 @@ const OrderPage = () =&gt; {
4235 4238 * 以params中的id为主,如果params没id,则取url中的id
4236 4239 * 第一次进来这个页面,url带有id的话,会自动填充到查询表单中,但是第一次查询params不会带这个id进来
4237 4240 */
4238   - let orderIds = mainTableFormRef.current?.getFieldValue('id');
4239   - let subOrderId = mainTableFormRef.current?.getFieldValue('subOrderId');
  4241 + let orderIds = mainTableSecondFormRef.current?.getFieldValue('id');
  4242 + let subOrderId =
  4243 + mainTableSecondFormRef.current?.getFieldValue('subOrderId');
4240 4244 params.id = params.id || orderIds;
4241 4245 params.subOrderId = params.subOrderId || subOrderId;
4242 4246 if (params.id !== '') {
... ... @@ -4920,8 +4924,8 @@ const OrderPage = () =&gt; {
4920 4924 id="main-table"
4921 4925 // tableStyle={{backgroundColor:'red'}}
4922 4926  
4923   - actionRef={mainTableRef}
4924   - formRef={mainTableFormRef}
  4927 + actionRef={mainTableSecondRef}
  4928 + formRef={mainTableSecondFormRef}
4925 4929 expandIconColumnIndex={-1}
4926 4930 columns={mainOrdersColumns}
4927 4931 rowKey="id"
... ...