Commit f7552c07 by zhangleyuan

feat:处理创建岗位

parent 586ff46c
......@@ -19,7 +19,10 @@ function MemberTree(props) {
source:0,//0代表来自企培
storeId:User.getStoreId(),
userId:User.getUserId(),
whetherCount:false
whetherCount:false,
}
if(props.departmentId){
params.departmentId = props.departmentId;
}
StoreService.getDepartmentUserNotPage(params).then((res) => {
let { departmentVOList=[]} = res.result;
......
......@@ -23,12 +23,12 @@ function SearchUser(props) {
if(e.target.checked){
let _record = []
_record.push(item)
props.onSelect(_record)
props.onSelect(_record,'user')
}
}
function selectDep(e,item){
if(e.target.checked){
props.onSelect(item.departmentUserVOList || []);
props.onSelect(item,'department');
}
}
function documentClick(){
......
......@@ -230,16 +230,30 @@ class NewChooseMembersModal extends React.Component {
});
}
confirmSearchSelect=(value,option)=>{
this.setState({
open:false,
queryName:value
});
// props.searchUserList({queryName:value},treeType,1);
confirmSearchSelect=(record,type)=>{
const { selectUserList } = this.state;
if(type==='user'){
this.setState({selectUserList:[...selectUserList,...record]});
}
// }else{
// const params = {
// depType:this.props.treeDepType,
// enterpriseId: User.getEnterpriseId(),
// source: 0,
// storeId: User.getStoreId(),
// userId: User.getUserId(),
// departmentId:record.id
// }
// StoreService.getStoreCustomerAndDepNamePage(params).then((res) => {
// const { records = []} = res.result;
// this.setState({selectUserList:[...selectUserList,...records]});
// });
// }
}
render() {
const {type,treeDepType} = this.props;
const {type,treeDepType,selectDep={}} = this.props;
const { id=''} = selectDep;
const {selectUserList,selectObject,visible,openSetModal,searchUserResultList} = this.state;
const title = type === 'USER' ? '添加员工' : '添加学员';
return (
......@@ -275,9 +289,9 @@ class NewChooseMembersModal extends React.Component {
enterButton={<span className="icon iconfont">&#xe832;</span>}
/> */}
{/* {this.Complete()} */}
<SearchUser onChange={(value)=>{this.getCompleteOptionData(value)}} data={searchUserResultList} onSelect={(record)=>{this.setState({selectUserList:[...selectUserList,...record]})}}/>
<SearchUser onChange={(value)=>{this.getCompleteOptionData(value)}} data={searchUserResultList} onSelect={(record,type)=>{this.confirmSearchSelect(record,type)}}/>
<div className='container-left-body-table'>
<MemberTree treeDepType={treeDepType} onSelect={(record)=>{this.treeSelect(record)}} selectUserList={selectUserList}/>
<MemberTree departmentId={id} treeDepType={treeDepType} onSelect={(record)=>{this.treeSelect(record)}} selectUserList={selectUserList}/>
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment