|
@@ -8,8 +8,8 @@ import { citySelect,provinceList,areaSelect} from '../../../NewDicProvinceList';
|
|
|
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 {getContactType,getCompanyIntention,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
|
|
|
+import {socialAttribute,industryList,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
|
|
|
+import {getCompanyIntention,getContactType,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
|
|
|
|
|
|
const data = [{
|
|
|
id: '1',
|
|
@@ -226,6 +226,30 @@ const MyClient = Form.create()(React.createClass({
|
|
|
return '共' + total + '条数据';
|
|
|
}
|
|
|
},
|
|
|
+ paginations: {
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ showQuickJumper: true,
|
|
|
+ pageSize: 10,
|
|
|
+ onChange: function (page) {
|
|
|
+ this.loadVisit(page);
|
|
|
+ }.bind(this),
|
|
|
+ showTotal: function (total) {
|
|
|
+ return '共' + total + '条数据';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ paginationt: {
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ showQuickJumper: true,
|
|
|
+ pageSize: 10,
|
|
|
+ onChange: function (page) {
|
|
|
+ this.BusinessList(page);
|
|
|
+ }.bind(this),
|
|
|
+ showTotal: function (total) {
|
|
|
+ return '共' + total + '条数据';
|
|
|
+ }
|
|
|
+ },
|
|
|
//业务意向列表
|
|
|
intentionList:[
|
|
|
{
|
|
@@ -324,35 +348,40 @@ const MyClient = Form.create()(React.createClass({
|
|
|
render:(text,record) =>{return (<Button onClick={(e)=>{this.businessIntentionDetails(record)}}>查看</Button>)}
|
|
|
}
|
|
|
],
|
|
|
- businessFollowList:[{
|
|
|
- title: '跟进时间',
|
|
|
- dataIndex: 'name',
|
|
|
- key: 'name'
|
|
|
- },{
|
|
|
- title: '营销员',
|
|
|
- dataIndex: 'mobile2',
|
|
|
- key: 'mobile2'
|
|
|
- },{
|
|
|
- title: '业务意向进度',
|
|
|
- dataIndex: 'mobile3',
|
|
|
- key: 'mobile3'
|
|
|
- }
|
|
|
- ,{
|
|
|
- title: '客户状态',
|
|
|
- dataIndex: 'mobile4',
|
|
|
- key: 'mobile4'
|
|
|
- },{
|
|
|
- title: '拜访方式',
|
|
|
- dataIndex: 'mobile5',
|
|
|
- key: 'mobile5'
|
|
|
- },{
|
|
|
- title: '联系人',
|
|
|
- dataIndex: 'mobile6',
|
|
|
- key: 'mobile6'
|
|
|
- },{
|
|
|
- title: '联系电话',
|
|
|
- dataIndex: 'mobile7',
|
|
|
- key: 'mobile7'
|
|
|
+ businessFollowList:[
|
|
|
+ {
|
|
|
+ title: '跟进时间',
|
|
|
+ dataIndex: 'followTime',
|
|
|
+ key: 'followTime',
|
|
|
+ }, {
|
|
|
+ title: '营销员',
|
|
|
+ dataIndex: 'adminName',
|
|
|
+ key: 'adminName',
|
|
|
+ }, {
|
|
|
+ title: '业务意向进度',
|
|
|
+ dataIndex: 'followSituation',
|
|
|
+ key: 'followSituation',
|
|
|
+ render:text=>{return getfllowSituation(text)}
|
|
|
+ }, {
|
|
|
+ title: '客户状态',
|
|
|
+ dataIndex: 'customerStatus',
|
|
|
+ key: 'customerStatus',
|
|
|
+ render:text=>{return getcustomerStatue(text)}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '拜访方式',
|
|
|
+ dataIndex: 'contactType',
|
|
|
+ key:'contactType',
|
|
|
+ render:text=>{return getContactType(text)}
|
|
|
+ }, {
|
|
|
+ title: '联系人',
|
|
|
+ dataIndex: 'contacts',
|
|
|
+ key: 'contacts',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '联系电话',
|
|
|
+ dataIndex: 'contactMobile',
|
|
|
+ key:'contactMobile',
|
|
|
},{
|
|
|
title: '操作',
|
|
|
dataIndex: 'ooo',
|
|
@@ -404,70 +433,65 @@ const MyClient = Form.create()(React.createClass({
|
|
|
}
|
|
|
],
|
|
|
|
|
|
- ContactsList:[{
|
|
|
+ ContactsLists:[{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
+ return <Input value={record.name} placeholder="姓名" key={record.id}
|
|
|
+ onChange={(e) => { record.name = e.target.value;
|
|
|
+ this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
|
}
|
|
|
},{
|
|
|
title: '联系人部门',
|
|
|
- dataIndex: 'mobile1',
|
|
|
- key: 'mobile1',
|
|
|
+ dataIndex: 'depatrment',
|
|
|
+ key: 'depatrment',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
+ return <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
|
|
|
+ onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
|
}
|
|
|
},{
|
|
|
title: '联系人职务',
|
|
|
- dataIndex: 'mobile2',
|
|
|
- key: 'mobile2',
|
|
|
+ dataIndex: 'position',
|
|
|
+ key: 'position',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
+ return <Input value={record.position} placeholder="联系人职务" key={record.id}
|
|
|
+ onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
|
}
|
|
|
},{
|
|
|
title: '手机号码',
|
|
|
- dataIndex: 'mobile3',
|
|
|
- key: 'mobile3',
|
|
|
+ dataIndex: 'mobile',
|
|
|
+ key: 'mobile',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
+ return <Input value={record.mobile} placeholder="手机号码" key={record.id}
|
|
|
+ onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
|
}
|
|
|
},{
|
|
|
- title: '固定电话',
|
|
|
- dataIndex: 'mobile4',
|
|
|
- key: 'mobile4',
|
|
|
+ title: '微信',
|
|
|
+ dataIndex: 'wechat',
|
|
|
+ key: 'wechat',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
+ return <Input value={record.wechat} placeholder="微信" key={record.id}
|
|
|
+ onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
|
}
|
|
|
},{
|
|
|
title: '联系人QQ',
|
|
|
- dataIndex: 'mobile5',
|
|
|
- key: 'mobile5',
|
|
|
+ dataIndex: 'qq',
|
|
|
+ key: 'qq',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
+ return <Input value={record.qq} placeholder="联系人QQ" key={record.id}
|
|
|
+ onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
|
}
|
|
|
},{
|
|
|
title: '电子邮箱',
|
|
|
- dataIndex: 'mobile6',
|
|
|
- key: 'mobile6',
|
|
|
- render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
- }
|
|
|
- },{
|
|
|
- title: '营销员',
|
|
|
- dataIndex: 'mobile7',
|
|
|
- key: 'mobile7',
|
|
|
- render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
- }
|
|
|
- },{
|
|
|
- title: '备注',
|
|
|
- dataIndex: 'mobile8',
|
|
|
- key: 'mobile8',
|
|
|
+ dataIndex: 'email',
|
|
|
+ key: 'email',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
|
|
|
- }
|
|
|
- },{
|
|
|
+ return <Input value={record.email} placeholder="电子邮箱" key={record.id}
|
|
|
+ onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '操作',
|
|
|
dataIndex: 'dels',
|
|
|
key: 'dels',
|
|
@@ -476,7 +500,6 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
|
|
|
<Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
|
|
|
</Popconfirm>
|
|
|
- <Button type="primary" onClick={(e)=>{this.ContactsListSave(record)}}>保存</Button>
|
|
|
</div>
|
|
|
}
|
|
|
}
|
|
@@ -595,8 +618,52 @@ const MyClient = Form.create()(React.createClass({
|
|
|
visible: true,
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- //刷新新增拜访记录删除列表
|
|
|
+ //tab2获取联系人详情
|
|
|
+ contactLists(ids) {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url:globalConfig.context + '/api/admin/customer/findCustomerContacts',
|
|
|
+ data: {
|
|
|
+ uid:ids , //名称1
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let theArr = [];
|
|
|
+ if (data.error.length || data.data.list=="") {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < data.data.length; i++) {
|
|
|
+ let thisdata = data.data[i];
|
|
|
+ theArr.push({
|
|
|
+ id:thisdata.id,
|
|
|
+ name:thisdata.name,
|
|
|
+ mobile:thisdata.mobile,
|
|
|
+ email:thisdata.email,
|
|
|
+ qq:thisdata.qq,
|
|
|
+ wechat:thisdata.wechat,
|
|
|
+ depatrment:thisdata.depatrment,
|
|
|
+ position:thisdata.position,
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ contactList: theArr,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //刷新新增拜访记录刷新
|
|
|
deletelist(e){
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -618,9 +685,9 @@ const MyClient = Form.create()(React.createClass({
|
|
|
let thisdata = data.data.userBusinessList[i];
|
|
|
listArr.push({
|
|
|
id: thisdata.id,
|
|
|
- businessGlossoryId:(thisdata.businessGlossoryId).toString(),
|
|
|
- followSituation:(thisdata.followSituation).toString(),
|
|
|
- customerStatus:(thisdata.customerStatus).toString(),
|
|
|
+ businessGlossoryId:String(thisdata.businessGlossoryId),
|
|
|
+ followSituation:String(thisdata.followSituation),
|
|
|
+ customerStatus:String(thisdata.customerStatus),
|
|
|
remarks:thisdata.remarks,
|
|
|
});
|
|
|
};
|
|
@@ -649,6 +716,8 @@ const MyClient = Form.create()(React.createClass({
|
|
|
this.getNewWoman(e.id);
|
|
|
this.deletelist(e.id)
|
|
|
this.setState({
|
|
|
+ result:'',
|
|
|
+ contactType:undefined,
|
|
|
visitModul:true,
|
|
|
loading: true
|
|
|
});
|
|
@@ -698,14 +767,15 @@ const MyClient = Form.create()(React.createClass({
|
|
|
message.warning(data.error[0].message);
|
|
|
};
|
|
|
thedata = {};
|
|
|
- };
|
|
|
+ };
|
|
|
+
|
|
|
for (let i = 0; i < data.data.userBusinessList.length; i++) {
|
|
|
let thisdata = data.data.userBusinessList[i];
|
|
|
theArr.push({
|
|
|
id: thisdata.id,
|
|
|
- businessGlossoryId:(thisdata.businessGlossoryId).toString(),
|
|
|
- followSituation:(thisdata.followSituation).toString(),
|
|
|
- customerStatus:(thisdata.customerStatus).toString(),
|
|
|
+ businessGlossoryId:String(thisdata.businessGlossoryId),
|
|
|
+ followSituation:String(thisdata.followSituation),
|
|
|
+ customerStatus:String(thisdata.customerStatus),
|
|
|
remarks:thisdata.remarks,
|
|
|
});
|
|
|
};
|
|
@@ -917,14 +987,14 @@ const MyClient = Form.create()(React.createClass({
|
|
|
//城市
|
|
|
let Province = [];
|
|
|
provinceList.map(function (item) {
|
|
|
- var id=item.id.toString()
|
|
|
+ var id= String(item.id)
|
|
|
Province.push(
|
|
|
<Select.Option value={id} key={item.name}>{item.name}</Select.Option>
|
|
|
)
|
|
|
});
|
|
|
- //意向服务
|
|
|
+ //行业
|
|
|
let intentionalArr = [];
|
|
|
- intentionalService.map(function (item) {
|
|
|
+ industryList.map(function (item) {
|
|
|
intentionalArr.push(
|
|
|
<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
)
|
|
@@ -1020,7 +1090,6 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},
|
|
|
VisitRowClick(record, index) {
|
|
|
this.state.keys=false;
|
|
|
- console.log(record)
|
|
|
this.state.RowData = record;
|
|
|
this.visitModify(record.followId);
|
|
|
this.setState({
|
|
@@ -1138,7 +1207,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
|
dataInformation:thisData,
|
|
|
ProvinceCity:ProvinceCityArr,
|
|
|
- industry:thisData.industry?(thisData.industry).toString():undefined,
|
|
|
+ industry:String(thisData.industry)?String(thisData.industry):undefined,
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -1167,7 +1236,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
thisData = {};
|
|
|
};
|
|
|
let sourcecustomer=''
|
|
|
- switch((thisData.source).toString()){
|
|
|
+ switch(String(thisData.source)){
|
|
|
case '0':
|
|
|
sourcecustomer='注册客户'
|
|
|
break;
|
|
@@ -1184,10 +1253,10 @@ const MyClient = Form.create()(React.createClass({
|
|
|
type:getcustomerTyp(thisData.type),
|
|
|
source:sourcecustomer,
|
|
|
isMember:thisData.isMember,
|
|
|
- currentMemberStatus:(thisData.currentMemberStatus).toString(),
|
|
|
- lvl:(thisData.lvl).toString(),
|
|
|
+ currentMemberStatus:String(thisData.currentMemberStatus),
|
|
|
+ lvl:String(thisData.lvl),
|
|
|
serviceCertification:thisData.serviceCertification,
|
|
|
- status:(thisData.status).toString(),
|
|
|
+ status:String(thisData.status),
|
|
|
userCertification:thisData.userCertification,
|
|
|
createTimes:thisData.createTimes,
|
|
|
});
|
|
@@ -1204,6 +1273,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
this.httpAccount(e.id);
|
|
|
this.loadVisit();
|
|
|
this.BusinessList();
|
|
|
+ this.contactLists(e.id);
|
|
|
},
|
|
|
//点击消失函数
|
|
|
detailsModal(e) {
|
|
@@ -1304,59 +1374,65 @@ const MyClient = Form.create()(React.createClass({
|
|
|
data: this.state.data
|
|
|
})
|
|
|
},
|
|
|
- //tab中列表点击修改拜访详情
|
|
|
- //获取拜访详情ajax
|
|
|
- loadVisit(pageNo) {
|
|
|
- this.state.data = [];
|
|
|
+ //tab2新增联系人
|
|
|
+ addcontact() {
|
|
|
+ this.state.contactList.push({
|
|
|
+ id:null,
|
|
|
+ name: '',
|
|
|
+ mobile: '',
|
|
|
+ email: '',
|
|
|
+ qq: '',
|
|
|
+ wechat: '',
|
|
|
+ depatrment: '',
|
|
|
+ position: '',
|
|
|
+ });
|
|
|
+
|
|
|
this.setState({
|
|
|
- loading: true
|
|
|
- });
|
|
|
- $.ajax({
|
|
|
- method: "get",
|
|
|
- dataType: "json",
|
|
|
- crossDomain: false,
|
|
|
- url:globalConfig.context + '/api/admin/customer/listFollowHistory',
|
|
|
- data: {
|
|
|
- pageNo: pageNo || 1,
|
|
|
- pageSize: this.state.pagination.pageSize,
|
|
|
- uid: this.state.rowId, //名称1
|
|
|
- businessGlossoryId:'',
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- let theArr = [];
|
|
|
- if (data.error.length || data.data.list=="") {
|
|
|
+ contactList: this.state.contactList
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //tab5进入修改时
|
|
|
+ //进入修改时
|
|
|
+ listFollowUp(e){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
|
|
|
+ data:{
|
|
|
+ ufbId:e
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thedata=data.data;
|
|
|
+ if (!thedata) {
|
|
|
if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
|
- };
|
|
|
- } else {
|
|
|
- for (let i = 0; i < data.data.list.length; i++) {
|
|
|
- let thisdata = data.data.list[i];
|
|
|
- theArr.push({
|
|
|
- followId:thisdata.followId,
|
|
|
- followTime:thisdata.followTime,
|
|
|
- identityName:thisdata.identityName,
|
|
|
- contacts:thisdata.contacts,
|
|
|
- contactMobile:thisdata.contactMobile,
|
|
|
- result:thisdata.result,
|
|
|
- adminName:thisdata.adminName,
|
|
|
- contactType:thisdata.contactType
|
|
|
- });
|
|
|
- };
|
|
|
- this.state.pagination.current = data.data.pageNo;
|
|
|
- this.state.pagination.total = data.data.totalCount;
|
|
|
- };
|
|
|
- this.setState({
|
|
|
- visitArrList: theArr,
|
|
|
- pagination: this.state.pagination
|
|
|
- });
|
|
|
- }.bind(this),
|
|
|
- }).always(function () {
|
|
|
+ };
|
|
|
+ thedata = {};
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ businessGlossoryIds:thedata.businessGlossoryId,
|
|
|
+ followSituations:thedata.followSituation,
|
|
|
+ customerStatuss:thedata.customerStatus,
|
|
|
+ followTimes:thedata.followTime,
|
|
|
+ createTimes:thedata.createTime,
|
|
|
+ identifyNames:thedata.identifyName,
|
|
|
+ contactTypes:parseInt(thedata.contactType),
|
|
|
+ results:thedata.result,
|
|
|
+ remarkss:thedata.remarks,
|
|
|
+ adminNames:thedata.adminName,
|
|
|
+ contactss:thedata.contacts,
|
|
|
+ contactMobiles:thedata.contactMobile,
|
|
|
+ ufbId:thedata.ufbId,
|
|
|
+ followIds:thedata.followId,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
- }.bind(this));
|
|
|
- },
|
|
|
-
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
//修改密码Modul
|
|
|
modifyPassworld(){
|
|
|
this.setState({
|
|
@@ -1450,7 +1526,8 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},
|
|
|
//拜访意向服务列表单个删除
|
|
|
intentionDelet(e){
|
|
|
- let detId=this.state.uid?this.state.uid:this.state.followId;
|
|
|
+
|
|
|
+ let detId=!this.state.keys?this.state.followIds:this.state.uid;
|
|
|
if(e.id||e.followId){
|
|
|
this.setState({
|
|
|
selectedRowKeys: [],
|
|
@@ -1472,21 +1549,109 @@ const MyClient = Form.create()(React.createClass({
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
};
|
|
|
-
|
|
|
- this.visitModify(detId)
|
|
|
+ !this.state.keys?this.visitModify(detId):this.deletelist(detId);
|
|
|
}.bind(this));
|
|
|
}else{
|
|
|
- this.visitModify(detId)
|
|
|
+ !this.state.keys?this.visitModify(detId):this.deletelist(detId);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
//tab5意向业务
|
|
|
//意向业务查看列表单个详情
|
|
|
businessIntentionDetails(e){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
|
|
|
+ data: {
|
|
|
+ businessId: e.businessId
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thisData = data.data;
|
|
|
+ if (!thisData) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thisData = {};
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ businessGlossoryId:thisData.businessGlossoryId,
|
|
|
+ identifyName:thisData.identifyName,
|
|
|
+ uid:thisData.uid,
|
|
|
+ businessId:thisData.businessId,
|
|
|
+ followSituation:thisData.followSituation,
|
|
|
+ customerStatus:thisData.customerStatus,
|
|
|
+ createTime:thisData.createTime,
|
|
|
+ followTime:thisData.followTime,
|
|
|
+ adminName:thisData.adminName,
|
|
|
+ remarks:thisData.remarks,
|
|
|
+ result:thisData.result,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.loadVisit();
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
this.setState({
|
|
|
businessModul:true
|
|
|
})
|
|
|
},
|
|
|
+ //查看跟进记录列表
|
|
|
+ loadVisit(pageNo) {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url:globalConfig.context + '/api/admin/customer/listFollowHistory',
|
|
|
+ data: {
|
|
|
+ pageNo: pageNo || 1,
|
|
|
+ pageSize: this.state.paginations.pageSize,
|
|
|
+ uid: this.state.rowId, //名称1
|
|
|
+ businessGlossoryId:this.state.businessGlossoryId,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let theArr = [];
|
|
|
+ if (data.error.length || data.data.list=="") {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
+ theArr.push({
|
|
|
+ followId:thisdata.followId,
|
|
|
+ followTime:thisdata.followTime,
|
|
|
+ identityName:thisdata.identityName,
|
|
|
+ contacts:thisdata.contacts,
|
|
|
+ contactMobile:thisdata.contactMobile,
|
|
|
+ result:thisdata.result,
|
|
|
+ ufbId:thisdata.ufbId,
|
|
|
+ adminName:thisdata.adminName,
|
|
|
+ followSituation:thisdata.followSituation,
|
|
|
+ customerStatus:thisdata.customerStatus,
|
|
|
+ contactType:thisdata.contactType
|
|
|
+ });
|
|
|
+ };
|
|
|
+ this.state.paginations.current = data.data.pageNo;
|
|
|
+ this.state.paginations.total = data.data.totalCount;
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ visitArrList: theArr,
|
|
|
+ paginations: this.state.paginations
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
businessIntentionOk(){
|
|
|
this.setState({
|
|
|
businessModul:false
|
|
@@ -1499,6 +1664,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
},
|
|
|
//业务跟进查看跟多
|
|
|
businessFollowDetails(e){
|
|
|
+ this.listFollowUp(e.ufbId)
|
|
|
this.setState({
|
|
|
businessFollowModul:true
|
|
|
})
|
|
@@ -1513,13 +1679,38 @@ const MyClient = Form.create()(React.createClass({
|
|
|
businessFollowModul:false
|
|
|
})
|
|
|
},
|
|
|
+ //tab2联系人保存
|
|
|
+ contactSave() {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ uid:this.state.rowId,
|
|
|
+ contactList: JSON.stringify(this.state.contactList)
|
|
|
+ }
|
|
|
+ }).done(function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success('保存成功!');
|
|
|
+ this.detailsModal()
|
|
|
+ this.loadData();
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
//详情tab切换数据处理
|
|
|
callback(e){
|
|
|
if(e==1){
|
|
|
this.loadInformation(this.state.rowId)
|
|
|
}
|
|
|
if(e==2){
|
|
|
-
|
|
|
+ this.contactLists(this.state.rowId)
|
|
|
}
|
|
|
if(e==3){
|
|
|
this.httpAccount(this.state.rowId)
|
|
@@ -1583,24 +1774,13 @@ const MyClient = Form.create()(React.createClass({
|
|
|
}
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- //列表详情tab2联系人新建
|
|
|
- addContact(){
|
|
|
-// this.state.data.push({
|
|
|
-// name: '',
|
|
|
-// });
|
|
|
-//
|
|
|
-// this.setState({
|
|
|
-// data: this.state.data
|
|
|
-// })
|
|
|
- },
|
|
|
- //删除
|
|
|
+
|
|
|
+
|
|
|
+ //tab2删除
|
|
|
confirmDelet(e){
|
|
|
console.log(e)
|
|
|
},
|
|
|
- //保存
|
|
|
- ContactsListSave(e){
|
|
|
- console.log(e)
|
|
|
- },
|
|
|
+
|
|
|
//tab5业务意向
|
|
|
BusinessList(pageNo) {
|
|
|
this.setState({
|
|
@@ -1613,7 +1793,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
url:globalConfig.context + '/api/admin/customer/listBusiness',
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
- pageSize: this.state.pagination.pageSize,
|
|
|
+ pageSize: this.state.paginationt.pageSize,
|
|
|
uid:this.state.rowId
|
|
|
},
|
|
|
success: function (data) {
|
|
@@ -1626,8 +1806,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
for (let i = 0; i < data.data.list.length; i++) {
|
|
|
let thisdata = data.data.list[i];
|
|
|
theArr.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id,
|
|
|
+ key: i,
|
|
|
businessId:thisdata.businessId,
|
|
|
businessName:thisdata.businessName,
|
|
|
identifyName:thisdata.identifyName,
|
|
@@ -1637,12 +1816,12 @@ const MyClient = Form.create()(React.createClass({
|
|
|
createTime:thisdata.createTime
|
|
|
});
|
|
|
};
|
|
|
- this.state.pagination.current = data.data.pageNo;
|
|
|
- this.state.pagination.total = data.data.totalCount;
|
|
|
+ this.state.paginationt.current = data.data.pageNo;
|
|
|
+ this.state.paginationt.total = data.data.totalCount;
|
|
|
};
|
|
|
this.setState({
|
|
|
dataBusiness: theArr,
|
|
|
- pagination: this.state.pagination
|
|
|
+ paginationt: this.state.paginationt
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -1770,7 +1949,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Table
|
|
|
scroll={{y:'350px'}}
|
|
|
- pagination={this.state.paginations}
|
|
|
+ pagination={false}
|
|
|
columns={this.state.columnsman}
|
|
|
rowSelection={rowSelections}
|
|
|
dataSource={this.state.dataman}
|
|
@@ -1781,9 +1960,9 @@ const MyClient = Form.create()(React.createClass({
|
|
|
</FormItem>
|
|
|
</Spin>
|
|
|
</Modal>
|
|
|
- <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
|
|
|
+ {/*<Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
|
|
|
disabled={!hasSelected}
|
|
|
- onClick={this.changeRow}>转为公共客户<Icon /></Button>
|
|
|
+ onClick={this.changeRow}>转为公共客户<Icon /></Button>*/}
|
|
|
<Button style={{marginRight:'10px',background: "#595a5c", border: "none",color: "#fff" }}
|
|
|
disabled={!hasSelected}
|
|
|
onClick={this.delectRow}>锁定
|
|
@@ -1922,7 +2101,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<Select placeholder="选择行业" value={this.state.industry} onChange={(e) => {
|
|
|
this.setState({industry:e})}}>
|
|
|
{
|
|
|
- intentionalService.map(function (item) {
|
|
|
+ industryList.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
})
|
|
|
}
|
|
@@ -2139,15 +2318,21 @@ const MyClient = Form.create()(React.createClass({
|
|
|
</TabPane>
|
|
|
<TabPane tab="联系人信息" key="2">
|
|
|
<div className="clearfix" >
|
|
|
- <Button className="ContactsList" type="primary" onClick={this.addNew}>新增</Button>
|
|
|
+ <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
+ <Form horizontal id="demand-form" onSubmit={this.contactSave} >
|
|
|
<Table
|
|
|
- pagination={this.state.paginations}
|
|
|
- columns={this.state.ContactsList}
|
|
|
- dataSource={data}
|
|
|
+ pagination={false}
|
|
|
+ columns={this.state.ContactsLists}
|
|
|
+ dataSource={this.state.contactList}
|
|
|
/>
|
|
|
+ <div className="clearfix">
|
|
|
+ <Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
|
|
|
+ <Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
|
|
|
+ </div>
|
|
|
+ </Form>
|
|
|
</Spin>
|
|
|
</div>
|
|
|
</TabPane>
|
|
@@ -2269,7 +2454,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<div className="clearfix">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Table
|
|
|
- pagination={this.state.paginations}
|
|
|
+ pagination={false}
|
|
|
columns={this.state.visitsList}
|
|
|
dataSource={this.state.visitArrList}
|
|
|
onRowClick={this.VisitRowClick}
|
|
@@ -2281,7 +2466,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<div className="clearfix">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Table
|
|
|
- pagination={this.state.paginations}
|
|
|
+ pagination={this.state.paginationt}
|
|
|
columns={this.state.businessIntentionList}
|
|
|
dataSource={this.state.dataBusiness}
|
|
|
/>
|
|
@@ -2399,7 +2584,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
|
|
|
+ <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 35px 35px 120px'}}>保存</Button>
|
|
|
<Button size="large" onClick={this.visitCancel}>取消</Button>
|
|
|
</Spin>
|
|
|
</Form>
|
|
@@ -2535,7 +2720,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<Modal
|
|
|
footer=''
|
|
|
title="业务意向详情"
|
|
|
- width='600px'
|
|
|
+ width='1000px'
|
|
|
visible={this.state.businessModul}
|
|
|
onOk={this.businessIntentionOk}
|
|
|
onCancel={this.businessIntentionCancel}
|
|
@@ -2547,39 +2732,39 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="意向业务名称" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="意向时间" >
|
|
|
- <span>{this.state.a1}</span>
|
|
|
+ <span>{this.state.createTime}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="客户名称" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.identifyName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="营销员" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.adminName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="意向业务进度" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{getfllowSituation(this.state.followSituation)}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="业务客户状态" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{getcustomerStatue(this.state.customerStatus)}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="业务意向说明" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.remarks}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
@@ -2589,7 +2774,7 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<Table
|
|
|
pagination={this.state.paginations}
|
|
|
columns={this.state.businessFollowList}
|
|
|
- dataSource={data}
|
|
|
+ dataSource={this.state.visitArrList}
|
|
|
/>
|
|
|
</Spin>
|
|
|
</div>
|
|
@@ -2613,73 +2798,73 @@ const MyClient = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="意向业务名称" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="意向时间" >
|
|
|
- <span>{this.state.a1}</span>
|
|
|
+ <span>{this.state.createTimes}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="客户名称" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.identifyNames}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="营销员" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.adminNames}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="意向业务进度" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{getfllowSituation(this.state.followSituations)}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="业务客户状态" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{getcustomerStatue(this.state.customerStatuss)}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="业务意向说明" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.remarkss}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
- <div>拜访情况</div>
|
|
|
+ <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="拜访方式" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{getContactType(this.state.contactTypes)}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="联系人" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.contactss}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="联系电话" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.contactMobiles}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="拜访时间" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.followTimes}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="拜访人" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.adminNames}</span>
|
|
|
</FormItem>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="拜访备注" >
|
|
|
- <span>{this.state.a}</span>
|
|
|
+ <span>{this.state.results}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
</div>
|