myBusiness.jsx 67 KB

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