feature/2.9.42310.01-调薪记录

This commit is contained in:
黎永顺 2023-10-13 09:51:50 +08:00
parent 1f37bdde4b
commit 7b79fe5dc5
4 changed files with 97 additions and 0 deletions

View File

@ -0,0 +1,6 @@
import { postFetch } from "../util/request";
// 薪资项目调整记录列表
export const adjustRecordItemList = (params) => {
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/adjustRecordItemList", params);
};

View File

@ -38,6 +38,7 @@ import ReportView from "./pages/reportView";
import MySalaryView from "./pages/mySalary/mySalaryView";
import WatermarkPreview from "./pages/payroll/watermarkPreview";
import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
import stores from "./stores";
import "./style/index";
@ -88,6 +89,7 @@ const DataAcquisition = (props) => props.children;
// analysisOfSalaryStatistics 薪酬统计分析
// reportView 薪酬报表查看
// externalPersonManage 非系统人员管理
// adjustSalaryManage 档案管理
const Routes = (
<Route
@ -117,6 +119,7 @@ const Routes = (
</Route>
<Route key="salaryItem" path="salaryItem" component={SalaryItem}/>
<Route key="salaryFile" path="salaryFile" component={PayrollFiles}/>
<Route key="adjustSalaryManage" path="adjustSalaryManage" component={AdjustSalaryManage}/>
<Route
key="dataAcquisition"
path="dataAcquisition"

View File

@ -0,0 +1,88 @@
/*
* Author: 黎永顺
* name:调薪管理
* Description:
* Date: 2023/10/13
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { adjustRecordItemList } from "../../apis/adjustManage";
import { Button } from "antd";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, columns: [], dataSource: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
this.adjustRecordItemList();
}
adjustRecordItemList = () => {
const { pageInfo } = this.state;
const payload = { ...pageInfo };
this.setState({ loading: true });
adjustRecordItemList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum, pageSize, total } = data;
this.setState({
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
columns: _.map(columns, o => {
const { dataIndex } = o;
let width = "";
return { ...o, width };
})
});
}
}).catch(() => this.setState({ loading: false }));
};
render() {
const { loading, dataSource, columns, pageInfo } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
this.setState({
pageInfo: { ...pageInfo, current, pageSize }
}, () => {
});
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => {
});
}
};
return (
<WeaTop
title={getLabel(111, "调薪管理")} buttonSpace={10}
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[
<Button type="primary">{getLabel(17416, "导出")}</Button>
]}
>
<WeaTable
rowKey="id"
dataSource={dataSource} loading={loading}
pagination={pagination} columns={columns}
/>
</WeaTop>
);
}
}
export default Index;