myBusiness.jsx 67 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. });
  56. };
  57. };
  58. this.state.pagination.current = data.data.pageNo;
  59. this.state.pagination.total = data.data.totalCount;
  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. addcontactModul:true
  499. });
  500. },
  501. //新增联系人保存函数
  502. submitcontactman(e){
  503. e.preventDafault();
  504. this.props.form.validateFields((err, values) => {
  505. if (!err) {
  506. this.setState({
  507. loading: true
  508. });
  509. $.ajax({
  510. method: "POST",
  511. dataType: "json",
  512. crossDomain: false,
  513. url: globalConfig.context + '/api/admin/customer/addContacter',
  514. data: {
  515. cid: deletedIds,//编号id
  516. sex:this.state.hott,//性别
  517. primaryFlg:this.state.hotst,//是否是主要联系人
  518. name:this.state.paymentIdt,//联系人姓名
  519. mobile:this.state.paymt,//座机
  520. telNum:this.state.payt,//电话
  521. qq:this.state.entIdt,//qq
  522. wechat:this.state.payIdt,//微信
  523. customerPosition:this.state.paentIdt,//职位
  524. depatrment:this.state.paytIdtt,//部门
  525. email:this.state.emailst,//邮箱
  526. }
  527. }).done(function (data) {
  528. this.setState({
  529. loading: false
  530. });
  531. if (!data.error.length) {
  532. message.success('保存成功!');
  533. this.setModal2Visiblecancel()
  534. } else {
  535. message.warning(data.error[0].message);
  536. }
  537. this.getNewWoman(this.state.khId);
  538. }.bind(this));
  539. }
  540. });
  541. },
  542. //跟进
  543. addModify(e) {
  544. this.addTime();
  545. this.HttpFollowUp(e.businessId);
  546. this.state.keys=true;
  547. this.setState({
  548. showDesc: true,
  549. });
  550. },
  551. //当选择联系人的列表变化时,则执行
  552. hundleName(e){
  553. let changNub=this.state.telNum[e];
  554. this.setState({
  555. nub:this.state.telNum[e],
  556. lastName: e,
  557. });
  558. },
  559. //新建保存
  560. addSubmit(e){
  561. e.preventDefault();
  562. if(this.state.businessGlossoryId==undefined){
  563. message.warning('请选择业务意向')
  564. return false;
  565. }
  566. if(!this.state.businessId){
  567. if(!this.state.theTypes){
  568. message.warning('客户名为空或不存在')
  569. return false;
  570. }
  571. }
  572. if(this.state.contactType==undefined){
  573. message.warning('请选择联系方式')
  574. return false;
  575. }
  576. if(this.state.lastName==undefined){
  577. message.warning('请选择联系人')
  578. return false;
  579. }
  580. this.props.form.validateFields((err, values) => {
  581. if (!err) {
  582. this.setState({
  583. loading: true
  584. });
  585. let conts=this.state.lastName;
  586. let contactsId= this.state.contactsIdArr[conts].id;
  587. $.ajax({
  588. method: "post",
  589. dataType: "json",
  590. crossDomain: false,
  591. url:!this.state.keys?globalConfig.context + '/api/admin/customer/addBusinessAndFollow':globalConfig.context + '/api/admin/customer/addFollowOneBusiness ',
  592. data:!this.state.businessId?{
  593. uid:this.state.khId,
  594. businessGlossoryId: this.state.businessGlossoryId,
  595. followSituation:this.state.followSituation,
  596. customerStatus: this.state.customerStatus,
  597. contactType: this.state.contactType,
  598. ocbId: contactsId,
  599. createTime:this.state.createYear+''+this.state.creatMent,
  600. followTime:this.state.followTime,
  601. remarks: this.state.remarks,
  602. result: this.state.result,
  603. }:{
  604. uid:this.state.uids,
  605. businessId:this.state.businessId,
  606. businessGlossoryId: this.state.businessGlossoryId,
  607. followSituation:this.state.followSituation,
  608. customerStatus: this.state.customerStatus,
  609. contactType: this.state.contactType,
  610. ocbId: contactsId,
  611. followTime:this.state.followTime,
  612. remarks: this.state.remarks,
  613. result: this.state.result,
  614. }
  615. }).done(function (data) {
  616. this.setState({
  617. loading: false
  618. });
  619. if (!data.error.length) {
  620. message.success('保存成功!');
  621. this.addClickCancel();
  622. this.loadData();
  623. this.state.businessId='';
  624. } else {
  625. message.warning(data.error[0].message);
  626. }
  627. }.bind(this));
  628. }
  629. });
  630. },
  631. //列表保存
  632. addlistSubmit(e){
  633. e.preventDefault();
  634. this.props.form.validateFields((err, values) => {
  635. if (!err) {
  636. this.setState({
  637. loading: true
  638. });
  639. let conts=this.state.lastName;
  640. let contactsId= conts?this.state.contactsIdArr[conts].id:'';
  641. $.ajax({
  642. method: "post",
  643. dataType: "json",
  644. crossDomain: false,
  645. url:globalConfig.context + '/api/admin/customer/updateFollowOneBusiness',
  646. data:{
  647. ufbId:this.state.ufbIds,
  648. followId:this.state.followId,
  649. customerStatus: this.state.customerStatus,
  650. followSituation:this.state.followSituation,
  651. contactType: this.state.contactType,
  652. ocbId:contactsId,
  653. remarks: this.state.remarks,
  654. result: this.state.result,
  655. }
  656. }).done(function (data) {
  657. this.setState({
  658. loading: false
  659. });
  660. if (!data.error.length) {
  661. message.success('保存成功!');
  662. this.businessFollowCancel();
  663. this.loadVisit()
  664. } else {
  665. message.warning(data.error[0].message);
  666. }
  667. }.bind(this));
  668. }
  669. });
  670. },
  671. //进入修改时
  672. listFollowUp(e){
  673. $.ajax({
  674. method: "get",
  675. dataType: "json",
  676. crossDomain: false,
  677. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  678. data:{
  679. ufbId:e.ufbId
  680. },
  681. success: function (data) {
  682. let thedata=data.data;
  683. if (!thedata) {
  684. if (data.error && data.error.length) {
  685. message.warning(data.error[0].message);
  686. };
  687. thedata = {};
  688. };
  689. this.setState({
  690. businessGlossoryId:thedata.businessGlossoryId,
  691. followSituation:thedata.followSituation,
  692. customerStatus:thedata.customerStatus,
  693. followTime:thedata.followTime,
  694. createTime:thedata.createTime,
  695. identifyName:thedata.identifyName,
  696. contactType:parseInt(thedata.contactType),
  697. result:thedata.result,
  698. remarks:thedata.remarks,
  699. adminName:thedata.adminName,
  700. contacts:thedata.contacts,
  701. contactMobile:thedata.contactMobile,
  702. ufbId:thedata.ufbId,
  703. followId:thedata.followId,
  704. });
  705. }.bind(this),
  706. }).always(function () {
  707. this.getNewWoman(this.state.uids)
  708. this.setState({
  709. ufbIds:e.ufbId,
  710. loading: false
  711. });
  712. }.bind(this));
  713. },
  714. //新建HTTP获取数据
  715. addTime(){
  716. $.ajax({
  717. method: "get",
  718. dataType: "json",
  719. crossDomain: false,
  720. url: globalConfig.context + "/api/admin/customer/toAddBusinessAndFollow",
  721. data:{
  722. },
  723. success: function (data) {
  724. let theArr = [];
  725. let thedata=data.data;
  726. if (!thedata) {
  727. if (data.error && data.error.length) {
  728. message.warning(data.error[0].message);
  729. };
  730. thedata = {};
  731. };
  732. let creatMent=thedata.createTime.substr(10,9);
  733. let createYear=thedata.createTime.substr(0,10);
  734. this.setState({
  735. createTime:thedata.createTime,
  736. creatMent:creatMent,
  737. createYear:createYear,
  738. followTime:thedata.followTime,
  739. adminName: thedata.adminName,
  740. });
  741. }.bind(this),
  742. }).always(function () {
  743. this.setState({
  744. loading: false
  745. });
  746. }.bind(this));
  747. },
  748. //客户名称初始加载
  749. customerList(e){
  750. $.ajax({
  751. method: "get",
  752. dataType: "json",
  753. crossDomain: false,
  754. url: globalConfig.context + "/api/admin/customer/findCustomerByName",
  755. data:{
  756. name:e
  757. },
  758. success: function (data) {
  759. let thedata=data.data;
  760. if (!thedata) {
  761. if (data.error && data.error.length) {
  762. message.warning(data.error[0].message);
  763. };
  764. thedata = {};
  765. };
  766. this.setState({
  767. customerArr:thedata,
  768. });
  769. }.bind(this),
  770. }).always(function () {
  771. this.setState({
  772. loading: false
  773. });
  774. }.bind(this));
  775. },
  776. //值改变时请求客户名称
  777. httpChange(e){
  778. if(e.length>=2){
  779. this.customerList(e);
  780. }
  781. },
  782. //选择值时值匹配及联系人函数加载
  783. autoChange(e){
  784. let theType='';
  785. let contactLists=this.state.customerArr||[];
  786. if (e) {
  787. contactLists.map(function (item) {
  788. if (item.name == e.toString()) {
  789. theType = item.id;
  790. }
  791. });
  792. }
  793. this.setState({
  794. khId:theType
  795. })
  796. this.getNewWoman(theType)
  797. },
  798. //客户输入框失去焦点是判断客户是否存在
  799. blurChange(e){
  800. let theType='';
  801. let contactLists=this.state.customerArr||[];
  802. if (e) {
  803. contactLists.map(function (item) {
  804. if (item.name == e.toString()) {
  805. theType = item.id;
  806. }
  807. });
  808. }
  809. this.setState({
  810. theTypes:theType
  811. })
  812. },
  813. //点击跟进时数据处理
  814. HttpFollowUp(e){
  815. $.ajax({
  816. method: "get",
  817. dataType: "json",
  818. crossDomain: false,
  819. url: globalConfig.context + "/api/admin/customer/toAddFollowOneBusiness",
  820. data:{
  821. businessId:e
  822. },
  823. success: function (data) {
  824. let thedata=data.data;
  825. if (!thedata) {
  826. if (data.error && data.error.length) {
  827. message.warning(data.error[0].message);
  828. };
  829. thedata = {};
  830. };
  831. this.setState({
  832. uids:thedata.uid,
  833. businessId:thedata.businessId,
  834. businessGlossoryId:thedata.businessGlossoryId,
  835. followSituation:thedata.followSituation,
  836. customerStatus:thedata.customerStatus,
  837. followTime:thedata.followTime,
  838. createTime:thedata.createTime,
  839. identifyName:thedata.identifyName,
  840. contactType:undefined,
  841. result:'',
  842. remarks:'',
  843. });
  844. }.bind(this),
  845. }).always(function () {
  846. this.getNewWoman(this.state.uids)
  847. this.setState({
  848. loading: false
  849. });
  850. }.bind(this));
  851. },
  852. //获取联系人下拉框
  853. getNewWoman(ids) {
  854. this.state.data = []
  855. $.ajax({
  856. method: "get",
  857. dataType: "json",
  858. crossDomain: false,
  859. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  860. data:{
  861. uid:ids,
  862. },
  863. success: function (data) {
  864. let theArr = [];
  865. let thedata=data.data;
  866. if (!thedata) {
  867. if (data.error && data.error.length) {
  868. message.warning(data.error[0].message);
  869. };
  870. thedata = {};
  871. };
  872. var telNum=[];
  873. var contactIds=[];
  874. thedata.map(function (item,index) {
  875. telNum.push(thedata[index].mobile);
  876. });
  877. for (let item in data.data) {
  878. let theData = data.data[item];
  879. theArr.push(
  880. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  881. );
  882. };
  883. this.setState({
  884. contactsIdArr:thedata,
  885. telNum:telNum,
  886. orderStatusOption: theArr,
  887. });
  888. }.bind(this),
  889. }).always(function () {
  890. this.setState({
  891. loading: false
  892. });
  893. }.bind(this));
  894. },
  895. //获取拜访详情ajax
  896. loadVisit(pageNo) {
  897. this.setState({
  898. loading: true
  899. });
  900. $.ajax({
  901. method: "get",
  902. dataType: "json",
  903. crossDomain: false,
  904. url:globalConfig.context + '/api/admin/customer/listFollowHistory',
  905. data: {
  906. pageNo: pageNo || 1,
  907. pageSize: this.state.paginations.pageSize,
  908. uid: this.state.uids, //名称1
  909. businessGlossoryId:this.state.businessGlossoryId,
  910. },
  911. success: function (data) {
  912. let theArr = [];
  913. if (data.error.length || data.data.list=="") {
  914. if (data.error && data.error.length) {
  915. message.warning(data.error[0].message);
  916. };
  917. } else {
  918. for (let i = 0; i < data.data.list.length; i++) {
  919. let thisdata = data.data.list[i];
  920. theArr.push({
  921. followId:thisdata.followId,
  922. followTime:thisdata.followTime,
  923. identifyName:thisdata.identifyName,
  924. contacts:thisdata.contacts,
  925. contactMobile:thisdata.contactMobile,
  926. result:thisdata.result,
  927. ufbId:thisdata.ufbId,
  928. adminName:thisdata.adminName,
  929. followSituation:thisdata.followSituation,
  930. customerStatus:thisdata.customerStatus,
  931. contactType:thisdata.contactType
  932. });
  933. };
  934. this.state.paginations.current = data.data.pageNo;
  935. this.state.paginations.total = data.data.totalCount;
  936. };
  937. this.setState({
  938. visitArrList: theArr,
  939. paginations: this.state.paginations
  940. });
  941. }.bind(this),
  942. }).always(function () {
  943. this.setState({
  944. loading: false
  945. });
  946. }.bind(this));
  947. },
  948. componentWillReceiveProps(nextProps) {
  949. if (!this.props.visible && nextProps.visible) {
  950. if (nextProps.data && nextProps.data.id) {
  951. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  952. };
  953. this.state.data = {};
  954. this.state.companyLogoUrl = [];
  955. this.state.orgCodeUrl = [];
  956. };
  957. },
  958. tableRowClick(record, index) {
  959. this.state.RowData = record;
  960. this.detailsModalOk(record);
  961. this.setState({
  962. selectedRowKeys:[],
  963. rowId:record.businessId,
  964. })
  965. },
  966. followRowClick(record, index) {
  967. console.log(record)
  968. this.state.RowData = record;
  969. this.listFollowUp(record);
  970. this.setState({
  971. businessFollowModul: true,
  972. selectedRowKeys:[],
  973. });
  974. },
  975. render() {
  976. const FormItem = Form.Item
  977. const rowSelection = {
  978. selectedRowKeys: this.state.selectedRowKeys,
  979. onChange: (selectedRowKeys, selectedRows) => {
  980. this.setState({
  981. selectedRows: selectedRows.slice(-1),
  982. selectedRowKeys: selectedRowKeys.slice(-1)
  983. });
  984. },
  985. onSelect: (recordt, selected, selectedRows) => {
  986. this.setState({
  987. recordt:recordt.id
  988. })
  989. },
  990. };
  991. const rowSelections = {
  992. selectedRowKeys: this.state.selectedRowKey,
  993. onChange: (selectedRowKey, selectedRow) => {
  994. this.setState({
  995. selectedRow: selectedRow.slice(-1),
  996. selectedRowKey: selectedRowKey.slice(-1)
  997. });
  998. },
  999. onSelect: (records, selected, selectedRow) => {
  1000. this.setState({
  1001. selectedRow: selectedRow.slice(-1),
  1002. records:records.id,
  1003. })
  1004. },
  1005. };
  1006. const hasSelected = this.state.selectedRowKeys.length > 0;
  1007. const { RangePicker } = DatePicker;
  1008. const { getFieldDecorator } = this.props.form;
  1009. const formItemLayout = {
  1010. labelCol: { span: 8 },
  1011. wrapperCol: { span: 14 },
  1012. };
  1013. const theInformation=this.state.dataInformation || {}
  1014. const contactsOption="";
  1015. const formItemLayput = {
  1016. labelCol: { span: 10 },
  1017. wrapperCol: { span: 14 },
  1018. };
  1019. const businessIds=this.state.businessId||'';
  1020. const dataSources=this.state.customerArr || [];
  1021. const options = dataSources.map((group) =>
  1022. <Option key={group.id} value={group.name}>{group.name}</Option>
  1023. )
  1024. return (
  1025. <div className="user-content" >
  1026. <div className="content-title">
  1027. <span>我的业务</span>
  1028. </div>
  1029. <div className="user-search">
  1030. <Input placeholder="客户名称"
  1031. value={this.state.identifyNameS}
  1032. onChange={(e) => { this.setState({ identifyNameS: e.target.value }); }} />
  1033. <Select placeholder="服务意向" value={this.state.businessIdS} onChange={(e) => {
  1034. this.setState({businessIdS:e})}} style={{width:'150px'}}>
  1035. {
  1036. intentionalService.map(function (item) {
  1037. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1038. })
  1039. }
  1040. </Select>
  1041. <Button type="primary" onClick={this.search}>搜索</Button>
  1042. <Button onClick={this.reset}>重置</Button>
  1043. <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  1044. <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
  1045. disabled={!hasSelected}
  1046. >删除<Icon type="minus" />
  1047. </Button>
  1048. </Popconfirm>
  1049. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1050. <Button type="primary" className="addButton" onClick={this.addClick}>新增业务<Icon type="plus" /></Button>
  1051. <div className='clearfix' style={{marginTop:'5px'}}>
  1052. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1053. <RangePicker
  1054. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1055. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1056. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1057. <Select placeholder="客户状态"
  1058. style={{ width: 150 }}
  1059. value={this.state.customerStatusS}
  1060. onChange={(e) => { this.setState({ customerStatusS: e }) }}>
  1061. <Select.Option value="0" >正常</Select.Option>
  1062. <Select.Option value="2" >锁定</Select.Option>
  1063. </Select>
  1064. <Select placeholder="业务进度"
  1065. style={{ width: 150 }}
  1066. value={this.state.followSituationS}
  1067. onChange={(e) => { this.setState({ followSituationS: e }) }}>
  1068. {this.state.intentionalOption}
  1069. </Select>
  1070. <Input placeholder="营销员" style={{width:'150px'}}
  1071. value={this.state.adminNameS}
  1072. onChange={(e) => { this.setState({ adminNameS: e.target.value }); }} />
  1073. </div>
  1074. </div>
  1075. </div>
  1076. <div className="patent-table">
  1077. <Spin spinning={this.state.loading}>
  1078. <Table columns={this.state.columns}
  1079. dataSource={this.state.dataSource}
  1080. rowSelection={rowSelection}
  1081. pagination={this.state.pagination}
  1082. onRowClick={this.tableRowClick}
  1083. />
  1084. </Spin>
  1085. </div>
  1086. <Modal
  1087. footer=''
  1088. title="我的业务"
  1089. width='1000px'
  1090. visible={this.state.showDesc}
  1091. onOk={this.addClickOk}
  1092. onCancel={this.addClickCancel}
  1093. >
  1094. <Form horizontal id="demand-form" onSubmit={this.addSubmit}>
  1095. <Spin spinning={this.state.loading}>
  1096. <div className="clearfix">
  1097. {businessIds!=''?<div><FormItem className="half-item"
  1098. {...formItemLayout}
  1099. label="意向名称"
  1100. >
  1101. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  1102. </FormItem>
  1103. <FormItem className="half-item"
  1104. {...formItemLayout}
  1105. >
  1106. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1107. </FormItem>
  1108. <FormItem className="half-item"
  1109. {...formItemLayout}
  1110. label="意向时间"
  1111. >
  1112. <span>{this.state.createTime}</span>
  1113. </FormItem>
  1114. <FormItem className="half-item"
  1115. {...formItemLayout}
  1116. label="客户名称"
  1117. >
  1118. <span>{this.state.identifyName}</span>
  1119. </FormItem></div>
  1120. :<div><FormItem className="half-item"
  1121. {...formItemLayout}
  1122. label="意向名称"
  1123. >
  1124. <Select placeholder="服务意向名称" value={this.state.businessGlossoryId} onChange={(e) => {
  1125. this.setState({businessGlossoryId:e})}} style={{width:'150px'}}>
  1126. {
  1127. intentionalService.map(function (item) {
  1128. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1129. })
  1130. }
  1131. </Select>
  1132. <span style={{color:'red'}}> *</span>
  1133. </FormItem>
  1134. <FormItem className="half-item"
  1135. {...formItemLayout}
  1136. >
  1137. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1138. </FormItem>
  1139. <div className="clearfix">
  1140. <FormItem className="half-item"
  1141. {...formItemLayout}
  1142. label="意向时间" >
  1143. <DatePicker placeholder="更新日期" value={moment(this.state.createYear,'YYYY-MM-DD')} onChange={(time) => {this.setState({createYear: time});}}/>
  1144. <TimePicker placeholder="更新时间" value={moment(this.state.creatMent, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMent: time}); }}/>
  1145. </FormItem>
  1146. <FormItem className="half-item"
  1147. {...formItemLayout}
  1148. label="客户名称"
  1149. >
  1150. <AutoComplete
  1151. className="certain-category-search"
  1152. dropdownClassName="certain-category-search-dropdown"
  1153. dropdownMatchSelectWidth={false}
  1154. dropdownStyle={{ width: 300 }}
  1155. size="large"
  1156. style={{ width: '200px' }}
  1157. dataSource={options}
  1158. placeholder="输入名称"
  1159. optionLabelProp="value"
  1160. onChange={this.httpChange}
  1161. onSelect={this.autoChange}
  1162. filterOption={true}
  1163. onBlur={this.blurChange}
  1164. >
  1165. <Input style={{width:'200px'}}/>
  1166. </AutoComplete>
  1167. <span style={{color:'red'}}> *</span>
  1168. </FormItem>
  1169. </div>
  1170. </div>
  1171. }
  1172. <FormItem className="half-item"
  1173. {...formItemLayout}
  1174. label="营销员"
  1175. >
  1176. <span>{this.state.adminName}</span>
  1177. </FormItem>
  1178. <FormItem className="half-item"
  1179. {...formItemLayout}
  1180. label="意向进度"
  1181. >
  1182. <Select placeholder="意向进度" value={this.state.followSituation}
  1183. onChange={(e) => { this.setState({ followSituation: e }) }}>
  1184. {
  1185. newFollow.map(function (item) {
  1186. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1187. })
  1188. }
  1189. </Select>
  1190. </FormItem>
  1191. <FormItem className="half-item"
  1192. {...formItemLayout}
  1193. label="客户状态"
  1194. >
  1195. <Select placeholder="客户状态" value={this.state.customerStatus}
  1196. onChange={(e) => { this.setState({ customerStatus: e }) }}>
  1197. {
  1198. customerStatus.map(function (item) {
  1199. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1200. })
  1201. }
  1202. </Select>
  1203. </FormItem>
  1204. <div className="clearfix">
  1205. <FormItem
  1206. labelCol={{ span: 4 }}
  1207. wrapperCol={{ span: 16 }}
  1208. label="意向说明" >
  1209. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
  1210. onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>
  1211. </FormItem>
  1212. </div>
  1213. <div style={{fontSize:'18px',marginLeft:'30px'}}>拜访情况</div>
  1214. <div className="clearfix">
  1215. <FormItem className="half-item"
  1216. labelCol={{ span: 8 }}
  1217. wrapperCol={{ span: 16 }}
  1218. label="拜访方式" >
  1219. <Radio.Group value={this.state.contactType} onChange={(e) => {
  1220. this.setState({ contactType: e.target.value })
  1221. }}>
  1222. <Radio value={0}>外出</Radio>
  1223. <Radio value={1}>电话</Radio>
  1224. <Radio value={2}>QQ</Radio>
  1225. <Radio value={3}>微信</Radio>
  1226. <Radio value={4}>邮箱</Radio>
  1227. </Radio.Group>
  1228. </FormItem>
  1229. </div>
  1230. <FormItem className="half-item"
  1231. {...formItemLayout}
  1232. label="联系人"
  1233. >
  1234. <Select placeholder="联系人姓名" style={{ width: 140 }}
  1235. value={this.state.lastName}
  1236. onChange={this.hundleName}>
  1237. {this.state.orderStatusOption}
  1238. </Select>
  1239. </FormItem>
  1240. <FormItem className="half-item"
  1241. {...formItemLayout}
  1242. label="联系电话"
  1243. >
  1244. <span>{this.state.nub}</span>
  1245. </FormItem>
  1246. <div className="clearfix">
  1247. <FormItem className="half-item"
  1248. {...formItemLayout}
  1249. label="拜访人"
  1250. >
  1251. <span>{this.state.adminName}</span>
  1252. </FormItem>
  1253. <FormItem className="half-item"
  1254. {...formItemLayout}
  1255. label="拜访时间" >
  1256. <span>{this.state.followTime}</span>
  1257. </FormItem>
  1258. </div>
  1259. <div className="clearfix">
  1260. <FormItem
  1261. labelCol={{ span: 4 }}
  1262. wrapperCol={{ span: 16 }}
  1263. label="拜访备注" >
  1264. <Input type="textarea" rows={4} value={this.state.result} placeholder="来电备注"
  1265. onChange={(e) => { this.setState({ result: e.target.value }); }}/>
  1266. </FormItem>
  1267. </div>
  1268. </div>
  1269. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 160px'}}>保存</Button>
  1270. <Button size="large" onClick={this.addClickCancel}>取消</Button>
  1271. </Spin>
  1272. </Form>
  1273. </Modal>
  1274. <Modal
  1275. className="customeDetails"
  1276. title="我的业务意向详情"
  1277. width='1000px'
  1278. visible={this.state.modal5Visible}
  1279. onOk={this.detailsModal}
  1280. onCancel={this.detailsModal}
  1281. footer=''
  1282. >
  1283. <Form horizontal onSubmit={this.newSubmit} id="demand-form">
  1284. <Spin spinning={this.state.loading}>
  1285. <div className="clearfix">
  1286. <FormItem className="half-item"
  1287. {...formItemLayout}
  1288. label="意向名称"
  1289. >
  1290. <span>{getCompanyIntention(theInformation.businessGlossoryId)}</span>
  1291. </FormItem>
  1292. <FormItem className="half-item"
  1293. {...formItemLayout}
  1294. label="意向时间"
  1295. >
  1296. <span>{theInformation.createTime}</span>
  1297. </FormItem>
  1298. <FormItem className="half-item"
  1299. {...formItemLayout}
  1300. label="客户名称"
  1301. >
  1302. <span>{theInformation.identifyName}</span>
  1303. </FormItem>
  1304. <FormItem className="half-item"
  1305. {...formItemLayout}
  1306. label="营销员"
  1307. >
  1308. <span>{theInformation.adminName}</span>
  1309. </FormItem>
  1310. <FormItem className="half-item"
  1311. {...formItemLayout}
  1312. label="意向进度"
  1313. >
  1314. <Select placeholder="意向进度" value={this.state.followSituation}
  1315. onChange={(e) => { this.setState({ followSituation: e }) }}>
  1316. {
  1317. newFollow.map(function (item) {
  1318. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1319. })
  1320. }
  1321. </Select>
  1322. </FormItem>
  1323. <FormItem className="half-item"
  1324. {...formItemLayout}
  1325. label="客户状态"
  1326. >
  1327. <Select placeholder="客户状态" value={this.state.customerStatus}
  1328. onChange={(e) => { this.setState({ customerStatus: e }) }}>
  1329. {
  1330. customerStatus.map(function (item) {
  1331. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1332. })
  1333. }
  1334. </Select>
  1335. </FormItem>
  1336. <div className="clearfix">
  1337. <FormItem
  1338. labelCol={{ span: 4 }}
  1339. wrapperCol={{ span: 16 }}
  1340. label="意向说明" >
  1341. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
  1342. onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>
  1343. </FormItem>
  1344. </div>
  1345. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'160px',marginBottom:'30px'}}>保存</Button>
  1346. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  1347. </div>
  1348. <div className="clearfix">
  1349. <div style={{fontSize:'18px',marginLeft:'40px',marginBottom:'20px'}}>业务跟进</div>
  1350. <div className="clearfix" style={{paddingLeft:'40px',paddingRight:'40px'}}>
  1351. <Spin spinning={this.state.loading}>
  1352. <Table
  1353. pagination={this.state.paginations}
  1354. columns={this.state.businessFollowList}
  1355. dataSource={this.state.visitArrList}
  1356. onRowClick={this.followRowClick}
  1357. />
  1358. </Spin>
  1359. </div>
  1360. </div>
  1361. </Spin>
  1362. </Form>
  1363. </Modal>
  1364. <Modal
  1365. footer=''
  1366. width='800px'
  1367. title="新增联系人"
  1368. visible={this.state.addcontactModul}
  1369. onOk={this.addcontactModulOK}
  1370. onCancel={this.addcontactModulcancel}
  1371. >
  1372. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  1373. <Spin spinning={this.state.loading}>
  1374. <Row>
  1375. <FormItem
  1376. labelCol={{ span: 4 }}
  1377. wrapperCol={{ span: 14 }}
  1378. label="是否是主要联系人:" style={{marginRight:'10px'}}>
  1379. <Radio.Group value={this.state.hotst} onChange={(e) => {
  1380. this.setState({ hotst: e.target.value })
  1381. }}>
  1382. <Radio value={0}>是</Radio>
  1383. <Radio value={1}>否</Radio>
  1384. </Radio.Group>
  1385. </FormItem>
  1386. <FormItem
  1387. labelCol={{ span: 4 }}
  1388. wrapperCol={{ span: 14 }}
  1389. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  1390. <Radio.Group value={this.state.hott} onChange={(e) => {
  1391. this.setState({ hott: e.target.value })
  1392. }}>
  1393. <Radio value={0}>男</Radio>
  1394. <Radio value={1}>女</Radio>
  1395. </Radio.Group>
  1396. </FormItem>
  1397. </Row>
  1398. <Row style={{ paddingLeft:'50px' }}>
  1399. <Col span={2}>姓名:</Col>
  1400. <Col span={8}>
  1401. <Input value={this.state.paymentIdt} required="required"
  1402. onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
  1403. </Col>
  1404. <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
  1405. <Col span={8}>
  1406. <Input value={this.state.entIdt}
  1407. onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
  1408. </Col>
  1409. </Row>
  1410. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1411. <Col span={2}>手机号:</Col>
  1412. <Col span={8}>
  1413. <Input value={this.state.payt} required="required"
  1414. onChange={(e) => { this.setState({ payt: e.target.value }) }} />
  1415. </Col>
  1416. <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
  1417. <Col span={8}>
  1418. <Input value={this.state.paymt}
  1419. onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
  1420. </Col>
  1421. </Row>
  1422. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  1423. <Col span={2}>部门:</Col>
  1424. <Col span={8}>
  1425. <Input value={this.state.paytIdtt}
  1426. onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
  1427. </Col>
  1428. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  1429. <Col span={8}>
  1430. <Input value={this.state.paentIdt}
  1431. onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
  1432. </Col>
  1433. </Row>
  1434. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1435. <Col span={2}>微信号:</Col>
  1436. <Col span={8}>
  1437. <Input value={this.state.payIdt}
  1438. onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
  1439. </Col>
  1440. <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
  1441. <Col span={8}>
  1442. <Input value={this.state.emailst}
  1443. onChange={(e) => { this.setState({ emailst: 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.followSituation}
  1499. onChange={(e) => { this.setState({ followSituation: 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.customerStatus}
  1512. onChange={(e) => { this.setState({ customerStatus: 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.remarks}
  1526. onChange={(e) => { this.setState({ remarks: 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.contactType} onChange={(e) => {
  1536. this.setState({ contactType: 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.result} placeholder="来电备注"
  1587. onChange={(e) => { this.setState({ result: 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;