feature/2.12.1.2404.02-薪资核算判断账套是否修改提示
This commit is contained in:
parent
3b90b1def4
commit
eeea664a8a
|
|
@ -26,10 +26,6 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
const promise = this.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
|
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
|
||||||
onAdSearch = (bool = true) => {
|
onAdSearch = (bool = true) => {
|
||||||
this.calcTableRef.wrappedInstance.queryCalcResultList();
|
this.calcTableRef.wrappedInstance.queryCalcResultList();
|
||||||
|
|
@ -57,7 +53,7 @@ class Index extends Component {
|
||||||
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
|
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
|
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
|
||||||
return (<SalaryCalcLayout {...this.props} onConfirm={() => this.onAdSearch(false)}>
|
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
|
||||||
<div className="salary-edit-calc-content">
|
<div className="salary-edit-calc-content">
|
||||||
<div className="salary-flex-between weapp-salary-tb-tip">
|
<div className="salary-flex-between weapp-salary-tb-tip">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -234,3 +234,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loadingLayout {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 30px 50px;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom";
|
import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||||
import { Button, message } from "antd";
|
import { Button, message, Spin } from "antd";
|
||||||
import * as API from "../../../../../apis/calculate";
|
import * as API from "../../../../../apis/calculate";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@ class SalaryCalcLayout extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
fieldInformationConfirm: { visible: false, data: {} }, userConfirmed: "0"
|
fieldInformationConfirm: { visible: false, data: {} }, userConfirmed: "0", show: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28,12 +28,14 @@ class SalaryCalcLayout extends Component {
|
||||||
const { fieldInformationConfirm } = this.state;
|
const { fieldInformationConfirm } = this.state;
|
||||||
const { routeParams: { salaryAcctRecordId: id } } = this.props;
|
const { routeParams: { salaryAcctRecordId: id } } = this.props;
|
||||||
API.getCompareSobConfig({ id }).then(({ status, data }) => {
|
API.getCompareSobConfig({ id }).then(({ status, data }) => {
|
||||||
if (status) {
|
if (status && data) {
|
||||||
this.setState({
|
this.setState({
|
||||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: data }
|
fieldInformationConfirm: { ...fieldInformationConfirm, visible: data }
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.setState({ show: true }, () => this.props.init());
|
||||||
}
|
}
|
||||||
});
|
}).catch(() => this.setState({ show: true }, () => this.props.init()));
|
||||||
};
|
};
|
||||||
onOk = () => {
|
onOk = () => {
|
||||||
const { fieldInformationConfirm } = this.state;
|
const { fieldInformationConfirm } = this.state;
|
||||||
|
|
@ -42,8 +44,12 @@ class SalaryCalcLayout extends Component {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success(getLabel(30700, "操作成功!"));
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
this.setState({
|
this.setState({
|
||||||
|
show: true,
|
||||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||||
}, () => this.props.onConfirm());
|
}, () => {
|
||||||
|
this.props.init();
|
||||||
|
this.props.onConfirm();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
message.error(errormsg);
|
message.error(errormsg);
|
||||||
}
|
}
|
||||||
|
|
@ -51,23 +57,26 @@ class SalaryCalcLayout extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { fieldInformationConfirm, userConfirmed } = this.state;
|
const { fieldInformationConfirm, userConfirmed, show } = this.state;
|
||||||
const buttons = [
|
const buttons = [
|
||||||
<Button type="primary" onClick={this.onOk}
|
<Button type="primary" onClick={this.onOk}
|
||||||
disabled={userConfirmed === "0"}>{getLabel(111, "是,更新账套设置")}</Button>,
|
disabled={userConfirmed === "0"}>{getLabel(111, "是,更新账套设置")}</Button>,
|
||||||
<Button type="ghost" onClick={() => this.setState({
|
<Button type="ghost" onClick={() => this.setState({
|
||||||
|
show: true,
|
||||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||||
})}>{getLabel(111, "否,忽略该提示")}</Button>
|
}, () => this.props.init())}>{getLabel(111, "否,忽略该提示")}</Button>
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{this.props.children}
|
{
|
||||||
|
show ? this.props.children : <div className="loadingLayout"><Spin/></div>
|
||||||
|
}
|
||||||
<WeaDialog
|
<WeaDialog
|
||||||
title={getLabel(131329, "信息确认")} visible={fieldInformationConfirm.visible} initLoadCss hasScroll
|
title={getLabel(131329, "信息确认")} visible={fieldInformationConfirm.visible} initLoadCss hasScroll
|
||||||
style={{ width: 380 }} className="infoConfirmDialog" buttons={buttons} onCancel={() =>
|
style={{ width: 380 }} className="infoConfirmDialog" buttons={buttons} onCancel={() =>
|
||||||
this.setState({
|
this.setState({
|
||||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||||
})}>
|
}, () => this.props.init())}>
|
||||||
<div className="confirm-content">
|
<div className="confirm-content">
|
||||||
<div className="contract">
|
<div className="contract">
|
||||||
{getLabel("111", "账套发生变更,是否需要更新账套设置?更新后核算将按照最新的账套进行核算,请谨慎操作。")}
|
{getLabel("111", "账套发生变更,是否需要更新账套设置?更新后核算将按照最新的账套进行核算,请谨慎操作。")}
|
||||||
|
|
|
||||||
|
|
@ -216,23 +216,17 @@ class Index extends Component {
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{/* 薪资核算-自定义导出*/}
|
{/* 薪资核算-自定义导出*/}
|
||||||
<CustomCalcExportDialog
|
<CustomCalcExportDialog {...customExpDialog} onCancel={() => {
|
||||||
{...customExpDialog}
|
this.setState({
|
||||||
onCancel={() => {
|
customExpDialog: { ...customExpDialog, visible: false }
|
||||||
this.setState({
|
});
|
||||||
customExpDialog: { ...customExpDialog, visible: false }
|
}}/>
|
||||||
});
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{/* 薪资核算-导入*/}
|
{/* 薪资核算-导入*/}
|
||||||
<SalaryEditCalcImport
|
<SalaryEditCalcImport {...salaryImpDialog} onCancel={(isFresh) => {
|
||||||
{...salaryImpDialog}
|
this.setState({
|
||||||
onCancel={(isFresh) => {
|
salaryImpDialog: { ...salaryImpDialog, visible: false }
|
||||||
this.setState({
|
}, () => isFresh && this.calc.onAdSearch(false));
|
||||||
salaryImpDialog: { ...salaryImpDialog, visible: false }
|
}}/>
|
||||||
}, () => isFresh && this.calc.onAdSearch(false));
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</WeaReqTop>
|
</WeaReqTop>
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue