|
@@ -1,5 +1,5 @@
|
|
import React from 'react';
|
|
import React from 'react';
|
|
-import { Icon, Modal, message, AutoComplete, Spin, Input, Select, Button, Form, Popconfirm } from 'antd';
|
|
|
|
|
|
+import { Icon, Modal, message, AutoComplete, Spin, Input, Select, Button, Form, Popconfirm, TreeSelect } from 'antd';
|
|
import $ from 'jquery/src/ajax';
|
|
import $ from 'jquery/src/ajax';
|
|
import './userMangagement.less';
|
|
import './userMangagement.less';
|
|
import { cityArr, station, post } from '../../../dataDic.js';
|
|
import { cityArr, station, post } from '../../../dataDic.js';
|
|
@@ -114,6 +114,10 @@ const Newuser = Form.create()(React.createClass({
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // if (this.state.ambId == null || this.state.ambId == undefined) {
|
|
|
|
+ // message.warning('请选择所属巴');
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
let theorgCodeUrl = [];
|
|
let theorgCodeUrl = [];
|
|
if (this.state.orgCodeUrl.length) {
|
|
if (this.state.orgCodeUrl.length) {
|
|
let picArr = [];
|
|
let picArr = [];
|
|
@@ -149,7 +153,8 @@ const Newuser = Form.create()(React.createClass({
|
|
reviewer: this.state.reviewer,
|
|
reviewer: this.state.reviewer,
|
|
district: this.state.district,
|
|
district: this.state.district,
|
|
headPortraitUrl: theorgCodeUrl.length ? theorgCodeUrl : '',
|
|
headPortraitUrl: theorgCodeUrl.length ? theorgCodeUrl : '',
|
|
- entryTime: this.state.selTime
|
|
|
|
|
|
+ entryTime: this.state.selTime,
|
|
|
|
+ ambId: this.state.ambId,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}).done(function (data) {
|
|
}).done(function (data) {
|
|
@@ -252,10 +257,8 @@ const Newuser = Form.create()(React.createClass({
|
|
position: thisdata.position ? thisdata.position : undefined,
|
|
position: thisdata.position ? thisdata.position : undefined,
|
|
superior: thisdata.superior,
|
|
superior: thisdata.superior,
|
|
superiorId: thisdata.superiorId,//上级Id
|
|
superiorId: thisdata.superiorId,//上级Id
|
|
-
|
|
|
|
reviewerName: thisdata.reviewerName,
|
|
reviewerName: thisdata.reviewerName,
|
|
reviewer: thisdata.reviewer,
|
|
reviewer: thisdata.reviewer,
|
|
-
|
|
|
|
theTypes: '',
|
|
theTypes: '',
|
|
duty: thisdata.duty ? thisdata.duty : undefined,//职务
|
|
duty: thisdata.duty ? thisdata.duty : undefined,//职务
|
|
status: Number(thisdata.status),
|
|
status: Number(thisdata.status),
|
|
@@ -265,7 +268,8 @@ const Newuser = Form.create()(React.createClass({
|
|
orgCodeUrl: thisdata.headPortraitUrl ? splitUrl(thisdata.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
orgCodeUrl: thisdata.headPortraitUrl ? splitUrl(thisdata.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
role: this.props.role,
|
|
role: this.props.role,
|
|
entryTime: thisdata.entryTime ? moment(thisdata.entryTime, 'YYYY-MM-DD') : undefined,
|
|
entryTime: thisdata.entryTime ? moment(thisdata.entryTime, 'YYYY-MM-DD') : undefined,
|
|
- selTime: thisdata.entryTime
|
|
|
|
|
|
+ selTime: thisdata.entryTime,
|
|
|
|
+ ambId: !!thisdata.ambId && Number(thisdata.ambId), // 分巴id
|
|
});
|
|
});
|
|
}.bind(this),
|
|
}.bind(this),
|
|
}).always(function () {
|
|
}).always(function () {
|
|
@@ -275,7 +279,6 @@ const Newuser = Form.create()(React.createClass({
|
|
}.bind(this));
|
|
}.bind(this));
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
//重置密码
|
|
//重置密码
|
|
resetPwd() {
|
|
resetPwd() {
|
|
this.setState({
|
|
this.setState({
|
|
@@ -333,6 +336,7 @@ const Newuser = Form.create()(React.createClass({
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
render() {
|
|
render() {
|
|
const FormItem = Form.Item
|
|
const FormItem = Form.Item
|
|
const formItemLayout = {
|
|
const formItemLayout = {
|
|
@@ -556,12 +560,12 @@ const Newuser = Form.create()(React.createClass({
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <div className="clearfix pictures">
|
|
|
|
|
|
+ <div className="clearfix">
|
|
<FormItem
|
|
<FormItem
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- wrapperCol={{ span: 18 }}
|
|
|
|
- label="用户头像" >
|
|
|
|
|
|
+ className="half-item"
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ label="用户头像"
|
|
|
|
+ >
|
|
<PicturesWall
|
|
<PicturesWall
|
|
domId={'newUser1'}
|
|
domId={'newUser1'}
|
|
pictureSign="customer_sys_file"
|
|
pictureSign="customer_sys_file"
|
|
@@ -569,6 +573,26 @@ const Newuser = Form.create()(React.createClass({
|
|
pictureUrl={this.state.orgCodeUrl} />
|
|
pictureUrl={this.state.orgCodeUrl} />
|
|
<p>图片建议:要清晰。</p>
|
|
<p>图片建议:要清晰。</p>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
+ <FormItem
|
|
|
|
+ className="half-item"
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ label="分巴"
|
|
|
|
+ >
|
|
|
|
+ <TreeSelect
|
|
|
|
+ style={{ width: 200 }}
|
|
|
|
+ value={this.state.ambId}
|
|
|
|
+ dropdownStyle={{ maxHeight: 300, overflow: 'auto' }}
|
|
|
|
+ treeData={this.props.level1Data}
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ showSearch
|
|
|
|
+ treeNodeFilterProp="title"
|
|
|
|
+ onChange={(e) => {
|
|
|
|
+ this.setState({
|
|
|
|
+ ambId: e,
|
|
|
|
+ });
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </FormItem>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<FormItem wrapperCol={{ span: 12, offset: 4 }}>
|
|
<FormItem wrapperCol={{ span: 12, offset: 4 }}>
|