import React from 'react'; import {Form,Button,Spin,message,Modal} from 'antd'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import {getCompanyIntention ,getfllowSituation,getcustomerStatue,getContactType} from '@/tools.js'; const FormItem =Form.Item; const BusinFollow =React.createClass({ getInitialState(){ return { loading:false } }, businessFollowCancel(){ this.setState({ businessFollowModul:false }) this.props.closeBusiness(false); }, componentWillReceiveProps(nextProps) { if(nextProps.businessFollowModul){ this.setState({ businessFollowModul:true }) this.listFollowUp(nextProps.data); } }, listFollowUp(e) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness", data: { ufbId: e.ufbId }, success: function(data) { let thedata = data.data; if(!thedata) { if(data.error && data.error.length) { message.warning(data.error[0].message); }; thedata = {}; }; this.setState({ businessProjectName: thedata.businessProjectName, 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)); }, render(){ const formItemLayout = { labelCol: { span: 8 }, wrapperCol: { span: 14 }, }; return(
{this.state.businessProjectName} {this.state.createTimes} {this.state.identifyNames} {this.state.adminNames} {getfllowSituation(this.state.followSituations)} {getcustomerStatue(this.state.customerStatuss)}
{this.state.remarkss}
拜访情况
{getContactType(this.state.contactTypes)} {this.state.contactss} {!this.props.data.readOnly?this.state.contactMobiles:'***'} {!this.props.data.readOnly?this.state.followTimes:'***'} {this.state.adminNames}
{this.state.results}
) } }) export default BusinFollow;