|
@@ -175,42 +175,44 @@ const Newuser = Form.create()(React.createClass({
|
|
name:e
|
|
name:e
|
|
},
|
|
},
|
|
success: function (data) {
|
|
success: function (data) {
|
|
- let thedata=data.data;
|
|
|
|
- if (!thedata) {
|
|
|
|
|
|
+ let thedata=data.data;
|
|
|
|
+ if (!thedata) {
|
|
if (data.error && data.error.length) {
|
|
if (data.error && data.error.length) {
|
|
message.warning(data.error[0].message);
|
|
message.warning(data.error[0].message);
|
|
};
|
|
};
|
|
thedata = {};
|
|
thedata = {};
|
|
- };
|
|
|
|
- this.setState({
|
|
|
|
- customerArr:thedata,
|
|
|
|
- });
|
|
|
|
- }.bind(this),
|
|
|
|
- }).always(function () {
|
|
|
|
|
|
+ };
|
|
|
|
+ this.setState({
|
|
|
|
+ customerArr:thedata,
|
|
|
|
+ });
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(function () {
|
|
this.setState({
|
|
this.setState({
|
|
loading: false
|
|
loading: false
|
|
});
|
|
});
|
|
}.bind(this));
|
|
}.bind(this));
|
|
},
|
|
},
|
|
//上级主管输入框失去焦点是判断客户是否存在
|
|
//上级主管输入框失去焦点是判断客户是否存在
|
|
- selectAuto(value,options){
|
|
|
|
- this.setState({
|
|
|
|
- superior:value
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- blurChange(e){
|
|
|
|
- let theType='';
|
|
|
|
- let contactLists=this.state.customerArr||[];
|
|
|
|
- if (e) {
|
|
|
|
|
|
+ selectAuto(value){
|
|
|
|
+ let theType='';
|
|
|
|
+ let contactLists=this.state.customerArr||[];
|
|
|
|
+ if (value) {
|
|
contactLists.map(function (item) {
|
|
contactLists.map(function (item) {
|
|
- if (item.name == e.toString()) {
|
|
|
|
|
|
+ if (item.name === value.toString()) {
|
|
theType = item.id;
|
|
theType = item.id;
|
|
}
|
|
}
|
|
- });
|
|
|
|
- }
|
|
|
|
- this.setState({
|
|
|
|
- theTypes:theType
|
|
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.setState({
|
|
|
|
+ theTypes:theType,
|
|
|
|
+ superior:value
|
|
|
|
+ })
|
|
|
|
+ if(!this.state.reviewerName || !this.state.reviewer){
|
|
|
|
+ this.setState({
|
|
|
|
+ reviewerName:value,
|
|
|
|
+ reviewer:theType
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
//值改变时请求客户名称
|
|
//值改变时请求客户名称
|
|
httpChange(e){
|
|
httpChange(e){
|
|
@@ -502,7 +504,6 @@ const Newuser = Form.create()(React.createClass({
|
|
value={this.state.superior}
|
|
value={this.state.superior}
|
|
onChange={this.httpChange}
|
|
onChange={this.httpChange}
|
|
filterOption={true}
|
|
filterOption={true}
|
|
- onBlur={this.blurChange}
|
|
|
|
onSelect={this.selectAuto}
|
|
onSelect={this.selectAuto}
|
|
>
|
|
>
|
|
<Input/>
|
|
<Input/>
|