|
@@ -13,33 +13,19 @@ const FollowDetail = React.createClass({
|
|
|
visitModul:false,
|
|
|
loading:false,
|
|
|
data:[],
|
|
|
- businessName:'',
|
|
|
busModul:false,
|
|
|
- intentionList:[{
|
|
|
+ intentionList:[
|
|
|
+ {
|
|
|
title: '业务名称',
|
|
|
- dataIndex: 'businessGlossoryId',
|
|
|
+ dataIndex: 'businessVarietiesName',
|
|
|
width:120,
|
|
|
- key: 'businessGlossoryId',
|
|
|
- render: (text, record, index) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <span>{getCompanyIntention(text)}</span>
|
|
|
- </div>
|
|
|
- )
|
|
|
- }
|
|
|
+ key: 'businessVarietiesName'
|
|
|
},
|
|
|
{
|
|
|
title: '项目名称',
|
|
|
- dataIndex: 'businessName',
|
|
|
- key:'businessName',
|
|
|
- width:200,
|
|
|
- render:(text,record,index)=>{
|
|
|
- return(
|
|
|
- <div>
|
|
|
- <span title={text}>{text&&text.length>14?(text.substr(0,14)+'…'):text}</span>
|
|
|
- </div>
|
|
|
- )
|
|
|
- }
|
|
|
+ dataIndex: 'businessProjectName',
|
|
|
+ key:'businessProjectName',
|
|
|
+ width:120
|
|
|
},
|
|
|
{
|
|
|
title: '最新进度',
|
|
@@ -192,9 +178,10 @@ const FollowDetail = React.createClass({
|
|
|
for(let i = 0; i < data.data.userBusinessList.length; i++) {
|
|
|
let thisdata = data.data.userBusinessList[i];
|
|
|
listArr.push({
|
|
|
- id: thisdata.id,
|
|
|
- businessName:thisdata.businessName,
|
|
|
- businessGlossoryId: String(thisdata.businessGlossoryId),
|
|
|
+ id: thisdata.businessId,
|
|
|
+ businessName:thisdata.businessProjectId,
|
|
|
+ businessVarietiesName:thisdata.businessVarietiesName,
|
|
|
+ businessProjectName:thisdata.businessProjectName,
|
|
|
followSituation: String(thisdata.followSituation),
|
|
|
customerStatus: String(thisdata.customerStatus),
|
|
|
remarks: thisdata.remarks,
|
|
@@ -204,11 +191,7 @@ const FollowDetail = React.createClass({
|
|
|
contacts: thedata.contacts,
|
|
|
uid: thedata.uid,
|
|
|
data: listArr,
|
|
|
- identifyName: thedata.identifyName,
|
|
|
followTime: thedata.followTime,
|
|
|
- businessGlossoryId: thedata.businessGlossoryId,
|
|
|
- followSituation: thedata.followSituation,
|
|
|
- customerStatus: thedata.customerStatus,
|
|
|
remarks: thedata.remarks,
|
|
|
});
|
|
|
}.bind(this),
|
|
@@ -246,29 +229,28 @@ const FollowDetail = React.createClass({
|
|
|
//详情保存
|
|
|
visitSubmit(e){
|
|
|
e.preventDefault();
|
|
|
- let GlossoryId=false;
|
|
|
- this.state.data.map(function(item) {
|
|
|
- if(!item.businessGlossoryId||!item.followSituation||!item.customerStatus) {
|
|
|
- GlossoryId = true
|
|
|
- }
|
|
|
- })
|
|
|
if(this.state.contactType == undefined) {
|
|
|
message.warning('请选择拜访方式')
|
|
|
return false;
|
|
|
};
|
|
|
-
|
|
|
if(this.state.lastName == undefined) {
|
|
|
message.warning('请选择联系人')
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- if(GlossoryId) {
|
|
|
- message.warning("业务名称/最新进度/最新状态不能为空!")
|
|
|
- return false;
|
|
|
- };
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
|
+ let dataList=this.state.data,
|
|
|
+ idsList=[];
|
|
|
+ dataList.map((item,index) => {
|
|
|
+ idsList.push({
|
|
|
+ businessId:item.id||'',
|
|
|
+ businessProjectId:item.businessName,
|
|
|
+ customerStatus:item.customerStatus,
|
|
|
+ followSituation:item.followSituation,
|
|
|
+ remarks:item.remarks||''
|
|
|
+ })
|
|
|
+ });
|
|
|
let contactsId = '';
|
|
|
let conts = this.state.lastName;
|
|
|
contactsId = this.state.contactsIdArr[conts].id;
|
|
@@ -278,7 +260,7 @@ const FollowDetail = React.createClass({
|
|
|
dataType: "json",
|
|
|
url: globalConfig.context + '/api/admin/customer/addFollow',
|
|
|
data: {
|
|
|
- userBusinessList: JSON.stringify(this.state.data),
|
|
|
+ userBusinessList: JSON.stringify(idsList),
|
|
|
uid: this.state.uid,
|
|
|
ocbId: contactsId,
|
|
|
contactType: this.state.contactType,
|
|
@@ -291,7 +273,7 @@ const FollowDetail = React.createClass({
|
|
|
});
|
|
|
if(!data.error.length) {
|
|
|
message.success('保存成功!');
|
|
|
- this.props.closeDesc(false,true)
|
|
|
+ this.props.closeDesc(false,true);
|
|
|
this.visitCancel();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|