import React from 'react' import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import { Radio, Form, Modal, message, layout, Spin, Button } from 'antd'; const BusName = React.createClass({ loadData(ids) { console.log(ids) return ; this.setState({ loading: true }) $.ajax({ method: "get", dataType: "json", url: globalConfig.context + '/api/admin/customer/toAddFollow', data: { uid: e, }, success: function(data) { let listArr = []; let thedata = data.data; if(!thedata) { if(data.error && data.error.length) { message.warning(data.error[0].message); }; thedata = {}; }; 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), followSituation: String(thisdata.followSituation), customerStatus: String(thisdata.customerStatus), remarks: thisdata.remarks, }); }; this.setState({ 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), }).always(function() { this.setState({ loading: false }); }.bind(this)); }, getInitialState() { return { busModul: false } }, visitCancel() { this.setState({ busModul: false }) this.props.closeBus(null,false,false) }, selFn() { this.setState({ busModul: false }); this.props.closeBus(this.state.contactType, false, true); }, componentWillReceiveProps(nextProps) { if(nextProps.busModul) { this.setState({ busModul: true, loading: false }) this.loadData(nextProps.businessId) }; }, render() { const formItemLayout = { labelCol: { span: 4 }, wrapperCol: { span: 18 }, }; return(
好东东. { this.setState({ contactType: e.target.value }) }}> 外出 电话 QQ 微信 邮箱
) } }) export default BusName;