|
@@ -94,7 +94,7 @@ const VisitDetail = React.createClass({
|
|
|
for(let i = 0; i < data.data.userBusinessList.length; i++) {
|
|
|
let thisdata = data.data.userBusinessList[i];
|
|
|
theArr.push({
|
|
|
- id: thisdata.businessId,
|
|
|
+ id: thisdata.ufbId,
|
|
|
businessName:thisdata.businessProjectId,
|
|
|
businessVarietiesName:thisdata.businessVarietiesName,
|
|
|
businessProjectName:thisdata.businessProjectName,
|
|
@@ -103,11 +103,12 @@ const VisitDetail = React.createClass({
|
|
|
remarks: thisdata.remarks,
|
|
|
});
|
|
|
};
|
|
|
+ console.log(theArr)
|
|
|
this.setState({
|
|
|
followIds: thedata.followId,
|
|
|
contacts: thedata.contacts,
|
|
|
uid: thedata.uid,
|
|
|
- dataBus: theArr,
|
|
|
+ data: theArr,
|
|
|
result: thedata.result,
|
|
|
contactMobile:thedata.contactMobile,
|
|
|
contactType: parseInt(thedata.contactType),
|
|
@@ -177,6 +178,27 @@ const VisitDetail = React.createClass({
|
|
|
let conts = this.state.lastName;
|
|
|
contactsId = this.state.contactsIdArr[conts].id;
|
|
|
}
|
|
|
+ let GlossoryId=false;
|
|
|
+ this.state.data.map(function(item) {
|
|
|
+ if(!item.followSituation||!item.customerStatus||!item.businessName) {
|
|
|
+ GlossoryId = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(this.state.data.length&&GlossoryId) {
|
|
|
+ message.warning("项目名称/最新进度/最新状态不能为空!")
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ let dataList=this.state.data,
|
|
|
+ idsList=[];
|
|
|
+ dataList.map((item,index) => {
|
|
|
+ idsList.push({
|
|
|
+ ufbId:item.id||'',
|
|
|
+ businessProjectId:item.businessName,
|
|
|
+ customerStatus:item.customerStatus,
|
|
|
+ followSituation:item.followSituation,
|
|
|
+ remarks:item.remarks||''
|
|
|
+ })
|
|
|
+ });
|
|
|
//新增
|
|
|
$.ajax({
|
|
|
method: "post",
|
|
@@ -184,7 +206,7 @@ const VisitDetail = React.createClass({
|
|
|
url: globalConfig.context + '/api/admin/customer/updateFollow',
|
|
|
data: {
|
|
|
followId: this.state.followIds,
|
|
|
- userBusinessList: JSON.stringify(this.state.data),
|
|
|
+ userBusinessList: JSON.stringify(idsList),
|
|
|
uid: this.state.uid,
|
|
|
contactType: this.state.contactType,
|
|
|
result: this.state.result,
|
|
@@ -289,7 +311,7 @@ const VisitDetail = React.createClass({
|
|
|
rowKey={record => record.id}
|
|
|
pagination={false}
|
|
|
columns={this.state.intentionList}
|
|
|
- dataSource={this.state.dataBus}
|
|
|
+ dataSource={this.state.data}
|
|
|
/>
|
|
|
</Spin>
|
|
|
</div>
|