myBusiness.jsx 68 KB

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