|
@@ -1,7 +1,7 @@
|
|
import React from 'react'
|
|
import React from 'react'
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
import $ from 'jquery/src/ajax';
|
|
import $ from 'jquery/src/ajax';
|
|
-import {Modal,Form,layout,Radio,Button,Input,Spin,Table,Select,Popconfirm,message} from 'antd';
|
|
|
|
|
|
+import {Modal, Form, layout, Radio, Button, Input, Spin, Table, Select, Popconfirm, message, Tag, Tooltip} from 'antd';
|
|
import {intentionalService,newFollow,customerStatus} from '@/dataDic.js';
|
|
import {intentionalService,newFollow,customerStatus} from '@/dataDic.js';
|
|
import {getCompanyIntention,getContactType,getfllowSituation,getcustomerStatue} from '@/tools.js';
|
|
import {getCompanyIntention,getContactType,getfllowSituation,getcustomerStatue} from '@/tools.js';
|
|
const FormItem =Form.Item;
|
|
const FormItem =Form.Item;
|
|
@@ -13,8 +13,51 @@ const VisitDetail = React.createClass({
|
|
visitModul:false,
|
|
visitModul:false,
|
|
loading:false,
|
|
loading:false,
|
|
data:[],
|
|
data:[],
|
|
|
|
+ publicReleaseLog:[],
|
|
|
|
+ followDtails:{},
|
|
|
|
+ intentionPublicReleaseLog:[
|
|
|
|
+ {
|
|
|
|
+ title: '操作状态',
|
|
|
|
+ dataIndex: 'status',
|
|
|
|
+ key: 'status',
|
|
|
|
+ render: (text) => (
|
|
|
|
+ text === 0 ? <Tag color="#F00">驳回</Tag> :
|
|
|
|
+ text === 1 ? <Tag color="#58a3ff">发起</Tag> :
|
|
|
|
+ text === 2 ? <Tag color="#87d068">通过</Tag> : null
|
|
|
|
+ )
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作人',
|
|
|
|
+ dataIndex: 'aname',
|
|
|
|
+ key: 'aname',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作时间',
|
|
|
|
+ dataIndex: 'createTimes',
|
|
|
|
+ key: 'createTimes',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '备注',
|
|
|
|
+ width:120,
|
|
|
|
+ dataIndex: 'remarks',
|
|
|
|
+ key: 'remarks',
|
|
|
|
+ render: (text) => {
|
|
|
|
+ return (
|
|
|
|
+ <Tooltip placement="topLeft" title={text}>
|
|
|
|
+ <div style={{
|
|
|
|
+ maxWidth:'120px',
|
|
|
|
+ overflow:'hidden',
|
|
|
|
+ textOverflow: "ellipsis",
|
|
|
|
+ whiteSpace:'nowrap',
|
|
|
|
+ }}>{text}</div>
|
|
|
|
+ </Tooltip>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
//业务意向列表
|
|
//业务意向列表
|
|
- intentionList: [{
|
|
|
|
|
|
+ intentionList: [
|
|
|
|
+ {
|
|
title: '业务名称',
|
|
title: '业务名称',
|
|
dataIndex: 'businessGlossoryId',
|
|
dataIndex: 'businessGlossoryId',
|
|
width:120,
|
|
width:120,
|
|
@@ -58,9 +101,9 @@ const VisitDetail = React.createClass({
|
|
key: 'followSituation',
|
|
key: 'followSituation',
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
return <div>
|
|
return <div>
|
|
-
|
|
|
|
|
|
+
|
|
<span>{getfllowSituation(text)}</span>
|
|
<span>{getfllowSituation(text)}</span>
|
|
-
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
}, {
|
|
}, {
|
|
@@ -80,9 +123,9 @@ const VisitDetail = React.createClass({
|
|
key: 'remarks',
|
|
key: 'remarks',
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
return <div>
|
|
return <div>
|
|
-
|
|
|
|
|
|
+
|
|
<span title={text}>{text&&text.length>8?text.substr(0,8)+'…':text}</span>
|
|
<span title={text}>{text&&text.length>8?text.substr(0,8)+'…':text}</span>
|
|
-
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
// }, {
|
|
// }, {
|
|
@@ -125,7 +168,7 @@ const VisitDetail = React.createClass({
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //进入修改拜访记录
|
|
|
|
|
|
+ //进入修改拜访记录
|
|
visitModify(e) {
|
|
visitModify(e) {
|
|
this.setState({
|
|
this.setState({
|
|
visitModul: true,
|
|
visitModul: true,
|
|
@@ -244,7 +287,7 @@ const VisitDetail = React.createClass({
|
|
visitModul: false
|
|
visitModul: false
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
//详情保存
|
|
//详情保存
|
|
visitSubmit(e){
|
|
visitSubmit(e){
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
@@ -314,12 +357,68 @@ const VisitDetail = React.createClass({
|
|
data: this.state.data
|
|
data: this.state.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getFollowDtails(e) {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: true
|
|
|
|
+ });
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "get",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ url: globalConfig.context + '/api/admin/release/followDtails',
|
|
|
|
+ data: {
|
|
|
|
+ id: e,
|
|
|
|
+ },
|
|
|
|
+ success: function(data) {
|
|
|
|
+ if(data.error.length === 0){
|
|
|
|
+ this.setState({
|
|
|
|
+ followDtails:data.data || {}
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ message.warning(data.error[0].message)
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(function() {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false
|
|
|
|
+ });
|
|
|
|
+ }.bind(this));
|
|
|
|
+ },
|
|
|
|
+ getListPublicReleaseLog(e) {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: true
|
|
|
|
+ });
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "get",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ url: globalConfig.context + '/api/admin/release/listPublicReleaseLog',
|
|
|
|
+ data: {
|
|
|
|
+ ufid: e,
|
|
|
|
+ },
|
|
|
|
+ success: function(data) {
|
|
|
|
+ if(data.error.length === 0){
|
|
|
|
+ this.setState({
|
|
|
|
+ publicReleaseLog:data.data || []
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ message.warning(data.error[0].message)
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(function() {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false
|
|
|
|
+ });
|
|
|
|
+ }.bind(this));
|
|
|
|
+ },
|
|
componentWillReceiveProps(nextProps) {
|
|
componentWillReceiveProps(nextProps) {
|
|
if (nextProps.visitModul && nextProps.followData.followId) {
|
|
if (nextProps.visitModul && nextProps.followData.followId) {
|
|
this.setState({
|
|
this.setState({
|
|
visitModul: true,
|
|
visitModul: true,
|
|
loading: true,
|
|
loading: true,
|
|
})
|
|
})
|
|
|
|
+ if(nextProps.followData.contactType === "0"){
|
|
|
|
+ this.getListPublicReleaseLog(nextProps.followData.followId);
|
|
|
|
+ this.getFollowDtails(nextProps.followData.followId);
|
|
|
|
+ }
|
|
this.visitModify(nextProps.followData.followId)
|
|
this.visitModify(nextProps.followData.followId)
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -338,59 +437,105 @@ const VisitDetail = React.createClass({
|
|
width='1000px'
|
|
width='1000px'
|
|
visible={this.state.visitModul}
|
|
visible={this.state.visitModul}
|
|
onOk={this.visitOk}
|
|
onOk={this.visitOk}
|
|
- onCancel={this.visitCancel}
|
|
|
|
- >
|
|
|
|
|
|
+ onCancel={this.visitCancel}
|
|
|
|
+ >
|
|
<Form layout="horizontal" id="demand-form" onSubmit={this.visitSubmit}>
|
|
<Form layout="horizontal" id="demand-form" onSubmit={this.visitSubmit}>
|
|
<Spin spinning={this.state.loading}>
|
|
<Spin spinning={this.state.loading}>
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
- <FormItem
|
|
|
|
- labelCol={{ span:4 }}
|
|
|
|
- wrapperCol={{ span: 20 }}
|
|
|
|
- label="跟进方式" >
|
|
|
|
- <span>{this.state.contactType}</span>
|
|
|
|
- </FormItem>
|
|
|
|
- <div className="clearfix">
|
|
|
|
- {!followData.readOnly&&<FormItem className="half-item"
|
|
|
|
- {...formItemLayout}
|
|
|
|
- label="当前联系人"
|
|
|
|
- >
|
|
|
|
- <span>{this.state.contacts}</span>
|
|
|
|
- </FormItem>}
|
|
|
|
- <FormItem className="half-item"
|
|
|
|
- {...formItemLayout}
|
|
|
|
- label="跟进时间"
|
|
|
|
- >
|
|
|
|
- <span>{this.state.followTime}</span>
|
|
|
|
- </FormItem>
|
|
|
|
- {!followData.readOnly&&<FormItem className="half-item"
|
|
|
|
- {...formItemLayout}
|
|
|
|
- label="联系电话"
|
|
|
|
- >
|
|
|
|
- <span>{this.state.contactMobile}</span>
|
|
|
|
- </FormItem>}
|
|
|
|
- </div>
|
|
|
|
- <div className="clearfix">
|
|
|
|
- <FormItem
|
|
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- wrapperCol={{ span: 16 }}
|
|
|
|
- label="跟进备注" >
|
|
|
|
- {
|
|
|
|
- <span>{this.state.result}</span>
|
|
|
|
- }
|
|
|
|
- </FormItem>
|
|
|
|
- </div>
|
|
|
|
|
|
+ {
|
|
|
|
+ !(this.state.contactType === '外出' && Object.keys(this.state.followDtails).length > 0) ?
|
|
|
|
+ <div>
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span:4 }}
|
|
|
|
+ wrapperCol={{ span: 20 }}
|
|
|
|
+ label="跟进方式" >
|
|
|
|
+ <span>{this.state.contactType}</span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ {!followData.readOnly&&<FormItem className="half-item"
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ label="当前联系人"
|
|
|
|
+ >
|
|
|
|
+ <span>{this.state.contacts}</span>
|
|
|
|
+ </FormItem>}
|
|
|
|
+ <FormItem className="half-item"
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ label="跟进时间"
|
|
|
|
+ >
|
|
|
|
+ <span>{this.state.followTime}</span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ {!followData.readOnly&&<FormItem className="half-item"
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ label="联系电话"
|
|
|
|
+ >
|
|
|
|
+ <span>{this.state.contactMobile}</span>
|
|
|
|
+ </FormItem>}
|
|
|
|
+ </div>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
|
+ label="跟进备注" >
|
|
|
|
+ {
|
|
|
|
+ <span>{this.state.result}</span>
|
|
|
|
+ }
|
|
|
|
+ </FormItem>
|
|
|
|
+ </div>
|
|
|
|
+ </div> : null
|
|
|
|
+ }
|
|
|
|
+ {this.state.contactType === '外出' && Object.keys(this.state.followDtails).length > 0 ? <div>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
|
+ label="公出企业" >
|
|
|
|
+ <span>{this.state.followDtails.nickname}</span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
|
+ label="公出时间" >
|
|
|
|
+ <span>{this.state.followDtails.releaseStarts + '~' + this.state.followDtails.releaseEnds}</span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
|
+ label="公出地点" >
|
|
|
|
+ <span>{this.state.followDtails.userName}</span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
|
+ label="审核情况" >
|
|
|
|
+ <span>
|
|
|
|
+ {
|
|
|
|
+ this.state.followDtails.status === 0 ? <Tag color="#F00">驳回</Tag> :
|
|
|
|
+ this.state.followDtails.status === 1 ? <Tag color="#58a3ff">审核中</Tag> :
|
|
|
|
+ this.state.followDtails.status === 2 ? <Tag color="#87d068">通过</Tag> : null}
|
|
|
|
+ </span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ </div>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>打卡日志</div>
|
|
|
|
+ <Table
|
|
|
|
+ pagination={false}
|
|
|
|
+ columns={this.state.intentionPublicReleaseLog}
|
|
|
|
+ dataSource={this.state.publicReleaseLog}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div> : null}
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向</div>
|
|
<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向</div>
|
|
<div className="clearfix" >
|
|
<div className="clearfix" >
|
|
<Spin spinning={this.state.loading}>
|
|
<Spin spinning={this.state.loading}>
|
|
- <Table
|
|
|
|
|
|
+ <Table
|
|
rowKey={record => record.id}
|
|
rowKey={record => record.id}
|
|
pagination={false}
|
|
pagination={false}
|
|
- columns={this.state.intentionList}
|
|
|
|
|
|
+ columns={this.state.intentionList}
|
|
dataSource={this.state.data}
|
|
dataSource={this.state.data}
|
|
/>
|
|
/>
|
|
- </Spin>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </Spin>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{!followData.readOnly&&<FormItem wrapperCol={{ span: 12, offset: 6 }}>
|
|
{!followData.readOnly&&<FormItem wrapperCol={{ span: 12, offset: 6 }}>
|
|
@@ -400,7 +545,7 @@ const VisitDetail = React.createClass({
|
|
</Spin>
|
|
</Spin>
|
|
</Form>
|
|
</Form>
|
|
</Modal> : <div/>}
|
|
</Modal> : <div/>}
|
|
- <BusName
|
|
|
|
|
|
+ <BusName
|
|
businessId={this.state.businessId}
|
|
businessId={this.state.businessId}
|
|
busModul={this.state.busModul}
|
|
busModul={this.state.busModul}
|
|
closeBus={this.closeBus}
|
|
closeBus={this.closeBus}
|
|
@@ -410,4 +555,4 @@ const VisitDetail = React.createClass({
|
|
)
|
|
)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-export default VisitDetail;
|
|
|
|
|
|
+export default VisitDetail;
|