myBusiness.jsx 65 KB

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