myBusiness.jsx 66 KB

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