myBusiness.jsx 65 KB

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