businessManges.jsx 66 KB

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