Merge branch 'release/2.12.1.2403.02-个税' into custom-艾志工业-合并个税
This commit is contained in:
commit
dc0137913f
|
|
@ -24,22 +24,25 @@ export const getTableDatas = (params) => {
|
|||
export const getLogs = params => {
|
||||
const payload = {
|
||||
...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa",
|
||||
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"}]"
|
||||
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"}]"
|
||||
};
|
||||
return postFetch("/api/bs/hrmsalary/elog/getLogs", payload);
|
||||
return postFetch("/api/bs/hrmelog/elog/getLogs", payload);
|
||||
};
|
||||
//获取单条操作记录的更新明细
|
||||
export const getDetailChanges = params => {
|
||||
const payload = {
|
||||
...params, module: "hrsa", detailTransMethod: "elogDemoDetail"
|
||||
};
|
||||
return postFetch("/api/bs/hrmsalary/elog/getDetailChanges", payload);
|
||||
return postFetch("/api/bs/hrmelog/elog/getDetailChanges", payload);
|
||||
};
|
||||
//获取薪资账套全列表
|
||||
export const getSalarysobListAll = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/listAll", params);
|
||||
};
|
||||
|
||||
//补算
|
||||
export const supplementAcctRecord = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/supplementAcctRecord", params);
|
||||
};
|
||||
|
||||
// 薪资账套-浏览按钮数据
|
||||
export const commonBrowserData = (params) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
|
||||
//获取薪资档案各tab的人数
|
||||
export const queryTabTotal = (params) => {
|
||||
|
|
@ -11,65 +11,69 @@ export const queryList = ({ url, ...params }) => {
|
|||
};
|
||||
// 导入档案
|
||||
export const importSalaryArchive = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/importSalaryArchive', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/importSalaryArchive", params);
|
||||
};
|
||||
// 薪资档案预览
|
||||
export const salaryArchivePreview = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/preview', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/preview", params);
|
||||
};
|
||||
// 公共枚举接口
|
||||
export const commonEnumList = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
|
||||
};
|
||||
// 获取导入类型
|
||||
export const getImportTypes = () => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getImportTypes', 'GET', {});
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportTypes", "GET", {});
|
||||
};
|
||||
// 发起调薪地址
|
||||
export const salaryAdjustmentInfo = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/process/salaryAdjustmentInfo", "GET", params);
|
||||
};
|
||||
// 停薪
|
||||
export const stopSalary = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/stopSalary', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/stopSalary", params);
|
||||
};
|
||||
// 一键全部设为定薪员工
|
||||
export const allGotoFixed = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoFixed', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoFixed", params);
|
||||
};
|
||||
// 设为定薪员工
|
||||
export const gotoFixed = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/gotoFixed', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/gotoFixed", params);
|
||||
};
|
||||
// 停薪
|
||||
export const gotoStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/gotoStop', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/gotoStop", params);
|
||||
};
|
||||
//全部停薪
|
||||
export const allGotoStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoStop', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoStop", params);
|
||||
};
|
||||
// 取消停薪
|
||||
export const cancelStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/cancelStop', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/cancelStop", params);
|
||||
};
|
||||
// 保存发薪设置
|
||||
export const savePaySet = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/savePaySet', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/savePaySet", params);
|
||||
};
|
||||
// 待定薪删除待办
|
||||
export const deletePendingTodo = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/deletePendingTodo', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/deletePendingTodo", params);
|
||||
};
|
||||
// 待停薪删除待办
|
||||
export const deleteSuspendTodo = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo", params);
|
||||
};
|
||||
// 待定薪、停薪员工 是否允许删除薪资档案
|
||||
export const salaryArchiveDelete = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete", "GET", params);
|
||||
};
|
||||
// 删除薪资档案
|
||||
export const deleteSalaryArchive = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive", params);
|
||||
};
|
||||
// 数据透视列表导出
|
||||
export const exportDataPerspective = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportDataPerspective", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
|
||||
//薪酬统计维度下拉列表
|
||||
export const dimensionGetForm = (params) => {
|
||||
|
|
@ -122,3 +122,15 @@ export const getExpandFieldSettings = (params) => {
|
|||
export const statisticsReportDuplicate = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/duplicate", "GET", params);
|
||||
};
|
||||
//薪酬统计报表-薪资明细列表
|
||||
export const getSalaryList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryList", params);
|
||||
};
|
||||
//薪酬统计报表-薪资明细列表总计行
|
||||
export const getSalaryListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryListSum", params);
|
||||
};
|
||||
// 薪酬统计报表-薪资明细导出
|
||||
export const exportSalaryList = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -120,6 +120,58 @@
|
|||
}
|
||||
}
|
||||
|
||||
.import-option {
|
||||
.screenWrapper {
|
||||
padding: 0;
|
||||
margin: 10px;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0 16px;
|
||||
|
||||
.wea-date-picker {
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-helpful-tip {
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.attendanceFormWrapper {
|
||||
padding: 0 10px;
|
||||
margin: 10px 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
width: 200px !important;
|
||||
}
|
||||
|
||||
.ant-select-selection, .ant-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ant-select-selection {
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import { WeaCheckbox, WeaDialog, WeaInputSearch } from "ecCom";
|
|||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
export default class SelectItemModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -58,10 +57,19 @@ export default class SelectItemModal extends React.Component {
|
|||
const bottomLeft = <WeaCheckbox content="只显示已选中字段" onChange={onShowOnlyChecked}/>;
|
||||
return (
|
||||
<WeaDialog {...extra} hasScroll title={titleComp}
|
||||
style={{ width: 592, height: 248 }}
|
||||
buttons={btns} moreBtn={moreBtn}
|
||||
initLoadCss className="setWrapper"
|
||||
bottomLeft={bottomLeft}
|
||||
style={{
|
||||
width: 800,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</WeaDialog>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
flex-wrap: wrap;
|
||||
|
||||
li {
|
||||
width: 124px;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
padding: 4px 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,21 +11,22 @@ class SelectItemsWrapper extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchVal: "",
|
||||
selectItem: [],
|
||||
groupItem: [],
|
||||
showOnlyChecked: false
|
||||
searchVal: "", selectItem: [], groupItem: [], showOnlyChecked: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { dataSource } = this.props
|
||||
this.initSelectItem();
|
||||
}
|
||||
|
||||
initSelectItem = () => {
|
||||
const { dataSource } = this.props;
|
||||
this.setState({
|
||||
selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => {
|
||||
return [...pre, ...cur.items];
|
||||
}, []), item => !!item.checked), it => it.id)
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleSearchItemSet = (searchVal) => this.setState({ searchVal });
|
||||
handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) });
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSala
|
|||
import ExternalPersonManage from "./pages/externalPersonManage";
|
||||
import AdjustSalaryManage from "./pages/adjustSalaryManage";
|
||||
import TopologyMap from "./pages/topologyMap";
|
||||
import SupplementaryCalc from "./pages/supplementaryCalc";
|
||||
|
||||
import stores from "./stores";
|
||||
import "./style/index";
|
||||
|
|
@ -119,6 +120,7 @@ const DataAcquisition = (props) => props.children;
|
|||
// reportView 薪酬报表查看
|
||||
// externalPersonManage 非系统人员管理
|
||||
// adjustSalaryManage 档案管理
|
||||
// supplementaryCalc 补算
|
||||
// employeedeclare 人员信息报送
|
||||
// employeedeclareDetail 人员信息报送详情
|
||||
// intelligentCalculateSalarySettings 智能算薪
|
||||
|
|
@ -208,6 +210,7 @@ const Routes = (
|
|||
component={IntelligentCalculateSalarySettings}/>
|
||||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
||||
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Index extends Component {
|
|||
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
||||
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
this.setState({ loading: true, showSearchAd: false });
|
||||
adjustRecordItemList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:薪酬统计报表-高级搜索
|
||||
* Description:
|
||||
* Date: 2024/3/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
render() {
|
||||
const { attendanceStore: { salaryDetailSearchForm } } = this.props;
|
||||
return (
|
||||
<div className="achrive-advance-search">
|
||||
<WeaInputSearch value={salaryDetailSearchForm.getFormParams().keyword}
|
||||
onChange={v => salaryDetailSearchForm.updateFields({ keyword: v })}
|
||||
onSearch={this.props.onAdvanceSearch}
|
||||
/>
|
||||
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||
onClick={this.props.onOpenAdvanceSearch}>{getLabel(545754, "高级搜索")}</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
.achrive-advance-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: -1.5px;
|
||||
|
||||
.wea-advanced-search {
|
||||
top: 2px;
|
||||
left: -1px;
|
||||
height: 28px;
|
||||
line-height: 1;
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
}
|
||||
|
||||
.wea-advanced-search:hover {
|
||||
border: 1px solid #dadada;
|
||||
color: #474747;
|
||||
}
|
||||
|
||||
.text-elli {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
top: 1px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -131,3 +132,90 @@ export const extensionCondition = [
|
|||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const salaryDetailSearchConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["keyword"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "姓名/工号"),
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(537996, "个税扣缴义务人"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "164",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["subcompanyIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(33553, "分部"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "57",
|
||||
viewAttr: 2
|
||||
},
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["departmentIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(27511, "部门"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: getLabel(1361, "基本信息"),
|
||||
col: 2
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:薪资明细列表
|
||||
* Description:
|
||||
* Date: 2024/3/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { message, Spin } from "antd";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import { getIframeParentHeight } from "../../../util";
|
||||
import { sysConfCodeRule } from "../../../apis/ruleconfig";
|
||||
import "../index.less";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@observer
|
||||
class SalaryDetails extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, dataSource: [], columns: [], selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
|
||||
countResult: {}, showTotalCell: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSalaryList(this.props);
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
||||
}, () => this.getSalaryList(nextProps));
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
this.setState(({ selectedRowKeys: [] }));
|
||||
}
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
const { pageInfo } = this.state;
|
||||
if (type === "init") {
|
||||
this.getColumns();
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getSalaryList(this.props));
|
||||
} else if (id === "CHECKBOX") {
|
||||
const { selectedRowKeys: checkBox } = params;
|
||||
this.setState({ selectedRowKeys: checkBox });
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getSalaryList = (props) => {
|
||||
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props;
|
||||
const [startDateStr, endDateStr] = dateRange;
|
||||
const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams();
|
||||
const { pageInfo } = this.state;
|
||||
const payload = {
|
||||
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
...extra, ...pageInfo, startDateStr, endDateStr
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getSalaryList(payload).then(async ({ status, data }) => {
|
||||
const [{ data: sumData }, { data: confCode }] = await Promise.all([API.getSalaryListSum(payload), sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { dataKey, pageInfo: pageparams } = data;
|
||||
const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload,
|
||||
countResult: sumData.sumRow, showTotalCell: confCode === "1"
|
||||
}, () => tableStore.getDatas(dataKey.datas));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleExportSalaryList = (key) => {
|
||||
let { selectedRowKeys, payload } = this.state;
|
||||
if (key === "SELECTED" && selectedRowKeys.length === 0) {
|
||||
message.warning(getLabel(543345, "请选择需要导出的数据!"));
|
||||
return;
|
||||
}
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportSalaryList({ ...payload, ids: selectedRowKeys });
|
||||
};
|
||||
getColumns = () => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
const { dataSource, pageInfo, selectedRowKeys, countResult, showTotalCell } = this.state;
|
||||
const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
|
||||
if (!_.isEmpty(columns)) {
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
|
||||
sumRow: countResult,
|
||||
columns: _.map(columns, (it, idx) => ({
|
||||
...it,
|
||||
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
|
||||
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||
ellipsis: true
|
||||
}))
|
||||
});
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
return (
|
||||
<div className="table-layout"
|
||||
style={{ height: getIframeParentHeight(".wea-new-top-req-content", dataSource.length, 0) + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/calcTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
comsWeaTableStore={tableStore}
|
||||
needScroll={true}
|
||||
columns={this.getColumns()}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryDetails;
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:薪酬统计报薪资明细-高级查询
|
||||
* Description:
|
||||
* Date: 2024/3/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { salaryDetailSearchConditions } from "../conditions";
|
||||
import { getTaxAgentSelectList } from "../../../../apis/taxAgent";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@observer
|
||||
class SalaryDetailAdvanceSearchPannel extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchConditions: []
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const [{ data: taxAgentList }] = await Promise.all([getTaxAgentSelectList()]);
|
||||
this.setState({
|
||||
searchConditions: _.map(salaryDetailSearchConditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, child => {
|
||||
if (getKey(child) === "taxAgentIds") {
|
||||
return {
|
||||
...child, options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
}
|
||||
return { ...child };
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const { attendanceStore: { salaryDetailSearchForm } } = this.props;
|
||||
salaryDetailSearchForm.initFormFields(this.state.searchConditions);
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { searchConditions } = this.state;
|
||||
const { attendanceStore: { salaryDetailSearchForm } } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="wea-advanced-searchsAd">
|
||||
{getSearchs(salaryDetailSearchForm, searchConditions, 2, false)}
|
||||
</div>
|
||||
<div className="wea-search-buttons">
|
||||
<div style={{ textAlign: "center" }}>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={() => salaryDetailSearchForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryDetailAdvanceSearchPannel;
|
||||
|
||||
|
|
@ -7,19 +7,24 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { Button, Dropdown, Menu } from "antd";
|
||||
import { condition, reportCondition } from "./components/conditions";
|
||||
import { commonEnumList, reportGetForm } from "../../apis/ruleconfig";
|
||||
import { dimensionGetForm } from "../../apis/statistics";
|
||||
import EmployeeDetails from "./components/employeeDetails";
|
||||
import SalaryDetails from "./components/salaryDetails";
|
||||
import StatisticsModal from "./components/statisticsModal";
|
||||
import DimensionSlide from "./components/dimensionSlide";
|
||||
import DimensionTable from "./components/dimensionTable";
|
||||
import ReportList from "./components/reportList";
|
||||
import ReportForm from "./components/reportForm";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import SearchPannel from "./components/searchPannel";
|
||||
import moment from "moment";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
|
|
@ -36,6 +41,12 @@ class Index extends Component {
|
|||
reportName: "",
|
||||
keyword: "",
|
||||
year: moment().format("YYYY"),
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
],
|
||||
showSearchAd: false,
|
||||
isQuery: false,
|
||||
slideReq: {
|
||||
visible: false, formId: ""
|
||||
},
|
||||
|
|
@ -257,12 +268,20 @@ class Index extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
|
||||
handleExportSalaryList = (key) => this.salaryRef.wrappedInstance.handleExportSalaryList(key);
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { statisticsReportBtn }, attendanceStore: { statisticsForm, reportForm } } = this.props;
|
||||
const {
|
||||
taxAgentStore: { statisticsReportBtn },
|
||||
attendanceStore: { statisticsForm, reportForm, tableStore }
|
||||
} = this.props;
|
||||
const {
|
||||
selectedKey, modalReq, slideReq, conditions, reportConditions,
|
||||
reportName, keyword, year, logDialogVisible, filterConditions
|
||||
reportName, keyword, year, logDialogVisible, filterConditions,
|
||||
dateRange, showSearchAd, isQuery
|
||||
} = this.state;
|
||||
const buttons = selectedKey === "statistics" ? [
|
||||
<Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>,
|
||||
|
|
@ -272,7 +291,7 @@ class Index extends Component {
|
|||
value={reportName}
|
||||
onChange={reportName => this.setState({ reportName })}
|
||||
onSearch={() => this.handleReqBtnsClick("search")}/>
|
||||
] : [
|
||||
] : selectedKey === "detail" ? [
|
||||
<span className="employeeYearWrapper">
|
||||
<span>{getLabel(111, "年薪资核算人员明细:")}</span>
|
||||
<WeaDatePicker value={year} format="YYYY" onChange={year => this.setState({ year })}/>
|
||||
|
|
@ -281,25 +300,51 @@ class Index extends Component {
|
|||
value={keyword}
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.employeeListRef.statisticsEmployeeList()}/>
|
||||
] : [
|
||||
<Dropdown.Button type="primary"
|
||||
onClick={() => this.handleExportSalaryList("ALL")}
|
||||
overlay={<Menu
|
||||
onClick={({ key }) => this.handleExportSalaryList(key)}>
|
||||
<Menu.Item
|
||||
key="SELECTED">{getLabel(543715, "导出所选")}</Menu.Item>
|
||||
</Menu>}>{getLabel(81272, "导出全部")}</Dropdown.Button>,
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.setState({ dateRange: v }, () => this.handleAdvanceSearch())}/>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={this.handleOpenAdvanceSearch}
|
||||
onAdvanceSearch={this.handleAdvanceSearch}/>
|
||||
];
|
||||
const dropMenuDatas = [
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
},
|
||||
{
|
||||
key: "BTN_COLUMN",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(111, "显示列定制"),
|
||||
onClick: () => {
|
||||
tableStore.setColSetVisible(true);
|
||||
tableStore.tableColSet(true);
|
||||
}
|
||||
}
|
||||
];
|
||||
const tabs = [
|
||||
{ key: "statistics", title: getLabel(111, "统计表") },
|
||||
{ key: "detail", title: getLabel(111, "员工明细") }
|
||||
{ key: "detail", title: getLabel(111, "员工明细") },
|
||||
// { key: "salaryDetail", title: getLabel(111, "薪资明细") }
|
||||
];
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper" showDropIcon
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper"
|
||||
buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10}
|
||||
onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())}
|
||||
onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1)}
|
||||
>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.onAdSearch}/>
|
||||
</div>
|
||||
{
|
||||
selectedKey === "statistics" ?
|
||||
<ReportList
|
||||
|
|
@ -307,11 +352,11 @@ class Index extends Component {
|
|||
reportName={reportName}
|
||||
onEdit={this.handleReqBtnsClick}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> : <EmployeeDetails
|
||||
/> : selectedKey === "detail" ? <EmployeeDetails
|
||||
ref={dom => this.employeeListRef = dom}
|
||||
keyword={keyword} year={year}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
/> : <SalaryDetails ref={dom => this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery}/>
|
||||
}
|
||||
<StatisticsModal {...modalReq} onCancel={this.handleCancel} form={reportForm} onClose={this.handleCancel}
|
||||
onAddDimension={this.handleAddDimension}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,13 @@
|
|||
}
|
||||
|
||||
.wea-new-top-req-content {
|
||||
background: #FFF;
|
||||
padding: 16px;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.reportRow {
|
||||
padding: 16px;
|
||||
|
||||
.gutter-row {
|
||||
margin-bottom: 16px;
|
||||
|
|
@ -32,6 +35,7 @@
|
|||
padding: 22px 0 22px 16px;
|
||||
border: 1px solid #e5e5e5;
|
||||
position: relative;
|
||||
background: #FFF;
|
||||
|
||||
.ant-ribbon {
|
||||
padding: 0 8px;
|
||||
|
|
@ -161,6 +165,56 @@
|
|||
margin-top: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
.searchAdvanced-condition-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchAdvanced-condition-container {
|
||||
background: #FFF;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-search-buttons {
|
||||
border-top: 1px solid #dadada;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.wea-advanced-searchsAd {
|
||||
height: 155px;
|
||||
overflow: hidden auto;
|
||||
|
||||
.formItem-delete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -40px;
|
||||
}
|
||||
|
||||
.searchAdvanced-commonSelect {
|
||||
border-top: 1px solid #ebebeb;
|
||||
margin: 0 25px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.custom-advance-largeSpacing {
|
||||
padding-left: 26px;
|
||||
|
||||
.link {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 12px 10px 12px 26px;
|
||||
color: #2db7f5
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.table-layout {
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zIndex0-statistics {
|
||||
|
|
|
|||
|
|
@ -173,10 +173,10 @@ class Index extends Component {
|
|||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
saveAcctemployee({ salaryAcctRecordId, employeeIds }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(541531, "添加成功!"));
|
||||
message.success(getLabel(26712, "添加成功!"));
|
||||
this.queryPCList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(111, "添加失败!"));
|
||||
message.error(errormsg || getLabel(545246, "添加失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog, link: this.handleExportTemp,
|
||||
visible: nextProps.visible, title: nextProps.title
|
||||
visible: nextProps.visible, title: nextProps.title, importResult: {}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class AttendanceCustomFieldsModal extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { attendanceStore: { initForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.handleResetForm();
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) initForm();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -62,12 +64,8 @@ class AttendanceCustomFieldsModal extends Component {
|
|||
<Button type="primary" onClick={this.handleSubmitFields}>保存</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 440, height: 202 }}
|
||||
buttons={buttons} hasScroll initLoadCss
|
||||
className="modalWrapper"
|
||||
>
|
||||
{getSearchs(form, conditions, 1)}
|
||||
<WeaDialog {...this.props} style={{ width: 480, height: 202 }} buttons={buttons} initLoadCss>
|
||||
<div className="form-dialog-layout"> {getSearchs(form, conditions, 1)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,14 +14,13 @@ import {
|
|||
getLedgerList,
|
||||
getSalaryCycleAndAttendCycle,
|
||||
importAttendQuoteData,
|
||||
previewAttendQuote,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
saveAttendanceFieldSetting,
|
||||
saveAttendanceFieldSettingAsDefault
|
||||
} from "../../../../apis/attendance";
|
||||
import ImportModal from "../../../../components/importModal";
|
||||
import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
import ImportFormOptions from "./importFormOptions";
|
||||
import ImportModal from "./importDialog";
|
||||
// import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
// import ImportFormOptions from "./importFormOptions";
|
||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||
import moment from "moment";
|
||||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||
|
|
@ -45,10 +44,7 @@ class AttendanceDataComp extends Component {
|
|||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
importData: {
|
||||
visiable: false, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
},
|
||||
importData: { visible: false, params: {} },
|
||||
importFormPayload: {
|
||||
salaryYearMonth: moment().format("YYYY-MM"), salarySobList: [],
|
||||
salarySobId: "", salaryCycle: "", attendCycle: ""
|
||||
|
|
@ -87,15 +83,24 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
getLedgerList = () => {
|
||||
getLedgerList = (importData) => {
|
||||
const { importFormPayload } = this.state;
|
||||
getLedgerList().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importFormPayload: {
|
||||
...importFormPayload,
|
||||
...importFormPayload, salarySobId: _.head(data).id,
|
||||
salarySobList: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||
}
|
||||
}, async () => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||
const payload = { salaryYearMonthStr: salaryYearMonth, salarySobId };
|
||||
const { data } = await getSalaryCycleAndAttendCycle(payload);
|
||||
this.setState({
|
||||
importData: { ...importData, params: { salaryYearMonth, salarySobId } },
|
||||
importFormPayload: { ...importFormPayload, ...data }
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -154,64 +159,12 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleImportAttendanceData = (importData) => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||
this.getLedgerList();
|
||||
this.setState({ importData: { ...importData, params: { salaryYearMonth, salarySobId } } });
|
||||
};
|
||||
setStep = step => this.setState({ importData: { ...this.state.importData, step } });
|
||||
handleFinish = () => {
|
||||
handleImportAttendanceData = (importData) => this.getLedgerList(importData);
|
||||
handleFinish = (isFresh) => {
|
||||
const { importData } = this.state;
|
||||
const { step } = importData;
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData, visiable: false, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
}
|
||||
});
|
||||
step === 2 && this.getAttendanceList();
|
||||
};
|
||||
handlePreviewImport = (params) => {
|
||||
const { importData } = this.state;
|
||||
previewAttendQuote(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { headers, list } = data;
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData,
|
||||
columns: _.map(headers, (it, dataIndex) => ({ title: it, dataIndex })),
|
||||
slideDataSource: _.map(list, item => {
|
||||
return _.reduce(item, (pre, cur, key) => (_.assign(pre, { [key]: cur })), {});
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleImport = (params) => {
|
||||
const { importData } = this.state;
|
||||
const { step } = importData;
|
||||
importAttendQuoteData(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData,
|
||||
step: step + 1,
|
||||
importResult: data
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleTemplateLinkClick = () => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salarySobId, salaryYearMonth } = importFormPayload;
|
||||
if (!salarySobId || !salaryYearMonth) {
|
||||
message.warning("请完善导入选项,再下载");
|
||||
return;
|
||||
}
|
||||
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
||||
importData: { ...importData, visible: false, params: {} }
|
||||
}, () => isFresh && this.getAttendanceList());
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -236,7 +189,7 @@ class AttendanceDataComp extends Component {
|
|||
onSelectItem={this.handleSelectItem}
|
||||
/>
|
||||
}
|
||||
});
|
||||
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, headset: false } }));
|
||||
};
|
||||
|
|
@ -392,46 +345,30 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
/>
|
||||
dataSource={dataSource} pagination={pagination} loading={loading.query}/>
|
||||
{/* 考勤引用导入 */}
|
||||
<ImportModal {...importData} setStep={this.setStep} onFinish={this.handleFinish}
|
||||
previewImport={this.handlePreviewImport} importFile={this.handleImport}
|
||||
templateLink={this.handleTemplateLinkClick} onCancel={this.handleFinish}
|
||||
headerSetCompoent={<HeaderSet
|
||||
loading={loading.headset}
|
||||
onSetClick={() => this.handleHeaderSettings({ sourceType: "IMPORT" })}/>}
|
||||
renderFormComponent={() => <ImportFormOptions
|
||||
{...importFormPayload}
|
||||
onChangeImportForm={this.handleChangeImportPayload}/>
|
||||
}
|
||||
<ImportModal {...importData} importFormPayload={importFormPayload} onCancel={this.handleFinish}
|
||||
onChangeImportForm={this.handleChangeImportPayload} onHeaderSettings={this.handleHeaderSettings}
|
||||
loading={loading.headset} previewUrl="/api/bs/hrmsalary/attendQuote/preview"
|
||||
importAttendQuoteData={importAttendQuoteData}
|
||||
/>
|
||||
{/* 表头设置 */}
|
||||
<SelectItemModal {...fieldSetPayload}
|
||||
onCancel={this.handleCloseSettings}
|
||||
onSearchItemSet={this.handleSearchItemSet}
|
||||
onShowOnlyChecked={this.handleShowOnlyChecked}
|
||||
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}
|
||||
/>
|
||||
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}/>
|
||||
{/* 考勤数据引用 */}
|
||||
<AttendanceRefrenceDataModal
|
||||
{...attendanceReferencePayload}
|
||||
onCancel={this.handleCloseQuoteModal}
|
||||
/>
|
||||
<AttendanceRefrenceDataModal {...attendanceReferencePayload} onCancel={this.handleCloseQuoteModal}/>
|
||||
{/* 考勤数据查看 */}
|
||||
<AttendanceDataViewSlide
|
||||
{...attendanceViewPayload}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onClose={() => this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: false,
|
||||
attendQuoteId: ""
|
||||
}
|
||||
})}
|
||||
/>
|
||||
<AttendanceDataViewSlide {...attendanceViewPayload} showOperateBtn={showOperateBtn}
|
||||
onClose={() => this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: false,
|
||||
attendQuoteId: ""
|
||||
}
|
||||
})}/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,26 +5,19 @@
|
|||
* Date: 2023/3/7
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaFormItem, WeaInput, WeaInputSearch, WeaSlideModal } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
import { viewAttendQuote } from "../../../../apis/attendance";
|
||||
import UnifiedTable from "../../../../components/UnifiedTable";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class AttendanceDataViewSlide extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
keyword: "",
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
pageInfo: {
|
||||
current: 1, pageSize: 10, total: 0
|
||||
}
|
||||
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -46,29 +39,12 @@ class AttendanceDataViewSlide extends Component {
|
|||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: o.dataIndex === "username" ? "left" : null }))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
renderCustomOperate = () => {
|
||||
const { keyword } = this.state;
|
||||
const { showOperateBtn } = this.props;
|
||||
return ([
|
||||
<div style={{ display: "inline-block" }}>
|
||||
{showOperateBtn && <Button type="primary" onClick={this.handleExportAttendQuote}>导出全部</Button>}
|
||||
<WeaInputSearch
|
||||
value={keyword}
|
||||
style={{ marginLeft: 10 }}
|
||||
placeholder="请输入姓名/部门/工号/手机号"
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
|
||||
/>
|
||||
</div>
|
||||
]);
|
||||
};
|
||||
handleExportAttendQuote = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
|
|
@ -83,7 +59,7 @@ class AttendanceDataViewSlide extends Component {
|
|||
|
||||
render() {
|
||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||
const { columns, dataSource, loading, pageInfo } = this.state;
|
||||
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
|
|
@ -101,45 +77,33 @@ class AttendanceDataViewSlide extends Component {
|
|||
}, () => this.viewAttendQuote({}, this.props));
|
||||
}
|
||||
};
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||
<WeaInputSearch
|
||||
value={keyword} placeholder={getLabel(543380, "请输入姓名/部门/工号/手机号")}
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
|
||||
/>
|
||||
];
|
||||
return (
|
||||
<WeaSlideModal
|
||||
{...extra}
|
||||
className="attendanceSlideWrapper"
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={80}
|
||||
measureX="%"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction="right"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle="考勤数据"
|
||||
editable={false}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={this.renderCustomOperate()}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<div>
|
||||
<WeaFormItem label="考勤周期" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} underline>
|
||||
<WeaInput value={salaryYearMonth} viewAttr={1}/>
|
||||
</WeaFormItem>
|
||||
<UnifiedTable
|
||||
rowKey="id"
|
||||
columns={_.map(columns, item => ({
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}> {text} </span>;
|
||||
}
|
||||
}))}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={columns.length * 180}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
<WeaSlideModal {...extra} className="attendanceSlideWrapper"
|
||||
top={0} height={100} width={800} measureT="%" measureX="px" measureY="%" direction="right"
|
||||
title={
|
||||
<WeaTop title={getLabel(525196, "考勤数据")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(1)}/>
|
||||
}
|
||||
content={
|
||||
<div className="attendance-slide-body">
|
||||
<div className="attendance-tb-tip">
|
||||
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 225px)` }}/>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ import { getSearchs } from "../../../../util";
|
|||
import {
|
||||
checkOperation,
|
||||
getAttendanceFieldSettingList,
|
||||
getLedgerList, returnToAttendanceFieldSettingDefault, saveAttendanceFieldSetting, saveAttendanceFieldSettingAsDefault,
|
||||
getLedgerList,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
saveAttendanceFieldSetting,
|
||||
saveAttendanceFieldSettingAsDefault,
|
||||
syncAttendanceRefer
|
||||
} from "../../../../apis/attendance";
|
||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||
|
|
@ -124,7 +127,7 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
onSelectItem={this.handleSelectItem}
|
||||
/>
|
||||
}
|
||||
});
|
||||
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||
}
|
||||
}).catch(() => this.setState({ headerSetLoading: false }));
|
||||
};
|
||||
|
|
@ -209,12 +212,10 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 440, height: 156 }}
|
||||
buttons={buttons} hasScroll initLoadCss
|
||||
className="modalWrapper"
|
||||
>
|
||||
{getSearchs(refenceform, condition, 1)}
|
||||
<WeaDialog {...this.props} style={{ width: 480, height: 174 }} buttons={buttons} initLoadCss>
|
||||
<div className="form-dialog-layout">
|
||||
{getSearchs(refenceform, condition, 1)}
|
||||
</div>
|
||||
{/* 表头设置 */}
|
||||
<SelectItemModal {...headerSetPayload}
|
||||
onCancel={this.handleCloseSettings}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:考勤数据-导入
|
||||
* Description:
|
||||
* Date: 2024/3/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Modal } from "antd";
|
||||
import ImportDialog from "../../../../components/importDialog";
|
||||
import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
import ImportFormOptions from "./importFormOptions";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hasData: false,
|
||||
importDialog: {
|
||||
nextloading: false, link: null, importResult: {}, imageId: "", params: {},
|
||||
previewUrl: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { hasData, importDialog } = this.state;
|
||||
const { params, previewUrl } = nextProps;
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, importResult: {}, link: this.handleExportTemp,
|
||||
params, previewUrl, extraPreview: params
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
handleExportTemp = () => {
|
||||
const { hasData } = this.state;
|
||||
const { importFormPayload } = this.props;
|
||||
const { salarySobId, salaryYearMonth } = importFormPayload;
|
||||
if (!salarySobId || !salaryYearMonth) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state, { importAttendQuoteData, params } = this.props;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
importAttendQuoteData({ ...payload, ...params }).then(({ data, status }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog } = this.state;
|
||||
const {
|
||||
visible, onCancel, importFormPayload, onChangeImportForm, onHeaderSettings, loading
|
||||
} = this.props;
|
||||
return (
|
||||
<ImportDialog
|
||||
visible={visible} onCancel={onCancel} {...importDialog} title={getLabel(24023, "数据导入")}
|
||||
onResetImportResult={() => this.setState({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" }
|
||||
})}
|
||||
importParams={<ImportFormOptions {...importFormPayload} onChangeImportForm={onChangeImportForm}/>}
|
||||
exportDataDom={<HeaderSet loading={loading} onSetClick={() => onHeaderSettings({ sourceType: "IMPORT" })}/>}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -40,8 +40,9 @@ class ImportFormOptions extends Component {
|
|||
label: "薪资账套",
|
||||
value: salarySobId || "",
|
||||
onChange: this.screenChange,
|
||||
options: [{ key: "", showname: "" }, ...salarySobList],
|
||||
key: "salarySobId"
|
||||
options: salarySobList,
|
||||
key: "salarySobId",
|
||||
viewAttr: 3
|
||||
})
|
||||
},
|
||||
{ com: Input("薪资周期", salaryCycle) },
|
||||
|
|
|
|||
|
|
@ -18,15 +18,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
.attendanceFormWrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.attendanceSlideWrapper {
|
||||
.wea-slide-modal-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
|
||||
.wea-new-top > div:last-child {
|
||||
padding-right: 50px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rodal-close {
|
||||
|
|
@ -34,6 +38,28 @@
|
|||
top: 10px !important;
|
||||
}
|
||||
|
||||
.attendance-slide-body {
|
||||
background: #f6f6f6;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
|
||||
.attendance-tb-tip {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 4px 0;
|
||||
min-height: 32px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px) {
|
||||
|
|
|
|||
|
|
@ -57,12 +57,7 @@ class Index extends Component {
|
|||
};
|
||||
handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) }));
|
||||
handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds();
|
||||
handleImportAttendanceData = () => {
|
||||
this.attendanceTableRef.handleImportAttendanceData({
|
||||
visiable: true, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
});
|
||||
};
|
||||
handleImportAttendanceData = () => this.attendanceTableRef.handleImportAttendanceData({ visible: true, params: {} });
|
||||
handleQuoteAttendanceData = () => {
|
||||
this.attendanceTableRef.handleQuoteAttendanceData({
|
||||
visible: true, title: "引用考勤数据"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
flex-direction: column;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 8px 16px;
|
||||
padding: 8px 16px 0 16px;
|
||||
|
||||
.to {
|
||||
padding: 0 10px
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class ImportFormCom extends Component {
|
|||
value: taxAgentId || "",
|
||||
onChange: this.screenChange,
|
||||
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
|
||||
key: "taxAgentId"
|
||||
key: "taxAgentId", viewAttr: 3
|
||||
})
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import {
|
|||
getAddUpDeduction,
|
||||
getCumDeductSaCondition,
|
||||
importCumDeductParam,
|
||||
importCumDeductPreview,
|
||||
onlineFeedback
|
||||
} from "../../../apis/cumDeduct";
|
||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
|
@ -28,7 +27,7 @@ import DataTables from "../dataTables";
|
|||
import AddItems from "../addItems";
|
||||
import ImportFormCom from "./components/importFormCom";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { dataCollectCondition, modalColumns } from "./columns";
|
||||
import { dataCollectCondition } from "./columns";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import Layout from "../layout";
|
||||
|
|
@ -62,10 +61,9 @@ class Index extends Component {
|
|||
taxAgentId: ""
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/addUpDeduction/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/addUpDeduction/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
|
|
@ -214,41 +212,6 @@ class Index extends Component {
|
|||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
importCumDeductParam(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handlePreviewImport = (params) => {
|
||||
importCumDeductPreview(params).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { preview = [] } = data;
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, slideDataSource: preview }
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "预览失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 数据采集-信息保存
|
||||
|
|
@ -556,12 +519,6 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
|
||||
onlineFeedback = () => {
|
||||
this.setState({ feedbackLoading: true });
|
||||
|
|
@ -592,11 +549,9 @@ class Index extends Component {
|
|||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
onCancel={this.handleCloseImport} onImportFile={importCumDeductParam}
|
||||
importPayload={importPayload} detailOptBtns={this.getDetailOptBtns()}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
columns={modalColumns}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
@ -635,9 +590,10 @@ export const DataCollectionDatePicker = (props) => {
|
|||
</WeaFormItem>;
|
||||
};
|
||||
export const DataCollectionSelect = (props) => {
|
||||
const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14 } = props;
|
||||
const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14, viewAttr = 2 } = props;
|
||||
return <WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
|
||||
<WeaSelect value={value} onChange={(val) => onChange({ key, value: val })} options={options}/>
|
||||
<WeaSelect value={value} onChange={(val) => onChange({ key, value: val })} options={options}
|
||||
viewAttr={viewAttr}/>
|
||||
</WeaFormItem>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ import {
|
|||
editAddUpSituation,
|
||||
getAddUpSituation,
|
||||
getCumSituationSaCondition,
|
||||
importCumSituationParam,
|
||||
importCumSituationPreview
|
||||
importCumSituationParam
|
||||
} from "../../../apis/cumSituation";
|
||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
|
|
@ -28,7 +27,6 @@ import moment from "moment";
|
|||
import { dataCollectCondition, taxOptions } from "./columns";
|
||||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { situationModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
|
||||
|
|
@ -59,10 +57,9 @@ class Index extends Component {
|
|||
declareMonth: moment(new Date()).format("YYYY-MM")
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/addUpSituation/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/addUpSituation/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
|
|
@ -138,46 +135,6 @@ class Index extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
const { declareMonth, ...extra } = params;
|
||||
const payload = {
|
||||
taxYearMonth: declareMonth,
|
||||
...extra
|
||||
};
|
||||
importCumSituationParam(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handlePreviewImport = (params) => {
|
||||
importCumSituationPreview(params).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { preview = [] } = data;
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, slideDataSource: preview }
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "预览失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:列表操作
|
||||
|
|
@ -522,12 +479,6 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:详情页面-操作按钮
|
||||
|
|
@ -592,10 +543,9 @@ class Index extends Component {
|
|||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupsituation"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
onCancel={this.handleCloseImport} onImportFile={importCumSituationParam}
|
||||
detailOptBtns={this.getDetailOptBtns()}
|
||||
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
||||
onImportFile={this.handleImportFile} columns={situationModalColumns}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
>
|
||||
<SalaryCumDeductChooseTaxPeriodDialog
|
||||
|
|
|
|||
|
|
@ -35,7 +35,10 @@ class DataTables extends Component {
|
|||
getTableDate = (extraPayload = {}) => {
|
||||
const { loading, pageInfo } = this.state;
|
||||
const { url, payload } = this.props;
|
||||
const module = { ...pageInfo, url, ...payload, ...extraPayload };
|
||||
const module = {
|
||||
...pageInfo, url, ...payload, ...extraPayload,
|
||||
departmentIds: extraPayload.departmentIds ? extraPayload.departmentIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
getTableDate(module).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:数据采集四个基础项-导入
|
||||
* Description:
|
||||
* Date: 2024/3/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||
import ImportDialog from "../../components/importDialog";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hasData: false,
|
||||
importDialog: {
|
||||
nextloading: false, link: "", importResult: {}, imageId: "", params: {},
|
||||
previewUrl: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { hasData, importDialog } = this.state;
|
||||
const { templateLink, importOpts, importResult, previewUrl } = nextProps;
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData })}`,
|
||||
importResult, params: importOpts, previewUrl, extraPreview: importOpts
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
handleExportTemp = () => {
|
||||
const { hasData } = this.state;
|
||||
const { templateLink, importOpts } = this.props;
|
||||
if (!Object.values(importOpts).every(o => !!o)) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = { ...importOpts, hasData };
|
||||
window.open(`${templateLink}?${convertToUrlString(payload)}`, "_blank");
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state, { onImportFile, importOpts } = this.props;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
onImportFile({ ...payload, ...importOpts }).then(({ data, status }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog, hasData } = this.state;
|
||||
const { visible, onCancel, importParams, templateLink, importOpts } = this.props;
|
||||
return (
|
||||
<ImportDialog
|
||||
visible={visible} onCancel={onCancel} {...importDialog} title={getLabel(24023, "数据导入")}
|
||||
importParams={importParams} onResetImportResult={() => this.setState({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" }
|
||||
})}
|
||||
exportDataDom={
|
||||
<WeaCheckbox
|
||||
value={hasData ? "1" : "0"}
|
||||
content={getLabel(543208, "导出现有数据")}
|
||||
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||
onChange={val => this.setState({ hasData: val === "1" }, () => {
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog,
|
||||
link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData: this.state.hasData })}`
|
||||
}
|
||||
});
|
||||
})}
|
||||
/>
|
||||
}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -8,11 +8,11 @@ import React, { Component } from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import ImportModal from "../../components/importModal";
|
||||
import ImportModal from "./importDialog";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import { getSearchs } from "../../util";
|
||||
import "./index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -78,14 +78,13 @@ class Layout extends Component {
|
|||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||
slidePayload, onClose, onSave, slideLoading, form, condition,
|
||||
onAdSearch, onCancel, importPayload, onImportSetStep, onImportFile,
|
||||
onPreviewImport, detailOptBtns, columns, tabBtns = [], logFunction, onClearTargrtid
|
||||
slidePayload, onClose, onSave, slideLoading, form, condition, onImportFile,
|
||||
onAdSearch, onCancel, importPayload, detailOptBtns, tabBtns = [], logFunction, onClearTargrtid
|
||||
} = this.props;
|
||||
const { visible, title: subtitle, children: slideChildren } = slidePayload;
|
||||
const {
|
||||
visible: importVisiable, step, importFormComponent, importOpts,
|
||||
importResult, slideDataSource, templateLink
|
||||
visible: importVisiable, importFormComponent, importOpts,
|
||||
importResult, templateLink, previewUrl
|
||||
} = importPayload;
|
||||
return (
|
||||
<div className="layoutWrapper">
|
||||
|
|
@ -116,21 +115,26 @@ class Layout extends Component {
|
|||
<WeaNewScroll height="100%">{children}</WeaNewScroll>
|
||||
{/*导入弹框*/}
|
||||
<ImportModal
|
||||
needimportSelected //下载模板需要带上导入所选项
|
||||
columns={columns}
|
||||
params={importOpts}
|
||||
step={step}
|
||||
setStep={onImportSetStep}
|
||||
importResult={importResult}
|
||||
onFinish={() => onCancel(true)}
|
||||
slideDataSource={slideDataSource}
|
||||
previewImport={onPreviewImport}
|
||||
importFile={onImportFile}
|
||||
templateLink={templateLink}
|
||||
renderFormComponent={() => importFormComponent}
|
||||
visiable={importVisiable}
|
||||
onCancel={onCancel}
|
||||
visible={importVisiable} onCancel={onCancel} importParams={importFormComponent}
|
||||
importOpts={importOpts} importResult={importResult} templateLink={templateLink}
|
||||
previewUrl={previewUrl} onImportFile={onImportFile}
|
||||
/>
|
||||
{/*<ImportModal*/}
|
||||
{/* needimportSelected //下载模板需要带上导入所选项*/}
|
||||
{/* columns={columns}*/}
|
||||
{/* params={importOpts}*/}
|
||||
{/* step={step}*/}
|
||||
{/* setStep={onImportSetStep}*/}
|
||||
{/* importResult={importResult}*/}
|
||||
{/* onFinish={() => onCancel(true)}*/}
|
||||
{/* slideDataSource={slideDataSource}*/}
|
||||
{/* previewImport={onPreviewImport}*/}
|
||||
{/* importFile={onImportFile}*/}
|
||||
{/* templateLink={templateLink}*/}
|
||||
{/* renderFormComponent={() => importFormComponent}*/}
|
||||
{/* visiable={importVisiable}*/}
|
||||
{/* onCancel={onCancel}*/}
|
||||
{/*/>*/}
|
||||
{/* 新增-编辑-详情弹框 */}
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import { DataCollectionDatePicker, DataCollectionSelect } from "../cumDeduct";
|
|||
import { dataCollectCondition } from "./columns";
|
||||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { otherModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -57,10 +56,9 @@ class Index extends Component {
|
|||
declareMonth: moment(new Date()).format("YYYY-MM")
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/otherDeduction/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/otherDeduction/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
|
|
@ -146,22 +144,6 @@ class Index extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
importOtherDeductionParam(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
|
|
@ -479,12 +461,6 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:详情页面-操作按钮
|
||||
|
|
@ -549,11 +525,9 @@ class Index extends Component {
|
|||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType} logFunction="otherdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
onCancel={this.handleCloseImport} importPayload={importPayload}
|
||||
detailOptBtns={this.getDetailOptBtns()} onImportFile={importOtherDeductionParam}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
columns={otherModalColumns}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ import {
|
|||
specialAddDeductionDeleteAllData,
|
||||
specialAddDeductionDeleteSelectData,
|
||||
specialAddDeductionEditData,
|
||||
specialAddDeductionImportData,
|
||||
specialAddDeductionPreview
|
||||
specialAddDeductionImportData
|
||||
} from "../../../apis/special";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { DataCollectionSelect } from "../cumDeduct";
|
||||
|
|
@ -20,7 +19,6 @@ import ImportFormCom from "../cumDeduct/components/importFormCom";
|
|||
import { condition } from "./components/condition";
|
||||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { specialModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -47,10 +45,9 @@ class Index extends Component {
|
|||
taxAgentId: ""
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/specialAddDeduction/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/specialAddDeduction/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
|
|
@ -101,41 +98,6 @@ class Index extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
specialAddDeductionImportData(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handlePreviewImport = (params) => {
|
||||
specialAddDeductionPreview(params).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { preview = [] } = data;
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, slideDataSource: preview }
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "预览失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 高级搜素框-表单项
|
||||
|
|
@ -439,12 +401,6 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
||||
|
|
@ -460,11 +416,9 @@ class Index extends Component {
|
|||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType} logFunction="specialAddDeduction"
|
||||
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={[]}
|
||||
onCancel={this.handleCloseImport} detailOptBtns={[]}
|
||||
importPayload={importPayload} onImportFile={specialAddDeductionImportData}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
columns={specialModalColumns}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
|
|||
|
|
@ -87,9 +87,14 @@ export default class PayrollDetail extends React.Component {
|
|||
const { child, ...extraParams } = extra;
|
||||
const salarySendId = getQueryString("id");
|
||||
const { payrollStore } = this.props;
|
||||
const { detailListConditionForm: form } = payrollStore;
|
||||
const payload = { salarySendId, ...pageInfo, ...extraParams, ...form.getFormParams() };
|
||||
const { detailListConditionForm: form, setDetailListShowSearchAd } = payrollStore;
|
||||
const payload = {
|
||||
salarySendId, ...pageInfo, ...extraParams, ...form.getFormParams(),
|
||||
departmentIds: form.getFormParams().departmentIds ? form.getFormParams().departmentIds.split(",") : [],
|
||||
subCompanyIds: form.getFormParams().subCompanyIds ? form.getFormParams().subCompanyIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
setDetailListShowSearchAd(false)
|
||||
getPayrollDetailList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ class TemplateBaseSettings extends Component {
|
|||
})}/>
|
||||
<span>{getLabel(111, "分钟后无法查看工资单")}</span>
|
||||
<WeaHelpfulTip
|
||||
title={getLabel(111, "空代表不控制,0代表只能查看一次工资单!")}
|
||||
title={getLabel(111, "空代表不控制,0代表只能查看一次工资单!设置后对所有工资单(包含已发工资单)立即生效!")}
|
||||
style={{ marginLeft: 10 }}
|
||||
placement="top"/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Index extends Component {
|
|||
if (isExtEmp) payload = { ...payload, extSalaryArchiveList: true };
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog, extraPreview,
|
||||
...this.state.importDialog, extraPreview, importResult: {},
|
||||
link: `/api/bs/hrmsalary/salaryArchive/downloadTemplate?${convertToUrlString(payload)}`
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class Index extends Component {
|
|||
if (it === "ackFeedbackStatus" || it === "feedbackStatus") {
|
||||
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
|
||||
} else {
|
||||
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
|
||||
payrollTempFeedbackForm.updateFields({ [it]: !_.isEmpty(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -151,6 +151,19 @@ export const condition = [
|
|||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
checkbox: false,
|
||||
checkboxValue: false,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["status"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(111, "人事状态"),
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "RANGEPICKER",
|
||||
|
|
|
|||
|
|
@ -62,6 +62,13 @@
|
|||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header-custom {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.shareDialogWrapper {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@
|
|||
* Date: 2023/6/8
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { Spin } from "antd";
|
||||
import { toJS } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import * as API from "../../../apis/payrollFiles";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { Button, Spin } from "antd";
|
||||
import { toJS } from "mobx";
|
||||
import "./index.less";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
|
|
@ -103,13 +104,23 @@ class PovitpivotChartModal extends Component {
|
|||
showSum: false, pageInfo
|
||||
});
|
||||
};
|
||||
exportDataPerspective = () => {
|
||||
WeaLoadingGlobal.start();
|
||||
const { id, dimensionId, dimensionValue, isShare } = this.props;
|
||||
const promise = API.exportDataPerspective({ id, dimensionId, dimensionValue, isShare });
|
||||
WeaLoadingGlobal.destroy();
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
const { payrollFilesStore: { pivotTableStore } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
title={getLabel(111, "数据透视")} scalable className="pivot-wrapper" initLoadCss
|
||||
title={<div className="header-custom">
|
||||
<span>{getLabel(111, "数据透视")}</span>
|
||||
<Button type="primary" onClick={this.exportDataPerspective}>{getLabel(17416, "导出")}</Button>
|
||||
</div>}
|
||||
scalable className="pivot-wrapper" initLoadCss
|
||||
visible={this.props.visible} style={{ width: "80vw", height: "80vh" }}
|
||||
buttons={[]} onCancel={this.props.onCancel}>
|
||||
<Spin spinning={loading}>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
}
|
||||
|
||||
getTaxAgentSelectList = async (props) => {
|
||||
const { data: salarySobList } = await getSalarysobListAll();
|
||||
const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]);
|
||||
getTaxAgentSelectList(true).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const conditions = _.map(condition, item => {
|
||||
|
|
@ -85,7 +85,12 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
} else if (getKey(child) === "salarySob") {
|
||||
return {
|
||||
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||
options: _.map(salarySobList, o => ({ key: String(o.id), showname: o.name }))
|
||||
options: _.map(salarySobList.data, o => ({ key: String(o.id), showname: o.name }))
|
||||
};
|
||||
} else if (getKey(child) === "status") {
|
||||
return {
|
||||
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||
options: _.map(empStatusList.data, o => ({ key: o.value.toString(), showname: o.defaultLabel }))
|
||||
};
|
||||
}
|
||||
return { ...child, viewAttr: props.isShare ? 1 : child.viewAttr };
|
||||
|
|
@ -131,8 +136,9 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
const { salaryMonth, timeType, dataSource } = this.state;
|
||||
const { form, id, dimension, onClose } = this.props;
|
||||
const [salaryStartMonth, salaryEndMonth] = salaryMonth;
|
||||
const { department, employee, position, subCompany, taxAgent, salarySob, ...extra } = form.getFormDatas();
|
||||
const { department, employee, position, subCompany, taxAgent, salarySob, status, ...extra } = form.getFormDatas();
|
||||
const { value, valueSpan } = taxAgent;
|
||||
const { value: statusVal, valueSpan: statusValSpan } = status;
|
||||
const { value: sobValue, valueSpan: sobValueSpan } = salarySob;
|
||||
if (!salaryEndMonth || !salaryStartMonth) {
|
||||
this.refs.weaError.showError();
|
||||
|
|
@ -146,6 +152,10 @@ class StatisticalMicroSettingsSlide extends Component {
|
|||
// position: _.map(position.valueObj, it => ({ id: it.id, name: it.name })),
|
||||
subCompany: _.map(subCompany.valueObj, it => ({ id: it.id, name: it.name })),
|
||||
taxAgent: value ? _.map(value.split(","), (it, idx) => ({ id: it, name: valueSpan.split(",")[idx] })) : [],
|
||||
status: statusVal ? _.map(statusVal.split(","), (it, idx) => ({
|
||||
id: it,
|
||||
name: statusValSpan.split(",")[idx]
|
||||
})) : [],
|
||||
salarySob: sobValue ? _.map(sobValue.split(","), (it, idx) => ({
|
||||
id: it,
|
||||
name: sobValueSpan.split(",")[idx]
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ class RuleConfig extends Component {
|
|||
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
|
||||
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
|
||||
return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
|
||||
} else if (getKey(o) === "taxDeclarationFunction") {
|
||||
return {
|
||||
...o,
|
||||
viewAttr: (_.isNil(sysinfo.taxDeclarationFunction) || sysinfo.taxDeclarationFunction !== "0") ? 2 : 1
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
|
|
@ -189,6 +194,7 @@ class RuleConfig extends Component {
|
|||
API.operateTaxDeclarationFunction({ operateTaxDeclaration }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
const promise = this.init();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,10 +169,12 @@
|
|||
}
|
||||
|
||||
.adjustItem-layout {
|
||||
.ant-table-fixed td {
|
||||
.ant-table-fixed-left td > span:last-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component {
|
|||
salaryArchiveItemDetail: {
|
||||
...salaryArchiveItemDetail,
|
||||
list: _.map(salaryArchiveItemDetail.list, o => ({
|
||||
...o, dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === o.salaryItem).dataType
|
||||
...o, dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === o.salaryItem).dataType,
|
||||
pattern: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === o.salaryItem).pattern
|
||||
}))
|
||||
},
|
||||
conditions: _.map(adjCondition, item => {
|
||||
|
|
@ -108,7 +109,8 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component {
|
|||
if (o.salaryItem === salaryItemId) {
|
||||
return {
|
||||
...o, salaryBefore: data,
|
||||
dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === salaryItemId).dataType
|
||||
dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === salaryItemId).dataType,
|
||||
pattern: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === salaryItemId).pattern
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
|
|
@ -238,7 +240,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component {
|
|||
...o, render: (__, record) => {
|
||||
if (record.dataType === "number") {
|
||||
return <WeaInputNumber
|
||||
precision={3} viewAttr={3} value={record["adjustAfter"]}
|
||||
precision={record.pattern} viewAttr={3} value={record["adjustAfter"]}
|
||||
onChange={v => this.handleChangeAdjustAfter(record, v)}
|
||||
/>;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { WeaLocaleProvider, WeaTable } from "ecCom";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { deleteSalaryItem } from "../../apis/archive";
|
||||
import SalaryArchiveEditAdjLogRecord from "./salaryArchiveEditAdjLogRecord";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("salaryFileStore")
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ class MakeupDifference extends Component {
|
|||
const { importDiffModal, addPersonalDialog } = this.state;
|
||||
const name = this.regTopRef.state.name;
|
||||
const workcode = this.regTopRef.state.workcode;
|
||||
const departmentIds = this.regTopRef.state.departmentIds ? this.regTopRef.state.departmentIds.split(",") : [];
|
||||
const subCompanyIds = this.regTopRef.state.subCompanyIds ? this.regTopRef.state.subCompanyIds.split(",") : [];
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
switch (key) {
|
||||
|
|
@ -85,7 +87,7 @@ class MakeupDifference extends Component {
|
|||
window.open(url, "_self");
|
||||
break;
|
||||
case "search":
|
||||
this.diffListRef.recessionList({ userName: name, workcode, current: 1 });
|
||||
this.diffListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 });
|
||||
break;
|
||||
case "add":
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
* LastEditTime: 2022-06-29 09:53:36
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, Icon, message, Modal, Spin, Tooltip } from "antd";
|
||||
import { Button, Col, Icon, message, Modal, Row, Spin, Tooltip } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaFormItem, WeaInput, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import { calcPageNo } from "../../../../util";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import ProgressModal from "../../../../components/progressModal";
|
||||
|
|
@ -19,6 +19,7 @@ import SupplementarySlide from "./supplementarySlide";
|
|||
import _ from "lodash";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
export default class NormalIndex extends Component {
|
||||
|
|
@ -44,6 +45,8 @@ export default class NormalIndex extends Component {
|
|||
},
|
||||
searchValue: "",
|
||||
workcode: "",
|
||||
departmentIds: "",
|
||||
subCompanyIds: "",
|
||||
progressVisible: false,
|
||||
progress: 0,
|
||||
fieldData: {}, //选中的表单头信息
|
||||
|
|
@ -149,14 +152,18 @@ export default class NormalIndex extends Component {
|
|||
current: 1,
|
||||
paymentOrganization,
|
||||
userName: this.state.searchValue,
|
||||
workcode: this.state.workcode
|
||||
workcode: this.state.workcode,
|
||||
departmentIds: this.state.departmentIds ? this.state.departmentIds.split(",") : [],
|
||||
subCompanyIds: this.state.subCompanyIds ? this.state.subCompanyIds.split(",") : []
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current: 1,
|
||||
paymentOrganization,
|
||||
userName: this.state.searchValue,
|
||||
workcode: this.state.workcode
|
||||
workcode: this.state.workcode,
|
||||
departmentIds: this.state.departmentIds ? this.state.departmentIds.split(",") : [],
|
||||
subCompanyIds: this.state.subCompanyIds ? this.state.subCompanyIds.split(",") : []
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -445,12 +452,24 @@ export default class NormalIndex extends Component {
|
|||
};
|
||||
getSearchs = () => {
|
||||
return <WeaSearchGroup needTigger showGroup title="其他条件">
|
||||
<WeaFormItem label="工号" labelCol={{ span: 4 }} wrapperCol={{ span: 8 }}>
|
||||
<WeaInput
|
||||
value={this.state.workcode}
|
||||
onChange={v => this.setState({ workcode: v })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<Row>
|
||||
<Col span={12}><WeaFormItem label="工号" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInput
|
||||
value={this.state.workcode}
|
||||
onChange={v => this.setState({ workcode: v })}
|
||||
/>
|
||||
</WeaFormItem></Col>
|
||||
<Col span={12}><WeaFormItem label={getLabel(27511, "部门")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
isSingle={false} value={this.state.departmentIds} type={57}
|
||||
onChange={v => this.setState({ departmentIds: v })}/>
|
||||
</WeaFormItem></Col>
|
||||
<Col span={12}><WeaFormItem label={getLabel(33553, "分部")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
isSingle={false} value={this.state.subCompanyIds} type={164}
|
||||
onChange={v => this.setState({ subCompanyIds: v })}/>
|
||||
</WeaFormItem></Col>
|
||||
</Row>
|
||||
</WeaSearchGroup>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { Button } from "antd";
|
||||
import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import { Button, Col, Row } from "antd";
|
||||
import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -11,6 +11,8 @@ class RegTop extends Component {
|
|||
this.state = {
|
||||
name: "",
|
||||
workcode: "",
|
||||
departmentIds: "",
|
||||
subCompanyIds: "",
|
||||
showSearchAd: false
|
||||
};
|
||||
}
|
||||
|
|
@ -56,12 +58,24 @@ class RegTop extends Component {
|
|||
};
|
||||
getSearchs = () => {
|
||||
return <WeaSearchGroup needTigger showGroup title="其他条件">
|
||||
<WeaFormItem label="工号" labelCol={{ span: 4 }} wrapperCol={{ span: 8 }}>
|
||||
<WeaInput
|
||||
value={this.state.workcode}
|
||||
onChange={v => this.setState({ workcode: v })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<Row>
|
||||
<Col span={12}><WeaFormItem label="工号" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInput
|
||||
value={this.state.workcode}
|
||||
onChange={v => this.setState({ workcode: v })}
|
||||
/>
|
||||
</WeaFormItem></Col>
|
||||
<Col span={12}><WeaFormItem label={getLabel(27511, "部门")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
isSingle={false} value={this.state.departmentIds} type={57}
|
||||
onChange={v => this.setState({ departmentIds: v })}/>
|
||||
</WeaFormItem></Col>
|
||||
<Col span={12}><WeaFormItem label={getLabel(33553, "分部")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
isSingle={false} value={this.state.subCompanyIds} type={164}
|
||||
onChange={v => this.setState({ subCompanyIds: v })}/>
|
||||
</WeaFormItem></Col>
|
||||
</Row>
|
||||
</WeaSearchGroup>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { message, Modal } from "antd";
|
||||
import { WeaNewScroll } from "ecCom";
|
||||
import RegTop from "./regTop";
|
||||
import RegList from "./regList";
|
||||
import RegAddEmployee from "./regAddEmployee";
|
||||
|
|
@ -75,6 +74,8 @@ class Regression extends Component {
|
|||
const { returnPersonModal } = this.state;
|
||||
const name = this.regTopRef.state.name;
|
||||
const workcode = this.regTopRef.state.workcode;
|
||||
const departmentIds = this.regTopRef.state.departmentIds ? this.regTopRef.state.departmentIds.split(",") : [];
|
||||
const subCompanyIds = this.regTopRef.state.subCompanyIds ? this.regTopRef.state.subCompanyIds.split(",") : [];
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const creator = Number(getQueryString("creator"));
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
|
|
@ -98,7 +99,7 @@ class Regression extends Component {
|
|||
window.open(url, "_self");
|
||||
break;
|
||||
case "search":
|
||||
this.regListRef.recessionList({ userName: name, workcode, current: 1 });
|
||||
this.regListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -136,23 +137,23 @@ class Regression extends Component {
|
|||
/>
|
||||
<div className="tableWrapper">
|
||||
{/*<WeaNewScroll height="100%">*/}
|
||||
<RegList
|
||||
type="regression"
|
||||
ref={dom => this.regListRef = dom}
|
||||
visible={returnPersonModal.visible}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
onEdit={this.handleEdit}
|
||||
/>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
||||
{/* 弹框 */}
|
||||
<RegAddEmployee
|
||||
ref={dom => this.regEmmployeeRef = dom}
|
||||
{...returnPersonModal}
|
||||
loading={loading}
|
||||
onCancel={this.handleCloseModal}
|
||||
onSave={this.handleSave}
|
||||
/>
|
||||
<RegList
|
||||
type="regression"
|
||||
ref={dom => this.regListRef = dom}
|
||||
visible={returnPersonModal.visible}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
onEdit={this.handleEdit}
|
||||
/>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
||||
{/* 弹框 */}
|
||||
<RegAddEmployee
|
||||
ref={dom => this.regEmmployeeRef = dom}
|
||||
{...returnPersonModal}
|
||||
loading={loading}
|
||||
onCancel={this.handleCloseModal}
|
||||
onSave={this.handleSave}
|
||||
/>
|
||||
{/*</WeaNewScroll>*/}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class StandingBookCalcImportDialog extends Component {
|
|||
const { data } = await API[fieldUrl]();
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog, link: this.handleExportTemp, title: getLabel(24023, "数据导入")
|
||||
...this.state.importDialog, importResult: {}, link: this.handleExportTemp, title: getLabel(24023, "数据导入")
|
||||
},
|
||||
headerFieldsDialog: {
|
||||
...this.state.headerFieldsDialog, itemsByGroup: data,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class Index extends Component {
|
|||
};
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog,
|
||||
...this.state.importDialog, importResult: {},
|
||||
link: `/api/bs/hrmsalary/scheme/template/export?${convertToUrlString(payload)}`
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -825,7 +825,7 @@ const BenefitBaseComponent = (props) => {
|
|||
customComponent={<div className="welfare-same-box">
|
||||
<span>{getLabel(543195, "各项福利基数一致")}</span>
|
||||
<WeaInputNumber style={{ width: 100 }} onBlur={v => onSameChange(items, v)}
|
||||
disabled={runStatuses === "4,5" || !showOperateBtn}/>
|
||||
disabled={runStatuses === "4,5" || !showOperateBtn} precision={2}/>
|
||||
</div>}
|
||||
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
|
||||
/>;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,190 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 补算
|
||||
* Description:
|
||||
* Date: 2024/3/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, message } from "antd";
|
||||
import { WeaBrowser, WeaError, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
|
||||
import { supplementAcctRecord } from "../../apis";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
type: "sob", salaryItemIds: "", salarySobIds: "",
|
||||
salaryAcctRecordIds: "", loading: false
|
||||
};
|
||||
}
|
||||
|
||||
handleChangeItems = (key, value) => {
|
||||
this.setState({ [key]: value });
|
||||
};
|
||||
handleSubmit = () => {
|
||||
const { salaryItemIds, salarySobIds, salaryAcctRecordIds, type } = this.state;
|
||||
if (!salaryItemIds && !salarySobIds && type === "sob") {
|
||||
this.refs.salaryItemError.showError();
|
||||
this.refs.salarySobError.showError();
|
||||
return;
|
||||
}
|
||||
if (!salaryItemIds && !salaryAcctRecordIds && type === "record") {
|
||||
this.refs.salaryItemError.showError();
|
||||
this.refs.salaryPigeonholeError.showError();
|
||||
return;
|
||||
}
|
||||
if (!salaryItemIds) {
|
||||
this.refs.salaryItemError.showError();
|
||||
return;
|
||||
}
|
||||
if (!salaryAcctRecordIds && type === "record") {
|
||||
this.refs.salaryPigeonholeError.showError();
|
||||
return;
|
||||
}
|
||||
if (!salarySobIds && type === "sob") {
|
||||
this.refs.salarySobError.showError();
|
||||
return;
|
||||
}
|
||||
this.setState({ loading: true });
|
||||
supplementAcctRecord({
|
||||
type,
|
||||
salaryAcctRecordIds: salaryAcctRecordIds ? salaryAcctRecordIds.split(",") : [],
|
||||
salarySobIds: salarySobIds ? salarySobIds.split(",") : [],
|
||||
salaryItemIds: salaryItemIds ? salaryItemIds.split(",") : []
|
||||
}).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "补算成功"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(111, "补算失败"));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { type, salaryItemIds, salarySobIds, salaryAcctRecordIds, loading } = this.state;
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(111, "补算")} iconBgcolor="#F14A2D" showDropIcon={false}
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.handleSubmit} loading={loading}>{getLabel(111, "补算")}</Button>
|
||||
]}
|
||||
>
|
||||
<div className="retroactiveWrapper">
|
||||
<WeaSearchGroup showGroup needTigger={false} center>
|
||||
<WeaFormItem label={getLabel(111, "补算维度")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="typeError" error={getLabel(111, "此项必填")}>
|
||||
<WeaSelect
|
||||
options={[
|
||||
{ key: "sob", showname: "按薪资账套维度" },
|
||||
{ key: "record", showname: "按核算记录维度" }
|
||||
]}
|
||||
detailtype={3} value={type} viewAttr={3}
|
||||
onChange={type => this.setState({ type }, () => {
|
||||
this.setState({ salarySobIds: "", salaryAcctRecordIds: "", salaryItemIds: "" });
|
||||
})}
|
||||
/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
{
|
||||
type === "sob" ?
|
||||
<WeaFormItem label={getLabel(111, "薪资账套")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="salarySobError" error={getLabel(111, "此项必填")}>
|
||||
<WeaBrowser
|
||||
title={getLabel(111, "薪资账套")}
|
||||
type={162} viewAttr={3} isSingle={false}
|
||||
value={salarySobIds} isMultCheckbox
|
||||
completeParams={{
|
||||
type: 162,
|
||||
fielddbtype: "browser.salarySobBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
conditionDataParams={{
|
||||
type: "browser.salarySobBrowser",
|
||||
fielddbtype: "browser.salarySobBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
dataParams={{
|
||||
type: "browser.salarySobBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
destDataParams={{
|
||||
type: "browser.salarySobBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
inputStyle={{ width: "100%" }}
|
||||
onChange={(salarySobIds) => this.handleChangeItems("salarySobIds", salarySobIds)}
|
||||
/>
|
||||
</WeaError>
|
||||
</WeaFormItem> :
|
||||
<WeaFormItem label={getLabel(111, "薪资核算归档记录")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="salaryPigeonholeError" error={getLabel(111, "此项必填")}>
|
||||
<WeaBrowser
|
||||
title={getLabel(111, "薪资核算归档记录")}
|
||||
type={162} viewAttr={3} isSingle={false}
|
||||
value={salaryAcctRecordIds} isMultCheckbox
|
||||
completeParams={{
|
||||
type: 162,
|
||||
fielddbtype: "browser.salaryAcctArchivedRecordBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
conditionDataParams={{
|
||||
type: "browser.salaryAcctArchivedRecordBrowser",
|
||||
fielddbtype: "browser.salaryAcctArchivedRecordBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
dataParams={{
|
||||
type: "browser.salaryAcctArchivedRecordBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
destDataParams={{
|
||||
type: "browser.salaryAcctArchivedRecordBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
inputStyle={{ width: "100%" }}
|
||||
onChange={(salaryAcctRecordIds) => this.handleChangeItems("salaryAcctRecordIds", salaryAcctRecordIds)}
|
||||
/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
}
|
||||
<WeaFormItem label={getLabel(111, "薪资项目")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="salaryItemError" error={getLabel(111, "此项必填")}>
|
||||
<WeaBrowser
|
||||
title={getLabel(111, "薪资项目")}
|
||||
type={162} viewAttr={3} isSingle={false}
|
||||
value={salaryItemIds} isMultCheckbox
|
||||
completeParams={{
|
||||
type: 162,
|
||||
fielddbtype: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
conditionDataParams={{
|
||||
type: "browser.salaryItemBrowser",
|
||||
fielddbtype: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
dataParams={{
|
||||
type: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
destDataParams={{
|
||||
type: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
inputStyle={{ width: "100%" }}
|
||||
onChange={(salaryItemIds) => this.handleChangeItems("salaryItemIds", salaryItemIds)}
|
||||
/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
.retroactiveWrapper {
|
||||
height: 100%;
|
||||
|
||||
.wea-error {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
import { action, observable } from "mobx";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class AttendanceStore {
|
||||
@observable form = new WeaForm();
|
||||
@action("字段管理-新建字段表单初始化")
|
||||
initForm = () => this.form = new WeaForm();
|
||||
@observable refenceform = new WeaForm();
|
||||
//薪酬统计 新增form
|
||||
@observable statisticsForm = new WeaForm();
|
||||
|
|
@ -11,6 +14,8 @@ export class AttendanceStore {
|
|||
//报表查看 统计数据范围及规则设置form
|
||||
@observable settingForm = new WeaForm();
|
||||
//报表查看 分享报表
|
||||
@observable salaryDetailSearchForm = new WeaForm();
|
||||
@observable tableStore = new TableStore();//薪资明细表格仓库
|
||||
@observable shareForm = new WeaForm();
|
||||
@observable shareLogForm = new WeaForm();
|
||||
@observable sharePerForm = new WeaForm();
|
||||
|
|
|
|||
|
|
@ -453,7 +453,11 @@ export class payrollStore {
|
|||
@action
|
||||
getInfoList = (params = {}) => {
|
||||
let form = this.grantListConditionForm.getFormParams();
|
||||
params = { ...form, ...params };
|
||||
params = {
|
||||
...form, ...params,
|
||||
departmentIds: form.departmentIds ? form.departmentIds.split(",") : [],
|
||||
subCompanyIds: form.subCompanyIds ? form.subCompanyIds.split(",") : []
|
||||
};
|
||||
API.getInfoList(params).then(res => {
|
||||
if (res.status) {
|
||||
this.salaryGrantTableStore = res.data.columns;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ export const getIframeParentHeight = (selector, total, extraHeight) => {
|
|||
const dom = document.querySelector(selector);
|
||||
let height = 280;
|
||||
if (dom && total > 0) {
|
||||
height = (parseFloat(dom.style.height) > 620 && total === 10) ? total * 48 + 108: total < 10 ? total * 48 + 108 : parseFloat(dom.style.height) - extraHeight;
|
||||
height = (parseFloat(dom.style.height) > 620 && total === 10) ? total * 48 + 108 : total < 10 ? (total + 1) * 48 + 108 : parseFloat(dom.style.height) - extraHeight;
|
||||
}
|
||||
return height;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue