Compare commits

...

5 Commits

2 changed files with 5 additions and 5 deletions

View File

@ -43,7 +43,7 @@ class EditSalaryCalcSlide extends Component {
});
};
renderTitle = () => {
const { loading } = this.state, { viewAttr } = this.props;
const { loading, itemsByGroup } = this.state, { viewAttr } = this.props;
return <div className="titleDialog">
<div className="titleCol titleLeftBox">
<div className="titleIcon"><i className="icon-coms-fa"/></div>
@ -52,7 +52,7 @@ class EditSalaryCalcSlide extends Component {
<div className="titleCol titleRightBox">
{
viewAttr === 2 &&
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
<Button type="primary" disabled={_.isEmpty(itemsByGroup)} onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
}
</div>
</div>;

View File

@ -73,9 +73,9 @@ export default class GenerateDeclarationDetail extends React.Component {
render() {
const { loading, pageInfo, columns, dataSource } = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
const buttons = showOperateBtn ? [<Button type="primary"
onClick={this.handleExport}>{getLabel(111, "导出全部")}</Button>] : [];
const { taxAgentStore: { PageAndOptAuth } } = this.props;
const buttons = !!PageAndOptAuth.opts.length ? [<Button type="primary"
onClick={this.handleExport}>{getLabel(111, "导出全部")}</Button>] : [];
const pagination = {
...pageInfo,
showTotal: (total) => `${total}`,