|
@@ -9,7 +9,7 @@ const { Column, ColumnGroup } = Table;
|
|
|
const TabPane = Tabs.TabPane;
|
|
|
import CustomerDetail from './myClientDesc.jsx';
|
|
|
import {socialAttribute,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
|
|
|
-import {getCompanyIntention,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
|
|
|
+import {getContactType,getCompanyIntention,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
|
|
|
|
|
|
const data = [{
|
|
|
id: '1',
|
|
@@ -227,26 +227,27 @@ const MyClient = Form.create()(React.createClass({
|
|
|
}
|
|
|
},
|
|
|
//业务意向列表
|
|
|
- intentionList:[{
|
|
|
+ intentionList:[
|
|
|
+ {
|
|
|
title: '业务名称',
|
|
|
- dataIndex: 'id',
|
|
|
- key:'id',
|
|
|
+ dataIndex: 'businessGlossoryId',
|
|
|
+ key: 'businessGlossoryId',
|
|
|
render: (text, record, index) => {
|
|
|
- return
|
|
|
- {record.contacts?<Select value={record.id} placeholder="选择业务" onChange={(e) => { record.id=e; this.setState({ data: this.state.data }); }}>
|
|
|
+ return <Select placeholder="选择业务名称" value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
|
|
|
{
|
|
|
intentionalService.map(function (item) {
|
|
|
- return <Select.Option >{item.key}</Select.Option>
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
})
|
|
|
- }
|
|
|
- </Select>:<span>{text}</span>}
|
|
|
- }
|
|
|
- },{
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '最新进度',
|
|
|
- dataIndex: 'businessGlossoryId',
|
|
|
- key: 'businessGlossoryId',
|
|
|
+ dataIndex: 'followSituation',
|
|
|
+ key: 'followSituation',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Select placeholder="选择最新进度" value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
|
|
|
+ return <Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
|
|
|
{
|
|
|
newFollow.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -256,10 +257,10 @@ const MyClient = Form.create()(React.createClass({
|
|
|
}
|
|
|
},{
|
|
|
title: '最新状态',
|
|
|
- dataIndex: 'followSituation',
|
|
|
- key: 'followSituation',
|
|
|
+ dataIndex: 'customerStatus',
|
|
|
+ key: 'customerStatus',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Select value={record.followSituation} placeholder="选择最新状态" onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
|
|
|
+ return <Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
|
|
|
{
|
|
|
customerStatus.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -272,8 +273,8 @@ const MyClient = Form.create()(React.createClass({
|
|
|
dataIndex: 'remarks',
|
|
|
key: 'remarks',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.customerStatus} placeholder="跟进说明"
|
|
|
- onChange={(e) => { record.customerStatus = e.target.value; this.setState({ data: this.state.data }); }}
|
|
|
+ return <Input value={record.remarks} placeholder="跟进说明"
|
|
|
+ onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
|
|
|
style={{width:'120px'}}/>
|
|
|
}
|
|
|
},{
|
|
@@ -309,11 +310,13 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},{
|
|
|
title: '业务意向进度',
|
|
|
dataIndex: 'followSituation',
|
|
|
- key: 'followSituation'
|
|
|
+ key: 'followSituation',
|
|
|
+ render:text=>{return getCompanyIntention(text)}
|
|
|
},{
|
|
|
title: '客户状态',
|
|
|
dataIndex: 'customerStatus',
|
|
|
- key: 'customerStatus'
|
|
|
+ key: 'customerStatus' ,
|
|
|
+ render:text=>{return getcustomerStatue(text)}
|
|
|
},{
|
|
|
title: '操作',
|
|
|
dataIndex: 'ooo',
|
|
@@ -368,7 +371,8 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},{
|
|
|
title: '拜访方式',
|
|
|
dataIndex: 'contactType',
|
|
|
- key: 'contactType'
|
|
|
+ key: 'contactType',
|
|
|
+ render:text=>{return getContactType(text)}
|
|
|
}
|
|
|
,{
|
|
|
title: '联系人',
|
|
@@ -591,20 +595,15 @@ const MyClient = Form.create()(React.createClass({
|
|
|
visible: true,
|
|
|
});
|
|
|
},
|
|
|
- //进入新增拜访记录
|
|
|
- visit(e){
|
|
|
- this.state.keys=true;
|
|
|
- this.getNewWoman(e.id);
|
|
|
- this.setState({
|
|
|
- visitModul:true,
|
|
|
- loading: true
|
|
|
- });
|
|
|
- $.ajax({
|
|
|
+
|
|
|
+ //刷新新增拜访记录删除列表
|
|
|
+ deletelist(e){
|
|
|
+ $.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
url:globalConfig.context + '/api/admin/customer/toAddFollow',
|
|
|
data: {
|
|
|
- uid: e.id,
|
|
|
+ uid: e,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
let listArr=[];
|
|
@@ -617,17 +616,16 @@ const MyClient = Form.create()(React.createClass({
|
|
|
};
|
|
|
for (let i = 0; i < data.data.userBusinessList.length; i++) {
|
|
|
let thisdata = data.data.userBusinessList[i];
|
|
|
- listArr.push({
|
|
|
- key: i,
|
|
|
+ listArr.push({
|
|
|
id: thisdata.id,
|
|
|
- businessGlossoryId:thisdata.businessGlossoryId,
|
|
|
- followSituation:thisdata.followSituation,
|
|
|
- customerStatus:thisdata.customerStatus,
|
|
|
+ businessGlossoryId:(thisdata.businessGlossoryId).toString(),
|
|
|
+ followSituation:(thisdata.followSituation).toString(),
|
|
|
+ customerStatus:(thisdata.customerStatus).toString(),
|
|
|
remarks:thisdata.remarks,
|
|
|
- contacts:false
|
|
|
});
|
|
|
};
|
|
|
this.setState({
|
|
|
+ contacts:thedata.contacts,
|
|
|
uid:thedata.uid,
|
|
|
data:listArr,
|
|
|
identityName:thedata.identityName,
|
|
@@ -642,12 +640,23 @@ const MyClient = Form.create()(React.createClass({
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
- }.bind(this));
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+
|
|
|
+ //进入新增拜访记录
|
|
|
+ visit(e){
|
|
|
+ this.state.keys=true;
|
|
|
+ this.getNewWoman(e.id);
|
|
|
+ this.deletelist(e.id)
|
|
|
+ this.setState({
|
|
|
+ visitModul:true,
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
|
|
|
//拜访记录删除
|
|
|
visitDelet(e){
|
|
|
- if(e){
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -665,15 +674,11 @@ const MyClient = Form.create()(React.createClass({
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
};
|
|
|
- this.visitModify(e.followId);
|
|
|
+ this.loadVisit();
|
|
|
}.bind(this));
|
|
|
- }else{
|
|
|
- this.visitModify(this.state.delectId);
|
|
|
- }
|
|
|
},
|
|
|
//进入修改拜访记录
|
|
|
visitModify(e){
|
|
|
- this.getNewWoman(e);
|
|
|
this.setState({
|
|
|
visitModul:true,
|
|
|
loading: true
|
|
@@ -696,28 +701,30 @@ const MyClient = Form.create()(React.createClass({
|
|
|
};
|
|
|
for (let i = 0; i < data.data.userBusinessList.length; i++) {
|
|
|
let thisdata = data.data.userBusinessList[i];
|
|
|
- theArr.push({
|
|
|
- key: i,
|
|
|
+ theArr.push({
|
|
|
id: thisdata.id,
|
|
|
- businessGlossoryId:thisdata.businessGlossoryId,
|
|
|
- followSituation:thisdata.followSituation,
|
|
|
- customerStatus:thisdata.customerStatus,
|
|
|
+ businessGlossoryId:(thisdata.businessGlossoryId).toString(),
|
|
|
+ followSituation:(thisdata.followSituation).toString(),
|
|
|
+ customerStatus:(thisdata.customerStatus).toString(),
|
|
|
remarks:thisdata.remarks,
|
|
|
-
|
|
|
});
|
|
|
};
|
|
|
this.setState({
|
|
|
- data:theArr,
|
|
|
- followId:thedata.followId,
|
|
|
- identityName:thedata.identityName,
|
|
|
+ followIds:thedata.followId,
|
|
|
+ contacts:thedata.contacts,
|
|
|
uid:thedata.uid,
|
|
|
- contacts:thedata.contacts,//当前联系人
|
|
|
- contactType:thedata.contactType,
|
|
|
+ data:theArr,
|
|
|
+ nub:thedata.contactMobile,
|
|
|
result:thedata.result,
|
|
|
+ contactType:parseInt(thedata.contactType),
|
|
|
+ identityName:thedata.identityName,
|
|
|
followTime:thedata.followTime,
|
|
|
- adminName:thedata.adminName,
|
|
|
+ businessGlossoryId:thedata.businessGlossoryId,
|
|
|
+ followSituation:thedata.followSituation,
|
|
|
+ customerStatus:thedata.customerStatus,
|
|
|
+ adminName:thedata.adminName,
|
|
|
});
|
|
|
- }.bind(this),
|
|
|
+ }.bind(this),
|
|
|
}).always(function () {
|
|
|
this.setState({
|
|
|
loading: false
|
|
@@ -1005,7 +1012,6 @@ const MyClient = Form.create()(React.createClass({
|
|
|
//整行点击
|
|
|
tableRowClick(record, index) {
|
|
|
this.state.RowData = record;
|
|
|
- console.log(record)
|
|
|
this.detailsModalOk(record);
|
|
|
this.setState({
|
|
|
selectedRowKeys:[],
|
|
@@ -1014,11 +1020,12 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},
|
|
|
VisitRowClick(record, index) {
|
|
|
this.state.keys=false;
|
|
|
+ console.log(record)
|
|
|
this.state.RowData = record;
|
|
|
- this.visitModify(record.id);
|
|
|
+ this.visitModify(record.followId);
|
|
|
this.setState({
|
|
|
selectedRowKeys:[],
|
|
|
- delectId:record.id,
|
|
|
+ delectId:record.followId,
|
|
|
})
|
|
|
},
|
|
|
//基本信息提交
|
|
@@ -1194,6 +1201,9 @@ const MyClient = Form.create()(React.createClass({
|
|
|
detailsModalOk(e) {
|
|
|
this.setState({ modal5Visible:true });//需要一个请求数据
|
|
|
this.loadInformation(e.id)
|
|
|
+ this.httpAccount(e.id);
|
|
|
+ this.loadVisit();
|
|
|
+ this.BusinessList();
|
|
|
},
|
|
|
//点击消失函数
|
|
|
detailsModal(e) {
|
|
@@ -1205,11 +1215,11 @@ const MyClient = Form.create()(React.createClass({
|
|
|
visitOk(e) {
|
|
|
this.setState({
|
|
|
visitModul:false
|
|
|
- });
|
|
|
+ });
|
|
|
+ this.loadVisit()
|
|
|
},
|
|
|
visitCancel(e) {
|
|
|
- this.setState({
|
|
|
-
|
|
|
+ this.setState({
|
|
|
visitModul:false
|
|
|
});
|
|
|
},
|
|
@@ -1221,20 +1231,22 @@ const MyClient = Form.create()(React.createClass({
|
|
|
return false;
|
|
|
};
|
|
|
if(this.state.keys){
|
|
|
-
|
|
|
- };
|
|
|
- if(this.state.lastName==undefined){
|
|
|
+ if(this.state.lastName==undefined){
|
|
|
message.warning('请选择联系人')
|
|
|
return false;
|
|
|
}
|
|
|
+ };
|
|
|
this.setState({
|
|
|
selectedRowKeys: [],
|
|
|
});
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
|
- let conts=this.state.lastName;
|
|
|
- let contactsId= this.state.contactsIdArr[conts].id;
|
|
|
+ let contactsId='';
|
|
|
+ if(this.state.keys){
|
|
|
+ let conts=this.state.lastName;
|
|
|
+ contactsId= this.state.contactsIdArr[conts].id;
|
|
|
+ }
|
|
|
//新增
|
|
|
$.ajax({
|
|
|
method: "post",
|
|
@@ -1248,9 +1260,9 @@ const MyClient = Form.create()(React.createClass({
|
|
|
result: this.state.result,
|
|
|
followTime: this.state.followTime,
|
|
|
}:{
|
|
|
+ followId:this.state.followIds,
|
|
|
userBusinessList:JSON.stringify(this.state.data),
|
|
|
uid: this.state.uid,
|
|
|
- ocbId: contactsId,
|
|
|
contactType:this.state.contactType,
|
|
|
result: this.state.result,
|
|
|
followTime: this.state.followTime,
|
|
@@ -1263,7 +1275,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
message.success('保存成功!');
|
|
|
this.loadVisit(); //
|
|
|
this.loadData();
|
|
|
- this.visitCancel()
|
|
|
+ this.visitCancel();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
@@ -1282,9 +1294,11 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},
|
|
|
//添加新业务及单位客户详情新增
|
|
|
addNew() {
|
|
|
- this.state.data.push({
|
|
|
- id: null,
|
|
|
-
|
|
|
+ this.state.data.push({
|
|
|
+ customerStatus:undefined,
|
|
|
+ businessGlossoryId:undefined,
|
|
|
+ followSituation:undefined,
|
|
|
+ remarks: '',
|
|
|
});
|
|
|
this.setState({
|
|
|
data: this.state.data
|
|
@@ -1436,7 +1450,8 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},
|
|
|
//拜访意向服务列表单个删除
|
|
|
intentionDelet(e){
|
|
|
- if(e.id==''){
|
|
|
+ let detId=this.state.uid?this.state.uid:this.state.followId;
|
|
|
+ if(e.id||e.followId){
|
|
|
this.setState({
|
|
|
selectedRowKeys: [],
|
|
|
});
|
|
@@ -1446,7 +1461,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/api/admin/customer/transferToPublic",
|
|
|
data: {
|
|
|
- id: e.id
|
|
|
+ id: e.id||e.followId
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
@@ -1457,12 +1472,11 @@ const MyClient = Form.create()(React.createClass({
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
};
|
|
|
- //this.visitModify(this.state.deletId);
|
|
|
- this.visit(this.state.deletId)
|
|
|
+
|
|
|
+ this.visitModify(detId)
|
|
|
}.bind(this));
|
|
|
}else{
|
|
|
- //this.visitModify(this.state.deletId);
|
|
|
- this.visit(this.state.deletId)
|
|
|
+ this.visitModify(detId)
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -1680,7 +1694,6 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},
|
|
|
|
|
|
};
|
|
|
-
|
|
|
const hasSelected = this.state.selectedRowKeys.length > 0;
|
|
|
const { RangePicker } = DatePicker;
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
@@ -2336,19 +2349,20 @@ const MyClient = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="当前联系人"
|
|
|
>
|
|
|
- <span>{contacts}</span>
|
|
|
+ <span>{this.state.contacts}</span>
|
|
|
</FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="联系人"
|
|
|
- >
|
|
|
- <Select placeholder="选择联系人" style={{ width: 140 }}
|
|
|
- value={this.state.lastName}
|
|
|
- onChange={this.hundleName}>
|
|
|
- {this.state.orderStatusOption}
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
-
|
|
|
+ {this.state.contacts?<span></span>:
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="联系人"
|
|
|
+ >
|
|
|
+ <Select placeholder="选择联系人" style={{ width: 140 }}
|
|
|
+ value={this.state.lastName}
|
|
|
+ onChange={this.hundleName}>
|
|
|
+ {this.state.orderStatusOption}
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ }
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="拜访时间"
|
|
@@ -2569,7 +2583,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
- <div>业务跟进</div>
|
|
|
+ <div style={{fontSize:'18px',lineHeight:'24px',marginBottom:'10px'}}>业务跟进</div>
|
|
|
<div className="clearfix">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Table
|