| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057 | 
							- import React from 'react';
 
- import {Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Table, message, DatePicker,Tooltip, Form,Tabs,Modal, Tag } from 'antd';
 
- import $ from 'jquery/src/ajax';
 
- import moment from 'moment';
 
- import { citySelect, provinceList } from '@/NewDicProvinceList';
 
- import AddIntention from './addIntention.jsx';
 
- import {industry, lvl, currentMember } from '@/dataDic.js';
 
- import ZhuanjiaoDetail from "@/zhuanjiaoDetail.jsx";
 
- import {
 
-   getSocialAttribute,
 
-   ShowModal
 
- } from "@/tools.js";
 
- import FollowDetail from './followDetail.jsx'
 
- import IntentionDetail from './intentionDetail/intentionDetail.jsx'
 
- import ShowModalDiv from "@/showModal.jsx";
 
- import './customer.less';
 
- import {ChooseList} from "../../../order/orderNew/chooseList";
 
- import EnterpriseNameChange from "../../../../common/enterpriseNameChange";
 
- const {TabPane} = Tabs
 
- const IntentionCustomer = Form.create()(
 
-   React.createClass({
 
-     loadData(pageNo, apiUrl) {
 
-       this.setState({
 
-         visitModul: false,
 
-         loading: true,
 
-         modalVisible: false,
 
-       });
 
-       let api = apiUrl ? apiUrl : this.props.ApiUrl;
 
-       $.ajax({
 
-         method: "post",
 
-         dataType: "json",
 
-         crossDomain: false,
 
-         url: globalConfig.context + api,
 
-         data: {
 
-           pageNo: pageNo || 1,
 
-           pageSize: this.state.pagination.pageSize,
 
-           level: this.state.level ? this.state.level : undefined,
 
-           name: this.state.nameSearch,
 
-           province: !this.state.addressSearch.length
 
-             ? this.state.provinceSearch
 
-             : this.state.addressSearch[0],
 
-           city: !this.state.addressSearch.length
 
-             ? ""
 
-             : this.state.addressSearch[1],
 
-           startDate: this.state.releaseDate[0],
 
-           endDate: this.state.releaseDate[1],
 
-         },
 
-         success: function (data) {
 
-           ShowModal(this);
 
-           let theArr = [];
 
-           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++) {
 
-               let thisdata = data.data.list[i];
 
-               let diqu =
 
-                 (thisdata.province == null ? "" : thisdata.province) +
 
-                 (thisdata.city == null ? "" : "-" + thisdata.city) +
 
-                 (thisdata.area == null ? "" : "-" + thisdata.area);
 
-               thisdata.key = i;
 
-               thisdata.id = thisdata.uid;
 
-               thisdata.lastFollowTime = thisdata.lastFollowTime &&
 
-                   thisdata.lastFollowTime.split(" ")[0];
 
-               thisdata.transferTime= thisdata.transferTime && thisdata.transferTime.split(" ")[0];
 
-               thisdata.surplusFollowTime = thisdata.surplusFollowTime && thisdata.surplusFollowTime.split(" ")[0];
 
-               thisdata.surplusSignTime = thisdata.surplusSignTime && thisdata.surplusSignTime.split(" ")[0];
 
-               thisdata.locationProvince = diqu;
 
-               theArr.push(thisdata);
 
-             }
 
-             this.state.pagination.current = data.data.pageNo;
 
-             this.state.pagination.total = data.data.totalCount;
 
-             this.setState({
 
-               ispage: data.data.pageNo,
 
-             })
 
-           }
 
-           if (data.data && data.data.list && !data.data.list.length) {
 
-             this.state.pagination.current = 0;
 
-             this.state.pagination.total = 0;
 
-           }
 
-           if(JSON.stringify(theArr) !== JSON.stringify(this.state.dataSource)){
 
-             this.setState({
 
-               selectedRowKeys: [],
 
-             })
 
-           }
 
-           this.setState({
 
-             dataSource: theArr,
 
-             pagination: this.state.pagination,
 
-           });
 
-         }.bind(this),
 
-       }).always(
 
-         function () {
 
-           this.setState({
 
-             loading: false,
 
-           });
 
-         }.bind(this)
 
-       );
 
-     },
 
-     //品类数据获取
 
-     category() {
 
-       $.ajax({
 
-         method: "get",
 
-         dataType: "json",
 
-         crossDomain: false,
 
-         url: globalConfig.context + "/api/admin/Varieties/getSuperList",
 
-         data: {},
 
-         success: function (data) {
 
-           let thedata = data.data;
 
-           let theArr = [];
 
-           if (!thedata) {
 
-             if (data.error && data.error.length) {
 
-               message.warning(data.error[0].message);
 
-             }
 
-             thedata = {};
 
-           } else {
 
-             thedata.map(function (item, index) {
 
-               theArr.push({
 
-                 value: item.id,
 
-                 key: item.cname,
 
-               });
 
-             });
 
-           }
 
-           this.setState({
 
-             categoryArr: theArr,
 
-           });
 
-         }.bind(this),
 
-       });
 
-     },
 
-     getInitialState() {
 
-       return {
 
-         addressSearch: [],
 
-         orgCodeUrl: [],
 
-         companyLogoUrl: [],
 
-         visible: false,
 
-         zhuanjiaoVisible: false,
 
-         searchMore: true,
 
-         releaseDate: [],
 
-         categoryArr: [],
 
-         visitModul: false,
 
-         keys: false,
 
-         detailApi: "",
 
-         followData: {},
 
-         selectedRowKeys: [],
 
-         selectedRowKey: [],
 
-         selectedRows: [],
 
-         loading: false,
 
-         modalVisible: false,
 
-         pagination: {
 
-           defaultCurrent: 1,
 
-           defaultPageSize: 10,
 
-           showQuickJumper: true,
 
-           pageSize: 10,
 
-           onChange: function (page) {
 
-             this.loadData(page);
 
-           }.bind(this),
 
-           showTotal: function (total) {
 
-             return "共" + total + "条数据";
 
-           },
 
-         },
 
-         columns: [
 
-           {
 
-             title: "客户名称",
 
-             dataIndex: "name",
 
-             key: "name",
 
-             width: 150,
 
-             render: (text) => {
 
-               return (
 
-                   <Tooltip title={text}>
 
-                     <div style={{
 
-                       maxWidth:'150px',
 
-                       overflow:'hidden',
 
-                       textOverflow: "ellipsis",
 
-                       whiteSpace:'nowrap',
 
-                     }}>{text}</div>
 
-                   </Tooltip>
 
-               )
 
-             },
 
-           },
 
-           {
 
-             title: "地区",
 
-             dataIndex: "locationProvince",
 
-             key: "locationProvince",
 
-           },
 
-           // {
 
-           //   title: "联系人",
 
-           //   dataIndex: "contacts",
 
-           //   key: "contacts",
 
-           // },
 
-           // {
 
-           //   title: "联系电话",
 
-           //   dataIndex: "contactMobile",
 
-           //   key: "contactMobile",
 
-           // },
 
-           {
 
-             title: "社会性质",
 
-             dataIndex: "societyTag",
 
-             key: "societyTag",
 
-             render: (text) => {
 
-               return getSocialAttribute(text);
 
-             },
 
-           },
 
-           {
 
-             title: "客户初始时间",
 
-             dataIndex: "transferTime",
 
-             key: "transferTime",
 
-           },
 
-           {
 
-             title: "剩余私有天数",
 
-             dataIndex: "surplusFollowTime",
 
-             key: "surplusFollowTime",
 
-           },
 
-           {
 
-             title: "剩余签单天数",
 
-             dataIndex: "surplusSignTime",
 
-             key: "surplusSignTime",
 
-           },
 
-           {
 
-             title: "最新跟进时间",
 
-             dataIndex: "lastFollowTime",
 
-             key: "lastFollowTime",
 
-           },
 
-           {
 
-             title: "客户等级",
 
-             dataIndex: "level",
 
-             key: "level",
 
-             render: (text) => {
 
-               if(text == 0) {
 
-                 return <Tag color="#87d068">一般客户</Tag>;
 
-               }else if(text == 1) {
 
-                 return <Tag color="#D2691E">意向客户</Tag>;
 
-               }else if(text == 2) {
 
-                 return <Tag color="#FF0000">重点客户</Tag>;
 
-               }else {
 
-                 return "";
 
-               }
 
-             },
 
-           },
 
-           {
 
-             title: "跟进操作",
 
-             dataIndex: "abc",
 
-             key: "abc",
 
-             render: (text, record, index) => {
 
-               return (
 
-                 <div style={{
 
-                   display: 'flex',
 
-                   flexFlow:'row',
 
-                   alignItems:'center',
 
-                 }}>
 
-                   <Button
 
-                     onClick={(e) => {
 
-                       e.stopPropagation(), this.visit(record);
 
-                     }}
 
-                     type="primary"
 
-                   >
 
-                     客户跟进
 
-                   </Button>
 
-                 </div>
 
-               );
 
-             },
 
-           },
 
-           {
 
-             title: "指导意见",
 
-             dataIndex: "guidance",
 
-             key: "guidance",
 
-             render: (text, record, index) => {
 
-               return (
 
-                   <div style={{
 
-                     display: 'flex',
 
-                     flexFlow:'row',
 
-                     alignItems:'center',
 
-                   }}>
 
-                     {/*指导 0无 1未读 2已读*/}
 
-                     {text === 1 || text === 2 ? <Button
 
-                         style={text === 1 ? {
 
-                           background:'#F00000',
 
-                           borderColor:'#F00000'
 
-                         } : {}}
 
-                         onClick={(e)=>{
 
-                           e.stopPropagation();
 
-                           this.guidanceRead(record.uid).then(()=>{
 
-                             this.setState({
 
-                               tabsKey:"4",
 
-                             },()=>{
 
-                               this.tableRowClick(record)
 
-                             })
 
-                           })
 
-                         }}
 
-                         type="primary"
 
-                     >
 
-                       {text === 1 ? '未读' : '查看'}
 
-                     </Button> : <div>暂无指导</div>}
 
-                   </div>
 
-               );
 
-             },
 
-           }
 
-         ],
 
-         tabsKey:'',
 
-         data: [],
 
-         dataman: [],
 
-         dataSource: [],
 
-         visitArrList: [],
 
-         searchTime: [,],
 
-       };
 
-     },
 
-     //已读指导记录
 
-     guidanceRead(id) {
 
-       return new Promise((resolve,reject)=>{
 
-         $.ajax({
 
-           method: "post",
 
-           dataType: "json",
 
-           crossDomain: false,
 
-           url: globalConfig.context + "/api/admin/customer/pushGuidance",
 
-           data: {
 
-             uid: id,
 
-           }
 
-         }).done(function(data) {
 
-           if(!data.error.length) {
 
-             resolve();
 
-           } else {
 
-             message.warning(data.error[0].message);
 
-             reject();
 
-           };
 
-         }.bind(this));
 
-       })
 
-     },
 
-     rankO(rank) {
 
-       let deletedIds ='';
 
-       for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
 
-         let rowItem = this.state.selectedRows[idx];
 
-         if (rowItem.id) {
 
-           deletedIds = this.state.selectedRows.length-1 === idx ? deletedIds +rowItem.id : deletedIds + rowItem.id + ',';
 
-         }
 
-       }
 
-       $.ajax({
 
-         method: "get",
 
-         dataType: "json",
 
-         crossDomain: false,
 
-         url: globalConfig.context + "/api/admin/customer/updateUserLevel",
 
-         data: {
 
-           id: deletedIds, //客户的ID
 
-           level: rank,
 
-         },
 
-       }).done(
 
-         function (data) {
 
-           if (!data.error.length && data.data !== 0) {
 
-             message.success("操作成功!");
 
-             this.setState({
 
-               loading: false,
 
-             });
 
-             this.loadData(this.state.ispage);
 
-           } else {
 
-             message.warning(data.data === 0 ? '操作失败,请联系管理员!' : data.error[0].message);
 
-           }
 
-         }.bind(this)
 
-       );
 
-     },
 
-     //进入新增拜访记录
 
-     visit(e) {
 
-       this.setState({
 
-         followData: e,
 
-         visitModul: true,
 
-         modalVisible: false,
 
-       });
 
-     },
 
-     //列表删除功能
 
-     delectRow() {
 
-       let deletedIds='';
 
-       for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
 
-         let rowItem = this.state.selectedRows[idx];
 
-         if (rowItem.id) {
 
-           deletedIds = this.state.selectedRows.length-1 === idx ? deletedIds +rowItem.id : deletedIds + rowItem.id + ',';
 
-         }
 
-       }
 
-       this.setState({
 
-         loading: true,
 
-         selectedRowKeys: [],
 
-       });
 
-       $.ajax({
 
-         method: "get",
 
-         dataType: "json",
 
-         crossDomain: false,
 
-         url: globalConfig.context + "/api/admin/customer/deleteCustomer",
 
-         data: {
 
-           uid: deletedIds, //删除的ID
 
-         },
 
-       }).done(
 
-         function (data) {
 
-           if (!data.error.length) {
 
-             message.success("删除成功!");
 
-             this.setState({
 
-               loading: false,
 
-             });
 
-           } else {
 
-             message.warning(data.error[0].message);
 
-           }
 
-           this.loadData(this.state.ispage);
 
-         }.bind(this)
 
-       );
 
-     },
 
-     componentWillMount() {
 
-       //城市
 
-       let Province = [];
 
-       provinceList.map(function (item) {
 
-         var id = String(item.id);
 
-         Province.push(
 
-           <Select.Option value={id} key={item.name}>
 
-             {item.name}
 
-           </Select.Option>
 
-         );
 
-       });
 
-       //行业
 
-       let intentionalArr = [];
 
-       industry.map(function (item) {
 
-         intentionalArr.push(
 
-           <Select.Option value={item.value} key={item.key}>
 
-             {item.key}
 
-           </Select.Option>
 
-         );
 
-       });
 
-       //会员等级
 
-       let lvlArr = [];
 
-       lvl.map(function (item) {
 
-         lvlArr.push(
 
-           <Select.Option value={item.value} key={item.key}>
 
-             {item.key}
 
-           </Select.Option>
 
-         );
 
-       });
 
-       //会员状态customerStatus
 
-       let currentMemberArr = [];
 
-       currentMember.map(function (item) {
 
-         currentMemberArr.push(
 
-           <Select.Option value={item.value} key={item.key}>
 
-             {item.key}
 
-           </Select.Option>
 
-         );
 
-       });
 
-       this.state.Provinces = Province;
 
-       this.state.intentionalOption = intentionalArr;
 
-       this.state.lvlArrOption = lvlArr;
 
-       this.state.currentMemberArrOption = currentMemberArr;
 
-       this.loadData();
 
-       this.category();
 
-     },
 
-     addClick() {
 
-       this.state.RowData = {};
 
-       this.setState({
 
-         detailApi: this.props.detailApi,
 
-         showDesc: true,
 
-         modalVisible: false,
 
-         visitModul: false,
 
-       });
 
-     },
 
-     closeDesc(e, s) {
 
-       this.state.basicState = e;
 
-       this.state.visitModul = e;
 
-       this.state.modalVisible = e;
 
-       this.state.showDesc = e;
 
-       this.setState({
 
-         tabsKey: '',
 
-       })
 
-       if (s) {
 
-         this.loadData(this.state.ispage);
 
-       }
 
-     },
 
-     search() {
 
-       this.loadData();
 
-     },
 
-     reset() {
 
-       this.state.nameSearch = "";
 
-       this.state.level = undefined;
 
-       this.state.addressSearch = [];
 
-       this.state.provinceSearch = undefined;
 
-       this.state.citySearch = undefined;
 
-       this.state.releaseDate[0] = undefined;
 
-       this.state.releaseDate[1] = undefined;
 
-       this.loadData();
 
-     },
 
-     searchSwitch() {
 
-       this.setState({
 
-         visitModul: false,
 
-         searchMore: !this.state.searchMore,
 
-       });
 
-     },
 
-     //整行点击
 
-     tableRowClick(record, index) {
 
-       this.state.visitModul = false;
 
-       this.state.RowData = record;
 
-       this.setState({
 
-         // selectedRowKeys: [],
 
-         modalVisible: true,
 
-         basicState: true,
 
-         contactState: true,
 
-         modalName: record.name
 
-       });
 
-     },
 
-     //指定转交人自动补全
 
-     supervisor(e) {
 
-       $.ajax({
 
-         method: "get",
 
-         dataType: "json",
 
-         crossDomain: false,
 
-         url: globalConfig.context + "/api/admin/customer/listAdminByName",
 
-         data: {
 
-           adminName: e,
 
-         },
 
-         success: function (data) {
 
-           let thedata = data.data;
 
-           if (!thedata) {
 
-             if (data.error && data.error.length) {
 
-               message.warning(data.error[0].message);
 
-             }
 
-             thedata = {};
 
-           }
 
-           this.setState({
 
-             customerArr: thedata,
 
-           });
 
-         }.bind(this),
 
-       }).always(
 
-         function () {
 
-           this.setState({
 
-             loading: false,
 
-           });
 
-         }.bind(this)
 
-       );
 
-     },
 
-     //上级主管输入框失去焦点是判断客户是否存在
 
-     selectAuto(value, options) {
 
-       this.setState({
 
-         auto: value,
 
-       });
 
-     },
 
-     blurChange(e) {
 
-       let theType = "";
 
-       let contactLists = this.state.customerArr || [];
 
-       if (e) {
 
-         contactLists.map(function (item) {
 
-           if (item.name == e.toString()) {
 
-             theType = item.id;
 
-           }
 
-         });
 
-       }
 
-       this.setState({
 
-         theTypes: theType,
 
-       });
 
-     },
 
-     //值改变时请求客户名称
 
-     httpChange(e) {
 
-       if (e.length >= 1) {
 
-         this.supervisor(e);
 
-       }
 
-       this.setState({
 
-         auto: e,
 
-       });
 
-     },
 
-     //转交
 
-     changeAssigner() {
 
-       if (this.state.theTypes) {
 
-         let changeIds  = '';
 
-         let oldAid = '';
 
-         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
 
-           let rowItem = this.state.selectedRows[idx];
 
-           if (rowItem.id) {
 
-             oldAid = rowItem.aid;
 
-             changeIds = this.state.selectedRows.length-1 === idx ? changeIds +rowItem.id : changeIds + rowItem.id + ',' ;
 
-           }
 
-         }
 
-         $.ajax({
 
-           method: "get",
 
-           dataType: "json",
 
-           crossDomain: false,
 
-           url: globalConfig.context + "/api/admin/customer/transferToOther",
 
-           data: {
 
-             uid: changeIds, //这一行数据的ID
 
-             aid: this.state.theTypes, //指定转交人的ID
 
-             oldAid: oldAid,
 
-           },
 
-         }).done(
 
-           function (data) {
 
-             if (!data.error.length) {
 
-               message.success("转交成功!");
 
-               this.setState({
 
-                 auto: "",
 
-                 loading: false,
 
-                 selectedRowKeys: [],
 
-               });
 
-             } else {
 
-               message.warning(data.error[0].message);
 
-             }
 
-             this.loadData(
 
-               Math.min(
 
-                 this.state.ispage == undefined ? 1 : this.state.ispage,
 
-                 Math.ceil((this.state.pagination.total - 1) / 10)
 
-               )
 
-             );
 
-           }.bind(this)
 
-         );
 
-       } else {
 
-         message.warning("请输入转交人姓名");
 
-       }
 
-     },
 
-     //导出
 
-     exportExec() {
 
-       let departmentName = "",
 
-         depart = this.state.departmentArr || [];
 
-       depart.map((item) => {
 
-         if (this.state.departmentId == item.id) {
 
-           departmentName = item.name;
 
-           return;
 
-         }
 
-       });
 
-       let data = {
 
-         name: this.state.nameSearch,
 
-         province: this.state.provinceSearch,
 
-         city: this.state.addressSearch,
 
-         level: this.state.level,
 
-         startDate: this.state.releaseDate[0],
 
-         endDate: this.state.releaseDate[1],
 
-       };
 
-       window.location.href =
 
-         globalConfig.context +
 
-         "/api/admin/customer/privateUnitCustomerOutXls?" +
 
-         $.param(data);
 
-     },
 
-     componentWillReceiveProps(nextProps) {
 
-       if (nextProps.ApiUrl != this.props.ApiUrl) {
 
-         if (!this.state.searchMore) {
 
-           this.state.searchMore = true;
 
-         }
 
-         this.state.nameSearch = "";
 
-         this.state.addressSearch = [];
 
-         this.state.provinceSearch = undefined;
 
-         this.state.citySearch = undefined;
 
-         this.state.releaseDate[0] = undefined;
 
-         this.state.releaseDate[1] = undefined;
 
-         this.loadData(null, nextProps.ApiUrl);
 
-       }
 
-     },
 
-     zhuanjiaoDetail(record) {
 
-       this.setState({
 
-         zhuanjiaoVisible: true,
 
-         zhuanjiaoId: record.id,
 
-       });
 
-     },
 
-     zhuanjiaoDetailCancel() {
 
-       this.setState({
 
-         zhuanjiaoVisible: false,
 
-       });
 
-     },
 
-     showConfirm(fn, record) {
 
-       Modal.confirm({
 
-         title: "提示",
 
-         content: (
 
-           <span style={{ color: "red" }}>
 
-             确定要转交以下客户吗?
 
-             {
 
-               this.state.selectedRows.map((value,index)=>(
 
-                   <div key={index} style={{marginTop:'5px',color: "#000"}}>
 
-                     {value.name}
 
-                   </div>
 
-               ))
 
-             }
 
-           </span>
 
-         ),
 
-         onOk() {
 
-           fn(record);
 
-         },
 
-         onCancel() {},
 
-       });
 
-     },
 
-     changeList(arr) {
 
-       const newArr = [];
 
-       this.state.columns.forEach(item => {
 
-         arr.forEach(val => {
 
-           if (val === item.title) {
 
-             newArr.push(item);
 
-           }
 
-         });
 
-       });
 
-       this.setState({
 
-         changeList: newArr
 
-       });
 
-     },
 
-     showConfirms(fn, record) {
 
-       Modal.confirm({
 
-         title: "您确定将以下客户移至公共客户吗?",
 
-         content: (
 
-           <span style={{ color: "red" }}>
 
-             移除后,以下客户将被别人领取!
 
-             {
 
-               this.state.selectedRows.map((value,index)=>(
 
-                   <div key={index} style={{marginTop:'5px',color: "#000"}}>
 
-                     {value.name}
 
-                   </div>
 
-               ))
 
-             }
 
-           </span>
 
-         ),
 
-         onOk() {
 
-           fn(record);
 
-         },
 
-         onCancel() {},
 
-       });
 
-     },
 
-     release() {
 
-       this.setState({
 
-         loading: true
 
-       })
 
-       let deletedIds='';
 
-       for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
 
-         let rowItem = this.state.selectedRows[idx];
 
-         if (rowItem.id) {
 
-           deletedIds = this.state.selectedRows.length-1 === idx ? deletedIds +rowItem.id : deletedIds + rowItem.id + ',';
 
-         }
 
-       }
 
-       $.ajax({
 
-         method: "get",
 
-         dataType: "json",
 
-         crossDomain: false,
 
-         url: globalConfig.context + "/api/admin/customer/pushReleaseUser",
 
-         data: {
 
-           id: deletedIds,
 
-         },
 
-         success: function (data) {
 
-           let thedata = data.data;
 
-           if (!thedata) {
 
-             if (data.error && data.error.length) {
 
-               message.warning(data.error[0].message);
 
-             }
 
-             thedata = {};
 
-           }else {
 
-             message.success("移除成功");
 
-             this.loadData(this.state.dataSource.length === 1 ? (this.state.ispage === 1?1:this.state.ispage - 1) : this.state.ispage)
 
-           }
 
-         }.bind(this),
 
-       }).always(
 
-         function () {
 
-           this.setState({
 
-             loading: false,
 
-           });
 
-         }.bind(this)
 
-       );
 
-     },
 
-     render() {
 
-       const FormItem = Form.Item;
 
-       const rowSelection = {
 
-         hideDefaultSelections: true,
 
-         selectedRowKeys: this.state.selectedRowKeys,
 
-         onChange: (selectedRowKeys, selectedRows) => {
 
-           this.setState({
 
-             modalVisible: false,
 
-             selectedRows: selectedRows,
 
-             selectedRowKeys: selectedRowKeys,
 
-           });
 
-         },
 
-         onSelect: (recordt, selected, selectedRows) => {
 
-           this.setState({
 
-             modalVisible: false,
 
-             recordt: recordt.id,
 
-           });
 
-         },
 
-       };
 
-       const hasSelected = this.state.selectedRowKeys.length > 0;
 
-       const { RangePicker } = DatePicker;
 
-       const dataSources = this.state.customerArr || [];
 
-       const options = dataSources.map((group) => (
 
-         <Select.Option key={group.id} value={group.name}>
 
-           {group.name}
 
-         </Select.Option>
 
-       ));
 
-       const intentionState = this.props.intentionState || "";
 
-       return (
 
-         <div className="user-content">
 
-           <ShowModalDiv ShowModal={this.state.showModal} />
 
-           <div className="content-title">
 
-             <span>{!intentionState ? "私有单位客户" : "私有专家客户"}</span>
 
-           </div>
 
-           <div className="user-search">
 
-             <Tabs
 
-               defaultActiveKey="1"
 
-               onChange={this.callback}
 
-               className="test"
 
-             >
 
-               <TabPane tab="搜索" key="1">
 
-                 <Input
 
-                   placeholder="客户名称"
 
-                   value={this.state.nameSearch}
 
-                   style={{ width: 150, marginRight: 10, marginLeft: 10 }}
 
-                   onChange={(e) => {
 
-                     this.setState({ nameSearch: e.target.value });
 
-                   }}
 
-                 />
 
-                 <Select
 
-                   placeholder="省"
 
-                   style={{ width: 80 }}
 
-                   value={this.state.provinceSearch}
 
-                   onChange={(e) => {
 
-                     this.setState({ provinceSearch: e });
 
-                   }}
 
-                 >
 
-                   {this.state.Provinces}
 
-                 </Select>
 
-                 <span style={{ marginRight: "10px" }}>
 
-                   <Cascader
 
-                     options={citySelect()}
 
-                     value={this.state.addressSearch}
 
-                     placeholder="选择城市"
 
-                     onChange={(e, pre) => {
 
-                       this.setState({ addressSearch: e });
 
-                     }}
 
-                   />
 
-                 </span>
 
-                 <Select
 
-                   style={{ width: 120 }}
 
-                   value={this.state.level}
 
-                   onChange={(e) => {
 
-                     this.setState({ level: e });
 
-                   }}
 
-                   placeholder="请选择客户等级"
 
-                 >
 
-                   <Select.Option value="0">一般客户</Select.Option>
 
-                   <Select.Option value="1">意向客户</Select.Option>
 
-                   <Select.Option value="2">重点客户</Select.Option>
 
-                 </Select>
 
-                 <RangePicker
 
-                   value={[
 
-                     this.state.releaseDate[0]
 
-                       ? moment(this.state.releaseDate[0])
 
-                       : null,
 
-                     this.state.releaseDate[1]
 
-                       ? moment(this.state.releaseDate[1])
 
-                       : null,
 
-                   ]}
 
-                   onChange={(data, dataString) => {
 
-                     this.setState({ releaseDate: dataString });
 
-                   }}
 
-                 />
 
-                 <Button
 
-                   type="primary"
 
-                   style={{ marginLeft: "10px", marginRight: 10 }}
 
-                   onClick={this.search}
 
-                 >
 
-                   搜索
 
-                 </Button>
 
-                 <Button onClick={this.reset}>重置</Button>
 
-               </TabPane>
 
-               {/*<Button onClick={() => { window.open(globalConfig.context + '/api/admin/customer/downloadTemplate?type=1') }}>下载批量导入模板</Button>
 
-                		<Upload
 
-                		    name="file"
 
-                         action={globalConfig.context + "/api/admin/customer/uploadExcel"}
 
-                         beforeUpload={beforeUploadFile}
 
-                         showUploadList={false}
 
-                         onChange={(info) => {
 
-                             if (info.file.status !== 'uploading') {
 
-                                 console.log(info.file, info.fileList);
 
-                             }
 
-                             if (info.file.status === 'done') {
 
-                                 if (!info.file.response.error.length) {
 
-                                     message.success(`${info.file.name} 文件上传成功!`);
 
-                                     this.loadData();
 
-                                 } else {
 
-                                     message.warning(info.file.response.error[0].message);
 
-                                     return;
 
-                                 };
 
-                             } else if (info.file.status === 'error') {
 
-                                 message.error(`${info.file.name} 文件上传失败。`);
 
-                             };
 
-                         }} >
 
-                         <Button>上传批量内容</Button>
 
-                     </Upload>
 
- 	               {adminData.isSuperAdmin?<Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
 
- 							     <Button type="danger" style={{marginLeft:'10px'}}
 
- 	                       			 disabled={!hasSelected}
 
- 	                       		 >删除<Icon type="minus" />
 
- 	                        </Button>
 
- 	                </Popconfirm>:''
 
- 	                }*/}
 
-               <TabPane tab="操作" key="2">
 
-                 <AutoComplete
 
-                   className="certain-category-search"
 
-                   dropdownClassName="certain-category-search-dropdown"
 
-                   dropdownMatchSelectWidth={false}
 
-                   dropdownStyle={{ width: 120 }}
 
-                   style={{ width: "120px" }}
 
-                   dataSource={options}
 
-                   placeholder="输入转交人姓名"
 
-                   value={this.state.auto}
 
-                   onChange={this.httpChange}
 
-                   filterOption={true}
 
-                   onBlur={this.blurChange}
 
-                   onSelect={this.selectAuto}
 
-                   disabled={!hasSelected}
 
-                 >
 
-                   <Input />
 
-                 </AutoComplete>
 
-                 <Button
 
-                   type="primary"
 
-                   // onClick={this.changeAssigner}
 
-                   onClick={(e) => {
 
-                     e.stopPropagation();
 
-                     this.showConfirm(this.changeAssigner);
 
-                   }}
 
-                   disabled={!hasSelected}
 
-                   style={{ marginRight: 10 }}
 
-                 >
 
-                   转交
 
-                 </Button>
 
-                 <Button
 
-                   type="primary"
 
-                   style={{
 
-                     float: "right",
 
-                     marginTop: 10,
 
-                     marginLeft: 10,
 
-                     marginRight: 10,
 
-                   }}
 
-                   onClick={this.addClick}
 
-                 >
 
-                   新增客户
 
-                   <Icon type="plus" />
 
-                 </Button>
 
-                 {/*<Button type="default" className="addButton" onClick={this.exportExec}>导出excel<Icon type="plus" /></Button>*/}
 
-                 {/* <div className="clearfix" style={{ marginTop: "5px" }}> */}
 
-                 <Button
 
-                   onClick={(e) => {
 
-                     e.stopPropagation(), this.rankO(0);
 
-                   }}
 
-                   type="primary"
 
-                   style={{ marginRight: "10px" }}
 
-                   disabled={!hasSelected}
 
-                 >
 
-                   一般客户
 
-                 </Button>
 
-                 <Button
 
-                   onClick={(e) => {
 
-                     e.stopPropagation(), this.rankO(1);
 
-                   }}
 
-                   type="primary"
 
-                   style={{ marginRight: "10px" }}
 
-                   disabled={!hasSelected}
 
-                 >
 
-                   意向客户
 
-                 </Button>
 
-                 <Button
 
-                   onClick={(e) => {
 
-                     e.stopPropagation(), this.rankO(2);
 
-                   }}
 
-                   type="primary"
 
-                   disabled={!hasSelected}
 
-                 >
 
-                   重点客户
 
-                 </Button>
 
-                 <Button
 
-                   style={{ marginLeft: 10 }}
 
-                   onClick={(e) => {
 
-                     e.stopPropagation(),
 
-                       this.zhuanjiaoDetail(this.state.selectedRows[0]);
 
-                   }}
 
-                   type="primary"
 
-                   disabled={!hasSelected || this.state.selectedRows.length > 1}
 
-                 >
 
-                   客户日志
 
-                 </Button>
 
-                 <Button
 
-                   style={{ marginLeft: 10 }}
 
-                   onClick={(e) => {
 
-                     e.stopPropagation(), this.showConfirms(this.release);
 
-                   }}
 
-                   type="primary"
 
-                   disabled={!hasSelected}
 
-                 >
 
-                   移除客户
 
-                 </Button>
 
-                 <EnterpriseNameChange
 
-                     type='journal'
 
-                     disabled={!(hasSelected && this.state.selectedRows.length === 1)}
 
-                     style={{ marginLeft: 10 }}
 
-                     enterpriseId={this.state.selectedRows[0] && this.state.selectedRows[0].id}/>
 
-               </TabPane>
 
-               <TabPane tab="更改表格显示数据" key="3">
 
-                 <div style={{ marginLeft: 10 }}>
 
-                   <ChooseList
 
-                       columns={this.state.columns}
 
-                       changeFn={this.changeList}
 
-                       changeList={this.state.changeList}
 
-                       top={55}
 
-                       margin={11}
 
-                   />
 
-                 </div>
 
-               </TabPane>
 
-             </Tabs>
 
-           </div>
 
-           <div className="patent-table">
 
-             <Spin spinning={this.state.loading}>
 
-               <Table
 
-                 size="middle"
 
-                 className={'intentionCustomerTable'}
 
-                 columns={
 
-                   this.state.changeList
 
-                       ? this.state.changeList
 
-                       : this.state.columns
 
-                 }
 
-                 dataSource={this.state.dataSource}
 
-                 rowSelection={rowSelection}
 
-                 pagination={this.state.pagination}
 
-                 onRowDoubleClick={this.tableRowClick}
 
-               />
 
-             </Spin>
 
-           </div>
 
-           <AddIntention
 
-             api={this.state.detailApi}
 
-             showDesc={this.state.showDesc}
 
-             closeDesc={this.closeDesc}
 
-           />
 
-           <FollowDetail
 
-             categoryArr={this.state.categoryArr}
 
-             followData={this.state.followData}
 
-             visitModul={this.state.visitModul}
 
-             closeDesc={this.closeDesc}
 
-           />
 
-           <IntentionDetail
 
-             tabsKey={this.state.tabsKey}
 
-             categoryArr={this.state.categoryArr}
 
-             detailApi={this.props.detailApi}
 
-             IntentionData={this.state.RowData}
 
-             modalVisible={this.state.modalVisible}
 
-             name={this.state.modalName}
 
-             closeDesc={this.closeDesc}
 
-             basicState={this.state.basicState}
 
-             contactState={this.state.contactState}
 
-           />
 
-           {this.state.zhuanjiaoVisible ? (
 
-             <ZhuanjiaoDetail
 
-               cancel={this.zhuanjiaoDetailCancel}
 
-               visible={this.state.zhuanjiaoVisible}
 
-               id={this.state.zhuanjiaoId}
 
-             />
 
-           ) : (
 
-             ""
 
-           )}
 
-         </div>
 
-       );
 
-     },
 
-   })
 
- );
 
- export default IntentionCustomer;
 
 
  |