Merge branch 'feature/v2-社保福利档案调差退差-1208' into develop
# Conflicts: # pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js # pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js
This commit is contained in:
commit
abd34580a5
|
|
@ -202,6 +202,14 @@ export const getWelfareList = () => {
|
|||
{}
|
||||
);
|
||||
};
|
||||
// 补差表单字段对应的接口
|
||||
export const getBalanceWelfareList = () => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/siaccount/getBalanceWelfareList",
|
||||
"get",
|
||||
{}
|
||||
);
|
||||
};
|
||||
|
||||
// 社保福利台账-导入预览
|
||||
export const welfarePreview = (params) => {
|
||||
|
|
@ -226,6 +234,17 @@ export const importInsuranceAcctDetail = (params) => {
|
|||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
// 社保福利台账-补差数据导入
|
||||
export const importBalanceInsuranceDetail = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/welfare/importBalanceInsuranceDetail", {
|
||||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
// 社保福利台账-线下对比数据导入
|
||||
export const importExcelInsuranceDetail = (params) => {
|
||||
|
|
@ -251,10 +270,18 @@ export const saveRecession = (params) => {
|
|||
export const recessionList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
|
||||
};
|
||||
//查询补差列表
|
||||
export const balanceList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
|
||||
};
|
||||
//删除退差数据
|
||||
export const delRecession = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
|
||||
};
|
||||
//删除补差数据
|
||||
export const delBalance = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/delBalance", params);
|
||||
};
|
||||
//编辑社保福利缴纳数据
|
||||
export const editAccount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/editAccount", params);
|
||||
|
|
|
|||
|
|
@ -17,10 +17,14 @@ export const queryList = (params) => {
|
|||
export const queryInsuranceTabTotal = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/archives/queryInsuranceTabTotal', params);
|
||||
};
|
||||
//删除待办
|
||||
//删除待办-待增员
|
||||
export const updateRunStatus = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/archives/updateRunStatus', params);
|
||||
};
|
||||
//删除待办-待减员
|
||||
export const cancelStayDel = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/archives/cancelStayDel', params);
|
||||
};
|
||||
//全量增员
|
||||
export const allStayAddToPay = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/archives/allStayAddToPay', 'GET', params);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default class AcctResultImportModal extends React.Component {
|
|||
|
||||
// 获取模板
|
||||
handleAccResultTemplateLink() {
|
||||
const { isStandingBook, standingBookTabKey } = this.props;
|
||||
const { isStandingBook, standingBookTabKey, standingBookType } = this.props;
|
||||
let url = "";
|
||||
if (_.isEmpty(this.state.modalParam.salaryItemIds)) {
|
||||
message.warning("请选择表单字段");
|
||||
|
|
@ -52,6 +52,8 @@ export default class AcctResultImportModal extends React.Component {
|
|||
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/importtemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
} else if (standingBookTabKey === "3") {
|
||||
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/supplyimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
} else if (standingBookType === "difference") {
|
||||
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
}
|
||||
}
|
||||
window.open(url, "_self");
|
||||
|
|
@ -162,8 +164,10 @@ export default class AcctResultImportModal extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
//isStandingBook: 是否是社保福利台账核算的导入标识
|
||||
const { calculateStore, standingBookStore, isStandingBook, visiable } = this.props;
|
||||
//standingBookType: 是否是补差的导入标识
|
||||
const { calculateStore, standingBookStore, isStandingBook, visiable, standingBookType } = this.props;
|
||||
const {
|
||||
fetchPreviewAcctResult,
|
||||
previewAcctResultColumns,
|
||||
|
|
@ -176,7 +180,8 @@ export default class AcctResultImportModal extends React.Component {
|
|||
previewStandingBookAcctResultColumns,
|
||||
previewStandingBookAcctResultDataSource,
|
||||
importStandingBookAcctResult,
|
||||
importInsuranceAcctDetail
|
||||
importInsuranceAcctDetail,
|
||||
importBalanceInsuranceDetail
|
||||
} = standingBookStore;
|
||||
const { step, selectFieldVisible, modalParam } = this.state;
|
||||
return (
|
||||
|
|
@ -184,6 +189,7 @@ export default class AcctResultImportModal extends React.Component {
|
|||
{
|
||||
visiable && <ImportModal
|
||||
isStandingBook={isStandingBook}
|
||||
standingBookType={standingBookType}
|
||||
init={() => {
|
||||
this.handleImportModalInit();
|
||||
}}
|
||||
|
|
@ -200,7 +206,11 @@ export default class AcctResultImportModal extends React.Component {
|
|||
!isStandingBook ? fetchPreviewAcctResult(params) : welfarePreview(params);
|
||||
}}
|
||||
importFile={(params) => {
|
||||
!isStandingBook ? fetchImportAcctResult(params) : importInsuranceAcctDetail(params);
|
||||
!isStandingBook ?
|
||||
fetchImportAcctResult(params) :
|
||||
standingBookType === "difference" ?
|
||||
importBalanceInsuranceDetail({...params, billMonth}) :
|
||||
importInsuranceAcctDetail(params);
|
||||
}}
|
||||
templateLink={() => {
|
||||
this.handleAccResultTemplateLink();
|
||||
|
|
@ -215,6 +225,7 @@ export default class AcctResultImportModal extends React.Component {
|
|||
{
|
||||
selectFieldVisible && <SelectFieldModal
|
||||
isStandingBook={isStandingBook}
|
||||
standingBookType={standingBookType}
|
||||
id={this.props.id}
|
||||
visible={selectFieldVisible}
|
||||
fieldData={this.props.fieldData}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import { Button, Col, Row } from "antd";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { WeaCheckbox, WeaDialog } from "ecCom";
|
||||
|
||||
const APIFox = {};
|
||||
|
||||
@inject("calculateStore", "standingBookStore")
|
||||
@observer
|
||||
export default class SelectFieldModal extends React.Component {
|
||||
|
|
@ -14,7 +16,11 @@ export default class SelectFieldModal extends React.Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { calculateStore: { getImportField }, standingBookStore: { getWelfareList }, isStandingBook } = this.props;
|
||||
const {
|
||||
calculateStore: { getImportField },
|
||||
standingBookStore: { getWelfareList, getBalanceWelfareList },
|
||||
isStandingBook, standingBookType
|
||||
} = this.props;
|
||||
if (!isStandingBook) {
|
||||
getImportField(this.props.id).then(data => {
|
||||
let fieldData = {};
|
||||
|
|
@ -43,7 +49,8 @@ export default class SelectFieldModal extends React.Component {
|
|||
this.fieldData = fieldData;
|
||||
});
|
||||
} else {
|
||||
getWelfareList().then(result => {
|
||||
const APIFox = standingBookType === "difference" ? getBalanceWelfareList : getWelfareList;
|
||||
APIFox().then(result => {
|
||||
let fieldData = {};
|
||||
let formulaItems = [];
|
||||
formulaItems = _.map(result, it => ({ ...it, salaryItemId: it.salaryItemName }));
|
||||
|
|
@ -146,9 +153,9 @@ export default class SelectFieldModal extends React.Component {
|
|||
const { isStandingBook } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
title='添加表头字段'
|
||||
title="添加表头字段"
|
||||
visible={this.props.visible}
|
||||
style={{width:800}}
|
||||
style={{ width: 800 }}
|
||||
onCancel={() => {
|
||||
this.props.onCancel();
|
||||
}}
|
||||
|
|
@ -161,7 +168,7 @@ export default class SelectFieldModal extends React.Component {
|
|||
<div style={{ minHeight: "20vh", maxHeight: "50vh", overflow: "hidden auto", padding: "16px 20px" }}>
|
||||
{
|
||||
!_.isEmpty(fieldData.formulaItems) &&
|
||||
<div >
|
||||
<div>
|
||||
<div style={{ height: "40px", lineHeight: "40px" }}>
|
||||
<WeaCheckbox content={!isStandingBook ? "公式项" : "全选"} onChange={(value) => {
|
||||
this.handleTitleCheckboxChange(value, "formula");
|
||||
|
|
|
|||
|
|
@ -174,17 +174,17 @@ export default class Archives extends React.Component {
|
|||
placement="bottomRight"
|
||||
content={<Menu onClick={({ key }) => {
|
||||
if (key === "stopSalary") {
|
||||
Modal.warning({
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确定要删除该条待办人员吗?`,
|
||||
onOk: () => this.deleteTodoList({ runStatus: "5", ids: [record.baseInfo] })
|
||||
onOk: () => this.cancelStayDel({ runStatus: "3", ids: [record.baseInfo] })
|
||||
});
|
||||
} else {
|
||||
this.stayDelToStop([record.baseInfo]);
|
||||
}
|
||||
}}>
|
||||
<Menu.Item key="stayDelToStop">减员</Menu.Item>
|
||||
{/*<Menu.Item key="stopSalary">删除待办</Menu.Item>*/}
|
||||
<Menu.Item key="stopSalary">删除待办</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
|
|
@ -401,6 +401,8 @@ export default class Archives extends React.Component {
|
|||
case "suspend":
|
||||
if (key === "1") {
|
||||
this.stayDelToStop(selectedRowKeys);
|
||||
} else if (key === "2") {
|
||||
this.cancelStayDel({ runStatus: "3", ids: selectedRowKeys });
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -454,7 +456,7 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
//删除待办
|
||||
//删除待办-待增员
|
||||
deleteTodoList = (payload) => {
|
||||
API.updateRunStatus(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
|
|
@ -466,6 +468,18 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
//删除待办-待减员
|
||||
cancelStayDel = (payload) => {
|
||||
API.cancelStayDel(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功");
|
||||
this.query();
|
||||
this.onSelectChange([]);
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
getTipChildren = () => {
|
||||
const { selectedKey } = this.state;
|
||||
|
|
@ -649,6 +663,7 @@ export default class Archives extends React.Component {
|
|||
overlay={
|
||||
<Menu onClick={this.handleMenuItemClick}>
|
||||
<Menu.Item key="1">批量减员</Menu.Item>
|
||||
<Menu.Item key="2">批量删除待办</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
type="primary"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import CustomPaginationTable from "../../../components/customPaginationTable";
|
|||
import moment from "moment";
|
||||
import _ from "lodash";
|
||||
import ProgressModal from "../../../components/progressModal";
|
||||
import { getCalculateProgress } from "../../../apis/calculate";
|
||||
import "./index.less";
|
||||
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
|
@ -318,39 +319,54 @@ export default class StandingBook extends React.Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
handleOk = (formVal) => {
|
||||
handleOk = async (formVal) => {
|
||||
const { save } = this.props.standingBookStore;
|
||||
const { billMonth, ...extra } = formVal;
|
||||
const payload = {
|
||||
billMonth: moment(billMonth).format("YYYY-MM"),
|
||||
...extra
|
||||
};
|
||||
save(payload).then(({ data }) => {
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 10
|
||||
});
|
||||
const { data: saveData } = await save(payload);
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
getCalculateProgress(moment(billMonth).format("YYYY-MM")).then(({ status, data }) => {
|
||||
if (status) {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: (Number(data.progress).toFixed(2)) * 100
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => {
|
||||
message.success("核算成功");
|
||||
this.handleClose();
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current: this.state.current
|
||||
});
|
||||
this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "", saveData);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => {
|
||||
message.success("核算成功");
|
||||
this.handleClose();
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current: this.state.current
|
||||
});
|
||||
this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "", data);
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
}).catch(() => {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
});
|
||||
}, 600);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,18 @@
|
|||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.tdEllipsis {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
//退差
|
||||
.regressionWrapper {
|
||||
//退差;补差
|
||||
.regressionWrapper, .differenceWrapper {
|
||||
height: calc(100vh - 47px);
|
||||
overflow: auto;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 补差
|
||||
* Description:
|
||||
* Date: 2022/12/16
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import RegTop from "./regTop";
|
||||
import { message, Modal } from "antd";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import RegList from "./regList";
|
||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
|
||||
class MakeupDifference extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectKey: [],
|
||||
fieldData: {},
|
||||
returnEditPersonSlide: {
|
||||
title: "",
|
||||
editId: "",
|
||||
visible: false
|
||||
},
|
||||
importDiffModal: {
|
||||
visible: false
|
||||
},
|
||||
loading: { save: false }
|
||||
};
|
||||
this.diffListRef = null;
|
||||
this.regTopRef = null;
|
||||
}
|
||||
|
||||
delBalance = () => {
|
||||
const { selectKey: ids } = this.state;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const payload = { ids, billMonth, paymentOrganization };
|
||||
API.delBalance(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.diffListRef.recessionList();
|
||||
this.diffListRef.handleResetSelectRowKeys([]);
|
||||
this.setState({ selectKey: [] });
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChangeOpt = (key) => {
|
||||
const { importDiffModal } = this.state;
|
||||
const name = this.regTopRef.state.name;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
switch (key) {
|
||||
case "delete":
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确定删除数据吗?",
|
||||
onOk: () => this.delBalance()
|
||||
});
|
||||
break;
|
||||
case "import":
|
||||
this.setState({ importDiffModal: { ...importDiffModal, visible: true } });
|
||||
break;
|
||||
case "export":
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/balance/export?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||
window.open(url, "_self");
|
||||
break;
|
||||
case "search":
|
||||
this.diffListRef.recessionList(name);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
handleEdit = (record) => {
|
||||
const { userName, id: editId } = record;
|
||||
const { returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: true, title: userName, editId }
|
||||
});
|
||||
};
|
||||
handleCloseModal = () => {
|
||||
const { returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const { selectKey, importDiffModal, fieldData, returnEditPersonSlide } = this.state;
|
||||
return (
|
||||
<div className="differenceWrapper">
|
||||
<RegTop
|
||||
type="difference"
|
||||
ref={dom => this.regTopRef = dom}
|
||||
billMonth={billMonth}
|
||||
onChange={this.handleChangeOpt}
|
||||
selectKey={selectKey}
|
||||
/>
|
||||
<RegList
|
||||
type="difference"
|
||||
ref={dom => this.diffListRef = dom}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
onEdit={this.handleEdit}
|
||||
/>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
||||
{/*导入补差*/}
|
||||
{
|
||||
importDiffModal.visible &&
|
||||
<AcctResultImportModal
|
||||
visiable={importDiffModal.visible}
|
||||
fieldData={fieldData}
|
||||
onAdd={fieldData => this.setState({ fieldData })}
|
||||
onCancel={() => {
|
||||
this.setState({ importDiffModal: { ...importDiffModal, visible: false }, fieldData: {} }, () => {
|
||||
const name = this.regTopRef.state.name;
|
||||
this.diffListRef.recessionList(name);
|
||||
});
|
||||
}}
|
||||
isStandingBook
|
||||
standingBookType="difference"
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default MakeupDifference;
|
||||
|
|
@ -14,8 +14,10 @@ import { getQueryString } from "../../../../util/url";
|
|||
import ProgressModal from "../../../../components/progressModal";
|
||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||
import AdjustmentSlide from "./adjustmentSlide";
|
||||
import { getCalculateProgress } from "../../../../apis/calculate";
|
||||
import _ from "lodash";
|
||||
import "./index.less";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
|
|
@ -46,6 +48,11 @@ export default class NormalIndex extends Component {
|
|||
fieldData: {}, //选中的表单头信息
|
||||
importParams: { //导入信息的弹框表示
|
||||
visible: false
|
||||
},
|
||||
returnEditPersonSlide: {
|
||||
title: "",
|
||||
editId: "",
|
||||
visible: false
|
||||
}
|
||||
};
|
||||
this.timer = null;
|
||||
|
|
@ -192,7 +199,6 @@ export default class NormalIndex extends Component {
|
|||
...it,
|
||||
width: 150,
|
||||
fixed: "left",
|
||||
|
||||
render: (text, r) => {
|
||||
const { userName, employeeId } = r;
|
||||
return (
|
||||
|
|
@ -362,40 +368,52 @@ export default class NormalIndex extends Component {
|
|||
handleCommonAccountClick() {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { commonAccount } = this.props.standingBookStore;
|
||||
commonAccount({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
includes: []
|
||||
}).then(() => {
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 10
|
||||
});
|
||||
commonAccount({ billMonth, paymentOrganization, includes: [] });
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
getCalculateProgress(billMonth).then(({ status, data }) => {
|
||||
if (status) {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: (Number(data.progress).toFixed(2)) * 100
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => {
|
||||
message.success("核算成功");
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
message.success("核算成功");
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
}).catch(() => {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
});
|
||||
}, 600);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -410,15 +428,25 @@ export default class NormalIndex extends Component {
|
|||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
handleEditNormalStandingBook = (record) => {
|
||||
const { userName, id: editId } = record;
|
||||
const { returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: true, title: userName, editId }
|
||||
});
|
||||
};
|
||||
handleCloseNormalStandingBookModal = () => {
|
||||
const { returnPersonModal, returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
|
||||
}, () => {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { remarks, billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { selectedRowKeys, addProps, adjustSlide, importParams } = this.state;
|
||||
const {
|
||||
loading,
|
||||
form,
|
||||
condition,
|
||||
saveLoading
|
||||
} = this.props.standingBookStore;
|
||||
const { selectedRowKeys, addProps, adjustSlide, importParams, returnEditPersonSlide } = this.state;
|
||||
const { loading, form, condition, saveLoading } = this.props.standingBookStore;
|
||||
let { list, columns, total } = this.state.tableData;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
|
|
@ -457,9 +485,44 @@ export default class NormalIndex extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
columns = _.map(toJS(columns), item => {
|
||||
if (item.dataIndex === "employeeId") {
|
||||
return { ...item };
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
});
|
||||
columns = [
|
||||
...columns,
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
fixed: "right",
|
||||
width: "120px",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<div className="optWrapper">
|
||||
{
|
||||
selectedKey === '3' &&
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="mr10"
|
||||
onClick={() => this.handleEditNormalStandingBook(record)}
|
||||
>编辑</a>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
];
|
||||
return (
|
||||
<div className="normalWapper">
|
||||
{selectedKey === "1" &&
|
||||
{
|
||||
selectedKey === "1" &&
|
||||
<div className="topContent">
|
||||
<div className="month">
|
||||
<span>
|
||||
|
|
@ -478,7 +541,8 @@ export default class NormalIndex extends Component {
|
|||
{remarks}
|
||||
</span>
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
}
|
||||
<div className="tabOption">
|
||||
{this.props.type !== "detail" && this.props.selectedKey == "3"
|
||||
? <span style={{ display: "flex", alignItems: "center" }}>
|
||||
|
|
@ -624,6 +688,8 @@ export default class NormalIndex extends Component {
|
|||
scroll={{ x: 1200, y: "calc(100vh - 233px)" }}
|
||||
/>
|
||||
</Spin>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseNormalStandingBookModal}/>
|
||||
<AdjustmentSlide
|
||||
{...adjustSlide}
|
||||
onCancel={() => {
|
||||
|
|
|
|||
|
|
@ -30,33 +30,6 @@ class RegAddEmployee extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getEmployeeListByTaxAgent();
|
||||
}
|
||||
|
||||
getEmployeeListByTaxAgent = () => {
|
||||
const { returnPersonInfo, selectPersonInfo } = this.state;
|
||||
const payload = {
|
||||
pageNum: 1,
|
||||
pageSize: 10000,
|
||||
name: null
|
||||
};
|
||||
API.getEmployeeListByTaxAgent(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { list } = data;
|
||||
this.setState({
|
||||
returnPersonInfo: {
|
||||
...returnPersonInfo,
|
||||
employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username }))
|
||||
},
|
||||
selectPersonInfo: {
|
||||
...selectPersonInfo,
|
||||
employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username }))
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
baseInfo: {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ import { getQueryString } from "../../../../util/url";
|
|||
import * as API from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
|
||||
const APIFox = {
|
||||
"regression": API.recessionList,
|
||||
"difference": API.balanceList
|
||||
};
|
||||
|
||||
class RegList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -41,7 +46,8 @@ class RegList extends Component {
|
|||
handleResetSelectRowKeys = (selectedRowKeys) => {
|
||||
this.setState({ selectedRowKeys });
|
||||
};
|
||||
recessionList = (module = {}) => {
|
||||
recessionList = (userName = "") => {
|
||||
const { type } = this.props;
|
||||
const { loading, pageInfo } = this.state;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
|
|
@ -54,7 +60,7 @@ class RegList extends Component {
|
|||
...module
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
API.recessionList(payload).then(({ status, data }) => {
|
||||
APIFox[type](payload).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { pageInfo: list } = data;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class RegTop extends Component {
|
|||
|
||||
renderTopBtns = () => {
|
||||
const { name } = this.state;
|
||||
const { onChange, selectKey } = this.props;
|
||||
const { onChange, selectKey, type: regtopType } = this.props;
|
||||
const type = getQueryString("type");
|
||||
let dom = [
|
||||
<WeaHelpfulTip
|
||||
|
|
@ -44,15 +44,18 @@ class RegTop extends Component {
|
|||
];
|
||||
if (!type) {
|
||||
const [dom1, ...extra] = dom;
|
||||
const domBtn = regtopType === "regression" ?
|
||||
<Button type="primary" size="small" onClick={() => onChange("add")}>
|
||||
<span className="icon-coms-Add-to-hot" title="添加"></span>
|
||||
</Button> :
|
||||
<Button type="primary" size="small" onClick={() => onChange("import")}>
|
||||
<span className="icon-coms02-Import" title="导入"></span>
|
||||
</Button>;
|
||||
dom = [
|
||||
dom1,
|
||||
<Button type="primary" size="small" disabled={_.isEmpty(selectKey)} onClick={() => onChange("delete")}>
|
||||
<span className="icon-coms-form-delete-hot" title="删除"></span>
|
||||
</Button>,
|
||||
<Button type="primary" size="small" onClick={() => onChange("add")}>
|
||||
<span className="icon-coms-Add-to-hot" title="添加"></span>
|
||||
</Button>,
|
||||
...extra
|
||||
</Button>, domBtn, ...extra
|
||||
];
|
||||
}
|
||||
return dom;
|
||||
|
|
|
|||
|
|
@ -125,12 +125,14 @@ class Regression extends Component {
|
|||
return (
|
||||
<div className="regressionWrapper">
|
||||
<RegTop
|
||||
type="regression"
|
||||
ref={dom => this.regTopRef = dom}
|
||||
billMonth={billMonth}
|
||||
onChange={this.handleChangeOpt}
|
||||
selectKey={selectKey}
|
||||
/>
|
||||
<RegList
|
||||
type="regression"
|
||||
ref={dom => this.regListRef = dom}
|
||||
visible={returnPersonModal.visible}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ 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";
|
||||
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
|
|
@ -39,7 +40,7 @@ class StandingBookDetail extends Component {
|
|||
getTabList({ billMonth, paymentOrganization: this.paymentOrganization }).then(({ data }) => {
|
||||
const { tabList, remarks, billMonth } = data;
|
||||
let newTabList = tabList.filter(item => item.id != "2");
|
||||
newTabList[newTabList.length - 2] = newTabList.splice(newTabList.length - 1, 1, newTabList[newTabList.length - 2])[0]
|
||||
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, viewcondition: it.id })),
|
||||
|
|
@ -74,7 +75,10 @@ class StandingBookDetail extends Component {
|
|||
<OverViewIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "5" && <Regression />
|
||||
selectedKey === "5" && <Regression/>
|
||||
}
|
||||
{
|
||||
selectedKey === "6" && <MakeupDifference/>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
import { observable, action, toJS } from "mobx";
|
||||
import { action, observable } from "mobx";
|
||||
import { message } from "antd";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
import { removePropertyCondition } from "../util/response";
|
||||
import _ from "lodash";
|
||||
|
||||
import * as API from "../apis/standingBook";
|
||||
import { importExcelInsuranceDetail } from "../apis/standingBook";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
|
|
@ -44,7 +41,7 @@ export class StandingBookStore {
|
|||
if (status) {
|
||||
// 接口请求成功/失败处理
|
||||
const {
|
||||
pageInfo: { list, columns, total, pageNum },
|
||||
pageInfo: { list, columns, total, pageNum }
|
||||
} = data;
|
||||
resolve({ list, columns, total, pageNum });
|
||||
} else {
|
||||
|
|
@ -66,7 +63,7 @@ export class StandingBookStore {
|
|||
if (status) {
|
||||
// 接口请求成功/失败处理
|
||||
const {
|
||||
pageInfo: { list, columns, total },
|
||||
pageInfo: { list, columns, total }
|
||||
} = data;
|
||||
resolve({ list, columns, total });
|
||||
} else {
|
||||
|
|
@ -88,7 +85,7 @@ export class StandingBookStore {
|
|||
if (status) {
|
||||
// 接口请求成功/失败处理
|
||||
const {
|
||||
pageInfo: { list, columns, total },
|
||||
pageInfo: { list, columns, total }
|
||||
} = data;
|
||||
resolve({ list, columns, total });
|
||||
} else {
|
||||
|
|
@ -131,7 +128,7 @@ export class StandingBookStore {
|
|||
// 接口请求成功/失败处理
|
||||
const {
|
||||
dataKey: { datas },
|
||||
pageInfo: { list, total },
|
||||
pageInfo: { list, total }
|
||||
} = data;
|
||||
this.tableStore.getDatas(datas);
|
||||
resolve({ list, total });
|
||||
|
|
@ -229,7 +226,7 @@ export class StandingBookStore {
|
|||
// 接口请求成功/失败处理
|
||||
const {
|
||||
dataKey: { datas },
|
||||
pageInfo: { list, total },
|
||||
pageInfo: { list, total }
|
||||
} = data;
|
||||
this.tableStore.getDatas(datas);
|
||||
resolve({ list, total });
|
||||
|
|
@ -302,7 +299,7 @@ export class StandingBookStore {
|
|||
action((res) => {
|
||||
if (res.status) {
|
||||
// 接口请求成功/失败处理
|
||||
let condition = removePropertyCondition(res.data.condition)
|
||||
let condition = removePropertyCondition(res.data.condition);
|
||||
this.condition = condition;
|
||||
this.form.initFormFields(condition); // 渲染高级搜索form表单
|
||||
} else {
|
||||
|
|
@ -318,7 +315,7 @@ export class StandingBookStore {
|
|||
action((res) => {
|
||||
if (res.status) {
|
||||
// 接口请求成功/失败处理
|
||||
let condition = removePropertyCondition(res.data.condition)
|
||||
let condition = removePropertyCondition(res.data.condition);
|
||||
this.condition = condition;
|
||||
this.form.initFormFields(condition); // 渲染高级搜索form表单
|
||||
} else {
|
||||
|
|
@ -361,57 +358,70 @@ export class StandingBookStore {
|
|||
commonAccount = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.commonAccount(params).then(res => {
|
||||
if(res.status) {
|
||||
if (res.status) {
|
||||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "接口调用失败!")
|
||||
message.error(res.errormsg || "接口调用失败!");
|
||||
reject();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@action("社保福利台账重新核算")
|
||||
socialSecurityBenefitsRecalculate = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.socialSecurityBenefitsRecalculate(params).then(res => {
|
||||
if(res.status) {
|
||||
if (res.status) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(res.errormsg || "接口调用失败!");
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 获取当前管理员下的所有个税扣缴义务人
|
||||
@action
|
||||
getAdminTaxAgentList = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.getAdminTaxAgentList().then(res => {
|
||||
if(res.status) {
|
||||
if (res.status) {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
message.error(res.errormsg || "接口调用失败!")
|
||||
message.error(res.errormsg || "接口调用失败!");
|
||||
reject();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@action("社保福利台账核算导入信息表头信息列表")
|
||||
getWelfareList = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.getWelfareList().then(res => {
|
||||
if(res.status) {
|
||||
if (res.status) {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
message.error(res.errormsg || "接口调用失败!")
|
||||
message.error(res.errormsg || "接口调用失败!");
|
||||
reject();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
@action("社保福利台账补差导入信息表头信息列表")
|
||||
getBalanceWelfareList = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.getBalanceWelfareList().then(res => {
|
||||
if (res.status) {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
message.error(res.errormsg || "接口调用失败!");
|
||||
reject();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@action
|
||||
setPreviewStandingBookAcctResultDataSource = previewAcctResultDataSource => {
|
||||
|
|
@ -452,6 +462,16 @@ export class StandingBookStore {
|
|||
});
|
||||
};
|
||||
|
||||
@action("社保福利台账-补差数据导入")
|
||||
importBalanceInsuranceDetail = (params) => {
|
||||
API.importBalanceInsuranceDetail(params).then(res => {
|
||||
if (res.status) {
|
||||
this.importStandingBookAcctResult = res.data;
|
||||
} else {
|
||||
message.error(res.errormsg || "导入失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
@action("社保福利台账-核算数据导入")
|
||||
importInsuranceAcctDetail = (params) => {
|
||||
API.importInsuranceAcctDetail(params).then(res => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue