myClient.jsx 91 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007
  1. import React from 'react';
  2. import { Radio, Icon, Button, Input, Select, Spin,Popconfirm, 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. import './myClient.less';
  7. const { Column, ColumnGroup } = Table;
  8. import TechAchievementDesc from './myClientDesc.jsx';
  9. import { achievementCategoryList, techAuditStatusList,cityArr,tag,customerStatus,intentionalService,newFollow ,newFollowOn,contact,sex,intentionalServiceOn} from '../../dataDic.js';
  10. import { beforeUploadFile, companySearch, getAchievementCategory,getsex,getSearchUrl,getTechAuditStatus,getcustomerTyp,getcityArr,getCompanyIntentionOn,getcustomerStatue,getCompanyIntention,getfllowSituation,getcontact,getfllowSituationOn} from '../../tools.js';
  11. import BatchImport from './batchImport';
  12. //历史记录
  13. const datas = [{
  14. key: '1',
  15. firstName: 'John',
  16. lastName: 'Brown',
  17. age: 32,
  18. address: 'New York No. 1 Lake Park',
  19. addres:'31232',
  20. addre:'31231',
  21. addr:'231321',
  22. }, {
  23. key: '2',
  24. firstName: 'Jim',
  25. lastName: 'Green',
  26. age: 42,
  27. address: 'London No. 1 Lake Park',
  28. addres:'31232',
  29. addre:'31231',
  30. addr:'231321',
  31. }, {
  32. key: '3',
  33. firstName: 'Joe',
  34. lastName: 'Black',
  35. age: 32,
  36. address: 'Sidney No. 1 Lake Park',
  37. addres:'31232',
  38. addre:'31231',
  39. addr:'231321',
  40. }, {
  41. key: '4',
  42. firstName: 'Jim',
  43. lastName: 'Green',
  44. age: 42,
  45. address: 'London No. 1 Lake Park',
  46. addres:'31232',
  47. addre:'31231',
  48. addr:'231321',
  49. },
  50. ];
  51. //图片组件
  52. const PicturesWall = React.createClass({
  53. getInitialState() {
  54. return {
  55. previewVisible: false,
  56. previewImage: '',
  57. fileList: [],
  58. }
  59. },
  60. handleCancel() {
  61. this.setState({ previewVisible: false })
  62. },
  63. handlePreview(file) {
  64. this.setState({
  65. previewImage: file.url || file.thumbUrl,
  66. previewVisible: true,
  67. });
  68. },
  69. handleChange(info) {
  70. let fileList = info.fileList;
  71. this.setState({ fileList });
  72. this.props.fileList(fileList);
  73. },
  74. componentWillReceiveProps(nextProps) {
  75. this.state.fileList = nextProps.pictureUrl;
  76. },
  77. render() {
  78. const { previewVisible, previewImage, fileList } = this.state;
  79. const uploadButton = (
  80. <div>
  81. <Icon type="plus" />
  82. <div className="ant-upload-text">点击上传</div>
  83. </div>
  84. );
  85. return (
  86. <div className="clearfix">
  87. <Upload
  88. action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
  89. data={{ 'sign': this.props.pictureSign }}
  90. listType="picture-card"
  91. fileList={fileList}
  92. onPreview={this.handlePreview}
  93. onChange={this.handleChange} >
  94. {fileList.length >= 5 ? null : uploadButton}
  95. </Upload>
  96. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  97. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  98. </Modal>
  99. </div>
  100. );
  101. }
  102. });
  103. const contactsOptionWoman=[];
  104. const datat = [{
  105. key: 1,
  106. name: 'John Brown sr.',
  107. },
  108. {
  109. key: 12,
  110. name: 'John Brown jr.',
  111. }, {
  112. key: 13,
  113. name: 'Jim Green sr.',
  114. }];
  115. const AchievementList = Form.create()(React.createClass({
  116. loadData(pageNumber, apiUrl) {
  117. this.state.data = [];
  118. this.setState({
  119. loading: true
  120. });
  121. $.ajax({
  122. method: "post",
  123. dataType: "json",
  124. crossDomain: false,
  125. url:globalConfig.context + '/api/admin/customer/listPrivateCustomer',
  126. data: {
  127. pageNumber: pageNumber || 1,
  128. pageSize: this.state.pagination.pageSize,
  129. // customerName: this.state.customerName, //名称1
  130. // shareTyp: this.state.shareTyp, //客户类型1
  131. // province:this.state.province,//地区
  132. // customerStatus:this.state.customerStatus,//客户状态1
  133. // contactName:this.state.contactName,//联系人姓名1
  134. // adminName:this.state.adminName,//跟单人1
  135. // companyIntention:this.state.companyIntention,//意向服务
  136. // followSituation:this.state.followSituation,//最新跟进
  137. //releaseDateStartDate: this.state.releaseDate[0],
  138. //releaseDateEndDate: this.state.releaseDate[1],
  139. },
  140. success: function (data) {
  141. let theArr = [];
  142. if (!data.data || !data.data.list) {
  143. if (data.error && data.error.length) {
  144. message.warning(data.error[0].message);
  145. };
  146. } else {
  147. for (let i = 0; i < data.data.list.length; i++) {
  148. let thisdata = data.data.list[i];
  149. theArr.push({
  150. key: i,
  151. id: thisdata.id,
  152. companyName:thisdata.companyName,//公司名称
  153. _shareType:thisdata._shareType,//客户类型
  154. locationProvince:thisdata.locationProvince,//地区
  155. contactName:thisdata.contactName, //联系人姓名
  156. telNum:thisdata.telNum,//手机号
  157. _customerStatus:thisdata._customerStatus,//客户状态
  158. _companyIntention:thisdata._companyIntention,//意向服务
  159. _followSituation:thisdata._followSituation,//最新跟进
  160. customerStatus:thisdata.customerStatus,//客户状态
  161. companyIntention:thisdata.companyIntention,//意向服务
  162. followSituation:thisdata.followSituation,//最新跟进
  163. adminName:thisdata.adminName, //跟进人
  164. followDate:thisdata.followDate,
  165. customerStatus:thisdata.customerStatus,//客户状态
  166. companyIntention:thisdata.companyIntention,//意向服务
  167. });
  168. };
  169. this.state.pagination.current = data.data.pageNumber;
  170. this.state.pagination.total = data.data.totalCount;
  171. };
  172. this.setState({
  173. dataSource: theArr,
  174. pagination: this.state.pagination
  175. });
  176. }.bind(this),
  177. }).always(function () {
  178. this.setState({
  179. loading: false
  180. });
  181. }.bind(this));
  182. },
  183. //通过ID查询这个个公司的跟进记录
  184. getNewWoman(deletedIds) {
  185. const contactsOptionWoman=[]
  186. $.ajax({
  187. method: "post",
  188. dataType: "json",
  189. crossDomain: false,
  190. url: globalConfig.context + "/api/admin/customer/findCustomerUserList",
  191. data:{
  192. cid:deletedIds
  193. },
  194. success: function (data) {
  195. let theArr = [];
  196. let thedata=data.data;
  197. var email=[];
  198. var telNum=[];
  199. var contactId=[];
  200. thedata.map(function (item,index) {
  201. email.push(thedata[index].email);
  202. contactId.push(thedata[index].id);
  203. telNum.push(thedata[index].telNum);
  204. theArr.push(<Select.Option value={index}>{item.name}</Select.Option>)
  205. });
  206. var lastName= thedata[thedata.length-1].name;
  207. var nub=thedata[thedata.length-1].telNum;
  208. var kid=thedata[thedata.length-1].id;
  209. var contacts='电话';
  210. this.setState({
  211. kid:kid,
  212. contactId:contactId,
  213. contacts:contacts,
  214. nub:nub,
  215. telNum:telNum,
  216. email:email,
  217. lastName:lastName,
  218. orderStatusOption: theArr,
  219. });
  220. }.bind(this),
  221. }).always(function () {
  222. this.setState({
  223. loading: false
  224. });
  225. }.bind(this));
  226. },
  227. //在添加联系记录页面,选择联系方式查看号码
  228. contacts(e){
  229. let conts='';
  230. if(e==0){
  231. conts='电话'
  232. this.state.nub=this.state.changNub
  233. }
  234. if(e==1){
  235. conts='邮件'
  236. this.state.nub=this.state.changEmail
  237. }
  238. if(e==2){
  239. conts='面谈'
  240. this.state.nub=''
  241. }
  242. if(e==3){
  243. conts='短信'
  244. this.state.nub=''
  245. }
  246. this.setState({
  247. conts:conts,
  248. contacts: e,
  249. });
  250. },
  251. //通过ID查询这一条的信息
  252. Detailload(deletedIds){
  253. $.ajax({
  254. method: "post",
  255. dataType: "json",
  256. crossDomain: false,
  257. url: globalConfig.context + '/api/admin/customer/findCustomerUserDetails',
  258. data: {
  259. id: deletedIds
  260. },
  261. success: function (data) {
  262. let thisData = data.data;
  263. if (!thisData) {
  264. if (data.error && data.error.length) {
  265. message.warning(data.error[0].message);
  266. };
  267. thisData = {};
  268. };
  269. this.setState({
  270. data: thisData,
  271. followSituation:thisData.followSituation,
  272. customerStatus:thisData.customerStatus,
  273. });
  274. if (thisData.ownerId) {
  275. this.getContactsList(thisData.ownerId);
  276. };
  277. }.bind(this),
  278. }).always(function () {
  279. this.setState({
  280. loading: false
  281. });
  282. }.bind(this));
  283. },
  284. //点击便捷记录,点击最新跟进下的+号,将会查询出很多数据,展示在列表里面
  285. setModal1Visible(modal1Visible) {
  286. this.setState({ modal1Visible });
  287. let deletedIds;
  288. let adminName;
  289. let customerStatus;
  290. let companyIntention;
  291. let followSituation;
  292. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  293. let rowItem = this.state.selectedRows[idx];
  294. if (rowItem.id) {
  295. deletedIds=rowItem.id;
  296. adminName=rowItem.adminName;
  297. companyIntention=rowItem.companyIntention;
  298. followSituation=rowItem.followSituation;
  299. };
  300. };
  301. this.Detailload(deletedIds);
  302. this.getNewWoman(deletedIds);
  303. },
  304. setModal2Visible(modal2Visible) {
  305. this.setState({ modal2Visible });
  306. alert(1111111);
  307. },
  308. //历史记录中点击跟进人模板出现,点击最新跟进的第一个按钮(跟进状态)执行的函数,将会出现很多跟进列表
  309. setModal3Visible(modal3Visible) {
  310. this.setState({ modal3Visible });
  311. this.state.data = [];
  312. this.setState({
  313. loading: true
  314. });
  315. let deletedIds;
  316. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  317. let rowItem = this.state.selectedRows[idx];
  318. if (rowItem.id) {
  319. deletedIds=rowItem.id;
  320. };
  321. };
  322. $.ajax({
  323. method: "get",
  324. dataType: "json",
  325. crossDomain: false,
  326. url:globalConfig.context + '/api/admin/customer/listFollowUpRecord',
  327. data: {
  328. customerId:deletedIds
  329. },
  330. success: function (data) {
  331. let theArr = [];
  332. let theWomanID=[];
  333. if (!data.data) {
  334. if (data.error && data.error.length) {
  335. message.warning(data.error[0].message);
  336. };
  337. } else {
  338. data.data.map(function (item,index) {
  339. theWomanID.push(data.data[index].id);
  340. });
  341. for (let i = 0; i < data.data.length; i++) {
  342. let thisdata = data.data[i];
  343. theArr.push({
  344. key:i,
  345. _followDate:thisdata._followDate,//跟进时间
  346. adminName:thisdata.adminName,//跟进人
  347. contactName:thisdata.contactName, //联系人姓名
  348. contactId:thisdata.contactId, //联系人ID
  349. contactInfo:thisdata.contactInfo,//联系信息
  350. _customerStatus:thisdata._customerStatus,//客户状态
  351. _followSituation:thisdata._followSituation,//最新跟进
  352. followResult:thisdata.followResult,//跟进结果
  353. attachment:thisdata.attachment,//附件地址
  354. });
  355. };
  356. };
  357. this.setState({//导出数据
  358. datahistory: theArr,
  359. theWomanID:theWomanID,
  360. });
  361. }.bind(this),
  362. }).always(function () {
  363. this.setState({
  364. loading: false
  365. });
  366. }.bind(this));
  367. },
  368. //删除历史记录
  369. onDelete(){
  370. },
  371. //点击客户的名字,进行详情的查询
  372. setModal4Visible(modal4Visible) {
  373. console.log()
  374. let changeIds=this.state.datahistory[1].contactId;
  375. this.setState({ modal4Visible }); //需要一个请求数据
  376. // for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  377. // let rowItem = this.state.selectedRows[idx];
  378. // if (rowItem.id) {
  379. // changeIds=rowItem.id;
  380. // };
  381. // };
  382. $.ajax({
  383. method: "get",
  384. dataType: "json",
  385. crossDomain: false,
  386. url:globalConfig.context + '/api/admin/customer/findContactDetail',
  387. data: {
  388. contactId:changeIds
  389. },
  390. success: function (data) {
  391. let theArr = [];
  392. let theDate=data.data;
  393. if (!data.data) {
  394. if (data.error && data.error.length) {
  395. message.warning(data.error[0].message);
  396. };
  397. } else {
  398. for (let i = 0; i < data.data.length; i++) {
  399. let thisdata = data.data[i];
  400. theArr.push({
  401. key:i,
  402. name:name,//联系人姓名
  403. sex:sex,//联系人性别
  404. mobile:mobile,//座机号
  405. telNum:telNum,//手机号
  406. email:email,//邮箱
  407. qq:qq,//qq
  408. wechat:wechat,//微信号
  409. depatrment:depatrment,//部门
  410. customerPosition:customerPosition,//职位
  411. // _followSituation:thisdata._followSituation,//最新跟进
  412. });
  413. };
  414. };
  415. this.setState({//导出数据
  416. theDate:theDate,
  417. name:theDate.name,//联系人姓名
  418. sex:theDate.sex,//联系人性别
  419. mobile:theDate.mobile,//座机号
  420. telNum:theDate.telNum,//手机号
  421. email:theDate.email,//邮箱
  422. qq:theDate.qq,//qq
  423. wechat:theDate.wechat,//微信号
  424. depatrment:theDate.depatrment,//部门
  425. customerPosition:theDate.customerPosition,//职位
  426. companyName:theDate.companyName,//公司
  427. });
  428. }.bind(this),
  429. }).always(function () {
  430. this.setState({
  431. loading: false
  432. });
  433. }.bind(this));
  434. },
  435. //点击名称时获取列表
  436. setModal5Visible(modal5Visible) {
  437. this.setState({ modal5Visible });
  438. let deletedIds;
  439. let adminName;
  440. let customerStatus;
  441. let companyIntention;
  442. let followSituation;
  443. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  444. let rowItem = this.state.selectedRows[idx];
  445. if (rowItem.id) {
  446. deletedIds=rowItem.id;
  447. adminName=rowItem.adminName;
  448. companyIntention=rowItem.companyIntention;
  449. followSituation=rowItem.followSituation;
  450. };
  451. };
  452. this.setState({ modal5Visible }); //需要一个请求数据
  453. this.Detailload(deletedIds);
  454. },
  455. //历史记录查看更多,还是历史记录接口
  456. setModal6Visible(modal6Visible) {
  457. this.setState({ modal6Visible }); //需要一个请求数据
  458. },
  459. getPictureUrl(e) {
  460. this.setState({pictureUrl: e });
  461. },
  462. componentWillReceiveProps(nextProps) {
  463. if (!this.props.visible && nextProps.visible) {
  464. if (nextProps.data && nextProps.data.id) {
  465. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  466. };
  467. this.state.technicalPictureUrl = [];
  468. };
  469. },
  470. //添加一条跟进记录,点击保存按钮进行添加
  471. addFollowSubmit(e) {
  472. e.preventDefault();
  473. this.state.data = []
  474. this.setState({
  475. selectedRowKeys: [],
  476. //loading: deletedIds.length > 0
  477. });
  478. let deletedIds;
  479. this.state.data = [];
  480. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  481. let rowItem = this.state.selectedRows[idx];
  482. if (rowItem.id) {
  483. deletedIds=rowItem.id
  484. };
  485. };
  486. this.props.form.validateFields((err, values) => {
  487. // let theMaturityPictureUrl = [];
  488. // if (this.state.maturityPictureUrl.length) {
  489. // let picArr = [];
  490. // this.state.maturityPictureUrl.map(function (item) {
  491. // picArr.push(item.response.data);
  492. // });
  493. // theMaturityPictureUrl = picArr.join(",");
  494. // };
  495. if (!err) {
  496. this.setState({
  497. loading: true
  498. });
  499. let custype=values._shareType;
  500. let customerTypechange="";
  501. switch(custype){
  502. case "个人客户":customerTypechange=0;break;
  503. case "公司客户":customerTypechange=1;break;
  504. }
  505. console.log(this.state.kid)
  506. let companyIntentions= getCompanyIntentionOn(values.companyIntention);
  507. let followSituations= getfllowSituationOn(values.followSituation);
  508. alert("这是1234");
  509. $.ajax({
  510. method: "POST",
  511. dataType: "json",
  512. crossDomain: false,
  513. url:globalConfig.context + '/api/admin/customer/addFollow',
  514. data: {
  515. id: deletedIds,//编号id
  516. cuid:this.state.kid,//联系人ID
  517. followDates:(values.createTime ? values.createTime.format('YYYY-MM-DD'):undefined)+" "+(values.createTim ? values.createTim.format('YYYY:MM:DD'):undefined),//跟进时间
  518. followResult:values.remarks,//跟进结果
  519. attachment:"",//附件地址
  520. contactInfo:values.contacts,//联系信息,
  521. customerStatus:values.customerStatus,//跟进客户状态
  522. followSituation:values.followSituation,//跟进进度
  523. contactInfo:this.state.conts+"-"+(this.state.nub?this.state.nub:""),
  524. }
  525. }).done(function (data) {
  526. this.setState({
  527. loading: false
  528. });
  529. if (!data.error.length) {
  530. message.success('保存成功!');
  531. this.setModal1Visible(false)
  532. } else {
  533. message.warning(data.error[0].message);
  534. }
  535. this.loadData();
  536. }.bind(this));
  537. }
  538. })
  539. this.setModal5Visible(false);
  540. },
  541. //当选择联系人的列表变化时,则执行
  542. hundleName(e){
  543. let changNub=this.state.telNum[e];
  544. let changEmail=this.state.email[e];
  545. let kid=this.state.contactId[e];
  546. console.log(kid)
  547. this.setState({
  548. kid:kid,
  549. contacts:'电话',
  550. nub:this.state.telNum[e],
  551. lastName: e,
  552. changNub:changNub,
  553. changEmail:changEmail,
  554. });
  555. },
  556. //所有资料修改保存提交,点击保存按钮进行更新
  557. handleSubmit(e) {
  558. e.preventDefault();
  559. let adminName;
  560. let customerStatus;
  561. let companyIntention;
  562. let followSituation;
  563. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  564. let rowItem = this.state.selectedRows[idx];
  565. if (rowItem.id) {
  566. deletedIds=rowItem.id;
  567. adminName=rowItem.adminName;
  568. customerStatus=rowItem.customerStatus;
  569. companyIntention=rowItem.companyIntention;
  570. followSituation=rowItem.followSituation;
  571. };
  572. };
  573. this.state.data = []
  574. this.setState({
  575. selectedRowKeys: [],
  576. loading: deletedIds.length > 0
  577. });
  578. let deletedIds;
  579. this.state.data = [];
  580. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  581. let rowItem = this.state.selectedRows[idx];
  582. if (rowItem.id) {
  583. deletedIds=rowItem.id
  584. };
  585. };
  586. this.setState({
  587. selectedRowKeys: [],
  588. });
  589. this.props.form.validateFields((err, values) => {
  590. if (!err) {
  591. this.setState({
  592. loading: true
  593. });
  594. let custype=values._shareType;
  595. let customerTypechange="";
  596. switch(custype){
  597. case "个人客户":customerTypechange=0;break;
  598. case "公司客户":customerTypechange=1;break;
  599. }
  600. let companyIntentions= getCompanyIntentionOn(values.companyIntention);
  601. let followSituations= getfllowSituationOn(values.followSituation);
  602. alert("这是112233");
  603. $.ajax({
  604. method: "POST",
  605. dataType: "json",
  606. crossDomain: false,
  607. url:globalConfig.context + '/api/admin/customer/updCustomer',
  608. data: {
  609. id: deletedIds,//编号id
  610. customerTyp :customerTypechange,//客户信息 1
  611. createTime: values.createTime ? values.createTime.format('YYYY-MM-DD') : undefined,//时间 1\
  612. companyIntention: companyIntentions,
  613. companyName: values.companyName,//公司名称 1
  614. companyIndustry: values.companyIndustry,//公司行业
  615. tag: values.tag,
  616. locationProvince: values.locationProvince,//省份1
  617. adress: values.adress,//详细地址1
  618. remarks: values.remarks,//备注1
  619. followSituation:followSituations,//最新跟进1
  620. customerStatus: values.customerStatus,//客户状态1
  621. name: values.name,//客户姓名1
  622. mobile: values.mobile,//座机1
  623. telNum: values.telNum,//手机号码1
  624. sex: values.sex,//性别1
  625. customerPosition: values.customerPosition,//职位1
  626. wechat: values.wechat,//微信号1
  627. qq: values.qq,//qq 1
  628. depatrment: values.depatrment,//部门 1
  629. email: values.email,//邮箱 1
  630. shareTyp:0,
  631. customerStatus:customerStatus,
  632. beforeCustomerStatus:customerStatus,
  633. beforeCompanyIntention:companyIntention,
  634. beforeFollowSituation:followSituation,
  635. beforeAdminName:adminName,
  636. }
  637. }).done(function (data) {
  638. this.setState({
  639. loading: false
  640. });
  641. if (!data.error.length) {
  642. message.success('保存成功!');
  643. this.setModal1Visible(false)
  644. } else {
  645. message.warning(data.error[0].message);
  646. }
  647. this.loadData();
  648. }.bind(this));
  649. }
  650. })
  651. this.setModal5Visible(false);
  652. },
  653. submitcontact(e){
  654. let deletedIds;
  655. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  656. let rowItem = this.state.selectedRows[idx];
  657. if (rowItem.id) {
  658. deletedIds=rowItem.id
  659. };
  660. };
  661. this.setState({
  662. selectedRowKeys: [],
  663. });
  664. e.preventDefault();
  665. this.props.form.validateFields((err, values) => {
  666. if (!err) {
  667. this.setState({
  668. loading: true
  669. });
  670. alert(23333);
  671. $.ajax({
  672. method: "POST",
  673. dataType: "json",
  674. crossDomain: false,
  675. url: globalConfig.context + '/api/admin/customer/addContacter',
  676. data: {
  677. cid: deletedIds,//编号id
  678. sex:this.state.hot,//性别
  679. primaryFlg:this.state.hots,//是否是主要联系人
  680. name:this.state.paymentId,//联系人姓名
  681. mobile:this.state.paym,//座机
  682. telNum:this.state.pay,//电话
  683. qq:this.state.entId,//qq
  684. wechat:this.state.payId,//微信
  685. customerPosition:this.state.paentId,//职位
  686. depatrment:this.state.paytId,//部门
  687. email:this.state.email,//邮箱
  688. }
  689. }).done(function (data) {
  690. this.setState({
  691. loading: false
  692. });
  693. if (!data.error.length) {
  694. message.success('保存成功!');
  695. this.setModal2Visible(false)
  696. } else {
  697. message.warning(data.error[0].message);
  698. }
  699. this.loadData();
  700. }.bind(this));
  701. }
  702. });
  703. },
  704. getTechnicalPictureUrl(e) {
  705. this.setState({ technicalPictureUrl: e });
  706. },
  707. //新建联系人modal框显示
  708. showModal(){
  709. this.setState({
  710. visible: true,
  711. });
  712. },
  713. //指定转交人的点击函数
  714. showModa(){
  715. this.setState({
  716. visible: true,
  717. });
  718. let changeIds;
  719. let adminName;
  720. let customerStatus;
  721. let companyIntention;
  722. let followSituation;
  723. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  724. let rowItem = this.state.selectedRows[idx];
  725. if (rowItem.id) {
  726. changeIds=rowItem.id;
  727. adminName=rowItem.adminName;
  728. customerStatus=rowItem.customerStatus;
  729. companyIntention=rowItem.companyIntention;
  730. followSituation=rowItem.followSituation;
  731. };
  732. };
  733. $.ajax({
  734. method: "post",
  735. dataType: "json",
  736. crossDomain: false,
  737. url: globalConfig.context + "/api/admin/customer/findAdmin",
  738. data: {
  739. id: changeIds,//这一行数据的ID
  740. beforeCompanyIntention:companyIntention,//意向服务
  741. beforeCustomerStatus:customerStatus,//客户状态
  742. beforeFollowSituation:followSituation,//最新跟进状态
  743. beforeAdminName:adminName,//跟进人
  744. }
  745. }).done(function (data) {
  746. if (data.error && data.error.length) {
  747. message.warning(data.error[0].message);
  748. } else {
  749. let theAssigne = [];
  750. if (!data.data) {
  751. if (data.error && data.error.length) {
  752. message.warning(data.error[0].message);
  753. };
  754. alert(111);
  755. } else {
  756. for (let i = 0; i < data.data.length; i++) {
  757. let thisdata = data.data[i];
  758. //处理数据 进行循环
  759. theAssigne.push({
  760. key: thisdata.name,
  761. id: thisdata.id,
  762. ids: thisdata.cid,
  763. mobile:thisdata.mobile,
  764. adminName: thisdata.beforeAdminName,
  765. customerStatus: thisdata.beforeCustomerStatus,
  766. companyIntention: thisdata.beforeCompanyIntention,
  767. followSituation: thisdata.beforeFollowSituation,
  768. });
  769. };
  770. };
  771. this.setState({
  772. dataman: theAssigne,
  773. });
  774. }
  775. }.bind(this));
  776. },
  777. //选择了指定人之后的保存点击函数,需要修改函数
  778. changeAssigner() {
  779. this.setState({
  780. visible: false,
  781. });
  782. let changeId;
  783. let changeIds;
  784. let adminName;
  785. let beforeAdminName;
  786. let customerStatus;
  787. let companyIntention;
  788. let followSituation;
  789. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  790. let rowItem = this.state.selectedRows[idx];
  791. if (rowItem.id) {
  792. changeId=rowItem.id;
  793. beforeAdminName=rowItem.adminName;
  794. adminName=rowItem.key;
  795. customerStatus=rowItem.customerStatus;
  796. companyIntention=rowItem.companyIntention;
  797. followSituation=rowItem.followSituation;
  798. changeIds=rowItem.ids;
  799. };
  800. };
  801. $.ajax({
  802. method: "post",
  803. dataType: "json",
  804. crossDomain: false,
  805. url: globalConfig.context + "/api/admin/customer/transferCustomer",
  806. data: {
  807. id: changeIds,//这一行数据的ID
  808. aid:changeId,//指定转交人的ID
  809. beforeCompanyIntention:companyIntention,//意向服务
  810. beforeCustomerStatus:customerStatus,//客户状态
  811. beforeFollowSituation:followSituation,//最新跟进状态
  812. beforeAdminName:beforeAdminName,//之前的跟进人
  813. adminName:adminName,//转交的跟进人
  814. }
  815. }).done(function (data) {
  816. if (!data.error.length) {
  817. message.success('转交成功!');
  818. this.setState({
  819. loading: false,
  820. });
  821. } else {
  822. message.warning(data.error[0].message);
  823. };
  824. this.loadData();
  825. }.bind(this));
  826. },
  827. handleOk(e){
  828. this.setState({
  829. visible: false,
  830. });
  831. },
  832. handleCancel(e){
  833. this.setState({
  834. visible: false,
  835. });
  836. },
  837. //点击公司名称,进行弹出框动作,同时进行资料详情查询
  838. getInitialState() {
  839. return {
  840. technicalPictureUrl: [],
  841. modal1Visible: false,
  842. modal2Visible: false,
  843. visible: false ,
  844. searchMore: true,
  845. searchType: 0,
  846. validityPeriodDate: [],
  847. releaseDate: [],
  848. selectedRowKeys: [],
  849. selectedRows: [],
  850. loading: false,
  851. pagination: {
  852. defaultCurrent: 1,
  853. defaultPageSize: 10,
  854. showQuickJumper: true,
  855. pageSize: 10,
  856. onChange: function (page) {
  857. this.loadData(page);
  858. }.bind(this),
  859. showTotal: function (total) {
  860. return '共' + total + '条数据';
  861. }
  862. },
  863. columnsman:[{
  864. title: '姓名',
  865. dataIndex: 'key',
  866. key: 'key'
  867. },{
  868. title: '手机号码',
  869. dataIndex: 'mobile',
  870. key: 'mobile'
  871. }
  872. ],
  873. columns: [
  874. {
  875. title: '公司名称',
  876. dataIndex: 'companyName',
  877. key: 'companyName',
  878. render: text => {
  879. const theData = this.state.data || {};
  880. const contactsOption="";
  881. const { getFieldDecorator } = this.props.form;
  882. const FormItem = Form.Item
  883. const formItemLayout = {
  884. labelCol: { span: 8 },
  885. wrapperCol: { span: 14 },
  886. };
  887. return (
  888. <div>
  889. <Button onClick={() => this.setModal5Visible(true)}>{text}</Button>
  890. <Modal
  891. footer=''
  892. title="客户详情"
  893. width='1000px'
  894. visible={this.state.modal5Visible}
  895. onOk={() => this.setModal5Visible(false)}
  896. onCancel={() => this.setModal5Visible(false)}
  897. >
  898. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  899. <Spin spinning={this.state.loading}>
  900. <div className="clearfix">
  901. <FormItem className="half-item"
  902. {...formItemLayout}
  903. label="客户类型1223" >
  904. {getFieldDecorator('_shareType', {
  905. rules: [{ required: true, message: '此项为必填项!' }],
  906. initialValue: theData._shareType
  907. })(
  908. <Select placeholder="选择客户类型" style={{ width: 160 }} >
  909. <Select.Option value="0" >个人客户</Select.Option>
  910. <Select.Option value="1" >公司客户</Select.Option>
  911. </Select>
  912. )}
  913. </FormItem>
  914. <FormItem className="half-item"
  915. {...formItemLayout}
  916. label="" >
  917. <span>{theData.id}</span>
  918. </FormItem>
  919. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>基本资料:</div>
  920. <div>
  921. <FormItem className="half-item"
  922. {...formItemLayout}
  923. label="跟进记录" >
  924. <a href='#' onClick={() => this.setModal3Visible(true)} style={{marginRight:'50px',display:'inlineBlock'}}>已面谈</a><a href='#' onClick={() => this.setModal1Visible(true)}>新建</a>
  925. </FormItem>
  926. <FormItem className="half-item"
  927. {...formItemLayout}
  928. label="修改次数" >
  929. <span></span>
  930. </FormItem>
  931. <FormItem className="half-item"
  932. {...formItemLayout}
  933. label="转为共享用户时间" >
  934. <span></span>
  935. </FormItem>
  936. <FormItem className="half-item"
  937. {...formItemLayout}
  938. label="修改日志" >
  939. <span></span>
  940. </FormItem>
  941. <FormItem className="half-item"
  942. {...formItemLayout}
  943. label="注册账号" >
  944. <span></span>
  945. </FormItem>
  946. <FormItem className="half-item"
  947. {...formItemLayout}
  948. label="最后联系时间" >
  949. <span></span>
  950. </FormItem>
  951. <FormItem className="half-item"
  952. {...formItemLayout}
  953. label="业务操作" >
  954. <a href="#">查询</a>
  955. </FormItem>
  956. <FormItem className="half-item"
  957. {...formItemLayout}
  958. label="录入时间" >
  959. <span></span>
  960. </FormItem>
  961. <FormItem className="half-item"
  962. {...formItemLayout}
  963. label="跟单人" >
  964. <span>{theData.adminName}</span>
  965. </FormItem>
  966. </div>
  967. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>公司资料:</div>
  968. <div>
  969. <FormItem className="half-item"
  970. {...formItemLayout}
  971. label="公司名称" >
  972. {getFieldDecorator('companyName', {
  973. rules: [{ required: true, message: '此项为必填项!' }],
  974. initialValue: theData.companyName
  975. })(
  976. <Input />
  977. )}
  978. </FormItem>
  979. <FormItem className="half-item"
  980. {...formItemLayout}
  981. label="公司行业" >
  982. {getFieldDecorator('companyIndustry', {
  983. initialValue: theData.companyIndustry
  984. })(
  985. <Input />
  986. )}
  987. </FormItem>
  988. <FormItem className="half-item"
  989. {...formItemLayout}
  990. label="意向服务111" >
  991. {getFieldDecorator('companyIntention', {
  992. rules: [{ required: true, message: '此项为必填项!' }],
  993. initialValue: getCompanyIntention(theData.companyIntention)
  994. })(
  995. <Select placeholder="选择服务类型" >
  996. {
  997. intentionalService.map(function (item) {
  998. return <Select.Option key={item.value} >{item.key}</Select.Option>
  999. })
  1000. }
  1001. </Select>
  1002. )}
  1003. </FormItem>
  1004. <FormItem className="half-item"
  1005. {...formItemLayout}
  1006. label="地区" >
  1007. {getFieldDecorator('locationProvince', {
  1008. initialValue: getcityArr(theData.locationProvince)
  1009. })(
  1010. <Select placeholder="选择地区" style={{ width: 160 }} >
  1011. {
  1012. cityArr.map(function (item) {
  1013. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1014. })
  1015. }
  1016. </Select>
  1017. )}
  1018. </FormItem>
  1019. <FormItem className="half-item"
  1020. {...formItemLayout}
  1021. label="最新跟进" >
  1022. {getFieldDecorator('followSituation', {
  1023. rules: [{ required: true, message: '此项为必填项!' }],
  1024. initialValue: getfllowSituation(theData.followSituation)
  1025. })(
  1026. <Select placeholder="选择跟进进度" style={{ width: 160 }} >
  1027. {
  1028. newFollow.map(function (item) {
  1029. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1030. })
  1031. }
  1032. </Select>
  1033. )}
  1034. </FormItem>
  1035. <FormItem className="half-item"
  1036. {...formItemLayout}
  1037. label="客户状态" >
  1038. {getFieldDecorator('customerStatus', {
  1039. rules: [{ required: true, message: '此项为必填项!' }],
  1040. initialValue: getcustomerStatue(theData.customerStatus)
  1041. })(
  1042. <Select placeholder="选择客户状态" style={{ width: 160 }} >
  1043. {
  1044. customerStatus.map(function (item) {
  1045. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1046. })
  1047. }
  1048. </Select>
  1049. )}
  1050. </FormItem>
  1051. <FormItem className="half-item"
  1052. {...formItemLayout}
  1053. label="详细地址" >
  1054. {getFieldDecorator('adress', {
  1055. initialValue: theData.adress
  1056. })(
  1057. <Input />
  1058. )}
  1059. </FormItem>
  1060. <FormItem className="half-item"
  1061. {...formItemLayout}
  1062. label="标签" >
  1063. {getFieldDecorator('tag', {
  1064. initialValue: theData.tag
  1065. })(
  1066. <Select placeholder="选择客户标签" >
  1067. {
  1068. tag.map(function (item) {
  1069. return <Select.Option key={item.key} >{item.key}</Select.Option>
  1070. })
  1071. }
  1072. </Select>
  1073. )}
  1074. </FormItem>
  1075. <div className="clearfix">
  1076. <FormItem
  1077. labelCol={{ span: 4 }}
  1078. wrapperCol={{ span: 18 }}
  1079. label="备注" >
  1080. {getFieldDecorator('remarks', {
  1081. initialValue: theData.remarks
  1082. })(
  1083. <Input type="textarea" rows={4} />
  1084. )}
  1085. </FormItem>
  1086. </div>
  1087. </div>
  1088. <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>联系资料:</div>
  1089. <div>
  1090. <FormItem className="half-item"
  1091. {...formItemLayout}
  1092. label="姓名" >
  1093. {getFieldDecorator('contactName', {
  1094. rules: [{ required: true, message: '此项为必填项!' }],
  1095. initialValue: theData.contactName
  1096. })(
  1097. <Input />
  1098. )}
  1099. </FormItem>
  1100. <FormItem className="half-item"
  1101. {...formItemLayout}
  1102. label="性别" >
  1103. {getFieldDecorator('sex', {
  1104. rules: [{ required: true, message: '此项为必填项!' }],
  1105. initialValue: theData.sex
  1106. })(
  1107. <Radio.Group onChange={(e) => { this.setState({ sex: e.target.value }); }}>
  1108. <Radio value="0">男</Radio>
  1109. <Radio value="1">女</Radio>
  1110. </Radio.Group>
  1111. )}
  1112. </FormItem>
  1113. <FormItem className="half-item"
  1114. {...formItemLayout}
  1115. label="手机号码" >
  1116. {getFieldDecorator('telNum', {
  1117. initialValue: theData.telNum
  1118. })(
  1119. <Input />
  1120. )}
  1121. </FormItem>
  1122. <FormItem className="half-item"
  1123. {...formItemLayout}
  1124. label="座机号" >
  1125. {getFieldDecorator('mobile', {
  1126. initialValue: theData.mobile
  1127. })(
  1128. <Input />
  1129. )}
  1130. </FormItem>
  1131. <FormItem className="half-item"
  1132. {...formItemLayout}
  1133. label="QQ号码" >
  1134. {getFieldDecorator('qq', {
  1135. initialValue: theData.qq
  1136. })(
  1137. <Input />
  1138. )}
  1139. </FormItem>
  1140. <FormItem className="half-item"
  1141. {...formItemLayout}
  1142. label="邮箱号" >
  1143. {getFieldDecorator('email', {
  1144. initialValue: theData.email
  1145. })(
  1146. <Input />
  1147. )}
  1148. </FormItem>
  1149. <FormItem className="half-item"
  1150. {...formItemLayout}
  1151. label="微信" >
  1152. {getFieldDecorator('wechat', {
  1153. initialValue: theData.wechat
  1154. })(
  1155. <Input />
  1156. )}
  1157. </FormItem>
  1158. <FormItem className="half-item"
  1159. {...formItemLayout}
  1160. label="部门" >
  1161. {getFieldDecorator('depatrment', {
  1162. initialValue: theData.depatrment
  1163. })(
  1164. <Input />
  1165. )}
  1166. </FormItem>
  1167. <FormItem className="half-item"
  1168. {...formItemLayout}
  1169. label="职位" >
  1170. {getFieldDecorator('customerPosition', {
  1171. initialValue: theData.customerPosition
  1172. })(
  1173. <Input />
  1174. )}
  1175. </FormItem>
  1176. </div>
  1177. </div>
  1178. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  1179. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1180. <Button className="set-submit" type="ghost" onClick={() => this.setModal5Visible(false)}>取消</Button>
  1181. </FormItem>
  1182. </Spin>
  1183. </Form >
  1184. </Modal>
  1185. </div>
  1186. )
  1187. }
  1188. }, {
  1189. title: '客户类型',
  1190. dataIndex: '_shareType',
  1191. key: '_shareType'
  1192. // render: text => { return getcustomerTyp(text); }
  1193. }, {
  1194. title: '地区',
  1195. dataIndex: 'locationProvince',
  1196. key: 'locationProvince',
  1197. render: text => { return getcityArr(text); }
  1198. }, {
  1199. title: '联系人姓名',
  1200. dataIndex: 'contactName',
  1201. key: 'contactName',
  1202. },
  1203. {
  1204. title: '手机号',
  1205. dataIndex: 'telNum',
  1206. key:'telNum',
  1207. },
  1208. {
  1209. title: '客户状态',
  1210. dataIndex: '_customerStatus',
  1211. key: '_customerStatus'
  1212. //render: text => { return getcustomerStatue(text) }
  1213. },
  1214. {
  1215. title: '意向服务',
  1216. dataIndex: 'companyIntention',
  1217. key: 'companyIntention',
  1218. render: text => { return getCompanyIntention(text) }
  1219. },
  1220. {
  1221. title: '最新跟进',
  1222. dataIndex: '_followSituation',
  1223. key: '_followSituation',
  1224. render:text => {
  1225. const theData = this.state.data || {};
  1226. const contactsOption="";
  1227. const rowSelection = {
  1228. selectedRowKeys: this.state.selectedRowKeys,
  1229. onChange: (selectedRowKeys, selectedRows) => {
  1230. this.setState({
  1231. selectedRows: selectedRows.slice(-1),
  1232. selectedRowKeys: selectedRowKeys.slice(-1)
  1233. });
  1234. }
  1235. };
  1236. //const lastwomen=this.state.wemon || {};
  1237. const FormItem = Form.Item;
  1238. const { getFieldDecorator } = this.props.form;
  1239. const formItemLayout = {
  1240. labelCol: { span: 8 },
  1241. wrapperCol: { span: 14 },
  1242. };
  1243. const formItemLayput = {
  1244. labelCol: { span: 10 },
  1245. wrapperCol: { span: 14 },
  1246. };
  1247. return (
  1248. <div>
  1249. <Button onClick={() => this.setModal3Visible(true)} style={{marginRight:'10px'}}>{text}</Button>
  1250. <Button type="primary" onClick={() => this.setModal1Visible(true)} ><Icon type="plus" /></Button>
  1251. <Modal
  1252. style={{left:'500px'}}
  1253. footer=''
  1254. title="客户详细信息"
  1255. width='400px'
  1256. visible={this.state.modal4Visible}
  1257. onOk={() => this.setModal4Visible(false)}
  1258. onCancel={() => this.setModal4Visible(false)}
  1259. >
  1260. <Form horizontal onSubmit={this.submitcontact} id="demand-form">
  1261. <Spin spinning={this.state.loading}>
  1262. <div className='clearfix'>
  1263. <FormItem className="half-item"
  1264. {...formItemLayput}
  1265. label="所属公司" >
  1266. <span>{this.state.companyName}</span>
  1267. </FormItem>
  1268. <FormItem className="half-item"
  1269. {...formItemLayput}
  1270. label="性别" >
  1271. <span>{getsex(this.state.sex)}</span>
  1272. </FormItem>
  1273. <FormItem className="half-item"
  1274. {...formItemLayput}
  1275. label="姓名" >
  1276. <span>{this.state.name}</span>
  1277. </FormItem>
  1278. <FormItem className="half-item"
  1279. {...formItemLayput}
  1280. label="QQ号" >
  1281. <span>{this.state.qq}</span>
  1282. </FormItem>
  1283. <FormItem className="half-item"
  1284. {...formItemLayput}
  1285. label="手机号" >
  1286. <span>{this.state.telNum}</span>
  1287. </FormItem>
  1288. <FormItem className="half-item"
  1289. {...formItemLayput}
  1290. label="部门" >
  1291. <span>{this.state.depatrment}</span>
  1292. </FormItem>
  1293. <FormItem className="half-item"
  1294. {...formItemLayput}
  1295. label="职位" >
  1296. <span>{this.state.customerPosition}</span>
  1297. </FormItem>
  1298. <FormItem className="half-item"
  1299. {...formItemLayput}
  1300. label="微信号" >
  1301. <span>{this.state.wechat}</span>
  1302. </FormItem>
  1303. </div>
  1304. </Spin>
  1305. </Form>
  1306. </Modal>
  1307. <Modal
  1308. footer=''
  1309. title="历史记录列表"
  1310. width='600px'
  1311. visible={this.state.modal3Visible}
  1312. onOk={() => this.setModal3Visible(false)}
  1313. onCancel={() => this.setModal3Visible(false)}
  1314. >
  1315. <Spin spinning={this.state.loading}>
  1316. <Table dataSource={this.state.datahistory} >
  1317. <Column
  1318. title="时间"
  1319. dataIndex="_followDate"
  1320. key="_followDate"
  1321. />
  1322. <Column
  1323. title="客户"
  1324. dataIndex="contactName"
  1325. key="contactName"
  1326. render={(text, record) => (
  1327. <a href="#" onClick={() => this.setModal4Visible(true)}>{text}</a>
  1328. )}
  1329. />
  1330. <Column
  1331. title="跟进人"
  1332. dataIndex="adminName"
  1333. key="adminName"
  1334. />
  1335. <Column
  1336. title="联系方式"
  1337. dataIndex="contactInfo"
  1338. key="contactInfo"
  1339. />
  1340. <Column
  1341. title="最新跟进状态"
  1342. dataIndex="_followSituation"
  1343. key="_followSituation"
  1344. />
  1345. <Column
  1346. title="跟进结果"
  1347. dataIndex="查看更多"
  1348. key="查看更多"
  1349. render={(text, record) => (
  1350. <div>
  1351. <a href="#" onClick={() => this.setModal6Visible(true)}>查看更多</a>
  1352. <Modal
  1353. footer=''
  1354. title="更多详情"
  1355. visible={this.state.modal6Visible}
  1356. onOk={() => this.setModal6Visible(false)}
  1357. onCancel={() => this.setModal6Visible(false)}>
  1358. <Spin spinning={this.state.loading}>
  1359. <div className="clearfix">
  1360. <FormItem
  1361. labelCol={{ span: 5 }}
  1362. wrapperCol={{ span: 18 }}
  1363. label="跟进结果" >
  1364. <span>{}</span>
  1365. </FormItem>
  1366. </div>
  1367. <FormItem
  1368. labelCol={{ span: 5 }}
  1369. wrapperCol={{ span: 18 }}
  1370. label="附件" >
  1371. <div className="clearfix">
  1372. <Upload className="demandDetailShow-upload"
  1373. listType="picture-card"
  1374. fileList={this.state.attachment}
  1375. onPreview={(file) => {
  1376. this.setState({
  1377. previewImage: file.url || file.thumbUrl,
  1378. previewVisible: true,
  1379. });
  1380. }} >
  1381. </Upload>
  1382. <Modal maskClosable={false} footer={null}
  1383. visible={this.state.previewVisible}
  1384. onCancel={() => { this.setState({ previewVisible: false }) }}>
  1385. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  1386. </Modal>
  1387. </div>
  1388. </FormItem>
  1389. </Spin>
  1390. </Modal>
  1391. </div>
  1392. )}
  1393. />
  1394. <Column
  1395. title="删除记录"
  1396. key="del"
  1397. render={(text, record, index) => (
  1398. <Popconfirm title="是否删除?" onConfirm={() => this.onDelete(index)}>
  1399. <a href="#" style={{color:"#f00"}}>Delete</a>
  1400. </Popconfirm>
  1401. )}
  1402. />
  1403. </Table>
  1404. </Spin>
  1405. </Modal>
  1406. <Modal
  1407. footer=''
  1408. title="便捷修改"
  1409. width='1000px'
  1410. visible={this.state.modal1Visible}
  1411. onOk={() => this.setModal1Visible(false)}
  1412. onCancel={() => this.setModal1Visible(false)}
  1413. >
  1414. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  1415. <Spin spinning={this.state.loading}>
  1416. <div className="user-search">
  1417. <div className="clearfix">
  1418. <FormItem className="half-item"
  1419. {...formItemLayout}
  1420. label="客户公司名称:" >
  1421. <span>{theData.companyName}</span>
  1422. </FormItem>
  1423. </div>
  1424. <FormItem className="half-item"
  1425. {...formItemLayout}
  1426. label="最新联系人:" >
  1427. <Select placeholder="选择联系人" style={{ width: 140 }}
  1428. value={this.state.lastName}
  1429. onChange={this.hundleName}>
  1430. {this.state.orderStatusOption}
  1431. </Select>
  1432. <span style={{width:'120px',display:'inline-block',marginLeft:'20px'}}>{getcustomerTyp(theData.customerTyp)}
  1433. <Button type="primary" onClick={() => this.setModal2Visible(true)}>添加</Button>
  1434. </span>
  1435. <Modal
  1436. footer=''
  1437. width='800px'
  1438. title="添加详情"
  1439. visible={this.state.modal2Visible}
  1440. onOk={() => this.setModal2Visible(false)}
  1441. onCancel={() => this.setModal2Visible(false)}
  1442. >
  1443. <Form horizontal onSubmit={this.submitcontact} id="demand-form">
  1444. <Spin spinning={this.state.loading}>
  1445. {/* <Row>
  1446. <FormItem className="half-item"
  1447. {...formItemLayout}
  1448. label="所属公司" >
  1449. <span>{theData.id}</span>
  1450. </FormItem>
  1451. </Row>*/}
  1452. <Row>
  1453. <FormItem
  1454. labelCol={{ span: 4 }}
  1455. wrapperCol={{ span: 14 }}
  1456. label="是否是主要联系人:" style={{marginRight:'10px'}}>
  1457. <Radio.Group value={this.state.hots} onChange={(e) => {
  1458. this.setState({ hots: e.target.value })
  1459. }}>
  1460. <Radio value={0}>是</Radio>
  1461. <Radio value={1}>否</Radio>
  1462. </Radio.Group>
  1463. </FormItem>
  1464. <FormItem
  1465. labelCol={{ span: 4 }}
  1466. wrapperCol={{ span: 14 }}
  1467. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  1468. <Radio.Group value={this.state.hot} onChange={(e) => {
  1469. this.setState({ hot: e.target.value })
  1470. }}>
  1471. <Radio value={0}>男</Radio>
  1472. <Radio value={1}>女</Radio>
  1473. </Radio.Group>
  1474. </FormItem>
  1475. </Row>
  1476. <Row style={{ paddingLeft:'50px' }}>
  1477. <Col span={2}>姓名:</Col>
  1478. <Col span={8}>
  1479. <Input value={this.state.paymentId}
  1480. onChange={(e) => { this.setState({ paymentId: e.target.value }) }} />
  1481. </Col>
  1482. <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
  1483. <Col span={8}>
  1484. <Input value={this.state.entId}
  1485. onChange={(e) => { this.setState({ entId: e.target.value }) }} />
  1486. </Col>
  1487. </Row>
  1488. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1489. <Col span={2}>手机号:</Col>
  1490. <Col span={8}>
  1491. <Input value={this.state.pay}
  1492. onChange={(e) => { this.setState({ pay: e.target.value }) }} />
  1493. </Col>
  1494. <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
  1495. <Col span={8}>
  1496. <Input value={this.state.paym}
  1497. onChange={(e) => { this.setState({ paym: e.target.value }) }} />
  1498. </Col>
  1499. </Row>
  1500. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  1501. <Col span={2}>部门:</Col>
  1502. <Col span={8}>
  1503. <Input value={this.state.paytId}
  1504. onChange={(e) => { this.setState({ paytId: e.target.value }) }} />
  1505. </Col>
  1506. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  1507. <Col span={8}>
  1508. <Input value={this.state.paentId}
  1509. onChange={(e) => { this.setState({ paentId: e.target.value }) }} />
  1510. </Col>
  1511. </Row>
  1512. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  1513. <Col span={2}>微信号:</Col>
  1514. <Col span={8}>
  1515. <Input value={this.state.payId}
  1516. onChange={(e) => { this.setState({ payId: e.target.value }) }} />
  1517. </Col>
  1518. <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
  1519. <Col span={8}>
  1520. <Input value={this.state.email}
  1521. onChange={(e) => { this.setState({ email: e.target.value }) }} />
  1522. </Col>
  1523. </Row>
  1524. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  1525. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  1526. <Button className="set-submit" type="ghost" onClick={() => this.setModal2Visible(false)} id='change_rem'>取消</Button>
  1527. </Row>
  1528. </Spin>
  1529. </Form>
  1530. </Modal>
  1531. </FormItem>
  1532. <FormItem className="half-item"
  1533. {...formItemLayout}
  1534. label="联系方式" >
  1535. <Select placeholder="选择方式" style={{width:'100px'}} value={this.state.contacts}
  1536. onChange={this.contacts}>
  1537. <Select.Option value="0">电话</Select.Option>
  1538. <Select.Option value="1">邮件</Select.Option>
  1539. <Select.Option value="2">面谈</Select.Option>
  1540. <Select.Option value="3">短信</Select.Option>
  1541. </Select>
  1542. <span style={{marginLeft:'20px'}}>{this.state.nub}</span>
  1543. </FormItem>
  1544. <FormItem className="half-item"
  1545. {...formItemLayout}
  1546. label="最近跟进时间:" >
  1547. <span>{theData.createTime}</span>
  1548. </FormItem>
  1549. <div>
  1550. <FormItem className="half-item"
  1551. {...formItemLayout}
  1552. label="最新跟进时间" >
  1553. {getFieldDecorator('createTime', {
  1554. initialValue: theData.createTime ? moment(theData.createTime) : null
  1555. })(
  1556. <DatePicker />
  1557. )}
  1558. {getFieldDecorator('createTim', {
  1559. initialValue: theData.createTime ? moment(theData.createTime) : null
  1560. })(
  1561. <TimePicker />
  1562. )}
  1563. </FormItem>
  1564. </div>
  1565. <FormItem className="half-item"
  1566. {...formItemLayout}
  1567. label="客户状态:" >
  1568. <span>{getcustomerStatue(theData.customerStatus)}</span>
  1569. </FormItem>
  1570. <FormItem className="half-item"
  1571. {...formItemLayout}
  1572. label="更新客户状态" >
  1573. {getFieldDecorator('customerStatus', {
  1574. initialValue: getcustomerStatue(theData.customerStatus)
  1575. })(
  1576. <Select placeholder="选择客户状态" style={{width:'200px'}}>
  1577. {
  1578. customerStatus.map(function (item) {
  1579. return <Select.Option key={item.value} style={{width:'200px'}}>{item.key}</Select.Option>
  1580. })
  1581. }
  1582. </Select>
  1583. )}
  1584. </FormItem>
  1585. <FormItem className="half-item"
  1586. {...formItemLayout}
  1587. label="跟进状态:" >
  1588. <span>{getfllowSituation(theData.followSituation)}</span>
  1589. </FormItem>
  1590. <FormItem className="half-item"
  1591. {...formItemLayout}
  1592. label="最新跟进状态" >
  1593. {getFieldDecorator('followSituation', {
  1594. initialValue: getfllowSituation(theData.followSituation)
  1595. })(
  1596. <Select placeholder="选择跟进状态" style={{width:'200px'}}>
  1597. {
  1598. newFollow.map(function (item) {
  1599. return <Select.Option key={item.value} style={{width:'200px'}}>{item.key}</Select.Option>
  1600. })
  1601. }
  1602. </Select>
  1603. )}
  1604. </FormItem>
  1605. <div className="clearfix">
  1606. <FormItem
  1607. labelCol={{ span: 4 }}
  1608. wrapperCol={{ span: 18 }}
  1609. label="跟进结果" >
  1610. {getFieldDecorator('remarks', {
  1611. initialValue: theData.remarks
  1612. })(
  1613. <Input type="textarea" rows={4} />
  1614. )}
  1615. </FormItem>
  1616. </div>
  1617. <div className="clearfix">
  1618. <FormItem
  1619. labelCol={{ span: 4 }}
  1620. wrapperCol={{ span: 18 }}
  1621. label="技术图片" >
  1622. <PicturesWall
  1623. pictureSign="achievement_technical_picture"
  1624. fileList={this.getTechnicalPictureUrl}
  1625. pictureUrl={this.state.technicalPictureUrl} />
  1626. <p>图片建议:图片要清晰。</p>
  1627. </FormItem>
  1628. </div>
  1629. <Button style={{ marginRight: '20px' ,marginLeft:'160px',marginBottom:'50px'}} type="primary" onClick={this.addFollowSubmit}>保存</Button>
  1630. <Button className="set-submit" type="ghost" onClick={() => this.setModal1Visible(false)} id='change_rem'>取消</Button>
  1631. </div>
  1632. </Spin>
  1633. </Form >
  1634. </Modal>
  1635. </div>
  1636. )
  1637. }
  1638. },
  1639. {
  1640. title: '跟单人',
  1641. dataIndex: 'adminName',
  1642. key: 'adminName',
  1643. },
  1644. {
  1645. title: '时间',
  1646. dataIndex: 'followDate',
  1647. key: 'followDate',
  1648. }
  1649. ],
  1650. dataSource: [],
  1651. searchTime: [,]
  1652. };
  1653. },
  1654. componentWillMount() {
  1655. let theArr = [];
  1656. customerStatus.map(function (item) {
  1657. theArr.push(
  1658. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1659. )
  1660. });
  1661. let auditArr = [];
  1662. cityArr.map(function (item) {
  1663. auditArr.push(
  1664. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1665. )
  1666. });
  1667. let intentionalArr = [];
  1668. intentionalService.map(function (item) {
  1669. intentionalArr.push(
  1670. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1671. )
  1672. });
  1673. let newArr = [];
  1674. newFollow.map(function (item) {
  1675. newArr.push(
  1676. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1677. )
  1678. });
  1679. this.state.customerStatuarr = theArr;
  1680. this.state.auditStatusOption = auditArr;
  1681. this.state.intentionalOption = intentionalArr;
  1682. this.state.newOption = newArr;
  1683. if (window.location.search) {
  1684. let theObj = getSearchUrl(window.location.search);
  1685. if (theObj.rid) {
  1686. theObj.id = theObj.rid;
  1687. if (theObj.rid != 'null') {
  1688. this.tableRowClick(theObj);
  1689. };
  1690. };
  1691. };
  1692. this.loadData();
  1693. },
  1694. tableRowClick(record, index) {
  1695. this.state.RowData = record;
  1696. this.setState({
  1697. showDesc: true
  1698. });
  1699. },
  1700. //删除功能,已经完成
  1701. delectRow() {
  1702. let deletedIds;
  1703. let adminName;
  1704. let customerStatus;
  1705. let companyIntention;
  1706. let followSituation;
  1707. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1708. let rowItem = this.state.selectedRows[idx];
  1709. if (rowItem.id) {
  1710. deletedIds=rowItem.id;
  1711. adminName=rowItem.adminName;
  1712. customerStatus=rowItem.customerStatus;
  1713. companyIntention=rowItem.companyIntention;
  1714. followSituation=rowItem.followSituation;
  1715. };
  1716. };
  1717. this.state.data = []
  1718. this.setState({
  1719. selectedRowKeys: [],
  1720. loading: deletedIds.length > 0
  1721. });
  1722. $.ajax({
  1723. method: "post",
  1724. dataType: "json",
  1725. crossDomain: false,
  1726. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  1727. data: {
  1728. id: deletedIds,//删除的ID
  1729. beforeCustomerStatus:customerStatus,
  1730. beforeCompanyIntention:companyIntention,
  1731. beforeFollowSituation:followSituation,
  1732. adminName:adminName
  1733. }
  1734. }).done(function (data) {
  1735. if (!data.error.length) {
  1736. message.success('删除成功!');
  1737. this.setState({
  1738. loading: false,
  1739. });
  1740. } else {
  1741. message.warning(data.error[0].message);
  1742. };
  1743. this.loadData();
  1744. }.bind(this));
  1745. },
  1746. //转为公共客户功能
  1747. changeRow() {
  1748. let deletedIds;
  1749. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1750. let rowItem = this.state.selectedRows[idx];
  1751. if (rowItem.id) {
  1752. deletedIds=rowItem.id
  1753. };
  1754. };
  1755. this.setState({
  1756. selectedRowKeys: [],
  1757. loading: deletedIds.length > 0
  1758. });
  1759. $.ajax({
  1760. method: "GET",
  1761. dataType: "json",
  1762. crossDomain: false,
  1763. url: globalConfig.context + "/api/admin/customer/deleteCustomer", //等待接口
  1764. data: {
  1765. id: deletedIds
  1766. }
  1767. }).done(function (data) {
  1768. if (!data.data.error.length) {
  1769. message.success('已转为公共客户!');
  1770. this.setState({
  1771. loading: false,
  1772. });
  1773. } else {
  1774. message.warning(data.error[0].message);
  1775. };
  1776. this.loadData();
  1777. }.bind(this));
  1778. },
  1779. addClick() {
  1780. this.state.RowData = {};
  1781. this.setState({
  1782. showDesc: true
  1783. });
  1784. },
  1785. closeDesc(e, s) {
  1786. this.state.showDesc = e;
  1787. if (s) {
  1788. this.loadData();
  1789. };
  1790. },
  1791. search() {
  1792. this.loadData();
  1793. },
  1794. reset() {
  1795. this.state.id = undefined;
  1796. this.state.customerName = undefined;
  1797. this.state.shareTyp = undefined;
  1798. this.state.province = undefined;
  1799. this.state.ownerType = undefined;
  1800. this.state.customerStatus = undefined;
  1801. this.state.auditStatus = undefined;
  1802. this.state.adminName = undefined;
  1803. this.state.contactName = undefined;
  1804. this.state.releaseDate = [];
  1805. this.loadData();
  1806. },
  1807. searchSwitch() {
  1808. this.setState({
  1809. searchMore: !this.state.searchMore
  1810. });
  1811. },
  1812. render() {
  1813. const FormItem = Form.Item
  1814. const rowSelection = {
  1815. selectedRowKeys: this.state.selectedRowKeys,
  1816. onChange: (selectedRowKeys, selectedRows) => {
  1817. this.setState({
  1818. selectedRows: selectedRows.slice(-1),
  1819. selectedRowKeys: selectedRowKeys.slice(-1)
  1820. });
  1821. }
  1822. };
  1823. const hasSelected = this.state.selectedRowKeys.length > 0;
  1824. const { RangePicker } = DatePicker;
  1825. const theData = this.props.data || {};
  1826. const { getFieldDecorator } = this.props.form;
  1827. const formItemLayout = {
  1828. labelCol: { span: 8 },
  1829. wrapperCol: { span: 14 },
  1830. };
  1831. return (
  1832. <div className="user-content" >
  1833. <div className="content-title">
  1834. <span>客户管理</span>
  1835. <div className="patent-addNew clearfix">
  1836. <Upload
  1837. action={globalConfig.context + "/api/admin/achievement/uploadTemplate"}
  1838. data={{ 'sign': 'achievement_template' }}
  1839. beforeUpload={beforeUploadFile}
  1840. showUploadList={false}
  1841. onChange={(info) => {
  1842. if (info.file.status !== 'uploading') {
  1843. console.log(info.file, info.fileList);
  1844. }
  1845. if (info.file.status === 'done') {
  1846. if (!info.file.response.error.length) {
  1847. message.success(`${info.file.name} 文件上传成功!`);
  1848. } else {
  1849. message.warning(info.file.response.error[0].message);
  1850. return;
  1851. };
  1852. } else if (info.file.status === 'error') {
  1853. message.error(`${info.file.name} 文件上传失败。`);
  1854. };
  1855. }} >
  1856. <Button>上传批量导入模板</Button>
  1857. </Upload>
  1858. <Button onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }}>下载批量导入模板</Button>
  1859. <Button type="primary" className="addButton" onClick={this.addClick}>新建客户<Icon type="plus" /></Button>
  1860. <BatchImport closeDesc={this.closeDesc} />
  1861. </div>
  1862. </div>
  1863. <div className="user-search">
  1864. <Input placeholder="公司名称"
  1865. value={this.state.customerName}
  1866. onChange={(e) => { this.setState({ customerName: e.target.value }); }} />
  1867. <Select placeholder="客户类型" style={{ width: 120 }}
  1868. value={this.state.shareTyp }
  1869. onChange={(e) => { this.setState({ shareTyp : e }) }}>
  1870. <Select.Option value="0" >个人客户</Select.Option>
  1871. <Select.Option value="1" >公司客户</Select.Option>
  1872. </Select>
  1873. <Select placeholder="意向服务"
  1874. style={{ width: 160 }}
  1875. value={this.state.companyIntention}
  1876. onChange={(e) => { this.setState({ companyIntention: e }) }}>
  1877. {this.state.intentionalOption}
  1878. </Select>
  1879. <Select placeholder="跟进进度"
  1880. style={{ width: 160 }}
  1881. value={this.state.followSituation}
  1882. onChange={(e) => { this.setState({ followSituation: e }) }}>
  1883. {this.state.newOption}
  1884. </Select>
  1885. <Select placeholder="地区"
  1886. style={{ width: 160 }}
  1887. value={this.state.province}
  1888. onChange={(e) => { this.setState({ province: e }) }}>
  1889. {this.state.auditStatusOption}
  1890. </Select>
  1891. <Select placeholder="客户状态" style={{ width: 120 }}
  1892. value={this.state.customerStatus}
  1893. onChange={(e) => { this.setState({ customerStatus: e }) }}>
  1894. {this.state.customerStatuarr}
  1895. </Select>
  1896. <Button type="primary" onClick={this.search}>搜索</Button>
  1897. <Button onClick={this.reset}>重置</Button>
  1898. <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
  1899. disabled={!hasSelected}
  1900. onClick={this.delectRow}>删除<Icon type="minus" /></Button>
  1901. <Button type="primary" onClick={this.showModa} disabled={!hasSelected}>指定转交人<Icon type="plus" /></Button>
  1902. <Modal
  1903. footer=''
  1904. title="选择指定人"
  1905. visible={this.state.visible}
  1906. onOk={this.handleOk}
  1907. onCancel={this.handleCancel}
  1908. >
  1909. <Spin spinning={this.state.loading}>
  1910. <Table
  1911. columns={this.state.columnsman}
  1912. rowSelection={rowSelection}
  1913. dataSource={this.state.dataman}
  1914. scroll={{ y: 300 }}/>
  1915. <FormItem wrapperCol={{ span: 12, offset: 12 }}>
  1916. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:"50px"}} onClick={this.changeAssigner }>保存</Button>
  1917. <Button className="set-submit" type="ghost" onClick={this.handleCancel } style={{marginLeft:"30px"}} id='change_rem'>取消</Button>
  1918. </FormItem>
  1919. </Spin>
  1920. </Modal>
  1921. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  1922. disabled={!hasSelected}
  1923. onClick={this.changeRow}>转为公共客户<Icon /></Button>
  1924. <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1925. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1926. <Input placeholder="跟单人" style={{width:'140px',marginRight:'10px'}}
  1927. value={this.state.adminName}
  1928. onChange={(e) => { this.setState({ adminName: e.target.value }); }} />
  1929. <Input placeholder="联系人姓名" style={{width:'140px',marginRight:'10px'}}
  1930. value={this.state.contactName}
  1931. onChange={(e) => { this.setState({ contactName: e.target.value }); }} />
  1932. <span>发布时间 :</span>
  1933. <RangePicker
  1934. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1935. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1936. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1937. </div>
  1938. </div>
  1939. <div className="patent-table">
  1940. <Spin spinning={this.state.loading}>
  1941. <Table columns={this.state.columns}
  1942. dataSource={this.state.dataSource}
  1943. rowSelection={rowSelection}
  1944. pagination={this.state.pagination}
  1945. />
  1946. </Spin>
  1947. </div>
  1948. <TechAchievementDesc
  1949. data={this.state.RowData}
  1950. detailApiUrl={this.props['data-detailApiUrl']}
  1951. achievementCategoryOption={this.state.achievementCategoryOption}
  1952. showDesc={this.state.showDesc}
  1953. closeDesc={this.closeDesc} />
  1954. </div >
  1955. );
  1956. }
  1957. }));
  1958. export default AchievementList;