Merge branch 'feature/2.10.1.2401.01-社保福利台账列表页面重构' into feature/2.10.1.2401.01-页面操作日志添加
This commit is contained in:
commit
169f90d44b
|
|
@ -1,56 +0,0 @@
|
|||
import { WeaTools } from 'ecCom';
|
||||
|
||||
//台账
|
||||
export const getRecordList = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/batch/list', 'get', params);
|
||||
};
|
||||
export const getCalcForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/accountForm', 'get', params);
|
||||
};
|
||||
export const save = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/save', 'post', params);
|
||||
};
|
||||
export const doArchive = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/file', 'post', params);
|
||||
};
|
||||
export const deleteRecord = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/delete', 'post', params);
|
||||
};
|
||||
|
||||
//核算
|
||||
export const getCalcTabs = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/tabList', 'get', params);
|
||||
};
|
||||
export const getNormalForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/commonForm', 'get', params);
|
||||
};
|
||||
export const saveNormalForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/common/save', 'post', params);
|
||||
};
|
||||
export const deleteNormal = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/common/delete', 'post', params);
|
||||
};
|
||||
export const getSupplementaryForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/querySupplementaryForm', 'get', params);
|
||||
};
|
||||
export const saveSupplementaryForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/supplementary/save', 'post', params);
|
||||
};
|
||||
export const deleteSupplementary = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/siaccount/supplementary/delete', 'post', params);
|
||||
};
|
||||
|
||||
// 导出正常缴纳核算
|
||||
export const exportNormalPaymentAccount = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/common/export', 'post', params);
|
||||
};
|
||||
|
||||
// 导出总览
|
||||
export const exportOverView = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/overview/export', 'post', params);
|
||||
};
|
||||
|
||||
// 导出补缴核算
|
||||
export const exportSupplementaryAccount = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/supplementary/export', 'post', params);
|
||||
};
|
||||
|
|
@ -8,7 +8,8 @@ import MySalary from "./pages/mySalaryBenefits";
|
|||
import Programme from "./pages/socialSecurityBenefits/programme";
|
||||
// import Archivess from "./pages/socialSecurityBenefits/archives";
|
||||
import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
|
||||
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
|
||||
import StandingBookDemo from "./pages/socialSecurityBenefits/standingBook";
|
||||
import StandingBook from "./pages/socialSecurityBenefits/standingBook/standingBook";//社保福利台账重构页面
|
||||
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
||||
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
||||
import SalaryItem from "./pages/salaryItem";
|
||||
|
|
@ -130,6 +131,7 @@ const Routes = (
|
|||
<Route key="programme" path="programme" component={Programme}/>
|
||||
<Route key="archives" path="archives" component={Archives}/>
|
||||
{/*<Route key="archives_demo" path="archives_demo" component={Archivess}/>*/}
|
||||
<Route key="standingBook_demo" path="standingBook_demo" component={StandingBookDemo}/>
|
||||
<Route key="standingBook" path="standingBook" component={StandingBook}/>
|
||||
<Route
|
||||
key="standingBookDetail"
|
||||
|
|
|
|||
|
|
@ -41,3 +41,23 @@ export const socialAccountConditions = [
|
|||
title: ""
|
||||
}
|
||||
];
|
||||
export const welfareRQConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgents"],
|
||||
fieldcol: 8,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
viewAttr: 2,
|
||||
multiple: true
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: ""
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:社保福利台账重构-列表
|
||||
* Description:
|
||||
* Date: 2024/1/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { getIframeParentHeight } from "../../../../util";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import { convertToUrlString } from "../../../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class WelfareRecordList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, dataSource: [], columns: [],
|
||||
pageInfo: { current: 0, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.getWelfareRecordList();
|
||||
} else if (type === "turn") {
|
||||
const module = {
|
||||
billMonth: params.billMonth,
|
||||
paymentOrganization: params.paymentOrganizationId
|
||||
};
|
||||
switch (id) {
|
||||
case "PAGEINFO":
|
||||
this.setState({ pageInfo: { ...pageInfo, ...params } }, () => this.getWelfareRecordList());
|
||||
break;
|
||||
case "CALC":
|
||||
case "VIEW":
|
||||
const payload = {
|
||||
billMonth: params.billMonth,
|
||||
paymentOrganization: params.paymentOrganizationId,
|
||||
creator: params.creator,
|
||||
type: id === "VIEW" ? "detail" : ""
|
||||
};
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(payload)}`);
|
||||
break;
|
||||
case "DELRC":
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "确认信息"), content: getLabel(388758, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
API.siaccountDelete(module).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.getWelfareRecordList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "RECALC":
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "确认信息"),
|
||||
content: getLabel(111, "重新核算后,此条台账数据将可以删除且可以进行此月份的核算,是否确认取消归档?"),
|
||||
onOk: () => {
|
||||
API.socialSecurityBenefitsRecalculate({ id: params.id })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.getWelfareRecordList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "FILE":
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "确认信息"),
|
||||
content: getLabel(111, "归档后,此条台账数据无法删除且不可以再进行此月份的核算,是否确认归档?"),
|
||||
onOk: () => {
|
||||
API.siaccountFile(module).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.getWelfareRecordList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计"), "已归档": getLabel(18800, "已归档"),
|
||||
"未归档": getLabel(17999, "已归档"), "操作": getLabel(30585, "操作"),
|
||||
"核算": getLabel(538780, "核算"), "归档": getLabel(251, "归档"),
|
||||
"查看": getLabel(33564, "查看"), "重新核算": getLabel(542637, "重新核算"),
|
||||
"删除": getLabel(535052, "删除")
|
||||
};
|
||||
const childFrameObj = document.getElementById("unitTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getWelfareRecordList = () => {
|
||||
const { queryForm, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { pageInfo } = this.state;
|
||||
const payload = { ...pageInfo, ...queryForm, taxAgents: queryForm.taxAgents ? queryForm.taxAgents.split(",") : [] };
|
||||
this.setState({ loading: true });
|
||||
API.getCommonList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: result } = data;
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource, columns
|
||||
}, () => this.postMessageToChild({
|
||||
scrollHeight: 108, dataSource, columns, pageInfo: this.state.pageInfo, showOperateBtn
|
||||
}));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
return (
|
||||
<div className="salary-welfare-record-list"
|
||||
style={{ height: getIframeParentHeight(".wea-new-top-content", dataSource.length, 46) + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/unitTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
|
||||
id="unitTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default WelfareRecordList;
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 社保福利台账重构-查询组件
|
||||
* Description:
|
||||
* Date: 2024/1/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import { welfareRQConditions } from "../columns";
|
||||
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
||||
import moment from "moment";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
class WelfareRecordQuery extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [],
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
API.getAdminTaxAgentList().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
conditions: _.map(welfareRQConditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgents") {
|
||||
return { ...o, options: _.map(data, g => ({ key: g.id.toString(), showname: g.name })) };
|
||||
}
|
||||
return o;
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const { standingBookStore: { welfareRQForm }, onPutAccountOptions } = this.props;
|
||||
welfareRQForm.initFormFields(this.state.conditions);
|
||||
onPutAccountOptions(_.map(data, g => ({ key: g.id.toString(), showname: g.name })));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
renderForm = (form, conditions) => {
|
||||
const { dateRange } = this.state;
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && conditions && conditions.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)} tipPosition="bottom"
|
||||
>
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||
onChange={this.getWelfareRecordList}/>
|
||||
</WeaFormItem>)
|
||||
});
|
||||
});
|
||||
group.push(
|
||||
<WeaSearchGroup col={3} needTigger showGroup={c.defaultshow}
|
||||
items={[
|
||||
{
|
||||
com: (<WeaFormItem label={getLabel(542443, "账单月份")} labelCol={{ span: 4 }}
|
||||
wrapperCol={{ span: 16 }}>
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.setState({ dateRange: v }, () => this.getWelfareRecordList())}/>
|
||||
</WeaFormItem>)
|
||||
},
|
||||
...items
|
||||
]}
|
||||
/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
getWelfareRecordList = () => {
|
||||
const { standingBookStore: { welfareRQForm } } = this.props;
|
||||
const { dateRange } = this.state;
|
||||
const [startTime, endTime] = dateRange;
|
||||
const payload = {
|
||||
...welfareRQForm.getFormParams(), startTime, endTime
|
||||
};
|
||||
this.props.onSearch(payload);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { standingBookStore: { welfareRQForm } } = this.props;
|
||||
const { conditions } = this.state;
|
||||
return (
|
||||
<div className="salary-welfare-record-query">{this.renderForm(welfareRQForm, conditions)}</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default WelfareRecordQuery;
|
||||
|
|
@ -54,3 +54,85 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//社保福利台账页面重构
|
||||
.salary-welfare-record {
|
||||
min-width: 1000px;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
|
||||
.salary-welfare-record-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 8px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.salary-welfare-record-query {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.wea-search-group {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
|
||||
.wea-content, .wea-form-cell {
|
||||
padding: 0;
|
||||
|
||||
.rangePickerBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-select, .ant-select, .ant-select-selection {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.wea-select .wea-select-input .arrow {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 8px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.wea-select .wdb {
|
||||
word-break: break-all !important;
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
.wea-select .wea-select-input {
|
||||
height: 30px;
|
||||
white-space: nowrap;
|
||||
min-width: 100px;
|
||||
max-width: 345px;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
padding: 4px 17px 4px 4px;
|
||||
position: relative;
|
||||
min-height: 30px;
|
||||
border: 1px solid #d9d9d9;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.salary-welfare-record-list {
|
||||
.ant-spin-nested-loading,
|
||||
.ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,147 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 社保福利台账重构
|
||||
* version: 1.0
|
||||
* Description:
|
||||
* Date: 2024/1/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import * as API from "../../../apis/standingBook";
|
||||
import { getCalculateProgress } from "../../../apis/calculate";
|
||||
import WelfareRecordQuery from "./components/welfareRecordQuery";
|
||||
import WelfareRecordList from "./components/welfareRecordList";
|
||||
import Accountdialog from "./components/accountDialog";
|
||||
import ProgressModal from "../../../components/progressModal";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("standingBookStore", "taxAgentStore")
|
||||
@observer
|
||||
class StandingBook extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
queryForm: {
|
||||
startTime: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
endTime: moment(new Date()).endOf("year").format("YYYY-MM"),
|
||||
taxAgents: ""
|
||||
}, progressVisible: false, progress: 0,
|
||||
accountDialog: { visible: false, title: "", loading: false, options: [] }
|
||||
};
|
||||
this.wfListRef = null;
|
||||
this.timer = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 社保福利台账重构-核算
|
||||
* Params:
|
||||
* Date: 2024/1/23
|
||||
*/
|
||||
handleAccount = async (formVal) => {
|
||||
const { billMonth, ...extra } = formVal;
|
||||
const payload = {
|
||||
billMonth: moment(billMonth).format("YYYY-MM"),
|
||||
...extra
|
||||
};
|
||||
this.setState({ accountDialog: { ...this.state.accountDialog, loading: true } });
|
||||
const { data: creator, status, errormsg } = await API.save(payload);
|
||||
if (status) {
|
||||
this.setState({
|
||||
accountDialog: { ...this.state.accountDialog, loading: false },
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
getCalculateProgress(moment(billMonth).format("YYYY-MM")).then(({ status, data }) => {
|
||||
if (status) {
|
||||
if (!data.status) {
|
||||
clearInterval(this.timer);
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
message.error(data.message);
|
||||
return;
|
||||
}
|
||||
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(getLabel(543232, "核算成功"));
|
||||
this.setState({
|
||||
accountDialog: { ...this.state.accountDialog, visible: false }
|
||||
}, () => {
|
||||
this.wfListRef.wrappedInstance.getWelfareRecordList();
|
||||
const calcPayload = { ...payload, creator };
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(calcPayload)}`);
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}
|
||||
}).catch(() => {
|
||||
clearInterval(this.timer);
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
});
|
||||
}, 600);
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
accountDialog: { ...this.state.accountDialog, loading: false },
|
||||
progressVisible: false, progress: 0
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { accountDialog, queryForm } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const rightBtns = [<Button type="primary" onClick={() => this.setState({
|
||||
accountDialog: { ...accountDialog, visible: true, title: getLabel(538780, "核算") }
|
||||
})}>{getLabel(538780, "核算")}</Button>];
|
||||
return (
|
||||
<div className="salary-welfare-record">
|
||||
<WeaTop title={getLabel(538002, "社保福利台账")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []}>
|
||||
<div className="salary-welfare-record-content">
|
||||
<WelfareRecordQuery
|
||||
onSearch={(payload) => {
|
||||
this.setState({
|
||||
queryForm: { ...queryForm, ...payload }
|
||||
}, () => this.wfListRef.wrappedInstance.getWelfareRecordList());
|
||||
}}
|
||||
onPutAccountOptions={options => this.setState({ accountDialog: { ...accountDialog, options } })}
|
||||
/>
|
||||
<WelfareRecordList ref={dom => this.wfListRef = dom} queryForm={queryForm}/>
|
||||
</div>
|
||||
<Accountdialog {...accountDialog}
|
||||
onCancel={() => this.setState({
|
||||
accountDialog: { ...accountDialog, visible: false, title: "", loading: false }
|
||||
})} onOk={this.handleAccount}
|
||||
/>
|
||||
{/*核算进度条*/}
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal visible={this.state.progressVisible} progress={this.state.progress}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 }, () => clearInterval(this.timer));
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</WeaTop>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default StandingBook;
|
||||
|
|
@ -11,6 +11,7 @@ export class StandingBookStore {
|
|||
@action initAccountForm = () => this.accountForm = new WeaForm();
|
||||
@observable addCPForm = new WeaForm(); // 社保台账详情页面,添加补差人员form
|
||||
@action initAddCPForm = () => this.addCPForm = new WeaForm();
|
||||
@observable welfareRQForm = new WeaForm(); // 社保台账页面重构,查询form
|
||||
|
||||
|
||||
@observable tableStore = new TableStore(); // new table
|
||||
|
|
|
|||
|
|
@ -127,9 +127,18 @@ export const padding0 = (num, length) => {
|
|||
return "0." + num;
|
||||
};
|
||||
export const toDecimal_n = (num, decimalPlaces) => {
|
||||
if (num === null || !isFinite(num)) return null
|
||||
if (num === null || !isFinite(num)) return null;
|
||||
if (decimalPlaces < 0) return null;
|
||||
const multiplier = Math.pow(10, decimalPlaces);
|
||||
const roundedNum = Math.round(num * multiplier) / multiplier;
|
||||
return roundedNum.toFixed(decimalPlaces);
|
||||
};
|
||||
//设置ifrme高度
|
||||
export const getIframeParentHeight = (selector, total, extraHeight) => {
|
||||
const dom = document.querySelector(selector);
|
||||
let height = 280;
|
||||
if (dom && total > 0) {
|
||||
height = (parseFloat(dom.style.height) > 620 && total === 10) ? total * 48 + 108: total < 10 ? total * 48 + 108 : parseFloat(dom.style.height) - extraHeight;
|
||||
}
|
||||
return height;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue