myClient.jsx 109 KB

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