|
|
@@ -20,7 +20,6 @@ import type {
|
|
|
CreateSalaryRequest,
|
|
|
UpdateSalaryRequest,
|
|
|
SalaryResponse,
|
|
|
- SalaryListResponse,
|
|
|
QuerySalaryParams
|
|
|
} from '../api/types';
|
|
|
|
|
|
@@ -216,17 +215,8 @@ const SalaryManagement: React.FC = () => {
|
|
|
};
|
|
|
|
|
|
// 处理数值变化,实时计算总薪资
|
|
|
- const handleValueChange = (field: keyof CreateSalaryRequest, value: number) => {
|
|
|
- if (isCreateForm) {
|
|
|
- const formValues = createForm.getValues();
|
|
|
- const total = calculateTotalSalary(
|
|
|
- field === 'basicSalary' ? value : formValues.basicSalary,
|
|
|
- field === 'allowance' ? value : (formValues.allowance || 0),
|
|
|
- field === 'insurance' ? value : (formValues.insurance || 0),
|
|
|
- field === 'housingFund' ? value : (formValues.housingFund || 0)
|
|
|
- );
|
|
|
- // 可以在这里显示总薪资,但不需要保存到表单
|
|
|
- }
|
|
|
+ const handleValueChange = (_field: keyof CreateSalaryRequest, _value: number) => {
|
|
|
+ // 实时计算功能已集成在表单显示中
|
|
|
};
|
|
|
|
|
|
return (
|
|
|
@@ -327,9 +317,8 @@ const SalaryManagement: React.FC = () => {
|
|
|
<DataTablePagination
|
|
|
currentPage={searchParams.page}
|
|
|
pageSize={searchParams.limit}
|
|
|
- total={data.total}
|
|
|
- onPageChange={(page) => handlePaginationChange(page, searchParams.limit)}
|
|
|
- onPageSizeChange={(limit) => handlePaginationChange(1, limit)}
|
|
|
+ totalCount={data.total}
|
|
|
+ onPageChange={(page, pageSize) => handlePaginationChange(page, pageSize)}
|
|
|
/>
|
|
|
)}
|
|
|
</>
|