2022-10-17 10:03:01 +08:00
|
|
|
|
/*
|
|
|
|
|
|
* 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,
|
2023-06-30 16:13:46 +08:00
|
|
|
|
WeaLocaleProvider,
|
2022-12-15 16:21:56 +08:00
|
|
|
|
WeaPopoverHrm,
|
2022-10-17 10:03:01 +08:00
|
|
|
|
WeaSearchGroup,
|
|
|
|
|
|
WeaSelect,
|
|
|
|
|
|
WeaSlideModal,
|
|
|
|
|
|
WeaTab,
|
2022-12-15 16:21:56 +08:00
|
|
|
|
WeaTop
|
2022-10-17 10:03:01 +08:00
|
|
|
|
} from "ecCom";
|
|
|
|
|
|
import { WeaTableNew } from "comsMobx";
|
2023-05-26 10:44:05 +08:00
|
|
|
|
import { Button, Dropdown, Menu, message, Modal, Spin } from "antd";
|
2022-10-17 10:03:01 +08:00
|
|
|
|
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";
|
2023-07-14 14:09:27 +08:00
|
|
|
|
import { sysinfo } from "../../apis/ruleconfig";
|
2023-09-04 16:48:36 +08:00
|
|
|
|
import SalaryArchiveEditAdjLogRecord from "../salaryFile/salaryArchiveEditAdjLogRecord";
|
2022-10-17 10:03:01 +08:00
|
|
|
|
import "./index.less";
|
|
|
|
|
|
|
2023-06-30 16:13:46 +08:00
|
|
|
|
const getLabel = WeaLocaleProvider.getLabel;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
const WeaTableComx = WeaTableNew.WeaTable;
|
|
|
|
|
|
|
2022-10-20 17:53:26 +08:00
|
|
|
|
@inject("payrollFilesStore", "taxAgentStore", "salaryFileStore")
|
2022-10-17 10:03:01 +08:00
|
|
|
|
@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: "",
|
2023-05-31 18:58:35 +08:00
|
|
|
|
workcode: "",
|
2022-10-17 10:03:01 +08:00
|
|
|
|
departmentIds: "",
|
|
|
|
|
|
positionIds: "",
|
2023-07-10 11:00:47 +08:00
|
|
|
|
statuses: "",
|
2022-10-17 10:03:01 +08:00
|
|
|
|
// archiveStatus: "EFFICIENT",
|
|
|
|
|
|
taxAgentId: "",
|
|
|
|
|
|
subcompanyIds: ""
|
|
|
|
|
|
},
|
|
|
|
|
|
salaryAdjustmentInfo: {},
|
2023-09-04 16:48:36 +08:00
|
|
|
|
adjLogRecordDialog: {
|
|
|
|
|
|
visible: false, title: "", id: "", salaryArchiveId: ""
|
|
|
|
|
|
},
|
2022-10-17 10:03:01 +08:00
|
|
|
|
noPayDate: "",
|
|
|
|
|
|
slideParams: {
|
|
|
|
|
|
visible: false,
|
|
|
|
|
|
id: ""
|
|
|
|
|
|
},
|
|
|
|
|
|
paysetParams: {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
payStartDate: "",
|
|
|
|
|
|
payEndDate: ""
|
2023-06-30 16:13:46 +08:00
|
|
|
|
},
|
2023-07-14 14:09:27 +08:00
|
|
|
|
salaryArchiveDelete: "", //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是,
|
|
|
|
|
|
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
|
2022-10-17 10:03:01 +08:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Input = (value, key) => {
|
2023-05-31 18:58:35 +08:00
|
|
|
|
const { username, workcode } = this.state.searchItemsValue;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
return (
|
|
|
|
|
|
<WeaFormItem
|
|
|
|
|
|
label={value}
|
|
|
|
|
|
labelCol={{ span: 6 }}
|
|
|
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
|
|
|
>
|
2023-05-31 18:58:35 +08:00
|
|
|
|
<WeaInput value={key === "username" ? username : workcode}
|
|
|
|
|
|
onChange={(val) => this.setState({
|
|
|
|
|
|
searchItemsValue: {
|
|
|
|
|
|
...this.state.searchItemsValue,
|
|
|
|
|
|
[key]: val
|
|
|
|
|
|
}
|
|
|
|
|
|
})}/>
|
2022-10-17 10:03:01 +08:00
|
|
|
|
</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;
|
2023-07-10 11:00:47 +08:00
|
|
|
|
const { statuses, archiveStatus, taxAgentId } = this.state.searchItemsValue;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
const { archiveStatusList, userStatusList } = this.state;
|
2023-07-13 15:02:57 +08:00
|
|
|
|
const { taxAgentOption } = taxAgentStore;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
return (
|
|
|
|
|
|
<WeaFormItem
|
|
|
|
|
|
label={value}
|
|
|
|
|
|
labelCol={{ span: 6 }}
|
|
|
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
|
|
|
>
|
|
|
|
|
|
<WeaSelect
|
2023-07-10 11:00:47 +08:00
|
|
|
|
multiple={key === "statuses"}
|
|
|
|
|
|
value={key === "statuses" ? statuses : key === "taxAgentId" ? taxAgentId : archiveStatus}
|
|
|
|
|
|
options={key === "statuses" ? userStatusList : key === "taxAgentId" ? [{
|
2022-10-17 10:03:01 +08:00
|
|
|
|
key: "",
|
|
|
|
|
|
showname: ""
|
2023-07-13 15:02:57 +08:00
|
|
|
|
}, ...taxAgentOption] : archiveStatusList}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
|
|
|
|
|
</WeaFormItem>
|
|
|
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
const { taxAgentStore } = this.props;
|
2023-07-13 15:02:57 +08:00
|
|
|
|
const { fetchTaxAgentOption } = taxAgentStore;
|
|
|
|
|
|
fetchTaxAgentOption();
|
2023-01-28 10:10:00 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
2023-07-14 14:09:27 +08:00
|
|
|
|
this.getSysinfo();
|
2022-12-16 17:00:24 +08:00
|
|
|
|
const init = this.init();
|
2023-05-25 16:25:33 +08:00
|
|
|
|
window.addEventListener("message", this.handleReceive, false);
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-05-25 16:25:33 +08:00
|
|
|
|
componentWillUnmount() {
|
|
|
|
|
|
window.removeEventListener("message", this.handleReceive, false);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-07-14 14:09:27 +08:00
|
|
|
|
/*
|
|
|
|
|
|
* Author: 黎永顺
|
|
|
|
|
|
* Description: 非系统人员开关查询
|
|
|
|
|
|
* Params:
|
|
|
|
|
|
* Date: 2023/7/14
|
|
|
|
|
|
*/
|
|
|
|
|
|
getSysinfo = () => {
|
|
|
|
|
|
sysinfo().then(({ status, data }) => {
|
|
|
|
|
|
if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-05-25 16:25:33 +08:00
|
|
|
|
handleReceive = ({ data }) => {
|
|
|
|
|
|
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
|
|
|
|
|
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
|
|
|
|
|
dataIndex: it.dataIndex,
|
2023-06-30 16:13:46 +08:00
|
|
|
|
width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150,
|
2023-05-25 16:25:33 +08:00
|
|
|
|
title: it.title, align: "left",
|
|
|
|
|
|
fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "",
|
|
|
|
|
|
ellipsis: true
|
|
|
|
|
|
}));
|
|
|
|
|
|
const { type, payload: { id, params } = {} } = data;
|
2023-05-26 10:44:05 +08:00
|
|
|
|
const { dataSource, pageInfo, selectedKey, selectedRowKeys } = this.state;
|
2023-05-25 16:25:33 +08:00
|
|
|
|
if (type === "init") {
|
|
|
|
|
|
this.postMessageToChild({
|
2023-05-26 10:44:05 +08:00
|
|
|
|
columns, dataSource, showOperateBtn, selectedKey,
|
|
|
|
|
|
showSum: false, pageInfo, selectedRowKeys
|
2023-05-25 16:25:33 +08:00
|
|
|
|
});
|
|
|
|
|
|
} else if (type === "turn") {
|
|
|
|
|
|
if (id === "PAGEINFO") {
|
|
|
|
|
|
const { pageNum: current, size: pageSize } = params;
|
2023-05-26 10:44:05 +08:00
|
|
|
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.query());
|
|
|
|
|
|
} else if (id === "EDIT") {
|
|
|
|
|
|
const { record } = params;
|
|
|
|
|
|
this.handleEdit(record);
|
|
|
|
|
|
} else if (id === "MOREOPT") {
|
|
|
|
|
|
const { id, event: e } = params;
|
|
|
|
|
|
this.handleMenuClick(e, id);
|
|
|
|
|
|
} else if (id === "CANCELSTOP") {
|
|
|
|
|
|
const { id } = params;
|
|
|
|
|
|
this.cancelStop(id);
|
|
|
|
|
|
} else if (id === "ROWSELECTION") {
|
|
|
|
|
|
const { selectedRowKeys } = params;
|
|
|
|
|
|
this.setState({ selectedRowKeys });
|
2023-05-25 16:25:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
postMessageToChild = (payload) => {
|
|
|
|
|
|
const childFrameObj = document.getElementById("atdTable");
|
2023-05-26 10:44:05 +08:00
|
|
|
|
const { dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys } = payload;
|
2023-06-30 16:13:46 +08:00
|
|
|
|
const { salaryArchiveDelete } = this.state;
|
2023-05-25 16:25:33 +08:00
|
|
|
|
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
2023-06-30 16:13:46 +08:00
|
|
|
|
dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys, salaryArchiveDelete
|
2023-05-25 16:25:33 +08:00
|
|
|
|
}), "*");
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2022-10-17 10:03:01 +08:00
|
|
|
|
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" });
|
2023-06-30 16:13:46 +08:00
|
|
|
|
const { data: salaryArchiveDelete } = await this.salaryArchiveDelete();
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.setState({
|
|
|
|
|
|
archiveStatusList: [{
|
|
|
|
|
|
key: "",
|
|
|
|
|
|
showname: ""
|
|
|
|
|
|
}, ..._.map(archiveStatusList, it => ({
|
|
|
|
|
|
key: String(it.value),
|
|
|
|
|
|
showname: it.defaultLabel
|
|
|
|
|
|
}))],
|
2023-07-10 11:00:47 +08:00
|
|
|
|
userStatusList: [..._.map(userStatusList, it => ({
|
2022-10-17 10:03:01 +08:00
|
|
|
|
key: String(it.value),
|
|
|
|
|
|
showname: it.defaultLabel
|
2023-06-30 16:13:46 +08:00
|
|
|
|
}))],
|
|
|
|
|
|
salaryArchiveDelete
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}, () =>
|
|
|
|
|
|
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) => {
|
2023-05-31 15:32:24 +08:00
|
|
|
|
const { loading, pageInfo, searchItemsValue, selectedKey } = this.state;
|
2023-05-26 10:44:05 +08:00
|
|
|
|
const { payrollFilesStore: { tableStore, queryList }, taxAgentStore: { showOperateBtn } } = this.props;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
const payload = { ...pageInfo };
|
2022-12-16 17:00:24 +08:00
|
|
|
|
this.setState({
|
2023-02-13 10:41:40 +08:00
|
|
|
|
loading: { ...loading, query: true }
|
2022-12-16 17:00:24 +08:00
|
|
|
|
});
|
2022-10-17 10:03:01 +08:00
|
|
|
|
queryList(payload, searchItemsValue, url).then(({ data, status }) => {
|
|
|
|
|
|
this.setState({ loading: { ...loading, query: false } });
|
2023-06-12 16:22:27 +08:00
|
|
|
|
if (status && selectedKey === _.lowerCase(data.listType)) {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
const { pageInfo: paganition } = data;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
const { list: dataSource, total, pageNum: current, pageSize } = paganition;
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
dataSource,
|
|
|
|
|
|
pageInfo: {
|
|
|
|
|
|
...pageInfo,
|
|
|
|
|
|
total,
|
|
|
|
|
|
current,
|
|
|
|
|
|
pageSize
|
2023-05-31 15:32:24 +08:00
|
|
|
|
},
|
|
|
|
|
|
tabCount: { ...this.state.tabCount, [tabCountKey[selectedKey]]: total }
|
2022-10-17 10:03:01 +08:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
//一键全部设为定薪员工
|
|
|
|
|
|
allGotoFixed = () => {
|
|
|
|
|
|
const { pageInfo } = this.state;
|
|
|
|
|
|
if (pageInfo.total === 0) {
|
|
|
|
|
|
message.warning("您没有需要处理的待定薪人员!");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
Modal.warning({
|
|
|
|
|
|
title: "信息确认",
|
|
|
|
|
|
content: `确定要将所有待定薪人员(共${pageInfo.total}条数据)设为发薪人员吗?`,
|
|
|
|
|
|
onOk: () => {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
API.allGotoFixed({}).then(({ status, data, errormsg }) => {
|
2022-10-17 10:03:01 +08:00
|
|
|
|
if (status) {
|
2022-10-24 18:45:04 +08:00
|
|
|
|
const { msg } = data;
|
2022-10-20 17:53:26 +08:00
|
|
|
|
message.info(msg || "操作成功!");
|
2023-01-28 10:10:00 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.query();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "操作失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
commonEnumList = (params) => {
|
|
|
|
|
|
return API.commonEnumList(params);
|
|
|
|
|
|
};
|
2023-06-30 16:13:46 +08:00
|
|
|
|
salaryArchiveDelete = () => {
|
|
|
|
|
|
return API.salaryArchiveDelete();
|
|
|
|
|
|
};
|
2022-10-17 10:03:01 +08:00
|
|
|
|
getImportTypes = () => {
|
|
|
|
|
|
API.getImportTypes().then(({ data, status }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
importType: data
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2022-10-20 17:53:26 +08:00
|
|
|
|
//取消停薪
|
|
|
|
|
|
cancelStop = (id) => {
|
|
|
|
|
|
API.cancelStop([id]).then(({ status, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
message.success("操作成功!");
|
2023-01-28 10:10:00 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.query();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "操作失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
//待定薪删除待办
|
|
|
|
|
|
deletePendingTodo = (params) => {
|
|
|
|
|
|
API.deletePendingTodo(params).then(({ status, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
message.success("操作成功!");
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
selectedRowKeys: []
|
|
|
|
|
|
}, () => {
|
2023-01-28 10:10:00 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.query();
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "操作失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
//待停薪删除待办
|
|
|
|
|
|
deleteSuspendTodo = (params) => {
|
|
|
|
|
|
API.deleteSuspendTodo(params).then(({ status, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
message.success("操作成功!");
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
selectedRowKeys: []
|
|
|
|
|
|
}, () => {
|
|
|
|
|
|
this.query();
|
2023-03-28 15:13:14 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-10-20 17:53:26 +08:00
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "操作失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2022-12-15 16:21:56 +08:00
|
|
|
|
handleClick = ({ key }) => {
|
|
|
|
|
|
const { selectedRowKeys } = this.state;
|
|
|
|
|
|
if (selectedRowKeys.length === 0) {
|
|
|
|
|
|
message.warning("请选择表格数据");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (key === "batchDelete") {
|
|
|
|
|
|
this.deletePendingTodo(selectedRowKeys);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
API.gotoFixed(selectedRowKeys).then(({ status, data, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
if (data.type === "success") {
|
|
|
|
|
|
message.success("操作成功!");
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
selectedRowKeys: []
|
|
|
|
|
|
}, () => {
|
2023-01-28 10:10:00 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-12-15 16:21:56 +08:00
|
|
|
|
this.query();
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.info(data.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "操作失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
2022-10-17 10:03:01 +08:00
|
|
|
|
getRightOptionBtns = () => {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
const { selectedKey, importType, selectedRowKeys, searchItemsValue, pageInfo } = this.state;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
const { taxAgentStore: { showOperateBtn } } = this.props;
|
2022-10-20 17:53:26 +08:00
|
|
|
|
if (selectedKey === "pending" && showOperateBtn) {
|
2022-10-17 10:03:01 +08:00
|
|
|
|
return [
|
2022-10-24 18:45:04 +08:00
|
|
|
|
<Button type="primary" onClick={() => {
|
|
|
|
|
|
this.importRef.handleMenuClick({ key: "PENDING" });
|
|
|
|
|
|
}}>导入</Button>,
|
|
|
|
|
|
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
|
|
|
|
|
searchItemsValue={searchItemsValue}/>}>
|
|
|
|
|
|
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
2022-10-17 10:03:01 +08:00
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>,
|
2022-12-15 16:21:56 +08:00
|
|
|
|
<Button type="ghost" onClick={this.allGotoFixed}>全部设为发薪人员</Button>,
|
|
|
|
|
|
<Dropdown
|
|
|
|
|
|
overlay={
|
|
|
|
|
|
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
|
|
|
|
|
|
<Menu.Item key="batchSet">批量设为发薪员工</Menu.Item>
|
|
|
|
|
|
<Menu.Item key="batchDelete">批量删除待办</Menu.Item>
|
|
|
|
|
|
</Menu>
|
|
|
|
|
|
}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Button type="primary">更多<i className="icon-coms-down2" style={{
|
|
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>
|
2022-10-17 10:03:01 +08:00
|
|
|
|
];
|
|
|
|
|
|
} else if (selectedKey === "fixed" && showOperateBtn) {
|
|
|
|
|
|
return [
|
|
|
|
|
|
<WeaHelpfulTip
|
|
|
|
|
|
width={300}
|
|
|
|
|
|
title={<HelpfulDiv/>}
|
|
|
|
|
|
placement="topLeft"
|
|
|
|
|
|
/>,
|
|
|
|
|
|
<Dropdown overlay={
|
|
|
|
|
|
<ImportMenu
|
|
|
|
|
|
importType={importType}
|
2023-08-31 11:15:32 +08:00
|
|
|
|
searchItemsValue={searchItemsValue}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
refreshList={() => {
|
|
|
|
|
|
this.query();
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.setState({ selectedRowKeys: [] });
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}}/>
|
|
|
|
|
|
}>
|
2022-10-24 18:45:04 +08:00
|
|
|
|
<Button type="primary">导入<i className="icon-coms-down2" style={{
|
2022-10-17 10:03:01 +08:00
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>,
|
2022-10-24 18:45:04 +08:00
|
|
|
|
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
|
|
|
|
|
searchItemsValue={searchItemsValue}/>}>
|
|
|
|
|
|
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
2022-10-17 10:03:01 +08:00
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>
|
|
|
|
|
|
];
|
|
|
|
|
|
} else if (selectedKey === "suspend" && showOperateBtn) {
|
|
|
|
|
|
return [
|
|
|
|
|
|
<Dropdown overlay={
|
|
|
|
|
|
<AllWithoutPay
|
2022-10-20 17:53:26 +08:00
|
|
|
|
pageInfo={pageInfo}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
selectedRowKeys={selectedRowKeys}
|
|
|
|
|
|
refreshList={() => {
|
2023-01-28 10:10:00 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.query();
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.setState({ selectedRowKeys: [] });
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}}
|
|
|
|
|
|
/>
|
|
|
|
|
|
}>
|
|
|
|
|
|
<Button type="primary" style={{ marginLeft: 8 }}>全部停薪<i className="icon-coms-down2" style={{
|
|
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>,
|
2023-03-28 15:13:14 +08:00
|
|
|
|
<Button type="ghost" onClick={() => {
|
|
|
|
|
|
const { selectedRowKeys } = this.state;
|
|
|
|
|
|
if (selectedRowKeys.length === 0) {
|
|
|
|
|
|
message.warning("未选择条目");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.deleteSuspendTodo(selectedRowKeys);
|
|
|
|
|
|
}}>批量删除待办</Button>,
|
2022-10-24 18:45:04 +08:00
|
|
|
|
<Button type="primary" onClick={() => {
|
|
|
|
|
|
this.importRef.handleMenuClick({ key: "SUSPEND" });
|
|
|
|
|
|
}}>导入</Button>,
|
|
|
|
|
|
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
|
|
|
|
|
searchItemsValue={searchItemsValue}/>}>
|
2022-10-25 17:13:58 +08:00
|
|
|
|
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
2022-10-20 17:53:26 +08:00
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
2022-10-17 10:03:01 +08:00
|
|
|
|
</Dropdown>
|
|
|
|
|
|
];
|
|
|
|
|
|
} else if (selectedKey === "stop" && showOperateBtn) {
|
|
|
|
|
|
return [
|
|
|
|
|
|
<Dropdown overlay={
|
|
|
|
|
|
<BatchSuspendsPay
|
|
|
|
|
|
selectedRowKeys={selectedRowKeys}
|
|
|
|
|
|
refreshList={() => {
|
2023-01-28 10:10:00 +08:00
|
|
|
|
this.queryTabTotal();
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.query();
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.setState({ selectedRowKeys: [] });
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}}
|
|
|
|
|
|
/>
|
|
|
|
|
|
}>
|
2022-10-25 17:13:58 +08:00
|
|
|
|
<Button type="primary">批量取消停薪<i className="icon-coms-down2" style={{
|
2022-10-17 10:03:01 +08:00
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>,
|
2022-10-24 18:45:04 +08:00
|
|
|
|
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
|
|
|
|
|
searchItemsValue={searchItemsValue}/>}>
|
2022-10-25 17:13:58 +08:00
|
|
|
|
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
2022-10-17 10:03:01 +08:00
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>
|
|
|
|
|
|
];
|
2023-03-15 14:21:26 +08:00
|
|
|
|
} else if (selectedKey === "ext" && showOperateBtn) {
|
|
|
|
|
|
return [
|
|
|
|
|
|
<WeaHelpfulTip
|
|
|
|
|
|
width={300}
|
|
|
|
|
|
title={<HelpfulDiv/>}
|
|
|
|
|
|
placement="topLeft"
|
|
|
|
|
|
/>,
|
|
|
|
|
|
<Dropdown overlay={
|
|
|
|
|
|
<ImportMenu
|
|
|
|
|
|
isExtEmp importType={importType}
|
2023-08-31 11:15:32 +08:00
|
|
|
|
searchItemsValue={searchItemsValue}
|
2023-03-15 14:21:26 +08:00
|
|
|
|
refreshList={() => {
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
this.setState({ selectedRowKeys: [] });
|
|
|
|
|
|
}}/>
|
|
|
|
|
|
}>
|
|
|
|
|
|
<Button type="primary">导入<i className="icon-coms-down2" style={{
|
|
|
|
|
|
marginLeft: 8,
|
|
|
|
|
|
verticalAlign: "middle"
|
|
|
|
|
|
}}/></Button>
|
|
|
|
|
|
</Dropdown>
|
|
|
|
|
|
];
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
return [];
|
|
|
|
|
|
};
|
|
|
|
|
|
getColumns = () => {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
2023-05-26 10:44:05 +08:00
|
|
|
|
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
|
|
|
|
|
dataIndex: it.dataIndex,
|
2023-06-30 16:13:46 +08:00
|
|
|
|
width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150,
|
2023-05-26 10:44:05 +08:00
|
|
|
|
title: it.title, align: "left",
|
|
|
|
|
|
fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "",
|
|
|
|
|
|
ellipsis: true
|
|
|
|
|
|
}));
|
|
|
|
|
|
this.postMessageToChild({
|
|
|
|
|
|
columns, showOperateBtn, selectedKey: this.state.selectedKey,
|
|
|
|
|
|
dataSource: this.state.dataSource, selectedRowKeys: this.state.selectedRowKeys,
|
|
|
|
|
|
showSum: false, pageInfo: this.state.pageInfo
|
2022-10-17 10:03:01 +08:00
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
handleEdit = (record) => {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
const { selectedKey } = this.state;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.setState({
|
|
|
|
|
|
slideParams: {
|
|
|
|
|
|
...this.state.slideParams,
|
|
|
|
|
|
visible: true,
|
|
|
|
|
|
id: record.id
|
|
|
|
|
|
}
|
2022-10-20 17:53:26 +08:00
|
|
|
|
}, () => selectedKey === "fixed" && this.salaryAdjustmentInfo());
|
2022-10-17 10:03:01 +08:00
|
|
|
|
};
|
|
|
|
|
|
//列表操作
|
|
|
|
|
|
handleMenuClick = (e, id) => {
|
|
|
|
|
|
const { key } = e;
|
|
|
|
|
|
if (key === "payroll") {
|
|
|
|
|
|
//设为定薪员工
|
|
|
|
|
|
API.gotoFixed([id]).then(({ status, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
message.success("操作成功!");
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "操作失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
} else if (key === "stopSalary") {
|
|
|
|
|
|
//停薪
|
|
|
|
|
|
API.gotoStop([id]).then(({ status, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
message.success("操作成功!");
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "操作失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2022-10-20 17:53:26 +08:00
|
|
|
|
} else if (key === "deletePendingTodo") {
|
|
|
|
|
|
this.deletePendingTodo([id]);
|
|
|
|
|
|
} else if (key === "deleteSuspendTodo") {
|
|
|
|
|
|
this.deleteSuspendTodo([id]);
|
|
|
|
|
|
} else if (key === "view") {
|
|
|
|
|
|
this.handleEdit(id);
|
2023-06-30 16:13:46 +08:00
|
|
|
|
} else if (key === "deleteAchives") {
|
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
|
title: getLabel(131329, "信息确认"),
|
|
|
|
|
|
content: getLabel(388758, "确认要删除吗?"),
|
|
|
|
|
|
onOk: () => {
|
|
|
|
|
|
API.deleteSalaryArchive([id]).then(({ status, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
message.success(getLabel(30700, "操作成功"));
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || getLabel(30651, "操作失败"));
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
// 查看 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={() => {
|
2022-11-21 17:50:06 +08:00
|
|
|
|
const linkUrl = url.indexOf("http") !== -1 ? url : `${window.location.origin}${url}`;
|
|
|
|
|
|
window.open(`${linkUrl}&salaryArchiveId=${id}`);
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}}>发起调薪</Button>);
|
|
|
|
|
|
}
|
2023-03-15 14:21:26 +08:00
|
|
|
|
if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) {
|
2022-10-17 10:03:01 +08:00
|
|
|
|
arrList.push(<Button type="primary" onClick={() => {
|
2023-09-04 16:48:36 +08:00
|
|
|
|
this.setState({
|
|
|
|
|
|
adjLogRecordDialog: {
|
|
|
|
|
|
...this.state.adjLogRecordDialog,
|
|
|
|
|
|
visible: true, title: getLabel(542686, "调薪"), salaryArchiveId: this.state.slideParams.id
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}}>调薪</Button>);
|
|
|
|
|
|
}
|
2023-10-30 15:54:25 +08:00
|
|
|
|
(showOperateBtn && selectedKey !== "stop") && arrList.push(<Button type="primary" onClick={this.handleSave}>保存</Button>);
|
2022-10-17 10:03:01 +08:00
|
|
|
|
return arrList;
|
|
|
|
|
|
};
|
|
|
|
|
|
//切换tab
|
|
|
|
|
|
handleChangeTab = (selectedKey) => {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
const { slideParams, pageInfo } = this.state;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.setState({
|
2023-03-28 15:13:14 +08:00
|
|
|
|
selectedRowKeys: [],
|
2022-10-17 10:03:01 +08:00
|
|
|
|
slideParams: { ...slideParams, visible: false, id: "" },
|
2022-10-20 17:53:26 +08:00
|
|
|
|
selectedKey,
|
|
|
|
|
|
pageInfo: {
|
|
|
|
|
|
...pageInfo,
|
|
|
|
|
|
current: 1,
|
|
|
|
|
|
pageSize: 10
|
|
|
|
|
|
}
|
2023-05-26 10:44:05 +08:00
|
|
|
|
}, () => {
|
|
|
|
|
|
if (!this.handleChangeDebounce) {
|
|
|
|
|
|
this.handleChangeDebounce = _.debounce(() => {
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
}, 500);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.handleChangeDebounce();
|
2022-12-16 17:36:56 +08:00
|
|
|
|
});
|
2022-10-17 10:03:01 +08:00
|
|
|
|
};
|
|
|
|
|
|
//编辑保存
|
|
|
|
|
|
handleSave = () => {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
const { paysetParams, selectedKey } = this.state;
|
|
|
|
|
|
const { salaryFileStore: { adjustSalaryItems, detailForm } } = this.props;
|
2022-10-28 17:12:03 +08:00
|
|
|
|
if ((selectedKey === "pending" && _.isEmpty(paysetParams.payStartDate)) || (selectedKey === "suspend" && _.isEmpty(paysetParams.payEndDate))) {
|
2022-10-17 10:03:01 +08:00
|
|
|
|
Modal.warning({
|
|
|
|
|
|
title: "信息确认",
|
|
|
|
|
|
content: "必要信息不完整,红色*为必填项!"
|
|
|
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-10-20 17:53:26 +08:00
|
|
|
|
const payload = {
|
|
|
|
|
|
...paysetParams,
|
|
|
|
|
|
salaryArchiveId: detailForm.id,
|
|
|
|
|
|
salaryArchiveItems: _.map(toJS(adjustSalaryItems), it => ({
|
|
|
|
|
|
salaryItemId: it.id,
|
|
|
|
|
|
adjustValue: String(it.value || "")
|
|
|
|
|
|
})),
|
2023-03-15 14:21:26 +08:00
|
|
|
|
status: selectedKey === "ext" ? "FIXED" : _.upperCase(selectedKey)
|
2022-10-20 17:53:26 +08:00
|
|
|
|
};
|
|
|
|
|
|
API.savePaySet(payload).then(({ status, errormsg }) => {
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
message.success("操作成功!");
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
message.error(errormsg || "保存失败!");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2022-10-17 10:03:01 +08:00
|
|
|
|
};
|
|
|
|
|
|
//发薪设置
|
|
|
|
|
|
handleSetpay = (params) => {
|
|
|
|
|
|
const { type, date } = params;
|
|
|
|
|
|
const { paysetParams } = this.state;
|
|
|
|
|
|
if (type === "起始发薪日期") {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.setState({ paysetParams: { ...paysetParams, payStartDate: date } });
|
2022-10-17 10:03:01 +08:00
|
|
|
|
} else if (type === "最后发薪日期") {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.setState({ paysetParams: { ...paysetParams, payEndDate: date } });
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
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;
|
2023-03-15 14:21:26 +08:00
|
|
|
|
case "stop":
|
2022-10-17 10:03:01 +08:00
|
|
|
|
this.queryList("/api/bs/hrmsalary/salaryArchive/stopList");
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
2023-03-15 14:21:26 +08:00
|
|
|
|
this.queryList("/api/bs/hrmsalary/salaryArchive/extList");
|
2022-10-17 10:03:01 +08:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
const {
|
|
|
|
|
|
tabCount,
|
|
|
|
|
|
selectedKey,
|
|
|
|
|
|
loading,
|
|
|
|
|
|
pageInfo,
|
|
|
|
|
|
showSearchAd,
|
|
|
|
|
|
slideParams,
|
2023-09-04 16:48:36 +08:00
|
|
|
|
adjLogRecordDialog,
|
2023-07-14 14:09:27 +08:00
|
|
|
|
paysetParams,
|
|
|
|
|
|
extEmpsWitch
|
2022-10-17 10:03:01 +08:00
|
|
|
|
} = this.state;
|
2023-10-30 15:54:25 +08:00
|
|
|
|
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
2022-10-17 10:03:01 +08:00
|
|
|
|
const renderSearch = () => {
|
|
|
|
|
|
const searchItems = [
|
|
|
|
|
|
{ com: this.Input("姓名", "username") },
|
|
|
|
|
|
{ com: this.Browser("分部", "subcompanyIds") },
|
|
|
|
|
|
{ com: this.Browser("部门", "departmentIds") },
|
|
|
|
|
|
{ com: this.Browser("岗位", "positionIds") },
|
2023-07-10 11:00:47 +08:00
|
|
|
|
{ com: this.Select("人员状态", "statuses") },
|
2022-10-17 10:03:01 +08:00
|
|
|
|
// { com: this.Select("档案状态", "archiveStatus") },
|
2023-05-31 18:58:35 +08:00
|
|
|
|
{ com: this.Select("个税扣缴义务人", "taxAgentId") },
|
|
|
|
|
|
{ com: this.Input("工号", "workcode") }
|
2022-10-17 10:03:01 +08:00
|
|
|
|
];
|
|
|
|
|
|
return <WeaSearchGroup title={"基本信息"} items={searchItems} showGroup/>;
|
|
|
|
|
|
};
|
|
|
|
|
|
const adBtn = [
|
|
|
|
|
|
// 高级搜索内部按钮
|
|
|
|
|
|
<Button type="primary" onClick={() => {
|
2023-01-13 17:30:24 +08:00
|
|
|
|
this.setState({
|
|
|
|
|
|
showSearchAd: false,
|
|
|
|
|
|
pageInfo: {
|
|
|
|
|
|
...pageInfo,
|
|
|
|
|
|
current: 1,
|
|
|
|
|
|
pageSize: 10
|
|
|
|
|
|
}
|
|
|
|
|
|
}, () => this.query());
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}}> 搜索 </Button>,
|
|
|
|
|
|
<Button type="ghost" onClick={() => this.setState({
|
|
|
|
|
|
searchItemsValue: {
|
|
|
|
|
|
username: "",
|
2023-05-31 18:58:35 +08:00
|
|
|
|
workcode: "",
|
2022-10-17 10:03:01 +08:00
|
|
|
|
departmentIds: "",
|
|
|
|
|
|
positionIds: "",
|
2023-07-10 11:00:47 +08:00
|
|
|
|
statuses: "",
|
2022-10-17 10:03:01 +08:00
|
|
|
|
archiveStatus: ""
|
|
|
|
|
|
}
|
|
|
|
|
|
})}> 重置 </Button>,
|
|
|
|
|
|
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}> 取消 </Button>
|
|
|
|
|
|
];
|
2023-03-07 18:07:33 +08:00
|
|
|
|
const rightMenu = [
|
|
|
|
|
|
{
|
|
|
|
|
|
key: "BTN_COLUMN",
|
|
|
|
|
|
icon: <i className="icon-coms-Custom"/>,
|
|
|
|
|
|
content: "显示列定制",
|
|
|
|
|
|
onClick: () => {
|
|
|
|
|
|
tableStore.setColSetVisible(true);
|
|
|
|
|
|
tableStore.tableColSet(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
];
|
2022-10-17 10:03:01 +08:00
|
|
|
|
return (
|
|
|
|
|
|
<div className="payrollFilesWrapper">
|
|
|
|
|
|
<WeaTop
|
2023-03-07 18:07:33 +08:00
|
|
|
|
title="薪资档案" icon={<i className="icon-coms-fa"/>}
|
|
|
|
|
|
iconBgcolor="#F14A2D" showDropIcon={true}
|
|
|
|
|
|
dropMenuDatas={rightMenu}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
>
|
|
|
|
|
|
<WeaTab
|
2023-07-20 17:03:20 +08:00
|
|
|
|
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(tabCondition) : tabCondition}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
counts={tabCount}
|
2022-10-20 17:53:26 +08:00
|
|
|
|
className="payrollFilesTab"
|
2022-10-17 10:03:01 +08:00
|
|
|
|
keyParam="viewcondition" //主键
|
|
|
|
|
|
countParam="groupid" //数量
|
2022-10-20 17:53:26 +08:00
|
|
|
|
leftStyle={{ paddingRight: $(".payrollFilesTab-right").width() }}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
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} // 高级搜索内部按钮
|
2023-01-13 17:30:24 +08:00
|
|
|
|
onSearch={() => {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
pageInfo: {
|
|
|
|
|
|
...pageInfo,
|
|
|
|
|
|
current: 1,
|
|
|
|
|
|
pageSize: 10
|
|
|
|
|
|
}
|
|
|
|
|
|
}, () => {
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
});
|
|
|
|
|
|
}} // 点搜索按钮时的回调this.handleSearch()
|
2022-10-17 10:03:01 +08:00
|
|
|
|
searchsBasePlaceHolder={"请输入姓名"}
|
|
|
|
|
|
onSearchChange={(v) => this.setState({
|
|
|
|
|
|
searchItemsValue: {
|
|
|
|
|
|
...this.state.searchItemsValue,
|
|
|
|
|
|
username: v
|
|
|
|
|
|
}
|
|
|
|
|
|
})} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值form.updateFields({ username: v })
|
|
|
|
|
|
searchsBaseValue={this.state.searchItemsValue.username}
|
|
|
|
|
|
/>
|
2023-02-13 10:41:40 +08:00
|
|
|
|
<div className="tableWrapper">
|
2023-05-25 16:25:33 +08:00
|
|
|
|
<Spin spinning={loading.query}>
|
|
|
|
|
|
<iframe
|
|
|
|
|
|
style={{ border: 0, width: "100%", height: "100%" }}
|
2023-05-26 10:47:20 +08:00
|
|
|
|
// src="http://localhost:7607/#/payrollFilesTable"
|
|
|
|
|
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/payrollFilesTable"
|
2023-05-25 16:25:33 +08:00
|
|
|
|
id="atdTable"
|
2023-02-13 10:41:40 +08:00
|
|
|
|
/>
|
2023-05-25 16:25:33 +08:00
|
|
|
|
</Spin>
|
|
|
|
|
|
{/*人员卡片*/}
|
|
|
|
|
|
<WeaPopoverHrm/>
|
|
|
|
|
|
<WeaTableComx
|
|
|
|
|
|
style={{ display: "none" }}
|
|
|
|
|
|
comsWeaTableStore={tableStore}
|
|
|
|
|
|
needScroll={true}
|
2023-05-26 10:44:05 +08:00
|
|
|
|
columns={this.getColumns()}
|
2023-05-25 16:25:33 +08:00
|
|
|
|
/>
|
2023-02-13 10:41:40 +08:00
|
|
|
|
</div>
|
2022-10-17 10:03:01 +08:00
|
|
|
|
</WeaTop>
|
2022-10-24 18:45:04 +08:00
|
|
|
|
<div style={{ display: "none" }}>
|
|
|
|
|
|
<ImportMenu
|
|
|
|
|
|
ref={(dom) => this.importRef = dom}
|
2023-08-31 11:15:32 +08:00
|
|
|
|
searchItemsValue={this.state.searchItemsValue}
|
2022-10-24 18:45:04 +08:00
|
|
|
|
refreshList={() => {
|
|
|
|
|
|
this.query();
|
|
|
|
|
|
this.setState({ selectedRowKeys: [] });
|
|
|
|
|
|
}}/>
|
|
|
|
|
|
</div>
|
2022-10-17 10:03:01 +08:00
|
|
|
|
{slideParams.visible && (
|
|
|
|
|
|
<WeaSlideModal
|
|
|
|
|
|
className="slideOuterWrapper"
|
|
|
|
|
|
visible={slideParams.visible}
|
|
|
|
|
|
top={0}
|
2023-02-13 10:41:40 +08:00
|
|
|
|
measureT="%"
|
2023-02-22 19:16:34 +08:00
|
|
|
|
width={980}
|
2023-02-13 10:41:40 +08:00
|
|
|
|
measureX="px"
|
2022-10-17 10:03:01 +08:00
|
|
|
|
height={100}
|
2023-02-13 10:41:40 +08:00
|
|
|
|
measureY="%"
|
|
|
|
|
|
direction="right"
|
2022-10-17 10:03:01 +08:00
|
|
|
|
title={
|
|
|
|
|
|
<SlideModalTitle
|
|
|
|
|
|
subtitle="员工薪资档案"
|
|
|
|
|
|
editable={false}
|
|
|
|
|
|
customOperate={this.renderEditSlideOperate()}
|
|
|
|
|
|
/>
|
|
|
|
|
|
}
|
2022-10-20 17:53:26 +08:00
|
|
|
|
content={
|
|
|
|
|
|
<SalaryFileViewSlide
|
|
|
|
|
|
id={slideParams.id}
|
|
|
|
|
|
selectedKey={selectedKey}
|
2023-10-30 15:54:25 +08:00
|
|
|
|
showOperateBtn={showOperateBtn}
|
2022-10-20 17:53:26 +08:00
|
|
|
|
handleSetpay={this.handleSetpay}
|
|
|
|
|
|
paysetParams={paysetParams}
|
|
|
|
|
|
onChangePaySetParams={(res) => {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
paysetParams: {
|
|
|
|
|
|
...paysetParams,
|
|
|
|
|
|
...res
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}}
|
|
|
|
|
|
/>
|
|
|
|
|
|
}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
onClose={() => {
|
2022-10-20 17:53:26 +08:00
|
|
|
|
this.setState({
|
|
|
|
|
|
paysetParams: { payStartDate: "", payEndDate: "" },
|
|
|
|
|
|
slideParams: { ...slideParams, visible: false, id: "" }
|
|
|
|
|
|
});
|
2022-10-17 10:03:01 +08:00
|
|
|
|
}}
|
|
|
|
|
|
/>
|
|
|
|
|
|
)}
|
2023-09-04 16:48:36 +08:00
|
|
|
|
<SalaryArchiveEditAdjLogRecord
|
|
|
|
|
|
{...adjLogRecordDialog}
|
|
|
|
|
|
onCancel={() => this.setState({
|
|
|
|
|
|
adjLogRecordDialog: {
|
|
|
|
|
|
adjLogRecordDialog, visible: false, title: "", id: "", salaryArchiveId: ""
|
|
|
|
|
|
}
|
|
|
|
|
|
})}
|
|
|
|
|
|
/>
|
2022-10-17 10:03:01 +08:00
|
|
|
|
</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>;
|
|
|
|
|
|
};
|
2023-05-31 15:32:24 +08:00
|
|
|
|
|
|
|
|
|
|
export const tabCountKey = {
|
|
|
|
|
|
suspend: "SUSPEND",
|
|
|
|
|
|
stop: "STOP",
|
|
|
|
|
|
fixed: "FIXED",
|
|
|
|
|
|
pending: "PENDING"
|
|
|
|
|
|
};
|
|
|
|
|
|
|