myClient.jsx 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553
  1. import React from 'react';
  2. import { Radio, Icon, Button, Input, Select, Tabs,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. import { areaSelect } from '../../NewDicProvinceList';
  8. const { Column, ColumnGroup } = Table;
  9. const TabPane = Tabs.TabPane;
  10. import CustomerDetail from './myClientDesc.jsx';
  11. import { achievementCategoryList, techAuditStatusList,cityArr,tag,customerStatus,intentionalService,newFollow ,contact,sex} from '../../dataDic.js';
  12. import { beforeUploadFile, companySearch, getAchievementCategory,getsex,getSearchUrl,getTag,getTechAuditStatus,getcustomerTyp,getcityArr,getCompanyIntentionOn,getcustomerStatue,getCompanyIntention,getfllowSituation,getcontact,getfllowSituationOn,getcustomerStatueOn} from '../../tools.js';
  13. import BatchImport from './batchImport';
  14. //图片组件
  15. const PicturesWall = React.createClass({
  16. getInitialState() {
  17. return {
  18. previewVisible: false,
  19. previewImage: '',
  20. fileList: [],
  21. }
  22. },
  23. handleCancel() {
  24. this.setState({ previewVisible: false })
  25. },
  26. handlePreview(file) {
  27. this.setState({
  28. previewImage: file.url || file.thumbUrl,
  29. previewVisible: true,
  30. });
  31. },
  32. handleChange(info) {
  33. let fileList = info.fileList;
  34. this.setState({ fileList });
  35. this.props.fileList(fileList);
  36. },
  37. componentWillReceiveProps(nextProps) {
  38. this.state.fileList = nextProps.pictureUrl;
  39. },
  40. render() {
  41. const { previewVisible, previewImage, fileList } = this.state;
  42. const uploadButton = (
  43. <div>
  44. <Icon type="plus" />
  45. <div className="ant-upload-text">点击上传</div>
  46. </div>
  47. );
  48. return (
  49. <div className="clearfix">
  50. <Upload
  51. action={globalConfig.context + "/api/admin/customer/attachmentUpload"}
  52. data={{ 'sign': this.props.pictureSign }}
  53. listType="picture-card"
  54. fileList={fileList}
  55. onPreview={this.handlePreview}
  56. onChange={this.handleChange} >
  57. {fileList.length >= 5 ? null : uploadButton}
  58. </Upload>
  59. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  60. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  61. </Modal>
  62. </div>
  63. );
  64. }
  65. });
  66. const AchievementList = Form.create()(React.createClass({
  67. loadData(pageNo, apiUrl) {
  68. this.state.data = [];
  69. this.setState({
  70. loading: true
  71. });
  72. $.ajax({
  73. method: "post",
  74. dataType: "json",
  75. crossDomain: false,
  76. url:globalConfig.context + '/api/admin/customer/listPrivateCustomer',
  77. data: {
  78. pageNo: pageNo || 1,
  79. pageSize: this.state.pagination.pageSize,
  80. companyName: this.state.companyNamet, //名称1
  81. customerType: this.state.customerTypet, //客户类型1
  82. locationProvince:this.state.locationProvincet,//地区
  83. customerStatus:this.state.customerStatust,//客户状态1
  84. contactName:this.state.contactNamet,//联系人姓名1
  85. contactTel:this.state.contactTelt,//联系人手机
  86. companyIntention:this.state.companyIntentiont,//意向服务
  87. followSituation:this.state.followSituationt,//最新跟进进度
  88. },
  89. success: function (data) {
  90. let theArr = [];
  91. let ad;
  92. if (data.error.length || data.data.list=="") {
  93. if (data.error && data.error.length) {
  94. message.warning(data.error[0].message);
  95. };
  96. } else {
  97. ad=data.data.list[0].aid;
  98. for (let i = 0; i < data.data.list.length; i++) {
  99. let thisdata = data.data.list[i];
  100. let intentionText=thisdata._companyIntention.split("-");
  101. let intentionstring=intentionText.slice("0","1").join('-')
  102. theArr.push({
  103. key: i,
  104. id: thisdata.id,
  105. companyName:thisdata.companyName,//公司名称
  106. _shareType:thisdata._shareType,//客户类型
  107. locationProvince:thisdata.locationProvince,//地区
  108. contactName:thisdata.contactName, //联系人姓名
  109. telNum:thisdata.telNum,//手机号
  110. _customerStatus:thisdata._customerStatus,//客户状态
  111. _companyIntention:intentionstring,//意向服务
  112. _followSituation:thisdata._followSituation,//最新跟进
  113. customerStatus:thisdata.customerStatus,//客户状态
  114. companyIntention:thisdata.companyIntention,//意向服务
  115. followSituation:thisdata.followSituation,//最新跟进
  116. adminName:thisdata.adminName, //跟进人
  117. followDate:thisdata.followDate,
  118. _customerType:thisdata._customerType,//客户类型
  119. });
  120. };
  121. this.state.pagination.current = data.data.pageNo;
  122. this.state.pagination.total = data.data.totalCount;
  123. };
  124. this.setState({
  125. aid:ad,
  126. dataSource: theArr,
  127. pagination: this.state.pagination
  128. });
  129. }.bind(this),
  130. }).always(function () {
  131. this.setState({
  132. loading: false
  133. });
  134. }.bind(this));
  135. },
  136. //点击+号进行两次查询,这个是查询联系人的函数
  137. getNewWoman(index) {
  138. this.state.data = []
  139. $.ajax({
  140. method: "post",
  141. dataType: "json",
  142. crossDomain: false,
  143. url: globalConfig.context + "/api/admin/customer/findCustomerUserList",
  144. data:{
  145. cid:index
  146. },
  147. success: function (data) {
  148. let theArr = [];
  149. let thedata=data.data;
  150. if (!thedata) {
  151. if (data.error && data.error.length) {
  152. message.warning(data.error[0].message);
  153. };
  154. thedata = {};
  155. };
  156. var email=[];
  157. var telNum=[];
  158. var watch=[];
  159. var qq=[];
  160. var contactIds=[];
  161. thedata.map(function (item,index) {
  162. watch.push(thedata[index].wechat);
  163. qq.push(thedata[index].qq);
  164. email.push(thedata[index].email);
  165. contactIds.push(thedata[index].id);
  166. telNum.push(thedata[index].telNum);
  167. theArr.push(<Select.Option value={index}>{item.name}</Select.Option>)
  168. });
  169. var lastName= thedata[thedata.length-1].name;
  170. var nub=thedata[thedata.length-1].telNum;
  171. var kid=thedata[thedata.length-1].id;
  172. var contacts='电话';
  173. this.setState({
  174. idt:thedata[0].id,
  175. kid:kid,
  176. contactIds:contactIds,
  177. contacts:contacts,
  178. nub:nub,
  179. telNum:telNum,
  180. email:email,
  181. watch:watch,
  182. qq:qq,
  183. lastName:lastName,
  184. orderStatusOption: theArr,
  185. technicalPictureUrl: thedata.sign ? splitUrl(thedata.sign, ',', globalConfig.avatarHost + '/upload') : [],
  186. });
  187. }.bind(this),
  188. }).always(function () {
  189. this.setState({
  190. loading: false
  191. });
  192. }.bind(this));
  193. },
  194. //在添加联系记录页面,选择联系方式查看号码
  195. contacts(e){
  196. let conts='';
  197. if(e==0){
  198. conts='电话'
  199. this.state.nub=this.state.changNub
  200. }
  201. if(e==1){
  202. conts='邮件'
  203. this.state.nub=this.state.changEmail
  204. }
  205. if(e==2){
  206. conts='微信'
  207. this.state.nub=this.state.changWatch
  208. }
  209. if(e==3){
  210. conts='QQ'
  211. this.state.nub=this.state.changQq
  212. }
  213. this.setState({
  214. conts:conts,
  215. contacts: e,
  216. });
  217. },
  218. //通过ID查询这一条的信息
  219. Detailload(deletedIds,record){
  220. this.RowClick;
  221. $.ajax({
  222. method: "post",
  223. dataType: "json",
  224. crossDomain: false,
  225. url: globalConfig.context + '/api/admin/customer/findCustomerDetails',
  226. data: {
  227. id: deletedIds
  228. },
  229. success: function (data) {
  230. let thisData = data.data;
  231. if (!thisData) {
  232. if (data.error && data.error.length) {
  233. message.warning(data.error[0].message);
  234. };
  235. thisData = {};
  236. };
  237. //意向服务多选
  238. // let companyArr=[];
  239. // let companyString=thisData.companyIntention;
  240. // companyArr=companyString.split(",") ;
  241. let creatMent=thisData.createTime.substr(10,9);
  242. let createYear=thisData.createTime.substr(0,10);
  243. let followSituationTxt=getfllowSituation(thisData.followSituation.toString());
  244. this.setState({
  245. locationProvince:thisData.locationProvince,
  246. addId:thisData.id,
  247. creatMent:creatMent,
  248. createYear:createYear,
  249. addCid:thisData.cid,
  250. datak: thisData,
  251. companyIndustry:thisData.companyIndustry,
  252. adress:thisData.adress,
  253. followSituation:followSituationTxt,
  254. customerStatus:thisData.customerStatus.toString(),
  255. companyIntention:thisData.companyIntention,
  256. _followSituation:thisData._followSituation,
  257. _customerStatus:thisData._customerStatus,
  258. _companyIntention:thisData._companyIntention,
  259. cid:thisData.cid,
  260. customerType:thisData.customerType,
  261. companyName:thisData.companyName,
  262. adminName:thisData.adminName
  263. });
  264. if (thisData.ownerId) {
  265. this.getContactsList(thisData.ownerId);
  266. };
  267. }.bind(this),
  268. }).always(function () {
  269. this.setState({
  270. loading: false
  271. });
  272. }.bind(this));
  273. },
  274. //点击出现函数
  275. //点击消失函数
  276. setModal1Visiblecancel(e) {
  277. this.setState({
  278. modal1Visible:false
  279. });
  280. this.reset();
  281. },
  282. //点击添加跟进记录,点击最新跟进下的+号,将会查询出很多数据,展示在列表里面,
  283. setModal1VisibleOk(e) {
  284. this.setState({modal1Visible:true});
  285. this.state.remarkst='';
  286. let deletedIds;
  287. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  288. let rowItem = this.state.selectedRows[idx];
  289. if (rowItem.id) {
  290. deletedIds=rowItem.id;
  291. };
  292. };
  293. this.setState({
  294. remarks:'',
  295. selectedRowKeys: [],
  296. });
  297. this.Detailload(deletedIds);
  298. this.getNewWoman(deletedIds);
  299. },
  300. //点击出现函数
  301. setModal2VisibleOk(e) {
  302. this.setState({
  303. modal2Visible:true
  304. });
  305. this.state.hotst=undefined;
  306. this.state.hott=undefined;
  307. this.state.paymentIdt='';
  308. this.state.entIdt='';
  309. this.state.payt='';
  310. this.state.paymt='';
  311. this.state.paytIdtt='';
  312. this.state.paentIdt='';
  313. this.state.payIdt='';
  314. this.state.emailst='';
  315. },
  316. //点击消失函数
  317. setModal2Visiblecancel(e) {
  318. this.setState({
  319. modal2Visible:false
  320. });
  321. },
  322. //点击消失函数
  323. setModal3Visiblecancel(e) {
  324. this.setState({
  325. modal3Visible:false
  326. });
  327. },
  328. rescordlist(deletedIds){
  329. this.setState({
  330. selectedRowKeys:[],
  331. });
  332. this.state.data = [];
  333. $.ajax({
  334. method: "get",
  335. dataType: "json",
  336. crossDomain: false,
  337. url:globalConfig.context + '/api/admin/customer/listFollowUpRecord',
  338. data: {
  339. customerId:deletedIds
  340. },
  341. success: function (data) {
  342. let theArr = [];
  343. let theWomanID=[];
  344. let theFollowID=[];
  345. if (!data.data) {
  346. if (data.error && data.error.length) {
  347. message.warning(data.error[0].message);
  348. };
  349. } else {
  350. data.data.map(function (item,index) {
  351. theWomanID.push(data.data[index].contactId);
  352. });
  353. data.data.map(function (item,index) {
  354. theFollowID.push(data.data[index].followId);
  355. });
  356. for (let i = 0; i < data.data.length; i++) {
  357. let thisdata = data.data[i];
  358. theArr.push({
  359. key:i,
  360. _followDate:thisdata._followDate,//跟进时间
  361. adminName:thisdata.adminName,//跟进人
  362. contactName:thisdata.contactName, //联系人姓名
  363. contactId:thisdata.contactId, //联系人ID
  364. contactInfo:thisdata.contactInfo,//联系信息
  365. _customerStatus:thisdata._customerStatus,//客户状态
  366. _followSituation:thisdata._followSituation,//最新跟进
  367. followResult:thisdata.followResult,//跟进结果
  368. attachment:thisdata.attachment,//附件地址
  369. });
  370. };
  371. };
  372. this.setState({//导出数据
  373. datahistory: theArr,
  374. theWomanID:theWomanID,
  375. theFollowID:theFollowID,
  376. });
  377. }.bind(this),
  378. }).always(function () {
  379. this.setState({
  380. loading: false
  381. });
  382. }.bind(this));
  383. },
  384. //点击查看跟进记录,点击最新跟进的第一个按钮(跟进状态)执行的函数,将会出现很多跟进列表
  385. setModal3VisibleOk(e) {
  386. this.setState({ modal3Visible:true });
  387. this.state.data = [];
  388. this.setState({
  389. loading: true
  390. });
  391. let deletedIds=this.state.rowId;
  392. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  393. let rowItem = this.state.selectedRows[idx];
  394. if (rowItem.id) {
  395. deletedIds=rowItem.id;
  396. };
  397. };
  398. this.rescordlist(deletedIds)
  399. },
  400. //删除历史记录
  401. onDelete(index){
  402. let deletedIds=this.state.rowId;
  403. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  404. let rowItem = this.state.selectedRows[idx];
  405. if (rowItem.id) {
  406. deletedIds=rowItem.id;
  407. };
  408. };
  409. let deleteID=this.state.theFollowID[index];
  410. $.ajax({
  411. method: "get",
  412. dataType: "json",
  413. crossDomain: false,
  414. url: globalConfig.context + "/api/admin/customer/deleteFollowUpRecord",
  415. data: {
  416. followId:deleteID,//删除的ID
  417. }
  418. }).done(function (data) {
  419. if (!data.error.length) {
  420. message.success('删除成功!');
  421. this.rescordlist(deletedIds)
  422. this.setState({
  423. loading: false,
  424. });
  425. } else {
  426. message.warning(data.error[0].message);
  427. };
  428. this.loadData();
  429. }.bind(this));
  430. },
  431. //点击消失函数
  432. setModal4Visiblecancel(e) {
  433. this.setState({
  434. modal4Visible:false
  435. });
  436. },
  437. //点击客户的名字,进行详情的查询
  438. setModal4Visible(e,index) {
  439. this.setState({ modal4Visible:true });
  440. let changeIds=this.state.datahistory[index].contactId;
  441. $.ajax({
  442. method: "get",
  443. dataType: "json",
  444. crossDomain: false,
  445. url:globalConfig.context + '/api/admin/customer/findContactDetail',
  446. data: {
  447. contactId:changeIds
  448. },
  449. success: function (data) {
  450. let theArr = [];
  451. let theDate=data.data;
  452. if (!data.data) {
  453. if (data.error && data.error.length) {
  454. message.warning(data.error[0].message);
  455. };
  456. } else {
  457. for (let i = 0; i < data.data.length; i++) {
  458. let thisdata = data.data[i];
  459. theArr.push({
  460. key:i,
  461. name:name,//联系人姓名
  462. sex:sex,//联系人性别
  463. mobile:mobile,//座机号
  464. telNum:telNum,//手机号
  465. email:email,//邮箱
  466. qq:qq,//qq
  467. wechat:wechat,//微信号
  468. depatrment:depatrment,//部门
  469. customerPosition:customerPosition,//职位
  470. });
  471. };
  472. };
  473. this.setState({//导出数据
  474. theDate:theDate,
  475. name:theDate.name,//联系人姓名
  476. sex:theDate.sex,//联系人性别
  477. mobile:theDate.mobile,//座机号
  478. telNum:theDate.telNum,//手机号
  479. email:theDate.email,//邮箱
  480. qq:theDate.qq,//qq
  481. wechat:theDate.wechat,//微信号
  482. depatrment:theDate.depatrment,//部门
  483. customerPosition:theDate.customerPosition,//职位
  484. companyName:theDate.companyName,//公司
  485. });
  486. }.bind(this),
  487. }).always(function () {
  488. this.setState({
  489. loading: false
  490. });
  491. }.bind(this));
  492. },
  493. //点击消失函数
  494. setModal5Visiblecancel(e) {
  495. this.setState({
  496. modal5Visible:false
  497. });
  498. },
  499. setModal6Visiblecancel(e) {
  500. this.setState({
  501. modal6Visible:false
  502. });
  503. },
  504. setModal8Visiblecancel(e) {
  505. this.setState({
  506. modal8Visible:false
  507. });
  508. },
  509. //点击名称时获取列表
  510. setModal5VisibleOk(e) {
  511. this.setState({ modal5Visible:true }); //需要一个请求数据
  512. this.Detailload(e.id);
  513. },
  514. //历史记录查看更多,还是历史记录接口
  515. setModal6VisibleOk(e) {
  516. this.setState({
  517. followResults:this.state.datahistory[e].followResult,
  518. modal6Visible:true
  519. }); //需要一个请求数据
  520. },
  521. getPictureUrl(e) {
  522. this.setState({pictureUrl: e });
  523. },
  524. //查看所有的联系人setModal7VisibleOk
  525. contactList(index) {
  526. $.ajax({
  527. method: "post",
  528. dataType: "json",
  529. crossDomain: false,
  530. url: globalConfig.context + "/api/admin/customer/findCustomerUserList",
  531. data:{
  532. cid:index
  533. },
  534. success: function (data) {
  535. let theArr = [];
  536. let thedata=data.data;
  537. if (!thedata) {
  538. if (data.error && data.error.length) {
  539. message.warning(data.error[0].message);
  540. };
  541. thedata={}
  542. };
  543. let cidArr=[];
  544. for (let i = 0; i < data.data.length; i++) {
  545. cidArr.push({
  546. i:thedata[i].cid,
  547. })
  548. }
  549. for (let i = 0; i < data.data.length; i++) {
  550. let thisdata = data.data[i];
  551. theArr.push({
  552. cid:thisdata.cid,//客户的ID
  553. id:thisdata.id,//联系人ID
  554. contactName:thisdata.name,//联系人姓名
  555. sex:thisdata.sex,//联系人性别
  556. mobile:thisdata.mobile,//座机号
  557. telNum:thisdata.telNum,//手机号
  558. email:thisdata.email,//邮箱
  559. qq:thisdata.qq,//qq
  560. wechat:thisdata.wechat,//微信号
  561. depatrment:thisdata.depatrment,//部门
  562. customerPosition:thisdata.customerPosition,//职位
  563. });
  564. };
  565. this.setState({
  566. information: theArr,
  567. cidArr:cidArr,
  568. });
  569. }.bind(this),
  570. }).always(function () {
  571. this.setState({
  572. loading: false
  573. });
  574. }.bind(this));
  575. },
  576. //修改联系人列表数据
  577. setModal8VisibleOk(e) {
  578. this.setState({ modal8Visible:true }); //需要一个请求数据
  579. let deletedIds=this.state.rowId;
  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. },
  587. changefollow(e){
  588. e.preventDefault();
  589. $.ajax({
  590. method: "post",
  591. dataType: "json",
  592. crossDomain: false,
  593. url: globalConfig.context + "/api/admin/customer/updateContacter",
  594. data: {
  595. id:this.state.id,//联系人ID
  596. cid:this.state.cid,//客户的ID
  597. name:this.state.name,//客户名
  598. sex:this.state.sex,//性别
  599. mobile:this.state.mobile,//座机号
  600. telNum:this.state.telNum,//手机号
  601. email:this.state.email,//邮箱
  602. qq:this.state.qq,//qq
  603. wechat:this.state.wechat,//微信号
  604. depatrment:this.state.depatrment,//部门
  605. customerPosition:this.state.customerPosition,//职位
  606. primaryFlg:this.state.primaryFlg,//是否是主要联系人
  607. }
  608. }).done(function (data) {
  609. if (!data.error.length) {
  610. message.success('修改成功!');
  611. this.setState({
  612. loading: false,
  613. });
  614. this.setModal8Visiblecancel()
  615. } else {
  616. message.warning(data.error[0].message);
  617. };
  618. this.Detailload(this.state.rowId);
  619. this.contactList(this.state.rowId);
  620. this.loadData();
  621. }.bind(this));
  622. },
  623. informationRowClick(index){
  624. this.setModal8VisibleOk()
  625. $.ajax({
  626. method: "get",
  627. dataType: "json",
  628. crossDomain: false,
  629. url:globalConfig.context + '/api/admin/customer/findContactDetail',
  630. data: {
  631. contactId:index.id
  632. },
  633. success: function (data) {
  634. let theArr = [];
  635. let theDate=data.data;
  636. if (!data.data) {
  637. if (data.error && data.error.length) {
  638. message.warning(data.error[0].message);
  639. };
  640. } else {
  641. for (let i = 0; i < data.data.length; i++) {
  642. let thisdata = data.data[i];
  643. theArr.push({
  644. key:i,
  645. primaryFlg:primaryFlg,
  646. name:name,//联系人姓名
  647. sex:sex,//联系人性别
  648. mobile:mobile,//座机号
  649. telNum:telNum,//手机号
  650. email:email,//邮箱
  651. qq:qq,//qq
  652. wechat:wechat,//微信号
  653. depatrment:depatrment,//部门
  654. customerPosition:customerPosition,//职位
  655. });
  656. };
  657. };
  658. this.setState({//导出数据
  659. primaryFlg:theDate.primaryFlg,
  660. thaDate:theDate,
  661. cid:theDate.cid,//客户ID
  662. id:theDate.id,//联系人ID
  663. name:theDate.name,//联系人姓名
  664. sex:theDate.sex,//联系人性别
  665. mobile:theDate.mobile,//座机号
  666. telNum:theDate.telNum,//手机号
  667. email:theDate.email,//邮箱
  668. qq:theDate.qq,//qq
  669. wechat:theDate.wechat,//微信号
  670. depatrment:theDate.depatrment,//部门
  671. customerPosition:theDate.customerPosition,//职位
  672. companyName:theDate.companyName,//公司
  673. });
  674. }.bind(this),
  675. }).always(function () {
  676. this.setState({
  677. loading: false
  678. });
  679. }.bind(this));
  680. },
  681. componentWillReceiveProps(nextProps) {
  682. if (!this.props.visible && nextProps.visible) {
  683. if (nextProps.data && nextProps.data.id) {
  684. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  685. };
  686. this.state.technicalPictureUrl = [];
  687. };
  688. },
  689. //添加一条跟进记录,点击保存按钮进行添加
  690. addFollowSubmit(e) {
  691. e.preventDefault();
  692. this.state.data = []
  693. this.setState({
  694. selectedRowKeys: [],
  695. });
  696. let deletedIds=this.state.addId;
  697. this.props.form.validateFields((err, values) => {
  698. if (!err) {
  699. this.setState({
  700. loading: true
  701. });
  702. let custype=values._shareType;
  703. let customerTypechange="";
  704. switch(custype){
  705. case "个人客户":customerTypechange=0;break;
  706. case "机构单位":customerTypechange=1;break;
  707. case "团体单位":customerTypechange=2;break;
  708. }
  709. let customerStatus= getcustomerStatueOn(this.state.customerStatus);
  710. let followSituation= getfllowSituationOn(this.state.followSituation);
  711. //图片转换
  712. let thetechnicalPictureUrl = [];
  713. if (this.state.technicalPictureUrl.length) {
  714. let picArr = [];
  715. this.state.technicalPictureUrl.map(function (item) {
  716. picArr.push(item.response.data);
  717. });
  718. thetechnicalPictureUrl = picArr.join(",");
  719. };
  720. let yearMonth = new Date(this.state.createYear).toLocaleDateString();
  721. let yearString = yearMonth.split('/').join('-');
  722. let pjstringY='';
  723. let days = new Date(this.state.creatMent);
  724. let hours = parseInt(days.getHours())<10 ? "0"+days.getHours():days.getHours();
  725. let minutes =parseInt(days.getMinutes())<10 ? "0"+days.getMinutes():days.getMinutes();
  726. let seconds =parseInt(days.getSeconds())<10 ? "0"+days.getSeconds():days.getSeconds();
  727. if(this.state.creatMent.length==9){
  728. pjstringY=this.state.creatMent
  729. }else{
  730. pjstringY=hours+':'+minutes+':'+seconds
  731. }
  732. $.ajax({
  733. method: "POST",
  734. dataType: "json",
  735. crossDomain: false,
  736. url:globalConfig.context + '/api/admin/customer/addFollowUpRecord',
  737. data: {
  738. id: this.state.addCid,//编号id
  739. cuid:this.state.idt,//联系人ID
  740. followDates:yearString+' '+pjstringY,
  741. followResult:this.state.remarkst,//跟进结果
  742. attachment:thetechnicalPictureUrl,//附件地址
  743. customerStatus:this.state.customerStatus,//跟进客户状态
  744. followSituation:this.state.followSituation.length==1?this.state.followSituation:followSituation,//跟进进度
  745. contactInfo:(this.state.conts?this.state.conts:"电话")+"-"+(this.state.nub?this.state.nub:""),
  746. }
  747. }).done(function (data) {
  748. this.setState({
  749. loading: false
  750. });
  751. if (!data.error.length) {
  752. message.success('保存成功!');
  753. this.setModal1Visiblecancel()
  754. } else {
  755. message.warning(data.error[0].message);
  756. }
  757. this.rescordlist(this.state.rowId);
  758. }.bind(this));
  759. }
  760. })
  761. },
  762. //当选择联系人的列表变化时,则执行
  763. hundleName(e){
  764. let changNub=this.state.telNum[e];
  765. let changEmail=this.state.email[e];
  766. let changWatch=this.state.watch[e];
  767. let changQq=this.state.qq[e];
  768. let kid=this.state.contactIds[e];
  769. this.setState({
  770. kid:kid,
  771. contacts:'电话',
  772. nub:this.state.telNum[e],
  773. lastName: e,
  774. changNub:changNub,
  775. changEmail:changEmail,
  776. changWatch:changWatch,
  777. changQq:changQq
  778. });
  779. },
  780. //所有资料修改保存提交,点击保存按钮进行更新
  781. handleSubmit(e) {
  782. e.preventDefault();
  783. this.state.data=[]
  784. let deletedIds;
  785. let adminName;
  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. deletedIds=rowItem.id;
  793. adminName=rowItem.adminName;
  794. customerStatus=rowItem.customerStatus;
  795. companyIntention=rowItem.companyIntention;
  796. followSituation=rowItem.followSituation;
  797. };
  798. };
  799. this.props.form.validateFields((err, values) => {
  800. if (!err) {
  801. this.setState({
  802. loading: true
  803. });
  804. let custype=values._customerType;
  805. let customerTypechange="";
  806. switch(custype){
  807. case "个人客户":customerTypechange=0;break;
  808. case "公司客户":customerTypechange=1;break;
  809. case "团体单位":customerTypechange=2;break;
  810. }
  811. let companyIntentions= getCompanyIntentionOn(values.companyIntention);
  812. let followSituations= getfllowSituationOn(values.followSituation);
  813. let becompanyIntentions=getCompanyIntentionOn();
  814. let city=getcityArr(values.locationProvince);
  815. //let companyMore = [];
  816. const theDatak = this.state.datak || {};
  817. //意向服务多选
  818. // if (this.state.companyIntention.length) {
  819. // let companyList = [];
  820. // this.state.companyIntention.map(function (item) {
  821. // companyList.push(item);
  822. // });
  823. // companyMore = companyList.join(",");
  824. // };
  825. $.ajax({
  826. method: "POST",
  827. dataType: "json",
  828. crossDomain: false,
  829. url:globalConfig.context + '/api/admin/customer/updateCustomer',
  830. data: {
  831. id: this.state.cid,//编号id
  832. customerType:this.state.customerType,//客户信息 1
  833. companyName: this.state.companyName,//公司名称 1
  834. companyIndustry: this.state.companyIndustry,//公司行业
  835. tag: theDatak.tag,
  836. locationProvince:this.state.locationProvince ,//省份1
  837. adress: this.state.adress,//详细地址1
  838. remarks: values.remarks,//备注1
  839. companyIntention:this.state.companyIntention,//公司意向
  840. followSituation:theDatak.followSituation,//最新跟进1
  841. customerStatus:this.state.customerStatus,//客户状态1
  842. }
  843. }).done(function (data) {
  844. this.setState({
  845. loading: false
  846. });
  847. if (!data.error.length) {
  848. message.success('修改成功!');
  849. this.setModal5Visiblecancel();
  850. } else {
  851. message.warning(data.error[0].message);
  852. }
  853. this.Detailload(this.state.rowId);
  854. this.loadData()
  855. }.bind(this));
  856. }
  857. })
  858. },
  859. submitcontactman(e){
  860. let deletedIds;
  861. this.state.data=[];
  862. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  863. let rowItem = this.state.selectedRows[idx];
  864. if (rowItem.id) {
  865. deletedIds=rowItem.id
  866. }
  867. };
  868. if(!deletedIds){
  869. deletedIds=this.state.cid
  870. }
  871. this.setState({
  872. selectedRowKeys: [],
  873. });
  874. e.preventDefault();
  875. this.props.form.validateFields((err, values) => {
  876. if (!err) {
  877. this.setState({
  878. loading: true
  879. });
  880. $.ajax({
  881. method: "POST",
  882. dataType: "json",
  883. crossDomain: false,
  884. url: globalConfig.context + '/api/admin/customer/addContacter',
  885. data: {
  886. cid: deletedIds,//编号id
  887. sex:this.state.hott,//性别
  888. primaryFlg:this.state.hotst,//是否是主要联系人
  889. name:this.state.paymentIdt,//联系人姓名
  890. mobile:this.state.paymt,//座机
  891. telNum:this.state.payt,//电话
  892. qq:this.state.entIdt,//qq
  893. wechat:this.state.payIdt,//微信
  894. customerPosition:this.state.paentIdt,//职位
  895. depatrment:this.state.paytIdtt,//部门
  896. email:this.state.emailst,//邮箱
  897. }
  898. }).done(function (data) {
  899. this.setState({
  900. loading: false
  901. });
  902. if (!data.error.length) {
  903. message.success('保存成功!');
  904. this.setModal2Visiblecancel()
  905. } else {
  906. message.warning(data.error[0].message);
  907. }
  908. this.Detailload(this.state.rowId);
  909. this.getNewWoman(this.state.rowId);
  910. this.contactList(this.state.rowId);
  911. //this.loadData();
  912. }.bind(this));
  913. }
  914. });
  915. },
  916. getTechnicalPictureUrl(e) {
  917. this.setState({ technicalPictureUrl: e });
  918. },
  919. //新建联系人modal框显示
  920. showModal(){
  921. this.setState({
  922. visible: true,
  923. });
  924. },
  925. //指定转交人的点击函数
  926. showModa(){
  927. this.setState({
  928. visible: true,
  929. });
  930. this.setState({
  931. selectedRowKeys:[],
  932. });
  933. let changeIds;
  934. let adminName;
  935. let customerStatus;
  936. let companyIntention;
  937. let followSituation;
  938. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  939. let rowItem = this.state.selectedRows[idx];
  940. if (rowItem.id) {
  941. changeIds=rowItem.id;
  942. adminName=rowItem.adminName;
  943. customerStatus=rowItem.customerStatus;
  944. companyIntention=rowItem.companyIntention;
  945. followSituation=rowItem.followSituation;
  946. };
  947. };
  948. $.ajax({
  949. method: "post",
  950. dataType: "json",
  951. crossDomain: false,
  952. url: globalConfig.context + "/api/admin/customer/findAdmin",
  953. data: {
  954. id: changeIds,//这一行数据的ID
  955. beforeCompanyIntention:companyIntention,//意向服务
  956. beforeCustomerStatus:customerStatus,//客户状态
  957. beforeFollowSituation:followSituation,//最新跟进状态
  958. beforeAdminName:adminName,//跟进人
  959. }
  960. }).done(function (data) {
  961. if (data.error && data.error.length) {
  962. message.warning(data.error[0].message);
  963. } else {
  964. let theAssigne = [];
  965. if (!data.data) {
  966. if (data.error && data.error.length) {
  967. message.warning(data.error[0].message);
  968. };
  969. } else {
  970. for (let i = 0; i < data.data.length; i++) {
  971. let thisdata = data.data[i];
  972. //处理数据 进行循环
  973. theAssigne.push({
  974. name: thisdata.name,
  975. id: thisdata.id,
  976. ids: thisdata.cid,
  977. mobile:thisdata.mobile,
  978. adminName: thisdata.beforeAdminName,
  979. customerStatus: thisdata.beforeCustomerStatus,
  980. companyIntention: thisdata.beforeCompanyIntention,
  981. followSituation: thisdata.beforeFollowSituation,
  982. });
  983. };
  984. };
  985. this.setState({
  986. dataman: theAssigne,
  987. paginations:false
  988. });
  989. }
  990. }.bind(this));
  991. },
  992. //选择了指定人之后的保存点击函数,需要修改函数
  993. changeAssigner() {
  994. this.setState({
  995. visible: false,
  996. });
  997. this.setState({
  998. selectedRowKeys:[],
  999. });
  1000. let changeId;
  1001. let changeIds;
  1002. let adminName;
  1003. let beforeAdminName;
  1004. let customerStatus;
  1005. let companyIntention;
  1006. let followSituation;
  1007. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1008. let rowItem = this.state.selectedRows[idx];
  1009. if (rowItem.id) {
  1010. changeId=rowItem.id;
  1011. beforeAdminName=rowItem.adminName;
  1012. adminName=rowItem.key;
  1013. customerStatus=rowItem.customerStatus;
  1014. companyIntention=rowItem.companyIntention;
  1015. followSituation=rowItem.followSituation;
  1016. changeIds=rowItem.ids;
  1017. };
  1018. };
  1019. $.ajax({
  1020. method: "post",
  1021. dataType: "json",
  1022. crossDomain: false,
  1023. url: globalConfig.context + "/api/admin/customer/transferCustomer",
  1024. data: {
  1025. id: changeIds,//这一行数据的ID
  1026. aid:changeId,//指定转交人的ID
  1027. // beforeCompanyIntention:companyIntention,//意向服务
  1028. // beforeCustomerStatus:customerStatus,//客户状态
  1029. // beforeFollowSituation:followSituation,//最新跟进状态
  1030. beforeAdminName:beforeAdminName,//之前的跟进人
  1031. adminName:adminName,//转交的跟进人
  1032. }
  1033. }).done(function (data) {
  1034. if (!data.error.length) {
  1035. message.success('转交成功!');
  1036. this.setState({
  1037. loading: false,
  1038. });
  1039. } else {
  1040. message.warning(data.error[0].message);
  1041. };
  1042. this.loadData();
  1043. }.bind(this));
  1044. },
  1045. handleOk(e){
  1046. this.setState({
  1047. visible: false,
  1048. });
  1049. },
  1050. handleCancel(e){
  1051. this.setState({
  1052. visible: false,
  1053. });
  1054. },
  1055. getInitialState() {
  1056. return {
  1057. technicalPictureUrl: [],
  1058. modal1Visible: false,
  1059. modal2Visible: false,
  1060. visible: false ,
  1061. searchMore: true,
  1062. searchType: 0,
  1063. validityPeriodDate: [],
  1064. releaseDate: [],
  1065. selectedRowKeys: [],
  1066. selectedRows: [],
  1067. loading: false,
  1068. pagination: {
  1069. defaultCurrent: 1,
  1070. defaultPageSize: 10,
  1071. showQuickJumper: true,
  1072. pageSize: 10,
  1073. onChange: function (page) {
  1074. this.loadData(page);
  1075. }.bind(this),
  1076. showTotal: function (total) {
  1077. return '共' + total + '条数据';
  1078. }
  1079. },
  1080. contactInformation:[
  1081. {
  1082. title: '姓名',
  1083. dataIndex: 'contactName',
  1084. key: 'contactName'
  1085. },{
  1086. title: '性别',
  1087. dataIndex: 'sex',
  1088. key: 'sex',
  1089. render: text => { return getsex(text); }
  1090. },
  1091. {
  1092. title: '手机号码',
  1093. dataIndex: 'telNum',
  1094. key: 'telNum'
  1095. },{
  1096. title: '座机号',
  1097. dataIndex: 'mobile',
  1098. key: 'mobile'
  1099. },{
  1100. title: 'QQ号码',
  1101. dataIndex: 'qq',
  1102. key: 'qq'
  1103. },{
  1104. title: '邮箱号',
  1105. dataIndex: 'email',
  1106. key: 'email'
  1107. },{
  1108. title: '微信',
  1109. dataIndex: 'wechat',
  1110. key: 'wechat'
  1111. },
  1112. ],
  1113. addFollow:[
  1114. {
  1115. title: '时间',
  1116. dataIndex: '_followDate',
  1117. key: '_followDate'
  1118. },{
  1119. title: '客户',
  1120. dataIndex: 'contactName',
  1121. key: 'contactName',
  1122. },
  1123. {
  1124. title: '跟进人',
  1125. dataIndex: 'adminName',
  1126. key: 'adminName'
  1127. },{
  1128. title: '联系方式',
  1129. dataIndex: 'contactInfo',
  1130. key: 'contactInfo'
  1131. },{
  1132. title: '客户状态',
  1133. dataIndex: '_customerStatus',
  1134. key: '_customerStatus'
  1135. },{
  1136. title: '跟进结果',
  1137. dataIndex: '_followSituation',
  1138. key: '_followSituation'
  1139. },{
  1140. title: '备注',
  1141. dataIndex: 'remarks',
  1142. key: 'remarks'
  1143. },
  1144. ],
  1145. achievement:[
  1146. {
  1147. title: '编号',
  1148. dataIndex: 'contactName',
  1149. key: 'contactName'
  1150. },{
  1151. title: '成果名称',
  1152. dataIndex: 'sex',
  1153. key: 'sex',
  1154. render: text => { return getsex(text); }
  1155. },
  1156. {
  1157. title: '关键字',
  1158. dataIndex: 'telNum',
  1159. key: 'telNum'
  1160. },{
  1161. title: '类型',
  1162. dataIndex: 'mobile',
  1163. key: 'mobile'
  1164. },{
  1165. title: '所有人名称',
  1166. dataIndex: 'qq',
  1167. key: 'qq'
  1168. },{
  1169. title: '审核状态',
  1170. dataIndex: 'email11',
  1171. key: 'email11'
  1172. },{
  1173. title: '是否精品',
  1174. dataIndex: 'wechat323',
  1175. key: 'wechat323'
  1176. },{
  1177. title: '首页展示',
  1178. dataIndex: 'email33',
  1179. key: 'email33'
  1180. },{
  1181. title: '发布时间',
  1182. dataIndex: 'wechat211',
  1183. key: 'wechat211'
  1184. },
  1185. ],
  1186. demand:[
  1187. {
  1188. title: '编号',
  1189. dataIndex: 'contactName',
  1190. key: 'contactName'
  1191. },{
  1192. title: '需求名称',
  1193. dataIndex: 'sex',
  1194. key: 'sex',
  1195. render: text => { return getsex(text); }
  1196. },
  1197. {
  1198. title: '是否精品',
  1199. dataIndex: 'telNum',
  1200. key: 'telNum'
  1201. },{
  1202. title: '首页展示',
  1203. dataIndex: 'mobile',
  1204. key: 'mobile'
  1205. },{
  1206. title: '关键字',
  1207. dataIndex: 'qq',
  1208. key: 'qq'
  1209. },{
  1210. title: '需求类型',
  1211. dataIndex: 'email44',
  1212. key: 'email44'
  1213. },{
  1214. title: '信息来源',
  1215. dataIndex: 'wechat',
  1216. key: 'wechat'
  1217. },{
  1218. title: '雇主名称',
  1219. dataIndex: 'email12',
  1220. key: 'email12'
  1221. },{
  1222. title: '审核状态',
  1223. dataIndex: 'wechat33',
  1224. key: 'wechat33'
  1225. },{
  1226. title: '需求状态',
  1227. dataIndex: 'email23',
  1228. key: 'email23'
  1229. },{
  1230. title: '有效期限',
  1231. dataIndex: 'wechat212',
  1232. key: 'wechat212'
  1233. },{
  1234. title: '发布时间',
  1235. dataIndex: 'wechat44',
  1236. key: 'wechat44'
  1237. },
  1238. ],
  1239. operationLog:[
  1240. {
  1241. title: '操作员姓名',
  1242. dataIndex: 'operatorName',
  1243. key: 'operatorName'
  1244. },{
  1245. title: '操作类型',
  1246. dataIndex: 'operatorType',
  1247. key: 'operatorType',
  1248. },
  1249. {
  1250. title: '操作时间',
  1251. dataIndex: 'operatorTime',
  1252. key: 'operatorTime'
  1253. },{
  1254. title: '修改前客户状态',
  1255. dataIndex: 'beforeCustomerStatus',
  1256. key: 'beforeCustomerStatus'
  1257. },{
  1258. title: '修改后客户状态',
  1259. dataIndex: 'afterCustomerStatus',
  1260. key: 'afterCustomerStatus'
  1261. },{
  1262. title: '修改前客户意向',
  1263. dataIndex: 'beforeCustomerIntention',
  1264. key: 'beforeCustomerIntention'
  1265. },{
  1266. title: '修改后客户意向',
  1267. dataIndex: 'afterCustomerIntention',
  1268. key: 'afterCustomerIntention'
  1269. },{
  1270. title: '修改前跟进进度',
  1271. dataIndex: 'beforeFollowSituation',
  1272. key: 'beforeFollowSituation'
  1273. },{
  1274. title: '修改后跟进进度',
  1275. dataIndex: 'afterFollowSituation',
  1276. key: 'afterFollowSituation'
  1277. },{
  1278. title: '修改前跟进人',
  1279. dataIndex: 'beforeAdminName',
  1280. key: 'beforeAdminName'
  1281. },{
  1282. title: '修改后跟进人',
  1283. dataIndex: 'afterAdminName',
  1284. key: 'afterAdminName'
  1285. },
  1286. ],
  1287. columnsman:[{
  1288. title: '姓名',
  1289. dataIndex: 'name',
  1290. key: 'name'
  1291. },{
  1292. title: '手机号码',
  1293. dataIndex: 'mobile',
  1294. key: 'mobile'
  1295. }
  1296. ],
  1297. columns: [
  1298. {
  1299. title: '公司名称',
  1300. dataIndex: 'companyName',
  1301. key: 'companyName',
  1302. }, {
  1303. title: '客户类型',
  1304. dataIndex: '_customerType',
  1305. key: '_customerType'
  1306. // render: text => { return getcustomerTyp(text); }
  1307. }, {
  1308. title: '地区',
  1309. dataIndex: 'locationProvince',
  1310. key: 'locationProvince',
  1311. render: text => { return getcityArr(text); }
  1312. }, {
  1313. title: '联系人姓名',
  1314. dataIndex: 'contactName',
  1315. key: 'contactName',
  1316. },
  1317. {
  1318. title: '手机号',
  1319. dataIndex: 'telNum',
  1320. key:'telNum',
  1321. },
  1322. {
  1323. title: '客户状态',
  1324. dataIndex: '_customerStatus',
  1325. key: '_customerStatus'
  1326. //render: text => { return getcustomerStatue(text) }
  1327. },
  1328. {
  1329. title: '意向服务',
  1330. dataIndex: '_companyIntention',
  1331. key: '_companyIntention',
  1332. },
  1333. {
  1334. title: '最新跟进',
  1335. dataIndex: '_followSituation',
  1336. key: '_followSituation',
  1337. },
  1338. {
  1339. title: '跟单人',
  1340. dataIndex: 'adminName',
  1341. key: 'adminName',
  1342. },
  1343. {
  1344. title: '时间',
  1345. dataIndex: 'followDate',
  1346. key: 'followDate',
  1347. }
  1348. ],
  1349. dataSource: [],
  1350. searchTime: [,]
  1351. };
  1352. },
  1353. componentWillMount() {
  1354. let theArr = [];
  1355. customerStatus.map(function (item) {
  1356. theArr.push(
  1357. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1358. )
  1359. });
  1360. let auditArr = [];
  1361. cityArr.map(function (item) {
  1362. auditArr.push(
  1363. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1364. )
  1365. });
  1366. let intentionalArr = [];
  1367. intentionalService.map(function (item) {
  1368. intentionalArr.push(
  1369. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1370. )
  1371. });
  1372. let newArr = [];
  1373. newFollow.map(function (item) {
  1374. newArr.push(
  1375. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1376. )
  1377. });
  1378. this.state.customerStatuarr = theArr;
  1379. this.state.auditStatusOption = auditArr;
  1380. this.state.intentionalOption = intentionalArr;
  1381. this.state.newOption = newArr;
  1382. this.loadData();
  1383. },
  1384. tableRowClick(record, index) {
  1385. this.state.RowData = record;
  1386. this.setModal5VisibleOk(record);
  1387. this.contactList(record.id);
  1388. this.rescordlist(record.id);
  1389. this.findCustomerHistory(record.id);
  1390. this.historyList(record.id);
  1391. this.setState({
  1392. rowId:record.id ,
  1393. before_customerStatus:record._customerStatus,
  1394. before_companyIntention:record._companyIntention,
  1395. before_followSituation:record._followSituation
  1396. })
  1397. },
  1398. //删除功能,已经完成
  1399. delectRow() {
  1400. let deletedIds;
  1401. let adminName;
  1402. let customerStatus;
  1403. let companyIntention;
  1404. let followSituation;
  1405. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1406. let rowItem = this.state.selectedRows[idx];
  1407. if (rowItem.id) {
  1408. deletedIds=rowItem.id;
  1409. adminName=rowItem.adminName;
  1410. customerStatus=rowItem.customerStatus;
  1411. companyIntention=rowItem.companyIntention;
  1412. followSituation=rowItem.followSituation;
  1413. };
  1414. };
  1415. this.state.data = []
  1416. this.setState({
  1417. selectedRowKeys: [],
  1418. });
  1419. $.ajax({
  1420. method: "get",
  1421. dataType: "json",
  1422. crossDomain: false,
  1423. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  1424. data: {
  1425. id: deletedIds,//删除的ID
  1426. // beforeCustomerStatus:customerStatus,
  1427. // beforeCompanyIntention:companyIntention,
  1428. // beforeFollowSituation:followSituation,
  1429. // beforeAdminName:adminName
  1430. }
  1431. }).done(function (data) {
  1432. if (!data.error.length) {
  1433. message.success('删除成功!');
  1434. this.setState({
  1435. loading: false,
  1436. });
  1437. } else {
  1438. message.warning(data.error[0].message);
  1439. };
  1440. this.loadData();
  1441. }.bind(this));
  1442. },
  1443. //删除功能
  1444. delectRowFollow() {
  1445. let deletedIds;
  1446. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1447. let rowItem = this.state.selectedRows[idx];
  1448. if (rowItem.id) {
  1449. deletedIds=rowItem.id;
  1450. };
  1451. };
  1452. this.state.data = []
  1453. this.setState({
  1454. selectedRowKeys: [],
  1455. });
  1456. $.ajax({
  1457. method: "post",
  1458. dataType: "json",
  1459. crossDomain: false,
  1460. url: globalConfig.context + "/api/admin/customer/deleteContacter",
  1461. data: {
  1462. contactId: deletedIds,//删除的ID
  1463. }
  1464. }).done(function (data) {
  1465. if (!data.error.length) {
  1466. message.success('删除成功!');
  1467. this.setState({
  1468. loading: false,
  1469. });
  1470. } else {
  1471. message.warning(data.error[0].message);
  1472. };
  1473. this.loadData();
  1474. }.bind(this));
  1475. },
  1476. //列表历史记录查询不带单选的
  1477. findCustomerHistory(cid){
  1478. $.ajax({
  1479. method: "get",
  1480. dataType: "json",
  1481. crossDomain: false,
  1482. url: globalConfig.context + "/api/admin/customer/findCustomerHistory",
  1483. data: {
  1484. customerId: cid,//这一行数据的ID
  1485. }
  1486. }).done(function (data) {
  1487. if (data.error && data.error.length) {
  1488. message.warning(data.error[0].message);
  1489. } else {
  1490. let theAssigne = [];
  1491. if (!data.data) {
  1492. if (data.error && data.error.length) {
  1493. message.warning(data.error[0].message);
  1494. };
  1495. }
  1496. this.setState({
  1497. dataRowhistory: data.data,
  1498. });
  1499. }
  1500. }.bind(this));
  1501. },
  1502. //历史记录列表查询
  1503. historyList(cid){
  1504. this.state.data = [];
  1505. this.setState({
  1506. loading: true
  1507. });
  1508. $.ajax({
  1509. method: "get",
  1510. dataType: "json",
  1511. crossDomain: false,
  1512. url:globalConfig.context + '/api/admin/customer/listCustomerLog',
  1513. data: {
  1514. customerId:cid
  1515. },
  1516. success: function (data) {
  1517. let theArr = [];
  1518. if (!data.data) {
  1519. if (data.error && data.error.length) {
  1520. message.warning(data.error[0].message);
  1521. };
  1522. } else {
  1523. for (let i = 0; i < data.data.length; i++) {
  1524. let thisdata = data.data[i];
  1525. // let intentionText=thisdata.beforeCustomerIntention.split(",");
  1526. // let intentionstring=intentionText.slice("0","2").join('-')
  1527. //console.log(intentionstring)
  1528. // let afterIntentionText=thisdata.afterCustomerIntention.split(",");
  1529. // let afterIntentionstring=afterIntentionText.slice("0","2").join('-')
  1530. theArr.push({
  1531. key:i,
  1532. operatorName:thisdata.operatorName,//操作员姓名
  1533. operatorType:thisdata.operatorType,//操作类型
  1534. operatorTime:thisdata.operatorTime, //操作时间
  1535. beforeCustomerStatus:thisdata.beforeCustomerStatus, //修改前客户状态
  1536. afterCustomerStatus:thisdata.afterCustomerStatus,//修改后客户状态
  1537. beforeCustomerIntention:thisdata.beforeCustomerIntention,//修改前客户意向
  1538. afterCustomerIntention:thisdata.afterCustomerIntention,//修改后客户意向
  1539. beforeFollowSituation:thisdata.beforeFollowSituation,//修改前跟进进度
  1540. afterFollowSituation:thisdata.afterFollowSituation,//修改后跟进进度
  1541. beforeAdminName:thisdata.beforeAdminName,//修改前跟进人
  1542. afterAdminName:thisdata.afterAdminName,//修改后跟进人
  1543. });
  1544. };
  1545. };
  1546. this.setState({//导出数据
  1547. Logrecord: theArr,
  1548. });
  1549. }.bind(this),
  1550. }).always(function () {
  1551. this.setState({
  1552. loading: false
  1553. });
  1554. }.bind(this));
  1555. },
  1556. //详情tab切换数据处理
  1557. callback(e){
  1558. if(e==1){
  1559. this.Detailload(this.state.rowId)
  1560. this.getNewWoman(this.state.rowId);
  1561. }
  1562. if(e==2){
  1563. this.rescordlist(this.state.rowId)
  1564. }
  1565. if(e==3){
  1566. this.Detailload(this.state.rowId)
  1567. }
  1568. if(e==4){
  1569. this.findCustomerHistory(this.state.rowId)
  1570. this.historyList(this.state.rowId)
  1571. }
  1572. },
  1573. changeRow() {
  1574. let deletedIds;
  1575. let customerStatus;
  1576. let companyIntention;
  1577. let followSituation;
  1578. let adminName;
  1579. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1580. let rowItem = this.state.selectedRows[idx];
  1581. if (rowItem.id) {
  1582. deletedIds=rowItem.id;
  1583. customerStatus=rowItem.customerStatus;
  1584. companyIntention=rowItem.companyIntention;
  1585. followSituation=rowItem.followSituation;
  1586. adminName=rowItem.adminName;
  1587. };
  1588. };
  1589. this.setState({
  1590. selectedRowKeys: [],
  1591. });
  1592. $.ajax({
  1593. method: "get",
  1594. dataType: "json",
  1595. crossDomain: false,
  1596. url: globalConfig.context + "/api/admin/customer/transferToPublic",
  1597. data: {
  1598. //aid:this.state.aid,
  1599. id: deletedIds,
  1600. // beforeCompanyIntention:companyIntention,//意向服务
  1601. // beforeCustomerStatus:customerStatus,//客户状态
  1602. // beforeFollowSituation:followSituation,//最新跟进状态
  1603. beforeAdminName:adminName,
  1604. }
  1605. }).done(function (data) {
  1606. if (!data.error.length) {
  1607. message.success('已转为公共客户!');
  1608. this.setState({
  1609. loading: false,
  1610. });
  1611. } else {
  1612. message.warning(data.error[0].message);
  1613. };
  1614. this.loadData();
  1615. }.bind(this));
  1616. },
  1617. addClick() {
  1618. this.state.RowData = {};
  1619. this.setState({
  1620. showDesc: true
  1621. });
  1622. },
  1623. closeDesc(e, s) {
  1624. this.state.showDesc = e;
  1625. if (s) {
  1626. this.loadData();
  1627. };
  1628. },
  1629. search() {
  1630. this.loadData();
  1631. },
  1632. reset() {
  1633. this.state.companyNamet='';
  1634. this.state.customerTypet = undefined;
  1635. this.state.id = undefined;
  1636. this.state.shareTypet = undefined;
  1637. this.state.companyIntentiont = undefined;
  1638. this.state.followSituationt = undefined;
  1639. this.state.locationProvincet = undefined;
  1640. this.state.customerStatust = undefined;
  1641. this.state.contactNamet = undefined;
  1642. this.state.contactTelt = undefined;
  1643. this.state.contactNamet = undefined;
  1644. this.state.releaseDatet = [];
  1645. this.loadData();
  1646. },
  1647. searchSwitch() {
  1648. this.setState({
  1649. searchMore: !this.state.searchMore
  1650. });
  1651. },
  1652. //快速新增联系人
  1653. addContant(){
  1654. this.setModal2VisibleOk()
  1655. this.state.hotst=undefined;
  1656. this.state.hott=undefined;
  1657. this.state.paymentIdt='';
  1658. this.state.entIdt='';
  1659. this.state.payt='';
  1660. this.state.paymt='';
  1661. this.state.paytIdtt='';
  1662. this.state.paentIdt='';
  1663. this.state.payIdt='';
  1664. this.state.emailst='';
  1665. },
  1666. //添加跟进记录没单选的情况下
  1667. addcord(){
  1668. var addcord=this.state.rowId
  1669. this.setState({modal1Visible:true});
  1670. this.state.remarkst='';
  1671. this.Detailload(addcord);
  1672. this.getNewWoman(addcord)
  1673. },
  1674. render() {
  1675. const FormItem = Form.Item
  1676. const rowSelection = {
  1677. selectedRowKeys: this.state.selectedRowKeys,
  1678. onChange: (selectedRowKeys, selectedRows) => {
  1679. this.setState({
  1680. selectedRows: selectedRows.slice(-1),
  1681. selectedRowKeys: selectedRowKeys.slice(-1)
  1682. });
  1683. }
  1684. };
  1685. const hasSelected = this.state.selectedRowKeys.length > 0;
  1686. const { RangePicker } = DatePicker;
  1687. const theData = this.props.data || {};
  1688. const { getFieldDecorator } = this.props.form;
  1689. const formItemLayout = {
  1690. labelCol: { span: 8 },
  1691. wrapperCol: { span: 14 },
  1692. };
  1693. const theDatak = this.state.datak || {};
  1694. const theDatat = this.state.data || {};
  1695. const theDatahistory=this.state.dataRowhistory || {};
  1696. const contactsOption="";
  1697. const formItemLayput = {
  1698. labelCol: { span: 10 },
  1699. wrapperCol: { span: 14 },
  1700. };
  1701. return (
  1702. <div className="user-content" >
  1703. <div className="content-title">
  1704. <span>我的客户管理</span>
  1705. <div className="patent-addNew clearfix" style={{marginRight:"22px"}}>
  1706. <Button disabled onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }}>下载批量导入模板</Button>
  1707. <Upload
  1708. action={globalConfig.context + "/api/admin/achievement/uploadTemplate"}
  1709. data={{ 'sign': 'achievement_template' }}
  1710. beforeUpload={beforeUploadFile}
  1711. showUploadList={false}
  1712. onChange={(info) => {
  1713. if (info.file.status !== 'uploading') {
  1714. console.log(info.file, info.fileList);
  1715. }
  1716. if (info.file.status === 'done') {
  1717. if (!info.file.response.error.length) {
  1718. message.success(`${info.file.name} 文件上传成功!`);
  1719. } else {
  1720. message.warning(info.file.response.error[0].message);
  1721. return;
  1722. };
  1723. } else if (info.file.status === 'error') {
  1724. message.error(`${info.file.name} 文件上传失败。`);
  1725. };
  1726. }} >
  1727. <Button disabled>上传批量内容</Button>
  1728. </Upload>
  1729. <Button type="primary" className="addButton" onClick={this.addClick}>新建客户<Icon type="plus" /></Button>
  1730. </div>
  1731. </div>
  1732. <div className="user-search">
  1733. <Input placeholder="公司名称"
  1734. value={this.state.companyNamet}
  1735. onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} />
  1736. <Select placeholder="客户类型" style={{ width: 120 }}
  1737. value={this.state.customerTypet }
  1738. onChange={(e) => { this.setState({ customerTypet : e }) }}>
  1739. <Select.Option value="0" >个人客户</Select.Option>
  1740. <Select.Option value="1" >机构单位</Select.Option>
  1741. <Select.Option value="2" >团体单位</Select.Option>
  1742. </Select>
  1743. <Select placeholder="意向服务"
  1744. style={{ width: 160 }}
  1745. value={this.state.companyIntentiont}
  1746. onChange={(e) => { this.setState({ companyIntentiont: e }) }}>
  1747. {this.state.intentionalOption}
  1748. </Select>
  1749. <Select placeholder="跟进进度"
  1750. style={{ width: 160 }}
  1751. value={this.state.followSituationt}
  1752. onChange={(e) => { this.setState({ followSituationt: e }) }}>
  1753. {this.state.newOption}
  1754. </Select>
  1755. <Select placeholder="地区"
  1756. style={{ width: 160 }}
  1757. value={this.state.locationProvincet}
  1758. onChange={(e) => { this.setState({ locationProvincet: e }) }}>
  1759. {this.state.auditStatusOption}
  1760. </Select>
  1761. <Select placeholder="客户状态" style={{ width: 120 }}
  1762. value={this.state.customerStatust}
  1763. onChange={(e) => { this.setState({customerStatust: e }) }}>
  1764. {this.state.customerStatuarr}
  1765. </Select>
  1766. <Button type="primary" onClick={this.search}>搜索</Button>
  1767. <Button onClick={this.reset}>重置</Button>
  1768. <Button onClick={this.setModal3VisibleOk} style={{marginRight:'10px'}} disabled={!hasSelected}>查看跟进记录</Button>
  1769. <Button type="primary" onClick={this.setModal1VisibleOk} disabled={!hasSelected}>添加跟进记录</Button>
  1770. <Button type="primary" onClick={this.showModa} disabled={!hasSelected}>指定转交人</Button>
  1771. <Modal
  1772. footer=''
  1773. title="选择指定人"
  1774. visible={this.state.visible}
  1775. onOk={this.handleOk}
  1776. onCancel={this.handleCancel}
  1777. >
  1778. <Spin spinning={this.state.loading}>
  1779. <Table
  1780. scroll={{y:'350px'}}
  1781. pagination={this.state.paginations}
  1782. columns={this.state.columnsman}
  1783. rowSelection={rowSelection}
  1784. dataSource={this.state.dataman}
  1785. />
  1786. <FormItem wrapperCol={{ span: 12, offset: 12 }} style={{marginTop:'15px'}}>
  1787. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:"50px"}} onClick={this.changeAssigner }>保存</Button>
  1788. <Button className="set-submit" type="ghost" onClick={this.handleCancel } style={{marginLeft:"30px"}} id='change_rem'>取消</Button>
  1789. </FormItem>
  1790. </Spin>
  1791. </Modal>
  1792. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  1793. disabled={!hasSelected}
  1794. onClick={this.changeRow}>转为公共客户<Icon /></Button>
  1795. <div className='clearfix' style={{marginTop:'10px'}}>
  1796. <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'15px' }}
  1797. disabled={!hasSelected}
  1798. onClick={this.delectRow}>删除<Icon type="minus" /></Button>
  1799. <span >更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1800. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1801. <Input placeholder="联系人姓名" style={{width:'140px',marginRight:'10px'}}
  1802. value={this.state.contactNamet}
  1803. onChange={(e) => { this.setState({ contactNamet: e.target.value }); }} />
  1804. <Input placeholder="手机号码" style={{width:'140px',marginRight:'10px'}}
  1805. value={this.state.contactTelt }
  1806. onChange={(e) => { this.setState({ contactTelt: e.target.value }); }} />
  1807. </div>
  1808. </div>
  1809. </div>
  1810. <div className="patent-table">
  1811. <Spin spinning={this.state.loading}>
  1812. <Table columns={this.state.columns}
  1813. dataSource={this.state.dataSource}
  1814. rowSelection={rowSelection}
  1815. pagination={this.state.pagination}
  1816. onRowClick={this.tableRowClick}
  1817. />
  1818. </Spin>
  1819. </div>
  1820. <Modal
  1821. style={{left:'500px'}}
  1822. footer=''
  1823. title="客户详细信息"
  1824. width='400px'
  1825. visible={this.state.modal4Visible}
  1826. onOk={this.setModal4Visiblecancel}
  1827. onCancel={this.setModal4Visiblecancel}
  1828. >
  1829. <Form horizontal onSubmit={this.submitcontact} id="demand-form">
  1830. <Spin spinning={this.state.loading}>
  1831. <div className='clearfix'>
  1832. <FormItem className="half-item"
  1833. {...formItemLayput}
  1834. label="所属公司" >
  1835. <span>{this.state.companyName}</span>
  1836. </FormItem>
  1837. <FormItem className="half-item"
  1838. {...formItemLayput}
  1839. label="性别" >
  1840. <span>{getsex(this.state.sex)}</span>
  1841. </FormItem>
  1842. <FormItem className="half-item"
  1843. {...formItemLayput}
  1844. label="姓名" >
  1845. <span>{this.state.name}</span>
  1846. </FormItem>
  1847. <FormItem className="half-item"
  1848. {...formItemLayput}
  1849. label="QQ号" >
  1850. <span>{this.state.qq}</span>
  1851. </FormItem>
  1852. <FormItem className="half-item"
  1853. {...formItemLayput}
  1854. label="手机号" >
  1855. <span>{this.state.telNum}</span>
  1856. </FormItem>
  1857. <FormItem className="half-item"
  1858. {...formItemLayput}
  1859. label="部门" >
  1860. <span>{this.state.depatrment}</span>
  1861. </FormItem>
  1862. <FormItem className="half-item"
  1863. {...formItemLayput}
  1864. label="职位" >
  1865. <span>{this.state.customerPosition}</span>
  1866. </FormItem>
  1867. <FormItem className="half-item"
  1868. {...formItemLayput}
  1869. label="微信号" >
  1870. <span>{this.state.wechat}</span>
  1871. </FormItem>
  1872. </div>
  1873. </Spin>
  1874. </Form>
  1875. </Modal>
  1876. <Modal
  1877. footer=''
  1878. title="历史记录列表"
  1879. width='800px'
  1880. visible={this.state.modal3Visible}
  1881. onOk={this.setModal3Visiblecancel}
  1882. onCancel={this.setModal3Visiblecancel}
  1883. >
  1884. <Spin spinning={this.state.loading}>
  1885. <Table dataSource={this.state.datahistory} >
  1886. <Column
  1887. title="时间"
  1888. dataIndex="_followDate"
  1889. key="_followDate"
  1890. />
  1891. <Column
  1892. title="客户"
  1893. dataIndex="contactName"
  1894. key="contactName"
  1895. render={(text, record,index) => (
  1896. <a href="#" onClick={() => this.setModal4Visible(true,index)}>{text}</a>
  1897. )}
  1898. />
  1899. <Column
  1900. title="客户状态"
  1901. dataIndex="_customerStatus"
  1902. key="_customerStatus"
  1903. />
  1904. <Column
  1905. title="跟进人"
  1906. dataIndex="adminName"
  1907. key="adminName"
  1908. />
  1909. <Column
  1910. title="联系方式"
  1911. dataIndex="contactInfo"
  1912. key="contactInfo"
  1913. />
  1914. <Column
  1915. title="最新跟进状态"
  1916. dataIndex="_followSituation"
  1917. key="_followSituation"
  1918. />
  1919. <Column
  1920. title="跟进结果"
  1921. dataIndex="followResult"
  1922. key="followResult"
  1923. render={(text, record,index) => (
  1924. <div>
  1925. <a href="#" onClick={()=>this.setModal6VisibleOk(index)}>查看跟进结果</a>
  1926. </div>
  1927. )}
  1928. />
  1929. <Column
  1930. title="删除记录"
  1931. key="del"
  1932. render={(text, record, index) => (
  1933. <Popconfirm title="是否删除?" onConfirm={() => this.onDelete(index)}>
  1934. <a href="#" style={{color:"#f00"}}>删除</a>
  1935. </Popconfirm>
  1936. )}
  1937. />
  1938. </Table>
  1939. </Spin>
  1940. </Modal>
  1941. <Modal
  1942. className="followrecord"
  1943. style={{zIndex:'120'}}
  1944. footer=''
  1945. title="新增跟进记录"
  1946. width='1000px'
  1947. visible={this.state.modal1Visible}
  1948. onOk={this.setModal1Visiblecancel}
  1949. onCancel={this.setModal1Visiblecancel}
  1950. >
  1951. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  1952. <Spin spinning={this.state.loading}>
  1953. <div className="user-search">
  1954. <div className="clearfix">
  1955. <FormItem className="half-item"
  1956. {...formItemLayout}
  1957. label="客户公司名称:" >
  1958. <span>{theDatak.companyName}</span>
  1959. </FormItem>
  1960. </div>
  1961. <FormItem className="half-item"
  1962. {...formItemLayout}
  1963. label="最新联系人:" >
  1964. <Select placeholder="选择联系人" style={{ width: 140 }}
  1965. value={this.state.lastName}
  1966. onChange={this.hundleName}>
  1967. {this.state.orderStatusOption}
  1968. </Select>
  1969. <span style={{width:'120px',display:'inline-block',marginLeft:'20px'}}>{getcustomerTyp(theDatat.customerTyp)}
  1970. <Button type="primary" onClick={this.setModal2VisibleOk}>添加</Button>
  1971. </span>
  1972. </FormItem>
  1973. <FormItem className="half-item"
  1974. {...formItemLayout}
  1975. label="联系方式" >
  1976. <Select placeholder="选择方式" style={{width:'100px'}} value={this.state.contacts}
  1977. onChange={this.contacts}>
  1978. <Select.Option value="0">电话</Select.Option>
  1979. <Select.Option value="1">邮件</Select.Option>
  1980. <Select.Option value="2">微信</Select.Option>
  1981. <Select.Option value="3">QQ</Select.Option>
  1982. </Select>
  1983. <span style={{marginLeft:'20px'}}>{this.state.nub}</span>
  1984. </FormItem>
  1985. <FormItem className="half-item"
  1986. {...formItemLayout}
  1987. label="最近跟进时间:" >
  1988. <span>{theDatak.createTime}</span>
  1989. </FormItem>
  1990. <div>
  1991. <FormItem className="half-item"
  1992. {...formItemLayout}
  1993. label="最新跟进时间" >
  1994. <DatePicker placeholder="更新日期" value={moment(this.state.createYear,'YYYY-MM-DD')} onChange={(time) => {this.setState({createYear: time});}}/>
  1995. <TimePicker placeholder="更新时间" value={moment(this.state.creatMent, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMent: time}); }}/>
  1996. </FormItem>
  1997. </div>
  1998. <FormItem className="half-item"
  1999. {...formItemLayout}
  2000. label="客户状态:" >
  2001. <span>{this.state._customerStatus}</span>
  2002. </FormItem>
  2003. <FormItem className="half-item"
  2004. {...formItemLayout}
  2005. label="最新客户状态" >
  2006. <Select placeholder="选择客户状态" style={{width:'200px'}} value={this.state.customerStatus} onChange={(e) => { this.setState({customerStatus: e}); }}>
  2007. {
  2008. customerStatus.map(function (item) {
  2009. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2010. })
  2011. }
  2012. </Select>
  2013. </FormItem>
  2014. <FormItem className="half-item"
  2015. {...formItemLayout}
  2016. label="跟进状态:" >
  2017. <span>{this.state._followSituation}</span>
  2018. </FormItem>
  2019. <FormItem className="half-item"
  2020. {...formItemLayout}
  2021. label="最新跟进状态" >
  2022. <Select placeholder="选择跟进状态" style={{width:'200px'}} value={this.state.followSituation} onChange={(e) => { this.setState({followSituation: e}); }}>
  2023. {
  2024. newFollow.map(function (item) {
  2025. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2026. })
  2027. }
  2028. </Select>
  2029. </FormItem>
  2030. <div className="clearfix">
  2031. <FormItem
  2032. labelCol={{ span: 4 }}
  2033. wrapperCol={{ span: 18 }}
  2034. label="跟进结果" >
  2035. <Input type="textarea" rows={4} value={this.state.remarkst} onChange={(e)=>{this.setState({remarkst:e.target.value}); }}/>
  2036. </FormItem>
  2037. </div>
  2038. <div className="clearfix">
  2039. <FormItem
  2040. labelCol={{ span: 4 }}
  2041. wrapperCol={{ span: 18 }}
  2042. label="技术图片" >
  2043. <PicturesWall
  2044. pictureSign="customer_sys_file"
  2045. fileList={this.getTechnicalPictureUrl}
  2046. pictureUrl={this.state.technicalPictureUrl} />
  2047. <p>图片建议:图片要清晰。</p>
  2048. </FormItem>
  2049. </div>
  2050. <Button style={{ marginRight: '20px' ,marginLeft:'160px',marginBottom:'50px'}} type="primary" onClick={this.addFollowSubmit}>保存</Button>
  2051. <Button className="set-submit" type="ghost" onClick={this.setModal1Visiblecancel} id='change_rem'>取消</Button>
  2052. </div>
  2053. </Spin>
  2054. </Form >
  2055. </Modal>
  2056. <Modal
  2057. className="customeDetails"
  2058. style={{zIndex:'100'}}
  2059. footer=''
  2060. title="客户详情"
  2061. width='1200px'
  2062. visible={this.state.modal5Visible}
  2063. onOk={this.setModal5Visiblecancel}
  2064. onCancel={this.setModal5Visiblecancel}
  2065. >
  2066. <Tabs defaultActiveKey="1" onChange={this.callback}>
  2067. <TabPane tab="基本资料" key="1">
  2068. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  2069. <Spin spinning={this.state.loading}>
  2070. <div className="clearfix">
  2071. <p style={{marginLeft:'50px',marginBottom:'20px',marginTop:'10px',fontSize:'18px'}}>公司资料</p>
  2072. </div>
  2073. <div className="clearfix">
  2074. <FormItem className="half-item"
  2075. {...formItemLayout}
  2076. label="公司名称" >
  2077. <Input type="text" value={this.state.companyName} onChange={(e) => { this.setState({companyName: e.target.value }); }}/>
  2078. </FormItem>
  2079. <FormItem className="half-item"
  2080. {...formItemLayout}
  2081. label="地区" >
  2082. <Select placeholder="选择地区" style={{ width: 160 }} value={this.state.locationProvince} onChange={(e) => { this.setState({locationProvince: e }); }}>
  2083. {
  2084. cityArr.map(function (item) {
  2085. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2086. })
  2087. }
  2088. </Select>
  2089. </FormItem>
  2090. </div>
  2091. <FormItem className="half-item"
  2092. {...formItemLayout}
  2093. label="公司行业" >
  2094. <Input type="text" value={this.state.companyIndustry} onChange={(e) => { this.setState({companyIndustry: e.target.value }); }}/>
  2095. </FormItem>
  2096. <FormItem className="half-item"
  2097. {...formItemLayout}
  2098. label="详细地址" >
  2099. <Input type="text" value={this.state.adress} onChange={(e) => { this.setState({adress: e.target.value }); }}/>
  2100. </FormItem>
  2101. <FormItem className="half-item"
  2102. {...formItemLayout}
  2103. label="客户状态" >
  2104. <Select placeholder="选择客户状态" style={{ width: 120 }}
  2105. value={getcustomerStatue(this.state.customerStatus)}
  2106. onChange={(e) => { this.setState({customerStatus: e }) }}>
  2107. {this.state.customerStatuarr}
  2108. </Select>
  2109. </FormItem>
  2110. <FormItem className="half-item" style={{marginLeft:'96px'}}
  2111. labelCol={{ span: 4 }}
  2112. wrapperCol={{ span: 18 }}
  2113. label="意向服务" >
  2114. <span>{getCompanyIntention(this.state.companyIntention)}</span>
  2115. {/* <Select placeholder="选择意向服务" style={{width:'200px'}} value={this.state.companyIntention} onChange={(e) => { this.setState({companyIntention: e}); }}>
  2116. {
  2117. intentionalService.map(function (item) {
  2118. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2119. })
  2120. }
  2121. </Select>
  2122. */}
  2123. </FormItem>
  2124. <FormItem className="half-item"
  2125. {...formItemLayout}
  2126. label="客户来源" >
  2127. <span>{this.state.laiyuan}</span>
  2128. </FormItem>
  2129. <FormItem className="half-item"
  2130. {...formItemLayout}
  2131. label="标签" >
  2132. <span>{getTag(theDatak.tag)}</span>
  2133. </FormItem>
  2134. <FormItem className="half-item"
  2135. {...formItemLayout}
  2136. label="最新跟进" >
  2137. <span>{this.state._followSituation}</span>
  2138. </FormItem>
  2139. <div className="clearfix">
  2140. <FormItem
  2141. labelCol={{ span: 4 }}
  2142. wrapperCol={{ span: 18 }}
  2143. label="备注" >
  2144. <span>{theDatak.remarks}</span>
  2145. </FormItem>
  2146. </div>
  2147. <FormItem wrapperCol={{ span: 12, offset: 4 }} style={{marginTop:'25px'}}>
  2148. <Button className="set-submit" type="primary" htmlType="submit" style={{marginRight:"40px"}}>保存</Button>
  2149. <Button className="set-submit" type="ghost" onClick={this.setModal5Visiblecancel}>取消</Button>
  2150. </FormItem>
  2151. <div className="clearfix">
  2152. <p style={{marginLeft:'50px',marginBottom:'20px',marginTop:'10px',fontSize:'18px'}}>联系人<Button type="primary" onClick={this.addContant} style={{marginLeft:'20px'}}>快速新增联系人</Button></p>
  2153. </div>
  2154. <div className="clearfix" style={{marginBottom:'100px'}}>
  2155. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2156. columns={this.state.contactInformation}
  2157. dataSource={this.state.information}
  2158. onRowClick={this.informationRowClick}
  2159. />
  2160. </div>
  2161. </Spin>
  2162. </Form>
  2163. </TabPane>
  2164. <TabPane tab="跟进记录" key="2">
  2165. <Button type="primary" onClick={this.addcord} style={{marginLeft:"75px"}}>添加跟进记录</Button>
  2166. <div className="clearfix" style={{marginBottom:'100px'}}>
  2167. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2168. columns={this.state.addFollow}
  2169. dataSource={this.state.datahistory}
  2170. />
  2171. </div>
  2172. </TabPane>
  2173. <TabPane tab="业务操作" key="3">
  2174. <div style={{marginLeft:"50px",fontSize:'18px'}}>科技成果</div>
  2175. <div className="clearfix">
  2176. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2177. columns={this.state.achievement}
  2178. dataSource={this.state.achievementrecord}
  2179. />
  2180. </div>
  2181. <div style={{marginLeft:"50px",marginTop:'20px',fontSize:'18px'}}>科技需求</div>
  2182. <div className="clearfix" style={{marginBottom:'100px'}}>
  2183. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2184. columns={this.state.demand}
  2185. dataSource={this.state.demandrecord}
  2186. />
  2187. </div>
  2188. </TabPane>
  2189. <TabPane tab="历史记录" key="4">
  2190. <Form horizontal id="demand-form">
  2191. <Spin spinning={this.state.loading}>
  2192. <div className="clearfix">
  2193. <FormItem className="half-item"
  2194. {...formItemLayout}
  2195. label="注册账号" >
  2196. <span>{theDatahistory.customerName}</span>
  2197. </FormItem>
  2198. </div>
  2199. <FormItem className="half-item"
  2200. {...formItemLayout}
  2201. label="录入时间" >
  2202. <span>{theDatahistory.createTime}</span>
  2203. </FormItem>
  2204. <FormItem className="half-item"
  2205. {...formItemLayout}
  2206. label="跟单人" >
  2207. <span>{theDatahistory.adminName}</span>
  2208. </FormItem>
  2209. <FormItem className="half-item"
  2210. {...formItemLayout}
  2211. label="跟进次数" >
  2212. <span>{theDatahistory.followCount}</span>
  2213. </FormItem>
  2214. <FormItem className="half-item"
  2215. {...formItemLayout}
  2216. label="当前客户状态持续时间" >
  2217. <span>{theDatahistory.diffDate}</span>
  2218. </FormItem>
  2219. <FormItem className="half-item"
  2220. {...formItemLayout}
  2221. label="最后跟进联系人" >
  2222. <span>{theDatahistory.contactName}</span>
  2223. </FormItem>
  2224. <FormItem className="half-item"
  2225. {...formItemLayout}
  2226. label="最后跟进时间" >
  2227. <span>{theDatahistory.followDate}</span>
  2228. </FormItem>
  2229. <FormItem className="half-item"
  2230. {...formItemLayout}
  2231. label="最后客户状态" >
  2232. <span>{getcustomerStatue(theDatahistory.customerStatus)}</span>
  2233. </FormItem>
  2234. <FormItem className="half-item"
  2235. {...formItemLayout}
  2236. label="最后跟进状态" >
  2237. <span>{getfllowSituation(theDatahistory.followSituation)}</span>
  2238. </FormItem>
  2239. <FormItem className="half-item"
  2240. {...formItemLayout}
  2241. label="操作日志" >
  2242. <span>查看列表<Switch defaultChecked={false} onChange={this.searchSwitch} style={{marginLeft:'10px'}}/></span>
  2243. </FormItem>
  2244. <FormItem className="half-item" style={{marginBottom:'50px'}}
  2245. {...formItemLayout}
  2246. label="最后修改时间" >
  2247. <span>{theDatahistory.operatorTime}</span>
  2248. </FormItem>
  2249. <div className="search-more clearfix" style={this.state.searchMore ? { display: 'none' } : {}}>
  2250. <Table style={{background:'none',textAlign:'center'}} className="tabcolor"
  2251. columns={this.state.operationLog}
  2252. dataSource={this.state.Logrecord}
  2253. bordered
  2254. />
  2255. </div>
  2256. </Spin>
  2257. </Form>
  2258. </TabPane>
  2259. </Tabs>
  2260. </Modal>
  2261. <Modal
  2262. className="newContacts"
  2263. style={{zIndex:'300'}}
  2264. footer=''
  2265. width='800px'
  2266. title="新增联系人"
  2267. visible={this.state.modal2Visible}
  2268. onOk={this.setModal2Visiblecancel}
  2269. onCancel={this.setModal2Visiblecancel}
  2270. >
  2271. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  2272. <Spin spinning={this.state.loading}>
  2273. <Row>
  2274. <FormItem
  2275. labelCol={{ span: 4 }}
  2276. wrapperCol={{ span: 14 }}
  2277. label="是否是主要联系人:" style={{marginRight:'10px'}}>
  2278. <Radio.Group value={this.state.hotst} onChange={(e) => {
  2279. this.setState({ hotst: e.target.value })
  2280. }}>
  2281. <Radio value={0}>是</Radio>
  2282. <Radio value={1}>否</Radio>
  2283. </Radio.Group>
  2284. </FormItem>
  2285. <FormItem
  2286. labelCol={{ span: 4 }}
  2287. wrapperCol={{ span: 14 }}
  2288. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  2289. <Radio.Group value={this.state.hott} onChange={(e) => {
  2290. this.setState({ hott: e.target.value })
  2291. }}>
  2292. <Radio value={0}>男</Radio>
  2293. <Radio value={1}>女</Radio>
  2294. </Radio.Group>
  2295. </FormItem>
  2296. </Row>
  2297. <Row style={{ paddingLeft:'50px' }}>
  2298. <Col span={2}>姓名:</Col>
  2299. <Col span={8}>
  2300. <Input value={this.state.paymentIdt}
  2301. onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
  2302. </Col>
  2303. <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
  2304. <Col span={8}>
  2305. <Input value={this.state.entIdt}
  2306. onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
  2307. </Col>
  2308. </Row>
  2309. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2310. <Col span={2}>手机号:</Col>
  2311. <Col span={8}>
  2312. <Input value={this.state.payt}
  2313. onChange={(e) => { this.setState({ payt: e.target.value }) }} />
  2314. </Col>
  2315. <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
  2316. <Col span={8}>
  2317. <Input value={this.state.paymt}
  2318. onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
  2319. </Col>
  2320. </Row>
  2321. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  2322. <Col span={2}>部门:</Col>
  2323. <Col span={8}>
  2324. <Input value={this.state.paytIdtt}
  2325. onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
  2326. </Col>
  2327. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  2328. <Col span={8}>
  2329. <Input value={this.state.paentIdt}
  2330. onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
  2331. </Col>
  2332. </Row>
  2333. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2334. <Col span={2}>微信号:</Col>
  2335. <Col span={8}>
  2336. <Input value={this.state.payIdt}
  2337. onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
  2338. </Col>
  2339. <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
  2340. <Col span={8}>
  2341. <Input value={this.state.emailst}
  2342. onChange={(e) => { this.setState({ emailst: e.target.value }) }} />
  2343. </Col>
  2344. </Row>
  2345. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  2346. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  2347. <Button className="set-submit" type="ghost" onClick={this.setModal2Visiblecancel} id='change_rem'>取消</Button>
  2348. </Row>
  2349. </Spin>
  2350. </Form>
  2351. </Modal>
  2352. <Modal
  2353. width="600px"
  2354. footer=''
  2355. title="联系人详细信息"
  2356. visible={this.state.modal8Visible}
  2357. onOk={this.setModal8Visiblecancel}
  2358. onCancel={this.setModal8Visiblecancel}>
  2359. <div style={{paddingRight:"50px"}}>
  2360. <FormItem className="half-item"
  2361. {...formItemLayout}
  2362. label="姓名" >
  2363. {getFieldDecorator('name', {
  2364. initialValue: this.state.name
  2365. })(
  2366. <Input onChange={(e) => { this.setState({ name: e.target.value }) }}/>
  2367. )}
  2368. </FormItem>
  2369. <FormItem className="half-item"
  2370. {...formItemLayout}
  2371. label="性别" >
  2372. {getFieldDecorator('sex', {
  2373. initialValue: this.state.sex
  2374. })(
  2375. <Radio.Group onChange={(e) => { this.setState({ sex: e.target.value }); }}>
  2376. <Radio value="0">男</Radio>
  2377. <Radio value="1">女</Radio>
  2378. </Radio.Group>
  2379. )}
  2380. </FormItem>
  2381. <FormItem
  2382. labelCol={{ span: 6 }}
  2383. wrapperCol={{ span: 14 }}
  2384. label="是否是主要联系人:" style={{marginLeft:"65px"}}>
  2385. {getFieldDecorator('primaryFlg', {
  2386. initialValue: this.state.primaryFlg
  2387. })(
  2388. <Radio.Group onChange={(e) => {this.setState({primaryFlg: e.target.value });}}>
  2389. <Radio value={0}>是</Radio>
  2390. <Radio value={1}>否</Radio>
  2391. </Radio.Group>
  2392. )}
  2393. </FormItem>
  2394. <FormItem className="half-item"
  2395. {...formItemLayout}
  2396. label="手机号码" >
  2397. {getFieldDecorator('telNum', {
  2398. initialValue: this.state.telNum
  2399. })(
  2400. <Input onChange={(e) => { this.setState({ telNum: e.target.value }) }}/>
  2401. )}
  2402. </FormItem>
  2403. <FormItem className="half-item"
  2404. {...formItemLayout}
  2405. label="座机号" >
  2406. {getFieldDecorator('mobile', {
  2407. initialValue: this.state.mobile
  2408. })(
  2409. <Input onChange={(e) => { this.setState({ mobile: e.target.value }) }}/>
  2410. )}
  2411. </FormItem>
  2412. <FormItem className="half-item"
  2413. {...formItemLayout}
  2414. label="QQ号码" >
  2415. {getFieldDecorator('qq', {
  2416. initialValue: this.state.qq
  2417. })(
  2418. <Input onChange={(e) => { this.setState({ qq: e.target.value }) }}/>
  2419. )}
  2420. </FormItem>
  2421. <FormItem className="half-item"
  2422. {...formItemLayout}
  2423. label="邮箱号" >
  2424. {getFieldDecorator('email', {
  2425. initialValue: this.state.email
  2426. })(
  2427. <Input onChange={(e) => { this.setState({ email: e.target.value }) }}/>
  2428. )}
  2429. </FormItem>
  2430. <FormItem className="half-item"
  2431. {...formItemLayout}
  2432. label="微信" >
  2433. {getFieldDecorator('wechat', {
  2434. initialValue: this.state.wechat
  2435. })(
  2436. <Input onChange={(e) => { this.setState({ wechat: e.target.value }) }}/>
  2437. )}
  2438. </FormItem>
  2439. <FormItem className="half-item"
  2440. {...formItemLayout}
  2441. label="部门" >
  2442. {getFieldDecorator('depatrment', {
  2443. initialValue: this.state.depatrment
  2444. })(
  2445. <Input onChange={(e) => { this.setState({ depatrment: e.target.value }) }}/>
  2446. )}
  2447. </FormItem>
  2448. <FormItem className="half-item"
  2449. {...formItemLayout}
  2450. label="职位" >
  2451. {getFieldDecorator('customerPosition', {
  2452. initialValue: this.state.customerPosition
  2453. })(
  2454. <Input onChange={(e) => { this.setState({ customerPosition: e.target.value }); }}/>
  2455. )}
  2456. </FormItem>
  2457. </div>
  2458. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  2459. <Button className="set-submit" type="primary" htmlType="submit" onClick={this.changefollow} style={{marginRight:"50px"}}>保存</Button>
  2460. <Button className="set-submit" type="ghost" onClick={this.setModal8Visiblecancel}>取消</Button>
  2461. </FormItem>
  2462. </Modal>
  2463. <Modal
  2464. footer=''
  2465. title="更多详情"
  2466. visible={this.state.modal6Visible}
  2467. onOk={this.setModal6Visiblecancel}
  2468. onCancel={this.setModal6Visiblecancel}>
  2469. <Spin spinning={this.state.loading}>
  2470. <div className="clearfix">
  2471. <FormItem
  2472. labelCol={{ span: 5 }}
  2473. wrapperCol={{ span: 18 }}
  2474. label="跟进结果" >
  2475. <span>{this.state.followResults}</span>
  2476. </FormItem>
  2477. </div>
  2478. <FormItem
  2479. labelCol={{ span: 5 }}
  2480. wrapperCol={{ span: 18 }}
  2481. label="附件" >
  2482. <div className="clearfix">
  2483. <Upload className="demandDetailShow-upload"
  2484. listType="picture-card"
  2485. fileList={this.state.attachment}
  2486. onPreview={(file) => {
  2487. this.setState({
  2488. previewImage: file.url || file.thumbUrl,
  2489. previewVisible: true,
  2490. });
  2491. }} >
  2492. </Upload>
  2493. <Modal maskClosable={false} footer={null}
  2494. visible={this.state.previewVisible}
  2495. onCancel={() => { this.setState({ previewVisible: false }) }}>
  2496. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  2497. </Modal>
  2498. </div>
  2499. </FormItem>
  2500. </Spin>
  2501. </Modal>
  2502. <CustomerDetail
  2503. data={this.state.RowData}
  2504. detailApiUrl={this.props['data-detailApiUrl']}
  2505. achievementCategoryOption={this.state.achievementCategoryOption}
  2506. showDesc={this.state.showDesc}
  2507. closeDesc={this.closeDesc} />
  2508. </div >
  2509. );
  2510. }
  2511. }));
  2512. export default AchievementList;