myBusiness.jsx 59 KB

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