Commit 0335b83e authored by lxd's avatar lxd

feat: 修复问

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