myBusiness.jsx 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624
  1. import React from 'react';
  2. import { Radio,Icon, Popconfirm,Button, AutoComplete ,Input,Select,Spin,Table, Switch, message, DatePicker, Modal,Form ,Row,Col,TimePicker} from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import moment from 'moment';
  6. const Option = AutoComplete.Option;
  7. const OptGroup = AutoComplete.OptGroup;
  8. import './myClient.less';
  9. import { areaSelect} from '../../../NewDicProvinceList';
  10. const { Column, ColumnGroup } = Table;
  11. import {socialAttribute,newFollow,lvl, customerStatus,intentionalService} from '../../../dataDic.js';
  12. import {getcustomerStatue,getprovince,getCompanyIntention,getfllowSituation,getContactType } from '../../../tools.js';
  13. const MyBusiness = Form.create()(React.createClass({
  14. loadData(pageNo, apiUrl) {
  15. this.state.data = [];
  16. this.setState({
  17. loading: true
  18. });
  19. $.ajax({
  20. method: "post",
  21. dataType: "json",
  22. crossDomain: false,
  23. url:globalConfig.context + '/api/admin/customer/listBusiness',
  24. data: {
  25. pageNo: pageNo || 1,
  26. pageSize: this.state.pagination.pageSize,
  27. businessGlossoryId: this.state.businessIdS, //业务意向
  28. identifyName:this.state.identifyNameS,
  29. followSituation:this.state.followSituationS,
  30. customerStatus:this.state.customerStatusS,
  31. adminName: this.state.adminNameS,
  32. startDate: this.state.releaseDate[0],
  33. endDate: this.state.releaseDate[1],
  34. },
  35. success: function (data) {
  36. let theArr = [];
  37. if (data.error.length || data.data.list=="") {
  38. if (data.error && data.error.length) {
  39. message.warning(data.error[0].message);
  40. };
  41. } else {
  42. for (let i = 0; i < data.data.list.length; i++) {
  43. let thisdata = data.data.list[i];
  44. theArr.push({
  45. key: i,
  46. id: thisdata.id,
  47. businessId:thisdata.businessId,
  48. businessName:thisdata.businessName,
  49. identifyName:thisdata.identifyName,
  50. followSituation:thisdata.followSituation,
  51. customerStatus:thisdata.customerStatus,
  52. customerStatust:thisdata.customerStatus,
  53. adminName:thisdata.adminName,
  54. createTime:thisdata.createTime,
  55. updateTime:thisdata.updateTime,
  56. });
  57. };
  58. this.state.pagination.current = data.data.pageNo;
  59. this.state.pagination.total = data.data.totalCount;
  60. };
  61. this.setState({
  62. dataSource: theArr,
  63. pagination: this.state.pagination,
  64. selectedRowKeys:[]
  65. });
  66. }.bind(this),
  67. }).always(function () {
  68. this.setState({
  69. loading: false
  70. });
  71. }.bind(this));
  72. },
  73. //点击出现函数
  74. setModal2VisibleOk(e) {
  75. this.setState({
  76. modal2Visible:true
  77. });
  78. },
  79. //点击消失函数
  80. setModal2Visiblecancel(e) {
  81. this.setState({
  82. modal2Visible:false
  83. });
  84. },
  85. getPictureUrl(e) {
  86. this.setState({pictureUrl: e });
  87. },
  88. handleOk(e){
  89. this.setState({
  90. visible: false,
  91. });
  92. },
  93. handleCancel(e){
  94. this.setState({
  95. visible: false,
  96. });
  97. },
  98. getInitialState() {
  99. return {
  100. dataSources:[],
  101. customerName:[],
  102. orgCodeUrl:[],
  103. companyLogoUrl:[],
  104. visible: false ,
  105. searchMore: true,
  106. releaseDate: [],
  107. releaseDate: [],
  108. selectedRowKeys: [],
  109. selectedRowKey: [],
  110. selectedRows: [],
  111. loading: false,
  112. pagination: {
  113. defaultCurrent: 1,
  114. defaultPageSize: 10,
  115. showQuickJumper: true,
  116. pageSize: 10,
  117. onChange: function (page) {
  118. this.loadData(page);
  119. }.bind(this),
  120. showTotal: function (total) {
  121. return '共' + total + '条数据';
  122. }
  123. },
  124. paginations: {
  125. defaultCurrent: 1,
  126. defaultPageSize: 10,
  127. showQuickJumper: true,
  128. pageSize: 10,
  129. onChange: function (page) {
  130. this.loadVisit(page);
  131. }.bind(this),
  132. showTotal: function (total) {
  133. return '共' + total + '条数据';
  134. }
  135. },
  136. businessFollowList: [
  137. {
  138. title: '跟进时间',
  139. dataIndex: 'followTime',
  140. key: 'followTime',
  141. }, {
  142. title: '营销员',
  143. dataIndex: 'adminName',
  144. key: 'adminName',
  145. }, {
  146. title: '意向进度',
  147. dataIndex: 'followSituation',
  148. key: 'followSituation',
  149. render:text=>{return getfllowSituation(text)}
  150. }, {
  151. title: '客户状态',
  152. dataIndex: 'customerStatus',
  153. key: 'customerStatus',
  154. render:text=>{return getcustomerStatue(text)}
  155. },
  156. {
  157. title: '拜访方式',
  158. dataIndex: 'contactType',
  159. key:'contactType',
  160. render:text=>{return getContactType(text)}
  161. }, {
  162. title: '联系人',
  163. dataIndex: 'contacts',
  164. key: 'contacts',
  165. },
  166. {
  167. title: '联系电话',
  168. dataIndex: 'contactMobile',
  169. key:'contactMobile',
  170. },
  171. {
  172. title: '操作',
  173. dataIndex: 'ccc',
  174. key:'ccc',
  175. render: (text, record, index) => {
  176. return <div>
  177. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
  178. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
  179. </Popconfirm>
  180. </div>
  181. }
  182. }
  183. ],
  184. columns: [
  185. {
  186. title: '业务名称',
  187. dataIndex: 'businessName',
  188. key: 'businessName',
  189. }, {
  190. title: '意向时间',
  191. dataIndex: 'createTime',
  192. key: 'createTime',
  193. }, {
  194. title: '更新时间',
  195. dataIndex: 'updateTime',
  196. key: 'updateTime',
  197. }, {
  198. title: '客户名称',
  199. dataIndex: 'identifyName',
  200. key: 'identifyName',
  201. }, {
  202. title: '营销员',
  203. dataIndex: 'adminName',
  204. key: 'adminName',
  205. },
  206. {
  207. title: '意向进度',
  208. dataIndex: 'followSituation',
  209. key:'followSituation',
  210. render: text => { return getfllowSituation(text) }
  211. },
  212. {
  213. title: '客户状态',
  214. dataIndex: 'customerStatus',
  215. key: 'customerStatus',
  216. render: text => { return getcustomerStatue(text) }
  217. },
  218. {
  219. title: '操作',
  220. dataIndex: 'abc',
  221. key: 'abc',
  222. render: (text, record, index) => {
  223. return <div>
  224. <Button onClick={(e) =>{ e.stopPropagation(), this.addModify(record); }} type="primary" style={{marginRight:'10px',}} disabled={record.customerStatust=='6'?true:false}>跟进</Button>
  225. <Popconfirm title="是否停止?" onConfirm={(e)=>{this.followStop(record)}} okText="停止" cancelText="不停止">
  226. <Button type="primary" style={{marginRight:'10px'}} onClick={(e) =>{ e.stopPropagation()}} disabled={record.customerStatust=='6'?true:false}>停止</Button>
  227. </Popconfirm>
  228. </div>
  229. }
  230. }
  231. ],
  232. dataSource: [],
  233. searchTime: [,]
  234. };
  235. },
  236. //删除跟进记录
  237. intentionDelet(uids){
  238. this.setState({
  239. loading:true
  240. });
  241. $.ajax({
  242. method: "get",
  243. dataType: "json",
  244. crossDomain: false,
  245. url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
  246. data: {
  247. ufbId: uids.ufbId,//删除的ID
  248. }
  249. }).done(function (data) {
  250. if (!data.error.length) {
  251. message.success('删除成功!');
  252. this.setState({
  253. loading: false,
  254. });
  255. } else {
  256. message.warning(data.error[0].message);
  257. };
  258. this.loadVisit();
  259. this.loadData();
  260. }.bind(this));
  261. },
  262. //更多操作
  263. ModalOperation(){
  264. this.setState({
  265. visible: true,
  266. });
  267. },
  268. //列表删除功能
  269. delectRow() {
  270. let deletedIds;
  271. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  272. let rowItem = this.state.selectedRows[idx];
  273. if (rowItem.businessId) {
  274. deletedIds=rowItem.businessId;
  275. };
  276. };
  277. this.setState({
  278. selectedRowKeys: [],
  279. });
  280. $.ajax({
  281. method: "get",
  282. dataType: "json",
  283. crossDomain: false,
  284. url: globalConfig.context + "/api/admin/customer/deleteBusiness",
  285. data: {
  286. businessId: deletedIds,//删除的ID
  287. }
  288. }).done(function (data) {
  289. if (!data.error.length) {
  290. message.success('删除成功!');
  291. this.setState({
  292. loading: false,
  293. });
  294. } else {
  295. message.warning(data.error[0].message);
  296. };
  297. this.loadData();
  298. }.bind(this));
  299. },
  300. //停止跟进
  301. followStop(uids) {
  302. this.setState({
  303. loading:true
  304. });
  305. $.ajax({
  306. method: "get",
  307. dataType: "json",
  308. crossDomain: false,
  309. url: globalConfig.context + "/api/admin/customer/stopBusiness",
  310. data: {
  311. businessId: uids.businessId,//删除的ID
  312. }
  313. }).done(function (data) {
  314. if (!data.error.length) {
  315. message.success('成功停止跟进!');
  316. this.setState({
  317. loading: false,
  318. });
  319. } else {
  320. message.warning(data.error[0].message);
  321. };
  322. this.loadData();
  323. }.bind(this));
  324. },
  325. getOrgCodeUrl(e) {
  326. this.setState({ orgCodeUrl: e });
  327. },
  328. getCompanyLogoUrl(e) {
  329. this.setState({ companyLogoUrl: e });
  330. },
  331. componentWillMount() {
  332. //意向服务
  333. let intentionalArr = [];
  334. newFollow.map(function (item) {
  335. intentionalArr.push(
  336. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  337. )
  338. });
  339. this.state.intentionalOption = intentionalArr;
  340. this.loadData();
  341. },
  342. //新建
  343. addClick() {
  344. this.state.businessGlossoryId=undefined;
  345. this.state.followSituation='0';
  346. this.state.customerStatus='0';
  347. this.state.contactType=undefined;
  348. this.state.remarks='';
  349. this.state.result='';
  350. this.state.keys=false;
  351. this.state.lastName=undefined;
  352. this.addTime();
  353. this.setState({
  354. showDesc: true,
  355. });
  356. },
  357. addClickOk(){
  358. this.setState({
  359. businessId:'',
  360. showDesc: false,
  361. });
  362. },
  363. addClickCancel(){
  364. this.setState({
  365. businessId:'',
  366. showDesc: false,
  367. });
  368. },
  369. search() {
  370. this.loadData();
  371. },
  372. reset() {
  373. this.state.businessIdS=undefined; //名称1
  374. this.state.identifyNameS='';
  375. this.state.followSituationS=undefined;
  376. this.state.customerStatusS=undefined;
  377. this.state.adminNameS='';
  378. this.state.releaseDate[0]=undefined;
  379. this.state.releaseDate[1]=undefined;
  380. this.loadData();
  381. },
  382. searchSwitch() {
  383. this.setState({
  384. searchMore: !this.state.searchMore
  385. });
  386. },
  387. //详情保存函数
  388. detailsSubmint(){
  389. this.setState({
  390. modal5Visible:false,
  391. })
  392. },
  393. //基本信息提交
  394. newSubmit(e){
  395. e.preventDefault();
  396. this.setState({
  397. selectedRowKeys: [],
  398. });
  399. this.props.form.validateFields((err, values) => {
  400. if (!err) {
  401. this.setState({
  402. loading: true
  403. });
  404. $.ajax({
  405. method: "post",
  406. dataType: "json",
  407. url:globalConfig.context + '/api/admin/customer/updateBusiness',
  408. data: {
  409. businessId:this.state.rowId,
  410. followSituation:this.state.followSituation,
  411. customerStatus:this.state.customerStatus,
  412. remarks:this.state.remarks,
  413. }
  414. }).done(function (data) {
  415. this.setState({
  416. loading: false
  417. });
  418. if (!data.error.length) {
  419. message.success('保存成功!');
  420. this.detailsModal() ;
  421. this.loadData();
  422. } else {
  423. message.warning(data.error[0].message);
  424. }
  425. ;
  426. }.bind(this));
  427. }
  428. })
  429. },
  430. //查看基本详情基本信息
  431. loadInformation(record){
  432. $.ajax({
  433. method: "get",
  434. dataType: "json",
  435. crossDomain: false,
  436. url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
  437. data: {
  438. businessId: record
  439. },
  440. success: function (data) {
  441. let thisData = data.data;
  442. if (!thisData) {
  443. if (data.error && data.error.length) {
  444. message.warning(data.error[0].message);
  445. };
  446. thisData = {};
  447. };
  448. this.setState({
  449. uids:thisData.uid,
  450. dataInformation:thisData,
  451. followSituation:thisData.followSituation,
  452. businessGlossoryId:thisData.businessGlossoryId,
  453. customerStatus:thisData.customerStatus,
  454. remarks:thisData.remarks,
  455. });
  456. }.bind(this),
  457. }).always(function () {
  458. this.loadVisit();
  459. this.setState({
  460. loading: false
  461. });
  462. }.bind(this));
  463. },
  464. detailsModalOk(e) {
  465. this.setState({ modal5Visible:true });//需要一个请求数据
  466. this.loadInformation(e.businessId)
  467. },
  468. //点击消失函数
  469. detailsModal(e) {
  470. this.setState({
  471. modal5Visible:false
  472. });
  473. },
  474. //拜访保存函数
  475. visitSubmit(){
  476. this.setState({
  477. visitModul:false,
  478. })
  479. },
  480. //新增联系人
  481. addcontactModulOK(){
  482. this.setState({
  483. addcontactModul:false
  484. });
  485. },
  486. addcontactModulcancel(){
  487. this.setState({
  488. addcontactModul:false
  489. });
  490. },
  491. businessFollowOk(){
  492. this.setState({
  493. businessFollowModul:false
  494. });
  495. },
  496. businessFollowCancel(){
  497. this.setState({
  498. businessFollowModul:false
  499. });
  500. },
  501. //点击新增详情
  502. newContacts(){
  503. if(this.state.uids||this.state.khId){
  504. this.state.newsex =undefined;
  505. this.state.newname ='';
  506. this.state.newmobile='';
  507. this.state.newwechat='';
  508. this.state.newqq='';
  509. this.state.newdepatrment='';
  510. this.state.newposition='';
  511. this.state.newemail='';
  512. this.setState({
  513. uids:this.state.uids?this.state.uids:this.state.khId,
  514. addcontactModul:true
  515. });
  516. }else{
  517. message.warning('请输入客户名称')
  518. }
  519. },
  520. //新增联系人保存函数
  521. submitcontactman(e){
  522. e.preventDefault();
  523. this.setState({
  524. loading:true
  525. })
  526. $.ajax({
  527. method: "post",
  528. dataType: "json",
  529. crossDomain: false,
  530. url: globalConfig.context + "/api/admin/customer/addOneContact",
  531. data:{
  532. uid:this.state.uids,
  533. name:this.state.newname,
  534. mobile:this.state.newmobile,
  535. email:this.state.newemail,
  536. wechat:this.state.newwechat,
  537. depatrment:this.state.newdepatrment,
  538. position:this.state.newposition,
  539. sex:this.state.newsex,
  540. qq:this.state.newqq
  541. },
  542. success: function (data) {
  543. if (!data.error.length) {
  544. this.addcontactModulOK()
  545. this.getNewWoman(this.state.uids)
  546. this.setState({
  547. loading: false,
  548. })
  549. } else {
  550. message.warning(data.error[0].message);
  551. };
  552. }.bind(this)
  553. });
  554. },
  555. //跟进
  556. addModify(e) {
  557. this.addTime();
  558. this.HttpFollowUp(e.businessId);
  559. this.state.keys=true;
  560. this.setState({
  561. showDesc: true,
  562. });
  563. },
  564. //当选择联系人的列表变化时,则执行
  565. hundleName(e){
  566. let changNub=this.state.telNum[e];
  567. this.setState({
  568. nub:this.state.telNum[e],
  569. lastName: e,
  570. });
  571. },
  572. //新建保存
  573. addSubmit(e){
  574. e.preventDefault();
  575. if(this.state.businessGlossoryId==undefined){
  576. message.warning('请选择业务意向')
  577. return false;
  578. }
  579. if(!this.state.businessId){
  580. if(!this.state.theTypes){
  581. message.warning('客户名为空或不存在')
  582. return false;
  583. }
  584. }
  585. if(this.state.contactType==undefined){
  586. message.warning('请选择联系方式')
  587. return false;
  588. }
  589. if(this.state.lastName==undefined){
  590. message.warning('请选择联系人')
  591. return false;
  592. }
  593. this.props.form.validateFields((err, values) => {
  594. if (!err) {
  595. this.setState({
  596. loading: true
  597. });
  598. let conts=this.state.lastName;
  599. let contactsId= this.state.contactsIdArr[conts].id;
  600. $.ajax({
  601. method: "post",
  602. dataType: "json",
  603. crossDomain: false,
  604. url:!this.state.keys?globalConfig.context + '/api/admin/customer/addBusinessAndFollow':globalConfig.context + '/api/admin/customer/addFollowOneBusiness ',
  605. data:!this.state.businessId?{
  606. uid:this.state.khId,
  607. businessGlossoryId: this.state.businessGlossoryId,
  608. followSituation:this.state.followSituation,
  609. customerStatus: this.state.customerStatus,
  610. contactType: this.state.contactType,
  611. ocbId: contactsId,
  612. createTime:this.state.createYear+''+this.state.creatMent,
  613. followTime:this.state.followTime,
  614. remarks: this.state.remarks,
  615. result: this.state.result,
  616. }:{
  617. uid:this.state.uids,
  618. businessId:this.state.businessId,
  619. businessGlossoryId: this.state.businessGlossoryId,
  620. followSituation:this.state.followSituation,
  621. customerStatus: this.state.customerStatus,
  622. contactType: this.state.contactType,
  623. ocbId: contactsId,
  624. followTime:this.state.followTime,
  625. remarks: this.state.remarks,
  626. result: this.state.result,
  627. }
  628. }).done(function (data) {
  629. this.setState({
  630. loading: false
  631. });
  632. if (!data.error.length) {
  633. message.success('保存成功!');
  634. this.addClickCancel();
  635. this.loadData();
  636. this.state.businessId='';
  637. } else {
  638. message.warning(data.error[0].message);
  639. }
  640. }.bind(this));
  641. }
  642. });
  643. },
  644. //列表保存
  645. addlistSubmit(e){
  646. e.preventDefault();
  647. this.props.form.validateFields((err, values) => {
  648. if (!err) {
  649. this.setState({
  650. loading: true
  651. });
  652. let conts=this.state.lastName;
  653. let contactsId= conts?this.state.contactsIdArr[conts].id:'';
  654. $.ajax({
  655. method: "post",
  656. dataType: "json",
  657. crossDomain: false,
  658. url:globalConfig.context + '/api/admin/customer/updateFollowOneBusiness',
  659. data:{
  660. ufbId:this.state.ufbIds,
  661. followId:this.state.followId,
  662. customerStatus: this.state.customerStatusV,
  663. followSituation:this.state.followSituationV,
  664. contactType: this.state.contactTypeV,
  665. ocbId:contactsId,
  666. remarks: this.state.remarksV,
  667. result: this.state.resultV,
  668. }
  669. }).done(function (data) {
  670. this.setState({
  671. loading: false
  672. });
  673. if (!data.error.length) {
  674. message.success('保存成功!');
  675. this.businessFollowCancel();
  676. this.loadVisit()
  677. } else {
  678. message.warning(data.error[0].message);
  679. }
  680. }.bind(this));
  681. }
  682. });
  683. },
  684. //进入修改时
  685. listFollowUp(e){
  686. $.ajax({
  687. method: "get",
  688. dataType: "json",
  689. crossDomain: false,
  690. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  691. data:{
  692. ufbId:e.ufbId
  693. },
  694. success: function (data) {
  695. let thedata=data.data;
  696. if (!thedata) {
  697. if (data.error && data.error.length) {
  698. message.warning(data.error[0].message);
  699. };
  700. thedata = {};
  701. };
  702. this.setState({
  703. businessGlossoryId:thedata.businessGlossoryId,
  704. followSituationV:thedata.followSituation,
  705. customerStatusV:thedata.customerStatus,
  706. followTime:thedata.followTime,
  707. createTime:thedata.createTime,
  708. identifyName:thedata.identifyName,
  709. contactTypeV:parseInt(thedata.contactType),
  710. resultV:thedata.result,
  711. remarksV:thedata.remarks,
  712. adminName:thedata.adminName,
  713. contacts:thedata.contacts,
  714. contactMobile:thedata.contactMobile,
  715. ufbId:thedata.ufbId,
  716. followId:thedata.followId,
  717. });
  718. }.bind(this),
  719. }).always(function () {
  720. this.getNewWoman(this.state.uids)
  721. this.setState({
  722. ufbIds:e.ufbId,
  723. loading: false
  724. });
  725. }.bind(this));
  726. },
  727. //新建HTTP获取数据
  728. addTime(){
  729. $.ajax({
  730. method: "get",
  731. dataType: "json",
  732. crossDomain: false,
  733. url: globalConfig.context + "/api/admin/customer/toAddBusinessAndFollow",
  734. data:{
  735. },
  736. success: function (data) {
  737. let theArr = [];
  738. let thedata=data.data;
  739. if (!thedata) {
  740. if (data.error && data.error.length) {
  741. message.warning(data.error[0].message);
  742. };
  743. thedata = {};
  744. };
  745. let creatMent=thedata.createTime.substr(10,9);
  746. let createYear=thedata.createTime.substr(0,10);
  747. this.setState({
  748. createTime:thedata.createTime,
  749. creatMent:creatMent,
  750. createYear:createYear,
  751. followTime:thedata.followTime,
  752. adminName: thedata.adminName,
  753. });
  754. }.bind(this),
  755. }).always(function () {
  756. this.setState({
  757. loading: false
  758. });
  759. }.bind(this));
  760. },
  761. //客户名称初始加载
  762. customerList(e){
  763. $.ajax({
  764. method: "get",
  765. dataType: "json",
  766. crossDomain: false,
  767. url: globalConfig.context + "/api/admin/customer/findCustomerByName",
  768. data:{
  769. name:e
  770. },
  771. success: function (data) {
  772. let thedata=data.data;
  773. if (!thedata) {
  774. if (data.error && data.error.length) {
  775. message.warning(data.error[0].message);
  776. };
  777. thedata = {};
  778. };
  779. this.setState({
  780. uids:thedata.id,
  781. customerArr:thedata,
  782. });
  783. }.bind(this),
  784. }).always(function () {
  785. this.setState({
  786. loading: false
  787. });
  788. }.bind(this));
  789. },
  790. //值改变时请求客户名称
  791. httpChange(e){
  792. if(e.length>=2){
  793. this.customerList(e);
  794. }
  795. },
  796. //选择值时值匹配及联系人函数加载
  797. autoChange(e){
  798. let theType='';
  799. let contactLists=this.state.customerArr||[];
  800. if (e) {
  801. contactLists.map(function (item) {
  802. if (item.name == e.toString()) {
  803. theType = item.id;
  804. }
  805. });
  806. }
  807. this.setState({
  808. khId:theType
  809. })
  810. this.getNewWoman(theType)
  811. },
  812. //客户输入框失去焦点是判断客户是否存在
  813. blurChange(e){
  814. let theType='';
  815. let contactLists=this.state.customerArr||[];
  816. if (e) {
  817. contactLists.map(function (item) {
  818. if (item.name == e.toString()) {
  819. theType = item.id;
  820. }
  821. });
  822. }
  823. this.setState({
  824. theTypes:theType
  825. })
  826. },
  827. //点击跟进时数据处理
  828. HttpFollowUp(e){
  829. $.ajax({
  830. method: "get",
  831. dataType: "json",
  832. crossDomain: false,
  833. url: globalConfig.context + "/api/admin/customer/toAddFollowOneBusiness",
  834. data:{
  835. businessId:e
  836. },
  837. success: function (data) {
  838. let thedata=data.data;
  839. if (!thedata) {
  840. if (data.error && data.error.length) {
  841. message.warning(data.error[0].message);
  842. };
  843. thedata = {};
  844. };
  845. this.setState({
  846. uids:thedata.uid,
  847. businessId:thedata.businessId,
  848. businessGlossoryId:thedata.businessGlossoryId,
  849. followSituation:thedata.followSituation,
  850. customerStatus:thedata.customerStatus,
  851. followTime:thedata.followTime,
  852. createTime:thedata.createTime,
  853. identifyName:thedata.identifyName,
  854. contactType:undefined,
  855. result:'',
  856. remarks:'',
  857. });
  858. }.bind(this),
  859. }).always(function () {
  860. this.getNewWoman(this.state.uids)
  861. this.setState({
  862. loading: false
  863. });
  864. }.bind(this));
  865. },
  866. //获取联系人下拉框
  867. getNewWoman(ids) {
  868. this.state.data = []
  869. $.ajax({
  870. method: "get",
  871. dataType: "json",
  872. crossDomain: false,
  873. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  874. data:{
  875. uid:ids,
  876. },
  877. success: function (data) {
  878. let theArr = [];
  879. let thedata=data.data;
  880. if (!thedata) {
  881. if (data.error && data.error.length) {
  882. message.warning(data.error[0].message);
  883. };
  884. thedata = {};
  885. };
  886. var telNum=[];
  887. var contactIds=[];
  888. thedata.map(function (item,index) {
  889. telNum.push(thedata[index].mobile);
  890. });
  891. for (let item in data.data) {
  892. let theData = data.data[item];
  893. theArr.push(
  894. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  895. );
  896. };
  897. this.setState({
  898. contactsIdArr:thedata,
  899. telNum:telNum,
  900. orderStatusOption: theArr,
  901. });
  902. }.bind(this),
  903. }).always(function () {
  904. this.setState({
  905. loading: false
  906. });
  907. }.bind(this));
  908. },
  909. //获取拜访详情ajax
  910. loadVisit(pageNo) {
  911. this.setState({
  912. loading: true
  913. });
  914. $.ajax({
  915. method: "get",
  916. dataType: "json",
  917. crossDomain: false,
  918. url:globalConfig.context + '/api/admin/customer/listFollowHistory',
  919. data: {
  920. pageNo: pageNo || 1,
  921. pageSize: this.state.paginations.pageSize,
  922. uid: this.state.uids, //名称1
  923. businessGlossoryId:this.state.businessGlossoryId,
  924. },
  925. success: function (data) {
  926. let theArr = [];
  927. if (data.error.length || data.data.list=="") {
  928. if (data.error && data.error.length) {
  929. message.warning(data.error[0].message);
  930. };
  931. } else {
  932. for (let i = 0; i < data.data.list.length; i++) {
  933. let thisdata = data.data.list[i];
  934. theArr.push({
  935. followId:thisdata.followId,
  936. followTime:thisdata.followTime,
  937. identifyName:thisdata.identifyName,
  938. contacts:thisdata.contacts,
  939. contactMobile:thisdata.contactMobile,
  940. result:thisdata.result,
  941. ufbId:thisdata.ufbId,
  942. adminName:thisdata.adminName,
  943. followSituation:thisdata.followSituation,
  944. customerStatus:thisdata.customerStatus,
  945. contactType:thisdata.contactType
  946. });
  947. };
  948. this.state.paginations.current = data.data.pageNo;
  949. this.state.paginations.total = data.data.totalCount;
  950. };
  951. this.setState({
  952. visitArrList: theArr,
  953. paginations: this.state.paginations
  954. });
  955. }.bind(this),
  956. }).always(function () {
  957. this.setState({
  958. loading: false
  959. });
  960. }.bind(this));
  961. },
  962. componentWillReceiveProps(nextProps) {
  963. if (!this.props.visible && nextProps.visible) {
  964. if (nextProps.data && nextProps.data.id) {
  965. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  966. };
  967. this.state.data = {};
  968. this.state.companyLogoUrl = [];
  969. this.state.orgCodeUrl = [];
  970. };
  971. },
  972. tableRowClick(record, index) {
  973. this.state.RowData = record;
  974. this.detailsModalOk(record);
  975. this.setState({
  976. selectedRowKeys:[],
  977. rowId:record.businessId,
  978. })
  979. },
  980. followRowClick(record, index) {
  981. this.state.RowData = record;
  982. this.listFollowUp(record);
  983. this.setState({
  984. businessFollowModul: true,
  985. selectedRowKeys:[],
  986. });
  987. },
  988. render() {
  989. const FormItem = Form.Item
  990. const rowSelection = {
  991. selectedRowKeys: this.state.selectedRowKeys,
  992. onChange: (selectedRowKeys, selectedRows) => {
  993. this.setState({
  994. selectedRows: selectedRows.slice(-1),
  995. selectedRowKeys: selectedRowKeys.slice(-1)
  996. });
  997. },
  998. onSelect: (recordt, selected, selectedRows) => {
  999. this.setState({
  1000. recordt:recordt.id
  1001. })
  1002. },
  1003. };
  1004. const rowSelections = {
  1005. selectedRowKeys: this.state.selectedRowKey,
  1006. onChange: (selectedRowKey, selectedRow) => {
  1007. this.setState({
  1008. selectedRow: selectedRow.slice(-1),
  1009. selectedRowKey: selectedRowKey.slice(-1)
  1010. });
  1011. },
  1012. onSelect: (records, selected, selectedRow) => {
  1013. this.setState({
  1014. selectedRow: selectedRow.slice(-1),
  1015. records:records.id,
  1016. })
  1017. },
  1018. };
  1019. const hasSelected = this.state.selectedRowKeys.length > 0;
  1020. const { RangePicker } = DatePicker;
  1021. const { getFieldDecorator } = this.props.form;
  1022. const formItemLayout = {
  1023. labelCol: { span: 8 },
  1024. wrapperCol: { span: 14 },
  1025. };
  1026. const theInformation=this.state.dataInformation || {}
  1027. const contactsOption="";
  1028. const formItemLayput = {
  1029. labelCol: { span: 10 },
  1030. wrapperCol: { span: 14 },
  1031. };
  1032. const businessIds=this.state.businessId||'';
  1033. const dataSources=this.state.customerArr || [];
  1034. const options = dataSources.map((group) =>
  1035. <Option key={group.id} value={group.name}>{group.name}</Option>
  1036. )
  1037. return (
  1038. <div className="user-content" >
  1039. <div className="content-title">
  1040. <span>我的业务</span>
  1041. </div>
  1042. <div className="user-search">
  1043. <Input placeholder="客户名称"
  1044. value={this.state.identifyNameS}
  1045. onChange={(e) => { this.setState({ identifyNameS: e.target.value }); }} />
  1046. <Select placeholder="服务意向" value={this.state.businessIdS} onChange={(e) => {
  1047. this.setState({businessIdS:e})}} style={{width:'150px'}}>
  1048. {
  1049. intentionalService.map(function (item) {
  1050. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1051. })
  1052. }
  1053. </Select>
  1054. <Button type="primary" onClick={this.search}>搜索</Button>
  1055. <Button onClick={this.reset}>重置</Button>
  1056. <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  1057. <Button style={{ marginRight:'10px' ,marginLeft:'10px'}} type='danger'
  1058. disabled={!hasSelected}
  1059. >删除<Icon type="minus" />
  1060. </Button>
  1061. </Popconfirm>
  1062. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1063. <Button type="primary" className="addButton" onClick={this.addClick}>新增业务<Icon type="plus" /></Button>
  1064. <div className='clearfix' style={{marginTop:'5px'}}>
  1065. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1066. <RangePicker
  1067. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1068. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1069. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1070. <Select placeholder="客户状态"
  1071. style={{ width: 150 }}
  1072. value={this.state.customerStatusS}
  1073. onChange={(e) => { this.setState({ customerStatusS: e }) }}>
  1074. {
  1075. customerStatus.map(function (item) {
  1076. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1077. })
  1078. }
  1079. </Select>
  1080. <Select placeholder="业务进度"
  1081. style={{ width: 150 }}
  1082. value={this.state.followSituationS}
  1083. onChange={(e) => { this.setState({ followSituationS: e }) }}>
  1084. {this.state.intentionalOption}
  1085. </Select>
  1086. <Input placeholder="营销员" style={{width:'150px'}}
  1087. value={this.state.adminNameS}
  1088. onChange={(e) => { this.setState({ adminNameS: e.target.value }); }} />
  1089. </div>
  1090. </div>
  1091. </div>
  1092. <div className="patent-table">
  1093. <Spin spinning={this.state.loading}>
  1094. <Table columns={this.state.columns}
  1095. dataSource={this.state.dataSource}
  1096. rowSelection={rowSelection}
  1097. pagination={this.state.pagination}
  1098. onRowClick={this.tableRowClick}
  1099. />
  1100. </Spin>
  1101. </div>
  1102. <Modal
  1103. footer=''
  1104. title="我的业务"
  1105. width='1000px'
  1106. visible={this.state.showDesc}
  1107. onOk={this.addClickOk}
  1108. onCancel={this.addClickCancel}
  1109. >
  1110. <Form horizontal id="demand-form" onSubmit={this.addSubmit}>
  1111. <Spin spinning={this.state.loading}>
  1112. <div className="clearfix">
  1113. {businessIds!=''?<div><FormItem className="half-item"
  1114. {...formItemLayout}
  1115. label="意向名称"
  1116. >
  1117. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  1118. </FormItem>
  1119. <FormItem className="half-item"
  1120. {...formItemLayout}
  1121. >
  1122. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1123. </FormItem>
  1124. <FormItem className="half-item"
  1125. {...formItemLayout}
  1126. label="意向时间"
  1127. >
  1128. <span>{this.state.createTime}</span>
  1129. </FormItem>
  1130. <FormItem className="half-item"
  1131. {...formItemLayout}
  1132. label="客户名称"
  1133. >
  1134. <span>{this.state.identifyName}</span>
  1135. </FormItem></div>
  1136. :<div><FormItem className="half-item"
  1137. {...formItemLayout}
  1138. label="意向名称"
  1139. >
  1140. <Select placeholder="服务意向名称" value={this.state.businessGlossoryId} onChange={(e) => {
  1141. this.setState({businessGlossoryId:e})}} style={{width:'150px'}}>
  1142. {
  1143. intentionalService.map(function (item) {
  1144. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1145. })
  1146. }
  1147. </Select>
  1148. <span style={{color:'red'}}> *</span>
  1149. </FormItem>
  1150. <FormItem className="half-item"
  1151. {...formItemLayout}
  1152. >
  1153. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1154. </FormItem>
  1155. <div className="clearfix">
  1156. <FormItem className="half-item"
  1157. {...formItemLayout}
  1158. label="意向时间" >
  1159. <DatePicker placeholder="更新日期" value={moment(this.state.createYear,'YYYY-MM-DD')} onChange={(time) => {this.setState({createYear: time});}}/>
  1160. <TimePicker placeholder="更新时间" value={moment(this.state.creatMent, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMent: time}); }}/>
  1161. </FormItem>
  1162. <FormItem className="half-item"
  1163. {...formItemLayout}
  1164. label="客户名称"
  1165. >
  1166. <AutoComplete
  1167. className="certain-category-search"
  1168. dropdownClassName="certain-category-search-dropdown"
  1169. dropdownMatchSelectWidth={false}
  1170. dropdownStyle={{ width: 300 }}
  1171. size="large"
  1172. style={{ width: '200px' }}
  1173. dataSource={options}
  1174. placeholder="输入名称"
  1175. optionLabelProp="value"
  1176. onChange={this.httpChange}
  1177. onSelect={this.autoChange}
  1178. filterOption={true}
  1179. onBlur={this.blurChange}
  1180. >
  1181. <Input style={{width:'200px'}}/>
  1182. </AutoComplete>
  1183. <span style={{color:'red'}}> *</span>
  1184. </FormItem>
  1185. </div>
  1186. </div>
  1187. }
  1188. <FormItem className="half-item"
  1189. {...formItemLayout}
  1190. label="营销员"
  1191. >
  1192. <span>{this.state.adminName}</span>
  1193. </FormItem>
  1194. <FormItem className="half-item"
  1195. {...formItemLayout}
  1196. label="意向进度"
  1197. >
  1198. <Select placeholder="意向进度" value={this.state.followSituation}
  1199. onChange={(e) => { this.setState({ followSituation: e }) }}>
  1200. {
  1201. newFollow.map(function (item) {
  1202. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1203. })
  1204. }
  1205. </Select>
  1206. </FormItem>
  1207. <FormItem className="half-item"
  1208. {...formItemLayout}
  1209. label="客户状态"
  1210. >
  1211. <Select placeholder="客户状态" value={this.state.customerStatus}
  1212. onChange={(e) => { this.setState({ customerStatus: e }) }}>
  1213. {
  1214. customerStatus.map(function (item) {
  1215. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1216. })
  1217. }
  1218. </Select>
  1219. </FormItem>
  1220. <div className="clearfix">
  1221. <FormItem
  1222. labelCol={{ span: 4 }}
  1223. wrapperCol={{ span: 16 }}
  1224. label="意向说明" >
  1225. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
  1226. onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>
  1227. </FormItem>
  1228. </div>
  1229. <div style={{fontSize:'18px',marginLeft:'30px'}}>拜访情况</div>
  1230. <div className="clearfix">
  1231. <FormItem className="half-item"
  1232. labelCol={{ span: 8 }}
  1233. wrapperCol={{ span: 16 }}
  1234. label="拜访方式" >
  1235. <Radio.Group value={this.state.contactType} onChange={(e) => {
  1236. this.setState({ contactType: e.target.value })
  1237. }}>
  1238. <Radio value={0}>外出</Radio>
  1239. <Radio value={1}>电话</Radio>
  1240. <Radio value={2}>QQ</Radio>
  1241. <Radio value={3}>微信</Radio>
  1242. <Radio value={4}>邮箱</Radio>
  1243. </Radio.Group>
  1244. </FormItem>
  1245. </div>
  1246. <FormItem className="half-item"
  1247. {...formItemLayout}
  1248. label="联系人"
  1249. >
  1250. <Select placeholder="联系人姓名" style={{ width: 140 }}
  1251. value={this.state.lastName}
  1252. onChange={this.hundleName}>
  1253. {this.state.orderStatusOption}
  1254. </Select>
  1255. </FormItem>
  1256. <FormItem className="half-item"
  1257. {...formItemLayout}
  1258. label="联系电话"
  1259. >
  1260. <span>{this.state.nub}</span>
  1261. </FormItem>
  1262. <div className="clearfix">
  1263. <FormItem className="half-item"
  1264. {...formItemLayout}
  1265. label="拜访人"
  1266. >
  1267. <span>{this.state.adminName}</span>
  1268. </FormItem>
  1269. <FormItem className="half-item"
  1270. {...formItemLayout}
  1271. label="拜访时间" >
  1272. <span>{this.state.followTime}</span>
  1273. </FormItem>
  1274. </div>
  1275. <div className="clearfix">
  1276. <FormItem
  1277. labelCol={{ span: 4 }}
  1278. wrapperCol={{ span: 16 }}
  1279. label="拜访备注" >
  1280. <Input type="textarea" rows={4} value={this.state.result} placeholder="来电备注"
  1281. onChange={(e) => { this.setState({ result: e.target.value }); }}/>
  1282. </FormItem>
  1283. </div>
  1284. </div>
  1285. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 160px'}}>保存</Button>
  1286. <Button size="large" onClick={this.addClickCancel}>取消</Button>
  1287. </Spin>
  1288. </Form>
  1289. </Modal>
  1290. <Modal
  1291. className="customeDetails"
  1292. title="我的业务意向详情"
  1293. width='1000px'
  1294. visible={this.state.modal5Visible}
  1295. onOk={this.detailsModal}
  1296. onCancel={this.detailsModal}
  1297. footer=''
  1298. >
  1299. <Form horizontal onSubmit={this.newSubmit} id="demand-form">
  1300. <Spin spinning={this.state.loading}>
  1301. <div className="clearfix">
  1302. <FormItem className="half-item"
  1303. {...formItemLayout}
  1304. label="意向名称"
  1305. >
  1306. <span>{getCompanyIntention(theInformation.businessGlossoryId)}</span>
  1307. </FormItem>
  1308. <FormItem className="half-item"
  1309. {...formItemLayout}
  1310. label="意向时间"
  1311. >
  1312. <span>{theInformation.createTime}</span>
  1313. </FormItem>
  1314. <FormItem className="half-item"
  1315. {...formItemLayout}
  1316. label="客户名称"
  1317. >
  1318. <span>{theInformation.identifyName}</span>
  1319. </FormItem>
  1320. <FormItem className="half-item"
  1321. {...formItemLayout}
  1322. label="营销员"
  1323. >
  1324. <span>{theInformation.adminName}</span>
  1325. </FormItem>
  1326. <FormItem className="half-item"
  1327. {...formItemLayout}
  1328. label="意向进度"
  1329. >
  1330. <Select placeholder="意向进度" value={this.state.followSituation}
  1331. onChange={(e) => { this.setState({ followSituation: e }) }}>
  1332. {
  1333. newFollow.map(function (item) {
  1334. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1335. })
  1336. }
  1337. </Select>
  1338. </FormItem>
  1339. <FormItem className="half-item"
  1340. {...formItemLayout}
  1341. label="客户状态"
  1342. >
  1343. <Select placeholder="客户状态" value={this.state.customerStatus} disabled={this.state.customerStatus=='6'?true:false}
  1344. onChange={(e) => { this.setState({ customerStatus: e }) }}>
  1345. {
  1346. customerStatus.map(function (item) {
  1347. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1348. })
  1349. }
  1350. </Select>
  1351. </FormItem>
  1352. <div className="clearfix">
  1353. <FormItem
  1354. labelCol={{ span: 4 }}
  1355. wrapperCol={{ span: 16 }}
  1356. label="意向说明" >
  1357. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
  1358. onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>
  1359. </FormItem>
  1360. </div>
  1361. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'160px',marginBottom:'30px'}}>保存</Button>
  1362. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  1363. </div>
  1364. <div className="clearfix">
  1365. <div style={{fontSize:'18px',marginLeft:'40px',marginBottom:'20px'}}>业务跟进</div>
  1366. <div className="clearfix" style={{paddingLeft:'40px',paddingRight:'40px'}}>
  1367. <Spin spinning={this.state.loading}>
  1368. <Table
  1369. pagination={this.state.paginations}
  1370. columns={this.state.businessFollowList}
  1371. dataSource={this.state.visitArrList}
  1372. onRowClick={this.followRowClick}
  1373. />
  1374. </Spin>
  1375. </div>
  1376. </div>
  1377. </Spin>
  1378. </Form>
  1379. </Modal>
  1380. <Modal
  1381. footer=''
  1382. width='800px'
  1383. title="新增联系人"
  1384. visible={this.state.addcontactModul}
  1385. onOk={this.addcontactModulOK}
  1386. onCancel={this.addcontactModulcancel}
  1387. >
  1388. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  1389. <Spin spinning={this.state.loading}>
  1390. <Row>
  1391. <FormItem
  1392. labelCol={{ span: 3 }}
  1393. wrapperCol={{ span: 14 }}
  1394. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  1395. <Radio.Group value={this.state.newsex} onChange={(e) => {
  1396. this.setState({ newsex: e.target.value })
  1397. }}>
  1398. <Radio value='男'>男</Radio>
  1399. <Radio value='女'>女</Radio>
  1400. </Radio.Group>
  1401. </FormItem>
  1402. </Row>
  1403. <Row style={{ paddingLeft:'50px' }}>
  1404. <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
  1405. <Col span={8}>
  1406. <Input value={this.state.newname} required="required"
  1407. onChange={(e) => { this.setState({ newname: e.target.value }) }} />
  1408. </Col>
  1409. <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
  1410. <Col span={8}>
  1411. <Input value={this.state.newmobile} required="required"
  1412. onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
  1413. </Col>
  1414. </Row>
  1415. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1416. <Col span={2}>微信:</Col>
  1417. <Col span={8}>
  1418. <Input value={this.state.newwechat}
  1419. onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
  1420. </Col>
  1421. <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
  1422. <Col span={8}>
  1423. <Input value={this.state.newqq}
  1424. onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
  1425. </Col>
  1426. </Row>
  1427. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  1428. <Col span={2}>部门:</Col>
  1429. <Col span={8}>
  1430. <Input value={this.state.newdepatrment}
  1431. onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
  1432. </Col>
  1433. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  1434. <Col span={8}>
  1435. <Input value={this.state.newposition}
  1436. onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
  1437. </Col>
  1438. </Row>
  1439. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1440. <Col span={2}>邮箱:</Col>
  1441. <Col span={8}>
  1442. <Input value={this.state.newemail}
  1443. onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
  1444. </Col>
  1445. </Row>
  1446. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  1447. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  1448. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  1449. </Row>
  1450. </Spin>
  1451. </Form>
  1452. </Modal>
  1453. <Modal
  1454. footer=''
  1455. title="业务跟进详情"
  1456. width='1000px'
  1457. visible={this.state.businessFollowModul}
  1458. onOk={this.businessFollowOk}
  1459. onCancel={this.businessFollowCancel}
  1460. >
  1461. <div className="clearfix">
  1462. <Form horizontal id="demand-form" onSubmit={this.addlistSubmit}>
  1463. <Spin spinning={this.state.loading}>
  1464. <div className="clearfix">
  1465. <FormItem className="half-item"
  1466. {...formItemLayout}
  1467. label="意向名称"
  1468. >
  1469. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  1470. </FormItem>
  1471. <FormItem className="half-item"
  1472. {...formItemLayout}
  1473. >
  1474. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1475. </FormItem>
  1476. <FormItem className="half-item"
  1477. {...formItemLayout}
  1478. label="意向时间"
  1479. >
  1480. <span>{this.state.createTime}</span>
  1481. </FormItem>
  1482. <FormItem className="half-item"
  1483. {...formItemLayout}
  1484. label="客户名称"
  1485. >
  1486. <span>{this.state.identifyName}</span>
  1487. </FormItem>
  1488. <FormItem className="half-item"
  1489. {...formItemLayout}
  1490. label="营销员"
  1491. >
  1492. <span>{this.state.adminName}</span>
  1493. </FormItem>
  1494. <FormItem className="half-item"
  1495. {...formItemLayout}
  1496. label="意向进度"
  1497. >
  1498. <Select placeholder="意向进度" value={this.state.followSituationV}
  1499. onChange={(e) => { this.setState({ followSituationV: e }) }}>
  1500. {
  1501. newFollow.map(function (item) {
  1502. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1503. })
  1504. }
  1505. </Select>
  1506. </FormItem>
  1507. <FormItem className="half-item"
  1508. {...formItemLayout}
  1509. label="客户状态"
  1510. >
  1511. <Select placeholder="客户状态" value={this.state.customerStatusV}
  1512. onChange={(e) => { this.setState({ customerStatusV: e }) }}>
  1513. {
  1514. customerStatus.map(function (item) {
  1515. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1516. })
  1517. }
  1518. </Select>
  1519. </FormItem>
  1520. <div className="clearfix">
  1521. <FormItem
  1522. labelCol={{ span: 4 }}
  1523. wrapperCol={{ span: 16 }}
  1524. label="意向说明" >
  1525. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarksV}
  1526. onChange={(e) => { this.setState({ remarksV: e.target.value }) }}/>
  1527. </FormItem>
  1528. </div>
  1529. <div style={{fontSize:'18px',marginLeft:'30px'}}>拜访情况</div>
  1530. <div className="clearfix">
  1531. <FormItem className="half-item"
  1532. labelCol={{ span: 8 }}
  1533. wrapperCol={{ span: 16 }}
  1534. label="拜访方式" >
  1535. <Radio.Group value={this.state.contactTypeV} onChange={(e) => {
  1536. this.setState({ contactTypeV: e.target.value })
  1537. }}>
  1538. <Radio value={0}>外出</Radio>
  1539. <Radio value={1}>电话</Radio>
  1540. <Radio value={2}>QQ</Radio>
  1541. <Radio value={3}>微信</Radio>
  1542. <Radio value={4}>邮箱</Radio>
  1543. </Radio.Group>
  1544. </FormItem>
  1545. </div>
  1546. <FormItem className="half-item"
  1547. {...formItemLayout}
  1548. label="联系人"
  1549. >
  1550. <Select placeholder="联系人姓名" style={{ width: 140 }}
  1551. value={this.state.lastName}
  1552. onChange={this.hundleName}>
  1553. {this.state.orderStatusOption}
  1554. </Select>
  1555. </FormItem>
  1556. <FormItem className="half-item"
  1557. {...formItemLayout}
  1558. label="当前联系人"
  1559. >
  1560. <span>{this.state.contacts}</span>
  1561. </FormItem>
  1562. <FormItem className="half-item"
  1563. {...formItemLayout}
  1564. label="联系电话"
  1565. >
  1566. <span>{this.state.nub}</span>
  1567. </FormItem>
  1568. <div className="clearfix">
  1569. <FormItem className="half-item"
  1570. {...formItemLayout}
  1571. label="拜访人"
  1572. >
  1573. <span>{this.state.adminName}</span>
  1574. </FormItem>
  1575. <FormItem className="half-item"
  1576. {...formItemLayout}
  1577. label="拜访时间" >
  1578. <span>{this.state.followTime}</span>
  1579. </FormItem>
  1580. </div>
  1581. <div className="clearfix">
  1582. <FormItem
  1583. labelCol={{ span: 4 }}
  1584. wrapperCol={{ span: 16 }}
  1585. label="拜访备注" >
  1586. <Input type="textarea" rows={4} value={this.state.resultV} placeholder="来电备注"
  1587. onChange={(e) => { this.setState({ resultV: e.target.value }); }}/>
  1588. </FormItem>
  1589. </div>
  1590. </div>
  1591. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 160px'}}>保存</Button>
  1592. <Button size="large" onClick={this.businessFollowCancel}>取消</Button>
  1593. </Spin>
  1594. </Form>
  1595. </div>
  1596. </Modal>
  1597. </div >
  1598. );
  1599. }
  1600. }));
  1601. export default MyBusiness;