Commit 0335b83e authored by lxd's avatar lxd

feat: 修复问

parent e43e1931
...@@ -25,7 +25,6 @@ const PaymentMange = () => { ...@@ -25,7 +25,6 @@ const PaymentMange = () => {
const [loading, setloading] = useState(false); const [loading, setloading] = useState(false);
const [status, setstatus] = useState(1); const [status, setstatus] = useState(1);
const [pages, setpages] = useState({}); const [pages, setpages] = useState({});
const [rest, setrest] = useState(1);
const [toExamineModalVisibel, setToExamineModalVisibel] = useState(false); const [toExamineModalVisibel, setToExamineModalVisibel] = useState(false);
const reload = () => { const reload = () => {
...@@ -133,8 +132,8 @@ const PaymentMange = () => { ...@@ -133,8 +132,8 @@ const PaymentMange = () => {
onClick={() => { onClick={() => {
// eslint-disable-next-line no-unused-expressions // eslint-disable-next-line no-unused-expressions
form?.resetFields(); form?.resetFields();
setrest(2); // eslint-disable-next-line no-unused-expressions
reload(); form?.submit();
}} }}
> >
{resetText} {resetText}
...@@ -161,14 +160,7 @@ const PaymentMange = () => { ...@@ -161,14 +160,7 @@ const PaymentMange = () => {
request={params => { request={params => {
const { current, pageSize } = params; const { current, pageSize } = params;
setpages({ current, pageSize }); setpages({ current, pageSize });
let param = {}; return query({ ...params });
if (rest === 2) {
param = { current, pageSize };
} else {
param = params;
}
setrest(1);
return query({ ...param });
}} }}
columns={columns(res, pages)} columns={columns(res, pages)}
rowKey={r => r.id} rowKey={r => r.id}
......
...@@ -103,6 +103,31 @@ const ReconciliationQuery = () => { ...@@ -103,6 +103,31 @@ const ReconciliationQuery = () => {
selectedRowKeys, selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
}; };
const searchRender = ({ searchText, resetText }, { form }) => [
<Button
key="search"
type="primary"
style={{ marginRight: '10px' }}
onClick={() => {
// eslint-disable-next-line no-unused-expressions
form?.submit();
}}
>
{searchText}
</Button>,
<Button
key="rest"
style={{ marginRight: '10px' }}
onClick={() => {
// eslint-disable-next-line no-unused-expressions
form?.resetFields();
// eslint-disable-next-line no-unused-expressions
form?.submit();
}}
>
{resetText}
</Button>,
];
return ( return (
<Spin tip="处理中..." spinning={loading} delay={100}> <Spin tip="处理中..." spinning={loading} delay={100}>
...@@ -118,6 +143,7 @@ const ReconciliationQuery = () => { ...@@ -118,6 +143,7 @@ const ReconciliationQuery = () => {
rowKey={r => r.id} rowKey={r => r.id}
search={{ search={{
collapsed: false, collapsed: false,
optionRender: searchRender,
}} }}
rowSelection={rowSelection} rowSelection={rowSelection}
bordered bordered
......
...@@ -109,6 +109,32 @@ const SettlementSheet = () => { ...@@ -109,6 +109,32 @@ const SettlementSheet = () => {
disabled: !(record.settleState === 1 && !record.payBatchNo), // Column configuration not to be checked disabled: !(record.settleState === 1 && !record.payBatchNo), // Column configuration not to be checked
}), }),
}; };
const searchRender = ({ searchText, resetText }, { form }) => [
<Button
key="search"
type="primary"
style={{ marginRight: '10px' }}
onClick={() => {
// eslint-disable-next-line no-unused-expressions
form?.submit();
}}
>
{searchText}
</Button>,
<Button
key="rest"
style={{ marginRight: '10px' }}
onClick={() => {
// eslint-disable-next-line no-unused-expressions
form?.resetFields();
// eslint-disable-next-line no-unused-expressions
form?.submit();
}}
>
{resetText}
</Button>,
];
return ( return (
<Spin tip="处理中..." spinning={loading} delay={100}> <Spin tip="处理中..." spinning={loading} delay={100}>
<PageHeaderWrapper> <PageHeaderWrapper>
...@@ -123,6 +149,7 @@ const SettlementSheet = () => { ...@@ -123,6 +149,7 @@ const SettlementSheet = () => {
rowKey={r => r.settleBatchNo} rowKey={r => r.settleBatchNo}
search={{ search={{
collapsed: false, collapsed: false,
optionRender: searchRender,
}} }}
rowSelection={rowSelection} rowSelection={rowSelection}
bordered bordered
......
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