hotfix/2.9.42310.01-社保福利档案非系统人员tab显示控制

This commit is contained in:
黎永顺 2023-10-18 11:09:37 +08:00
parent 0acc570a24
commit 55c6fd80be
4 changed files with 46 additions and 19 deletions

View File

@ -42,7 +42,6 @@ class Index extends Component {
const { salaryTemplateShowSet, salaryTemplateSalaryItemSet: salaryItemSet, salaryBillItemNameSet } = data;
const { data: result } = salaryTemplateShowSet;
const { ...fieldsEchoData } = { ...result, ...toJS(tmplDataSource) };
console.log(111, toJS(tmplDataSource), { ...result, ...toJS(tmplDataSource) });
this.setState({
conditions: _.map(tempNormalSetConditions, it => {
if (it.title === "themeSet") {

View File

@ -33,10 +33,10 @@ class Index extends Component {
this.setState({
replenishSalaryTemplateSalaryItemSet, salaryBillItemNameSet
}, () => {
// setTmplDataSource({
// ...toJS(tmplDataSource),
// replenishSalaryItemSetting: replenishSalaryTemplateSalaryItemSet
// });
setTmplDataSource({
...toJS(tmplDataSource),
replenishSalaryItemSetting: replenishSalaryTemplateSalaryItemSet
});
});
}
});

View File

@ -182,7 +182,7 @@ class Index extends Component {
<UpdatePayrollTemplateSlide {...tmplSlide}
onClose={v => this.setState({
tmplSlide: { ...tmplSlide, visible: false, copyId: "" }
}, () => v === "refresh" && console.log(this.props))}
}, () => v === "refresh" && this.getPayrollTemplateList(this.props))}
/>
</React.Fragment>

View File

@ -49,10 +49,8 @@ class Index extends Component {
autoAckDays: Number(autoAckDays),
replenishRule: replenishRule === "0" ? "" : replenishRule
};
this.setState({
current: this.state.current + 1
}, () => {
setTmplDataSource(payload);
setTmplDataSource(payload);
this.setState({ current: this.state.current + 1 }, () => {
initPayrollTempForm();
initPayrollTempFeedbackForm();
});
@ -77,11 +75,8 @@ class Index extends Component {
salaryItemZeroStatus: salaryItemZeroStatus === "1",
salaryItemNullStatus: salaryItemNullStatus === "1"
};
this.setState({
current: this.state.current + 1
}, () => {
setTmplDataSource(payload);
});
setTmplDataSource(payload);
this.setState({ current: this.state.current + 1 });
} else {
f.showErrors();
this.forceUpdate();
@ -89,15 +84,35 @@ class Index extends Component {
});
};
savePayroll = () => {
const { payrollStore: { tmplDataSource, salaryBillItemNameSetting } } = this.props;
const {
payrollStore: {
tmplDataSource, salaryBillItemNameSetting, initPayrollTempForm, initPayrollTempFeedbackForm,
initPayrollTempNormalForm, setTmplDataSource, setSalaryBillItemNameSetting
}
} = this.props;
const payload = { ...toJS(tmplDataSource), salaryBillItemNameSetting: toJS(salaryBillItemNameSetting) };
console.log(payload, tmplDataSource, toJS(salaryBillItemNameSetting));
return;
this.setState({ loading: true });
savePayroll(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
initPayrollTempForm();
initPayrollTempFeedbackForm();
initPayrollTempNormalForm();
setTmplDataSource({});
setSalaryBillItemNameSetting([
{
salaryTemplateId: "",
salaryBillType: 0,
itemShowNameSetting: []
},
{
salaryTemplateId: "",
salaryBillType: 1,
itemShowNameSetting: []
}
]);
message.success(getLabel(30700, "操作成功!"));
this.props.onClose("refresh");
} else {
message.error(errormsg);
}
@ -105,6 +120,7 @@ class Index extends Component {
};
renderTitle = () => {
const { tmplId } = this.props, { current, loading } = this.state;
const { payrollStore: { payrollTempNormalForm, setTmplDataSource, tmplDataSource } } = this.props;
return <div className="payroll-title-flex titleDialog">
<div className="titleCol titleLeftBox">
<div className="titleIcon"><i className="icon-coms-fa"/></div>
@ -117,7 +133,19 @@ class Index extends Component {
current === 1 ?
<React.Fragment>
<Button type="ghost"
onClick={() => this.setState({ current: current - 1 })}>{getLabel(1876, "上一步")}</Button>
onClick={() => {
const {
salaryItemNullStatus, salaryItemZeroStatus,
background, ...extra
} = payrollTempNormalForm.getFormParams();
const payload = {
...toJS(tmplDataSource), ...extra,
salaryItemZeroStatus: salaryItemZeroStatus === "1",
salaryItemNullStatus: salaryItemNullStatus === "1"
};
setTmplDataSource(payload);
this.setState({ current: current - 1 });
}}>{getLabel(1876, "上一步")}</Button>
<Button type="primary" onClick={this.normalSave}>{getLabel(1402, "下一步")}</Button>
<Button type="ghost">{getLabel(221, "预览")}</Button>
</React.Fragment> :