myBusiness.jsx 66 KB

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