Merge branch 'feature/2.9.42309.01-薪资核算详情页面列表改造(页面编辑)' into develop
This commit is contained in:
commit
9e5e941a3f
|
|
@ -11,6 +11,7 @@ import { inject, observer } from "mobx-react";
|
|||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { customCacheExportField } from "../../../../../apis/calculate";
|
||||
import { convertToUrlString } from "../../../../../util/url";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
|
|
@ -85,7 +86,7 @@ class Index extends Component {
|
|||
}
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll initLoadCss
|
||||
{...this.props} hasScroll initLoadCss className="customEpDialogLayout"
|
||||
scalable title={getLabel(111, "选择字段")}
|
||||
style={{
|
||||
width: 700,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
.customEpDialogLayout {
|
||||
.wea-search-group {
|
||||
.wea-title {
|
||||
padding-left: 0 !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
.ant-col-8 {
|
||||
padding: 0 8px !important;
|
||||
}
|
||||
|
||||
.wea-content {
|
||||
padding: 8px 16px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,6 +46,17 @@ class AddHeaderFieldsModal extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleSelectAll = (checked) => {
|
||||
if (checked === "1") {
|
||||
this.setState({
|
||||
itemsCheckeds: _.reduce(this.props.itemsByGroup, (pre, cur) => {
|
||||
return [...pre, ..._.map(cur.salaryItems, it => it.salaryItemId)];
|
||||
}, [])
|
||||
});
|
||||
} else {
|
||||
this.setState({ itemsCheckeds: [] });
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showOnlyChecked, itemsCheckeds } = this.state;
|
||||
|
|
@ -72,8 +83,14 @@ class AddHeaderFieldsModal extends Component {
|
|||
<Button type="primary" onClick={() => this.props.onAdd(itemsCheckeds)}>{getLabel(111, "添加")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>
|
||||
]}
|
||||
bottomLeft={<WeaCheckbox content={getLabel(111, "只显示已选中字段")}
|
||||
onChange={this.handleShowOnlyChecked}/>}
|
||||
bottomLeft={
|
||||
<React.Fragment>
|
||||
<WeaCheckbox content={getLabel(111, "只显示已选中字段")}
|
||||
onChange={this.handleShowOnlyChecked}/>
|
||||
<WeaCheckbox content={getLabel(111, "全部选中")} style={{ marginLeft: 10 }}
|
||||
onChange={this.handleSelectAll}/>
|
||||
</React.Fragment>
|
||||
}
|
||||
>
|
||||
{
|
||||
_.map(dataSource, item => {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
.wea-search-group {
|
||||
.wea-title {
|
||||
padding-left: 0 !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
.ant-col-8 {
|
||||
padding: 0 8px !important;
|
||||
}
|
||||
|
||||
.wea-content {
|
||||
|
|
|
|||
Loading…
Reference in New Issue