This commit is contained in:
parent
848598daf3
commit
80bc646682
|
|
@ -7,10 +7,13 @@ export default class ProgressModal extends React.Component {
|
|||
const { title = "正在核算请稍后" } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<Modal title={title} style={{ top: 20 }} visible={this.props.visible}
|
||||
width={this.props.width ? this.props.width : 600} onCancel={() => {
|
||||
this.props.onCancel();
|
||||
}} footer={null}>
|
||||
<Modal
|
||||
title={title} style={{ top: 20 }} visible={this.props.visible}
|
||||
width={this.props.width ? this.props.width : 600}
|
||||
maskClosable={false}
|
||||
onCancel={() => {
|
||||
this.props.onCancel();
|
||||
}} footer={null}>
|
||||
<div>
|
||||
<WeaProgress percent={this.props.progress ? this.props.progress : 0}
|
||||
strokeColor={this.props.color ? this.props.color : "#B37BFA"}/>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
|
||||
import { Button, DatePicker, Dropdown, Menu, Modal } from "antd";
|
||||
|
||||
import { Button, DatePicker, Dropdown, Menu, Modal, message } from "antd";
|
||||
import { WeaInputSearch, WeaRightMenu, WeaTop } from "ecCom";
|
||||
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
|
||||
|
|
@ -12,6 +9,7 @@ import { columns } from "./columns";
|
|||
import moment from "moment";
|
||||
import BaseFormModal from "./baseFormModal";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
||||
|
|
@ -21,6 +19,8 @@ export default class Calculate extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
progressVisible: false,
|
||||
progress: 0,
|
||||
value: "",
|
||||
selectedKey: "0",
|
||||
searchValue: "",
|
||||
|
|
@ -113,7 +113,26 @@ export default class Calculate extends React.Component {
|
|||
handleFile(record) {
|
||||
const { calculateStore: { fileSalaryAcct } } = this.props;
|
||||
fileSalaryAcct(record.id).then(() => {
|
||||
this.handleSearch(this.state.searchValue);
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 10
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => {
|
||||
message.success("归档成功");
|
||||
this.handleSearch(this.state.searchValue);
|
||||
});
|
||||
}
|
||||
}, 800);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -378,6 +397,17 @@ export default class Calculate extends React.Component {
|
|||
}}
|
||||
/>
|
||||
</WeaTop>
|
||||
{/*归档进度条*/}
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}}
|
||||
progress={this.state.progress}
|
||||
/>
|
||||
}
|
||||
{this.state.baseFormVisible &&
|
||||
<BaseFormModal
|
||||
visible={this.state.baseFormVisible}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import { getQueryString } from "../../util/url";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import "./index.less";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -15,6 +16,8 @@ export default class SalaryDetail extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
progressVisible: false,
|
||||
progress: 0,
|
||||
columnIndex: "",
|
||||
visible: false,
|
||||
slideVisiable: false,
|
||||
|
|
@ -39,6 +42,7 @@ export default class SalaryDetail extends React.Component {
|
|||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleClick, false);
|
||||
this.timer && clearTimeout(this.timer);
|
||||
this.timerLock && clearTimeout(this.timerLock);
|
||||
}
|
||||
|
||||
handleClick = ({ data }) => {
|
||||
|
|
@ -116,9 +120,27 @@ export default class SalaryDetail extends React.Component {
|
|||
salaryItemId,
|
||||
salaryAcctRecordId
|
||||
};
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timerLock = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 10
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => {
|
||||
message.success("操作成功");
|
||||
});
|
||||
}
|
||||
}, 800);
|
||||
});
|
||||
updateLockStatus(module).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功");
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const payload = {
|
||||
type: "PR",
|
||||
|
|
@ -212,6 +234,17 @@ export default class SalaryDetail extends React.Component {
|
|||
<WarningModal visible={this.state.visible} onCancel={() => {
|
||||
this.setState({ visible: false });
|
||||
}}/>
|
||||
{/*加锁解锁进度条*/}
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}}
|
||||
progress={this.state.progress}
|
||||
/>
|
||||
}
|
||||
{
|
||||
slideVisiable &&
|
||||
<WeaSlideModal
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default class AccumulationFundForm extends React.Component {
|
|||
{/*</Row>*/}
|
||||
</GroupCard>
|
||||
{
|
||||
paymentItems && paymentItems.map(group => (
|
||||
data.fundSchemeId && paymentItems && paymentItems.map(group => (
|
||||
<div>
|
||||
{
|
||||
group.items && group.items.length > 0 && <GroupCard title={group.title}>
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ export default class OtherForm extends React.Component {
|
|||
|
||||
</GroupCard>
|
||||
{
|
||||
paymentItems && paymentItems.map(group => (
|
||||
data.otherSchemeId && paymentItems && paymentItems.map(group => (
|
||||
<div>
|
||||
{
|
||||
group.items && group.items.length > 0 && <GroupCard title={group.title}>
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ export default class SocialSecurityForm extends React.Component {
|
|||
componentWillMount() {
|
||||
const { archivesStore } = this.props;
|
||||
const { getBaseForm, getPaymentForm } = archivesStore;
|
||||
const siSchemeId = this.props.record.siSchemeId;
|
||||
getBaseForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.paymentOrganization);
|
||||
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId, this.props.record.paymentOrganization);
|
||||
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", siSchemeId, this.props.record.paymentOrganization);
|
||||
}
|
||||
|
||||
// 表单变化
|
||||
|
|
@ -148,7 +149,7 @@ export default class SocialSecurityForm extends React.Component {
|
|||
</GroupCard>
|
||||
|
||||
{
|
||||
paymentItems && paymentItems.map(group => (
|
||||
data.socialSchemeId && paymentItems && paymentItems.map(group => (
|
||||
<div>
|
||||
{
|
||||
group.items && group.items.length > 0 && <GroupCard title={group.title}>
|
||||
|
|
|
|||
|
|
@ -444,7 +444,6 @@ export class calculateStore {
|
|||
return new Promise((resolve, reject) => {
|
||||
API.fileSalaryAcct({ id }).then(res => {
|
||||
if (res.status) {
|
||||
message.success("归档成功");
|
||||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "归档失败");
|
||||
|
|
|
|||
Loading…
Reference in New Issue