diff --git a/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js b/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js index 4306a345..5958e987 100644 --- a/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js +++ b/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js @@ -5,6 +5,7 @@ import { slideStep4Columns } from "./columns"; import "./index.less"; import RuleEditModal from "./step4/RuleEditModal"; import { inject, observer } from "mobx-react"; +import { toJS } from 'mobx'; @inject("ledgerStore") @observer @@ -48,8 +49,13 @@ export default class CalRulesForm extends React.Component { } convertAdjustmentType(index) { - let nameList = ["取调整后薪资", "分段计薪", "取平均"]; - return nameList[Number(index) - 1]; + let nameList = { + 1: '取调薪前薪资', + 2: '取调薪后薪资', + 3: '平均值', + 4: '分段计薪', + }; + return nameList[Number(index)]; } getSalaryItemName(salaryItemId) { @@ -75,7 +81,6 @@ export default class CalRulesForm extends React.Component { rule: resultStr }; }); - } render() { diff --git a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js index 5b5e28ff..bf8876cc 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js @@ -15,7 +15,7 @@ export default class RuleEditModal extends React.Component { this.state = { itemValue: "", effectiveDate: "", - beforeAdjustmentType: 1, + beforeAdjustmentType: 2, afterAdjustmentType: 1, initedSelect: false }; @@ -150,8 +150,8 @@ export default class RuleEditModal extends React.Component { { this.beforeAdjustmentTypeChange(value); }} value={beforeAdjustmentType}> - 取调整后薪资 - 分段计薪取调整后薪资 + 分段计薪 取调整前薪资 - 分段计薪分段计薪{ + progress: 100 + }, () => { this.setState({ - progressVisible: false, - }) + progressVisible: false + }); }); message.success("保存成功"); } else if (progress_statue === "in_progress" && this.timer) { - if (this.state.progress === 90) { + if (this.state.progress >= 90) { this.setState({ - progress: this.state.progress + 90/100 + progress: this.state.progress + (0.001 * this.state.progress) }); } else { this.setState({ @@ -208,11 +208,11 @@ class Index extends Component { this.timer = null; number = 1; this.setState({ - progress: 100, - },()=>{ + progress: 100 + }, () => { this.setState({ - progressVisible: false, - }) + progressVisible: false + }); }); message.error(errormsg || "保存失败!"); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index 0e1d8e91..f7c8ce98 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -12,8 +12,8 @@ export default class AccumulationFundForm extends React.Component { componentWillMount() { const { archivesStore: { getBaseForm, getPaymentForm } } = this.props; - getBaseForm(this.props.employeeId, "ACCUMULATION_FUND"); - getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId); + getBaseForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.paymentOrganization); + getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId, this.props.record.paymentOrganization); } // 表单变化 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index ceff0bf9..5d02b807 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -19,8 +19,8 @@ export default class OtherForm extends React.Component { componentWillMount() { const { archivesStore: { getBaseForm, getPaymentForm } } = this.props; - getBaseForm(this.props.employeeId, "OTHER"); - getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId); + getBaseForm(this.props.employeeId, "OTHER", this.props.record.paymentOrganization); + getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId, this.props.record.paymentOrganization); } // 获取基数表单 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 016cea47..10c16fb5 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -14,8 +14,8 @@ export default class SocialSecurityForm extends React.Component { componentWillMount() { const { archivesStore } = this.props; const { getBaseForm, getPaymentForm } = archivesStore; - getBaseForm(this.props.employeeId, "SOCIAL_SECURITY"); - getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", 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); } // 表单变化 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index 2c0a7610..3d2fa3ce 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -11,8 +11,7 @@ import AbnormalDrawer from "./components/abnormalDrawer"; import CustomPaginationTable from "../../../components/customPaginationTable"; import moment from "moment"; import _ from "lodash"; - -// import { columns, dataSource } from './columns'; +import ProgressModal from "../../../components/progressModal"; import "./index.less"; const MonthPicker = DatePicker.MonthPicker; @@ -49,7 +48,9 @@ export default class StandingBook extends React.Component { list: [], total: 0 }, - adminData: {} + adminData: {}, + progressVisible: false, + progress: 0 }; this.payload = {}; this.pageInfo = { current: 1, pageSize: 10 }; @@ -248,13 +249,6 @@ export default class StandingBook extends React.Component { `/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}` ); } - - setTimeout(() => { - this.getCommonList({ - ...this.state.tableParams, - current: this.state.current - }); - }, 3000); }; handleOperate = (payload) => { const { siaccountFile, siaccountDelete, deleteLoading } = @@ -318,13 +312,31 @@ export default class StandingBook extends React.Component { ...extra }; save(payload).then(() => { - message.success("核算成功"); - this.handleClose(); - this.getCommonList({ - ...this.state.tableParams, - current: this.state.current + 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.handleClose(); + this.getCommonList({ + ...this.state.tableParams, + current: this.state.current + }); + this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : ""); + }); + } + }, 1000); }); - this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : ""); }); }; @@ -492,6 +504,17 @@ export default class StandingBook extends React.Component { loading={loading} /> )} + {/*核算进度条*/} + { + this.state.progressVisible && + { + this.setState({ progressVisible: false, progress: 0 }); + }} + progress={this.state.progress} + /> + } {drawerProps.visible && ( { - API.getBaseForm({employeeId, welfareTypeEnum}).then(action(res => { + getBaseForm = (employeeId, welfareTypeEnum ="", paymentOrganization="") => { + API.getBaseForm({employeeId, welfareTypeEnum, paymentOrganization}).then(action(res => { if(res.status) { if(welfareTypeEnum == "") { this.baseFormData = res.data.data @@ -166,8 +166,8 @@ export class ArchivesStore { // 查询档案缴纳基数表单 @action - getPaymentForm = (employeeId, welfareTypeEnum, schemeId) => { - API.getPaymentForm({employeeId, welfareTypeEnum, schemeId}).then(res => { + getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization="") => { + API.getPaymentForm({employeeId, welfareTypeEnum, schemeId, paymentOrganization}).then(res => { if(welfareTypeEnum == "SOCIAL_SECURITY") { this.socialSecurityPaymentForm = res.data } else if(welfareTypeEnum == "ACCUMULATION_FUND") {