myClient.jsx 110 KB

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