myBusiness.jsx 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650
  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/listBusiness',
  24. data: {
  25. pageNo: pageNo || 1,
  26. pageSize: this.state.pagination.pageSize,
  27. businessGlossoryId: this.state.businessIdS, //业务意向
  28. identifyName:this.state.identifyNameS,
  29. followSituation:this.state.followSituationS,
  30. customerStatus:this.state.customerStatusS,
  31. adminName: this.state.adminNameS,
  32. startDate: this.state.releaseDate[0],
  33. endDate: this.state.releaseDate[1],
  34. },
  35. success: function (data) {
  36. let theArr = [];
  37. if (data.error.length || data.data.list=="") {
  38. if (data.error && data.error.length) {
  39. message.warning(data.error[0].message);
  40. };
  41. } else {
  42. for (let i = 0; i < data.data.list.length; i++) {
  43. let thisdata = data.data.list[i];
  44. theArr.push({
  45. key: i,
  46. id: thisdata.id,
  47. businessId:thisdata.businessId,
  48. businessName:thisdata.businessName,
  49. identifyName:thisdata.identifyName,
  50. followSituation:thisdata.followSituation,
  51. customerStatus:thisdata.customerStatus,
  52. customerStatust:thisdata.customerStatus,
  53. adminName:thisdata.adminName,
  54. createTime:thisdata.createTime,
  55. updateTime:thisdata.updateTime,
  56. });
  57. };
  58. this.state.pagination.current = data.data.pageNo;
  59. this.state.pagination.total = data.data.totalCount;
  60. };
  61. if(data.data&&data.data.list&&!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.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. //新增联系人
  486. addcontactModulOK(){
  487. this.setState({
  488. addcontactModul:false
  489. });
  490. },
  491. addcontactModulcancel(){
  492. this.setState({
  493. addcontactModul:false
  494. });
  495. },
  496. businessFollowOk(){
  497. this.setState({
  498. businessFollowModul:false
  499. });
  500. },
  501. businessFollowCancel(){
  502. this.setState({
  503. businessFollowModul:false
  504. });
  505. },
  506. //点击新增详情
  507. newContacts(){
  508. if(this.state.uids||this.state.khId){
  509. this.state.newsex =undefined;
  510. this.state.newname ='';
  511. this.state.newmobile='';
  512. this.state.newwechat='';
  513. this.state.newqq='';
  514. this.state.newdepatrment='';
  515. this.state.newposition='';
  516. this.state.newemail='';
  517. this.setState({
  518. uids:this.state.uids?this.state.uids:this.state.khId,
  519. addcontactModul:true
  520. });
  521. }else{
  522. message.warning('请输入客户名称')
  523. }
  524. },
  525. //新增联系人保存函数
  526. submitcontactman(e){
  527. e.preventDefault();
  528. this.setState({
  529. loading:true
  530. })
  531. $.ajax({
  532. method: "post",
  533. dataType: "json",
  534. crossDomain: false,
  535. url: globalConfig.context + "/api/admin/customer/addOneContact",
  536. data:{
  537. uid:this.state.uids,
  538. name:this.state.newname,
  539. mobile:this.state.newmobile,
  540. email:this.state.newemail,
  541. wechat:this.state.newwechat,
  542. depatrment:this.state.newdepatrment,
  543. position:this.state.newposition,
  544. sex:this.state.newsex,
  545. qq:this.state.newqq
  546. },
  547. success: function (data) {
  548. if (!data.error.length) {
  549. this.addcontactModulOK()
  550. this.getNewWoman(this.state.uids)
  551. this.setState({
  552. loading: false,
  553. })
  554. } else {
  555. message.warning(data.error[0].message);
  556. };
  557. }.bind(this)
  558. });
  559. },
  560. //跟进
  561. addModify(e) {
  562. this.addTime();
  563. this.HttpFollowUp(e.businessId);
  564. this.state.keys=true;
  565. this.setState({
  566. showDesc: true,
  567. });
  568. },
  569. //当选择联系人的列表变化时,则执行
  570. hundleName(e){
  571. let changNub=this.state.telNum[e];
  572. this.setState({
  573. nub:this.state.telNum[e],
  574. lastName: e,
  575. });
  576. },
  577. //新建保存
  578. addSubmit(e){
  579. e.preventDefault();
  580. if(this.state.businessGlossoryId==undefined){
  581. message.warning('请选择业务意向')
  582. return false;
  583. }
  584. if(!this.state.businessId){
  585. if(!this.state.theTypes){
  586. message.warning('客户名为空或不存在')
  587. return false;
  588. }
  589. }
  590. if(this.state.contactType==undefined){
  591. message.warning('请选择联系方式')
  592. return false;
  593. }
  594. if(this.state.lastName==undefined){
  595. message.warning('请选择联系人')
  596. return false;
  597. }
  598. this.props.form.validateFields((err, values) => {
  599. if (!err) {
  600. this.setState({
  601. loading: true
  602. });
  603. let conts=this.state.lastName;
  604. let contactsId= this.state.contactsIdArr[conts].id;
  605. $.ajax({
  606. method: "post",
  607. dataType: "json",
  608. crossDomain: false,
  609. url:!this.state.keys?globalConfig.context + '/api/admin/customer/addBusinessAndFollow':globalConfig.context + '/api/admin/customer/addFollowOneBusiness ',
  610. data:!this.state.businessId?{
  611. uid:this.state.khId,
  612. businessGlossoryId: this.state.businessGlossoryId,
  613. followSituation:this.state.followSituation,
  614. customerStatus: this.state.customerStatus,
  615. contactType: this.state.contactType,
  616. ocbId: contactsId,
  617. createTime:this.state.createYear+''+this.state.creatMent,
  618. followTime:this.state.followTime,
  619. remarks: this.state.remarks,
  620. result: this.state.result,
  621. }:{
  622. uid:this.state.uids,
  623. businessId:this.state.businessId,
  624. businessGlossoryId: this.state.businessGlossoryId,
  625. followSituation:this.state.followSituation,
  626. customerStatus: this.state.customerStatus,
  627. contactType: this.state.contactType,
  628. ocbId: contactsId,
  629. followTime:this.state.followTime,
  630. remarks: this.state.remarks,
  631. result: this.state.result,
  632. }
  633. }).done(function (data) {
  634. this.setState({
  635. loading: false
  636. });
  637. if (!data.error.length) {
  638. message.success('保存成功!');
  639. this.addClickCancel();
  640. this.loadData(this.state.ispage);
  641. this.state.businessId='';
  642. } else {
  643. message.warning(data.error[0].message);
  644. }
  645. }.bind(this));
  646. }
  647. });
  648. },
  649. //列表保存
  650. addlistSubmit(e){
  651. e.preventDefault();
  652. this.props.form.validateFields((err, values) => {
  653. if (!err) {
  654. this.setState({
  655. loading: true
  656. });
  657. let conts=this.state.lastName;
  658. let contactsId= conts?this.state.contactsIdArr[conts].id:'';
  659. $.ajax({
  660. method: "post",
  661. dataType: "json",
  662. crossDomain: false,
  663. url:globalConfig.context + '/api/admin/customer/updateFollowOneBusiness',
  664. data:{
  665. ufbId:this.state.ufbIds,
  666. followId:this.state.followId,
  667. customerStatus: this.state.customerStatusV,
  668. followSituation:this.state.followSituationV,
  669. contactType: this.state.contactTypeV,
  670. ocbId:contactsId,
  671. remarks: this.state.remarksV,
  672. result: this.state.resultV,
  673. }
  674. }).done(function (data) {
  675. this.setState({
  676. loading: false
  677. });
  678. if (!data.error.length) {
  679. message.success('保存成功!');
  680. this.businessFollowCancel();
  681. this.loadVisit()
  682. } else {
  683. message.warning(data.error[0].message);
  684. }
  685. }.bind(this));
  686. }
  687. });
  688. },
  689. //进入修改时
  690. listFollowUp(e){
  691. $.ajax({
  692. method: "get",
  693. dataType: "json",
  694. crossDomain: false,
  695. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  696. data:{
  697. ufbId:e.ufbId
  698. },
  699. success: function (data) {
  700. let thedata=data.data;
  701. if (!thedata) {
  702. if (data.error && data.error.length) {
  703. message.warning(data.error[0].message);
  704. };
  705. thedata = {};
  706. };
  707. this.setState({
  708. businessGlossoryId:thedata.businessGlossoryId,
  709. followSituationV:thedata.followSituation,
  710. customerStatusV:thedata.customerStatus,
  711. followTime:thedata.followTime,
  712. createTime:thedata.createTime,
  713. identifyName:thedata.identifyName,
  714. contactTypeV:parseInt(thedata.contactType),
  715. resultV:thedata.result,
  716. remarksV:thedata.remarks,
  717. adminName:thedata.adminName,
  718. contacts:thedata.contacts,
  719. contactMobile:thedata.contactMobile,
  720. ufbId:thedata.ufbId,
  721. followId:thedata.followId,
  722. });
  723. }.bind(this),
  724. }).always(function () {
  725. this.getNewWoman(this.state.uids)
  726. this.setState({
  727. ufbIds:e.ufbId,
  728. loading: false
  729. });
  730. }.bind(this));
  731. },
  732. //新建HTTP获取数据
  733. addTime(){
  734. $.ajax({
  735. method: "get",
  736. dataType: "json",
  737. crossDomain: false,
  738. url: globalConfig.context + "/api/admin/customer/toAddBusinessAndFollow",
  739. data:{
  740. },
  741. success: function (data) {
  742. let theArr = [];
  743. let thedata=data.data;
  744. if (!thedata) {
  745. if (data.error && data.error.length) {
  746. message.warning(data.error[0].message);
  747. };
  748. thedata = {};
  749. };
  750. let creatMent=thedata.createTime.substr(10,9);
  751. let createYear=thedata.createTime.substr(0,10);
  752. this.setState({
  753. createTime:thedata.createTime,
  754. creatMent:creatMent,
  755. createYear:createYear,
  756. followTime:thedata.followTime,
  757. adminName: thedata.adminName,
  758. });
  759. }.bind(this),
  760. }).always(function () {
  761. this.setState({
  762. loading: false
  763. });
  764. }.bind(this));
  765. },
  766. //客户名称初始加载
  767. customerList(e){
  768. $.ajax({
  769. method: "get",
  770. dataType: "json",
  771. crossDomain: false,
  772. url: globalConfig.context + "/api/admin/customer/findCustomerByName",
  773. data:{
  774. name:e
  775. },
  776. success: function (data) {
  777. let thedata=data.data;
  778. if (!thedata) {
  779. if (data.error && data.error.length) {
  780. message.warning(data.error[0].message);
  781. };
  782. thedata = {};
  783. };
  784. this.setState({
  785. uids:thedata.id,
  786. customerArr:thedata,
  787. });
  788. }.bind(this),
  789. }).always(function () {
  790. this.setState({
  791. loading: false
  792. });
  793. }.bind(this));
  794. },
  795. //值改变时请求客户名称
  796. httpChange(e){
  797. if(e.length>=2){
  798. this.customerList(e);
  799. }
  800. this.setState({
  801. superior:e
  802. })
  803. },
  804. //选择值时值匹配及联系人函数加载
  805. autoChange(e){
  806. let theType='';
  807. let contactLists=this.state.customerArr||[];
  808. if (e) {
  809. contactLists.map(function (item) {
  810. if (item.name == e.toString()) {
  811. theType = item.id;
  812. }
  813. });
  814. }
  815. this.setState({
  816. khId:theType
  817. })
  818. this.getNewWoman(theType)
  819. },
  820. //上级主管输入框失去焦点是判断客户是否存在
  821. selectAuto(value,options){
  822. let theType='';
  823. let contactLists=this.state.customerArr||[];
  824. if (value) {
  825. contactLists.map(function (item) {
  826. if (item.name == value.toString()) {
  827. theType = item.id;
  828. }
  829. });
  830. }
  831. this.setState({
  832. superior:value,
  833. khId:theType
  834. })
  835. this.getNewWoman(theType) ;
  836. },
  837. //客户输入框失去焦点是判断客户是否存在
  838. blurChange(e){
  839. let theType='';
  840. let contactLists=this.state.customerArr||[];
  841. if (e) {
  842. contactLists.map(function (item) {
  843. if (item.name == e.toString()) {
  844. theType = item.id;
  845. }
  846. });
  847. }
  848. this.setState({
  849. theTypes:theType
  850. })
  851. },
  852. //点击跟进时数据处理
  853. HttpFollowUp(e){
  854. $.ajax({
  855. method: "get",
  856. dataType: "json",
  857. crossDomain: false,
  858. url: globalConfig.context + "/api/admin/customer/toAddFollowOneBusiness",
  859. data:{
  860. businessId:e
  861. },
  862. success: function (data) {
  863. let thedata=data.data;
  864. if (!thedata) {
  865. if (data.error && data.error.length) {
  866. message.warning(data.error[0].message);
  867. };
  868. thedata = {};
  869. };
  870. this.setState({
  871. uids:thedata.uid,
  872. businessId:thedata.businessId,
  873. businessGlossoryId:thedata.businessGlossoryId,
  874. followSituation:thedata.followSituation,
  875. customerStatus:thedata.customerStatus,
  876. followTime:thedata.followTime,
  877. createTime:thedata.createTime,
  878. identifyName:thedata.identifyName,
  879. contactType:undefined,
  880. result:'',
  881. remarks:'',
  882. });
  883. }.bind(this),
  884. }).always(function () {
  885. this.getNewWoman(this.state.uids)
  886. this.setState({
  887. loading: false
  888. });
  889. }.bind(this));
  890. },
  891. //获取联系人下拉框
  892. getNewWoman(ids) {
  893. this.state.data = []
  894. $.ajax({
  895. method: "get",
  896. dataType: "json",
  897. crossDomain: false,
  898. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  899. data:{
  900. uid:ids,
  901. },
  902. success: function (data) {
  903. let theArr = [];
  904. let thedata=data.data;
  905. if (!thedata) {
  906. if (data.error && data.error.length) {
  907. message.warning(data.error[0].message);
  908. };
  909. thedata = {};
  910. };
  911. var telNum=[];
  912. var contactIds=[];
  913. thedata.map(function (item,index) {
  914. telNum.push(thedata[index].mobile);
  915. });
  916. for (let item in data.data) {
  917. let theData = data.data[item];
  918. theArr.push(
  919. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  920. );
  921. };
  922. this.setState({
  923. contactsIdArr:thedata,
  924. telNum:telNum,
  925. orderStatusOption: theArr,
  926. });
  927. }.bind(this),
  928. }).always(function () {
  929. this.setState({
  930. loading: false
  931. });
  932. }.bind(this));
  933. },
  934. //获取拜访详情ajax
  935. loadVisit(pageNo) {
  936. this.setState({
  937. loading: true
  938. });
  939. $.ajax({
  940. method: "get",
  941. dataType: "json",
  942. crossDomain: false,
  943. url:globalConfig.context + '/api/admin/customer/listFollowHistory',
  944. data: {
  945. pageNo: pageNo || 1,
  946. pageSize: this.state.paginations.pageSize,
  947. uid: this.state.uids, //名称1
  948. businessGlossoryId:this.state.businessGlossoryId,
  949. },
  950. success: function (data) {
  951. let theArr = [];
  952. if (data.error.length || data.data.list=="") {
  953. if (data.error && data.error.length) {
  954. message.warning(data.error[0].message);
  955. };
  956. } else {
  957. for (let i = 0; i < data.data.list.length; i++) {
  958. let thisdata = data.data.list[i];
  959. theArr.push({
  960. followId:thisdata.followId,
  961. followTime:thisdata.followTime,
  962. identifyName:thisdata.identifyName,
  963. contacts:thisdata.contacts,
  964. contactMobile:thisdata.contactMobile,
  965. result:thisdata.result,
  966. ufbId:thisdata.ufbId,
  967. adminName:thisdata.adminName,
  968. followSituation:thisdata.followSituation,
  969. customerStatus:thisdata.customerStatus,
  970. contactType:thisdata.contactType
  971. });
  972. };
  973. this.state.paginations.current = data.data.pageNo;
  974. this.state.paginations.total = data.data.totalCount;
  975. };
  976. this.setState({
  977. visitArrList: theArr,
  978. paginations: this.state.paginations
  979. });
  980. }.bind(this),
  981. }).always(function () {
  982. this.setState({
  983. loading: false
  984. });
  985. }.bind(this));
  986. },
  987. componentWillReceiveProps(nextProps) {
  988. if (!this.props.visible && nextProps.visible) {
  989. if (nextProps.data && nextProps.data.id) {
  990. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  991. };
  992. this.state.data = {};
  993. this.state.companyLogoUrl = [];
  994. this.state.orgCodeUrl = [];
  995. };
  996. },
  997. tableRowClick(record, index) {
  998. this.state.RowData = record;
  999. this.detailsModalOk(record);
  1000. this.setState({
  1001. selectedRowKeys:[],
  1002. rowId:record.businessId,
  1003. })
  1004. },
  1005. followRowClick(record, index) {
  1006. this.state.RowData = record;
  1007. this.listFollowUp(record);
  1008. this.setState({
  1009. businessFollowModul: true,
  1010. selectedRowKeys:[],
  1011. });
  1012. },
  1013. render() {
  1014. const FormItem = Form.Item
  1015. const rowSelection = {
  1016. selectedRowKeys: this.state.selectedRowKeys,
  1017. onChange: (selectedRowKeys, selectedRows) => {
  1018. this.setState({
  1019. selectedRows: selectedRows.slice(-1),
  1020. selectedRowKeys: selectedRowKeys.slice(-1)
  1021. });
  1022. },
  1023. onSelect: (recordt, selected, selectedRows) => {
  1024. this.setState({
  1025. recordt:recordt.id
  1026. })
  1027. },
  1028. };
  1029. const rowSelections = {
  1030. selectedRowKeys: this.state.selectedRowKey,
  1031. onChange: (selectedRowKey, selectedRow) => {
  1032. this.setState({
  1033. selectedRow: selectedRow.slice(-1),
  1034. selectedRowKey: selectedRowKey.slice(-1)
  1035. });
  1036. },
  1037. onSelect: (records, selected, selectedRow) => {
  1038. this.setState({
  1039. selectedRow: selectedRow.slice(-1),
  1040. records:records.id,
  1041. })
  1042. },
  1043. };
  1044. const hasSelected = this.state.selectedRowKeys.length > 0;
  1045. const { RangePicker } = DatePicker;
  1046. const { getFieldDecorator } = this.props.form;
  1047. const formItemLayout = {
  1048. labelCol: { span: 8 },
  1049. wrapperCol: { span: 14 },
  1050. };
  1051. const theInformation=this.state.dataInformation || {}
  1052. const contactsOption="";
  1053. const formItemLayput = {
  1054. labelCol: { span: 10 },
  1055. wrapperCol: { span: 14 },
  1056. };
  1057. const businessIds=this.state.businessId||'';
  1058. const dataSources=this.state.customerArr || [];
  1059. const options = dataSources.map((group) =>
  1060. <Option key={group.id} value={group.name}>{group.name}</Option>
  1061. )
  1062. return (
  1063. <div className="user-content" >
  1064. <div className="content-title">
  1065. <span>我的业务</span>
  1066. </div>
  1067. <div className="user-search">
  1068. <Input placeholder="客户名称"
  1069. value={this.state.identifyNameS}
  1070. onChange={(e) => { this.setState({ identifyNameS: e.target.value }); }} />
  1071. <Select placeholder="服务意向" value={this.state.businessIdS} onChange={(e) => {
  1072. this.setState({businessIdS:e})}} style={{width:'150px'}}>
  1073. {
  1074. intentionalService.map(function (item) {
  1075. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1076. })
  1077. }
  1078. </Select>
  1079. <Button type="primary" onClick={this.search}>搜索</Button>
  1080. <Button onClick={this.reset}>重置</Button>
  1081. <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  1082. <Button style={{ marginRight:'10px' ,marginLeft:'10px'}} type='danger'
  1083. disabled={!hasSelected}
  1084. >删除<Icon type="minus" />
  1085. </Button>
  1086. </Popconfirm>
  1087. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1088. <Button type="primary" className="addButton" onClick={this.addClick}>新增业务<Icon type="plus" /></Button>
  1089. <div className='clearfix' style={{marginTop:'5px'}}>
  1090. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1091. <RangePicker
  1092. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1093. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1094. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1095. <Select placeholder="客户状态"
  1096. style={{ width: 150 }}
  1097. value={this.state.customerStatusS}
  1098. onChange={(e) => { this.setState({ customerStatusS: e }) }}>
  1099. {
  1100. customerStatus.map(function (item) {
  1101. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1102. })
  1103. }
  1104. </Select>
  1105. <Select placeholder="业务进度"
  1106. style={{ width: 150 }}
  1107. value={this.state.followSituationS}
  1108. onChange={(e) => { this.setState({ followSituationS: e }) }}>
  1109. {this.state.intentionalOption}
  1110. </Select>
  1111. <Input placeholder="营销员" style={{width:'150px'}}
  1112. value={this.state.adminNameS}
  1113. onChange={(e) => { this.setState({ adminNameS: e.target.value }); }} />
  1114. </div>
  1115. </div>
  1116. </div>
  1117. <div className="patent-table">
  1118. <Spin spinning={this.state.loading}>
  1119. <Table columns={this.state.columns}
  1120. dataSource={this.state.dataSource}
  1121. rowSelection={rowSelection}
  1122. pagination={this.state.pagination}
  1123. onRowClick={this.tableRowClick}
  1124. />
  1125. </Spin>
  1126. </div>
  1127. <Modal
  1128. footer=''
  1129. title="我的业务"
  1130. width='1000px'
  1131. visible={this.state.showDesc}
  1132. onOk={this.addClickOk}
  1133. onCancel={this.addClickCancel}
  1134. >
  1135. <Form horizontal id="demand-form" onSubmit={this.addSubmit}>
  1136. <Spin spinning={this.state.loading}>
  1137. <div className="clearfix">
  1138. {businessIds!=''?<div><FormItem className="half-item"
  1139. {...formItemLayout}
  1140. label="意向名称"
  1141. >
  1142. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  1143. </FormItem>
  1144. <FormItem className="half-item"
  1145. {...formItemLayout}
  1146. >
  1147. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1148. </FormItem>
  1149. <FormItem className="half-item"
  1150. {...formItemLayout}
  1151. label="意向时间"
  1152. >
  1153. <span>{this.state.createTime}</span>
  1154. </FormItem>
  1155. <FormItem className="half-item"
  1156. {...formItemLayout}
  1157. label="客户名称"
  1158. >
  1159. <span>{this.state.identifyName}</span>
  1160. </FormItem></div>
  1161. :<div><FormItem className="half-item"
  1162. {...formItemLayout}
  1163. label="意向名称"
  1164. >
  1165. <Select placeholder="服务意向名称" value={this.state.businessGlossoryId} onChange={(e) => {
  1166. this.setState({businessGlossoryId:e})}} style={{width:'150px'}}>
  1167. {
  1168. intentionalService.map(function (item) {
  1169. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1170. })
  1171. }
  1172. </Select>
  1173. <span style={{color:'red'}}> *</span>
  1174. </FormItem>
  1175. <FormItem className="half-item"
  1176. {...formItemLayout}
  1177. >
  1178. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1179. </FormItem>
  1180. <div className="clearfix">
  1181. <FormItem className="half-item"
  1182. {...formItemLayout}
  1183. label="意向时间" >
  1184. <DatePicker placeholder="更新日期" value={moment(this.state.createYear,'YYYY-MM-DD')} onChange={(time) => {this.setState({createYear: time});}}/>
  1185. <TimePicker placeholder="更新时间" value={moment(this.state.creatMent, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMent: time}); }}/>
  1186. </FormItem>
  1187. <FormItem className="half-item"
  1188. {...formItemLayout}
  1189. label="客户名称"
  1190. >
  1191. <AutoComplete
  1192. className="certain-category-search"
  1193. dropdownClassName="certain-category-search-dropdown"
  1194. dropdownMatchSelectWidth={false}
  1195. dropdownStyle={{ width: 300 }}
  1196. size="large"
  1197. style={{ width: '200px' }}
  1198. dataSource={options}
  1199. placeholder="输入名称"
  1200. value={this.state.superior}
  1201. onChange={this.httpChange}
  1202. filterOption={true}
  1203. onBlur={this.blurChange}
  1204. onSelect={this.selectAuto}
  1205. filterOption={true}
  1206. >
  1207. <Input/>
  1208. </AutoComplete>
  1209. <span className="mandatory">*</span>
  1210. </FormItem>
  1211. </div>
  1212. </div>
  1213. }
  1214. <FormItem className="half-item"
  1215. {...formItemLayout}
  1216. label="营销员"
  1217. >
  1218. <span>{this.state.adminName}</span>
  1219. </FormItem>
  1220. <FormItem className="half-item"
  1221. {...formItemLayout}
  1222. label="意向进度"
  1223. >
  1224. <Select placeholder="意向进度" value={this.state.followSituation}
  1225. onChange={(e) => { this.setState({ followSituation: e }) }}>
  1226. {
  1227. newFollow.map(function (item) {
  1228. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1229. })
  1230. }
  1231. </Select>
  1232. </FormItem>
  1233. <FormItem className="half-item"
  1234. {...formItemLayout}
  1235. label="客户状态"
  1236. >
  1237. <Select placeholder="客户状态" value={this.state.customerStatus}
  1238. onChange={(e) => { this.setState({ customerStatus: e }) }}>
  1239. {
  1240. customerStatus.map(function (item) {
  1241. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1242. })
  1243. }
  1244. </Select>
  1245. </FormItem>
  1246. <div className="clearfix">
  1247. <FormItem
  1248. labelCol={{ span: 4 }}
  1249. wrapperCol={{ span: 16 }}
  1250. label="意向说明" >
  1251. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
  1252. onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>
  1253. </FormItem>
  1254. </div>
  1255. <div style={{fontSize:'18px',marginLeft:'30px'}}>拜访情况</div>
  1256. <div className="clearfix">
  1257. <FormItem className="half-item"
  1258. labelCol={{ span: 8 }}
  1259. wrapperCol={{ span: 16 }}
  1260. label="拜访方式" >
  1261. <Radio.Group value={this.state.contactType} onChange={(e) => {
  1262. this.setState({ contactType: e.target.value })
  1263. }}>
  1264. <Radio value={0}>外出</Radio>
  1265. <Radio value={1}>电话</Radio>
  1266. <Radio value={2}>QQ</Radio>
  1267. <Radio value={3}>微信</Radio>
  1268. <Radio value={4}>邮箱</Radio>
  1269. </Radio.Group>
  1270. </FormItem>
  1271. </div>
  1272. <FormItem className="half-item"
  1273. {...formItemLayout}
  1274. label="联系人"
  1275. >
  1276. <Select placeholder="联系人姓名" style={{ width: 140 }}
  1277. value={this.state.lastName}
  1278. onChange={this.hundleName}>
  1279. {this.state.orderStatusOption}
  1280. </Select>
  1281. </FormItem>
  1282. <FormItem className="half-item"
  1283. {...formItemLayout}
  1284. label="联系电话"
  1285. >
  1286. <span>{this.state.nub}</span>
  1287. </FormItem>
  1288. <div className="clearfix">
  1289. <FormItem className="half-item"
  1290. {...formItemLayout}
  1291. label="拜访人"
  1292. >
  1293. <span>{this.state.adminName}</span>
  1294. </FormItem>
  1295. <FormItem className="half-item"
  1296. {...formItemLayout}
  1297. label="拜访时间" >
  1298. <span>{this.state.followTime}</span>
  1299. </FormItem>
  1300. </div>
  1301. <div className="clearfix">
  1302. <FormItem
  1303. labelCol={{ span: 4 }}
  1304. wrapperCol={{ span: 16 }}
  1305. label="拜访备注" >
  1306. <Input type="textarea" rows={4} value={this.state.result} placeholder="来电备注"
  1307. onChange={(e) => { this.setState({ result: e.target.value }); }}/>
  1308. </FormItem>
  1309. </div>
  1310. </div>
  1311. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 160px'}}>保存</Button>
  1312. <Button size="large" onClick={this.addClickCancel}>取消</Button>
  1313. </Spin>
  1314. </Form>
  1315. </Modal>
  1316. <Modal
  1317. className="customeDetails"
  1318. title="我的业务意向详情"
  1319. width='1000px'
  1320. visible={this.state.modal5Visible}
  1321. onOk={this.detailsModal}
  1322. onCancel={this.detailsModal}
  1323. footer=''
  1324. >
  1325. <Form horizontal onSubmit={this.newSubmit} id="demand-form">
  1326. <Spin spinning={this.state.loading}>
  1327. <div className="clearfix">
  1328. <FormItem className="half-item"
  1329. {...formItemLayout}
  1330. label="意向名称"
  1331. >
  1332. <span>{getCompanyIntention(theInformation.businessGlossoryId)}</span>
  1333. </FormItem>
  1334. <FormItem className="half-item"
  1335. {...formItemLayout}
  1336. label="意向时间"
  1337. >
  1338. <span>{theInformation.createTime}</span>
  1339. </FormItem>
  1340. <FormItem className="half-item"
  1341. {...formItemLayout}
  1342. label="客户名称"
  1343. >
  1344. <span>{theInformation.identifyName}</span>
  1345. </FormItem>
  1346. <FormItem className="half-item"
  1347. {...formItemLayout}
  1348. label="营销员"
  1349. >
  1350. <span>{theInformation.adminName}</span>
  1351. </FormItem>
  1352. <FormItem className="half-item"
  1353. {...formItemLayout}
  1354. label="意向进度"
  1355. >
  1356. <Select placeholder="意向进度" value={this.state.followSituation}
  1357. onChange={(e) => { this.setState({ followSituation: e }) }}>
  1358. {
  1359. newFollow.map(function (item) {
  1360. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1361. })
  1362. }
  1363. </Select>
  1364. </FormItem>
  1365. <FormItem className="half-item"
  1366. {...formItemLayout}
  1367. label="客户状态"
  1368. >
  1369. <Select placeholder="客户状态" value={this.state.customerStatus} disabled={this.state.customerStatus=='6'?true:false}
  1370. onChange={(e) => { this.setState({ customerStatus: e }) }}>
  1371. {
  1372. customerStatus.map(function (item) {
  1373. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1374. })
  1375. }
  1376. </Select>
  1377. </FormItem>
  1378. <div className="clearfix">
  1379. <FormItem
  1380. labelCol={{ span: 4 }}
  1381. wrapperCol={{ span: 16 }}
  1382. label="意向说明" >
  1383. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
  1384. onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>
  1385. </FormItem>
  1386. </div>
  1387. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'160px',marginBottom:'30px'}}>保存</Button>
  1388. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  1389. </div>
  1390. <div className="clearfix">
  1391. <div style={{fontSize:'18px',marginLeft:'40px',marginBottom:'20px'}}>业务跟进</div>
  1392. <div className="clearfix" style={{paddingLeft:'40px',paddingRight:'40px'}}>
  1393. <Spin spinning={this.state.loading}>
  1394. <Table
  1395. pagination={this.state.paginations}
  1396. columns={this.state.businessFollowList}
  1397. dataSource={this.state.visitArrList}
  1398. onRowClick={this.followRowClick}
  1399. />
  1400. </Spin>
  1401. </div>
  1402. </div>
  1403. </Spin>
  1404. </Form>
  1405. </Modal>
  1406. <Modal
  1407. footer=''
  1408. width='800px'
  1409. title="新增联系人"
  1410. visible={this.state.addcontactModul}
  1411. onOk={this.addcontactModulOK}
  1412. onCancel={this.addcontactModulcancel}
  1413. >
  1414. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  1415. <Spin spinning={this.state.loading}>
  1416. <Row>
  1417. <FormItem
  1418. labelCol={{ span: 3 }}
  1419. wrapperCol={{ span: 14 }}
  1420. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  1421. <Radio.Group value={this.state.newsex} onChange={(e) => {
  1422. this.setState({ newsex: e.target.value })
  1423. }}>
  1424. <Radio value='男'>男</Radio>
  1425. <Radio value='女'>女</Radio>
  1426. </Radio.Group>
  1427. </FormItem>
  1428. </Row>
  1429. <Row style={{ paddingLeft:'50px' }}>
  1430. <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
  1431. <Col span={8}>
  1432. <Input value={this.state.newname} required="required"
  1433. onChange={(e) => { this.setState({ newname: e.target.value }) }} />
  1434. </Col>
  1435. <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
  1436. <Col span={8}>
  1437. <Input value={this.state.newmobile} required="required"
  1438. onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
  1439. </Col>
  1440. </Row>
  1441. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1442. <Col span={2}>微信:</Col>
  1443. <Col span={8}>
  1444. <Input value={this.state.newwechat}
  1445. onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
  1446. </Col>
  1447. <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
  1448. <Col span={8}>
  1449. <Input value={this.state.newqq}
  1450. onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
  1451. </Col>
  1452. </Row>
  1453. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  1454. <Col span={2}>部门:</Col>
  1455. <Col span={8}>
  1456. <Input value={this.state.newdepatrment}
  1457. onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
  1458. </Col>
  1459. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  1460. <Col span={8}>
  1461. <Input value={this.state.newposition}
  1462. onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
  1463. </Col>
  1464. </Row>
  1465. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1466. <Col span={2}>邮箱:</Col>
  1467. <Col span={8}>
  1468. <Input value={this.state.newemail}
  1469. onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
  1470. </Col>
  1471. </Row>
  1472. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  1473. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  1474. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  1475. </Row>
  1476. </Spin>
  1477. </Form>
  1478. </Modal>
  1479. <Modal
  1480. footer=''
  1481. title="业务跟进详情"
  1482. width='1000px'
  1483. visible={this.state.businessFollowModul}
  1484. onOk={this.businessFollowOk}
  1485. onCancel={this.businessFollowCancel}
  1486. >
  1487. <div className="clearfix">
  1488. <Form horizontal id="demand-form" onSubmit={this.addlistSubmit}>
  1489. <Spin spinning={this.state.loading}>
  1490. <div className="clearfix">
  1491. <FormItem className="half-item"
  1492. {...formItemLayout}
  1493. label="意向名称"
  1494. >
  1495. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  1496. </FormItem>
  1497. <FormItem className="half-item"
  1498. {...formItemLayout}
  1499. >
  1500. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
  1501. </FormItem>
  1502. <FormItem className="half-item"
  1503. {...formItemLayout}
  1504. label="意向时间"
  1505. >
  1506. <span>{this.state.createTime}</span>
  1507. </FormItem>
  1508. <FormItem className="half-item"
  1509. {...formItemLayout}
  1510. label="客户名称"
  1511. >
  1512. <span>{this.state.identifyName}</span>
  1513. </FormItem>
  1514. <FormItem className="half-item"
  1515. {...formItemLayout}
  1516. label="营销员"
  1517. >
  1518. <span>{this.state.adminName}</span>
  1519. </FormItem>
  1520. <FormItem className="half-item"
  1521. {...formItemLayout}
  1522. label="意向进度"
  1523. >
  1524. <Select placeholder="意向进度" value={this.state.followSituationV}
  1525. onChange={(e) => { this.setState({ followSituationV: e }) }}>
  1526. {
  1527. newFollow.map(function (item) {
  1528. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1529. })
  1530. }
  1531. </Select>
  1532. </FormItem>
  1533. <FormItem className="half-item"
  1534. {...formItemLayout}
  1535. label="客户状态"
  1536. >
  1537. <Select placeholder="客户状态" value={this.state.customerStatusV}
  1538. onChange={(e) => { this.setState({ customerStatusV: e }) }}>
  1539. {
  1540. customerStatus.map(function (item) {
  1541. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1542. })
  1543. }
  1544. </Select>
  1545. </FormItem>
  1546. <div className="clearfix">
  1547. <FormItem
  1548. labelCol={{ span: 4 }}
  1549. wrapperCol={{ span: 16 }}
  1550. label="意向说明" >
  1551. <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarksV}
  1552. onChange={(e) => { this.setState({ remarksV: e.target.value }) }}/>
  1553. </FormItem>
  1554. </div>
  1555. <div style={{fontSize:'18px',marginLeft:'30px'}}>拜访情况</div>
  1556. <div className="clearfix">
  1557. <FormItem className="half-item"
  1558. labelCol={{ span: 8 }}
  1559. wrapperCol={{ span: 16 }}
  1560. label="拜访方式" >
  1561. <Radio.Group value={this.state.contactTypeV} onChange={(e) => {
  1562. this.setState({ contactTypeV: e.target.value })
  1563. }}>
  1564. <Radio value={0}>外出</Radio>
  1565. <Radio value={1}>电话</Radio>
  1566. <Radio value={2}>QQ</Radio>
  1567. <Radio value={3}>微信</Radio>
  1568. <Radio value={4}>邮箱</Radio>
  1569. </Radio.Group>
  1570. </FormItem>
  1571. </div>
  1572. <FormItem className="half-item"
  1573. {...formItemLayout}
  1574. label="联系人"
  1575. >
  1576. <Select placeholder="联系人姓名" style={{ width: 140 }}
  1577. value={this.state.lastName}
  1578. onChange={this.hundleName}>
  1579. {this.state.orderStatusOption}
  1580. </Select>
  1581. </FormItem>
  1582. <FormItem className="half-item"
  1583. {...formItemLayout}
  1584. label="当前联系人"
  1585. >
  1586. <span>{this.state.contacts}</span>
  1587. </FormItem>
  1588. <FormItem className="half-item"
  1589. {...formItemLayout}
  1590. label="联系电话"
  1591. >
  1592. <span>{this.state.nub}</span>
  1593. </FormItem>
  1594. <div className="clearfix">
  1595. <FormItem className="half-item"
  1596. {...formItemLayout}
  1597. label="拜访人"
  1598. >
  1599. <span>{this.state.adminName}</span>
  1600. </FormItem>
  1601. <FormItem className="half-item"
  1602. {...formItemLayout}
  1603. label="拜访时间" >
  1604. <span>{this.state.followTime}</span>
  1605. </FormItem>
  1606. </div>
  1607. <div className="clearfix">
  1608. <FormItem
  1609. labelCol={{ span: 4 }}
  1610. wrapperCol={{ span: 16 }}
  1611. label="拜访备注" >
  1612. <Input type="textarea" rows={4} value={this.state.resultV} placeholder="来电备注"
  1613. onChange={(e) => { this.setState({ resultV: e.target.value }); }}/>
  1614. </FormItem>
  1615. </div>
  1616. </div>
  1617. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 160px'}}>保存</Button>
  1618. <Button size="large" onClick={this.businessFollowCancel}>取消</Button>
  1619. </Spin>
  1620. </Form>
  1621. </div>
  1622. </Modal>
  1623. </div >
  1624. );
  1625. }
  1626. }));
  1627. export default MyBusiness;