myBusiness.jsx 66 KB

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