|
@@ -96,9 +96,9 @@ function Approve(props) {
|
|
|
}, [OAAuditData]);
|
|
|
const onTabChange = (activeKey) => {
|
|
|
if (activeKey == '1') {
|
|
|
- OAAuditRun();
|
|
|
+ OAAuditRun({ current: 1, page_size: 10 });
|
|
|
} else {
|
|
|
- if (user?.Permission['menu-001-audit']) conAuditRun({ status: 1 });
|
|
|
+ if (user?.Permission['menu-001-audit']) conAuditRun({ status: 1, currentPage: 1, page_size: 10 });
|
|
|
}
|
|
|
setTabActive(activeKey);
|
|
|
};
|
|
@@ -107,10 +107,16 @@ function Approve(props) {
|
|
|
OAApplyRun(values);
|
|
|
};
|
|
|
const handleProfilePaginationChange = (pagination) => {
|
|
|
- conApplyRun({
|
|
|
+ conAuditRun({
|
|
|
+ status: user?.Permission['menu-001-audit'] ? 1 : undefined,
|
|
|
currentPage: pagination.current,
|
|
|
- pageSize: 10,
|
|
|
-
|
|
|
+ page_size: 10,
|
|
|
+ });
|
|
|
+ };
|
|
|
+ const handleApplyPaginationChange = (pagination) => {
|
|
|
+ OAAuditRun({
|
|
|
+ currentPage: pagination.current,
|
|
|
+ pageSize: pagination.pageSize,
|
|
|
});
|
|
|
};
|
|
|
const columns = [
|
|
@@ -266,8 +272,8 @@ function Approve(props) {
|
|
|
columns={columns}
|
|
|
dataSource={applyData}
|
|
|
loading={OAAuditLoading}
|
|
|
- // pagination={queryApplyListRequest?.data?.pagination}
|
|
|
- // onChange={handleApplyPaginationChange}
|
|
|
+ pagination={OAAuditData.pagination}
|
|
|
+ onChange={handleApplyPaginationChange}
|
|
|
/>
|
|
|
</>
|
|
|
);
|
|
@@ -314,7 +320,7 @@ function Approve(props) {
|
|
|
dataSource={conAuditData?.data}
|
|
|
loading={conAduitLoading}
|
|
|
pagination={conAuditData?.pagination}
|
|
|
- // onChange={handleProfilePaginationChange}
|
|
|
+ onChange={handleProfilePaginationChange}
|
|
|
/>
|
|
|
</>
|
|
|
);
|
|
@@ -326,11 +332,11 @@ function Approve(props) {
|
|
|
}}
|
|
|
tabList={[
|
|
|
{
|
|
|
- tab: 'OA审批',
|
|
|
+ tab: `OA审批(${OAAuditData?.pagination?.total || 0})`,
|
|
|
key: '1',
|
|
|
},
|
|
|
{
|
|
|
- tab: '合同管理',
|
|
|
+ tab: `合同管理(${conAuditData?.pagination?.total || 0})`,
|
|
|
key: '2',
|
|
|
},
|
|
|
]}
|