hotfix/v2-bug修复-1024

This commit is contained in:
18652063575 2022-10-27 13:58:23 +08:00
parent 216f8c8b93
commit 558db4220b
8 changed files with 71 additions and 43 deletions

View File

@ -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() {

View File

@ -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 {
<Radio.Group onChange={(value) => {
this.beforeAdjustmentTypeChange(value);
}} value={beforeAdjustmentType}>
<Radio value={1}>取调整后薪资</Radio>
<Radio value={2}>分段计薪<WeaHelpfulTip
<Radio value={2}>取调整后薪资</Radio>
<Radio value={4}>分段计薪<WeaHelpfulTip
style={{ marginLeft: "10px" }}
width={200}
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
@ -175,7 +175,7 @@ export default class RuleEditModal extends React.Component {
this.afterAdjustmentTypeChange(value);
}} value={afterAdjustmentType}>
<Radio value={1}>取调整前薪资</Radio>
<Radio value={2}>分段计薪<WeaHelpfulTip
<Radio value={4}>分段计薪<WeaHelpfulTip
style={{ marginLeft: "10px" }}
width={200}
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"

View File

@ -186,17 +186,17 @@ class Index extends Component {
this.timer = null;
number = 1;
this.setState({
progress: 100,
},()=>{
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 || "保存失败!");
}

View File

@ -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);
}
// 表单变化

View File

@ -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);
}
// 获取基数表单

View File

@ -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);
}
// 表单变化

View File

@ -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 &&
<ProgressModal
visible={this.state.progressVisible}
onCancel={() => {
this.setState({ progressVisible: false, progress: 0 });
}}
progress={this.state.progress}
/>
}
{drawerProps.visible && (
<AbnormalDrawer
{...drawerProps}

View File

@ -143,8 +143,8 @@ export class ArchivesStore {
// 查询档案基本信息表单
@action
getBaseForm = (employeeId, welfareTypeEnum ="") => {
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") {