Merge branch 'feature/2.9.42310.01-调薪记录' into release/2.9.42310.01
This commit is contained in:
commit
a61e6eb847
|
|
@ -0,0 +1,6 @@
|
|||
import { postFetch } from "../util/request";
|
||||
|
||||
// 薪资项目调整记录列表
|
||||
export const adjustRecordItemList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/salaryItemList", params);
|
||||
};
|
||||
|
|
@ -41,6 +41,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";
|
||||
|
|
@ -93,6 +94,7 @@ const DataAcquisition = (props) => props.children;
|
|||
// analysisOfSalaryStatistics 薪酬统计分析
|
||||
// reportView 薪酬报表查看
|
||||
// externalPersonManage 非系统人员管理
|
||||
// adjustSalaryManage 档案管理
|
||||
|
||||
const Routes = (
|
||||
<Route
|
||||
|
|
@ -122,6 +124,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"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 调薪记录-查看面板
|
||||
* Description:
|
||||
* Date: 2023/10/16
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { adjustSearchConditions } from "../conditions";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { commonEnumList } from "../../../../apis/ruleconfig";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("payrollFilesStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchConditions: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
searchConditions: _.map(adjustSearchConditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, o => {
|
||||
if (getKey(o) === "userStatus") {
|
||||
return {
|
||||
...o,
|
||||
options: [
|
||||
{ key: "0", showname: getLabel(18883, "试用") }, {
|
||||
key: "1",
|
||||
showname: getLabel(15711, "正式")
|
||||
},
|
||||
{ key: "2", showname: getLabel(480, "临时") }, {
|
||||
key: "3",
|
||||
showname: getLabel(15844, "试用延期")
|
||||
},
|
||||
{ key: "4", showname: getLabel(542707, "解雇") }, {
|
||||
key: "5",
|
||||
showname: getLabel(6091, "离职")
|
||||
},
|
||||
{ key: "6", showname: getLabel(6092, "退休") }
|
||||
]
|
||||
};
|
||||
} else if (getKey(o) === "adjustReason") {
|
||||
return {
|
||||
...o,
|
||||
options: _.map(data, item => ({
|
||||
key: item.value,
|
||||
showname: item.defaultLabel
|
||||
}))
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
}),
|
||||
title: getLabel(32905, "常用条件")
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const { payrollFilesStore: { adjustForm } } = this.props;
|
||||
adjustForm.initFormFields(this.state.searchConditions);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { searchConditions } = this.state;
|
||||
const { payrollFilesStore: { adjustForm } } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="wea-advanced-searchsAd">
|
||||
{getSearchs(adjustForm, searchConditions, 2, false)}
|
||||
</div>
|
||||
<div className="wea-search-buttons">
|
||||
<div style={{ textAlign: "center" }}>
|
||||
<span style={{ marginLeft: 15 }}><Button type="primary"
|
||||
onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button></span>
|
||||
<span style={{ marginLeft: 15 }}><Button type="ghost"
|
||||
onClick={() => adjustForm.resetForm()}>{getLabel(2022, "重置")}</Button></span>
|
||||
<span style={{ marginLeft: 15 }}><Button type="ghost"
|
||||
onClick={this.props.onToggleSwitch}>{getLabel(31129, "取消")}</Button></span>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("payrollFilesStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
render() {
|
||||
const { payrollFilesStore: { adjustForm } } = this.props;
|
||||
return (
|
||||
<div className="advance-search">
|
||||
<WeaInputSearch value={adjustForm.getFormParams().username}
|
||||
onChange={v => adjustForm.updateFields({ username: v })}
|
||||
onSearch={this.props.onAdvanceSearch}
|
||||
/>
|
||||
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||
onClick={this.props.onOpenAdvanceSearch}>{getLabel(111, "高级搜索")}</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
.advance-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: -2.5px;
|
||||
|
||||
.wea-advanced-search {
|
||||
top: 2px;
|
||||
left: -1px;
|
||||
height: 28px;
|
||||
line-height: 1;
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
}
|
||||
|
||||
.wea-advanced-search:hover {
|
||||
border: 1px solid #dadada;
|
||||
color: #474747;
|
||||
}
|
||||
|
||||
.text-elli {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
export const adjustSearchConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["username"],
|
||||
fieldcol: 12,
|
||||
label: "姓名",
|
||||
lanId: 25034,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "57",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["departmentIds"],
|
||||
fieldcol: 12,
|
||||
label: "部门",
|
||||
lanId: 27511,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "24",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["positionIds"],
|
||||
fieldcol: 12,
|
||||
label: "岗位",
|
||||
lanId: 6086,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["userStatus"],
|
||||
fieldcol: 12,
|
||||
label: "状态",
|
||||
lanId: 535101,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["adjustItem"],
|
||||
fieldcol: 12,
|
||||
label: "项目名称",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["adjustReason"],
|
||||
fieldcol: 12,
|
||||
label: "调整原因",
|
||||
lanId: 1897,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["effectiveTime1", "effectiveTime2"],
|
||||
fieldcol: 12,
|
||||
label: "生效日期",
|
||||
lanId: 19548,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["operateTime1", "operateTime2"],
|
||||
fieldcol: 12,
|
||||
label: "操作日期",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "17",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["operatorIds"],
|
||||
fieldcol: 12,
|
||||
label: "操作人",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["description"],
|
||||
fieldcol: 12,
|
||||
label: "备注",
|
||||
lanId: 536726,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
],
|
||||
defaultshow: true,
|
||||
title: "common"
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:调薪管理
|
||||
* Description:
|
||||
* Date: 2023/10/13
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { adjustRecordItemList } from "../../apis/adjustManage";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import AdjustAdvanceSearchPannel from "./components/adjustAdvanceSearchPannel";
|
||||
import cs from "classnames";
|
||||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("payrollFilesStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, columns: [], dataSource: [], showSearchAd: false,
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.adjustRecordItemList();
|
||||
}
|
||||
|
||||
adjustRecordItemList = () => {
|
||||
const { payrollFilesStore: { adjustForm } } = this.props;
|
||||
const {
|
||||
departmentIds, positionIds, operatorIds,
|
||||
effectiveTime1 = "", effectiveTime2 = "",
|
||||
operateTime1 = "", operateTime2 = "",
|
||||
...extra
|
||||
} = adjustForm.getFormParams();
|
||||
const { pageInfo } = this.state;
|
||||
const payload = {
|
||||
...pageInfo, ...extra,
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: departmentIds ? departmentIds.split(",") : [],
|
||||
operatorIds: departmentIds ? departmentIds.split(",") : [],
|
||||
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
||||
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
||||
};
|
||||
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 => {
|
||||
if (o.dataIndex === "username") {
|
||||
return { ...o, width: 150, fixed: "left" };
|
||||
}
|
||||
return { ...o, width: 150 };
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
|
||||
adjustExport = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
const { payrollFilesStore: { adjustForm } } = this.props;
|
||||
const {
|
||||
effectiveTime1 = "", effectiveTime2 = "",
|
||||
operateTime1 = "", operateTime2 = "",
|
||||
...extra
|
||||
} = adjustForm.getFormParams();
|
||||
const payload = {
|
||||
...extra,
|
||||
effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "",
|
||||
operateTime: operateTime1 ? `${operateTime1},${operateTime2}` : ""
|
||||
};
|
||||
window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_target");
|
||||
this.handleDebounce = null;
|
||||
}, 500);
|
||||
}
|
||||
this.handleDebounce();
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource, columns, pageInfo, showSearchAd } = 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 }
|
||||
}, () => this.adjustRecordItemList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.adjustRecordItemList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(111, "调薪管理")} buttonSpace={10} className="adjustManageLayout"
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.adjustExport}>{getLabel(17416, "导出")}</Button>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.openAdvanceSearch()}
|
||||
onAdvanceSearch={this.adjustRecordItemList}/>
|
||||
]}
|
||||
>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<AdjustAdvanceSearchPannel
|
||||
onToggleSwitch={this.openAdvanceSearch}
|
||||
onAdSearch={this.adjustRecordItemList}
|
||||
/>
|
||||
</div>
|
||||
<WeaTable
|
||||
rowKey="id" scroll={{ x: 1200, y: "calc(100vh - 155px)" }}
|
||||
dataSource={dataSource} loading={loading}
|
||||
pagination={pagination} columns={columns}
|
||||
/>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
.adjustManageLayout {
|
||||
|
||||
.searchAdvanced-condition-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchAdvanced-condition-container {
|
||||
background: #FFF;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-search-buttons {
|
||||
border-top: 1px solid #dadada;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.wea-advanced-searchsAd {
|
||||
height: 320px;
|
||||
overflow: hidden auto;
|
||||
|
||||
.formItem-delete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -40px;
|
||||
}
|
||||
|
||||
.searchAdvanced-commonSelect {
|
||||
border-top: 1px solid #ebebeb;
|
||||
margin: 0 25px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.custom-advance-largeSpacing {
|
||||
padding-left: 26px;
|
||||
|
||||
.link {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 12px 10px 12px 26px;
|
||||
color: #2db7f5
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { action, observable } from "mobx";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
import * as API from "../apis/payrollFiles";
|
||||
import { getDataPerspective, statisticsEmployeeDetailList } from "../apis/statistics";
|
||||
|
||||
|
|
@ -10,6 +10,8 @@ export class PayrollFilesStore {
|
|||
@observable tableStore = new TableStore();
|
||||
@observable employeeTableStore = new TableStore();
|
||||
@observable pivotTableStore = new TableStore();
|
||||
@observable adjustForm = new WeaForm(); //调薪记录-核算form
|
||||
@action initAdjustForm = () => this.adjustForm = new WeaForm();//调薪记录-初始化核算form
|
||||
|
||||
@action("薪资档案-列表查询")
|
||||
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue