businessManges.jsx 66 KB

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