薪资档案以及社保福利档案页面添加四个tab的列表查询
This commit is contained in:
parent
284761360f
commit
d7fcdd2637
|
|
@ -0,0 +1,55 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
//获取薪资档案各tab的人数
|
||||
export const queryTabTotal = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/queryTabTotal", "GET", params);
|
||||
};
|
||||
//待定薪列表
|
||||
export const queryList = ({ url, ...params }) => {
|
||||
return postFetch(url, params);
|
||||
};
|
||||
// 导入档案
|
||||
export const importSalaryArchive = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/importSalaryArchive', params);
|
||||
}
|
||||
// 薪资档案预览
|
||||
export const salaryArchivePreview = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/preview', params);
|
||||
}
|
||||
// 公共枚举接口
|
||||
export const commonEnumList = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params);
|
||||
}
|
||||
// 获取导入类型
|
||||
export const getImportTypes = () => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getImportTypes', 'GET', {});
|
||||
}
|
||||
// 发起调薪地址
|
||||
export const salaryAdjustmentInfo = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', params);
|
||||
}
|
||||
// 停薪
|
||||
export const stopSalary = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/stopSalary', params);
|
||||
}
|
||||
// 一键全部设为定薪员工
|
||||
export const allGotoFixed = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoFixed', params);
|
||||
}
|
||||
// 设为定薪员工
|
||||
export const gotoFixed = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/gotoFixed', params);
|
||||
}
|
||||
// 停薪
|
||||
export const gotoStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/gotoStop', params);
|
||||
}
|
||||
//全部停薪
|
||||
export const allGotoStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoStop', params);
|
||||
}
|
||||
// 取消停薪
|
||||
export const cancelStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/cancelStop', params);
|
||||
}
|
||||
|
|
@ -31,3 +31,7 @@ export const queryAppsetting = (params) => {
|
|||
export const saveEncryptSetting = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting', params);
|
||||
}
|
||||
//获取加密进度条
|
||||
export const getEncryptProgress = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/sys/app/getEncryptProgress', 'GET', params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { WeaTools } from 'ecCom';
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
export const tips = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/archives/tips', 'get', params);
|
||||
|
|
@ -8,13 +9,25 @@ export const getCondition = params => {
|
|||
return WeaTools.callApi('/api/bs/hrmsalary/archives/getSearchCondition', 'get', params);
|
||||
};
|
||||
|
||||
//社保福利档案列表
|
||||
export const queryList = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/archives/getTable', params);
|
||||
};
|
||||
//社保福利档案列表
|
||||
export const queryInsuranceTabTotal = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/archives/queryInsuranceTabTotal', params);
|
||||
};
|
||||
//删除待办
|
||||
export const updateRunStatus = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/archives/updateRunStatus', params);
|
||||
};
|
||||
export const getTable = params => {
|
||||
return fetch('/api/bs/hrmsalary/archives/getTable', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
};
|
||||
|
|
@ -34,7 +47,7 @@ export const save = params => {
|
|||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
};
|
||||
|
|
@ -56,12 +69,12 @@ export const exportCurData = params => {
|
|||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.blob().then(blob => {
|
||||
var filename=`社保福利档案模板.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
|
|
@ -76,7 +89,7 @@ export const previewCurData = (params) => {
|
|||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
|
@ -88,7 +101,7 @@ export const importBatch = (params) => {
|
|||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
|
@ -98,7 +111,7 @@ export const exportArchives = (ids) => {
|
|||
fetch('/api/bs/hrmsalary/scheme/export?ids=' + ids).then(res => res.blob().then(blob => {
|
||||
var filename=`社保福利档案.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { Col, Row } from "antd";
|
||||
import { WeaInput, WeaSelect } from "ecCom";
|
||||
|
||||
|
||||
export default class CustomForm extends React.Component {
|
||||
handleChange(params) {
|
||||
let request = { ...this.props.request, ...params };
|
||||
|
|
@ -23,31 +22,31 @@ export default class CustomForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={18}>
|
||||
{
|
||||
item.conditionType == "INPUT" &&
|
||||
<WeaInput viewAttr={item.rules == "required" ? 3 : 2} value={request[item.domkey[0]]}
|
||||
item.conditionType === "INPUT" &&
|
||||
<WeaInput viewAttr={item.rules === "required" ? 3 : 2} value={request[item.domkey[0]]}
|
||||
disabled={disabledValue} onChange={(value) => {
|
||||
this.handleChange({ [item.domkey[0]]: value });
|
||||
}}/>
|
||||
}
|
||||
|
||||
{
|
||||
item.conditionType == "RADIO" && item.options &&
|
||||
item.conditionType === "RADIO" && item.options &&
|
||||
<WeaSelect
|
||||
detailtype={3} value={request[item.domkey[0]]}
|
||||
disabled={disabledValue}
|
||||
viewAttr={item.rules == "required" ? 3 : 2}
|
||||
viewAttr={item.rules === "required" ? 3 : 2}
|
||||
onChange={(value) => this.handleChange({ [item.domkey[0]]: value })}
|
||||
options={item.options.map(o => ({ showname: o.showname, key: o.key }))}
|
||||
/>
|
||||
}
|
||||
|
||||
{
|
||||
item.conditionType == "CHECKBOX" &&
|
||||
item.conditionType === "CHECKBOX" &&
|
||||
item.options &&
|
||||
<WeaSelect
|
||||
detailtype={2}
|
||||
disabled={disabledValue}
|
||||
viewAttr={item.rules == "required" ? 3 : 2}
|
||||
viewAttr={item.rules === "required" ? 3 : 2}
|
||||
value={request[item.domkey[0]]}
|
||||
options={item.options.map(o => ({ showname: o.showname, key: o.key }))}
|
||||
onChange={(value) => this.handleChange({ [item.domkey[0]]: value })}/>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default class ImportModal extends React.Component {
|
|||
const { params } = this.props;
|
||||
let flag = true;
|
||||
try {
|
||||
if(this.props.renderFormComponent){
|
||||
if (this.props.renderFormComponent) {
|
||||
params && Object.keys(params).forEach((key) => {
|
||||
if (!params[key] || params[key] == "") {
|
||||
message.warning("请完善导入选项");
|
||||
|
|
@ -99,11 +99,14 @@ export default class ImportModal extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { step, slideDataSource, isInit, isStandingBook, params,needimportSelected } = this.props;
|
||||
const { step, slideDataSource, isInit, isStandingBook, params, needimportSelected } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
title="数据导入" visible={this.props.visiable}
|
||||
onCancel={this.props.onCancel}
|
||||
onCancel={() => {
|
||||
localStorage.removeItem("fileList");
|
||||
this.props.onCancel();
|
||||
}}
|
||||
style={{ width: 850 }}
|
||||
className="importModalWrapper"
|
||||
initLoadCss
|
||||
|
|
@ -117,7 +120,10 @@ export default class ImportModal extends React.Component {
|
|||
this.hanleImportData();
|
||||
}}>下一步</Button>
|
||||
] : [
|
||||
<Button type="primary" onClick={() => this.props.onFinish()}>完成</Button>
|
||||
<Button type="primary" onClick={() => {
|
||||
localStorage.removeItem("fileList");
|
||||
this.props.onFinish();
|
||||
}}>完成</Button>
|
||||
]
|
||||
}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { WeaCheckbox } from "ecCom";
|
||||
import { WeaCheckbox,WeaTools } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Icon, Upload, message } from "antd";
|
||||
import { Icon, message, Upload } from "antd";
|
||||
|
||||
const Dragger = Upload.Dragger;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ export default class ModalStep1 extends React.Component {
|
|||
datetime: "",
|
||||
taxAgentId: "",
|
||||
hasData: "0",
|
||||
fileList: []
|
||||
fileList: WeaTools.ls.getJSONObj('fileList') || []
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -48,9 +48,11 @@ export default class ModalStep1 extends React.Component {
|
|||
|
||||
if (fileList && fileList.length > 0 && fileList[0].response && fileList[0].response.status === 1) {
|
||||
this.props.onFileIdChange(fileList[0].response.data.fileid);
|
||||
} else if (fileList && fileList.length === 0) {
|
||||
this.props.onFileIdChange("");
|
||||
}
|
||||
|
||||
this.setState({ fileList });
|
||||
this.setState({ fileList },()=>localStorage.setItem("fileList", JSON.stringify(this.state.fileList)));
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
@ -70,7 +72,7 @@ export default class ModalStep1 extends React.Component {
|
|||
}
|
||||
};
|
||||
return (
|
||||
<div style={{ display: "flex", flexFlow: "column" }}>
|
||||
<div style={{ display: "flex", flexFlow: "column" }}>
|
||||
<div>
|
||||
{
|
||||
this.props.formComponent && <div className="stepInformItem">
|
||||
|
|
@ -110,19 +112,19 @@ export default class ModalStep1 extends React.Component {
|
|||
<p>1. 第一步,请选择导出的Excel文件或
|
||||
{
|
||||
(typeof this.props.templateLink) == "string" ?
|
||||
<a href="javascript:void(0);" onClick={()=>{
|
||||
let url= `${this.props.templateLink}${downloadExtra}`;
|
||||
if(needimportSelected){
|
||||
<a href="javascript:void(0);" onClick={() => {
|
||||
let url = `${this.props.templateLink}${downloadExtra}`;
|
||||
if (needimportSelected) {
|
||||
try {
|
||||
params && Object.keys(params).forEach((key) => {
|
||||
if (!params[key] || params[key] == "") {
|
||||
message.warning("请完善导入选项,再下载!");
|
||||
throw new Error("请完善导入选项,再下载!");
|
||||
}else{
|
||||
if(url.indexOf("?")>0){
|
||||
url= `${url}&${key}=${params[key]}`
|
||||
}else{
|
||||
url= `${url}?${key}=${params[key]}`
|
||||
} else {
|
||||
if (url.indexOf("?") > 0) {
|
||||
url = `${url}&${key}=${params[key]}`;
|
||||
} else {
|
||||
url = `${url}?${key}=${params[key]}`;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -130,7 +132,7 @@ export default class ModalStep1 extends React.Component {
|
|||
return;
|
||||
}
|
||||
}
|
||||
window.open(url,"_blank")
|
||||
window.open(url, "_blank");
|
||||
}}>点击这里下载模板</a>
|
||||
:
|
||||
<a onClick={() => {
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ export default class ModalStep3 extends React.Component {
|
|||
columns={this.columns}
|
||||
dataSource={importResult.errorData}
|
||||
pagination={false}
|
||||
scroll={{ y: `calc(100vh - 387px)` }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetai
|
|||
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
||||
import SalaryItem from "./pages/salaryItem";
|
||||
import SalaryFile from "./pages/salaryFile";
|
||||
import PayrollFiles from "./pages/payrollFiles";
|
||||
import CumDeduct from "./pages/dataAcquisition/cumDeduct";
|
||||
import OtherDeduct from "./pages/dataAcquisition/otherDeduct";
|
||||
import CumSituation from "./pages/dataAcquisition/cumSituation";
|
||||
|
|
@ -101,7 +102,7 @@ const Routes = (
|
|||
/>
|
||||
</Route>
|
||||
<Route key="salaryItem" path="salaryItem" component={SalaryItem} />
|
||||
<Route key="salaryFile" path="salaryFile" component={SalaryFile} />
|
||||
<Route key="salaryFile" path="salaryFile" component={PayrollFiles} />
|
||||
<Route
|
||||
key="dataAcquisition"
|
||||
path="dataAcquisition"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2022-09-27 18:17:02
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaSearchGroup, WeaTop } from "ecCom";
|
||||
import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaSearchGroup, WeaTop } from "ecCom";
|
||||
import * as API from "../../apis/ruleconfig";
|
||||
import { Button, message } from "antd";
|
||||
|
||||
|
|
@ -82,3 +82,15 @@ export const CheckBox = payload => {
|
|||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
|
||||
export const PickDate = payload => {
|
||||
const { label, onChange, value, viewAttr } = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaDatePicker
|
||||
value={value}
|
||||
viewAttr={viewAttr}
|
||||
onChange={(date) => onChange({ type: label, date })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
import React, { Component } from "react";
|
||||
import * as API from "../../../apis/payrollFiles";
|
||||
import { Menu, message } from "antd";
|
||||
import "../index.less";
|
||||
|
||||
class AllWithoutPay extends Component {
|
||||
handleClick = ({ key }) => {
|
||||
const { selectedRowKeys = [], refreshList } = this.props;
|
||||
if (key === "batchWithoutpay") {
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
API.gotoStop(selectedRowKeys).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功!");
|
||||
refreshList();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
});
|
||||
}else{
|
||||
API.allGotoStop().then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功!");
|
||||
refreshList();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
|
||||
<Menu.Item key="allWithoutpay">全部停薪</Menu.Item>
|
||||
<Menu.Item key="batchWithoutpay">批量停薪</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default AllWithoutPay;
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
import React, { Component } from "react";
|
||||
import { Menu, message } from "antd";
|
||||
import * as API from "../../../apis/payrollFiles";
|
||||
import "../index.less";
|
||||
|
||||
class BatchSuspendpay extends Component {
|
||||
handleClick = ({ key }) => {
|
||||
const { selectedRowKeys, refreshList } = this.props;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
API.cancelStop(selectedRowKeys).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功!");
|
||||
refreshList();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
|
||||
<Menu.Item key="batchSuspendpay">批量取消停薪</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default BatchSuspendpay;
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
import React, { Component } from "react";
|
||||
import { Menu, message } from "antd";
|
||||
import "../index.less";
|
||||
|
||||
class ExportMenu extends Component {
|
||||
componentDidMount() {}
|
||||
|
||||
handleClick = ({ key }) => this[key]();
|
||||
handleExportAll = () => {
|
||||
let url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=`;
|
||||
const { searchItemsValue } = this.props;
|
||||
const fileds = Object.keys(searchItemsValue);
|
||||
_.forEach(fileds, it => {
|
||||
url = `${url}&${it}=${searchItemsValue[it]}`;
|
||||
});
|
||||
window.open(url, "_self");
|
||||
};
|
||||
handleExportSelect = () => {
|
||||
const { selectedRowKeys } = this.props;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=${selectedRowKeys.join(",")}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
|
||||
<Menu.Item key="handleExportAll">导出全部</Menu.Item>
|
||||
<Menu.Item key="handleExportSelect">导出选中</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ExportMenu;
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
import React, { Component } from "react";
|
||||
import ImportModal from "../../../components/importModal";
|
||||
import * as API from "../../../apis/payrollFiles";
|
||||
import { Menu, Modal } from "antd";
|
||||
import "../index.less";
|
||||
|
||||
class ImportMenu extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
previewColumns: [],
|
||||
previewDataSource: [],
|
||||
importParams: {
|
||||
visible: false,
|
||||
step: 0,
|
||||
isInit: false,
|
||||
importType: "",
|
||||
importResult: {}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
salaryArchivePreview = (params) => {
|
||||
params.importType = this.state.importParams.importType;
|
||||
API.salaryArchivePreview(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { headers, list } = data;
|
||||
this.setState({
|
||||
previewColumns: headers.map((item, index) => {
|
||||
return {
|
||||
key: index,
|
||||
title: item,
|
||||
dataIndex: index
|
||||
};
|
||||
}),
|
||||
previewDataSource: list.map(item => {
|
||||
let result = {};
|
||||
item.map((i, index) => {
|
||||
result[index] = i;
|
||||
});
|
||||
return result;
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleMenuClick = (e) => {
|
||||
const { key } = e;
|
||||
if (key === "init") {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入,点击确定继续导入`,
|
||||
onOk: () => {
|
||||
this.setState({
|
||||
importParams: {
|
||||
...this.state.importParams,
|
||||
importType: key,
|
||||
isInit: true,
|
||||
visible: true,
|
||||
step: 0
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
importParams: {
|
||||
...this.state.importParams,
|
||||
importType: key,
|
||||
isInit: true,
|
||||
visible: true,
|
||||
step: 0
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
handleInitModal = () => {
|
||||
// 清空列表数据
|
||||
this.setState({
|
||||
previewDataSource:[],
|
||||
importParams: {
|
||||
...this.state.importParams,
|
||||
importResult:{},
|
||||
}
|
||||
});
|
||||
};
|
||||
// 导入档案
|
||||
handleImportFile = (params) => {
|
||||
params.importType = this.state.importParams.importType;
|
||||
API.importSalaryArchive(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
data.errorData = data.errorNotice;
|
||||
this.setState({
|
||||
importParams: {
|
||||
...this.state.importParams,
|
||||
importResult: data
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importType, refreshList } = this.props;
|
||||
const { importParams, previewColumns, previewDataSource } = this.state;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Menu className="dropdownMenuWrapper" onClick={this.handleMenuClick}>
|
||||
{_.filter(importType, it => it.id !== "taxAgentAdjust").map((item) => (
|
||||
<Menu.Item key={item.id}>{item.content}</Menu.Item>
|
||||
))}
|
||||
</Menu>
|
||||
{importParams.visible && (
|
||||
<ImportModal
|
||||
init={() => {
|
||||
this.handleInitModal();
|
||||
}}
|
||||
isInit={importParams.isInit}
|
||||
columns={previewColumns}
|
||||
slideDataSource={previewDataSource}
|
||||
step={importParams.step}
|
||||
setStep={(step) => {
|
||||
this.setState({ importParams: { ...this.state.importParams, step } });
|
||||
}}
|
||||
importResult={importParams.importResult}
|
||||
onFinish={() => {
|
||||
this.setState({
|
||||
importParams: {
|
||||
...this.state.importParams,
|
||||
visible: false
|
||||
}
|
||||
}, () => refreshList());
|
||||
}}
|
||||
previewImport={(params) => this.salaryArchivePreview(params)}
|
||||
importFile={(params) => this.handleImportFile(params)}
|
||||
templateLink={
|
||||
"/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" +
|
||||
importParams.importType
|
||||
}
|
||||
visiable={importParams.visible}
|
||||
onCancel={() => {
|
||||
this.setState({ importParams: { ...this.state.importParams, visible: false } });
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ImportMenu;
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
export const tabCondition = [
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "PENDING",
|
||||
showcount: true,
|
||||
title: "待定薪",
|
||||
viewcondition: "pending"
|
||||
},
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "FIXED",
|
||||
showcount: true,
|
||||
title: "发薪员工",
|
||||
viewcondition: "fixed"
|
||||
},
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "SUSPEND",
|
||||
showcount: true,
|
||||
title: "待停薪",
|
||||
viewcondition: "suspend"
|
||||
},
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "STOP",
|
||||
showcount: true,
|
||||
title: "停薪员工",
|
||||
viewcondition: "stop"
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,705 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:薪资档案
|
||||
* Description:
|
||||
* Date: 2022-10-10 17:53:44
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { toJS } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { tabCondition } from "./config";
|
||||
import * as API from "../../apis/payrollFiles";
|
||||
import {
|
||||
WeaBrowser,
|
||||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaInput,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaSlideModal,
|
||||
WeaTab,
|
||||
WeaTable,
|
||||
WeaTop
|
||||
} from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { Button, Dropdown, Menu, message, Modal, Popover } from "antd";
|
||||
import ImportMenu from "./components/importMenu";
|
||||
import ExportMenu from "./components/exportMenu";
|
||||
import AllWithoutPay from "./components/allWithoutPay";
|
||||
import BatchSuspendsPay from "./components/batchSuspendsPay";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide";
|
||||
import ChangeSalaryModal from "../salaryFile/changeSalaryModal";
|
||||
import "./index.less";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
|
||||
@inject("payrollFilesStore", "taxAgentStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "pending",
|
||||
showSearchAd: false,
|
||||
dataSource: [],
|
||||
archiveStatusList: [],
|
||||
userStatusList: [],
|
||||
importType: [],
|
||||
selectedRowKeys: [],
|
||||
tabCount: {
|
||||
SUSPEND: 0,
|
||||
STOP: 0,
|
||||
FIXED: 0,
|
||||
PENDING: 0
|
||||
},
|
||||
loading: {
|
||||
query: false,
|
||||
add: false,
|
||||
update: false
|
||||
},
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
searchItemsValue: {
|
||||
username: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
userstatus: "",
|
||||
// archiveStatus: "EFFICIENT",
|
||||
taxAgentId: "",
|
||||
subcompanyIds: ""
|
||||
},
|
||||
salaryAdjustmentInfo: {},
|
||||
changeSalaryVisible: false,
|
||||
noPayDate: "",
|
||||
slideParams: {
|
||||
visible: false,
|
||||
id: ""
|
||||
},
|
||||
paysetParams: {
|
||||
startPaydate: "",
|
||||
lastPaydate: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Input = (value, key) => {
|
||||
const { username } = this.state.searchItemsValue;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaInput value={username} onChange={(val) => this.setState({
|
||||
searchItemsValue: {
|
||||
...this.state.searchItemsValue,
|
||||
[key]: val
|
||||
}
|
||||
})}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
Browser = (value, key) => {
|
||||
const { positionIds, departmentIds, subcompanyIds } = this.state.searchItemsValue;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaBrowser
|
||||
isSingle={false}
|
||||
value={key === "departmentIds" ? departmentIds : key === "subcompanyIds" ? subcompanyIds : positionIds}
|
||||
type={key === "departmentIds" ? 57 : key === "subcompanyIds" ? 164 : 278}
|
||||
onChange={(val) => {
|
||||
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
||||
}}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
Select = (value, key) => {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { userstatus, archiveStatus, taxAgentId } = this.state.searchItemsValue;
|
||||
const { archiveStatusList, userStatusList } = this.state;
|
||||
const { taxAgentAdminOption } = taxAgentStore;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaSelect
|
||||
value={key === "userstatus" ? userstatus : key === "taxAgentId" ? taxAgentId : archiveStatus}
|
||||
options={key === "userstatus" ? userStatusList : key === "taxAgentId" ? [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ...taxAgentAdminOption] : archiveStatusList}
|
||||
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||
getTaxAgentSelectListAsAdmin();
|
||||
const init = this.init();
|
||||
this.queryTabTotal();
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
||||
}
|
||||
|
||||
init = async () => {
|
||||
const { data: archiveStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" });
|
||||
const { data: userStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" });
|
||||
this.setState({
|
||||
archiveStatusList: [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ..._.map(archiveStatusList, it => ({
|
||||
key: String(it.value),
|
||||
showname: it.defaultLabel
|
||||
}))],
|
||||
userStatusList: [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ..._.map(userStatusList, it => ({
|
||||
key: String(it.value),
|
||||
showname: it.defaultLabel
|
||||
}))]
|
||||
}, () =>
|
||||
this.getImportTypes());
|
||||
};
|
||||
|
||||
salaryAdjustmentInfo = () => {
|
||||
API.salaryAdjustmentInfo().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ salaryAdjustmentInfo: data });
|
||||
}
|
||||
});
|
||||
};
|
||||
queryTabTotal = () => {
|
||||
API.queryTabTotal().then(({ data = {}, status }) => {
|
||||
if (status) {
|
||||
this.setState({ tabCount: { ...this.state.tabCount, ...data } });
|
||||
}
|
||||
});
|
||||
};
|
||||
queryList = (url) => {
|
||||
const { loading, pageInfo, searchItemsValue } = this.state;
|
||||
const { payrollFilesStore: { tableStore, queryList } } = this.props;
|
||||
const payload = { ...pageInfo };
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
queryList(payload, searchItemsValue, url).then(({ data, status }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { dataKey, pageInfo: paganition } = data;
|
||||
const { datas } = dataKey;
|
||||
const { list: dataSource, total, pageNum: current, pageSize } = paganition;
|
||||
// tableStore.getDatas(datas);
|
||||
this.setState({
|
||||
dataSource,
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
total,
|
||||
current,
|
||||
pageSize
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
//一键全部设为定薪员工
|
||||
allGotoFixed = () => {
|
||||
const { pageInfo } = this.state;
|
||||
if (pageInfo.total === 0) {
|
||||
message.warning("您没有需要处理的待定薪人员!");
|
||||
return;
|
||||
}
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: `确定要将所有待定薪人员(共${pageInfo.total}条数据)设为发薪人员吗?`,
|
||||
onOk: () => {
|
||||
API.allGotoFixed().then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功!");
|
||||
this.query();
|
||||
this.queryTabTotal();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
commonEnumList = (params) => {
|
||||
return API.commonEnumList(params);
|
||||
};
|
||||
getImportTypes = () => {
|
||||
API.getImportTypes().then(({ data, status }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importType: data
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
getRightOptionBtns = () => {
|
||||
const { selectedKey, importType, selectedRowKeys, searchItemsValue } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
if (selectedKey === "pending") {
|
||||
return [
|
||||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
importType={_.filter(importType, it => it.id !== "salaryItemAdjust")}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.queryTabTotal();
|
||||
}}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导入<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={<ExportMenu selectedRowKeys={selectedRowKeys} searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导出<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Button type="ghost" onClick={this.allGotoFixed}>全部设为发薪人员</Button>
|
||||
];
|
||||
} else if (selectedKey === "fixed" && showOperateBtn) {
|
||||
return [
|
||||
<WeaHelpfulTip
|
||||
width={300}
|
||||
title={<HelpfulDiv/>}
|
||||
placement="topLeft"
|
||||
/>,
|
||||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
importType={importType}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.queryTabTotal();
|
||||
}}/>
|
||||
}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导入<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={<ExportMenu selectedRowKeys={selectedRowKeys} searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导出<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "suspend" && showOperateBtn) {
|
||||
return [
|
||||
<Dropdown overlay={
|
||||
<AllWithoutPay
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.queryTabTotal();
|
||||
}}
|
||||
/>
|
||||
}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>全部停薪<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
importType={_.filter(importType, it => it.id !== "salaryItemAdjust")}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.queryTabTotal();
|
||||
}}/>
|
||||
}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导入<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "stop" && showOperateBtn) {
|
||||
return [
|
||||
<Dropdown overlay={
|
||||
<BatchSuspendsPay
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.queryTabTotal();
|
||||
}}
|
||||
/>
|
||||
}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>批量取消停薪<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={<ExportMenu selectedRowKeys={selectedRowKeys} searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导出<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
}
|
||||
return [];
|
||||
};
|
||||
getColumns = () => {
|
||||
const { pageInfo, selectedKey } = this.state;
|
||||
const { payrollFilesStore: { tableStore } } = this.props;
|
||||
let columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true");
|
||||
return _.map([{
|
||||
title: "序号",
|
||||
dataIndex: "index",
|
||||
align: "left",
|
||||
oldWidth: 60,
|
||||
render: (text, record, index) => {
|
||||
const { current, pageSize } = pageInfo;
|
||||
return (current - 1) * pageSize + index + 1;
|
||||
}
|
||||
}, ...columns], (item, index) => {
|
||||
if (index === 0) {
|
||||
return { ...item, width: item.oldWidth, fixed: "left" };
|
||||
}
|
||||
if (item.dataIndex === "operate") {
|
||||
return {
|
||||
...item, fixed: "right",
|
||||
width: 150,
|
||||
render: (text, record) => {
|
||||
if (selectedKey === "pending") {
|
||||
return <div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10" onClick={() => this.handleEdit(record)}>编辑</a>
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleMenuClick(e, record.id)}>
|
||||
<Menu.Item key="payroll">设为发薪人员</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
</div>;
|
||||
} else if (selectedKey === "fixed") {
|
||||
return <a onClick={() => this.handleEdit(record)}>调薪</a>;
|
||||
} else if (selectedKey === "suspend") {
|
||||
return <div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10" onClick={() => this.handleEdit(record)}>编辑</a>
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleMenuClick(e, record.id)}>
|
||||
<Menu.Item key="stopSalary">停薪</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
</div>;
|
||||
} else {
|
||||
return <div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10" onClick={() => this.handleEdit(record)}>取消停薪</a>
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu>
|
||||
<Menu.Item key="setting:1">查看</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item, width: item.oldWidth };
|
||||
});
|
||||
};
|
||||
handleEdit = (record) => {
|
||||
this.setState({
|
||||
slideParams: {
|
||||
...this.state.slideParams,
|
||||
visible: true,
|
||||
id: record.id
|
||||
}
|
||||
}, () => this.salaryAdjustmentInfo());
|
||||
};
|
||||
//列表操作
|
||||
handleMenuClick = (e, id) => {
|
||||
const { key } = e;
|
||||
if (key === "payroll") {
|
||||
//设为定薪员工
|
||||
API.gotoFixed([id]).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功!");
|
||||
this.queryTabTotal();
|
||||
this.query();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
});
|
||||
} else if (key === "stopSalary") {
|
||||
//停薪
|
||||
API.gotoStop([id]).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功!");
|
||||
this.queryTabTotal();
|
||||
this.query();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
// 查看 Slide 头部操作按钮
|
||||
renderEditSlideOperate = () => {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { slideParams: { id }, salaryAdjustmentInfo, selectedKey } = this.state;
|
||||
const { isShow, url } = salaryAdjustmentInfo;
|
||||
let arrList = [];
|
||||
if (showOperateBtn && isShow === "true" && selectedKey === "fixed") {
|
||||
arrList.push(<Button type="primary" onClick={() => {
|
||||
window.open(`${url}&salaryArchiveId=${id}`);
|
||||
}}>发起调薪</Button>);
|
||||
}
|
||||
if (showOperateBtn && selectedKey === "fixed") {
|
||||
arrList.push(<Button type="primary" onClick={() => {
|
||||
this.setState({ changeSalaryVisible: true });
|
||||
}}>调薪</Button>);
|
||||
}
|
||||
selectedKey !== "stop" && arrList.push(<Button type="primary" onClick={this.handleSave}>保存</Button>);
|
||||
return arrList;
|
||||
};
|
||||
//切换tab
|
||||
handleChangeTab = (selectedKey) => {
|
||||
const { slideParams } = this.state;
|
||||
this.setState({
|
||||
slideParams: { ...slideParams, visible: false, id: "" },
|
||||
selectedKey
|
||||
}, () => this.query());
|
||||
};
|
||||
//编辑保存
|
||||
handleSave = () => {
|
||||
const { paysetParams } = this.state;
|
||||
if (_.isEmpty(paysetParams.startPaydate)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
// TODO: 薪资档案保存
|
||||
};
|
||||
//发薪设置
|
||||
handleSetpay = (params) => {
|
||||
const { type, date } = params;
|
||||
const { paysetParams } = this.state;
|
||||
if (type === "起始发薪日期") {
|
||||
this.setState({ paysetParams: { ...paysetParams, startPaydate: date } });
|
||||
} else if (type === "最后发薪日期") {
|
||||
this.setState({ paysetParams: { ...paysetParams, lastPayDate: date } });
|
||||
}
|
||||
};
|
||||
query = () => {
|
||||
const { selectedKey } = this.state;
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
||||
break;
|
||||
case "fixed":
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/fixedList");
|
||||
break;
|
||||
case "suspend":
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList");
|
||||
break;
|
||||
default:
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/stopList");
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
tabCount,
|
||||
selectedKey,
|
||||
loading,
|
||||
dataSource,
|
||||
pageInfo,
|
||||
showSearchAd,
|
||||
selectedRowKeys,
|
||||
slideParams,
|
||||
changeSalaryVisible
|
||||
} = this.state;
|
||||
const { payrollFilesStore: { tableStore } } = this.props;
|
||||
const pagination = {
|
||||
total: pageInfo.total,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
|
||||
this.query();
|
||||
});
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => {
|
||||
this.query();
|
||||
});
|
||||
}
|
||||
};
|
||||
const renderSearch = () => {
|
||||
const searchItems = [
|
||||
{ com: this.Input("姓名", "username") },
|
||||
{ com: this.Browser("分部", "subcompanyIds") },
|
||||
{ com: this.Browser("部门", "departmentIds") },
|
||||
{ com: this.Browser("岗位", "positionIds") },
|
||||
{ com: this.Select("人员状态", "userstatus") },
|
||||
// { com: this.Select("档案状态", "archiveStatus") },
|
||||
{ com: this.Select("个税扣缴义务人", "taxAgentId") }
|
||||
];
|
||||
return <WeaSearchGroup title={"基本信息"} items={searchItems} showGroup/>;
|
||||
};
|
||||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
<Button type="primary" onClick={() => {
|
||||
this.setState({ showSearchAd: false }, () => this.query());
|
||||
}}> 搜索 </Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({
|
||||
searchItemsValue: {
|
||||
username: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
userstatus: "",
|
||||
archiveStatus: ""
|
||||
}
|
||||
})}> 重置 </Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}> 取消 </Button>
|
||||
];
|
||||
const rightMenu = [
|
||||
// 右键菜单
|
||||
{
|
||||
key: "BTN_COLUMN",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: "显示列定制",
|
||||
onClick: () => {
|
||||
tableStore.setColSetVisible(true);
|
||||
tableStore.tableColSet(true);
|
||||
}
|
||||
}
|
||||
];
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
|
||||
};
|
||||
return (
|
||||
<div className="payrollFilesWrapper">
|
||||
<WeaTop
|
||||
title="薪资档案" // 文字
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
>
|
||||
<WeaTab
|
||||
datas={tabCondition}
|
||||
counts={tabCount}
|
||||
keyParam="viewcondition" //主键
|
||||
countParam="groupid" //数量
|
||||
selectedKey={selectedKey}
|
||||
onChange={this.handleChangeTab}
|
||||
buttons={this.getRightOptionBtns()}
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={(bool) => this.setState({ showSearchAd: bool })} //高级搜索面板受控
|
||||
searchsAd={renderSearch()} // 高级搜索内部数据g1etSearchs(form, toJS(condition), 2)
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={this.query} // 点搜索按钮时的回调this.handleSearch()
|
||||
searchsBasePlaceHolder={"请输入姓名"}
|
||||
onSearchChange={(v) => this.setState({
|
||||
searchItemsValue: {
|
||||
...this.state.searchItemsValue,
|
||||
username: v
|
||||
}
|
||||
})} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值form.updateFields({ username: v })
|
||||
searchsBaseValue={this.state.searchItemsValue.username}
|
||||
/>
|
||||
<WeaTable
|
||||
loading={loading.query}
|
||||
rowKey="id"
|
||||
columns={this.getColumns()} dataSource={dataSource} pagination={pagination}
|
||||
rowClassName={(record) => record.archiveStatus === "ARCHIVE" ? "archiveRow" : ""}
|
||||
rowSelection={rowSelection}
|
||||
scroll={{ x: 1200 }}
|
||||
/>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
comsWeaTableStore={tableStore}
|
||||
needScroll={true}
|
||||
/>
|
||||
</WeaTop>
|
||||
{slideParams.visible && (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
visible={slideParams.visible}
|
||||
top={0}
|
||||
width={50}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle="员工薪资档案"
|
||||
editable={false}
|
||||
customOperate={this.renderEditSlideOperate()}
|
||||
/>
|
||||
}
|
||||
content={<SalaryFileViewSlide id={slideParams.id} selectedKey={selectedKey}
|
||||
handleSetpay={this.handleSetpay}/>}
|
||||
onClose={() => {
|
||||
this.setState({ slideParams: { ...slideParams, visible: false, id: "" } });
|
||||
}}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => {
|
||||
this.setState({ slideParams: { ...slideParams, visible: false, id: "" } });
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{changeSalaryVisible && (
|
||||
<ChangeSalaryModal
|
||||
currentId={slideParams.id}
|
||||
visible={changeSalaryVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ changeSalaryVisible: false });
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
||||
const HelpfulDiv = () => {
|
||||
return <div className="helpWrapper">
|
||||
<span>导入按钮使用场景说明:</span>
|
||||
<span>1.档案初始化:</span>
|
||||
<span className="pl10">
|
||||
<span>a.初次使用薪酬模块,全量导入员工的薪资档案数据;</span>
|
||||
<span>b.员工入职,导入新入职的员工的薪资档案数据(若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入);</span>
|
||||
<span>c.返聘人员使用调薪功能调整薪资档案值或使用调整个税扣缴;</span>
|
||||
</span>
|
||||
<span>2.调薪:档案中已存在的人员批量调整薪资项目值(包括返聘人员的情况);</span>
|
||||
<span>3.调整个税扣缴义务人:档案中已存在的人员批量调整个税扣缴义务人(包括返聘人员的情况);</span>
|
||||
</div>;
|
||||
};
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
.payrollFilesWrapper {
|
||||
.archiveRow {
|
||||
background: #F1F3F4;
|
||||
}
|
||||
|
||||
.optWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.moreIconWrapper {
|
||||
.ant-popover-inner {
|
||||
min-width: 106px
|
||||
}
|
||||
|
||||
.ant-popover-inner-content {
|
||||
padding: 0;
|
||||
|
||||
.ant-menu {
|
||||
.ant-menu-item {
|
||||
border-right: none;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//提示语
|
||||
.helpWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.pl10 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
//下拉框菜单样式
|
||||
.dropdownMenuWrapper {
|
||||
.ant-menu-item {
|
||||
border-right: none;
|
||||
padding: 0 16px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
//侧拉框样式
|
||||
.slideOuterWrapper {
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.wea-slide-modal-title + div {
|
||||
padding-bottom: 70px!important;
|
||||
}
|
||||
|
||||
.rodal-close {
|
||||
z-index: 99;
|
||||
top: 10px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px) {
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1060px) and (max-width: 1260px) {
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: calc(100% - 96px) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ import { CheckBox } from "../appConfig";
|
|||
import { Button, message, Modal } from "antd";
|
||||
import * as API from "../../apis/ruleconfig";
|
||||
import "./index.less";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -28,7 +29,9 @@ class Index extends Component {
|
|||
ascOrDesc: "",
|
||||
rule: "",
|
||||
enctry: ""
|
||||
}
|
||||
},
|
||||
progressVisible: false,
|
||||
progress: 50
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -127,9 +130,9 @@ class Index extends Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
this.setState({ loading: {...this.state.loading, order: true} });
|
||||
this.setState({ loading: { ...this.state.loading, order: true } });
|
||||
API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: {...this.state.loading, order: false} });
|
||||
this.setState({ loading: { ...this.state.loading, order: false } });
|
||||
if (status) {
|
||||
message.success("保存成功!");
|
||||
let sysSetting = this.getSysSetting();
|
||||
|
|
@ -145,9 +148,9 @@ class Index extends Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
this.setState({ loading: {...this.state.loading, employee: true} });
|
||||
this.setState({ loading: { ...this.state.loading, employee: true } });
|
||||
API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: {...this.state.loading, employee: false} });
|
||||
this.setState({ loading: { ...this.state.loading, employee: false } });
|
||||
if (status) {
|
||||
message.success("保存成功!");
|
||||
let sysSetting = this.getSysSetting();
|
||||
|
|
@ -156,12 +159,49 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
} else if (type === "ENCRYTION") {
|
||||
this.setState({ loading: {...this.state.loading, encry: true} });
|
||||
this.setState({ loading: { ...this.state.loading, encry: true } });
|
||||
API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => {
|
||||
this.setState({ loading: {...this.state.loading, encry: false} });
|
||||
this.setState({ loading: { ...this.state.loading, encry: false } });
|
||||
if (status) {
|
||||
const { isSuccess } = data;
|
||||
isSuccess ? message.success("保存成功!") : message.error(errormsg || "保存失败!");
|
||||
const { isSuccess, progressId, msg } = data;
|
||||
if(!isSuccess){
|
||||
message.error(errormsg || msg || "保存失败!");
|
||||
return
|
||||
}
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
let number=1 ;
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getEncryptProgress({ progressId }).then(({status, data, errormsg}) => {
|
||||
const { progress_statue }= data;
|
||||
if (progress_statue === "success" && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number=1;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 100
|
||||
});
|
||||
message.success("加密成功");
|
||||
} else if(progress_statue === "in_progress" && this.timer){
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, ()=> number++ );
|
||||
}else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number=1;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 100
|
||||
});
|
||||
message.error(errormsg || "加密失败!");
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -219,6 +259,16 @@ class Index extends Component {
|
|||
<Button type="primary" onClick={() => this.handleSave("ENCRYTION")} loading={loading.encry}>保存</Button>
|
||||
</div>
|
||||
} showGroup center items={enctryItems}/>
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}}
|
||||
progress={this.state.progress}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,17 @@
|
|||
min-height: 50vh;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
.wea-select{
|
||||
|
||||
.wea-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
.wea-select,.ant-select,.ant-select-selection{
|
||||
|
||||
.wea-select, .ant-select, .ant-select-selection {
|
||||
width: 100%;
|
||||
}
|
||||
.ant-select-selection{
|
||||
|
||||
.ant-select-selection {
|
||||
border-radius: 0;
|
||||
height: 30px;
|
||||
}
|
||||
|
|
@ -38,7 +41,8 @@
|
|||
.rightIconWrapper {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
.ant-btn{
|
||||
|
||||
.ant-btn {
|
||||
margin-left: 10px;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
|
|
@ -47,10 +51,12 @@
|
|||
font-size: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.ant-btn.ant-btn-primary[disabled]{
|
||||
|
||||
.ant-btn.ant-btn-primary[disabled] {
|
||||
color: #d8d8d8;
|
||||
}
|
||||
.ant-btn.ant-btn-primary{
|
||||
|
||||
.ant-btn.ant-btn-primary {
|
||||
color: #55a1f8;
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +93,36 @@
|
|||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.baseInfoWrapper {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #e8e8e8;
|
||||
|
||||
.descriptions-row {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
|
||||
.descriptions-label {
|
||||
background-color: #fafafa;
|
||||
padding: 10px 8px;
|
||||
color: rgba(0, 0, 0, .85);
|
||||
font-weight: 400;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.descriptions-value {
|
||||
padding: 10px 8px;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tableGroupWrapper {
|
||||
.wea-form-cell-wrapper {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,80 +1,82 @@
|
|||
import React from 'react';
|
||||
import { Table } from 'antd'
|
||||
import { WeaTable } from 'ecCom'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import ChangeSalaryModal from './changeSalaryModal'
|
||||
import React from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import ChangeSalaryModal from "./changeSalaryModal";
|
||||
|
||||
@inject('salaryFileStore')
|
||||
@inject("salaryFileStore")
|
||||
@observer
|
||||
export default class SalaryItemChangeList extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
changeSalaryVisible: false,
|
||||
recordId: ""
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
changeSalaryVisible: false,
|
||||
recordId: ""
|
||||
};
|
||||
this.searchParams = {};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { salaryFileStore: { fetchSingleSalaryItemList }, id } = this.props;
|
||||
this.searchParams = { salaryArchiveId: this.props.id, current: 1 };
|
||||
fetchSingleSalaryItemList(this.searchParams);
|
||||
}
|
||||
|
||||
handleEdit(record) {
|
||||
this.setState({
|
||||
recordId: record.id
|
||||
}, () => {
|
||||
this.setState({
|
||||
changeSalaryVisible: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 获取Columns
|
||||
getColumns() {
|
||||
const { salaryFileStore: { singleSalaryItemList } } = this.props;
|
||||
let columns = [];
|
||||
if (singleSalaryItemList.columns) {
|
||||
columns = [...singleSalaryItemList.columns];
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
// 页面跳转
|
||||
handlePageChange(value) {
|
||||
this.searchParams.current = value;
|
||||
const { salaryFileStore: { fetchSingleSalaryItemList } } = this.props;
|
||||
fetchSingleSalaryItemList(this.searchParams);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { salaryFileStore } = this.props;
|
||||
const { singleSalaryItemList } = salaryFileStore;
|
||||
return (
|
||||
<div>
|
||||
<WeaTable
|
||||
dataSource={singleSalaryItemList.list ? singleSalaryItemList.list : []}
|
||||
columns={this.getColumns()}
|
||||
border
|
||||
pagination={{
|
||||
onChange: (value) => {
|
||||
this.handlePageChange(value);
|
||||
},
|
||||
total: singleSalaryItemList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: singleSalaryItemList.pageNum
|
||||
}}
|
||||
/>
|
||||
{
|
||||
this.state.changeSalaryVisible && <ChangeSalaryModal
|
||||
currentId={this.props.id}
|
||||
recordId={this.state.recordId}
|
||||
visible={this.state.changeSalaryVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ changeSalaryVisible: false });
|
||||
}}
|
||||
/>
|
||||
}
|
||||
this.searchParams = {}
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { salaryFileStore: { fetchSingleSalaryItemList }, id} = this.props;
|
||||
this.searchParams = {salaryArchiveId: this.props.id, current: 1}
|
||||
fetchSingleSalaryItemList(this.searchParams)
|
||||
}
|
||||
|
||||
handleEdit(record) {
|
||||
this.setState({
|
||||
recordId: record.id
|
||||
}, () => {
|
||||
this.setState({
|
||||
changeSalaryVisible: true
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 获取Columns
|
||||
getColumns() {
|
||||
const { salaryFileStore: {singleSalaryItemList} } = this.props;
|
||||
let columns = []
|
||||
if(singleSalaryItemList.columns) {
|
||||
columns = [...singleSalaryItemList.columns]
|
||||
}
|
||||
return columns
|
||||
}
|
||||
|
||||
// 页面跳转
|
||||
handlePageChange(value) {
|
||||
this.searchParams.current = value
|
||||
const { salaryFileStore: {fetchSingleSalaryItemList} } = this.props;
|
||||
fetchSingleSalaryItemList(this.searchParams)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { salaryFileStore } = this.props;
|
||||
const { singleSalaryItemList } = salaryFileStore
|
||||
return (
|
||||
<div>
|
||||
<WeaTable dataSource={singleSalaryItemList.list ? singleSalaryItemList.list: []} columns={this.getColumns()}
|
||||
pagination={{
|
||||
onChange: (value) => {
|
||||
this.handlePageChange(value)
|
||||
},
|
||||
total: singleSalaryItemList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: singleSalaryItemList.pageNum
|
||||
}}
|
||||
/>
|
||||
{
|
||||
this.state.changeSalaryVisible && <ChangeSalaryModal
|
||||
currentId={this.props.id}
|
||||
recordId={this.state.recordId}
|
||||
visible={this.state.changeSalaryVisible}
|
||||
onCancel={() => {
|
||||
this.setState({changeSalaryVisible: false})
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,53 @@
|
|||
import React from "react";
|
||||
import { Col, Row } from "antd";
|
||||
import { WeaHelpfulTip, WeaSearchGroup } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import "./index.less";
|
||||
import SelectedTab from "../../components/selectedTab";
|
||||
import SalaryItemChangeList from "./salaryItemChangeList";
|
||||
import TaxAgentChangeList from "./taxAgentChangeList";
|
||||
import { PickDate } from "../appConfig";
|
||||
import "./index.less";
|
||||
|
||||
const selectedTabItems = [
|
||||
{
|
||||
key: "0",
|
||||
name: "薪资调整记录"
|
||||
}
|
||||
];
|
||||
const baseInfolist = [
|
||||
{
|
||||
id: 1,
|
||||
items: [
|
||||
{
|
||||
label: "姓名",
|
||||
value: "username"
|
||||
},
|
||||
{
|
||||
label: "部门",
|
||||
value: "department"
|
||||
},
|
||||
{
|
||||
label: "岗位",
|
||||
value: "position"
|
||||
}
|
||||
]
|
||||
},
|
||||
{/*暂时去掉调整个税扣缴义务人导入按钮*/ }
|
||||
// {
|
||||
// key: "1",
|
||||
// name: "个税扣缴义务人调整记录"
|
||||
// }
|
||||
{
|
||||
id: 2,
|
||||
items: [
|
||||
{
|
||||
label: "入职时间",
|
||||
value: "hiredate"
|
||||
},
|
||||
{
|
||||
label: "手机号",
|
||||
value: "mobile"
|
||||
},
|
||||
{
|
||||
label: "个税扣缴义务人",
|
||||
value: "taxAgent"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@inject("salaryFileStore")
|
||||
|
|
@ -25,9 +56,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
baseInfoVisible: true,
|
||||
salaryItemVisible: true,
|
||||
selectedTab: "0",
|
||||
selectedTab: "0"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +64,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
const { salaryFileStore: { getArchiveForm, fetchSingleSalaryItemList, salaryAdjustmentInfo } } = this.props;
|
||||
getArchiveForm(this.props.id);
|
||||
fetchSingleSalaryItemList({ salaryArchiveId: this.props.id });
|
||||
salaryAdjustmentInfo()
|
||||
salaryAdjustmentInfo();
|
||||
}
|
||||
|
||||
// tab页签切换回调
|
||||
|
|
@ -44,91 +73,97 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { salaryFileStore: { detailForm } } = this.props;
|
||||
const { salaryFileStore: { detailForm }, selectedKey, handleSetpay } = this.props;
|
||||
const { baseInfo, adjustSalaryItems } = detailForm;
|
||||
const items = [
|
||||
{
|
||||
com: PickDate({
|
||||
label: "起始发薪日期",
|
||||
viewAttr: 3,
|
||||
value: "",
|
||||
onChange: handleSetpay
|
||||
})
|
||||
},
|
||||
{
|
||||
com: PickDate({
|
||||
label: "最后发薪日期",
|
||||
viewAttr: 2,
|
||||
value: "",
|
||||
onChange: handleSetpay
|
||||
})
|
||||
}
|
||||
];
|
||||
return (
|
||||
<div className="salaryFileViewSlide">
|
||||
<WeaSearchGroup title={"基本信息"} items={[]} onVisibleChange={(value) => {
|
||||
this.setState({ baseInfoVisible: value });
|
||||
}}/>
|
||||
{
|
||||
this.state.baseInfoVisible && <div className="slideItemWrapper">
|
||||
<Row className="formRow">
|
||||
<Col span={8}>
|
||||
<Row>
|
||||
<Col span={6} className="formTitle">姓名</Col>
|
||||
<Col span={18}>{baseInfo && baseInfo.employee && baseInfo.employee.username}</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Row>
|
||||
<Col span={6} className="formTitle">部门</Col>
|
||||
<Col span={18}>{baseInfo && baseInfo.employee && baseInfo.employee.department}</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Row>
|
||||
<Col span={6} className="formTitle">岗位</Col>
|
||||
<Col span={18}>{baseInfo && baseInfo.employee && baseInfo.employee.position}</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row className="formRow">
|
||||
<Col span={8}>
|
||||
<Row>
|
||||
<Col span={6} className="formTitle">入职时间</Col>
|
||||
<Col span={18}>{baseInfo && baseInfo.employee && baseInfo.employee.hiredate}</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Row>
|
||||
<Col span={6} className="formTitle">手机号</Col>
|
||||
<Col span={18}>{baseInfo && baseInfo.employee && baseInfo.employee.mobile}</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Row>
|
||||
<Col span={6} className="formTitle">个税扣缴义务人</Col>
|
||||
<Col span={18}>{baseInfo && baseInfo.employee && baseInfo.employee.taxAgent}</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
}
|
||||
|
||||
<WeaSearchGroup title={<span>薪资档案 <WeaHelpfulTip
|
||||
width={200}
|
||||
title="提示:显示已生效的最新数据"
|
||||
placement="topLeft"
|
||||
/></span>} items={[]} onVisibleChange={(value) => {
|
||||
this.setState({ salaryItemVisible: value });
|
||||
}}/>
|
||||
{
|
||||
this.state.salaryItemVisible && <div style={{ lineHeight: "40px" }} className="slideItemWrapper">
|
||||
<WeaSearchGroup title="基本信息" items={[]} needTigger showGroup center>
|
||||
<table className="baseInfoWrapper">
|
||||
<tbody>
|
||||
{
|
||||
adjustSalaryItems && adjustSalaryItems.map(item => (
|
||||
<div style={{ display: "inline-block", width: "50%" }}>
|
||||
<div style={{ display: "inline-block", width: "50%" }}>{item.name}</div>
|
||||
<div style={{ display: "inline-block", width: "50%" }}>{item.value}</div>
|
||||
</div>
|
||||
))
|
||||
_.map(baseInfolist, item => {
|
||||
const { id, items } = item;
|
||||
return <tr key={id} className="descriptions-row">
|
||||
{
|
||||
_.map(items, it => {
|
||||
const { label, value } = it;
|
||||
return <React.Fragment>
|
||||
<th className="descriptions-label">{label}</th>
|
||||
<td className="descriptions-value">{baseInfo && baseInfo["employee"][value]}</td>
|
||||
</React.Fragment>;
|
||||
})
|
||||
}
|
||||
</tr>;
|
||||
})
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title="发薪设置" items={items} needTigger showGroup center/>
|
||||
|
||||
<WeaSearchGroup title={<SelectedTab items={selectedTabItems} onChange={(item) => {
|
||||
this.handleTabChange(item);
|
||||
}}/>} items={[]} onVisibleChange={(value) => {
|
||||
this.setState({ salaryItemVisible: value });
|
||||
}}/>
|
||||
<WeaSearchGroup
|
||||
title={
|
||||
<span>
|
||||
<span>薪资档案</span>
|
||||
<WeaHelpfulTip
|
||||
width={200}
|
||||
title="提示:显示已生效的最新数据"
|
||||
placement="topLeft"
|
||||
style={{ marginLeft: 8 }}
|
||||
/>
|
||||
</span>
|
||||
} items={[]} needTigger showGroup center>
|
||||
{
|
||||
<div style={{ lineHeight: "40px" }} className="slideItemWrapper">
|
||||
{
|
||||
!_.isEmpty(adjustSalaryItems) ? adjustSalaryItems.map(item => (
|
||||
<div style={{ display: "inline-block", width: "50%" }}>
|
||||
<div style={{ display: "inline-block", width: "50%" }}>{item.name}</div>
|
||||
<div style={{ display: "inline-block", width: "50%" }}>{item.value}</div>
|
||||
</div>
|
||||
)) : <div>暂无数据</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
{
|
||||
this.state.selectedTab == "0" ? <SalaryItemChangeList id={this.props.id}/> :
|
||||
<TaxAgentChangeList id={this.props.id}/>
|
||||
selectedKey !== "pending" &&
|
||||
<WeaSearchGroup
|
||||
className='tableGroupWrapper'
|
||||
title={
|
||||
<SelectedTab
|
||||
items={selectedTabItems} onChange={(item) => {
|
||||
this.handleTabChange(item);
|
||||
}}/>
|
||||
}
|
||||
items={[]}
|
||||
needTigger showGroup center
|
||||
>
|
||||
{
|
||||
this.state.selectedTab === "0" ?
|
||||
<SalaryItemChangeList id={this.props.id}/> :
|
||||
<TaxAgentChangeList id={this.props.id}/>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
}
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
export const tabCondition = [
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "stayAdd",
|
||||
showcount: true,
|
||||
title: "待增员",
|
||||
viewcondition: "pending"
|
||||
},
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "paying",
|
||||
showcount: true,
|
||||
title: "在缴员工",
|
||||
viewcondition: "fixed"
|
||||
},
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "stayDel",
|
||||
showcount: true,
|
||||
title: "待减员",
|
||||
viewcondition: "suspend"
|
||||
},
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "stopPay",
|
||||
showcount: true,
|
||||
title: "停缴员工",
|
||||
viewcondition: "stop"
|
||||
}
|
||||
];
|
||||
|
|
@ -1,15 +1,16 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { Button, Dropdown, Menu, message } from "antd";
|
||||
import { WeaRightMenu, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import { Button, Dropdown, Menu, message, Popover, Modal } from "antd";
|
||||
import { WeaHelpfulTip, WeaRightMenu, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
|
||||
import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import BaseForm from "./baseForm";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import SocialSecurityForm from "./socialSecurityForm";
|
||||
import AccumulationFundForm from "./accumulationFundForm";
|
||||
import OtherForm from "./otherForm";
|
||||
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||
import { tabCondition } from "./config";
|
||||
import * as API from "../../../apis/welfareArchive";
|
||||
import ImportModal from "../../../components/importModal";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -20,25 +21,77 @@ export default class Archives extends React.Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
value: "",
|
||||
selectedKey: "0",
|
||||
selectedKey: "pending",
|
||||
selectedTab: 0,
|
||||
editSlideVisible: false,
|
||||
employeeId: "",
|
||||
importVisible: false,
|
||||
modalParam: {},
|
||||
step: 0,
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [],
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
loading: {
|
||||
query: false,
|
||||
add: false,
|
||||
update: false
|
||||
},
|
||||
tabCount: {
|
||||
stayAdd: 0,
|
||||
paying: 0,
|
||||
stayDel: 0,
|
||||
stopPay: 0
|
||||
},
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
};
|
||||
|
||||
this.record = {};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
const { archivesStore: { doInit } } = this.props;
|
||||
doInit();
|
||||
this.queryList({ runStatuses: ["1"] });
|
||||
this.queryInsuranceTabTotal();
|
||||
}
|
||||
|
||||
queryInsuranceTabTotal = () => {
|
||||
API.queryInsuranceTabTotal().then(({ data = {}, status }) => {
|
||||
if (status) {
|
||||
this.setState({ tabCount: { ...this.state.tabCount, ...data } });
|
||||
}
|
||||
});
|
||||
};
|
||||
queryList = (params) => {
|
||||
const { loading, pageInfo } = this.state;
|
||||
const { archivesStore: { form } } = this.props;
|
||||
const formParams = form.getFormParams() || {};
|
||||
const payload = { ...pageInfo };
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
API.queryList({ ...formParams, ...payload, ...params }).then(({ data, status }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { pageInfo: paganition, columns, datas: dataSource } = data;
|
||||
const { total, pageNum: current, pageSize } = paganition;
|
||||
this.setState({
|
||||
dataSource: _.map(dataSource, it => ({ ...it, id: it.employeeId })),
|
||||
columns,
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
total,
|
||||
current,
|
||||
pageSize
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleEdit(record) {
|
||||
this.record = record;
|
||||
this.setState({ employeeId: record.employeeId, editSlideVisible: true });
|
||||
|
|
@ -49,25 +102,60 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
|
||||
getColumns() {
|
||||
const { archivesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
let columns = [...tableStore.columns];
|
||||
columns = columns.filter(item => item.hide == "false");
|
||||
columns.map(item => {
|
||||
item.width = "150px";
|
||||
});
|
||||
columns.push({
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
fixed: "right",
|
||||
width: "100px",
|
||||
height: "auto",
|
||||
render: (text, record) => {
|
||||
return (<a onClick={() => {
|
||||
this.handleEdit(record);
|
||||
}}>{showOperateBtn ? "编辑" : "查看"}</a>);
|
||||
const { columns, pageInfo, selectedKey } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
let tmpV = _.map(columns.filter(item => item.display === "TRUE"), (item, index) => {
|
||||
if (index === 0) {
|
||||
return {
|
||||
...item, dataIndex: item.column,
|
||||
fixed: "left",
|
||||
title: item.text
|
||||
};
|
||||
}
|
||||
return { ...item, dataIndex: item.column, title: item.text };
|
||||
});
|
||||
return columns;
|
||||
return tmpV.length > 0 ? [
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "index",
|
||||
width: 60,
|
||||
fixed: "left",
|
||||
render: (text, record, index) => {
|
||||
const { current, pageSize } = pageInfo;
|
||||
return (current - 1) * pageSize + index + 1;
|
||||
}
|
||||
},
|
||||
...tmpV, {
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
fixed: "right",
|
||||
width: "120px",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.handleEdit(record)}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||
{
|
||||
showOperateBtn && selectedKey === 'pending' &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: `确定要删除该条待办人员吗?`,
|
||||
onOk: () => this.deleteTodoList({runStatus: "4", ids: [record.baseInfo]})
|
||||
});
|
||||
}}>
|
||||
<Menu.Item key="stopSalary">删除待办</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}] : [];
|
||||
}
|
||||
|
||||
// 保存
|
||||
|
|
@ -145,20 +233,79 @@ export default class Archives extends React.Component {
|
|||
this.setState({ importVisible: false, step: 0 });
|
||||
}
|
||||
|
||||
handleSearch() {
|
||||
const { archivesStore: { getTableDatas } } = this.props;
|
||||
getTableDatas({ ...this.pageInfo, current: 1 });
|
||||
}
|
||||
//切换tab
|
||||
handleChangeTab = (selectedKey) => {
|
||||
this.setState({ selectedKey }, () => this.query());
|
||||
};
|
||||
|
||||
query = () => {
|
||||
const { selectedKey } = this.state;
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
this.queryList({ runStatuses: ["1"] });
|
||||
break;
|
||||
case "fixed":
|
||||
this.queryList({ runStatuses: ["2", "3"] });
|
||||
break;
|
||||
case "suspend":
|
||||
this.queryList({ runStatuses: ["3"] });
|
||||
break;
|
||||
default:
|
||||
this.queryList({ runStatuses: ["4", "5"] });
|
||||
break;
|
||||
}
|
||||
};
|
||||
handleMenuBtnClick = () => {
|
||||
const { selectedKey } = this.state;
|
||||
if (selectedKey === "pending") {
|
||||
console.log("全量增员");
|
||||
}
|
||||
};
|
||||
handleMenuItemClick = ({ key }) => {
|
||||
const { selectedRowKeys, selectedKey } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择任何条目", 1);
|
||||
return;
|
||||
}
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
if (key === "4") {
|
||||
const payload = {
|
||||
runStatus: key,
|
||||
ids: selectedRowKeys
|
||||
};
|
||||
this.deleteTodoList(payload);
|
||||
} else {
|
||||
console.log(11111);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
//删除待办
|
||||
deleteTodoList = (payload) => {
|
||||
API.updateRunStatus(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功");
|
||||
this.query();
|
||||
this.queryInsuranceTabTotal();
|
||||
this.onSelectChange([]);
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { selectedTab, selectedRowKeys } = this.state;
|
||||
const { selectedTab, selectedRowKeys, selectedKey, dataSource: dataSourceActive, pageInfo, tabCount } = this.state;
|
||||
const {
|
||||
loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd,
|
||||
previewCurDataColumns, previewCurDataDataSource, importResult, initImportParams
|
||||
} = archivesStore;
|
||||
const { dataSource, pageInfo } = archivesStore;
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
const { dataSource } = archivesStore;
|
||||
if (_.isEmpty(this.getColumns())) { // 无权限处理
|
||||
return renderNoright();
|
||||
}
|
||||
|
||||
|
|
@ -178,14 +325,29 @@ export default class Archives extends React.Component {
|
|||
importantlevel: 1
|
||||
};
|
||||
const adBtn = [ // 高级搜索内部按钮
|
||||
<Button type="primary" onClick={doSearch}>搜索</Button>,
|
||||
<Button type="primary" onClick={this.query}>搜索</Button>,
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
|
||||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>
|
||||
];
|
||||
|
||||
// 导出全部
|
||||
const handleButtonClick = () => {
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`;
|
||||
const { selectedKey } = this.state;
|
||||
let url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`;
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
url = `${url}&runStatuses=1`;
|
||||
break;
|
||||
case "fixed":
|
||||
url = `${url}&runStatuses=2,3`;
|
||||
break;
|
||||
case "suspend":
|
||||
url = `${url}&runStatuses=3`;
|
||||
break;
|
||||
default:
|
||||
url = `${url}&runStatuses=4`;
|
||||
break;
|
||||
}
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
|
|
@ -197,11 +359,25 @@ export default class Archives extends React.Component {
|
|||
return;
|
||||
}
|
||||
let ids = selectedRowKeys.join(",");
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=${ids}`;
|
||||
let url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=${ids}`;
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
url = `${url}&runStatuses=1`;
|
||||
break;
|
||||
case "fixed":
|
||||
url = `${url}&runStatuses=2,3`;
|
||||
break;
|
||||
case "suspend":
|
||||
url = `${url}&runStatuses=3`;
|
||||
break;
|
||||
default:
|
||||
url = `${url}&runStatuses=4`;
|
||||
break;
|
||||
}
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
const btns = [
|
||||
const btns = selectedKey === "fixed" ? [
|
||||
<Button type="primary" onClick={() => {
|
||||
this.handleBtnImport();
|
||||
}}>导入</Button>,
|
||||
|
|
@ -212,8 +388,77 @@ export default class Archives extends React.Component {
|
|||
} type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>
|
||||
] : selectedKey === "pending" ? [
|
||||
<WeaHelpfulTip
|
||||
width={300}
|
||||
title={<div>提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除,
|
||||
因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。</div>}
|
||||
placement="topLeft"
|
||||
/>,
|
||||
<Dropdown.Button onClick={this.handleMenuBtnClick} overlay={
|
||||
<Menu onClick={this.handleMenuItemClick}>
|
||||
<Menu.Item key="1">批量增员</Menu.Item>
|
||||
<Menu.Item key="4">批量删除待办</Menu.Item>
|
||||
</Menu>
|
||||
} type="ghost">
|
||||
全量增员
|
||||
</Dropdown.Button>,
|
||||
<Button type="primary">导入</Button>,
|
||||
<Dropdown.Button onClick={handleButtonClick} overlay={
|
||||
<Menu onClick={handleMenuClick}>
|
||||
<Menu.Item key="1">导出选中</Menu.Item>
|
||||
</Menu>
|
||||
} type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>
|
||||
] : selectedKey === "suspend" ? [
|
||||
<WeaHelpfulTip
|
||||
width={300}
|
||||
title={<HelpfulDiv/>}
|
||||
placement="topLeft"
|
||||
/>,
|
||||
<Dropdown.Button onClick={this.handleMenuBtnClick} overlay={
|
||||
<Menu onClick={this.handleMenuItemClick}>
|
||||
<Menu.Item key="1">批量减员</Menu.Item>
|
||||
</Menu>
|
||||
} type="ghost">
|
||||
全量减员
|
||||
</Dropdown.Button>,
|
||||
<Dropdown.Button onClick={handleButtonClick} overlay={
|
||||
<Menu onClick={handleMenuClick}>
|
||||
<Menu.Item key="1">导出选中</Menu.Item>
|
||||
</Menu>
|
||||
} type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>
|
||||
] : [
|
||||
<Dropdown.Button onClick={handleButtonClick} overlay={
|
||||
<Menu onClick={handleMenuClick}>
|
||||
<Menu.Item key="1">导出选中</Menu.Item>
|
||||
</Menu>
|
||||
} type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>
|
||||
];
|
||||
|
||||
const pagination = {
|
||||
total: pageInfo.total,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
|
||||
this.query();
|
||||
});
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => {
|
||||
this.query();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange
|
||||
|
|
@ -231,38 +476,49 @@ export default class Archives extends React.Component {
|
|||
showDropIcon={false} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
buttons={showOperateBtn ? btns : []}
|
||||
>
|
||||
<WeaTab
|
||||
datas={tabCondition}
|
||||
buttons={showOperateBtn ? btns : []}
|
||||
counts={tabCount}
|
||||
countParam="groupid" //数量
|
||||
keyParam="viewcondition" //主键
|
||||
selectedKey={selectedKey}
|
||||
onChange={this.handleChangeTab}
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
||||
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
searchsBasePlaceHolder={"请输入姓名"}
|
||||
onSearch={() => {
|
||||
this.handleSearch();
|
||||
}} // 点搜索按钮时的回调
|
||||
onSearch={this.query} // 点搜索按钮时的回调
|
||||
onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||
searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||
/>
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
dataSource={dataSource}
|
||||
<WeaTable
|
||||
loading={loading.query}
|
||||
rowKey="baseInfo"
|
||||
columns={this.getColumns()} dataSource={dataSourceActive} pagination={pagination}
|
||||
rowSelection={rowSelection}
|
||||
total={pageInfo.total}
|
||||
current={pageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
scroll={{ x: this.getColumns().length > 0 ? this.getColumns().length * 150 : 1000 }}
|
||||
onPageChange={(value) => {
|
||||
this.handlePageChnage(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
getTableDatas(this.pageInfo);
|
||||
}}
|
||||
scroll={{ x: 1200 }}
|
||||
/>
|
||||
{/*<CustomPaginationTable*/}
|
||||
{/* loading={loading}*/}
|
||||
{/* columns={this.getColumns()}*/}
|
||||
{/* dataSource={dataSource}*/}
|
||||
{/* rowSelection={rowSelection}*/}
|
||||
{/* total={pageInfo.total}*/}
|
||||
{/* current={pageInfo.pageNum}*/}
|
||||
{/* pageSize={this.pageInfo.pageSize}*/}
|
||||
{/* scroll={{ x: this.getColumns().length > 0 ? this.getColumns().length * 150 : 1000 }}*/}
|
||||
{/* onPageChange={(value) => {*/}
|
||||
{/* this.handlePageChnage(value);*/}
|
||||
{/* }}*/}
|
||||
{/* onShowSizeChange={(current, pageSize) => {*/}
|
||||
{/* this.pageInfo = { current, pageSize };*/}
|
||||
{/* getTableDatas(this.pageInfo);*/}
|
||||
{/* }}*/}
|
||||
{/*/>*/}
|
||||
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
|
|
@ -314,12 +570,12 @@ export default class Archives extends React.Component {
|
|||
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
</div>}
|
||||
onClose={() => this.setState({ editSlideVisible: false },()=>{
|
||||
this.setState({ selectedTab: '0' });
|
||||
onClose={() => this.setState({ editSlideVisible: false }, () => {
|
||||
this.setState({ selectedTab: "0" });
|
||||
})}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({ editSlideVisible: false },()=>{
|
||||
this.setState({ selectedTab: '0' });
|
||||
closeMaskOnClick={() => this.setState({ editSlideVisible: false }, () => {
|
||||
this.setState({ selectedTab: "0" });
|
||||
})}/>
|
||||
}
|
||||
{
|
||||
|
|
@ -356,3 +612,12 @@ export default class Archives extends React.Component {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const HelpfulDiv = () => {
|
||||
return <div className="helpWrapper">
|
||||
<span>1、缴纳月份区间包含起始缴纳月,不包含最后缴纳月;</span>
|
||||
<span>2、维护的所有的最后缴纳月都大于当前月,则该待办数据自动清除,不显示在待减员列表;</span>
|
||||
<span>3、减员失败情况:①有起始缴纳月却未维护最后缴纳月;②员工存在未归档的核算数据;</span>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,6 +23,25 @@
|
|||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
.mySalaryBenefitsWrapper{
|
||||
.optWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
//提示语
|
||||
.helpWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.pl10 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.slideOuterWrapper{
|
||||
.wea-slide-modal-title{
|
||||
|
|
|
|||
|
|
@ -30,20 +30,23 @@ export default class CustomNewModal extends React.Component {
|
|||
return (
|
||||
<WeaDialog
|
||||
initLoadCss
|
||||
className='customFLOuter'
|
||||
className="customFLOuter"
|
||||
visible={this.props.visible}
|
||||
onCancel={() => this.props.onCancel()}
|
||||
title="新建自定义福利"
|
||||
title={this.props.edit ? "编辑自定义福利" : "新建自定义福利"}
|
||||
style={{ height: "auto!important" }}
|
||||
buttons={[
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>取消</Button>,
|
||||
<Button type="primary" onClick={() => this.handleOK()}>确定</Button>
|
||||
]}
|
||||
>
|
||||
<CustomForm condition={this.props.condition} disable={this.props.edit ? ["paymentScope", "welfareType"] : null}
|
||||
request={customRequest} onChange={(value) => {
|
||||
setCustomRequest(value);
|
||||
}}/>
|
||||
<CustomForm
|
||||
condition={this.props.condition}
|
||||
disable={this.props.edit ? ["paymentScope", "welfareType"] : null}
|
||||
request={customRequest}
|
||||
onChange={(value) => {
|
||||
setCustomRequest(value);
|
||||
}}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ export default class Programme extends React.Component {
|
|||
getCustomColumns = columns => {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
let newColumns = [];
|
||||
newColumns = _.filter(columns, it => it.dataIndex != "operate").map(column => {
|
||||
newColumns = columns.map(column => {
|
||||
let newColumn = column;
|
||||
newColumn.render = (text, record, index) => {
|
||||
//前端元素转义
|
||||
|
|
@ -157,6 +157,7 @@ export default class Programme extends React.Component {
|
|||
case "operate":
|
||||
return (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
this.onCustomEdit(record);
|
||||
}}>
|
||||
|
|
@ -223,7 +224,7 @@ export default class Programme extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
onCustomEdit(record) {
|
||||
onCustomEdit=(record)=> {
|
||||
const {
|
||||
programmeStore: { getCustomForm, setCustomNewVisible, setCustomRequest },
|
||||
taxAgentStore: { showOperateBtn }
|
||||
|
|
@ -241,9 +242,7 @@ export default class Programme extends React.Component {
|
|||
insuranceName: record["insurance_name"],
|
||||
id: record.id,
|
||||
isUse: record.is_use,
|
||||
paymentScope: record.payment_scope
|
||||
.split(",")
|
||||
.map(item => paymentScopeEnum[item]),
|
||||
paymentScope: record["payment_scope"].split(",").map(item => paymentScopeEnum[item]).join(','),
|
||||
welfareType: welfareTypeEnum[record.welfare_type]
|
||||
});
|
||||
}
|
||||
|
|
@ -431,12 +430,12 @@ export default class Programme extends React.Component {
|
|||
const handleCopyModalSave = () => {
|
||||
const { programmeStore: { copyScheme } } = this.props;
|
||||
const { copyId, copyModalValue } = this.state;
|
||||
if(_.isEmpty(this.refs.copyRef.state.value)){
|
||||
if (_.isEmpty(this.refs.copyRef.state.value)) {
|
||||
this.refs.copyRef.refs.weaError.showError();
|
||||
}else{
|
||||
} else {
|
||||
copyScheme({ id: copyId, schemeName: copyModalValue }).then(() => {
|
||||
this.setState({ copyModalVisible: false });
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -574,7 +573,7 @@ export default class Programme extends React.Component {
|
|||
|
||||
{this.state.copyModalVisible &&
|
||||
<CopySchemaModal
|
||||
ref='copyRef'
|
||||
ref="copyRef"
|
||||
title={_.filter(topTab, it => it.viewcondition === selectedKey)[0].title}
|
||||
visible={this.state.copyModalVisible}
|
||||
value={this.state.copyModalValue}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class StandingBookOfflineComparison extends Component {
|
|||
columns: _.map(columns, (it, idx) => ({
|
||||
...it,
|
||||
width: 150,
|
||||
fixed: idx < 5 ? "left" : false,
|
||||
fixed: idx < 2 ? "left" : false,
|
||||
render: (text, record) => {
|
||||
if (Object.prototype.toString.call(text) === "[object Object]") {
|
||||
return <React.Fragment>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export default class SysConfig extends React.Component {
|
|||
});
|
||||
form.initFormFields(sysConditions);
|
||||
} else {
|
||||
message.success(errormsg);
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -102,7 +102,7 @@ export default class SysConfig extends React.Component {
|
|||
form.reset();
|
||||
});
|
||||
} else {
|
||||
message.success(errormsg || "新增失败");
|
||||
message.error(errormsg || "新增失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -118,7 +118,7 @@ export default class SysConfig extends React.Component {
|
|||
form.reset();
|
||||
});
|
||||
} else {
|
||||
message.success(errormsg || "更新失败");
|
||||
message.error(errormsg || "更新失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -147,6 +147,7 @@ export default class SysConfig extends React.Component {
|
|||
const pagination = {
|
||||
total: pageInfo.total,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export class ArchivesStore {
|
|||
@action
|
||||
doInit = () => {
|
||||
this.getCondition();
|
||||
this.getTableDatas();
|
||||
// this.getTableDatas();
|
||||
}
|
||||
|
||||
// 获得高级搜索表单数据
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import { payrollStore } from "./payroll";
|
|||
import { calculateStore } from "./calculate";
|
||||
import { DeclareStore } from "./declare";
|
||||
import { StandingBookStore } from "./StandingBook";
|
||||
import {PayrollFilesStore} from './payrollFiles';
|
||||
|
||||
module.exports = {
|
||||
baseFormStore: new BaseFormStore(),
|
||||
|
|
@ -36,4 +37,5 @@ module.exports = {
|
|||
calculateStore: new calculateStore(),
|
||||
declareStore: new DeclareStore(),
|
||||
standingBookStore: new StandingBookStore(),
|
||||
payrollFilesStore: new PayrollFilesStore(),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
import { observable, action } from "mobx";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import * as API from '../apis/payrollFiles';
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class PayrollFilesStore {
|
||||
@observable tableStore = new TableStore();
|
||||
@action("列表查询")
|
||||
queryList= (payload={}, searchItemsValue={}, url='')=>{
|
||||
return new Promise((resolve, reject)=>{
|
||||
API.queryList({ ...payload, ...searchItemsValue, url }).then(res=>{
|
||||
const {data, status}= res;
|
||||
if(status){
|
||||
const { dataKey } = data;
|
||||
const { datas } = dataKey;
|
||||
this.tableStore.getDatas(datas); // table 请求数据
|
||||
}
|
||||
resolve(res)
|
||||
}).catch(()=>{reject()})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -322,7 +322,7 @@ export class ProgrammeStore {
|
|||
@action
|
||||
updateCustomCategory = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.updateCustomCategory(params).then(res => {
|
||||
API.updateCustomCategory({...params, paymentScope: params.paymentScope.split(",")}).then(res => {
|
||||
if(res.status) {
|
||||
message.success("编辑成功")
|
||||
resolve()
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ export class salaryFileStore {
|
|||
// this.getCondition();
|
||||
this.getTableDatas(params);
|
||||
this.getImportTypes();
|
||||
this.commonEnumList("archive", { enumClass: "com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum" });
|
||||
this.commonEnumList("archive", { enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" });
|
||||
this.commonEnumList("user", { enumClass: "com.engine.salary.enums.UserStatusEnum" });
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue