weaver_trunk_cli/pc4mobx/hrm/components/staffPayrollSummary/MainTable.js

47 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-12-11 15:32:14 +08:00
import {
inject,
observer
} from 'mobx-react'
import {
WeaTableNew
} from 'comsMobx'
const WeaTable = WeaTableNew.WeaTable;
@inject('hrmStaffPayrollSummary')
@observer
export default class MainTable extends React.Component {
constructor(props) {
super(props);
}
componentWillUnmount() {
this.props.hrmStaffPayrollSummary.resetTable({
type: 'main'
});
}
render() {
const {
hrmStaffPayrollSummary,
} = this.props, {
mainTable,
onOperatesClick,
reRenderColumns,
} = hrmStaffPayrollSummary, {
tableStore,
colNum,
} = mainTable;
return (
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@302y16`}
comsWeaTableStore={tableStore}
hasOrder={true}
needScroll={true}
scroll={{x: colNum*100}}
getColumns={reRenderColumns}
onOperatesClick={onOperatesClick}
/>
)
}
}