Merge branch 'feature/3.0.0.2502.01-合并业务线-社保福利台账增减人员' into release/3.0.0.2502.01-合并业务线

This commit is contained in:
lys 2025-03-10 15:31:44 +08:00
commit 9f13efa0f2
5 changed files with 110 additions and 128 deletions

View File

@ -205,3 +205,11 @@ export const cacheWelfareListField = (params) => {
export const cacheBalanceWelfareList = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params);
};
// 社保福利台账正常缴纳-增加人员并核算
export const addSocialAcctEmp = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/addSocialAcctEmp", params);
};
// 社保福利台账正常缴纳-增加人员并核算
export const deleteSocialAcctEmp = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/deleteSocialAcctEmp", params);
};

View File

@ -14,6 +14,13 @@
.wea-search-tab, .wea-input-focus {
background: #f1f1f1;
i {
font-size: 20px;
cursor: pointer;
vertical-align: middle;
color: #55a1f8;
}
}
.normalWapper {
@ -60,20 +67,14 @@
.tabOption {
display: flex;
align-items: center;
padding: 8px 20px;
padding: 8px 0;
justify-content: flex-end;
i.icon-coms-Batch-delete, i.icon-coms-Add-to, button {
i {
font-size: 20px;
cursor: pointer;
margin-right: 10px;
}
.anticon-search {
margin-right: 0px;
}
.wea-input-focus-btn {
margin-right: 0px;
vertical-align: middle;
color: #55a1f8;
}
}

View File

@ -7,7 +7,7 @@
import React, { Component } from "react";
import { Button, Col, Icon, message, Modal, Row, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import { WeaBrowser, WeaButtonIcon, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import { calcPageNo } from "../../../../util";
import { getQueryString } from "../../../../util/url";
import ProgressModal from "../../../../components/progressModal";
@ -16,8 +16,8 @@ import AdjustmentSlide from "./adjustmentSlide";
import { getCalculateProgress } from "../../../../apis/calculate";
import RegEditDetial from "./regEditDetial";
import SupplementarySlide from "./supplementarySlide";
import _ from "lodash";
import "./index.less";
import { addSocialAcctEmp, deleteSocialAcctEmp } from "../../../../apis/standingBook";
const getLabel = WeaLocaleProvider.getLabel;
@inject("standingBookStore")
@ -61,7 +61,8 @@ export default class NormalIndex extends Component {
},
showSum: false,
siaccountSum: {},
showSearchAd: false
showSearchAd: false,
normalPayer: ""
};
this.timer = null;
this.timerDelete = null;
@ -167,85 +168,11 @@ export default class NormalIndex extends Component {
});
};
handleSave = () => {
const {
siaccountCommonSave,
siaccountSupplementarySave,
form
} = this.props.standingBookStore;
const { billMonth, selectedKey, paymentOrganization } = this.props;
if (selectedKey === "1") {
const { includes, excludes } = form.getFormParams();
const payload = {
billMonth,
includes: includes.split(","),
excludes: _.isEmpty(excludes) ? excludes.split(",") : []
};
siaccountCommonSave(payload).then(() => {
message.success("添加成功");
this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
});
this.setState({
addProps: {
...this.state.addProps,
title: "",
visible: false
}
});
});
} else {
const paymentOrganization = getQueryString("paymentOrganization");
form.validateForm().then(f => {
if (f.isValid) {
const {
includes,
billMonth: billMonthList,
excludes,
projects
} = form.getFormParams();
const payload = {
billMonth,
billMonthList: billMonthList.split(","),
includes: includes.split(","),
// excludes: excludes.split(","),
projects: projects.split(","),
paymentOrganization
};
siaccountSupplementarySave(payload).then(() => {
message.success("添加成功");
this.getSupplementaryList({
billMonth,
current: this.state.current,
paymentOrganization
});
this.setState(
{
addProps: {
...this.state.addProps,
title: "",
visible: false
}
},
() => {
form.resetForm();
}
);
});
} else {
f.showErrors();
this.setState({ date: new Date() }); // 改变一个state的变量,强制页面刷新
}
});
}
};
getNormalList = async (payload = {}) => {
const { getNormalList } = this.props.standingBookStore;
getNormalList({ ...payload, pageSize: this.state.pageSize }).then(({ list, columns = [], total }) => {
this.setState({
tableData: { list, total, columns }
tableData: { list, total, columns }, normalPayer: ""
}, () => this.postMessageToChild());
});
};
@ -341,16 +268,7 @@ export default class NormalIndex extends Component {
});
}
};
handleAdd = () => {
this.setState({
addProps: {
...this.state.addProps,
title: "添加缴纳人员",
visible: true
}
});
};
handleAdd = () => this.setState({ addProps: { ...this.state.addProps, title: "添加缴纳人员", visible: true } });
handleCommonAccountClick = () => {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const { commonAccount } = this.props.standingBookStore;
@ -410,7 +328,43 @@ export default class NormalIndex extends Component {
}, 600);
});
};
handleAddSocialAcctEmp = () => {
const { billMonth, paymentOrganization } = this.props, { normalPayer } = this.state;
addSocialAcctEmp({ billMonth, paymentOrganization, includes: normalPayer.split(",") })
.then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(111, "操作成功"));
this.getNormalList({
billMonth, paymentOrganization,
current: calcPageNo(this.state.tableData.total, this.state.current, 10, normalPayer.split(",").length)
});
} else {
message.error(errormsg);
}
});
};
handleDeleteNormalPayer = () => {
Modal.confirm({
title: getLabel(111, "确认信息"),
content: getLabel(111, "确认删除勾选的数据吗?"),
onOk: () => {
const { billMonth, paymentOrganization } = this.props, { selectedRowKeys: ids } = this.state;
deleteSocialAcctEmp({ billMonth, paymentOrganization, ids }).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(111, "操作成功!"));
this.getNormalList({
billMonth,
paymentOrganization,
current: calcPageNo(this.state.tableData.total, this.state.current, 10, ids.length)
});
} else {
message.error(errormsg);
}
});
}
});
};
handleExport = () => {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const urlObj = {
@ -475,40 +429,48 @@ export default class NormalIndex extends Component {
render() {
const { remarks, billMonth, selectedKey, paymentOrganization, standingBookStore } = this.props;
const { addProps, adjustSlide, importParams, returnEditPersonSlide, showSearchAd } = this.state;
const { addProps, adjustSlide, importParams, returnEditPersonSlide, showSearchAd, selectedRowKeys } = this.state;
const { loading } = standingBookStore;
const btn1 = [
<Button type="primary" onClick={this.handleBatchDelete}>批量删除</Button>,
<Button type="primary" onClick={this.handleAdd}>添加缴纳人员</Button>
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectedRowKeys)}
onClick={this.handleBatchDelete}/>,
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={this.handleAdd}/>
];
const btn2 = [
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectedRowKeys)}
onClick={this.handleDeleteNormalPayer}/>,
<WeaBrowser type={17} title={getLabel(383694, "添加人员")} isSingle={false} customized
onChange={ids => this.setState({ normalPayer: ids }, () => this.handleAddSocialAcctEmp())}
>
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}/>
</WeaBrowser>,
<Button type="primary" onClick={this.handleCommonAccountClick}>核算</Button>,
<Button type="primary"
<Button type="ghost"
onClick={() => this.setState({ adjustSlide: { ...adjustSlide, visible: true } })}>调差</Button>
];
const btn3 = [
<Button type="primary" onClick={() => {
<i className="iconfont icon-duibi" onClick={() => {
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`);
}}>线下对比</Button>
}} title={getLabel(111, "线下对比")}/>
];
const btn4 = [
<Button type="primary"
onClick={() => this.setState({
importParams: {
...importParams, visible: true,
tmpUrl: selectedKey === "1" ? "exportSiaccountWelfareImporttemplate" : "exportSiaccountWelfaresupplyimporttemplatetemplate"
}
})}>导入数据</Button>
<i className="iconfont icon-import" onClick={() => this.setState({
importParams: {
...importParams, visible: true,
tmpUrl: selectedKey === "1" ? "exportSiaccountWelfareImporttemplate" : "exportSiaccountWelfaresupplyimporttemplatetemplate"
}
})} title={getLabel(111, "导入")}/>
];
const btn5 = [
<Button type="primary" onClick={this.handleExport}>导出全部</Button>
<i className="iconfont icon-export" onClick={this.handleExport} title={getLabel(111, "导出")}/>
];
let btn = [];
(this.props.type !== "detail" && this.props.selectedKey == "3") && (btn = [...btn, ...btn1]);
(selectedKey === "1" && this.props.type !== "detail") && (btn = [...btn, ...btn2]);
selectedKey === "1" && (btn = [...btn, ...btn3]);
this.props.type !== "detail" && (btn = [...btn, ...btn4]);
btn = [...btn, ...btn5];
btn = [...btn5, ...btn];
this.props.type !== "detail" && (btn = [...btn4, ...btn]);
selectedKey === "1" && (btn = [...btn3, ...btn]);
return (
<div className="normalWapper">
{

View File

@ -5,11 +5,12 @@
* LastEditTime: 2022-05-09 15:07:56
*/
import React, { Component } from "react";
import { Button, Icon, Spin, Tooltip } from "antd";
import { Icon, Spin, Tooltip } from "antd";
import { inject, observer } from "mobx-react";
import { WeaNewScroll, WeaTable } from "ecCom";
import { WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("standingBookStore")
@observer
export default class OverViewIndex extends Component {
@ -113,7 +114,7 @@ export default class OverViewIndex extends Component {
</div>
</div>
<div className="tabOption">
<Button type="primary" onClick={this.handleExport}>导出全部</Button>
<i className="iconfont icon-export" onClick={this.handleExport} title={getLabel(111, "导出")}/>
</div>
{/* table */}
<div className="tableWrapper">

View File

@ -1,6 +1,15 @@
import React, { Component } from "react";
import { Button, Col, Row } from "antd";
import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
import { Col, Row } from "antd";
import {
WeaBrowser,
WeaButtonIcon,
WeaFormItem,
WeaHelpfulTip,
WeaInput,
WeaLocaleProvider,
WeaSearchGroup,
WeaTab
} from "ecCom";
import { getQueryString } from "../../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
@ -37,21 +46,22 @@ class RegTop extends Component {
placement="bottomRight"
width={250}
/>,
<Button type="primary" onClick={() => onChange("export")}>导出全部</Button>
<i className="iconfont icon-export" onClick={() => onChange("export")} title={getLabel(111, "导出")}/>
];
if (!type) {
const [dom1, ...extra] = dom;
const domBtn = regtopType === "regression" ?
[<Button type="primary" onClick={() => onChange("add")}>添加</Button>] :
[<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={() => onChange("add")}/>] :
[
<Button type="primary" onClick={() => onChange("add")}>{getLabel(384113, "添加")}</Button>,
<Button type="primary" onClick={() => onChange("import")}>{getLabel(32935, "导入")}</Button>
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={() => onChange("add")}/>,
<i className="iconfont icon-import" onClick={() => onChange("import")} title={getLabel(111, "导入")}/>
];
dom = [
dom1,
<Button type="primary" disabled={_.isEmpty(selectKey)} onClick={() => onChange("delete")}>
删除
</Button>, ...domBtn, ...extra
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectKey)}
onClick={() => onChange("delete")}/>, ...domBtn, ...extra
];
}
return dom;