+ this.setState({ selectedRowKeys: val })}/>
{/**/}
{/* record.id}*/}
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less
index ed8aff62..0ddab0d2 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.less
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less
@@ -7,8 +7,6 @@
.salaryItems_content {
height: 100%;
- padding: 16px 16px 0 16px;
- //background: #e5e5e5;
}
}
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemsTable.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemsTable.js
index e37acfe9..93a18aea 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemsTable.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemsTable.js
@@ -8,7 +8,7 @@
* @description:
*/
import React, { Component } from "react";
-import { WeaLocaleProvider, WeaTable } from "ecCom";
+import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
import * as API from "../../apis/item";
const getLabel = WeaLocaleProvider.getLabel;
@@ -17,7 +17,7 @@ class SalaryItemsTable extends Component {
constructor(props) {
super(props);
this.state = {
- loading: false, columns: [], dataSource: [],
+ loading: false, columns: [], dataSource: [], selectedRowKeys: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
@@ -41,14 +41,20 @@ class SalaryItemsTable extends Component {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
- columns
+ columns: _.map(columns, o => {
+ if (o.dataIndex === "useDefault" || o.dataIndex === "hideDefault" || o.dataIndex === "useInEmployeeSalary") {
+ return { ...o, width: 80, render: text => };
+ }
+ return { ...o };
+ })
});
}
});
};
render() {
- const { dataSource, columns, pageInfo } = this.state;
+ const { dataSource, columns, pageInfo, selectedRowKeys } = this.state;
+ // const { selectedRowKeys, onChange } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`,
@@ -64,7 +70,18 @@ class SalaryItemsTable extends Component {
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getItemList(this.props));
}
};
- return ();
+ const rowSelection = {
+ selectedRowKeys,
+ onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }),
+ getCheckboxProps: record => {
+ console.log(record)
+ return ({
+ disabled: !record.canDelete
+ })
+ }
+ };
+ return ();
}
}