Merge branch 'hotfix/v2-03-09' into develop
This commit is contained in:
commit
bfc8a2c475
|
|
@ -5,46 +5,27 @@ export default class LedgerSalaryItemPreviewModal extends React.Component {
|
|||
getColumns = () => {
|
||||
const { empFields, itemGroups } = this.props;
|
||||
let columns = [];
|
||||
let length = 0;
|
||||
empFields.map(item => {
|
||||
columns.push({
|
||||
title: item.fieldName,
|
||||
key: item.fieldId,
|
||||
dataIndex: item.fieldId,
|
||||
width: 150
|
||||
});
|
||||
length++;
|
||||
});
|
||||
|
||||
itemGroups.map(item => {
|
||||
if (item.id !== "default") {
|
||||
let columnItem = {
|
||||
title: item.name,
|
||||
children: item.items.map(i => {
|
||||
return {
|
||||
title: i.name,
|
||||
key: i.id,
|
||||
width: 150
|
||||
};
|
||||
length++;
|
||||
})
|
||||
};
|
||||
columns.push(columnItem);
|
||||
}
|
||||
});
|
||||
|
||||
itemGroups.map(item => {
|
||||
if (item.id === "default") {
|
||||
item.items.map(i => {
|
||||
columns.push({
|
||||
_.map(_.filter(itemGroups, it => !_.isEmpty(it.items)), child => {
|
||||
let columnItem = {
|
||||
title: child.name,
|
||||
children: child.items.map(i => {
|
||||
return {
|
||||
title: i.name,
|
||||
key: i.id,
|
||||
dataIndex: i.id,
|
||||
width: 150
|
||||
});
|
||||
length++;
|
||||
});
|
||||
}
|
||||
};
|
||||
})
|
||||
};
|
||||
columns.push(columnItem);
|
||||
});
|
||||
return { columns, length };
|
||||
return { columns };
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
@ -56,7 +37,7 @@ export default class LedgerSalaryItemPreviewModal extends React.Component {
|
|||
style={{ width: "80vw", height: 200 }}
|
||||
onCancel={onCancel}
|
||||
>
|
||||
<WeaTable columns={this.getColumns().columns} dataSource={[]} scroll={{ x: this.getColumns().length * 150 }}/>
|
||||
<WeaTable columns={this.getColumns().columns} dataSource={[]} scroll={{ x: 1200 }}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue