feature/3.0.1.2503.01-合并业务线-社保福利台账明细整改
This commit is contained in:
parent
477913a724
commit
2fd0dfcf50
|
|
@ -15,10 +15,18 @@ export const getTabList = (params) => {
|
|||
export const getNormalList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list", params);
|
||||
};
|
||||
//社会福利台账-获取正常缴纳列表合计行
|
||||
export const getNormalListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list/sum", params);
|
||||
};
|
||||
//社会福利台账-获取补缴列表
|
||||
export const getSupplementaryList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", params);
|
||||
};
|
||||
//社会福利台账-获取补缴列表合计
|
||||
export const getSupplementaryListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", params);
|
||||
};
|
||||
|
||||
//社会福利台账-获取总览列表
|
||||
export const getOverViewList = (params) => {
|
||||
|
|
@ -122,10 +130,18 @@ export const saveRecession = (params) => {
|
|||
export const recessionList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
|
||||
};
|
||||
//查询退差列表合计行
|
||||
export const recessionListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", params);
|
||||
};
|
||||
//查询补差列表
|
||||
export const balanceList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
|
||||
};
|
||||
//查询补差列表合计行
|
||||
export const balanceListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", params);
|
||||
};
|
||||
//删除退差数据
|
||||
export const delRecession = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
|
||||
|
|
|
|||
|
|
@ -10,12 +10,10 @@ import { WeaSlideModal } from "ecCom";
|
|||
import { Button, message, Modal } from "antd";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
import AdjustTable from "./adjustTable";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import { compensationSave } from "../../../../apis/standingBook";
|
||||
import AdjustmentDefaultSlide from "./adjustmentDefaultSlide";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class AdjustmentSlide extends Component {
|
||||
|
|
@ -35,10 +33,9 @@ class AdjustmentSlide extends Component {
|
|||
|
||||
handleSave = () => {
|
||||
const requireKeys = ["adjustTo", "adjustmentTotal", "categoryType", "companyTotal", "countryTotal", "target", "welfareType"];
|
||||
const { billMonth, paymentOrganization } = this.props;
|
||||
let { dataSource, targetOptions } = this.adjustTableRef.state;
|
||||
dataSource = _.filter(dataSource, it => (!it.id || !it.status));
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
let bool = true;
|
||||
_.map(dataSource, item => {
|
||||
bool = _.every(requireKeys, child => !!item[child]);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,12 @@
|
|||
}
|
||||
|
||||
.wea-search-tab, .wea-input-focus {
|
||||
background: #f1f1f1;
|
||||
background: #F1F1F1;
|
||||
padding-right: 0 !important;
|
||||
|
||||
.wea-advanced-search {
|
||||
background: #FFF
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: 20px;
|
||||
|
|
@ -30,6 +35,18 @@
|
|||
overflow: hidden;
|
||||
padding: 0 16px;
|
||||
|
||||
.wea-tab .wea-search-container .wea-advanced-search {
|
||||
right: -1px !important;
|
||||
}
|
||||
|
||||
.wea-tab .wea-search-tab {
|
||||
padding-right: 0;
|
||||
|
||||
.wea-advanced-search {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.tableWrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
|
@ -94,7 +111,7 @@
|
|||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px;
|
||||
padding: 0 16px 16px 16px;
|
||||
|
||||
.tableWrapper {
|
||||
flex: 1;
|
||||
|
|
@ -133,26 +150,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-top {
|
||||
.ant-btn {
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.ant-btn.ant-btn-primary[disabled] {
|
||||
color: #d8d8d8;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ant-btn.ant-btn-primary {
|
||||
color: #2db7f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//补差添加人员弹框
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
import React, { Component } from "react";
|
||||
import RegTop from "./regTop";
|
||||
import { message, Modal } from "antd";
|
||||
import { WeaNewScroll } from "ecCom";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import { calcPageNo } from "../../../../util";
|
||||
import RegList from "./regList";
|
||||
|
|
@ -16,6 +14,7 @@ import RegEditDetial from "./regEditDetial";
|
|||
import AddCompensationPersonnelDialog from "./addCompensationPersonnelDialog";
|
||||
import StandingBookCalcImportDialog from "./standingBookCalcImportDialog";
|
||||
import "./index.less";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
|
||||
class MakeupDifference extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -43,9 +42,7 @@ class MakeupDifference extends Component {
|
|||
|
||||
delBalance = () => {
|
||||
const { selectKey: ids } = this.state;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const payload = { ids, billMonth, paymentOrganization };
|
||||
const payload = { ids, ..._.pick(this.props, ["billMonth", "paymentOrganization"]) };
|
||||
API.delBalance(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
|
|
@ -64,8 +61,6 @@ class MakeupDifference extends Component {
|
|||
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) {
|
||||
case "delete":
|
||||
Modal.confirm({
|
||||
|
|
@ -78,13 +73,13 @@ class MakeupDifference extends Component {
|
|||
this.setState({
|
||||
importDiffModal: {
|
||||
...importDiffModal, visible: true,
|
||||
importparams: { billMonth: getQueryString("billMonth") }
|
||||
importparams: { ..._.pick(this.props, ["billMonth"]) }
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "export":
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/balance/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
window.open(url, "_self");
|
||||
const url = `/api/bs/hrmsalary/welfare/balance/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`;
|
||||
window.open(url, "_blank");
|
||||
break;
|
||||
case "search":
|
||||
this.diffListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 });
|
||||
|
|
@ -92,7 +87,7 @@ class MakeupDifference extends Component {
|
|||
case "add":
|
||||
this.setState({
|
||||
addPersonalDialog: {
|
||||
...addPersonalDialog, visible: true, paymentOrganization, billMonth
|
||||
...addPersonalDialog, ..._.pick(this.props, ["billMonth", "paymentOrganization"]), visible: true
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
|
@ -117,42 +112,40 @@ class MakeupDifference extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const { selectKey, importDiffModal, returnEditPersonSlide, addPersonalDialog } = this.state;
|
||||
return (
|
||||
<div className="differenceWrapper">
|
||||
<RegTop
|
||||
type="difference"
|
||||
{..._.pick(this.props, ["billMonth", "type"])}
|
||||
regtopType="difference"
|
||||
ref={dom => this.regTopRef = dom}
|
||||
billMonth={billMonth}
|
||||
onChange={this.handleChangeOpt}
|
||||
selectKey={selectKey}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
<RegList
|
||||
type="difference"
|
||||
ref={dom => this.diffListRef = dom}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
onEdit={this.handleEdit}
|
||||
/>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
||||
{/*添加补差人员*/}
|
||||
<AddCompensationPersonnelDialog {...addPersonalDialog}
|
||||
onCancel={(isRefresh) => this.setState({
|
||||
addPersonalDialog: {
|
||||
...addPersonalDialog,
|
||||
visible: false
|
||||
}
|
||||
}, () => isRefresh && this.diffListRef.recessionList())}
|
||||
/>
|
||||
{/*导入补差*/}
|
||||
<StandingBookCalcImportDialog {...importDiffModal}
|
||||
onCancel={(isInit) => this.setState({
|
||||
importDiffModal: { ...importDiffModal, visible: false }
|
||||
}, () => isInit && this.diffListRef.recessionList())}/>
|
||||
</WeaNewScroll>
|
||||
<RegList
|
||||
{..._.pick(this.props, ["billMonth", "paymentOrganization", "creator", "type"])}
|
||||
regType="difference"
|
||||
ref={dom => this.diffListRef = dom}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
onEdit={this.handleEdit}
|
||||
/>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
||||
{/*添加补差人员*/}
|
||||
<AddCompensationPersonnelDialog {...addPersonalDialog}
|
||||
onCancel={(isRefresh) => this.setState({
|
||||
addPersonalDialog: {
|
||||
...addPersonalDialog,
|
||||
visible: false
|
||||
}
|
||||
}, () => isRefresh && this.diffListRef.recessionList())}
|
||||
/>
|
||||
{/*导入补差*/}
|
||||
<StandingBookCalcImportDialog {...importDiffModal}
|
||||
onCancel={(isInit) => this.setState({
|
||||
importDiffModal: { ...importDiffModal, visible: false }
|
||||
}, () => isInit && this.diffListRef.recessionList())}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,96 +6,52 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, Col, Icon, message, Modal, Row, Spin, Tooltip } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaBrowser, WeaButtonIcon, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import { getCalculateProgress } from "../../../../apis/calculate";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
import { calcPageNo } from "../../../../util";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
import ProgressModal from "../../../../components/progressModal";
|
||||
import StandingBookCalcImportDialog from "./standingBookCalcImportDialog";
|
||||
import AdjustmentSlide from "./adjustmentSlide";
|
||||
import { getCalculateProgress } from "../../../../apis/calculate";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
import SupplementarySlide from "./supplementarySlide";
|
||||
import "./index.less";
|
||||
import { addSocialAcctEmp, deleteSocialAcctEmp } from "../../../../apis/standingBook";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
|
||||
export default class NormalIndex extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
date: "",
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
selectedRowKeys: [],
|
||||
addProps: {
|
||||
title: "",
|
||||
visible: false
|
||||
},
|
||||
adjustSlide: {
|
||||
title: "调差",
|
||||
visible: false
|
||||
},
|
||||
tableData: {
|
||||
list: [],
|
||||
columns: [],
|
||||
total: 0
|
||||
},
|
||||
searchValue: "",
|
||||
workcode: "",
|
||||
departmentIds: "",
|
||||
subCompanyIds: "",
|
||||
progressVisible: false,
|
||||
progress: 0,
|
||||
fieldData: {}, //选中的表单头信息
|
||||
importParams: { //导入信息的弹框表示
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [], showSearchAd: false, loading: false,
|
||||
formParams: { userName: "", workcode: "", departmentIds: [], subCompanyIds: [] },
|
||||
addProps: { title: "", visible: false }, adjustSlide: { title: "调差", visible: false },
|
||||
progressVisible: false, progress: 0, importParams: { //导入信息的弹框表示
|
||||
visible: false, fieldUrl: "getWelfareList", tmpUrl: "exportSiaccountWelfareImporttemplate",
|
||||
cacheUrl: "cacheWelfareListField", importUrl: "importInsuranceAcctDetail", importparams: {}
|
||||
},
|
||||
returnEditPersonSlide: {
|
||||
title: "",
|
||||
editId: "",
|
||||
visible: false
|
||||
},
|
||||
showSum: false,
|
||||
siaccountSum: {},
|
||||
showSearchAd: false,
|
||||
normalPayer: ""
|
||||
returnEditPersonSlide: { title: "", editId: "", visible: false },
|
||||
columns: [], dataSource: [], sumRow: {}, normalPayer: ""
|
||||
};
|
||||
this.timer = null;
|
||||
this.timerDelete = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { selectedKey, location } = this.props;
|
||||
const { current } = this.state;
|
||||
const billMonth = location.query.billMonth;
|
||||
const paymentOrganization = location.query.paymentOrganization;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
handleReceive = ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data, { selectedKey } = this.props;
|
||||
if (type === "init") {
|
||||
this.postMessageToChild();
|
||||
selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({ current, pageSize }, () => {
|
||||
const { billMonth, paymentOrganization, selectedKey } = this.props;
|
||||
const { current, pageSize } = this.state;
|
||||
selectedKey === "1" ?
|
||||
this.getNormalList({
|
||||
billMonth, current, pageSize, paymentOrganization
|
||||
}) :
|
||||
this.getSupplementaryList({
|
||||
billMonth, current, pageSize, paymentOrganization
|
||||
});
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => {
|
||||
selectedKey === "1" ? this.getNormalList(true) : this.getSupplementaryList(true);
|
||||
});
|
||||
} else if (id === "ROWSELECT") {
|
||||
const { selectedRowKeys } = params;
|
||||
|
|
@ -107,184 +63,125 @@ export default class NormalIndex extends Component {
|
|||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
if (this.timerDelete) {
|
||||
clearInterval(this.timerDelete);
|
||||
}
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
if (this.timerDelete) clearInterval(this.timerDelete);
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.selectedKey != this.props.selectedKey) {
|
||||
const { billMonth, paymentOrganization } = nextProps;
|
||||
if (nextProps.selectedKey !== this.props.selectedKey) {
|
||||
this.setState({
|
||||
current: 1, selectedRowKeys: []
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [], dataSource: [], sumRow: {},
|
||||
addProps: { title: "", visible: false }, returnEditPersonSlide: { title: "", editId: "", visible: false }
|
||||
}, () => {
|
||||
const { current } = this.state;
|
||||
nextProps.selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||
nextProps.selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
postMessageToChild = () => {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const { current, pageSize, tableData, selectedRowKeys, showSum, siaccountSum, searchValue: userName } = this.state;
|
||||
const { list: dataSource, total, columns } = tableData;
|
||||
const pageInfo = { current, pageSize, total };
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, pageInfo,
|
||||
selectedRowKeys, selectedKey: this.props.selectedKey,
|
||||
sumpayload: { billMonth, paymentOrganization, userName },
|
||||
showOperates: !getQueryString("type")
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
..._.pick(this.state, ["dataSource", "columns", "pageInfo", "selectedRowKeys", "sumRow"]),
|
||||
showOperates: !this.props.type
|
||||
}), "*");
|
||||
};
|
||||
|
||||
handleSearch = () => {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
current: 1,
|
||||
paymentOrganization,
|
||||
userName: this.state.searchValue,
|
||||
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,
|
||||
departmentIds: this.state.departmentIds ? this.state.departmentIds.split(",") : [],
|
||||
subCompanyIds: this.state.subCompanyIds ? this.state.subCompanyIds.split(",") : []
|
||||
});
|
||||
};
|
||||
|
||||
getNormalList = async (payload = {}) => {
|
||||
const { getNormalList } = this.props.standingBookStore;
|
||||
getNormalList({ ...payload, pageSize: this.state.pageSize }).then(({ list, columns = [], total }) => {
|
||||
this.setState({
|
||||
tableData: { list, total, columns }, normalPayer: ""
|
||||
}, () => this.postMessageToChild());
|
||||
handleSearch = () => this.props.selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
|
||||
getNormalList = (pageTurning = false) => {
|
||||
const { pageInfo, formParams } = this.state;
|
||||
const payload = { ..._.pick(this.props, ["billMonth", "paymentOrganization"]) };
|
||||
this.setState({ loading: true });
|
||||
API.getNormalList({ ...payload, ...pageInfo, ...formParams }).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: { columns, list: dataSource, pageNum: current, pageSize, total } } = data;
|
||||
this.setState({ pageInfo: { current, pageSize, total }, columns, dataSource }, () => this.postMessageToChild());
|
||||
}
|
||||
});
|
||||
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }).then(({ status, data }) => {
|
||||
if (status && data === "1" && !pageTurning) {
|
||||
API.getNormalListSum({ ...payload, ...pageInfo, ...formParams })
|
||||
.then(({ status: sumStatus, data: sumData }) => {
|
||||
if (sumStatus) this.setState({ sumRow: sumData.sumRow }, () => this.postMessageToChild());
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
getSupplementaryList = async (payload = {}) => {
|
||||
const { getSupplementaryList } = this.props.standingBookStore;
|
||||
getSupplementaryList({
|
||||
...payload, pageSize: this.state.pageSize
|
||||
}).then(({ list, columns = [], total }) => {
|
||||
this.setState({
|
||||
tableData: { list, columns, total }
|
||||
}, () => this.postMessageToChild());
|
||||
getSupplementaryList = (pageTurning = false) => {
|
||||
const { pageInfo, formParams } = this.state;
|
||||
const payload = { ..._.pick(this.props, ["billMonth", "paymentOrganization"]) };
|
||||
this.setState({ loading: true });
|
||||
API.getSupplementaryList({ ...payload, ...pageInfo, ...formParams }).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: { columns, list: dataSource, pageNum: current, pageSize, total } } = data;
|
||||
this.setState({ pageInfo: { current, pageSize, total }, columns, dataSource }, () => this.postMessageToChild());
|
||||
}
|
||||
});
|
||||
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }).then(({ status, data }) => {
|
||||
if (status && data === "1" && !pageTurning) {
|
||||
API.getSupplementaryListSum({ ...payload, ...pageInfo, ...formParams })
|
||||
.then(({ status: sumStatus, data: sumData }) => {
|
||||
if (sumStatus) this.setState({ sumRow: sumData.sumRow }, () => this.postMessageToChild());
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
onSelectChange = selectedRowKeys => {
|
||||
this.setState({ selectedRowKeys });
|
||||
};
|
||||
handleBatchDelete = () => {
|
||||
const { siaccountCommonDelete } = this.props.standingBookStore;
|
||||
const { list } = this.state.tableData;
|
||||
const { selectedRowKeys } = this.state;
|
||||
const { selectedRowKeys, dataSource, pageInfo } = this.state;
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
message.warning("未勾选数据!");
|
||||
} else {
|
||||
const includes = _.map(
|
||||
_.filter(list, it => selectedRowKeys.includes(it.id)),
|
||||
item => item.employeeId
|
||||
);
|
||||
const ids = _.map(
|
||||
_.filter(list, it => selectedRowKeys.includes(it.id)),
|
||||
item => item.id
|
||||
);
|
||||
Modal.confirm({
|
||||
title: "确认信息",
|
||||
content: "确认删除勾选的数据吗?",
|
||||
onOk: () => {
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timerDelete = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 10
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timerDelete);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => {
|
||||
message.success("删除成功");
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length)
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length),
|
||||
paymentOrganization
|
||||
});
|
||||
});
|
||||
}
|
||||
}, 800);
|
||||
});
|
||||
|
||||
siaccountCommonDelete({
|
||||
billMonth,
|
||||
includes,
|
||||
ids,
|
||||
paymentOrganization
|
||||
}).then(() => {
|
||||
clearInterval(this.timerDelete);
|
||||
message.success("删除成功");
|
||||
this.setState({ selectedRowKeys: [], progressVisible: false, progress: 0 });
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length)
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length),
|
||||
paymentOrganization
|
||||
const includes = _.map(_.filter(dataSource, it => selectedRowKeys.includes(it.id)), item => item.employeeId);
|
||||
const ids = _.map(_.filter(dataSource, it => selectedRowKeys.includes(it.id)), item => item.id);
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "确认信息"),
|
||||
content: getLabel(111, "确认删除勾选的数据吗?"),
|
||||
onOk: () => {
|
||||
this.setState({ progressVisible: true }, () => {
|
||||
this.timerDelete = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({ progress: this.state.progress + 10 });
|
||||
} else {
|
||||
clearInterval(this.timerDelete);
|
||||
this.setState({
|
||||
progressVisible: false, progress: 0, pageInfo: {
|
||||
...pageInfo, current: calcPageNo(pageInfo.total, pageInfo.current, 10, includes.length)
|
||||
}
|
||||
}, () => {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
|
||||
});
|
||||
}
|
||||
}, 800);
|
||||
});
|
||||
API.siaccountCommonDelete({ billMonth, includes, ids, paymentOrganization })
|
||||
.then(() => {
|
||||
clearInterval(this.timerDelete);
|
||||
this.setState({
|
||||
selectedRowKeys: [], progressVisible: false, progress: 0, pageInfo: {
|
||||
...pageInfo, current: calcPageNo(pageInfo.total, pageInfo.current, 10, includes.length)
|
||||
}
|
||||
}, () => {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
handleAdd = () => this.setState({ addProps: { ...this.state.addProps, title: "添加缴纳人员", visible: true } });
|
||||
handleAdd = () => this.setState({
|
||||
addProps: { ...this.state.addProps, title: getLabel(111, "添加缴纳人员"), visible: true }
|
||||
});
|
||||
handleCommonAccountClick = () => {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { commonAccount } = this.props.standingBookStore;
|
||||
commonAccount({ billMonth, paymentOrganization, includes: [] });
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
const { billMonth, paymentOrganization, selectedKey } = this.props;
|
||||
const promise = API.commonAccount({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), includes: [] });
|
||||
this.setState({ progressVisible: true }, () => {
|
||||
this.timer = setInterval(() => {
|
||||
getCalculateProgress(billMonth, paymentOrganization).then(({ status, data }) => {
|
||||
if (status) {
|
||||
if (!data.status) {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
message.error(data.message);
|
||||
}
|
||||
if (this.state.progress !== 100) {
|
||||
|
|
@ -294,86 +191,68 @@ export default class NormalIndex extends Component {
|
|||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
progressVisible: false, progress: 0
|
||||
}, () => {
|
||||
message.success("核算成功");
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
});
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.getNormalList();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}
|
||||
}).catch(() => {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
});
|
||||
}, 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);
|
||||
}
|
||||
});
|
||||
const { normalPayer, pageInfo } = this.state, { current, pageSize, total } = pageInfo;
|
||||
API.addSocialAcctEmp({
|
||||
..._.pick(this.props, ["billMonth", "paymentOrganization"]), includes: normalPayer.split(",")
|
||||
}).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current: calcPageNo(total, current, pageSize, normalPayer.split(",").length) }
|
||||
}, () => this.getNormalList());
|
||||
} 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);
|
||||
}
|
||||
});
|
||||
|
||||
const { selectedRowKeys: ids, pageInfo } = this.state, { current, pageSize, total } = pageInfo;
|
||||
API.deleteSocialAcctEmp({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), ids })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({
|
||||
selectedRowKeys: [],
|
||||
pageInfo: { ...pageInfo, current: calcPageNo(total, current, pageSize, ids.length) }
|
||||
}, () => this.getNormalList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleExport = () => {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { selectedKey } = this.props;
|
||||
const urlObj = {
|
||||
"1": "/api/bs/hrmsalary/welfare/common/export",
|
||||
"3": "/api/bs/hrmsalary/welfare/supplementary/export"
|
||||
};
|
||||
const url = `${window.location
|
||||
.origin}${urlObj[selectedKey]}?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
window.open(url, "_self");
|
||||
.origin}${urlObj[selectedKey]}?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`;
|
||||
window.open(url, "_blank");
|
||||
};
|
||||
handleEditNormalStandingBook = (record) => {
|
||||
const { userName, id: editId } = record;
|
||||
|
|
@ -387,50 +266,36 @@ export default class NormalIndex extends Component {
|
|||
this.setState({
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
|
||||
}, () => {
|
||||
if (refreshList) {
|
||||
const { current } = this.state;
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current
|
||||
});
|
||||
}
|
||||
if (refreshList) this.props.selectedKey === "1" ? this.getNormalList() : this.getSupplementaryList();
|
||||
});
|
||||
};
|
||||
getSearchs = () => {
|
||||
return <WeaSearchGroup needTigger showGroup title="其他条件">
|
||||
const { formParams } = this.state, { workcode, departmentIds, subCompanyIds } = formParams;
|
||||
return <WeaSearchGroup needTigger showGroup title="">
|
||||
<Row>
|
||||
<Col span={12}><WeaFormItem label="工号" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInput
|
||||
value={this.state.workcode}
|
||||
onChange={v => this.setState({ workcode: v })}
|
||||
/>
|
||||
<Col span={12}><WeaFormItem label={getLabel(111, "工号")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInput value={workcode} onChange={v => this.setState({ formParams: { ...formParams, 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 })}/>
|
||||
isSingle={false} value={departmentIds.join(",")} type={57}
|
||||
onChange={v => this.setState({ formParams: { ...formParams, departmentIds: v.split(",") } })}/>
|
||||
</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 })}/>
|
||||
isSingle={false} value={subCompanyIds.join(",")} type={164}
|
||||
onChange={v => this.setState({ formParams: { ...formParams, subCompanyIds: v.split(",") } })}/>
|
||||
</WeaFormItem></Col>
|
||||
</Row>
|
||||
</WeaSearchGroup>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { remarks, billMonth, selectedKey, paymentOrganization, standingBookStore } = this.props;
|
||||
const { addProps, adjustSlide, importParams, returnEditPersonSlide, showSearchAd, selectedRowKeys } = this.state;
|
||||
const { loading } = standingBookStore;
|
||||
const { remarks, billMonth, selectedKey, paymentOrganization, type } = this.props;
|
||||
const {
|
||||
formParams, addProps, adjustSlide, importParams, returnEditPersonSlide,
|
||||
showSearchAd, selectedRowKeys, loading
|
||||
} = this.state;
|
||||
const btn1 = [
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatchDelete}/>,
|
||||
|
|
@ -441,13 +306,13 @@ export default class NormalIndex extends Component {
|
|||
<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())}
|
||||
>
|
||||
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="ghost"
|
||||
onClick={() => this.setState({ adjustSlide: { ...adjustSlide, visible: true } })}>调差</Button>
|
||||
<Button type="primary" onClick={this.handleCommonAccountClick}>{getLabel(111, "核算")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({
|
||||
adjustSlide: { ...adjustSlide, visible: true }
|
||||
})}>{getLabel(111, "调差")}</Button>
|
||||
];
|
||||
const btn3 = [
|
||||
<i className="iconfont icon-duibi" onClick={() => {
|
||||
|
|
@ -466,10 +331,10 @@ export default class NormalIndex extends Component {
|
|||
<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]);
|
||||
(type !== "detail" && selectedKey === "3") && (btn = [...btn, ...btn1]);
|
||||
(selectedKey === "1" && type !== "detail") && (btn = [...btn, ...btn2]);
|
||||
btn = [...btn5, ...btn];
|
||||
this.props.type !== "detail" && (btn = [...btn4, ...btn]);
|
||||
type !== "detail" && (btn = [...btn4, ...btn]);
|
||||
selectedKey === "1" && (btn = [...btn3, ...btn]);
|
||||
return (
|
||||
<div className="normalWapper">
|
||||
|
|
@ -478,20 +343,16 @@ export default class NormalIndex extends Component {
|
|||
<div className="topContent">
|
||||
<div className="month">
|
||||
<span>
|
||||
账单月份
|
||||
<Tooltip placement="topLeft" title="提示:正常缴纳,账单月份即社保福利缴纳月份">
|
||||
{getLabel(111, "账单月份")}
|
||||
<Tooltip placement="topLeft" title={getLabel(111, "提示:正常缴纳,账单月份即社保福利缴纳月份")}>
|
||||
<Icon type="question-circle"/>
|
||||
</Tooltip>
|
||||
</span>
|
||||
<span>
|
||||
{billMonth}
|
||||
</span>
|
||||
<span>{billMonth}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>备注:</span>
|
||||
<span>
|
||||
{remarks}
|
||||
</span>
|
||||
<span>{getLabel(111, "备注:")}</span>
|
||||
<span>{remarks}</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
|
@ -499,39 +360,26 @@ export default class NormalIndex extends Component {
|
|||
datas={[]} selectedKey="" advanceHeight={200} searchsAd={this.getSearchs()}
|
||||
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
|
||||
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
|
||||
onSearchChange={searchValue => this.setState({ searchValue })}
|
||||
onSearchChange={userName => this.setState({ formParams: { ...formParams, userName } })}
|
||||
buttons={btn} onSearch={this.handleSearch} onAdSearch={this.handleSearch}
|
||||
onAdReset={() => this.setState({ workcode: "" })} searchsBasePlaceHolder="请输入员工姓名"
|
||||
/>
|
||||
<SupplementarySlide
|
||||
{...addProps}
|
||||
billMonth={billMonth} paymentOrganization={paymentOrganization}
|
||||
onCancel={(isRefresh) => {
|
||||
this.setState({
|
||||
addProps: {
|
||||
...addProps,
|
||||
visible: false
|
||||
}
|
||||
}, () => {
|
||||
isRefresh && this.getSupplementaryList({
|
||||
billMonth,
|
||||
current: this.state.current,
|
||||
paymentOrganization
|
||||
});
|
||||
});
|
||||
}}
|
||||
/>
|
||||
onAdReset={() => this.setState({
|
||||
formParams: { userName: "", workcode: "", departmentIds: [], subCompanyIds: [] }
|
||||
})}/>
|
||||
{/*添加补缴弹框*/}
|
||||
<SupplementarySlide {...addProps} {..._.pick(this.props, ["billMonth", "paymentOrganization"])}
|
||||
onCancel={(isRefresh) => {
|
||||
this.setState({ addProps: { ...addProps, visible: false } }, () => {
|
||||
isRefresh && this.getSupplementaryList();
|
||||
});
|
||||
}}/>
|
||||
{/*核算进度条*/}
|
||||
<ProgressModal
|
||||
title={selectedKey === "3" ? "正在删除请稍后" : "正在核算请稍后"}
|
||||
title={selectedKey === "3" ? getLabel(111, "正在删除请稍后") : getLabel(111, "正在核算请稍后")}
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}}
|
||||
progress={this.state.progress}
|
||||
/>
|
||||
onCancel={() => this.setState({ progressVisible: false, progress: 0 })}
|
||||
progress={this.state.progress}/>
|
||||
{/*导入弹框*/}
|
||||
<StandingBookCalcImportDialog {...importParams}
|
||||
<StandingBookCalcImportDialog {...importParams} {..._.pick(this.props, ["billMonth", "paymentOrganization"])}
|
||||
onCancel={(isInit) => this.setState({
|
||||
importParams: { ...importParams, visible: false }
|
||||
}, () => isInit && this.handleSearch())}/>
|
||||
|
|
@ -547,17 +395,9 @@ export default class NormalIndex extends Component {
|
|||
</Spin>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseNormalStandingBookModal}/>
|
||||
<AdjustmentSlide
|
||||
{...adjustSlide}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
adjustSlide: {
|
||||
...adjustSlide,
|
||||
visible: false
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{/*调差*/}
|
||||
<AdjustmentSlide {...adjustSlide} {..._.pick(this.props, ["billMonth", "paymentOrganization"])}
|
||||
onCancel={() => this.setState({ adjustSlide: { ...adjustSlide, visible: false } })}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,107 +6,68 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Icon, Spin, Tooltip } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom";
|
||||
import { getOverViewList } from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
export default class OverViewIndex extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: [],
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
tableData: {
|
||||
list: [],
|
||||
columns: [],
|
||||
total: 0
|
||||
}
|
||||
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { billMonth, paymentOrganization } = this.props;
|
||||
this.getOverViewList({ billMonth, paymentOrganization });
|
||||
this.getOverViewList();
|
||||
}
|
||||
|
||||
getOverViewList = (payload = {}) => {
|
||||
const { getOverViewList } = this.props.standingBookStore;
|
||||
getOverViewList({ ...payload, current: 1 }).then(
|
||||
({ list, columns = [], total }) => {
|
||||
columns = _.map(
|
||||
_.filter(columns, (it) => it.dataIndex !== "id"),
|
||||
(it) => {
|
||||
// if (it.dataIndex === "employeeId") {
|
||||
// it = {
|
||||
// ...it,
|
||||
// width: 150,
|
||||
// fixed: 'left'
|
||||
// }
|
||||
// }
|
||||
return {
|
||||
...it,
|
||||
title: (
|
||||
getOverViewList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
this.setState({ loading: true });
|
||||
getOverViewList({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), ...pageInfo })
|
||||
.then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { current, pageSize, total },
|
||||
columns: _.map(columns, (it) => ({
|
||||
...it, title: (
|
||||
<span dangerouslySetInnerHTML={{ __html: it.title }}></span>
|
||||
)
|
||||
};
|
||||
}
|
||||
);
|
||||
this.setState({
|
||||
tableData: {
|
||||
list,
|
||||
columns,
|
||||
total
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
}))
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleExport = () => {
|
||||
const { billMonth, paymentOrganization } = this.props;
|
||||
const url = `${window.location
|
||||
.origin}/api/bs/hrmsalary/welfare/overView/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
window.open(url, "_self");
|
||||
const url = `/api/bs/hrmsalary/welfare/overView/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`;
|
||||
window.open(url, "_blank");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { remarks, billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { selectedRowKeys } = this.state;
|
||||
const { loading } = this.props.standingBookStore;
|
||||
let { list, columns, total } = this.state.tableData;
|
||||
const { pageInfo, loading, dataSource, columns } = this.state, { billMonth } = this.props;
|
||||
const pagination = {
|
||||
total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
showSizeChanger: true,
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ current, pageSize });
|
||||
this.getOverViewList({
|
||||
billMonth, current,
|
||||
pageSize, paymentOrganization
|
||||
});
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getOverViewList());
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({ current });
|
||||
this.getOverViewList({
|
||||
billMonth, current,
|
||||
pageSize: this.state.pageSize, paymentOrganization
|
||||
});
|
||||
}
|
||||
onChange: current => this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getOverViewList())
|
||||
};
|
||||
return (
|
||||
<div className="normalWapper">
|
||||
<div className="topContent">
|
||||
<div className="month">
|
||||
<span>
|
||||
账单月份
|
||||
<Tooltip
|
||||
placement="topLeft"
|
||||
title="提示:正常缴纳,账单月份即社保福利缴纳月份">
|
||||
{getLabel(111, "账单月份")}
|
||||
<Tooltip placement="topLeft" title={getLabel(111, "提示:正常缴纳,账单月份即社保福利缴纳月份")}>
|
||||
<Icon type="question-circle"/>
|
||||
</Tooltip>
|
||||
</span>
|
||||
|
|
@ -120,14 +81,8 @@ export default class OverViewIndex extends Component {
|
|||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
<Spin spinning={loading}>
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
dataSource={list}
|
||||
loading={loading}
|
||||
pagination={pagination}
|
||||
scroll={{ x: 1200 }}
|
||||
/>
|
||||
<WeaTable rowKey="id" columns={columns} dataSource={dataSource} loading={loading} pagination={pagination}
|
||||
scroll={{ x: 1200 }}/>
|
||||
</Spin>
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import React, { Component } from "react";
|
|||
import { WeaDatePicker, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { Button, Modal } from "antd";
|
||||
import RegSelect from "./regSelect";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
|
||||
class RegAddEmployee extends Component {
|
||||
constructor(props) {
|
||||
|
|
|
|||
|
|
@ -5,10 +5,9 @@
|
|||
* Date: 2022/11/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
|
||||
import { message } from "antd";
|
||||
import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
import { regColumns } from "../constant";
|
||||
import { toDecimal_n } from "../../../../util";
|
||||
|
||||
|
|
@ -20,37 +19,19 @@ class RegEditDetial extends Component {
|
|||
this.state = {
|
||||
loading: false,
|
||||
listMap: [
|
||||
{
|
||||
key: "social",
|
||||
label: "社保",
|
||||
dataSource: [],
|
||||
columns: []
|
||||
},
|
||||
{
|
||||
key: "fund",
|
||||
label: "公积金",
|
||||
dataSource: [],
|
||||
columns: []
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "企业年金及其他福利",
|
||||
dataSource: [],
|
||||
columns: []
|
||||
}
|
||||
{ key: "social", label: getLabel(111, "社保"), dataSource: [], columns: [] },
|
||||
{ key: "fund", label: getLabel(111, "公积金"), dataSource: [], columns: [] },
|
||||
{ key: "other", label: getLabel(111, "企业年金及其他福利"), dataSource: [], columns: [] }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.editId !== this.props.editId && nextProps.editId) {
|
||||
this.getPaymentById(nextProps.editId);
|
||||
}
|
||||
if (nextProps.editId !== this.props.editId && nextProps.editId) this.getPaymentById(nextProps.editId);
|
||||
}
|
||||
|
||||
handleSave = () => {
|
||||
const { editId, onCancel } = this.props;
|
||||
const { listMap } = this.state;
|
||||
const { editId, onCancel } = this.props, { listMap } = this.state;
|
||||
const [socialData, foundData, otherData] = listMap;
|
||||
let payload = {
|
||||
id: editId,
|
||||
|
|
@ -100,8 +81,7 @@ class RegEditDetial extends Component {
|
|||
});
|
||||
};
|
||||
handleChange = (type, dataIndex, value, record) => {
|
||||
const { listMap } = this.state;
|
||||
const [socialData, foundData, otherData] = listMap;
|
||||
const { listMap } = this.state, [socialData, foundData, otherData] = listMap;
|
||||
switch (type) {
|
||||
case "social":
|
||||
const sociallist = _.map(socialData.dataSource, item => {
|
||||
|
|
@ -139,7 +119,6 @@ class RegEditDetial extends Component {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
||||
getPaymentById = (id) => {
|
||||
const payload = { id };
|
||||
|
|
@ -257,39 +236,26 @@ class RegEditDetial extends Component {
|
|||
const { visible, title, onCancel } = this.props;
|
||||
const { listMap, loading } = this.state;
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
visible={visible}
|
||||
top={0}
|
||||
width={48}
|
||||
height={100}
|
||||
direction="right"
|
||||
measure="%"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
loading={loading}
|
||||
subtitle={title}
|
||||
showOperateBtn={true}
|
||||
editable={true}
|
||||
onSave={this.handleSave}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<div className="regEditContentWrapper">
|
||||
{
|
||||
_.map(listMap, item => {
|
||||
const { key, label, dataSource, columns } = item;
|
||||
return <WeaSearchGroup title={label} items={[]} needTigger showGroup key={key}>
|
||||
<WeaTable dataSource={dataSource} columns={columns} pagination={false}/>
|
||||
</WeaSearchGroup>;
|
||||
})
|
||||
}
|
||||
</div>
|
||||
}
|
||||
onClose={() => onCancel()}
|
||||
showMask={true}
|
||||
/>
|
||||
);
|
||||
<WeaSlideModal className="slideOuterWrapper" visible={visible} top={0} width={48}
|
||||
height={100} direction="right" measure="%"
|
||||
title={<WeaTop title={title} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={[<Button type="primary" onClick={this.handleSave}
|
||||
style={{ marginRight: 40 }}
|
||||
loading={loading}>{getLabel(111, "保存")}</Button>]}/>
|
||||
}
|
||||
content={
|
||||
<React.Fragment>
|
||||
{
|
||||
_.map(listMap, item => {
|
||||
const { key, label, dataSource, columns } = item;
|
||||
return <WeaSearchGroup title={label} items={[]} needTigger showGroup key={key}>
|
||||
<WeaTable dataSource={dataSource} columns={columns} pagination={false} bordered/>
|
||||
</WeaSearchGroup>;
|
||||
})
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
onClose={() => onCancel()}/>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,36 +6,27 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Spin } from "antd";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
|
||||
const APIFox = {
|
||||
"regression": API.recessionList,
|
||||
"difference": API.balanceList
|
||||
"regressionSum": API.recessionListSum,
|
||||
"difference": API.balanceList,
|
||||
"differenceSum": API.balanceListSum
|
||||
};
|
||||
|
||||
class RegList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
columns: [],
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
datalistPayload: {},
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
columns: [], dataSource: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false, sumRow: {}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.recessionList();
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
|
|
@ -43,11 +34,11 @@ class RegList extends Component {
|
|||
const { onEdit, onChangeRowkey } = this.props;
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.postMessageToChild();
|
||||
this.recessionList();
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList());
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList({}, true));
|
||||
} else if (id === "ROWSELECT") {
|
||||
const { selectedRowKeys } = params;
|
||||
this.setState({ selectedRowKeys });
|
||||
|
|
@ -58,24 +49,15 @@ class RegList extends Component {
|
|||
}
|
||||
};
|
||||
postMessageToChild = () => {
|
||||
const paymentStatus = this.props.type === "difference" ? "4" : "3";
|
||||
const creator = Number(getQueryString("creator"));
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const { pageInfo, dataSource, columns, selectedRowKeys, datalistPayload } = this.state;
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, pageInfo,
|
||||
selectedRowKeys, selectedKey: this.props.type,
|
||||
sumpayload: { billMonth, paymentOrganization, creator, paymentStatus, ...datalistPayload },
|
||||
showOperates: !getQueryString("type")
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
..._.pick(this.state, ["dataSource", "columns", "pageInfo", "selectedRowKeys", "sumRow"]),
|
||||
showOperates: !this.props.type
|
||||
}), "*");
|
||||
};
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible) {
|
||||
this.recessionList();
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible) this.recessionList();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
@ -85,41 +67,37 @@ class RegList extends Component {
|
|||
handleResetSelectRowKeys = (selectedRowKeys) => {
|
||||
this.setState({ selectedRowKeys });
|
||||
};
|
||||
recessionList = (module) => {
|
||||
const { type } = this.props;
|
||||
const { loading, pageInfo } = this.state;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const creator = Number(getQueryString("creator"));
|
||||
const paymentStatus = type === "difference" ? "4" : "3";
|
||||
recessionList = (module, pageTurning = false) => {
|
||||
const { regType } = this.props, { pageInfo } = this.state;
|
||||
const paymentStatus = regType === "difference" ? "4" : "3";
|
||||
const payload = {
|
||||
billMonth, paymentStatus,
|
||||
creator, paymentOrganization,
|
||||
...pageInfo,
|
||||
...module
|
||||
...pageInfo, ...module, paymentStatus,
|
||||
..._.pick(this.props, ["billMonth", "paymentOrganization", "creator"])
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
APIFox[type](payload).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
this.setState({ loading: true });
|
||||
APIFox[regType](payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: list } = data;
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = list;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns,
|
||||
datalistPayload: module
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns
|
||||
}, () => this.postMessageToChild());
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
});
|
||||
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }).then(({ status, data }) => {
|
||||
if (status && data === "1" && !pageTurning) {
|
||||
APIFox[`${regType}Sum`](payload).then(({ status: sumStatus, data: sumData }) => {
|
||||
if (sumStatus) this.setState({ sumRow: sumData.sumRow }, () => this.postMessageToChild());
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
return (
|
||||
<Spin spinning={loading.query}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/standingbookTable"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import {
|
|||
WeaSearchGroup,
|
||||
WeaTab
|
||||
} from "ecCom";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -27,8 +26,7 @@ class RegTop extends Component {
|
|||
}
|
||||
|
||||
renderTopBtns = () => {
|
||||
const { onChange, selectKey, type: regtopType } = this.props;
|
||||
const type = getQueryString("type");
|
||||
const { onChange, selectKey, regtopType, type } = this.props;
|
||||
let dom = [
|
||||
<WeaHelpfulTip
|
||||
title={
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import RegTop from "./regTop";
|
|||
import RegList from "./regList";
|
||||
import RegAddEmployee from "./regAddEmployee";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
import { calcPageNo } from "../../../../util";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
|
|
@ -52,12 +52,8 @@ class Regression extends Component {
|
|||
};
|
||||
handleSave = (params) => {
|
||||
const { loading } = this.state;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const payload = {
|
||||
...params,
|
||||
billMonth,
|
||||
paymentOrganization
|
||||
...params, ..._.pick(this.props, ["billMonth", "paymentOrganization"])
|
||||
};
|
||||
this.setState({ loading: { ...loading, save: true } });
|
||||
API.saveRecession(payload).then(({ status, errormsg }) => {
|
||||
|
|
@ -76,9 +72,6 @@ class Regression extends Component {
|
|||
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");
|
||||
switch (key) {
|
||||
case "add":
|
||||
this.setState({ returnPersonModal: { ...returnPersonModal, visible: true } });
|
||||
|
|
@ -95,8 +88,8 @@ class Regression extends Component {
|
|||
});
|
||||
break;
|
||||
case "export":
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/recession/export?creator=${creator}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
window.open(url, "_self");
|
||||
const url = `/api/bs/hrmsalary/welfare/recession/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization", "creator"]))}`;
|
||||
window.open(url, "_blank");
|
||||
break;
|
||||
case "search":
|
||||
this.regListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 });
|
||||
|
|
@ -124,21 +117,20 @@ class Regression extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const { returnPersonModal, returnEditPersonSlide, selectKey, loading } = this.state;
|
||||
return (
|
||||
<div className="regressionWrapper">
|
||||
<RegTop
|
||||
type="regression"
|
||||
{..._.pick(this.props, ["billMonth", "type"])}
|
||||
regtopType="regression"
|
||||
ref={dom => this.regTopRef = dom}
|
||||
billMonth={billMonth}
|
||||
onChange={this.handleChangeOpt}
|
||||
selectKey={selectKey}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
{/*<WeaNewScroll height="100%">*/}
|
||||
<RegList
|
||||
type="regression"
|
||||
{..._.pick(this.props, ["billMonth", "paymentOrganization", "creator", "type"])}
|
||||
regType="regression"
|
||||
ref={dom => this.regListRef = dom}
|
||||
visible={returnPersonModal.visible}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
|
|
@ -154,7 +146,6 @@ class Regression extends Component {
|
|||
onCancel={this.handleCloseModal}
|
||||
onSave={this.handleSave}
|
||||
/>
|
||||
{/*</WeaNewScroll>*/}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import { Badge, Button, message } from "antd";
|
|||
import ImportDialog from "../../../../components/importDialog";
|
||||
import ImportHeaderSetDialog from "./importHeaderSetDialog";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -64,17 +63,14 @@ class StandingBookCalcImportDialog extends Component {
|
|||
}
|
||||
};
|
||||
handleExportTemp = () => {
|
||||
const { tmpUrl } = this.props;
|
||||
const { tmpUrl, billMonth, paymentOrganization } = this.props;
|
||||
const { headerFieldsDialog: { selectItems, itemsByGroup } } = this.state;
|
||||
if (_.isEmpty(selectItems)) {
|
||||
message.error(getLabel(111, "请选择表头字段"));
|
||||
} else {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const payload = {
|
||||
billMonth,
|
||||
welfareNames: _.map(_.filter(itemsByGroup, k => selectItems.includes(k.fieldId)), o => o.salaryItemName),
|
||||
paymentOrganization: Number(paymentOrganization)
|
||||
billMonth, paymentOrganization: Number(paymentOrganization),
|
||||
welfareNames: _.map(_.filter(itemsByGroup, k => selectItems.includes(k.fieldId)), o => o.salaryItemName)
|
||||
};
|
||||
const promise = API[tmpUrl](payload);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,16 +6,15 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { message, Modal } from "antd";
|
||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { Picker, SelectWithAll } from "./regAddEmployee";
|
||||
import { Browser } from "../../../dataAcquisition/addItems";
|
||||
import { getPaymentGroup, getSupplementPaymentForm, siaccountSupplementarySave } from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
import BusinessAccounting from "./businessAccounting";
|
||||
import InputPaymentAmount from "./inputPaymentAmount";
|
||||
import { toDecimal_n } from "../../../../util";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -368,49 +367,39 @@ class SupplementarySlide extends Component {
|
|||
];
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="supplementarySlideWrapper"
|
||||
visible={visible}
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={800}
|
||||
measureX="px"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction="right"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={title}
|
||||
tabs={[]}
|
||||
loading={loading}
|
||||
showOperateBtn={showOperateBtn}
|
||||
editable={true}
|
||||
onSave={this.handleSaveSupplementSalary}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<div>
|
||||
<WeaSearchGroup
|
||||
title="基础信息"
|
||||
items={baseInfo.supplementType === "2" ? [...baseItems, ...baseExtraItems] : baseItems}
|
||||
showGroup col={1}
|
||||
/>
|
||||
{/* 按补缴人员的历史月份核算基数和当前档案方案核算 */}
|
||||
{
|
||||
baseInfo.supplementType === "2" &&
|
||||
<BusinessAccounting {...businessAccounting} onChangeBaseItem={this.handleChangeBaseFieldItem}/>
|
||||
}
|
||||
{/* 动输入补缴金额 */}
|
||||
{
|
||||
baseInfo.supplementType === "3" &&
|
||||
<InputPaymentAmount {...inputPaymentAmount} onChangeInputItem={this.handleChangeInputItem}/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
onClose={() => {
|
||||
onCancel();
|
||||
this.handleResetForm();
|
||||
}}
|
||||
<WeaSlideModal className="supplementarySlideWrapper" visible={visible} top={0} measureT="%" width={800}
|
||||
measureX="px" height={100} measureY="%" direction="right"
|
||||
title={
|
||||
<WeaTop title={title} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? [<Button type="primary"
|
||||
onClick={this.handleSaveSupplementSalary}
|
||||
style={{ marginRight: 40 }}
|
||||
loading={loading}>{getLabel(111, "保存")}</Button>] : []}/>
|
||||
}
|
||||
content={
|
||||
<div>
|
||||
<WeaSearchGroup
|
||||
title="基础信息"
|
||||
items={baseInfo.supplementType === "2" ? [...baseItems, ...baseExtraItems] : baseItems}
|
||||
showGroup col={1}
|
||||
/>
|
||||
{/* 按补缴人员的历史月份核算基数和当前档案方案核算 */}
|
||||
{
|
||||
baseInfo.supplementType === "2" &&
|
||||
<BusinessAccounting {...businessAccounting}
|
||||
onChangeBaseItem={this.handleChangeBaseFieldItem}/>
|
||||
}
|
||||
{/* 动输入补缴金额 */}
|
||||
{
|
||||
baseInfo.supplementType === "3" &&
|
||||
<InputPaymentAmount {...inputPaymentAmount} onChangeInputItem={this.handleChangeInputItem}/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
onClose={() => {
|
||||
onCancel();
|
||||
this.handleResetForm();
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaReqTop, WeaTools } from "ecCom";
|
||||
import { getTabList } from "../../../apis/standingBook";
|
||||
import NormalIndex from "./components/normal";
|
||||
import OverViewIndex from "./components/overView";
|
||||
import AbnormalListIndex from "./components/abnormalList";
|
||||
import Regression from "./components/regression";
|
||||
import MakeupDifference from "./components/makeupDifference";
|
||||
|
||||
|
|
@ -20,65 +20,47 @@ const { getLabel } = WeaLocaleProvider;
|
|||
class StandingBookDetail extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "1",
|
||||
tabList: [],
|
||||
remarks: "",
|
||||
billMonth: ""
|
||||
};
|
||||
this.type = "";
|
||||
this.paymentOrganization = "";
|
||||
this.state = { selectedKey: "", tabList: [], welfareRecord: { ...WeaTools.getUrlParams() } };
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getTabList();
|
||||
}
|
||||
|
||||
getTabList = (payload = {}) => {
|
||||
const { getTabList } = this.props.standingBookStore;
|
||||
const billMonth = this.props.location.query.billMonth;
|
||||
this.paymentOrganization = this.props.location.query.paymentOrganization;
|
||||
this.type = this.props.location.query.type;
|
||||
getTabList({ billMonth, paymentOrganization: this.paymentOrganization }).then(({ data }) => {
|
||||
getTabList = () => {
|
||||
const order = [
|
||||
getLabel(111, "正常缴纳"), getLabel(111, "补缴"), getLabel(111, "退差"), getLabel(111, "补差"), getLabel(111, "总览")
|
||||
];
|
||||
const payload = _.pick(this.state.welfareRecord, ["billMonth", "paymentOrganization"]);
|
||||
getTabList(payload).then(({ data }) => {
|
||||
const { tabList, remarks, billMonth } = data;
|
||||
let newTabList = tabList.filter(item => item.id != "2");
|
||||
newTabList.push(newTabList.splice(_.findIndex(newTabList, it => it.id === "4"), 1)[0]);
|
||||
this.setState({
|
||||
selectedKey: newTabList[0].id,
|
||||
tabList: _.map(newTabList, it => ({ title: it.content, key: it.id })),
|
||||
remarks, billMonth
|
||||
selectedKey: _.find(tabList, o => o.content === getLabel(111, "正常缴纳")).id,
|
||||
tabList: tabList.filter(item => item.content !== getLabel(111, "异动清单")).sort((a, b) => (order.indexOf(a.content) - order.indexOf(b.content))),
|
||||
welfareRecord: { ...this.state.welfareRecord, remarks, billMonth }
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, tabList, remarks, billMonth } = this.state;
|
||||
const { selectedKey, tabList, welfareRecord } = this.state;
|
||||
const tabDatas = _.map(tabList, o => ({ key: o.id, title: o.content }));
|
||||
const params = { ...welfareRecord, selectedKey };
|
||||
return (
|
||||
<div className="standingBookDetailWapper">
|
||||
<WeaReqTop
|
||||
title={getLabel(538002, "社保福利台账")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false} tabDatas={tabList} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
>
|
||||
iconBgcolor="#F14A2D" showDropIcon={false} tabDatas={tabDatas} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey, welfareRecord: { ...welfareRecord, selectedKey } })}>
|
||||
{
|
||||
(selectedKey === "1" || selectedKey === "3") &&
|
||||
<NormalIndex selectedKey={selectedKey} remarks={remarks} billMonth={billMonth} type={this.type}
|
||||
paymentOrganization={this.paymentOrganization} location={this.props.location}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "2" &&
|
||||
<AbnormalListIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "4" &&
|
||||
<OverViewIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "5" && <Regression/>
|
||||
}
|
||||
{
|
||||
selectedKey === "6" && <MakeupDifference/>
|
||||
(selectedKey === "1" || selectedKey === "3") && <NormalIndex {...params} {...this.props}/>
|
||||
}
|
||||
{/*退差*/}
|
||||
{selectedKey === "5" && <Regression {...params} {...this.props}/>}
|
||||
{/*补差*/}
|
||||
{selectedKey === "6" && <MakeupDifference {...params} {...this.props}/>}
|
||||
{/*总览*/}
|
||||
{selectedKey === "4" && <OverViewIndex {...params} {...this.props}/>}
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue