feature/2.19.1.2501.01-薪酬批量操作
This commit is contained in:
parent
b9efc6386e
commit
004deaeea3
|
|
@ -41,6 +41,10 @@ export const batSave = (params) => {
|
|||
export const siaccountFile = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/file", params);
|
||||
};
|
||||
//社会福利台账-批量归档
|
||||
export const batSiaccountFile = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/batFile", params);
|
||||
};
|
||||
//社会福利台账-核算异常列表
|
||||
export const inspectList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/inspectList", params);
|
||||
|
|
@ -61,6 +65,10 @@ export const siaccountSupplementarySave = (params) => {
|
|||
export const siaccountDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/delete", params);
|
||||
};
|
||||
//社会福利台账-批量删除月份表单
|
||||
export const batSiaccountDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/batDelete", params);
|
||||
};
|
||||
//社会福利台账-正常缴纳添加缴纳人员表单
|
||||
export const siaccountCommonForm = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/commonForm", "get", params);
|
||||
|
|
|
|||
|
|
@ -84,11 +84,14 @@ class Calculate extends Component {
|
|||
title: getLabel(538780, "核算")
|
||||
}
|
||||
})}>{getLabel(538780, "核算")}</Button>,
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="primary" onClick={() => this.onDropMenuClick("batArchiving")}
|
||||
disabled={_.isEmpty(selectedRowKeys)}>{getLabel(111, "批量归档")} <Icon type="down"
|
||||
style={{ marginLeft: 8 }}/></Button>
|
||||
</Dropdown>,
|
||||
<React.Fragment>
|
||||
<Button type="primary" onClick={() => this.onDropMenuClick("batArchiving")} className="cust-dropdown-btn"
|
||||
disabled={_.isEmpty(selectedRowKeys)}>{getLabel(111, "批量归档")}</Button>
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="primary" disabled={_.isEmpty(selectedRowKeys)} className="cust-dropdown-btnIcon"><Icon
|
||||
type="down"/></Button>
|
||||
</Dropdown>
|
||||
</React.Fragment>,
|
||||
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||
onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
|
|
@ -218,7 +221,7 @@ class Calculate extends Component {
|
|||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "batArchiving":
|
||||
batFile({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => {
|
||||
batFile({ salaryAcctRecordIds: this.state.selectedRowKeys }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ isRefresh: !this.state.isRefresh });
|
||||
|
|
|
|||
|
|
@ -52,12 +52,14 @@ class Index extends Component {
|
|||
switch (selectedKey) {
|
||||
case "grant":
|
||||
reqBtns = [
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="primary" onClick={() => this.onDropMenuClick("batDistributed")}
|
||||
disabled={_.isEmpty(this.state.selectedRowKeys)}>{getLabel(111, "全部发放")}
|
||||
<Icon type="down"
|
||||
style={{ marginLeft: 8 }}/></Button>
|
||||
</Dropdown>,
|
||||
<React.Fragment>
|
||||
<Button type="primary" onClick={() => this.onDropMenuClick("batDistributed")} className="cust-dropdown-btn"
|
||||
disabled={_.isEmpty(this.state.selectedRowKeys)}>{getLabel(111, "全部发放")}</Button>
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="primary" disabled={_.isEmpty(this.state.selectedRowKeys)} className="cust-dropdown-btnIcon"><Icon
|
||||
type="down"/></Button>
|
||||
</Dropdown>
|
||||
</React.Fragment>,
|
||||
<GrantQuery queryParams={queryParams}
|
||||
onChange={v => this.setState({
|
||||
isRefresh: !isRefresh,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { getIframeParentHeight } from "../../../../util";
|
||||
import { calcPageNo, getIframeParentHeight } from "../../../../util";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
|
||||
|
|
@ -33,6 +33,16 @@ class WelfareRecordList extends Component {
|
|||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
batDelQueryList = (selectDelDataLen = 1) => {
|
||||
this.setState({
|
||||
pageInfo: {
|
||||
...this.state.pageInfo,
|
||||
current: calcPageNo(this.state.pageInfo.total, this.state.pageInfo.current, 10, selectDelDataLen)
|
||||
}
|
||||
}, () => {
|
||||
this.getWelfareRecordList();
|
||||
});
|
||||
};
|
||||
handleReceive = ({ data }) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
|
|
@ -68,7 +78,7 @@ class WelfareRecordList extends Component {
|
|||
API.siaccountDelete(module).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.getWelfareRecordList();
|
||||
this.batDelQueryList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,14 +140,31 @@ class StandingBook extends Component {
|
|||
Modal.confirm({
|
||||
title: getLabel(111, "确认信息"), content: getLabel(388758, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
// API.siaccountDelete(module).then(({ status, errormsg }) => {
|
||||
// if (status) {
|
||||
// message.success(getLabel(502230, "删除成功"));
|
||||
// this.wfListRef.wrappedInstance.getWelfareRecordList();
|
||||
// } else {
|
||||
// message.error(errormsg);
|
||||
// }
|
||||
// });
|
||||
API.batSiaccountDelete({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.wfListRef.wrappedInstance.batDelQueryList(this.state.selectedRowKeys.length);
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "batArchiving":
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "确认信息"),
|
||||
content: getLabel(111, "归档后,此条台账数据无法删除且不可以再进行此月份的核算,是否确认归档?"),
|
||||
onOk: () => {
|
||||
API.batSiaccountFile({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.wfListRef.wrappedInstance.getWelfareRecordList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
|
@ -175,11 +192,14 @@ class StandingBook extends Component {
|
|||
<Button type="primary" onClick={() => this.setState({
|
||||
accountDialog: { ...accountDialog, visible: true, title: getLabel(538780, "核算") }
|
||||
})}>{getLabel(538780, "核算")}</Button>,
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="primary" onClick={() => this.onDropMenuClick("batArchiving")}
|
||||
disabled={_.isEmpty(selectedRowKeys)}>{getLabel(111, "批量归档")} <Icon type="down"
|
||||
style={{ marginLeft: 8 }}/></Button>
|
||||
</Dropdown>
|
||||
<React.Fragment>
|
||||
<Button type="primary" onClick={() => this.onDropMenuClick("batArchiving")} className="cust-dropdown-btn"
|
||||
disabled={_.isEmpty(selectedRowKeys)}>{getLabel(111, "批量归档")}</Button>
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="primary" disabled={_.isEmpty(selectedRowKeys)} className="cust-dropdown-btnIcon"><Icon
|
||||
type="down"/></Button>
|
||||
</Dropdown>
|
||||
</React.Fragment>
|
||||
];
|
||||
return (<WeaTop title={getLabel(538002, "社保福利台账")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []} className="salary-welfare-record"
|
||||
|
|
|
|||
|
|
@ -139,3 +139,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
//自定义下拉Dropdown按钮样式
|
||||
.cust-dropdown-btn {
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-top-right-radius: 0 !important;
|
||||
padding-right: 8px !important;
|
||||
}
|
||||
|
||||
.cust-dropdown-btnIcon {
|
||||
border-bottom-left-radius: 0 !important;
|
||||
border-top-left-radius: 0 !important;
|
||||
padding-left: 8px !important;
|
||||
padding-right: 7px !important;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue