import {
	inject,
	observer,
} from 'mobx-react'
import {
	toJS
} from 'mobx'
import {
	WeaTableEdit,
} from 'ecCom'
import {
	i18n
} from '../../public/i18n';

@inject('hrmSalaryItemsSet')
@observer
export default class BenchmarkSet extends React.Component {
	constructor(props) {
		super(props);
	}

	getColumns = () => {
		const columns = [{
			title: '人力资源',
			dataIndex: 'lastname',
			key: 'lastname',
			com: [{
				label: '',
				type: 'BROWSER',
				editType: '1',
				key: 'lastname',
				width: 120,
				viewAttr: 1,
			}],
			colSpan: 1,
			width: '33%',
		}, {
			title: '编号',
			dataIndex: 'workcode',
			key: 'workcode',
			com: [{
				label: '',
				type: 'INPUT',
				editType: '1',
				key: 'workcode',
				width: 120,
				viewAttr: 1,
			}],
			colSpan: 1,
			width: '33%',
		}, {
			title: '金额',
			dataIndex: 'resource',
			key: 'resource',
			com: [{
				label: '',
				type: 'INPUTNUMBER',
				editType: '1',
				key: 'resource',
				width: 120,
			}],
			colSpan: 1,
			width: '34%',
		}];

		return columns;
	}


	render() {
		const {
			hrmSalaryItemsSet
		} = this.props, {
			setBenchmarkSetting
		} = hrmSalaryItemsSet;

		return (
			<WeaTableEdit
				columns={this.getColumns()}
				datas={[]}
				tableProps={{scroll: {y: 185}}}
				bordered
				onChange={datas => setBenchmarkSetting(datas)}
			/>
		)

	}
}