custom/五院杭州中心
This commit is contained in:
parent
fba2a0d4d5
commit
ddba7d0ed9
|
|
@ -19,7 +19,7 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showTotalCell: false, loading: false, dataSource: []
|
||||
showTotalCell: false, loading: false, dataSource: [], sumRow: {}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -45,15 +45,33 @@ class Index extends Component {
|
|||
const { columns, list: dataSource } = data;
|
||||
this.setState({ dataSource }, () => {
|
||||
this.postMessageToChild({
|
||||
dataSource, showTotalCell: false, sumRowlistUrl: "", calcDetail: true, tableScrollHeight: 120,
|
||||
dataSource, showTotalCell: true, sumRowlistUrl: "", calcDetail: true, tableScrollHeight: 156,
|
||||
columns: _.every(traverse(columns, true), (it, idx) => !it.fixed) ? _.map(traverse(columns, true), (it, idx) => ({
|
||||
...it, fixed: idx < 2 ? "left" : false
|
||||
})) : traverse(columns, true)
|
||||
});
|
||||
});
|
||||
this.getAcctresultDeptSum({
|
||||
dataSource, showTotalCell: true, sumRowlistUrl: "", calcDetail: true, tableScrollHeight: 156,
|
||||
columns: _.every(traverse(columns, true), (it, idx) => !it.fixed) ? _.map(traverse(columns, true), (it, idx) => ({
|
||||
...it, fixed: idx < 2 ? "left" : false
|
||||
})) : traverse(columns, true)
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
getAcctresultDeptSum = (tableData) => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props, payload = { salaryAcctRecordId };
|
||||
postFetch("/api/bs/hrmsalary/salaryacct/acctresult/department/sum", payload)
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { sumRow } = data;
|
||||
this.setState({ sumRow }, () => {
|
||||
this.postMessageToChild({ ...tableData, sumRow });
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
|
|
|
|||
Loading…
Reference in New Issue