123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- 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(
- <Modal
- footer=''
- title="业务跟进详情"
- width='600px'
- visible={this.state.businessFollowModul}
- onOk={this.businessFollowCancel}
- onCancel={this.businessFollowCancel}
- >
- <div className="clearfix">
- <Form layout="horizontal" id="demand-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向业务名称" >
- <span>{this.state.businessProjectName}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向时间" >
- <span>{this.state.createTimes}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="客户名称" >
- <span>{this.state.identifyNames}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="营销员" >
- <span>{this.state.adminNames}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="意向业务进度" >
- <span>{getfllowSituation(this.state.followSituations)}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="业务客户状态" >
- <span>{getcustomerStatue(this.state.customerStatuss)}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="业务意向说明" >
- <span>{this.state.remarkss}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访方式" >
- <span>{getContactType(this.state.contactTypes)}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="联系人" >
- <span>{this.state.contactss}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="联系电话" >
- <span>{!this.props.data.readOnly?this.state.contactMobiles:'***'}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访时间" >
- <span>{!this.props.data.readOnly?this.state.followTimes:'***'}</span>
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访人" >
- <span>{this.state.adminNames}</span>
- </FormItem>
- <div className="clearfix">
- <FormItem className="half-item"
- {...formItemLayout}
- label="拜访备注" >
- <span>{this.state.results}</span>
- </FormItem>
- </div>
- </div>
- </Spin>
- </Form>
- </div>
- </Modal>
- )
- }
- })
- export default BusinFollow;
|