* 1、薪资核算新增环比上月数据
2、核算归档后依旧可查看上月环比数据界面 3、个税申报表批量多选申报【现阶段仅能选择一个个税扣缴义务人来生成申报表】 4、个税申报表增加一个 批量撤回按钮 【跳出一个界面选择 与申报界面一致,可批量选择个税扣缴义务人与薪资所属月来进行批量撤回】 5、薪资核算界面内增加搜索个税扣缴义务人。以及搜索归档与未归档的核算。(按状态筛选) 6、薪资核算时,二级部门需与员工的一级部门进行对应【现阶段员工二级部门由导入与sql自动带出两个方式,若为员工手动导入,则需审核】图2为对应表
This commit is contained in:
parent
1c4633a1c0
commit
a65e31f386
|
|
@ -0,0 +1,187 @@
|
||||||
|
export const editCalcSearchConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["employeeName"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "姓名",
|
||||||
|
lanId: 25034,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["workcode"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "工号",
|
||||||
|
lanId: 1933,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
title: "",
|
||||||
|
type: "164",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
domkey: ["subcompanyIds"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "分部",
|
||||||
|
lanId: 33553,
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
title: "",
|
||||||
|
type: "57",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
domkey: ["departmentIds"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "部门",
|
||||||
|
lanId: 27511,
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: false,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
icon: "icon-coms-hrm",
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
title: "",
|
||||||
|
type: "24",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
domkey: ["positionIds"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "岗位",
|
||||||
|
lanId: 6086,
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["statuses"],
|
||||||
|
fieldcol: 12,
|
||||||
|
multiple: true,
|
||||||
|
label: "状态",
|
||||||
|
lanId: 535101,
|
||||||
|
labelcol: 6,
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "CHECKBOX",
|
||||||
|
domkey: ["consolidatedTaxation"],
|
||||||
|
fieldcol: 12,
|
||||||
|
isQuickSearch: false,
|
||||||
|
label: "合并计税",
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 2
|
||||||
|
},{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["taxAgentIds"],
|
||||||
|
fieldcol: 12,
|
||||||
|
multiple: true,
|
||||||
|
label: "个税扣缴义务人",
|
||||||
|
lanId: 537996,
|
||||||
|
labelcol: 6,
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: "常用条件"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const batchUpdateConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["salaryItemName"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "批量编辑项目",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUTNUMBER",
|
||||||
|
domkey: ["value"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "批量编辑为",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
rules: "required",
|
||||||
|
viewAttr: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
title: ""
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,217 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 薪资核算-高级搜索面板
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/9/14
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTools } from "ecCom";
|
||||||
|
import { Button, Col, Row } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import uuidV4 from "uuid/v4";
|
||||||
|
import { editCalcSearchConditions } from "./condition";
|
||||||
|
import { getExportField } from "../../../../../apis/calculate";
|
||||||
|
import { commonEnumList } from "../../../../../apis/ruleconfig";
|
||||||
|
import { getSearchs } from "../../../../../util";
|
||||||
|
import {postFetch} from "../../../../../util/request";
|
||||||
|
import {declareConditions} from "../../../../declare/components/declareDialog/condition";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("calculateStore")
|
||||||
|
@observer
|
||||||
|
class EditCalcAdvanceSearchPannel extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
searchConditions: [], salaryItems: [],
|
||||||
|
customSearchConditions: [], filterEnum: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.getExportField();
|
||||||
|
this.getFilterEnumList();
|
||||||
|
// 薪资核算高级搜索新增个税扣缴义务人
|
||||||
|
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" })
|
||||||
|
.then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
searchConditions: _.map(editCalcSearchConditions, item => ({
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "taxAgentIds") {
|
||||||
|
return {
|
||||||
|
...o, label: getLabel(o.lanId, o.label),
|
||||||
|
options: _.map(data, g => ({ key: String(g.id), showname: g.name }))
|
||||||
|
};
|
||||||
|
} else if (getKey(o) === "statuses") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
options: [
|
||||||
|
{ key: "0", showname: getLabel(18883, "试用") }, { key: "1", showname: getLabel(15711, "正式") },
|
||||||
|
{ key: "2", showname: getLabel(480, "临时") }, { key: "3", showname: getLabel(15844, "试用延期") },
|
||||||
|
{ key: "4", showname: getLabel(542707, "解雇") }, { key: "5", showname: getLabel(6091, "离职") },
|
||||||
|
{ key: "6", showname: getLabel(6092, "退休") }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
}),
|
||||||
|
title: getLabel(32905, "常用条件")
|
||||||
|
}))
|
||||||
|
}, () => {
|
||||||
|
const { calculateStore: { ECSearchForm } } = this.props;
|
||||||
|
ECSearchForm.initFormFields(this.state.searchConditions);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getFilterEnumList = () => {
|
||||||
|
commonEnumList({ enumClass: "com.engine.salary.enums.common.FilterEnum" })
|
||||||
|
.then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
filterEnum: _.map(data, item => ({
|
||||||
|
key: item.value,
|
||||||
|
showname: item.defaultLabel
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
getExportField = () => {
|
||||||
|
getExportField({ salaryAcctRecordId: this.props.salaryAcctRecordId })
|
||||||
|
.then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { itemsByGroup } = data;
|
||||||
|
this.setState({
|
||||||
|
salaryItems: _.map(itemsByGroup, item => ({
|
||||||
|
key: item.salarySobItemGroupId.toString(),
|
||||||
|
label: item.salarySobItemGroupName,
|
||||||
|
options: _.map(item.salaryItems, o => ({
|
||||||
|
key: o.salaryItemId.toString(), showname: o.salaryItemName
|
||||||
|
}))
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleAddCustomSearchForm = () => {
|
||||||
|
const { calculateStore: { setOtherConditions } } = this.props;
|
||||||
|
const { customSearchConditions, salaryItems, filterEnum } = this.state;
|
||||||
|
const uuid = uuidV4();
|
||||||
|
this.setState({
|
||||||
|
customSearchConditions: [
|
||||||
|
...customSearchConditions,
|
||||||
|
{
|
||||||
|
com: CustomFormFields({
|
||||||
|
uuid, salaryItems, filterEnum, onDelete: this.handleDelete, onChange: this.handleChange
|
||||||
|
}),
|
||||||
|
uuid, itemId: "", filter: "", params: ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}, () => {
|
||||||
|
setOtherConditions(_.map(this.state.customSearchConditions, o => ({
|
||||||
|
itemId: o.itemId, filter: o.filter, params: o.params
|
||||||
|
})));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleChange = (uuid, params) => {
|
||||||
|
const { calculateStore: { setOtherConditions } } = this.props;
|
||||||
|
const { customSearchConditions } = this.state;
|
||||||
|
this.setState({
|
||||||
|
customSearchConditions: _.map(customSearchConditions, o => {
|
||||||
|
if (o.uuid === uuid) {
|
||||||
|
return { ...o, ...params };
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
setOtherConditions(_.map(this.state.customSearchConditions, o => ({
|
||||||
|
itemId: o.itemId, filter: o.filter, params: o.params
|
||||||
|
})));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleDelete = (uuid) => {
|
||||||
|
const { calculateStore: { setOtherConditions } } = this.props;
|
||||||
|
const { customSearchConditions } = this.state;
|
||||||
|
this.setState({
|
||||||
|
customSearchConditions: _.filter(customSearchConditions, o => o.uuid !== uuid)
|
||||||
|
}, () => {
|
||||||
|
setOtherConditions(_.map(this.state.customSearchConditions, o => ({
|
||||||
|
itemId: o.itemId, filter: o.filter, params: o.params
|
||||||
|
})));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { searchConditions, customSearchConditions } = this.state;
|
||||||
|
const { calculateStore: { ECSearchForm, setOtherConditions } } = this.props;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<div className="wea-advanced-searchsAd">
|
||||||
|
{getSearchs(ECSearchForm, searchConditions, 2, false)}
|
||||||
|
<WeaSearchGroup needTigger showGroup title={getLabel(32843, "其他条件")} items={customSearchConditions}
|
||||||
|
col={2}/>
|
||||||
|
<div className="custom-advance-largeSpacing">
|
||||||
|
<Button className="link" icon="plus"
|
||||||
|
onClick={this.handleAddCustomSearchForm}>{getLabel(111, "添加搜索条件")}</Button>
|
||||||
|
</div>
|
||||||
|
<div className="searchAdvanced-commonSelect">
|
||||||
|
{/*<Button type="ghost">{getLabel(111, "保存常用筛选")}</Button>*/}
|
||||||
|
</div>
|
||||||
|
</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={() => {
|
||||||
|
this.setState({
|
||||||
|
customSearchConditions: []
|
||||||
|
}, () => {
|
||||||
|
ECSearchForm.resetForm();
|
||||||
|
setOtherConditions([]);
|
||||||
|
});
|
||||||
|
}}>{getLabel(2022, "重置")}</Button></span>
|
||||||
|
<span style={{ marginLeft: 15 }}><Button type="ghost"
|
||||||
|
onClick={this.props.onToggleSwitch}>{getLabel(31129, "取消")}</Button></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EditCalcAdvanceSearchPannel;
|
||||||
|
|
||||||
|
const CustomFormFields = (props) => {
|
||||||
|
const { uuid, onDelete, salaryItems, filterEnum, onChange } = props;
|
||||||
|
return <WeaFormItem labelCol={{ span: 0 }} wrapperCol={{ span: 18 }}>
|
||||||
|
<Row>
|
||||||
|
<Col span={6} style={{ paddingRight: 10 }}>
|
||||||
|
<WeaSelect
|
||||||
|
options={salaryItems} detailtype={5} showSearch optionFilterProp="children"
|
||||||
|
onChange={v => onChange(uuid, { itemId: v })}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={18}>
|
||||||
|
<Row>
|
||||||
|
<Col span={12} style={{ paddingRight: 10 }}>
|
||||||
|
<WeaSelect options={filterEnum} onChange={v => onChange(uuid, { filter: v })}/>
|
||||||
|
</Col>
|
||||||
|
<Col span={12} style={{ position: "relative" }}>
|
||||||
|
<WeaInput onChange={v => onChange(uuid, { params: v })}/>
|
||||||
|
<Button
|
||||||
|
type="ghost" icon="cross" className="formItem-delete" shape="circle"
|
||||||
|
onClick={() => onDelete(uuid)}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</WeaFormItem>;
|
||||||
|
};
|
||||||
|
|
@ -125,18 +125,17 @@ class EditCalcTable extends Component {
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys })
|
updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||||
.then(({ status, errormsg }) => {
|
if (status) {
|
||||||
if (status) {
|
clearInterval(this.timerLock);
|
||||||
clearInterval(this.timerLock);
|
this.setState({
|
||||||
this.setState({
|
progressVisible: false,
|
||||||
progressVisible: false,
|
progress: 0
|
||||||
progress: 0
|
}, () => this.queryCalcResultList());
|
||||||
}, () => this.queryCalcResultList());
|
} else {
|
||||||
} else {
|
message.error(errormsg);
|
||||||
message.error(errormsg);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -251,13 +250,14 @@ class EditCalcTable extends Component {
|
||||||
calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId },
|
calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId },
|
||||||
calcDetail = false
|
calcDetail = false
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams();
|
const { subcompanyIds, departmentIds, positionIds, statuses, taxAgentIds, ...extra } = ECSearchForm.getFormParams();
|
||||||
const payload = {
|
const payload = {
|
||||||
salaryAcctRecordId, ...pageInfo, ...extra, otherConditions,
|
salaryAcctRecordId, ...pageInfo, ...extra, otherConditions,
|
||||||
departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [],
|
departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [],
|
||||||
positionIds: !_.isEmpty(positionIds) ? positionIds.split(",") : [],
|
positionIds: !_.isEmpty(positionIds) ? positionIds.split(",") : [],
|
||||||
subcompanyIds: !_.isEmpty(subcompanyIds) ? subcompanyIds.split(",") : [],
|
subcompanyIds: !_.isEmpty(subcompanyIds) ? subcompanyIds.split(",") : [],
|
||||||
statuses: !_.isEmpty(statuses) ? statuses.split(",") : []
|
statuses: !_.isEmpty(statuses) ? statuses.split(",") : [],
|
||||||
|
taxAgentIds: !_.isEmpty(taxAgentIds) ? taxAgentIds.split(",") : []
|
||||||
};
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
acctResultList(payload).then(({ status, data }) => {
|
acctResultList(payload).then(({ status, data }) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue