myClient.jsx 109 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554
  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. //图片组件
  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. console.log(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. console.log(deletedIds)
  221. this.RowClick;
  222. $.ajax({
  223. method: "post",
  224. dataType: "json",
  225. crossDomain: false,
  226. url: globalConfig.context + '/api/admin/customer/findCustomerDetails',
  227. data: {
  228. id: deletedIds
  229. },
  230. success: function (data) {
  231. let thisData = data.data;
  232. if (!thisData) {
  233. if (data.error && data.error.length) {
  234. message.warning(data.error[0].message);
  235. };
  236. thisData = {};
  237. };
  238. //意向服务多选
  239. // let companyArr=[];
  240. // let companyString=thisData.companyIntention;
  241. // companyArr=companyString.split(",") ;
  242. // let creatMent=thisData.createTime.substr(10,9);
  243. // let createYear=thisData.createTime.substr(0,10);
  244. let followSituationTxt=getfllowSituation(thisData.followSituation.toString());
  245. let yearMonth = new Date().toLocaleDateString();
  246. let yearString = yearMonth.split('/').join('-');
  247. let days = new Date();
  248. let hours = parseInt(days.getHours())<10 ? "0"+days.getHours():days.getHours();
  249. let minutes =parseInt(days.getMinutes())<10 ? "0"+days.getMinutes():days.getMinutes();
  250. let seconds =parseInt(days.getSeconds())<10 ? "0"+days.getSeconds():days.getSeconds();
  251. let pjstringY=hours+':'+minutes+':'+seconds ;
  252. this.setState({
  253. locationProvince:thisData.locationProvince,
  254. addId:thisData.id,
  255. creatMent:pjstringY,
  256. createYear:yearString,
  257. addCid:thisData.cid,
  258. datak: thisData,
  259. companyIndustry:thisData.companyIndustry,
  260. address:thisData.address,
  261. followSituation:followSituationTxt,
  262. customerStatus:thisData.customerStatus.toString(),
  263. companyIntention:thisData.companyIntention,
  264. _followSituation:thisData._followSituation,
  265. _customerStatus:thisData._customerStatus,
  266. _companyIntention:thisData._companyIntention,
  267. cid:thisData.cid,
  268. customerType:thisData.customerType,
  269. companyName:thisData.companyName,
  270. adminName:thisData.adminName
  271. });
  272. if (thisData.ownerId) {
  273. this.getContactsList(thisData.ownerId);
  274. };
  275. }.bind(this),
  276. }).always(function () {
  277. this.setState({
  278. loading: false
  279. });
  280. }.bind(this));
  281. },
  282. //点击出现函数
  283. //点击消失函数
  284. setModal1Visiblecancel(e) {
  285. this.setState({
  286. modal1Visible:false
  287. });
  288. this.reset();
  289. },
  290. //点击添加跟进记录,点击最新跟进下的+号,将会查询出很多数据,展示在列表里面,
  291. setModal1VisibleOk(e) {
  292. this.setState({modal1Visible:true});
  293. this.state.remarkst='';
  294. let deletedIds=this.state.recordt;
  295. this.setState({
  296. remarks:'',
  297. selectedRowKeys: this.state.selectedRowKeys,
  298. });
  299. this.Detailload(deletedIds);
  300. this.getNewWoman(deletedIds);
  301. },
  302. //点击出现函数
  303. setModal2VisibleOk(e) {
  304. this.setState({
  305. modal2Visible:true
  306. });
  307. this.state.hotst=undefined;
  308. this.state.hott=undefined;
  309. this.state.paymentIdt='';
  310. this.state.entIdt='';
  311. this.state.payt='';
  312. this.state.paymt='';
  313. this.state.paytIdtt='';
  314. this.state.paentIdt='';
  315. this.state.payIdt='';
  316. this.state.emailst='';
  317. },
  318. //点击消失函数
  319. setModal2Visiblecancel(e) {
  320. this.setState({
  321. modal2Visible:false
  322. });
  323. },
  324. //点击消失函数
  325. setModal3Visiblecancel(e) {
  326. this.setState({
  327. modal3Visible:false
  328. });
  329. },
  330. rescordlist(deletedIds){
  331. this.setState({
  332. selectedRowKeys:this.state.selectedRowKeys,
  333. });
  334. this.state.data = [];
  335. $.ajax({
  336. method: "get",
  337. dataType: "json",
  338. crossDomain: false,
  339. url:globalConfig.context + '/api/admin/customer/listFollowUpRecord',
  340. data: {
  341. customerId:deletedIds
  342. },
  343. success: function (data) {
  344. let theArr = [];
  345. let theWomanID=[];
  346. let theFollowID=[];
  347. if (!data.data) {
  348. if (data.error && data.error.length) {
  349. message.warning(data.error[0].message);
  350. };
  351. } else {
  352. data.data.map(function (item,index) {
  353. theWomanID.push(data.data[index].contactId);
  354. });
  355. data.data.map(function (item,index) {
  356. theFollowID.push(data.data[index].followId);
  357. });
  358. for (let i = 0; i < data.data.length; i++) {
  359. let thisdata = data.data[i];
  360. theArr.push({
  361. key:i,
  362. _followDate:thisdata._followDate,//跟进时间
  363. adminName:thisdata.adminName,//跟进人
  364. contactName:thisdata.contactName, //联系人姓名
  365. contactId:thisdata.contactId, //联系人ID
  366. contactInfo:thisdata.contactInfo,//联系信息
  367. _customerStatus:thisdata._customerStatus,//客户状态
  368. _followSituation:thisdata._followSituation,//最新跟进
  369. followResult:thisdata.followResult,//跟进结果
  370. attachment:thisdata.attachment,//附件地址
  371. });
  372. };
  373. };
  374. this.setState({//导出数据
  375. datahistory: theArr,
  376. theWomanID:theWomanID,
  377. theFollowID:theFollowID,
  378. });
  379. }.bind(this),
  380. }).always(function () {
  381. this.setState({
  382. loading: false
  383. });
  384. }.bind(this));
  385. },
  386. //点击查看跟进记录,点击最新跟进的第一个按钮(跟进状态)执行的函数,将会出现很多跟进列表
  387. setModal3VisibleOk(e) {
  388. this.setState({ modal3Visible:true });
  389. this.state.data = [];
  390. this.setState({
  391. loading: true
  392. });
  393. this.setState({
  394. selectedRowKeys:this.state.selectedRowKeys,
  395. });
  396. let deletedIds=this.state.recordt;
  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. case "团体客户":customerTypechange=2;break;
  707. }
  708. let customerStatus= getcustomerStatueOn(this.state.customerStatus);
  709. let followSituation= getfllowSituationOn(this.state.followSituation);
  710. //图片转换
  711. let thetechnicalPictureUrl = [];
  712. if (this.state.technicalPictureUrl.length) {
  713. let picArr = [];
  714. this.state.technicalPictureUrl.map(function (item) {
  715. picArr.push(item.response.data);
  716. });
  717. thetechnicalPictureUrl = picArr.join(",");
  718. };
  719. let yearMonth = new Date(this.state.createYear).toLocaleDateString();
  720. let yearString = yearMonth.split('/').join('-');
  721. let pjstringY='';
  722. let days = new Date(this.state.creatMent);
  723. let hours = parseInt(days.getHours())<10 ? "0"+days.getHours():days.getHours();
  724. let minutes =parseInt(days.getMinutes())<10 ? "0"+days.getMinutes():days.getMinutes();
  725. let seconds =parseInt(days.getSeconds())<10 ? "0"+days.getSeconds():days.getSeconds();
  726. if(this.state.creatMent.length==8){
  727. pjstringY=this.state.creatMent
  728. }else{
  729. pjstringY=hours+':'+minutes+':'+seconds
  730. }
  731. $.ajax({
  732. method: "POST",
  733. dataType: "json",
  734. crossDomain: false,
  735. url:globalConfig.context + '/api/admin/customer/addFollowUpRecord',
  736. data: {
  737. id: this.state.addCid,//编号id
  738. cuid:this.state.idt,//联系人ID
  739. followDates:yearString+' '+pjstringY,
  740. followResult:this.state.remarkst,//跟进结果
  741. attachment:thetechnicalPictureUrl,//附件地址
  742. customerStatus:this.state.customerStatus,//跟进客户状态
  743. followSituation:this.state.followSituation.length==1?this.state.followSituation:followSituation,//跟进进度
  744. contactInfo:(this.state.conts?this.state.conts:"电话")+"-"+(this.state.nub?this.state.nub:""),
  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. address: this.state.address,//详细地址1
  837. remarks: values.remarks,//备注1
  838. companyIntention:this.state.companyIntention,//公司意向
  839. followSituation:theDatak.followSituation,//最新跟进1
  840. customerStatus:this.state.customerStatus,//客户状态1
  841. }
  842. }).done(function (data) {
  843. this.setState({
  844. loading: false
  845. });
  846. if (!data.error.length) {
  847. message.success('修改成功!');
  848. this.setModal5Visiblecancel();
  849. } else {
  850. message.warning(data.error[0].message);
  851. }
  852. this.Detailload(this.state.rowId);
  853. this.loadData()
  854. }.bind(this));
  855. }
  856. })
  857. },
  858. submitcontactman(e){
  859. let deletedIds;
  860. this.state.data=[];
  861. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  862. let rowItem = this.state.selectedRows[idx];
  863. if (rowItem.id) {
  864. deletedIds=rowItem.id
  865. }
  866. };
  867. if(!deletedIds){
  868. deletedIds=this.state.cid
  869. }
  870. this.setState({
  871. selectedRowKeys: [],
  872. });
  873. e.preventDefault();
  874. this.props.form.validateFields((err, values) => {
  875. if (!err) {
  876. this.setState({
  877. loading: true
  878. });
  879. $.ajax({
  880. method: "POST",
  881. dataType: "json",
  882. crossDomain: false,
  883. url: globalConfig.context + '/api/admin/customer/addContacter',
  884. data: {
  885. cid: deletedIds,//编号id
  886. sex:this.state.hott,//性别
  887. primaryFlg:this.state.hotst,//是否是主要联系人
  888. name:this.state.paymentIdt,//联系人姓名
  889. mobile:this.state.paymt,//座机
  890. telNum:this.state.payt,//电话
  891. qq:this.state.entIdt,//qq
  892. wechat:this.state.payIdt,//微信
  893. customerPosition:this.state.paentIdt,//职位
  894. depatrment:this.state.paytIdtt,//部门
  895. email:this.state.emailst,//邮箱
  896. }
  897. }).done(function (data) {
  898. this.setState({
  899. loading: false
  900. });
  901. if (!data.error.length) {
  902. message.success('保存成功!');
  903. this.setModal2Visiblecancel()
  904. } else {
  905. message.warning(data.error[0].message);
  906. }
  907. this.Detailload(this.state.rowId);
  908. this.getNewWoman(this.state.rowId);
  909. this.contactList(this.state.rowId);
  910. //this.loadData();
  911. }.bind(this));
  912. }
  913. });
  914. },
  915. getTechnicalPictureUrl(e) {
  916. this.setState({ technicalPictureUrl: e });
  917. },
  918. //新建联系人modal框显示
  919. showModal(){
  920. this.setState({
  921. visible: true,
  922. });
  923. },
  924. //指定转交人的点击函数
  925. showModa(){
  926. this.setState({
  927. visible: true,
  928. });
  929. this.setState({
  930. selectedRowKeys:[],
  931. });
  932. let changeIds;
  933. let adminName;
  934. let customerStatus;
  935. let companyIntention;
  936. let followSituation;
  937. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  938. let rowItem = this.state.selectedRows[idx];
  939. if (rowItem.id) {
  940. changeIds=rowItem.id;
  941. adminName=rowItem.adminName;
  942. customerStatus=rowItem.customerStatus;
  943. companyIntention=rowItem.companyIntention;
  944. followSituation=rowItem.followSituation;
  945. };
  946. };
  947. $.ajax({
  948. method: "post",
  949. dataType: "json",
  950. crossDomain: false,
  951. url: globalConfig.context + "/api/admin/customer/findAdmin",
  952. data: {
  953. id: changeIds,//这一行数据的ID
  954. beforeCompanyIntention:companyIntention,//意向服务
  955. beforeCustomerStatus:customerStatus,//客户状态
  956. beforeFollowSituation:followSituation,//最新跟进状态
  957. beforeAdminName:adminName,//跟进人
  958. }
  959. }).done(function (data) {
  960. if (data.error && data.error.length) {
  961. message.warning(data.error[0].message);
  962. } else {
  963. let theAssigne = [];
  964. if (!data.data) {
  965. if (data.error && data.error.length) {
  966. message.warning(data.error[0].message);
  967. };
  968. } else {
  969. for (let i = 0; i < data.data.length; i++) {
  970. let thisdata = data.data[i];
  971. //处理数据 进行循环
  972. theAssigne.push({
  973. name: thisdata.name,
  974. id: thisdata.id,
  975. ids: thisdata.cid,
  976. mobile:thisdata.mobile,
  977. adminName: thisdata.beforeAdminName,
  978. customerStatus: thisdata.beforeCustomerStatus,
  979. companyIntention: thisdata.beforeCompanyIntention,
  980. followSituation: thisdata.beforeFollowSituation,
  981. });
  982. };
  983. };
  984. this.setState({
  985. dataman: theAssigne,
  986. paginations:false
  987. });
  988. }
  989. }.bind(this));
  990. },
  991. //选择了指定人之后的保存点击函数,需要修改函数
  992. changeAssigner() {
  993. this.setState({
  994. visible: false,
  995. });
  996. this.setState({
  997. selectedRowKeys:[],
  998. });
  999. let changeId;
  1000. let changeIds;
  1001. let adminName;
  1002. let beforeAdminName;
  1003. let customerStatus;
  1004. let companyIntention;
  1005. let followSituation;
  1006. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1007. let rowItem = this.state.selectedRows[idx];
  1008. if (rowItem.id) {
  1009. changeId=rowItem.id;
  1010. beforeAdminName=rowItem.adminName;
  1011. adminName=rowItem.key;
  1012. customerStatus=rowItem.customerStatus;
  1013. companyIntention=rowItem.companyIntention;
  1014. followSituation=rowItem.followSituation;
  1015. changeIds=rowItem.ids;
  1016. };
  1017. };
  1018. $.ajax({
  1019. method: "post",
  1020. dataType: "json",
  1021. crossDomain: false,
  1022. url: globalConfig.context + "/api/admin/customer/transferCustomer",
  1023. data: {
  1024. id: changeIds,//这一行数据的ID
  1025. aid:changeId,//指定转交人的ID
  1026. // beforeCompanyIntention:companyIntention,//意向服务
  1027. // beforeCustomerStatus:customerStatus,//客户状态
  1028. // beforeFollowSituation:followSituation,//最新跟进状态
  1029. beforeAdminName:beforeAdminName,//之前的跟进人
  1030. adminName:adminName,//转交的跟进人
  1031. }
  1032. }).done(function (data) {
  1033. if (!data.error.length) {
  1034. message.success('转交成功!');
  1035. this.setState({
  1036. loading: false,
  1037. });
  1038. } else {
  1039. message.warning(data.error[0].message);
  1040. };
  1041. this.loadData();
  1042. }.bind(this));
  1043. },
  1044. handleOk(e){
  1045. this.setState({
  1046. visible: false,
  1047. });
  1048. },
  1049. handleCancel(e){
  1050. this.setState({
  1051. visible: false,
  1052. });
  1053. },
  1054. getInitialState() {
  1055. return {
  1056. technicalPictureUrl: [],
  1057. modal1Visible: false,
  1058. modal2Visible: false,
  1059. visible: false ,
  1060. searchMore: true,
  1061. searchType: 0,
  1062. validityPeriodDate: [],
  1063. releaseDate: [],
  1064. selectedRowKeys: [],
  1065. selectedRows: [],
  1066. loading: false,
  1067. pagination: {
  1068. defaultCurrent: 1,
  1069. defaultPageSize: 10,
  1070. showQuickJumper: true,
  1071. pageSize: 10,
  1072. onChange: function (page) {
  1073. this.loadData(page);
  1074. }.bind(this),
  1075. showTotal: function (total) {
  1076. return '共' + total + '条数据';
  1077. }
  1078. },
  1079. contactInformation:[
  1080. {
  1081. title: '姓名',
  1082. dataIndex: 'contactName',
  1083. key: 'contactName'
  1084. },{
  1085. title: '性别',
  1086. dataIndex: 'sex',
  1087. key: 'sex',
  1088. render: text => { return getsex(text); }
  1089. },
  1090. {
  1091. title: '手机号码',
  1092. dataIndex: 'telNum',
  1093. key: 'telNum'
  1094. },{
  1095. title: '座机号',
  1096. dataIndex: 'mobile',
  1097. key: 'mobile'
  1098. },{
  1099. title: 'QQ号码',
  1100. dataIndex: 'qq',
  1101. key: 'qq'
  1102. },{
  1103. title: '邮箱号',
  1104. dataIndex: 'email',
  1105. key: 'email'
  1106. },{
  1107. title: '微信',
  1108. dataIndex: 'wechat',
  1109. key: 'wechat'
  1110. },
  1111. ],
  1112. addFollow:[
  1113. {
  1114. title: '时间',
  1115. dataIndex: '_followDate',
  1116. key: '_followDate'
  1117. },{
  1118. title: '客户',
  1119. dataIndex: 'contactName',
  1120. key: 'contactName',
  1121. },
  1122. {
  1123. title: '跟进人',
  1124. dataIndex: 'adminName',
  1125. key: 'adminName'
  1126. },{
  1127. title: '联系方式',
  1128. dataIndex: 'contactInfo',
  1129. key: 'contactInfo'
  1130. },{
  1131. title: '客户状态',
  1132. dataIndex: '_customerStatus',
  1133. key: '_customerStatus'
  1134. },{
  1135. title: '跟进结果',
  1136. dataIndex: '_followSituation',
  1137. key: '_followSituation'
  1138. },{
  1139. title: '备注',
  1140. dataIndex: 'remarks',
  1141. key: 'remarks'
  1142. },
  1143. ],
  1144. achievement:[
  1145. {
  1146. title: '编号',
  1147. dataIndex: 'contactName',
  1148. key: 'contactName'
  1149. },{
  1150. title: '成果名称',
  1151. dataIndex: 'sex',
  1152. key: 'sex',
  1153. render: text => { return getsex(text); }
  1154. },
  1155. {
  1156. title: '关键字',
  1157. dataIndex: 'telNum',
  1158. key: 'telNum'
  1159. },{
  1160. title: '类型',
  1161. dataIndex: 'mobile',
  1162. key: 'mobile'
  1163. },{
  1164. title: '所有人名称',
  1165. dataIndex: 'qq',
  1166. key: 'qq'
  1167. },{
  1168. title: '审核状态',
  1169. dataIndex: 'email11',
  1170. key: 'email11'
  1171. },{
  1172. title: '是否精品',
  1173. dataIndex: 'wechat323',
  1174. key: 'wechat323'
  1175. },{
  1176. title: '首页展示',
  1177. dataIndex: 'email33',
  1178. key: 'email33'
  1179. },{
  1180. title: '发布时间',
  1181. dataIndex: 'wechat211',
  1182. key: 'wechat211'
  1183. },
  1184. ],
  1185. demand:[
  1186. {
  1187. title: '编号',
  1188. dataIndex: 'contactName',
  1189. key: 'contactName'
  1190. },{
  1191. title: '需求名称',
  1192. dataIndex: 'sex',
  1193. key: 'sex',
  1194. render: text => { return getsex(text); }
  1195. },
  1196. {
  1197. title: '是否精品',
  1198. dataIndex: 'telNum',
  1199. key: 'telNum'
  1200. },{
  1201. title: '首页展示',
  1202. dataIndex: 'mobile',
  1203. key: 'mobile'
  1204. },{
  1205. title: '关键字',
  1206. dataIndex: 'qq',
  1207. key: 'qq'
  1208. },{
  1209. title: '需求类型',
  1210. dataIndex: 'email44',
  1211. key: 'email44'
  1212. },{
  1213. title: '信息来源',
  1214. dataIndex: 'wechat',
  1215. key: 'wechat'
  1216. },{
  1217. title: '雇主名称',
  1218. dataIndex: 'email12',
  1219. key: 'email12'
  1220. },{
  1221. title: '审核状态',
  1222. dataIndex: 'wechat33',
  1223. key: 'wechat33'
  1224. },{
  1225. title: '需求状态',
  1226. dataIndex: 'email23',
  1227. key: 'email23'
  1228. },{
  1229. title: '有效期限',
  1230. dataIndex: 'wechat212',
  1231. key: 'wechat212'
  1232. },{
  1233. title: '发布时间',
  1234. dataIndex: 'wechat44',
  1235. key: 'wechat44'
  1236. },
  1237. ],
  1238. operationLog:[
  1239. {
  1240. title: '操作员姓名',
  1241. dataIndex: 'operatorName',
  1242. key: 'operatorName'
  1243. },{
  1244. title: '操作类型',
  1245. dataIndex: 'operatorType',
  1246. key: 'operatorType',
  1247. },
  1248. {
  1249. title: '操作时间',
  1250. dataIndex: 'operatorTime',
  1251. key: 'operatorTime'
  1252. },{
  1253. title: '修改前客户状态',
  1254. dataIndex: 'beforeCustomerStatus',
  1255. key: 'beforeCustomerStatus'
  1256. },{
  1257. title: '修改后客户状态',
  1258. dataIndex: 'afterCustomerStatus',
  1259. key: 'afterCustomerStatus'
  1260. },{
  1261. title: '修改前客户意向',
  1262. dataIndex: 'beforeCustomerIntention',
  1263. key: 'beforeCustomerIntention'
  1264. },{
  1265. title: '修改后客户意向',
  1266. dataIndex: 'afterCustomerIntention',
  1267. key: 'afterCustomerIntention'
  1268. },{
  1269. title: '修改前跟进进度',
  1270. dataIndex: 'beforeFollowSituation',
  1271. key: 'beforeFollowSituation'
  1272. },{
  1273. title: '修改后跟进进度',
  1274. dataIndex: 'afterFollowSituation',
  1275. key: 'afterFollowSituation'
  1276. },{
  1277. title: '修改前跟进人',
  1278. dataIndex: 'beforeAdminName',
  1279. key: 'beforeAdminName'
  1280. },{
  1281. title: '修改后跟进人',
  1282. dataIndex: 'afterAdminName',
  1283. key: 'afterAdminName'
  1284. },
  1285. ],
  1286. columnsman:[{
  1287. title: '姓名',
  1288. dataIndex: 'name',
  1289. key: 'name'
  1290. },{
  1291. title: '手机号码',
  1292. dataIndex: 'mobile',
  1293. key: 'mobile'
  1294. }
  1295. ],
  1296. columns: [
  1297. {
  1298. title: '公司名称',
  1299. dataIndex: 'companyName',
  1300. key: 'companyName',
  1301. }, {
  1302. title: '客户类型',
  1303. dataIndex: '_customerType',
  1304. key: '_customerType'
  1305. // render: text => { return getcustomerTyp(text); }
  1306. }, {
  1307. title: '地区',
  1308. dataIndex: 'locationProvince',
  1309. key: 'locationProvince',
  1310. render: text => { return getcityArr(text); }
  1311. }, {
  1312. title: '联系人姓名',
  1313. dataIndex: 'contactName',
  1314. key: 'contactName',
  1315. },
  1316. {
  1317. title: '手机号',
  1318. dataIndex: 'telNum',
  1319. key:'telNum',
  1320. },
  1321. {
  1322. title: '客户状态',
  1323. dataIndex: '_customerStatus',
  1324. key: '_customerStatus'
  1325. //render: text => { return getcustomerStatue(text) }
  1326. },
  1327. {
  1328. title: '意向服务',
  1329. dataIndex: '_companyIntention',
  1330. key: '_companyIntention',
  1331. },
  1332. {
  1333. title: '最新跟进',
  1334. dataIndex: '_followSituation',
  1335. key: '_followSituation',
  1336. },
  1337. {
  1338. title: '跟单人',
  1339. dataIndex: 'adminName',
  1340. key: 'adminName',
  1341. },
  1342. {
  1343. title: '时间',
  1344. dataIndex: 'followDate',
  1345. key: 'followDate',
  1346. }
  1347. ],
  1348. dataSource: [],
  1349. searchTime: [,]
  1350. };
  1351. },
  1352. componentWillMount() {
  1353. let theArr = [];
  1354. customerStatus.map(function (item) {
  1355. theArr.push(
  1356. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1357. )
  1358. });
  1359. let auditArr = [];
  1360. cityArr.map(function (item) {
  1361. auditArr.push(
  1362. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1363. )
  1364. });
  1365. let intentionalArr = [];
  1366. intentionalService.map(function (item) {
  1367. intentionalArr.push(
  1368. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1369. )
  1370. });
  1371. let newArr = [];
  1372. newFollow.map(function (item) {
  1373. newArr.push(
  1374. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  1375. )
  1376. });
  1377. this.state.customerStatuarr = theArr;
  1378. this.state.auditStatusOption = auditArr;
  1379. this.state.intentionalOption = intentionalArr;
  1380. this.state.newOption = newArr;
  1381. this.loadData();
  1382. },
  1383. tableRowClick(record, index) {
  1384. //this.state.RowData = record;
  1385. this.setModal5VisibleOk(record);
  1386. this.contactList(record.id);
  1387. this.rescordlist(record.id);
  1388. this.findCustomerHistory(record.id);
  1389. this.historyList(record.id);
  1390. this.setState({
  1391. selectedRowKeys:[],
  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 = '';
  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. onSelect: (recordt, selected, selectedRows) => {
  1685. this.setState({
  1686. recordt:recordt.id
  1687. })
  1688. },
  1689. };
  1690. const hasSelected = this.state.selectedRowKeys.length > 0;
  1691. const { RangePicker } = DatePicker;
  1692. const theData = this.props.data || {};
  1693. const { getFieldDecorator } = this.props.form;
  1694. const formItemLayout = {
  1695. labelCol: { span: 8 },
  1696. wrapperCol: { span: 14 },
  1697. };
  1698. const theDatak = this.state.datak || {};
  1699. const theDatat = this.state.data || {};
  1700. const theDatahistory=this.state.dataRowhistory || {};
  1701. const contactsOption="";
  1702. const formItemLayput = {
  1703. labelCol: { span: 10 },
  1704. wrapperCol: { span: 14 },
  1705. };
  1706. return (
  1707. <div className="user-content" >
  1708. <div className="content-title">
  1709. <span>我的客户管理</span>
  1710. <div className="patent-addNew clearfix" style={{marginRight:"22px"}}>
  1711. <Button disabled onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }}>下载批量导入模板</Button>
  1712. <Upload
  1713. name="file"
  1714. action={globalConfig.context + "/api/admin/customer/uploadExcel"}
  1715. beforeUpload={beforeUploadFile}
  1716. showUploadList={false}
  1717. onChange={(info) => {
  1718. if (info.file.status !== 'uploading') {
  1719. console.log(info.file, info.fileList);
  1720. }
  1721. if (info.file.status === 'done') {
  1722. if (!info.file.response.error.length) {
  1723. message.success(`${info.file.name} 文件上传成功!`);
  1724. this.loadData();
  1725. } else {
  1726. message.warning(info.file.response.error[0].message);
  1727. return;
  1728. };
  1729. } else if (info.file.status === 'error') {
  1730. message.error(`${info.file.name} 文件上传失败。`);
  1731. };
  1732. }} >
  1733. <Button>上传批量内容</Button>
  1734. </Upload>
  1735. <Button type="primary" className="addButton" onClick={this.addClick}>新建客户<Icon type="plus" /></Button>
  1736. </div>
  1737. </div>
  1738. <div className="user-search">
  1739. <Input placeholder="公司名称"
  1740. value={this.state.companyNamet}
  1741. onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} />
  1742. <Select placeholder="客户类型" style={{ width: 120 }}
  1743. value={this.state.customerTypet }
  1744. onChange={(e) => { this.setState({ customerTypet : e }) }}>
  1745. <Select.Option value="0" >个人客户</Select.Option>
  1746. <Select.Option value="1" >公司客户</Select.Option>
  1747. <Select.Option value="2" >团体客户</Select.Option>
  1748. </Select>
  1749. <Select placeholder="意向服务"
  1750. style={{ width: 160 }}
  1751. value={this.state.companyIntentiont}
  1752. onChange={(e) => { this.setState({ companyIntentiont: e }) }}>
  1753. {this.state.intentionalOption}
  1754. </Select>
  1755. <Select placeholder="跟进进度"
  1756. style={{ width: 160 }}
  1757. value={this.state.followSituationt}
  1758. onChange={(e) => { this.setState({ followSituationt: e }) }}>
  1759. {this.state.newOption}
  1760. </Select>
  1761. <Select placeholder="地区"
  1762. style={{ width: 160 }}
  1763. value={this.state.locationProvincet}
  1764. onChange={(e) => { this.setState({ locationProvincet: e }) }}>
  1765. {this.state.auditStatusOption}
  1766. </Select>
  1767. <Select placeholder="客户状态" style={{ width: 120 }}
  1768. value={this.state.customerStatust}
  1769. onChange={(e) => { this.setState({customerStatust: e }) }}>
  1770. {this.state.customerStatuarr}
  1771. </Select>
  1772. <Button type="primary" onClick={this.search}>搜索</Button>
  1773. <Button onClick={this.reset}>重置</Button>
  1774. <Button onClick={this.setModal3VisibleOk} style={{marginRight:'10px'}} disabled={!hasSelected}>查看跟进记录</Button>
  1775. <Button type="primary" onClick={this.setModal1VisibleOk} disabled={!hasSelected}>添加跟进记录</Button>
  1776. <Button type="primary" onClick={this.showModa} disabled={!hasSelected}>指定转交人</Button>
  1777. <Modal
  1778. footer=''
  1779. title="选择指定人"
  1780. visible={this.state.visible}
  1781. onOk={this.handleOk}
  1782. onCancel={this.handleCancel}
  1783. >
  1784. <Spin spinning={this.state.loading}>
  1785. <Table
  1786. scroll={{y:'350px'}}
  1787. pagination={this.state.paginations}
  1788. columns={this.state.columnsman}
  1789. rowSelection={rowSelection}
  1790. dataSource={this.state.dataman}
  1791. />
  1792. <FormItem wrapperCol={{ span: 12, offset: 12 }} style={{marginTop:'15px'}}>
  1793. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:"50px"}} onClick={this.changeAssigner }>保存</Button>
  1794. <Button className="set-submit" type="ghost" onClick={this.handleCancel } style={{marginLeft:"30px"}} id='change_rem'>取消</Button>
  1795. </FormItem>
  1796. </Spin>
  1797. </Modal>
  1798. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  1799. disabled={!hasSelected}
  1800. onClick={this.changeRow}>转为公共客户<Icon /></Button>
  1801. <div className='clearfix' style={{marginTop:'10px'}}>
  1802. <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'15px' }}
  1803. disabled={!hasSelected}
  1804. onClick={this.delectRow}>删除<Icon type="minus" /></Button>
  1805. <span >更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1806. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1807. <Input placeholder="联系人姓名" style={{width:'140px',marginRight:'10px'}}
  1808. value={this.state.contactNamet}
  1809. onChange={(e) => { this.setState({ contactNamet: e.target.value }); }} />
  1810. </div>
  1811. </div>
  1812. </div>
  1813. <div className="patent-table">
  1814. <Spin spinning={this.state.loading}>
  1815. <Table columns={this.state.columns}
  1816. dataSource={this.state.dataSource}
  1817. rowSelection={rowSelection}
  1818. pagination={this.state.pagination}
  1819. onRowClick={this.tableRowClick}
  1820. />
  1821. </Spin>
  1822. </div>
  1823. <Modal
  1824. style={{left:'500px'}}
  1825. footer=''
  1826. title="客户详细信息"
  1827. width='400px'
  1828. visible={this.state.modal4Visible}
  1829. onOk={this.setModal4Visiblecancel}
  1830. onCancel={this.setModal4Visiblecancel}
  1831. >
  1832. <Form horizontal onSubmit={this.submitcontact} id="demand-form">
  1833. <Spin spinning={this.state.loading}>
  1834. <div className='clearfix'>
  1835. <FormItem className="half-item"
  1836. {...formItemLayput}
  1837. label="所属公司" >
  1838. <span>{this.state.companyName}</span>
  1839. </FormItem>
  1840. <FormItem className="half-item"
  1841. {...formItemLayput}
  1842. label="性别" >
  1843. <span>{getsex(this.state.sex)}</span>
  1844. </FormItem>
  1845. <FormItem className="half-item"
  1846. {...formItemLayput}
  1847. label="姓名" >
  1848. <span>{this.state.name}</span>
  1849. </FormItem>
  1850. <FormItem className="half-item"
  1851. {...formItemLayput}
  1852. label="QQ号" >
  1853. <span>{this.state.qq}</span>
  1854. </FormItem>
  1855. <FormItem className="half-item"
  1856. {...formItemLayput}
  1857. label="手机号" >
  1858. <span>{this.state.telNum}</span>
  1859. </FormItem>
  1860. <FormItem className="half-item"
  1861. {...formItemLayput}
  1862. label="部门" >
  1863. <span>{this.state.depatrment}</span>
  1864. </FormItem>
  1865. <FormItem className="half-item"
  1866. {...formItemLayput}
  1867. label="职位" >
  1868. <span>{this.state.customerPosition}</span>
  1869. </FormItem>
  1870. <FormItem className="half-item"
  1871. {...formItemLayput}
  1872. label="微信号" >
  1873. <span>{this.state.wechat}</span>
  1874. </FormItem>
  1875. </div>
  1876. </Spin>
  1877. </Form>
  1878. </Modal>
  1879. <Modal
  1880. footer=''
  1881. title="历史记录列表"
  1882. width='800px'
  1883. visible={this.state.modal3Visible}
  1884. onOk={this.setModal3Visiblecancel}
  1885. onCancel={this.setModal3Visiblecancel}
  1886. >
  1887. <Spin spinning={this.state.loading}>
  1888. <Table dataSource={this.state.datahistory} >
  1889. <Column
  1890. title="时间"
  1891. dataIndex="_followDate"
  1892. key="_followDate"
  1893. />
  1894. <Column
  1895. title="客户"
  1896. dataIndex="contactName"
  1897. key="contactName"
  1898. render={(text, record,index) => (
  1899. <a href="#" onClick={() => this.setModal4Visible(true,index)}>{text}</a>
  1900. )}
  1901. />
  1902. <Column
  1903. title="客户状态"
  1904. dataIndex="_customerStatus"
  1905. key="_customerStatus"
  1906. />
  1907. <Column
  1908. title="跟进人"
  1909. dataIndex="adminName"
  1910. key="adminName"
  1911. />
  1912. <Column
  1913. title="联系方式"
  1914. dataIndex="contactInfo"
  1915. key="contactInfo"
  1916. />
  1917. <Column
  1918. title="最新跟进状态"
  1919. dataIndex="_followSituation"
  1920. key="_followSituation"
  1921. />
  1922. <Column
  1923. title="跟进结果"
  1924. dataIndex="followResult"
  1925. key="followResult"
  1926. render={(text, record,index) => (
  1927. <div>
  1928. <a href="#" onClick={()=>this.setModal6VisibleOk(index)}>查看跟进结果</a>
  1929. </div>
  1930. )}
  1931. />
  1932. <Column
  1933. title="删除记录"
  1934. key="del"
  1935. render={(text, record, index) => (
  1936. <Popconfirm title="是否删除?" onConfirm={() => this.onDelete(index)}>
  1937. <a href="#" style={{color:"#f00"}}>删除</a>
  1938. </Popconfirm>
  1939. )}
  1940. />
  1941. </Table>
  1942. </Spin>
  1943. </Modal>
  1944. <Modal
  1945. className="followrecord"
  1946. style={{zIndex:'120'}}
  1947. footer=''
  1948. title="新增跟进记录"
  1949. width='1000px'
  1950. visible={this.state.modal1Visible}
  1951. onOk={this.setModal1Visiblecancel}
  1952. onCancel={this.setModal1Visiblecancel}
  1953. >
  1954. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  1955. <Spin spinning={this.state.loading}>
  1956. <div className="user-search">
  1957. <div className="clearfix">
  1958. <FormItem className="half-item"
  1959. {...formItemLayout}
  1960. label="客户公司名称:" >
  1961. <span>{theDatak.companyName}</span>
  1962. </FormItem>
  1963. </div>
  1964. <FormItem className="half-item"
  1965. {...formItemLayout}
  1966. label="最新联系人:" >
  1967. <Select placeholder="选择联系人" style={{ width: 140 }}
  1968. value={this.state.lastName}
  1969. onChange={this.hundleName}>
  1970. {this.state.orderStatusOption}
  1971. </Select>
  1972. <span style={{width:'120px',display:'inline-block',marginLeft:'20px'}}>{getcustomerTyp(theDatat.customerTyp)}
  1973. <Button type="primary" onClick={this.setModal2VisibleOk}>添加</Button>
  1974. </span>
  1975. </FormItem>
  1976. <FormItem className="half-item"
  1977. {...formItemLayout}
  1978. label="联系方式" >
  1979. <Select placeholder="选择方式" style={{width:'100px'}} value={this.state.contacts}
  1980. onChange={this.contacts}>
  1981. <Select.Option value="0">电话</Select.Option>
  1982. <Select.Option value="1">邮件</Select.Option>
  1983. <Select.Option value="2">微信</Select.Option>
  1984. <Select.Option value="3">QQ</Select.Option>
  1985. </Select>
  1986. <span style={{marginLeft:'20px'}}>{this.state.nub}</span>
  1987. </FormItem>
  1988. <FormItem className="half-item"
  1989. {...formItemLayout}
  1990. label="最近跟进时间:" >
  1991. <span>{theDatak.createTime}</span>
  1992. </FormItem>
  1993. <div>
  1994. <FormItem className="half-item"
  1995. {...formItemLayout}
  1996. label="最新跟进时间" >
  1997. <DatePicker placeholder="更新日期" value={moment(this.state.createYear,'YYYY-MM-DD')} onChange={(time) => {this.setState({createYear: time});}}/>
  1998. <TimePicker placeholder="更新时间" value={moment(this.state.creatMent, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMent: time}); }}/>
  1999. </FormItem>
  2000. </div>
  2001. <FormItem className="half-item"
  2002. {...formItemLayout}
  2003. label="客户状态:" >
  2004. <span>{this.state._customerStatus}</span>
  2005. </FormItem>
  2006. <FormItem className="half-item"
  2007. {...formItemLayout}
  2008. label="最新客户状态" >
  2009. <Select placeholder="选择客户状态" style={{width:'200px'}} value={this.state.customerStatus} onChange={(e) => { this.setState({customerStatus: e}); }}>
  2010. {
  2011. customerStatus.map(function (item) {
  2012. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2013. })
  2014. }
  2015. </Select>
  2016. </FormItem>
  2017. <FormItem className="half-item"
  2018. {...formItemLayout}
  2019. label="跟进状态:" >
  2020. <span>{this.state._followSituation}</span>
  2021. </FormItem>
  2022. <FormItem className="half-item"
  2023. {...formItemLayout}
  2024. label="最新跟进状态" >
  2025. <Select placeholder="选择跟进状态" style={{width:'200px'}} value={this.state.followSituation} onChange={(e) => { this.setState({followSituation: e}); }}>
  2026. {
  2027. newFollow.map(function (item) {
  2028. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2029. })
  2030. }
  2031. </Select>
  2032. </FormItem>
  2033. <div className="clearfix">
  2034. <FormItem
  2035. labelCol={{ span: 4 }}
  2036. wrapperCol={{ span: 18 }}
  2037. label="跟进结果" >
  2038. <Input type="textarea" rows={4} value={this.state.remarkst} onChange={(e)=>{this.setState({remarkst:e.target.value}); }}/>
  2039. </FormItem>
  2040. </div>
  2041. <div className="clearfix">
  2042. <FormItem
  2043. labelCol={{ span: 4 }}
  2044. wrapperCol={{ span: 18 }}
  2045. label="技术图片" >
  2046. <PicturesWall
  2047. pictureSign="customer_sys_file"
  2048. fileList={this.getTechnicalPictureUrl}
  2049. pictureUrl={this.state.technicalPictureUrl} />
  2050. <p>图片建议:图片要清晰。</p>
  2051. </FormItem>
  2052. </div>
  2053. <Button style={{ marginRight: '20px' ,marginLeft:'160px',marginBottom:'50px'}} type="primary" onClick={this.addFollowSubmit}>保存</Button>
  2054. <Button className="set-submit" type="ghost" onClick={this.setModal1Visiblecancel} id='change_rem'>取消</Button>
  2055. </div>
  2056. </Spin>
  2057. </Form >
  2058. </Modal>
  2059. <Modal
  2060. className="customeDetails"
  2061. style={{zIndex:'100'}}
  2062. footer=''
  2063. title="客户详情"
  2064. width='1200px'
  2065. visible={this.state.modal5Visible}
  2066. onOk={this.setModal5Visiblecancel}
  2067. onCancel={this.setModal5Visiblecancel}
  2068. >
  2069. <Tabs defaultActiveKey="1" onChange={this.callback}>
  2070. <TabPane tab="基本资料" key="1">
  2071. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  2072. <Spin spinning={this.state.loading}>
  2073. <div className="clearfix">
  2074. <p style={{marginLeft:'50px',marginBottom:'20px',marginTop:'10px',fontSize:'18px'}}>公司资料</p>
  2075. </div>
  2076. <div className="clearfix">
  2077. <FormItem className="half-item"
  2078. {...formItemLayout}
  2079. label="公司名称" >
  2080. <Input type="text" value={this.state.companyName} onChange={(e) => { this.setState({companyName: e.target.value }); }}/>
  2081. </FormItem>
  2082. <FormItem className="half-item"
  2083. {...formItemLayout}
  2084. label="地区" >
  2085. <Select placeholder="选择地区" style={{ width: 160 }} value={this.state.locationProvince} onChange={(e) => { this.setState({locationProvince: e }); }}>
  2086. {
  2087. cityArr.map(function (item) {
  2088. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2089. })
  2090. }
  2091. </Select>
  2092. </FormItem>
  2093. </div>
  2094. <FormItem className="half-item"
  2095. {...formItemLayout}
  2096. label="公司行业" >
  2097. <Input type="text" value={this.state.companyIndustry} onChange={(e) => { this.setState({companyIndustry: e.target.value }); }}/>
  2098. </FormItem>
  2099. <FormItem className="half-item"
  2100. {...formItemLayout}
  2101. label="详细地址" >
  2102. <Input type="text" value={this.state.address} onChange={(e) => { this.setState({address: e.target.value }); }}/>
  2103. </FormItem>
  2104. <FormItem className="half-item"
  2105. {...formItemLayout}
  2106. label="客户状态" >
  2107. <Select placeholder="选择客户状态" style={{ width: 120 }}
  2108. value={getcustomerStatue(this.state.customerStatus)}
  2109. onChange={(e) => { this.setState({customerStatus: e }) }}>
  2110. {this.state.customerStatuarr}
  2111. </Select>
  2112. </FormItem>
  2113. <FormItem className="half-item" style={{marginLeft:'96px'}}
  2114. labelCol={{ span: 4 }}
  2115. wrapperCol={{ span: 18 }}
  2116. label="意向服务" >
  2117. <span>{getCompanyIntention(this.state.companyIntention)}</span>
  2118. {/* <Select placeholder="选择意向服务" style={{width:'200px'}} value={this.state.companyIntention} onChange={(e) => { this.setState({companyIntention: e}); }}>
  2119. {
  2120. intentionalService.map(function (item) {
  2121. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2122. })
  2123. }
  2124. </Select>
  2125. */}
  2126. </FormItem>
  2127. <FormItem className="half-item"
  2128. {...formItemLayout}
  2129. label="客户来源" >
  2130. <span>{this.state.laiyuan}</span>
  2131. </FormItem>
  2132. <FormItem className="half-item"
  2133. {...formItemLayout}
  2134. label="标签" >
  2135. <span>{getTag(theDatak.tag)}</span>
  2136. </FormItem>
  2137. <FormItem className="half-item"
  2138. {...formItemLayout}
  2139. label="最新跟进" >
  2140. <span>{this.state._followSituation}</span>
  2141. </FormItem>
  2142. <div className="clearfix">
  2143. <FormItem
  2144. labelCol={{ span: 4 }}
  2145. wrapperCol={{ span: 18 }}
  2146. label="备注" >
  2147. <span>{theDatak.remarks}</span>
  2148. </FormItem>
  2149. </div>
  2150. <FormItem wrapperCol={{ span: 12, offset: 4 }} style={{marginTop:'25px'}}>
  2151. <Button className="set-submit" type="primary" htmlType="submit" style={{marginRight:"40px"}}>保存</Button>
  2152. <Button className="set-submit" type="ghost" onClick={this.setModal5Visiblecancel}>取消</Button>
  2153. </FormItem>
  2154. <div className="clearfix">
  2155. <p style={{marginLeft:'50px',marginBottom:'20px',marginTop:'10px',fontSize:'18px'}}>联系人<Button type="primary" onClick={this.addContant} style={{marginLeft:'20px'}}>快速新增联系人</Button></p>
  2156. </div>
  2157. <div className="clearfix" style={{marginBottom:'100px'}}>
  2158. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2159. columns={this.state.contactInformation}
  2160. dataSource={this.state.information}
  2161. onRowClick={this.informationRowClick}
  2162. />
  2163. </div>
  2164. </Spin>
  2165. </Form>
  2166. </TabPane>
  2167. <TabPane tab="跟进记录" key="2">
  2168. <Button type="primary" onClick={this.addcord} style={{marginLeft:"75px"}}>添加跟进记录</Button>
  2169. <div className="clearfix" style={{marginBottom:'100px'}}>
  2170. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2171. columns={this.state.addFollow}
  2172. dataSource={this.state.datahistory}
  2173. />
  2174. </div>
  2175. </TabPane>
  2176. <TabPane tab="业务操作" key="3">
  2177. <div style={{marginLeft:"50px",fontSize:'18px'}}>科技成果</div>
  2178. <div className="clearfix">
  2179. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2180. columns={this.state.achievement}
  2181. dataSource={this.state.achievementrecord}
  2182. />
  2183. </div>
  2184. <div style={{marginLeft:"50px",marginTop:'20px',fontSize:'18px'}}>科技需求</div>
  2185. <div className="clearfix" style={{marginBottom:'100px'}}>
  2186. <Table style={{width:'1100px',marginLeft:'50px',background:'none'}} className="tabcolor"
  2187. columns={this.state.demand}
  2188. dataSource={this.state.demandrecord}
  2189. />
  2190. </div>
  2191. </TabPane>
  2192. <TabPane tab="历史记录" key="4">
  2193. <Form horizontal id="demand-form">
  2194. <Spin spinning={this.state.loading}>
  2195. <div className="clearfix">
  2196. <FormItem className="half-item"
  2197. {...formItemLayout}
  2198. label="注册账号" >
  2199. <span>{theDatahistory.customerName}</span>
  2200. </FormItem>
  2201. </div>
  2202. <FormItem className="half-item"
  2203. {...formItemLayout}
  2204. label="录入时间" >
  2205. <span>{theDatahistory.createTime}</span>
  2206. </FormItem>
  2207. <FormItem className="half-item"
  2208. {...formItemLayout}
  2209. label="跟单人" >
  2210. <span>{theDatahistory.adminName}</span>
  2211. </FormItem>
  2212. <FormItem className="half-item"
  2213. {...formItemLayout}
  2214. label="跟进次数" >
  2215. <span>{theDatahistory.followCount}</span>
  2216. </FormItem>
  2217. <FormItem className="half-item"
  2218. {...formItemLayout}
  2219. label="当前客户状态持续时间" >
  2220. <span>{theDatahistory.diffDate}</span>
  2221. </FormItem>
  2222. <FormItem className="half-item"
  2223. {...formItemLayout}
  2224. label="最后跟进联系人" >
  2225. <span>{theDatahistory.contactName}</span>
  2226. </FormItem>
  2227. <FormItem className="half-item"
  2228. {...formItemLayout}
  2229. label="最后跟进时间" >
  2230. <span>{theDatahistory.followDate}</span>
  2231. </FormItem>
  2232. <FormItem className="half-item"
  2233. {...formItemLayout}
  2234. label="最后客户状态" >
  2235. <span>{getcustomerStatue(theDatahistory.customerStatus)}</span>
  2236. </FormItem>
  2237. <FormItem className="half-item"
  2238. {...formItemLayout}
  2239. label="最后跟进状态" >
  2240. <span>{getfllowSituation(theDatahistory.followSituation)}</span>
  2241. </FormItem>
  2242. <FormItem className="half-item"
  2243. {...formItemLayout}
  2244. label="操作日志" >
  2245. <span>查看列表<Switch defaultChecked={false} onChange={this.searchSwitch} style={{marginLeft:'10px'}}/></span>
  2246. </FormItem>
  2247. <FormItem className="half-item" style={{marginBottom:'50px'}}
  2248. {...formItemLayout}
  2249. label="最后修改时间" >
  2250. <span>{theDatahistory.operatorTime}</span>
  2251. </FormItem>
  2252. <div className="search-more clearfix" style={this.state.searchMore ? { display: 'none' } : {}}>
  2253. <Table style={{background:'none',textAlign:'center'}} className="tabcolor"
  2254. columns={this.state.operationLog}
  2255. dataSource={this.state.Logrecord}
  2256. bordered
  2257. />
  2258. </div>
  2259. </Spin>
  2260. </Form>
  2261. </TabPane>
  2262. </Tabs>
  2263. </Modal>
  2264. <Modal
  2265. className="newContacts"
  2266. style={{zIndex:'300'}}
  2267. footer=''
  2268. width='800px'
  2269. title="新增联系人"
  2270. visible={this.state.modal2Visible}
  2271. onOk={this.setModal2Visiblecancel}
  2272. onCancel={this.setModal2Visiblecancel}
  2273. >
  2274. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  2275. <Spin spinning={this.state.loading}>
  2276. <Row>
  2277. <FormItem
  2278. labelCol={{ span: 4 }}
  2279. wrapperCol={{ span: 14 }}
  2280. label="是否是主要联系人:" style={{marginRight:'10px'}}>
  2281. <Radio.Group value={this.state.hotst} onChange={(e) => {
  2282. this.setState({ hotst: e.target.value })
  2283. }}>
  2284. <Radio value={0}>是</Radio>
  2285. <Radio value={1}>否</Radio>
  2286. </Radio.Group>
  2287. </FormItem>
  2288. <FormItem
  2289. labelCol={{ span: 4 }}
  2290. wrapperCol={{ span: 14 }}
  2291. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  2292. <Radio.Group value={this.state.hott} onChange={(e) => {
  2293. this.setState({ hott: e.target.value })
  2294. }}>
  2295. <Radio value={0}>男</Radio>
  2296. <Radio value={1}>女</Radio>
  2297. </Radio.Group>
  2298. </FormItem>
  2299. </Row>
  2300. <Row style={{ paddingLeft:'50px' }}>
  2301. <Col span={2}>姓名:</Col>
  2302. <Col span={8}>
  2303. <Input value={this.state.paymentIdt}
  2304. onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
  2305. </Col>
  2306. <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
  2307. <Col span={8}>
  2308. <Input value={this.state.entIdt}
  2309. onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
  2310. </Col>
  2311. </Row>
  2312. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2313. <Col span={2}>手机号:</Col>
  2314. <Col span={8}>
  2315. <Input value={this.state.payt}
  2316. onChange={(e) => { this.setState({ payt: e.target.value }) }} />
  2317. </Col>
  2318. <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
  2319. <Col span={8}>
  2320. <Input value={this.state.paymt}
  2321. onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
  2322. </Col>
  2323. </Row>
  2324. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  2325. <Col span={2}>部门:</Col>
  2326. <Col span={8}>
  2327. <Input value={this.state.paytIdtt}
  2328. onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
  2329. </Col>
  2330. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  2331. <Col span={8}>
  2332. <Input value={this.state.paentIdt}
  2333. onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
  2334. </Col>
  2335. </Row>
  2336. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2337. <Col span={2}>微信号:</Col>
  2338. <Col span={8}>
  2339. <Input value={this.state.payIdt}
  2340. onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
  2341. </Col>
  2342. <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
  2343. <Col span={8}>
  2344. <Input value={this.state.emailst}
  2345. onChange={(e) => { this.setState({ emailst: e.target.value }) }} />
  2346. </Col>
  2347. </Row>
  2348. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  2349. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  2350. <Button className="set-submit" type="ghost" onClick={this.setModal2Visiblecancel} id='change_rem'>取消</Button>
  2351. </Row>
  2352. </Spin>
  2353. </Form>
  2354. </Modal>
  2355. <Modal
  2356. width="600px"
  2357. footer=''
  2358. title="联系人详细信息"
  2359. visible={this.state.modal8Visible}
  2360. onOk={this.setModal8Visiblecancel}
  2361. onCancel={this.setModal8Visiblecancel}>
  2362. <div style={{paddingRight:"50px"}}>
  2363. <FormItem className="half-item"
  2364. {...formItemLayout}
  2365. label="姓名" >
  2366. {getFieldDecorator('name', {
  2367. initialValue: this.state.name
  2368. })(
  2369. <Input onChange={(e) => { this.setState({ name: e.target.value }) }}/>
  2370. )}
  2371. </FormItem>
  2372. <FormItem className="half-item"
  2373. {...formItemLayout}
  2374. label="性别" >
  2375. {getFieldDecorator('sex', {
  2376. initialValue: this.state.sex
  2377. })(
  2378. <Radio.Group onChange={(e) => { this.setState({ sex: e.target.value }); }}>
  2379. <Radio value="0">男</Radio>
  2380. <Radio value="1">女</Radio>
  2381. </Radio.Group>
  2382. )}
  2383. </FormItem>
  2384. <FormItem
  2385. labelCol={{ span: 6 }}
  2386. wrapperCol={{ span: 14 }}
  2387. label="是否是主要联系人:" style={{marginLeft:"65px"}}>
  2388. {getFieldDecorator('primaryFlg', {
  2389. initialValue: this.state.primaryFlg
  2390. })(
  2391. <Radio.Group onChange={(e) => {this.setState({primaryFlg: e.target.value });}}>
  2392. <Radio value={0}>是</Radio>
  2393. <Radio value={1}>否</Radio>
  2394. </Radio.Group>
  2395. )}
  2396. </FormItem>
  2397. <FormItem className="half-item"
  2398. {...formItemLayout}
  2399. label="手机号码" >
  2400. {getFieldDecorator('telNum', {
  2401. initialValue: this.state.telNum
  2402. })(
  2403. <Input onChange={(e) => { this.setState({ telNum: e.target.value }) }}/>
  2404. )}
  2405. </FormItem>
  2406. <FormItem className="half-item"
  2407. {...formItemLayout}
  2408. label="座机号" >
  2409. {getFieldDecorator('mobile', {
  2410. initialValue: this.state.mobile
  2411. })(
  2412. <Input onChange={(e) => { this.setState({ mobile: e.target.value }) }}/>
  2413. )}
  2414. </FormItem>
  2415. <FormItem className="half-item"
  2416. {...formItemLayout}
  2417. label="QQ号码" >
  2418. {getFieldDecorator('qq', {
  2419. initialValue: this.state.qq
  2420. })(
  2421. <Input onChange={(e) => { this.setState({ qq: e.target.value }) }}/>
  2422. )}
  2423. </FormItem>
  2424. <FormItem className="half-item"
  2425. {...formItemLayout}
  2426. label="邮箱号" >
  2427. {getFieldDecorator('email', {
  2428. initialValue: this.state.email
  2429. })(
  2430. <Input onChange={(e) => { this.setState({ email: e.target.value }) }}/>
  2431. )}
  2432. </FormItem>
  2433. <FormItem className="half-item"
  2434. {...formItemLayout}
  2435. label="微信" >
  2436. {getFieldDecorator('wechat', {
  2437. initialValue: this.state.wechat
  2438. })(
  2439. <Input onChange={(e) => { this.setState({ wechat: e.target.value }) }}/>
  2440. )}
  2441. </FormItem>
  2442. <FormItem className="half-item"
  2443. {...formItemLayout}
  2444. label="部门" >
  2445. {getFieldDecorator('depatrment', {
  2446. initialValue: this.state.depatrment
  2447. })(
  2448. <Input onChange={(e) => { this.setState({ depatrment: e.target.value }) }}/>
  2449. )}
  2450. </FormItem>
  2451. <FormItem className="half-item"
  2452. {...formItemLayout}
  2453. label="职位" >
  2454. {getFieldDecorator('customerPosition', {
  2455. initialValue: this.state.customerPosition
  2456. })(
  2457. <Input onChange={(e) => { this.setState({ customerPosition: e.target.value }); }}/>
  2458. )}
  2459. </FormItem>
  2460. </div>
  2461. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  2462. <Button className="set-submit" type="primary" htmlType="submit" onClick={this.changefollow} style={{marginRight:"50px"}}>保存</Button>
  2463. <Button className="set-submit" type="ghost" onClick={this.setModal8Visiblecancel}>取消</Button>
  2464. </FormItem>
  2465. </Modal>
  2466. <Modal
  2467. footer=''
  2468. title="更多详情"
  2469. visible={this.state.modal6Visible}
  2470. onOk={this.setModal6Visiblecancel}
  2471. onCancel={this.setModal6Visiblecancel}>
  2472. <Spin spinning={this.state.loading}>
  2473. <div className="clearfix">
  2474. <FormItem
  2475. labelCol={{ span: 5 }}
  2476. wrapperCol={{ span: 18 }}
  2477. label="跟进结果" >
  2478. <span>{this.state.followResults}</span>
  2479. </FormItem>
  2480. </div>
  2481. <FormItem
  2482. labelCol={{ span: 5 }}
  2483. wrapperCol={{ span: 18 }}
  2484. label="附件" >
  2485. <div className="clearfix">
  2486. <Upload className="demandDetailShow-upload"
  2487. listType="picture-card"
  2488. fileList={this.state.attachment}
  2489. onPreview={(file) => {
  2490. this.setState({
  2491. previewImage: file.url || file.thumbUrl,
  2492. previewVisible: true,
  2493. });
  2494. }} >
  2495. </Upload>
  2496. <Modal maskClosable={false} footer={null}
  2497. visible={this.state.previewVisible}
  2498. onCancel={() => { this.setState({ previewVisible: false }) }}>
  2499. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  2500. </Modal>
  2501. </div>
  2502. </FormItem>
  2503. </Spin>
  2504. </Modal>
  2505. <CustomerDetail
  2506. data={this.state.RowData}
  2507. showDesc={this.state.showDesc}
  2508. closeDesc={this.closeDesc} />
  2509. </div >
  2510. );
  2511. }
  2512. }));
  2513. export default AchievementList;