businessManges.jsx 61 KB

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