feature/2.9.9.2312.01-薪资核算列表在线编辑

This commit is contained in:
黎永顺 2023-12-07 09:40:34 +08:00
parent 8a8804f0c1
commit 2864e1e446
1 changed files with 5 additions and 12 deletions

View File

@ -21,7 +21,7 @@ class Index extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
salarySobCycle: {}, showSearchAd: false, editable: false, salarySobCycle: {}, showSearchAd: false,
columnDesc: {}, formulaTd: "", showTotalCell: false columnDesc: {}, formulaTd: "", showTotalCell: false
}; };
} }
@ -50,13 +50,11 @@ class Index extends Component {
}; };
handleShowFormulaTa = (dataIndex) => this.setState({ formulaTd: dataIndex }); handleShowFormulaTa = (dataIndex) => this.setState({ formulaTd: dataIndex });
handleBatchEditing = (editable) => { handleBatchEditing = (editable) => {
this.setState({ editable: !this.state.editable }, () => { this.calcTableRef.wrappedInstance.handleBatchEditing(editable);
this.calcTableRef.wrappedInstance.handleBatchEditing(editable);
});
}; };
render() { render() {
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell, editable } = 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 ( return (
@ -79,13 +77,8 @@ class Index extends Component {
<span>{formulaObj.formulaContent}</span> <span>{formulaObj.formulaContent}</span>
</div> </div>
<div style={{ paddingRight: 8 }}> <div style={{ paddingRight: 8 }}>
{ <Button type="primary"
!editable ? onClick={() => this.handleBatchEditing(true)}>{getLabel(111, "批量保存")}</Button>
<Button type="primary"
onClick={() => this.handleBatchEditing(true)}>{getLabel(545071, "批量编辑")}</Button> :
<Button type="primary"
onClick={() => this.handleBatchEditing(false)}>{getLabel(537558, "保存")}</Button>
}
</div> </div>
</div> </div>
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}> <div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>