|
@@ -1,8 +1,8 @@
|
|
|
import React from 'react';
|
|
|
-import {Button, Spin, message, Table, Tooltip, Input, Modal, Alert} from 'antd';
|
|
|
+import { Button, Spin, message, Table, Tooltip, Input, Modal, Alert } from 'antd';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import FollowDetail from '../../followDetail.jsx'
|
|
|
-import {getContactType} from '@/tools.js';
|
|
|
+import { getContactType } from '@/tools.js';
|
|
|
import VisitDetail from './visitDetail.jsx';
|
|
|
|
|
|
import PublicSupplement from '../../../../../../publicSupplement';
|
|
@@ -10,271 +10,273 @@ import PublicSupplement from '../../../../../../publicSupplement';
|
|
|
const confirm = Modal.confirm;
|
|
|
|
|
|
const Visit = React.createClass({
|
|
|
- getInitialState(){
|
|
|
+ getInitialState() {
|
|
|
return {
|
|
|
- visitArrList: [],
|
|
|
- loading: false,
|
|
|
- visitModul: false,
|
|
|
- visitModuls: false,
|
|
|
- followId:0,
|
|
|
- ispage:1,
|
|
|
- paginations: {
|
|
|
- defaultCurrent: 1,
|
|
|
- defaultPageSize: 10,
|
|
|
- showQuickJumper: true,
|
|
|
- pageSize: 10,
|
|
|
- onChange: function (page) {
|
|
|
- this.loadVisit(page);
|
|
|
- }.bind(this),
|
|
|
- showTotal: function (total) {
|
|
|
- return "共" + total + "条数据";
|
|
|
- },
|
|
|
- },
|
|
|
- visitsList: [
|
|
|
- {
|
|
|
- title: "客户名称",
|
|
|
- dataIndex: "nickname",
|
|
|
- key: "nickname",
|
|
|
- width: 100,
|
|
|
- render: (text) => {
|
|
|
- return (
|
|
|
- <Tooltip title={text}>
|
|
|
- <div style={{
|
|
|
- maxWidth:'100px',
|
|
|
- overflow:'hidden',
|
|
|
- textOverflow: "ellipsis",
|
|
|
- whiteSpace:'nowrap',
|
|
|
- }}>{text}</div>
|
|
|
- </Tooltip>
|
|
|
- )
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "跟进方式",
|
|
|
- dataIndex: "contactType",
|
|
|
- key: "contactType",
|
|
|
- width: 80,
|
|
|
- render: (text) => {
|
|
|
- return getContactType(text);
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "联系人",
|
|
|
- dataIndex: "contacts",
|
|
|
- key: "contacts",
|
|
|
- width: 100,
|
|
|
- render: (text, record) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- {record.readOnly ? <span>***</span> : <span>{text}</span>}
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "联系电话",
|
|
|
- dataIndex: "contactMobile",
|
|
|
- key: "contactMobile",
|
|
|
- width: 120,
|
|
|
- render: (text, record) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- {record.readOnly ? <span>***</span> : <span>{text}</span>}
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "跟进人",
|
|
|
- dataIndex: "adminName",
|
|
|
- key: "adminName",
|
|
|
- width: 80
|
|
|
- },
|
|
|
- {
|
|
|
- title: "跟进时间",
|
|
|
- dataIndex: "followTime",
|
|
|
- key: "followTime",
|
|
|
- width: 65
|
|
|
- },
|
|
|
- {
|
|
|
- title: "公出目标",
|
|
|
- dataIndex: "result",
|
|
|
- key: "result",
|
|
|
- width: 200,
|
|
|
- // render: (text, record) => {
|
|
|
- // return (
|
|
|
- // <div style={{wordBreak:"break-all"}}>
|
|
|
- // <div>{text}</div>
|
|
|
- // {
|
|
|
- // getContactType(record.contactType) === '公出打卡' && <div style={{
|
|
|
- // paddingTop: '15px',
|
|
|
- // wordBreak: "break-all",
|
|
|
- // display: "flex",
|
|
|
- // alignItems: 'flex-end'
|
|
|
- // }}>
|
|
|
- // {/* 补充说明:
|
|
|
- // {record.supplement} */}
|
|
|
- // <div style={{paddingLeft: '10px'}}>
|
|
|
- // <PublicSupplement infor={record} onCancel={() => {
|
|
|
- // this.loadVisit(this.state.ispage);
|
|
|
- // }}/>
|
|
|
- // </div>
|
|
|
- // </div>
|
|
|
- // }
|
|
|
- // </div>
|
|
|
- // )
|
|
|
- // }
|
|
|
- },
|
|
|
- {
|
|
|
- title: "公出计划",
|
|
|
- dataIndex: "plan",
|
|
|
- key: "plan",
|
|
|
- width: 200,
|
|
|
- render: (text) => {
|
|
|
- return (
|
|
|
- <div
|
|
|
- // style={{
|
|
|
- // width: 50,
|
|
|
- // overflow: "hidden",
|
|
|
- // textOverflow: "ellipsis",
|
|
|
- // whiteSpace: "nowrap",
|
|
|
- // }}
|
|
|
- // title={text}
|
|
|
- >
|
|
|
- {text}
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "预计效果",
|
|
|
- dataIndex: "expectedEffect",
|
|
|
- key: "expectedEffect",
|
|
|
- width: 200,
|
|
|
- render: (text) => {
|
|
|
- return (
|
|
|
- <div
|
|
|
- // style={{
|
|
|
- // width: 50,
|
|
|
- // overflow: "hidden",
|
|
|
- // textOverflow: "ellipsis",
|
|
|
- // whiteSpace: "nowrap",
|
|
|
- // }}
|
|
|
- // title={text}
|
|
|
- >
|
|
|
- {text}
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "本次公出目标总结",
|
|
|
- dataIndex: "supplement",
|
|
|
- key: "supplement",
|
|
|
- width: 200,
|
|
|
- render: (text,record) => {
|
|
|
- return (
|
|
|
- <div style={{wordBreak:"break-all"}}>
|
|
|
- {
|
|
|
- getContactType(record.contactType) === '公出打卡' && <div style={{
|
|
|
- // paddingTop: '15px',
|
|
|
- wordBreak: "break-all",
|
|
|
- }}>
|
|
|
- {text}
|
|
|
- <div>
|
|
|
- <PublicSupplement closeModel={this.closeModel} infor={record} onCancel={() => {
|
|
|
- this.loadVisit(this.state.ispage);
|
|
|
- }}/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- }
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "下一次公出计划",
|
|
|
- dataIndex: "nextPlan",
|
|
|
- key: "nextPlan",
|
|
|
- width: 200,
|
|
|
- render: (text) => {
|
|
|
- return (
|
|
|
- <div
|
|
|
- // style={{
|
|
|
- // width: 70,
|
|
|
- // overflow: "hidden",
|
|
|
- // textOverflow: "ellipsis",
|
|
|
- // whiteSpace: "nowrap",
|
|
|
- // }}
|
|
|
- // title={text}
|
|
|
- >
|
|
|
- {text}
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "指导时间",
|
|
|
- dataIndex: "guidanceTime",
|
|
|
- key: "guidanceTime",
|
|
|
- width: 105,
|
|
|
- render: (text, record) => {
|
|
|
- return (
|
|
|
- <span>{text ? text : ''}</span>
|
|
|
- )
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: "指导意见",
|
|
|
- dataIndex: "abc",
|
|
|
- key: "abc",
|
|
|
- width: 200,
|
|
|
- render: (text, record) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- {record.guidance ?
|
|
|
- <Tooltip placement="topLeft" title={<div style={{wordBreak:"break-all"}}>{(record.guidanceName ? '('+record.guidanceName+')' : '') + record.guidance}</div>}>
|
|
|
- <div style={{
|
|
|
- cursor:"pointer",
|
|
|
- width: '150px',
|
|
|
- whiteSpace: 'nowrap',
|
|
|
- overflow: 'hidden',
|
|
|
- textOverflow: 'ellipsis',
|
|
|
- }}>
|
|
|
- {record.guidanceName ? '('+record.guidanceName+')' : null}
|
|
|
- {record.guidance}
|
|
|
- </div>
|
|
|
- </Tooltip> : (this.props.isEditGuidanceLv ? <Button
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- this.setState({
|
|
|
- guidanceVisible: true,
|
|
|
- visitModul: false,
|
|
|
- followId: record.followId
|
|
|
- })
|
|
|
- }}
|
|
|
- type="primary"
|
|
|
- >
|
|
|
- 立即指导
|
|
|
- </Button> : <span>暂未指导</span>)}
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- guidanceVisible: false,
|
|
|
- guidance: ''
|
|
|
- };
|
|
|
+ visitArrList: [],
|
|
|
+ loading: false,
|
|
|
+ visitModul: false,
|
|
|
+ visitModuls: false,
|
|
|
+ followId: 0,
|
|
|
+ ispage: 1,
|
|
|
+ paginations: {
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ showQuickJumper: true,
|
|
|
+ pageSize: 10,
|
|
|
+ onChange: function (page) {
|
|
|
+ this.loadVisit(page);
|
|
|
+ }.bind(this),
|
|
|
+ showTotal: function (total) {
|
|
|
+ return "共" + total + "条数据";
|
|
|
+ },
|
|
|
+ },
|
|
|
+ visitsList: [
|
|
|
+ {
|
|
|
+ title: "客户名称",
|
|
|
+ dataIndex: "nickname",
|
|
|
+ key: "nickname",
|
|
|
+ width: 150,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <Tooltip title={text}>
|
|
|
+ <div
|
|
|
+ // style={{
|
|
|
+ // maxWidth: '100px',
|
|
|
+ // overflow: 'hidden',
|
|
|
+ // textOverflow: "ellipsis",
|
|
|
+ // whiteSpace: 'nowrap',
|
|
|
+ // }}
|
|
|
+ >{text}</div>
|
|
|
+ </Tooltip>
|
|
|
+ )
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "跟进方式",
|
|
|
+ dataIndex: "contactType",
|
|
|
+ key: "contactType",
|
|
|
+ width: 80,
|
|
|
+ render: (text) => {
|
|
|
+ return getContactType(text);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "联系人",
|
|
|
+ dataIndex: "contacts",
|
|
|
+ key: "contacts",
|
|
|
+ width: 100,
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ {record.readOnly ? <span>***</span> : <span>{text}</span>}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "联系电话",
|
|
|
+ dataIndex: "contactMobile",
|
|
|
+ key: "contactMobile",
|
|
|
+ width: 120,
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ {record.readOnly ? <span>***</span> : <span>{text}</span>}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "跟进人",
|
|
|
+ dataIndex: "adminName",
|
|
|
+ key: "adminName",
|
|
|
+ width: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "跟进时间",
|
|
|
+ dataIndex: "followTime",
|
|
|
+ key: "followTime",
|
|
|
+ width: 65
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出目标",
|
|
|
+ dataIndex: "result",
|
|
|
+ key: "result",
|
|
|
+ width: 200,
|
|
|
+ // render: (text, record) => {
|
|
|
+ // return (
|
|
|
+ // <div style={{wordBreak:"break-all"}}>
|
|
|
+ // <div>{text}</div>
|
|
|
+ // {
|
|
|
+ // getContactType(record.contactType) === '公出打卡' && <div style={{
|
|
|
+ // paddingTop: '15px',
|
|
|
+ // wordBreak: "break-all",
|
|
|
+ // display: "flex",
|
|
|
+ // alignItems: 'flex-end'
|
|
|
+ // }}>
|
|
|
+ // {/* 补充说明:
|
|
|
+ // {record.supplement} */}
|
|
|
+ // <div style={{paddingLeft: '10px'}}>
|
|
|
+ // <PublicSupplement infor={record} onCancel={() => {
|
|
|
+ // this.loadVisit(this.state.ispage);
|
|
|
+ // }}/>
|
|
|
+ // </div>
|
|
|
+ // </div>
|
|
|
+ // }
|
|
|
+ // </div>
|
|
|
+ // )
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出计划",
|
|
|
+ dataIndex: "plan",
|
|
|
+ key: "plan",
|
|
|
+ width: 200,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div
|
|
|
+ // style={{
|
|
|
+ // width: 50,
|
|
|
+ // overflow: "hidden",
|
|
|
+ // textOverflow: "ellipsis",
|
|
|
+ // whiteSpace: "nowrap",
|
|
|
+ // }}
|
|
|
+ // title={text}
|
|
|
+ >
|
|
|
+ {text}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "预计效果",
|
|
|
+ dataIndex: "expectedEffect",
|
|
|
+ key: "expectedEffect",
|
|
|
+ width: 200,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div
|
|
|
+ // style={{
|
|
|
+ // width: 50,
|
|
|
+ // overflow: "hidden",
|
|
|
+ // textOverflow: "ellipsis",
|
|
|
+ // whiteSpace: "nowrap",
|
|
|
+ // }}
|
|
|
+ // title={text}
|
|
|
+ >
|
|
|
+ {text}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "本次公出目标总结",
|
|
|
+ dataIndex: "supplement",
|
|
|
+ key: "supplement",
|
|
|
+ width: 200,
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div style={{ wordBreak: "break-all" }}>
|
|
|
+ {
|
|
|
+ getContactType(record.contactType) === '公出打卡' && <div style={{
|
|
|
+ // paddingTop: '15px',
|
|
|
+ wordBreak: "break-all",
|
|
|
+ }}>
|
|
|
+ {text}
|
|
|
+ <div>
|
|
|
+ <PublicSupplement closeModel={this.closeModel} infor={record} onCancel={() => {
|
|
|
+ this.loadVisit(this.state.ispage);
|
|
|
+ }} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "下一次公出计划",
|
|
|
+ dataIndex: "nextPlan",
|
|
|
+ key: "nextPlan",
|
|
|
+ width: 200,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div
|
|
|
+ // style={{
|
|
|
+ // width: 70,
|
|
|
+ // overflow: "hidden",
|
|
|
+ // textOverflow: "ellipsis",
|
|
|
+ // whiteSpace: "nowrap",
|
|
|
+ // }}
|
|
|
+ // title={text}
|
|
|
+ >
|
|
|
+ {text}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "指导时间",
|
|
|
+ dataIndex: "guidanceTime",
|
|
|
+ key: "guidanceTime",
|
|
|
+ width: 105,
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <span>{text ? text : ''}</span>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "指导意见",
|
|
|
+ dataIndex: "abc",
|
|
|
+ key: "abc",
|
|
|
+ width: 200,
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ {record.guidance ?
|
|
|
+ <Tooltip placement="topLeft" title={<div style={{ wordBreak: "break-all" }}>{(record.guidanceName ? '(' + record.guidanceName + ')' : '') + record.guidance}</div>}>
|
|
|
+ <div style={{
|
|
|
+ cursor: "pointer",
|
|
|
+ width: '150px',
|
|
|
+ whiteSpace: 'nowrap',
|
|
|
+ overflow: 'hidden',
|
|
|
+ textOverflow: 'ellipsis',
|
|
|
+ }}>
|
|
|
+ {record.guidanceName ? '(' + record.guidanceName + ')' : null}
|
|
|
+ {record.guidance}
|
|
|
+ </div>
|
|
|
+ </Tooltip> : (this.props.isEditGuidanceLv ? <Button
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ this.setState({
|
|
|
+ guidanceVisible: true,
|
|
|
+ visitModul: false,
|
|
|
+ followId: record.followId
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ type="primary"
|
|
|
+ >
|
|
|
+ 立即指导
|
|
|
+ </Button> : <span>暂未指导</span>)}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ guidanceVisible: false,
|
|
|
+ guidance: ''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ closeModel() {
|
|
|
+ this.setState({
|
|
|
+ visitModul: false
|
|
|
+ })
|
|
|
},
|
|
|
- closeModel(){
|
|
|
- this.setState({
|
|
|
- visitModul:false
|
|
|
- })
|
|
|
- },
|
|
|
//拜访记录删除
|
|
|
visitDelet(e) {
|
|
|
this.setState({
|
|
|
- visitModul:false,
|
|
|
+ visitModul: false,
|
|
|
loading: true
|
|
|
});
|
|
|
$.ajax({
|
|
@@ -285,8 +287,8 @@ const Visit = React.createClass({
|
|
|
data: {
|
|
|
followId: e.followId, //删除的ID
|
|
|
}
|
|
|
- }).done(function(data) {
|
|
|
- if(!data.error.length) {
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
message.success('删除成功!');
|
|
|
this.setState({
|
|
|
loading: false,
|
|
@@ -312,14 +314,14 @@ const Visit = React.createClass({
|
|
|
pageSize: this.state.paginations.pageSize,
|
|
|
uid: this.props.data.id, //名称1
|
|
|
},
|
|
|
- success: function(data) {
|
|
|
+ success: function (data) {
|
|
|
let theArr = [];
|
|
|
- if(data.error.length || data.data.list == "") {
|
|
|
- if(data.error && data.error.length) {
|
|
|
+ if (data.error.length || data.data.list == "") {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
|
};
|
|
|
} else {
|
|
|
- for(let i = 0; i < data.data.list.length; i++) {
|
|
|
+ for (let i = 0; i < data.data.list.length; i++) {
|
|
|
let thisdata = data.data.list[i];
|
|
|
theArr.push(thisdata);
|
|
|
};
|
|
@@ -329,60 +331,60 @@ const Visit = React.createClass({
|
|
|
ispage: data.data.pageNo
|
|
|
})
|
|
|
};
|
|
|
- if(data.data.list&&!data.data.list.length){
|
|
|
- this.state.paginations.current =0;
|
|
|
- this.state.paginations.total =0;
|
|
|
+ if (data.data.list && !data.data.list.length) {
|
|
|
+ this.state.paginations.current = 0;
|
|
|
+ this.state.paginations.total = 0;
|
|
|
};
|
|
|
this.setState({
|
|
|
visitArrList: theArr,
|
|
|
paginations: this.state.paginations
|
|
|
});
|
|
|
}.bind(this),
|
|
|
- }).always(function() {
|
|
|
+ }).always(function () {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- componentWillMount(){
|
|
|
+ componentWillMount() {
|
|
|
this.loadVisit();
|
|
|
},
|
|
|
- detailsModal(){
|
|
|
+ detailsModal() {
|
|
|
this.props.closeDetail(false, false)
|
|
|
},
|
|
|
//点击整行
|
|
|
- VisitRowClick(record){
|
|
|
+ VisitRowClick(record) {
|
|
|
this.setState({
|
|
|
followData: record,
|
|
|
- visitModul:true,
|
|
|
+ visitModul: true,
|
|
|
})
|
|
|
},
|
|
|
//进入新增拜访记录
|
|
|
- visit() {
|
|
|
+ visit() {
|
|
|
let obj = {
|
|
|
id: this.props.data.id
|
|
|
}
|
|
|
this.setState({
|
|
|
- followData:obj,
|
|
|
- visitModuls:true,
|
|
|
+ followData: obj,
|
|
|
+ visitModuls: true,
|
|
|
})
|
|
|
},
|
|
|
- componentDidMount() {
|
|
|
- this.setState({
|
|
|
- visitModul:false,
|
|
|
+ componentDidMount() {
|
|
|
+ this.setState({
|
|
|
+ visitModul: false,
|
|
|
})
|
|
|
- },
|
|
|
- closeDesc(e,s){
|
|
|
- this.state.visitModul=e
|
|
|
- this.state.visitModuls=e
|
|
|
- if(s){
|
|
|
+ },
|
|
|
+ closeDesc(e, s) {
|
|
|
+ this.state.visitModul = e
|
|
|
+ this.state.visitModuls = e
|
|
|
+ if (s) {
|
|
|
this.loadVisit()
|
|
|
}
|
|
|
},
|
|
|
//发布指导意见
|
|
|
- releaseGuidance(e){
|
|
|
+ releaseGuidance(e) {
|
|
|
e.stopPropagation();
|
|
|
- if(!this.state.guidance){
|
|
|
+ if (!this.state.guidance) {
|
|
|
message.info('指导意见不能为空')
|
|
|
return;
|
|
|
}
|
|
@@ -398,8 +400,8 @@ const Visit = React.createClass({
|
|
|
guidance: this.state.guidance,
|
|
|
followId: this.state.followId,
|
|
|
},
|
|
|
- }).done(function(data) {
|
|
|
- if(!data.error.length) {
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
message.success("发布成功");
|
|
|
this.loadVisit(this.state.ispage);
|
|
|
this.setState({
|
|
@@ -412,47 +414,47 @@ const Visit = React.createClass({
|
|
|
}.bind(this));
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
- if(nextProps.data.id&&nextProps.visitState){
|
|
|
+ if (nextProps.data.id && nextProps.visitState) {
|
|
|
this.loadVisit()
|
|
|
}
|
|
|
this.setState({
|
|
|
- visitModul:false
|
|
|
+ visitModul: false
|
|
|
})
|
|
|
},
|
|
|
- render(){
|
|
|
- return(
|
|
|
+ render() {
|
|
|
+ return (
|
|
|
<div className="clearfix">
|
|
|
<Alert message="注:面谈公出补充,沟通完后记录今天交流的情况。计划下一次什么时候再面谈?该如何面谈?该如何跟进?" banner />
|
|
|
{!this.props.isGuidanceLv ? <Button
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- this.visit();
|
|
|
- }}
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ this.visit();
|
|
|
+ }}
|
|
|
type="primary"
|
|
|
- style={{marginTop:'10px',float: 'right'}}
|
|
|
- >
|
|
|
- 客户跟进
|
|
|
- </Button> : <div/>}
|
|
|
- <Spin spinning={this.state.loading}>
|
|
|
- <Table
|
|
|
- size="middle"
|
|
|
- style={{marginTop:this.props.isGuidanceLv ? '0px' : '60px',cursor: 'pointer',}}
|
|
|
- pagination={this.state.paginations}
|
|
|
- columns={this.state.visitsList}
|
|
|
- dataSource={this.state.visitArrList}
|
|
|
- onRowClick={this.VisitRowClick}
|
|
|
- scroll={{ x:'130%',y: 440 }}
|
|
|
- />
|
|
|
- </Spin>
|
|
|
- <VisitDetail
|
|
|
- categoryArr={this.props.categoryArr}
|
|
|
- followData={this.state.followData}
|
|
|
- visitModul={this.state.visitModul}
|
|
|
- closeDesc={this.closeDesc}
|
|
|
- mid={this.props.data.id}
|
|
|
- />
|
|
|
+ style={{ marginTop: '10px', float: 'right' }}
|
|
|
+ >
|
|
|
+ 客户跟进
|
|
|
+ </Button> : <div />}
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table
|
|
|
+ size="middle"
|
|
|
+ style={{ marginTop: this.props.isGuidanceLv ? '0px' : '60px', cursor: 'pointer', }}
|
|
|
+ pagination={this.state.paginations}
|
|
|
+ columns={this.state.visitsList}
|
|
|
+ dataSource={this.state.visitArrList}
|
|
|
+ onRowClick={this.VisitRowClick}
|
|
|
+ scroll={{ x: '130%', y: 440 }}
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ <VisitDetail
|
|
|
+ categoryArr={this.props.categoryArr}
|
|
|
+ followData={this.state.followData}
|
|
|
+ visitModul={this.state.visitModul}
|
|
|
+ closeDesc={this.closeDesc}
|
|
|
+ mid={this.props.data.id}
|
|
|
+ />
|
|
|
<FollowDetail
|
|
|
- categoryArr={this.props.categoryArr}
|
|
|
+ categoryArr={this.props.categoryArr}
|
|
|
followData={this.state.followData}
|
|
|
visitModul={this.state.visitModuls}
|
|
|
closeDesc={this.closeDesc}
|
|
@@ -464,19 +466,19 @@ const Visit = React.createClass({
|
|
|
title="指导意见"
|
|
|
width='500px'
|
|
|
visible={this.state.guidanceVisible}
|
|
|
- onOk={()=>{
|
|
|
+ onOk={() => {
|
|
|
this.setState({
|
|
|
guidanceVisible: false,
|
|
|
guidance: '',
|
|
|
- },()=>{
|
|
|
+ }, () => {
|
|
|
this.loadVisit();
|
|
|
})
|
|
|
}}
|
|
|
- onCancel={()=>{
|
|
|
+ onCancel={() => {
|
|
|
this.setState({
|
|
|
guidanceVisible: false,
|
|
|
guidance: '',
|
|
|
- },()=>{
|
|
|
+ }, () => {
|
|
|
this.loadVisit();
|
|
|
})
|
|
|
}}
|
|
@@ -484,14 +486,14 @@ const Visit = React.createClass({
|
|
|
>
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<div style={{
|
|
|
- display:'flex',
|
|
|
- flexFlow:'column',
|
|
|
+ display: 'flex',
|
|
|
+ flexFlow: 'column',
|
|
|
}}>
|
|
|
<Input
|
|
|
- style={{ width: '400px',height:'50px' }}
|
|
|
+ style={{ width: '400px', height: '50px' }}
|
|
|
placeholder="请输入指导意见"
|
|
|
type={'textarea'}
|
|
|
- onChange={(e)=>{
|
|
|
+ onChange={(e) => {
|
|
|
this.setState({
|
|
|
guidance: e.target.value,
|
|
|
})
|
|
@@ -500,7 +502,7 @@ const Visit = React.createClass({
|
|
|
<Button
|
|
|
type="primary"
|
|
|
style={{ marginTop: "10px", marginBottom: '10px' }}
|
|
|
- onClick={(e)=>{
|
|
|
+ onClick={(e) => {
|
|
|
let _this = this;
|
|
|
confirm({
|
|
|
title: '确定要提交本次指导意见吗?',
|
|
@@ -508,7 +510,7 @@ const Visit = React.createClass({
|
|
|
onOk() {
|
|
|
_this.releaseGuidance(e);
|
|
|
},
|
|
|
- onCancel() {},
|
|
|
+ onCancel() { },
|
|
|
});
|
|
|
}}
|
|
|
>
|
|
@@ -516,7 +518,7 @@ const Visit = React.createClass({
|
|
|
</Button>
|
|
|
</div>
|
|
|
</Spin>
|
|
|
- </Modal> : <div/>}
|
|
|
+ </Modal> : <div />}
|
|
|
</div>
|
|
|
)
|
|
|
}
|