individualCustomer.jsx 124 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990
  1. import React from 'react';
  2. import { Radio, Icon, Button, Cascader,Input, Select, Tabs,Spin,Popconfirm, Popover,Table, Switch, message, DatePicker, Modal, Upload,Form ,Row,Col} 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 { citySelect,provinceList,areaSelect} from '../../../NewDicProvinceList';
  8. const { Column, ColumnGroup } = Table;
  9. const TabPane = Tabs.TabPane;
  10. import CustomerDetail from './myClientDesc.jsx';
  11. import {socialAttribute,industryList,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
  12. import {getCompanyIntention,getContactType,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} 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 style={{display:"inline-block"}}>
  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 >= 1 ? 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 IndividualCustomer = 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/listPrivateOrganizationCustomer',
  76. data: {
  77. pageNo: pageNo || 1,
  78. pageSize: this.state.pagination.pageSize,
  79. type: this.state.typeSearch, //名称1
  80. name:this.state.nameSearch,
  81. province:this.state.addressSearch?this.state.addressSearch[0]:this.state.provinceSearch,
  82. city: this.state.addressSearch?this.state.addressSearch[1]:'',
  83. //area: this.state.addressSearch?this.state.addressSearch[2].value:'',
  84. status:this.state.statusSearch,
  85. industry:this.state.industrySearch,
  86. serviceCertification:this.state.serviceCertificationSearch,
  87. userCertification: this.state.userCertificationSearch,
  88. currentMemberStatus:this.state.currentMemberStatusSearch,
  89. lvl:this.state.lvlSearch,
  90. listed:this.state.listedSearch, //是否上市
  91. highTechZone:this.state.highTechZoneSearch, //是否高新
  92. startDate: this.state.releaseDate[0],
  93. endDate: this.state.releaseDate[1],
  94. },
  95. success: function (data) {
  96. let theArr = [];
  97. if (data.error.length || data.data.list=="") {
  98. if (data.error && data.error.length) {
  99. message.warning(data.error[0].message);
  100. };
  101. } else {
  102. for (let i = 0; i < data.data.list.length; i++) {
  103. let thisdata = data.data.list[i];
  104. theArr.push({
  105. key: i,
  106. id: thisdata.uid,
  107. type:thisdata.type,
  108. name:thisdata.name,
  109. status:thisdata.status,
  110. contacts:thisdata.contacts,
  111. contactMobile:thisdata.contactMobile,
  112. industry:thisdata.industry,
  113. createTime:thisdata.createTime,
  114. serviceCertification:thisdata.serviceCertification,
  115. userCertification:thisdata.userCertification,
  116. lvl:thisdata.lvl,
  117. currentMemberStatus:thisdata.currentMemberStatus,
  118. international:thisdata.international,
  119. listed:thisdata.listed,
  120. highTechZone:thisdata.highTechZone,
  121. locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--'
  122. });
  123. };
  124. this.state.pagination.current = data.data.pageNo;
  125. this.state.pagination.total = data.data.totalCount;
  126. };
  127. this.setState({
  128. dataSource: theArr,
  129. pagination: this.state.pagination
  130. });
  131. }.bind(this),
  132. }).always(function () {
  133. this.setState({
  134. loading: false
  135. });
  136. }.bind(this));
  137. },
  138. //点击出现函数
  139. setModal2VisibleOk(e) {
  140. this.setState({
  141. modal2Visible:true
  142. });
  143. },
  144. //点击消失函数
  145. setModal2Visiblecancel(e) {
  146. this.setState({
  147. modal2Visible:false
  148. });
  149. },
  150. getPictureUrl(e) {
  151. this.setState({pictureUrl: e });
  152. },
  153. handleOk(e){
  154. this.setState({
  155. visible: false,
  156. });
  157. },
  158. handleCancel(e){
  159. this.setState({
  160. visible: false,
  161. });
  162. },
  163. getInitialState() {
  164. return {
  165. orgCodeUrl:[],
  166. companyLogoUrl:[],
  167. companyLogoUrls:[],
  168. visible: false ,
  169. searchMore: true,
  170. releaseDate: [],
  171. releaseDate: [],
  172. selectedRowKeys: [],
  173. selectedRowKey: [],
  174. selectedRows: [],
  175. loading: false,
  176. pagination: {
  177. defaultCurrent: 1,
  178. defaultPageSize: 10,
  179. showQuickJumper: true,
  180. pageSize: 10,
  181. onChange: function (page) {
  182. this.loadData(page);
  183. }.bind(this),
  184. showTotal: function (total) {
  185. return '共' + total + '条数据';
  186. }
  187. },
  188. paginations: {
  189. defaultCurrent: 1,
  190. defaultPageSize: 10,
  191. showQuickJumper: true,
  192. pageSize: 10,
  193. onChange: function (page) {
  194. this.loadVisit(page);
  195. }.bind(this),
  196. showTotal: function (total) {
  197. return '共' + total + '条数据';
  198. }
  199. },
  200. paginationsy: {
  201. defaultCurrent: 1,
  202. defaultPageSize: 10,
  203. showQuickJumper: true,
  204. pageSize: 10,
  205. onChange: function (page) {
  206. this.loadBfVisit(page,false);
  207. }.bind(this),
  208. showTotal: function (total) {
  209. return '共' + total + '条数据';
  210. }
  211. },
  212. paginationt: {
  213. defaultCurrent: 1,
  214. defaultPageSize: 10,
  215. showQuickJumper: true,
  216. pageSize: 10,
  217. onChange: function (page) {
  218. this.BusinessList(page,false);
  219. }.bind(this),
  220. showTotal: function (total) {
  221. return '共' + total + '条数据';
  222. }
  223. },
  224. //业务意向列表
  225. intentionList:[
  226. {
  227. title: '业务名称',
  228. dataIndex: 'businessGlossoryId',
  229. key: 'businessGlossoryId',
  230. render: (text, record, index) => {
  231. return <Select placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
  232. {
  233. intentionalService.map(function (item) {
  234. return <Select.Option key={item.value} >{item.key}</Select.Option>
  235. })
  236. }
  237. </Select>
  238. }
  239. },
  240. {
  241. title: '最新进度',
  242. dataIndex: 'followSituation',
  243. key: 'followSituation',
  244. render: (text, record, index) => {
  245. return <Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
  246. {
  247. newFollow.map(function (item) {
  248. return <Select.Option key={item.value} >{item.key}</Select.Option>
  249. })
  250. }
  251. </Select>
  252. }
  253. },{
  254. title: '最新状态',
  255. dataIndex: 'customerStatus',
  256. key: 'customerStatus',
  257. render: (text, record, index) => {
  258. return <Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
  259. {
  260. customerStatus.map(function (item) {
  261. return <Select.Option key={item.value} >{item.key}</Select.Option>
  262. })
  263. }
  264. </Select>
  265. }
  266. },{
  267. title: '跟进说明',
  268. dataIndex: 'remarks',
  269. key: 'remarks',
  270. render: (text, record, index) => {
  271. return <Input value={record.remarks} placeholder="跟进说明"
  272. onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
  273. style={{width:'120px'}}/>
  274. }
  275. },{
  276. title: '操作',
  277. dataIndex: 'rrr',
  278. key: 'rrr',
  279. render: (text, record, index) => {
  280. return <div>
  281. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
  282. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  283. </Popconfirm>
  284. </div>
  285. }
  286. }
  287. ],
  288. businessIntentionList:[{
  289. title: '意向时间',
  290. dataIndex: 'createTime',
  291. key: 'createTime'
  292. },{
  293. title: '客户名称',
  294. dataIndex: 'identifyName',
  295. key: 'identifyName'
  296. },{
  297. title: '业务名',
  298. dataIndex: 'businessName',
  299. key: 'businessName'
  300. }
  301. ,{
  302. title: '营销员',
  303. dataIndex: 'adminName',
  304. key: 'adminName'
  305. },{
  306. title: '业务意向进度',
  307. dataIndex: 'followSituation',
  308. key: 'followSituation',
  309. render:text=>{return getfllowSituation(text)}
  310. },{
  311. title: '客户状态',
  312. dataIndex: 'customerStatus',
  313. key: 'customerStatus' ,
  314. render:text=>{return getcustomerStatue(text)}
  315. },{
  316. title: '操作',
  317. dataIndex: 'ooo',
  318. key: 'ooo',
  319. render:(text,record) =>{return (<Button onClick={(e)=>{this.businessIntentionDetails(record)}}>查看</Button>)}
  320. }
  321. ],
  322. businessFollowList:[
  323. {
  324. title: '跟进时间',
  325. dataIndex: 'followTime',
  326. key: 'followTime',
  327. }, {
  328. title: '营销员',
  329. dataIndex: 'adminName',
  330. key: 'adminName',
  331. }, {
  332. title: '业务意向进度',
  333. dataIndex: 'followSituation',
  334. key: 'followSituation',
  335. render:text=>{return getfllowSituation(text)}
  336. }, {
  337. title: '客户状态',
  338. dataIndex: 'customerStatus',
  339. key: 'customerStatus',
  340. render:text=>{return getcustomerStatue(text)}
  341. },
  342. {
  343. title: '拜访方式',
  344. dataIndex: 'contactType',
  345. key:'contactType',
  346. render:text=>{return getContactType(text)}
  347. }, {
  348. title: '联系人',
  349. dataIndex: 'contacts',
  350. key: 'contacts',
  351. },
  352. {
  353. title: '联系电话',
  354. dataIndex: 'contactMobile',
  355. key:'contactMobile',
  356. },{
  357. title: '操作',
  358. dataIndex: 'ooo',
  359. key: 'ooo',
  360. render:(text,record) =>{return (<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看</Button>)}
  361. }
  362. ],
  363. visitsList:[{
  364. title: '拜访时间',
  365. dataIndex: 'followTime',
  366. key: 'followTime'
  367. },{
  368. title: '客户名称',
  369. dataIndex: 'identityName',
  370. key: 'identityName'
  371. },{
  372. title: '拜访方式',
  373. dataIndex: 'contactType',
  374. key: 'contactType',
  375. render:text=>{return getContactType(text)}
  376. }
  377. ,{
  378. title: '联系人',
  379. dataIndex: 'contacts',
  380. key: 'contacts'
  381. },{
  382. title: '联系电话',
  383. dataIndex: 'contactMobile',
  384. key: 'contactMobile'
  385. },{
  386. title: '拜访人',
  387. dataIndex: 'adminName',
  388. key: 'adminName'
  389. },{
  390. title: '拜访说明',
  391. dataIndex: 'result',
  392. key: 'result' ,
  393. render:text=>{
  394. return <span style={{width:'150px',display:'inline-block',overflow:'hidden'}}>{text}</span>
  395. }
  396. },{
  397. title: '操作',
  398. dataIndex: 'ttt',
  399. key: 'ttt',
  400. render: (text, record, index) => {
  401. return <div>
  402. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
  403. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
  404. </Popconfirm>
  405. </div>
  406. }
  407. }
  408. ],
  409. ContactsLists:[{
  410. title: '姓名',
  411. dataIndex: 'name',
  412. key: 'name',
  413. render: (text, record, index) => {
  414. return <Input value={record.name} placeholder="姓名" key={record.id}
  415. onChange={(e) => { record.name = e.target.value;
  416. this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  417. }
  418. },{
  419. title: '联系人部门',
  420. dataIndex: 'depatrment',
  421. key: 'depatrment',
  422. render: (text, record, index) => {
  423. return <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
  424. onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  425. }
  426. },{
  427. title: '联系人职务',
  428. dataIndex: 'position',
  429. key: 'position',
  430. render: (text, record, index) => {
  431. return <Input value={record.position} placeholder="联系人职务" key={record.id}
  432. onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  433. }
  434. },{
  435. title: '手机号码',
  436. dataIndex: 'mobile',
  437. key: 'mobile',
  438. render: (text, record, index) => {
  439. return <Input value={record.mobile} placeholder="手机号码" key={record.id}
  440. onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  441. }
  442. },{
  443. title: '微信',
  444. dataIndex: 'wechat',
  445. key: 'wechat',
  446. render: (text, record, index) => {
  447. return <Input value={record.wechat} placeholder="微信" key={record.id}
  448. onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  449. }
  450. },{
  451. title: '联系人QQ',
  452. dataIndex: 'qq',
  453. key: 'qq',
  454. render: (text, record, index) => {
  455. return <Input value={record.qq} placeholder="联系人QQ" key={record.id}
  456. onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  457. }
  458. },{
  459. title: '电子邮箱',
  460. dataIndex: 'email',
  461. key: 'email',
  462. render: (text, record, index) => {
  463. return <Input value={record.email} placeholder="电子邮箱" key={record.id}
  464. onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  465. }
  466. },
  467. {
  468. title: '操作',
  469. dataIndex: 'dels',
  470. key: 'dels',
  471. render: (text, record, index) => {
  472. return <div>
  473. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
  474. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  475. </Popconfirm>
  476. </div>
  477. }
  478. }
  479. ],
  480. columnsman:[{
  481. title: '姓名',
  482. dataIndex: 'name',
  483. key: 'name'
  484. },{
  485. title: '手机号码',
  486. dataIndex: 'mobile',
  487. key: 'mobile'
  488. }
  489. ],
  490. columns: [
  491. {
  492. title: '客户名称',
  493. dataIndex: 'name',
  494. key: 'name',
  495. }, {
  496. title: '地区',
  497. dataIndex: 'locationProvince',
  498. key: 'locationProvince',
  499. },
  500. {
  501. title: '联系电话',
  502. dataIndex: 'contactMobile',
  503. key:'contactMobile',
  504. },
  505. {
  506. title: '行业',
  507. dataIndex: 'industry',
  508. key: 'industry',
  509. //render: text => { return getcustomerStatue(text) }
  510. },
  511. {
  512. title: '社会性质',
  513. dataIndex: 'industrys',
  514. key: 'industrys',
  515. //render: text => { return getcustomerStatue(text) }
  516. },
  517. {
  518. title: '创建时间',
  519. dataIndex: 'createTime',
  520. key: 'createTime',
  521. },
  522. {
  523. title: '业务认证',
  524. dataIndex: 'serviceCertification',
  525. key: 'serviceCertification',
  526. render: text => { return getCertification(text) }
  527. },
  528. {
  529. title: '实名认证',
  530. dataIndex: 'userCertification',
  531. key: 'userCertification',
  532. render: text => { return getCertification(text) }
  533. },
  534. {
  535. title: '是否专家',
  536. dataIndex: 'expert',
  537. key: 'expert',
  538. render: text => { return getWhether(text) }
  539. },{
  540. title: '是否明星',
  541. dataIndex: 'star',
  542. key: 'star',
  543. render: text => { return getWhether(text) }
  544. },
  545. {
  546. title: '是否会员',
  547. dataIndex: 'member',
  548. key: 'member',
  549. render: text => { return getWhether(text) }
  550. },
  551. {
  552. title: '是否国际',
  553. dataIndex: 'international',
  554. key: 'international',
  555. render: text => { return getWhether(text) }
  556. },
  557. {
  558. title: '会员等级',
  559. dataIndex: 'lvl',
  560. key: 'lvl',
  561. render:text => {return getLvl(text)}
  562. },
  563. {
  564. title: '会员状态',
  565. dataIndex: 'currentMemberStatus',
  566. key: 'currentMemberStatus',
  567. render:text => {return getCurrentMember(text)}
  568. },
  569. {
  570. title: '状态',
  571. dataIndex: 'statust',
  572. key: 'statust',
  573. render:text => {return getCurrentMember(text)}
  574. },
  575. {
  576. title: '操作',
  577. dataIndex: 'abc',
  578. key: 'abc',
  579. render: (text, record, index) => {
  580. return <div>
  581. <Button onClick={(e) =>{ e.stopPropagation(), this.visit(record)}} type="primary">拜访</Button>
  582. </div>
  583. }
  584. }
  585. ],
  586. data:[],
  587. dataman:[],
  588. dataSource: [],
  589. visitArrList:[],
  590. searchTime: [,]
  591. };
  592. },
  593. //更多操作
  594. ModalOperation(){
  595. this.setState({
  596. visible: true,
  597. });
  598. },
  599. //tab2获取联系人详情
  600. contactLists(ids) {
  601. this.setState({
  602. loading: true
  603. });
  604. $.ajax({
  605. method: "get",
  606. dataType: "json",
  607. crossDomain: false,
  608. url:globalConfig.context + '/api/admin/customer/findCustomerContacts',
  609. data: {
  610. uid:ids , //名称1
  611. },
  612. success: function (data) {
  613. let theArr = [];
  614. if (data.error.length || data.data.list=="") {
  615. if (data.error && data.error.length) {
  616. message.warning(data.error[0].message);
  617. };
  618. } else {
  619. for (let i = 0; i < data.data.length; i++) {
  620. let thisdata = data.data[i];
  621. theArr.push({
  622. id:thisdata.id,
  623. name:thisdata.name,
  624. mobile:thisdata.mobile,
  625. email:thisdata.email,
  626. qq:thisdata.qq,
  627. wechat:thisdata.wechat,
  628. depatrment:thisdata.depatrment,
  629. position:thisdata.position,
  630. });
  631. };
  632. };
  633. this.setState({
  634. contactList: theArr,
  635. });
  636. }.bind(this),
  637. }).always(function () {
  638. this.setState({
  639. loading: false
  640. });
  641. }.bind(this));
  642. },
  643. //刷新新增拜访记录刷新
  644. deletelist(e){
  645. $.ajax({
  646. method: "get",
  647. dataType: "json",
  648. url:globalConfig.context + '/api/admin/customer/toAddFollow',
  649. data: {
  650. uid: e,
  651. },
  652. success: function (data) {
  653. let listArr=[];
  654. let thedata=data.data;
  655. if (!thedata) {
  656. if (data.error && data.error.length) {
  657. message.warning(data.error[0].message);
  658. };
  659. thedata = {};
  660. };
  661. for (let i = 0; i < data.data.userBusinessList.length; i++) {
  662. let thisdata = data.data.userBusinessList[i];
  663. listArr.push({
  664. id: thisdata.id,
  665. businessGlossoryId:String(thisdata.businessGlossoryId),
  666. followSituation:String(thisdata.followSituation),
  667. customerStatus:String(thisdata.customerStatus),
  668. remarks:thisdata.remarks,
  669. });
  670. };
  671. this.setState({
  672. contacts:thedata.contacts,
  673. uid:thedata.uid,
  674. data:listArr,
  675. identityName:thedata.identityName,
  676. followTime:thedata.followTime,
  677. businessGlossoryId:thedata.businessGlossoryId,
  678. followSituation:thedata.followSituation,
  679. customerStatus:thedata.customerStatus,
  680. remarks:thedata.remarks,
  681. });
  682. }.bind(this),
  683. }).always(function () {
  684. this.setState({
  685. loading: false
  686. });
  687. }.bind(this));
  688. },
  689. //进入新增拜访记录
  690. visit(e){
  691. this.state.keys=true;
  692. this.getNewWoman(e.id);
  693. this.deletelist(e.id)
  694. this.setState({
  695. result:'',
  696. contactType:undefined,
  697. visitModul:true,
  698. loading: true
  699. });
  700. },
  701. //拜访记录删除
  702. visitDelet(e){
  703. $.ajax({
  704. method: "get",
  705. dataType: "json",
  706. crossDomain: false,
  707. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  708. data: {
  709. id: e.followId,//删除的ID
  710. }
  711. }).done(function (data) {
  712. if (!data.error.length) {
  713. message.success('删除成功!');
  714. this.setState({
  715. loading: false,
  716. });
  717. } else {
  718. message.warning(data.error[0].message);
  719. };
  720. this.loadVisit();
  721. }.bind(this));
  722. },
  723. //进入修改拜访记录
  724. visitModify(e){
  725. this.setState({
  726. visitModul:true,
  727. loading: true
  728. });
  729. $.ajax({
  730. method: "get",
  731. dataType: "json",
  732. url:globalConfig.context + '/api/admin/customer/toUpdateFollow',
  733. data: {
  734. followId: e,
  735. },
  736. success: function (data) {
  737. let theArr = [];
  738. let thedata=data.data;
  739. if (!thedata) {
  740. if (data.error && data.error.length) {
  741. message.warning(data.error[0].message);
  742. };
  743. thedata = {};
  744. };
  745. for (let i = 0; i < data.data.userBusinessList.length; i++) {
  746. let thisdata = data.data.userBusinessList[i];
  747. theArr.push({
  748. id: thisdata.id,
  749. businessGlossoryId:String(thisdata.businessGlossoryId),
  750. followSituation:String(thisdata.followSituation),
  751. customerStatus:String(thisdata.customerStatus),
  752. remarks:thisdata.remarks,
  753. });
  754. };
  755. this.setState({
  756. followIds:thedata.followId,
  757. contacts:thedata.contacts,
  758. uid:thedata.uid,
  759. data:theArr,
  760. nub:thedata.contactMobile,
  761. result:thedata.result,
  762. contactType:parseInt(thedata.contactType),
  763. identityName:thedata.identityName,
  764. followTime:thedata.followTime,
  765. businessGlossoryId:thedata.businessGlossoryId,
  766. followSituation:thedata.followSituation,
  767. customerStatus:thedata.customerStatus,
  768. adminName:thedata.adminName,
  769. });
  770. }.bind(this),
  771. }).always(function () {
  772. this.setState({
  773. loading: false
  774. });
  775. }.bind(this));
  776. },
  777. //列表删除功能
  778. delectRow() {
  779. let deletedIds;
  780. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  781. let rowItem = this.state.selectedRows[idx];
  782. if (rowItem.id) {
  783. deletedIds=rowItem.id;
  784. };
  785. };
  786. this.setState({
  787. selectedRowKeys: [],
  788. });
  789. $.ajax({
  790. method: "get",
  791. dataType: "json",
  792. crossDomain: false,
  793. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  794. data: {
  795. id: deletedIds,//删除的ID
  796. }
  797. }).done(function (data) {
  798. if (!data.error.length) {
  799. message.success('删除成功!');
  800. this.setState({
  801. loading: false,
  802. });
  803. } else {
  804. message.warning(data.error[0].message);
  805. };
  806. this.loadData();
  807. }.bind(this));
  808. },
  809. //指定转交人的点击函数
  810. showModa(){
  811. this.setState({
  812. visible: true,
  813. });
  814. this.setState({
  815. selectedRowKey:[],
  816. });
  817. this.setState({
  818. selectedRowKeys:this.state.selectedRowKeys,
  819. });
  820. let changeIds;
  821. let adminName;
  822. let customerStatus;
  823. let companyIntention;
  824. let followSituation;
  825. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  826. let rowItem = this.state.selectedRows[idx];
  827. if (rowItem.id) {
  828. changeIds=rowItem.id;
  829. adminName=rowItem.adminName;
  830. customerStatus=rowItem.customerStatus;
  831. companyIntention=rowItem.companyIntention;
  832. followSituation=rowItem.followSituation;
  833. };
  834. };
  835. $.ajax({
  836. method: "post",
  837. dataType: "json",
  838. crossDomain: false,
  839. url: globalConfig.context + "/api/admin/customer/findAdmin",
  840. data: {
  841. id: changeIds,//这一行数据的ID
  842. beforeCompanyIntention:companyIntention,//意向服务
  843. beforeCustomerStatus:customerStatus,//客户状态
  844. beforeFollowSituation:followSituation,//最新跟进状态
  845. beforeAdminName:adminName,//跟进人
  846. }
  847. }).done(function (data) {
  848. if (data.error && data.error.length) {
  849. message.warning(data.error[0].message);
  850. } else {
  851. let theAssigne = [];
  852. if (!data.data) {
  853. if (data.error && data.error.length) {
  854. message.warning(data.error[0].message);
  855. };
  856. } else {
  857. for (let i = 0; i < data.data.length; i++) {
  858. let thisdata = data.data[i];
  859. //处理数据 进行循环
  860. theAssigne.push({
  861. name: thisdata.name,
  862. id: thisdata.id,
  863. ids: thisdata.cid,
  864. mobile:thisdata.mobile,
  865. adminName: thisdata.beforeAdminName,
  866. customerStatus: thisdata.beforeCustomerStatus,
  867. companyIntention: thisdata.beforeCompanyIntention,
  868. followSituation: thisdata.beforeFollowSituation,
  869. });
  870. };
  871. };
  872. this.setState({
  873. dataman: theAssigne,
  874. paginations:false
  875. });
  876. }
  877. }.bind(this));
  878. },
  879. //选择了指定人之后的保存点击函数,需要修改函数
  880. changeAssigner() {
  881. this.setState({
  882. visible: false,
  883. });
  884. this.setState({
  885. selectedRowKeys:[],
  886. });
  887. let datt=this.state.selectedRow;
  888. $.ajax({
  889. method: "post",
  890. dataType: "json",
  891. crossDomain: false,
  892. url: globalConfig.context + "/api/admin/customer/transferCustomer",
  893. data: {
  894. id: datt[0].ids,//这一行数据的ID
  895. aid:datt[0].id,//指定转交人的ID
  896. beforeAdminName:datt[0].adminName,//之前的跟进人
  897. adminName:datt[0].name,//转交的跟进人
  898. }
  899. }).done(function (data) {
  900. if (!data.error.length) {
  901. message.success('转交成功!');
  902. this.setState({
  903. loading: false,
  904. });
  905. } else {
  906. message.warning(data.error[0].message);
  907. };
  908. this.loadData();
  909. }.bind(this));
  910. },
  911. //转为公共客户
  912. changeRow() {
  913. let deletedIds;
  914. let adminName;
  915. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  916. let rowItem = this.state.selectedRows[idx];
  917. if (rowItem.id) {
  918. deletedIds=rowItem.id;
  919. adminName=rowItem.adminName;
  920. };
  921. };
  922. this.setState({
  923. selectedRowKeys: [],
  924. });
  925. $.ajax({
  926. method: "get",
  927. dataType: "json",
  928. crossDomain: false,
  929. url: globalConfig.context + "/api/admin/customer/transferToPublic",
  930. data: {
  931. id: deletedIds,
  932. beforeAdminName:adminName,
  933. }
  934. }).done(function (data) {
  935. if (!data.error.length) {
  936. message.success('已转为公共客户!');
  937. this.setState({
  938. loading: false,
  939. });
  940. } else {
  941. message.warning(data.error[0].message);
  942. };
  943. this.loadData();
  944. }.bind(this));
  945. },
  946. getOrgCodeUrl(e) {
  947. this.setState({ orgCodeUrl: e });
  948. },
  949. getCompanyLogoUrl(e) {
  950. this.setState({ companyLogoUrl: e });
  951. },
  952. getCompanyLogoUrls(e) {
  953. this.setState({ companyLogoUrls: e });
  954. },
  955. componentWillMount() {
  956. //城市
  957. let Province = [];
  958. provinceList.map(function (item) {
  959. var id= String(item.id)
  960. Province.push(
  961. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  962. )
  963. });
  964. //行业
  965. let intentionalArr = [];
  966. industryList.map(function (item) {
  967. intentionalArr.push(
  968. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  969. )
  970. });
  971. //会员等级
  972. let lvlArr = [];
  973. lvl.map(function (item) {
  974. lvlArr.push(
  975. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  976. )
  977. });
  978. //会员状态customerStatus
  979. let currentMemberArr = [];
  980. currentMember.map(function (item) {
  981. currentMemberArr.push(
  982. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  983. )
  984. });
  985. //客户状态
  986. let customerStatusArr = [];
  987. customerStatus.map(function (item) {
  988. customerStatusArr.push(
  989. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  990. )
  991. });
  992. this.state.Provinces = Province;
  993. this.state.intentionalOption = intentionalArr;
  994. this.state.lvlArrOption = lvlArr;
  995. this.state.currentMemberArrOption = currentMemberArr;
  996. this.state.customerStatusArrOption = customerStatusArr;
  997. this.loadData();
  998. },
  999. //转为公共客户
  1000. changeRow() {
  1001. let deletedIds;
  1002. let adminName;
  1003. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1004. let rowItem = this.state.selectedRows[idx];
  1005. if (rowItem.id) {
  1006. deletedIds=rowItem.id;
  1007. adminName=rowItem.adminName;
  1008. };
  1009. };
  1010. this.setState({
  1011. selectedRowKeys: [],
  1012. });
  1013. $.ajax({
  1014. method: "get",
  1015. dataType: "json",
  1016. crossDomain: false,
  1017. url: globalConfig.context + "/api/admin/customer/transferToPublic",
  1018. data: {
  1019. id: deletedIds,
  1020. beforeAdminName:adminName,
  1021. }
  1022. }).done(function (data) {
  1023. if (!data.error.length) {
  1024. message.success('已转为公共客户!');
  1025. this.setState({
  1026. loading: false,
  1027. });
  1028. } else {
  1029. message.warning(data.error[0].message);
  1030. };
  1031. this.loadData();
  1032. }.bind(this));
  1033. },
  1034. //新建
  1035. addClick() {
  1036. this.state.RowData={};
  1037. this.setState({
  1038. showDesc: true,
  1039. });
  1040. },
  1041. newmodal(e){
  1042. if(e){
  1043. this.tableRowClick();
  1044. }
  1045. },
  1046. closeDesc(e, s) {
  1047. this.state.showDesc = e;
  1048. if (s) {
  1049. this.loadData();
  1050. };
  1051. },
  1052. search() {
  1053. this.loadData();
  1054. },
  1055. reset() {
  1056. this.state.typeSearch=undefined; //名称1
  1057. this.state.nameSearch='';
  1058. this.state.addressSearch=[];
  1059. this.state.provinceSearch=undefined;
  1060. this.state.citySearch=undefined;
  1061. this.state.statusSearch=undefined;
  1062. this.state.contactsSearch=undefined;
  1063. this.state.contactMobileSearch=undefined;
  1064. this.state.industrySearch=undefined;
  1065. this.state.serviceCertificationSearch=undefined;
  1066. this.state.userCertificationSearch=undefined;
  1067. this.state.currentMemberStatusSearch=undefined;
  1068. this.state.lvlSearch=undefined;
  1069. this.state.listedSearch=undefined;
  1070. this.state.highTechZoneSearch=undefined;
  1071. this.state.releaseDate[0]=undefined;
  1072. this.state.releaseDate[1]=undefined;
  1073. this.loadData();
  1074. },
  1075. searchSwitch() {
  1076. this.setState({
  1077. searchMore: !this.state.searchMore
  1078. });
  1079. },
  1080. //详情保存函数
  1081. detailsSubmint(){
  1082. this.setState({
  1083. modal5Visible:false,
  1084. })
  1085. },
  1086. //整行点击
  1087. tableRowClick(record, index) {
  1088. this.state.RowData = record;
  1089. this.detailsModalOk(record);
  1090. this.loadInformation(record.id)
  1091. this.httpAccount(record.id);
  1092. this.loadBfVisit(1,record.id);
  1093. this.BusinessList(1,record.id);
  1094. this.contactLists(record.id);
  1095. this.setState({
  1096. selectedRowKeys:[],
  1097. rowId:record.id,
  1098. })
  1099. },
  1100. VisitRowClick(record, index) {
  1101. this.state.keys=false;
  1102. this.state.RowData = record;
  1103. this.visitModify(record.followId);
  1104. this.setState({
  1105. selectedRowKeys:[],
  1106. delectId:record.followId,
  1107. })
  1108. },
  1109. //基本信息提交
  1110. newSubmit(e){
  1111. e.preventDefault();
  1112. this.state.data=[];
  1113. this.setState({
  1114. selectedRowKeys: [],
  1115. });
  1116. this.props.form.validateFields((err, values) => {
  1117. let theorgCodeUrl = [];
  1118. if (this.state.orgCodeUrl.length) {
  1119. let picArr = [];
  1120. this.state.orgCodeUrl.map(function (item) {
  1121. picArr.push(item.response.data);
  1122. });
  1123. theorgCodeUrl = picArr.join(",");
  1124. };
  1125. let thecompanyLogoUrl = [];
  1126. if (this.state.companyLogoUrl.length) {
  1127. let picArr = [];
  1128. this.state.companyLogoUrl.map(function (item) {
  1129. picArr.push(item.response.data);
  1130. });
  1131. thecompanyLogoUrl = picArr.join(",");
  1132. };
  1133. let thecompanyLogoUrls = [];
  1134. if (this.state.companyLogoUrl.length) {
  1135. let picArr = [];
  1136. this.state.companyLogoUrls.map(function (item) {
  1137. picArr.push(item.response.data);
  1138. });
  1139. thecompanyLogoUrls = picArr.join(",");
  1140. };
  1141. if (!err) {
  1142. this.setState({
  1143. loading: true
  1144. });
  1145. $.ajax({
  1146. method: "post",
  1147. dataType: "json",
  1148. url:globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  1149. data: {
  1150. id:this.state.InformationId,
  1151. uid: this.state.InformationUid,
  1152. societyTag:values.societyTag,
  1153. introduction:values.introduction,
  1154. unitName:this.state.unitName,
  1155. industry:this.state.industry,
  1156. locationProvince:(this.state.ProvinceCity)[0],//省-
  1157. locationCity:(this.state.ProvinceCity)[1],//市
  1158. locationArea:(this.state.ProvinceCity)[2],//区
  1159. postalAddress:values.postalAddress,
  1160. contactsFixedTel:values.contactsFixedTel,
  1161. contactsFax:values.contactsFax,
  1162. registeredCapital:values.registeredCapital,
  1163. enterpriseScale:values.enterpriseScale,
  1164. legalPerson:values.legalPerson,
  1165. legalPersonIdCard:values.legalPersonIdCard,
  1166. legalPersonTel:values.legalPersonTel,
  1167. legalPersonEmail:values.legalPersonEmail,
  1168. highTechZone:this.state.highTechZone,
  1169. listed:this.state.listed,
  1170. orgCode:values.orgCode,
  1171. businessScope:values.businessScope,
  1172. introduction:values.introduction,
  1173. companyLogoUrl:thecompanyLogoUrl,
  1174. companyLogoUrls:thecompanyLogoUrls,
  1175. orgCodeUrl:theorgCodeUrl,
  1176. }
  1177. }).done(function (data) {
  1178. this.setState({
  1179. loading: false
  1180. });
  1181. if (!data.error.length) {
  1182. message.success('保存成功!');
  1183. this.detailsModal()
  1184. this.loadData();
  1185. } else {
  1186. message.warning(data.error[0].message);
  1187. }
  1188. }.bind(this));
  1189. }
  1190. })
  1191. },
  1192. //点击整行查看详情
  1193. //查看基本详情基本信息
  1194. loadInformation(record){
  1195. this.RowClick;
  1196. $.ajax({
  1197. method: "get",
  1198. dataType: "json",
  1199. crossDomain: false,
  1200. url: globalConfig.context + '/api/admin/customer/findOrganizationCustomerDetail',
  1201. data: {
  1202. uid: record
  1203. },
  1204. success: function (data) {
  1205. let thisData = data.data;
  1206. if (!thisData) {
  1207. if (data.error && data.error.length) {
  1208. message.warning(data.error[0].message);
  1209. };
  1210. thisData = {};
  1211. };
  1212. let ProvinceCityArr=[];
  1213. let ProvinceS=thisData.locationProvince; //getprovince
  1214. let citys=thisData.locationCity;
  1215. let Areas=thisData.locationArea;
  1216. ProvinceCityArr.push(ProvinceS,citys,Areas);
  1217. this.setState({
  1218. InformationId:thisData.id,
  1219. InformationUid:thisData.uid,
  1220. unitName:thisData.unitName,
  1221. listed:thisData.listed,
  1222. highTechZone:thisData.highTechZone,
  1223. orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1224. companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1225. companyLogoUrls: thisData.companyLogoUrls ? splitUrl(thisData.companyLogoUrls, ',', globalConfig.avatarHost + '/upload') : [],
  1226. dataInformation:thisData,
  1227. ProvinceCity:ProvinceCityArr,
  1228. industry:String(thisData.industry)=='null'?undefined:String(thisData.industry),
  1229. });
  1230. }.bind(this),
  1231. }).always(function () {
  1232. this.setState({
  1233. loading: false
  1234. });
  1235. }.bind(this));
  1236. },
  1237. //tab3账户信息请求数据
  1238. httpAccount(record){
  1239. this.RowClick;
  1240. $.ajax({
  1241. method: "get",
  1242. dataType: "json",
  1243. crossDomain: false,
  1244. url: globalConfig.context + '/api/admin/customer/findUserAccountDetail',
  1245. data: {
  1246. uid: record
  1247. },
  1248. success: function (data) {
  1249. let thisData = data.data;
  1250. if (!thisData) {
  1251. if (data.error && data.error.length) {
  1252. message.warning(data.error[0].message);
  1253. };
  1254. thisData = {};
  1255. };
  1256. let sourcecustomer=''
  1257. switch(String(thisData.source)){
  1258. case '0':
  1259. sourcecustomer='注册客户'
  1260. break;
  1261. case '1':
  1262. sourcecustomer='录入客户'
  1263. break;
  1264. }
  1265. this.setState({
  1266. Accountuid:thisData.id,
  1267. mobile:thisData.mobile,
  1268. nickname:thisData.nickname,
  1269. email:thisData.email,
  1270. type:getcustomerTyp(thisData.type),
  1271. source:sourcecustomer,
  1272. isMember:thisData.isMember,
  1273. currentMemberStatus:String(thisData.currentMemberStatus),
  1274. lvl:String(thisData.lvl),
  1275. serviceCertification:thisData.serviceCertification,
  1276. status:String(thisData.status),
  1277. userCertification:thisData.userCertification,
  1278. createTimes:thisData.createTimes,
  1279. });
  1280. }.bind(this),
  1281. }).always(function () {
  1282. this.setState({
  1283. loading: false
  1284. });
  1285. }.bind(this));
  1286. },
  1287. detailsModalOk(e) {
  1288. this.setState({ modal5Visible:true });//需要一个请求数据
  1289. },
  1290. //点击消失函数
  1291. detailsModal(e) {
  1292. this.setState({
  1293. modal5Visible:false
  1294. });
  1295. },
  1296. //拜访modul函数
  1297. visitOk(e) {
  1298. this.setState({
  1299. visitModul:false
  1300. });
  1301. this.loadVisit()
  1302. },
  1303. visitCancel(e) {
  1304. this.setState({
  1305. visitModul:false
  1306. });
  1307. },
  1308. //拜访保存函数
  1309. visitSubmit(e){
  1310. e.preventDefault();
  1311. if(this.state.contactType==undefined){
  1312. message.warning('请选择拜访方式')
  1313. return false;
  1314. };
  1315. if(this.state.keys){
  1316. if(this.state.lastName==undefined){
  1317. message.warning('请选择联系人')
  1318. return false;
  1319. }
  1320. };
  1321. this.setState({
  1322. selectedRowKeys: [],
  1323. });
  1324. this.setState({
  1325. loading: true
  1326. });
  1327. let contactsId='';
  1328. if(this.state.keys){
  1329. let conts=this.state.lastName;
  1330. contactsId= this.state.contactsIdArr[conts].id;
  1331. }
  1332. //新增
  1333. $.ajax({
  1334. method: "post",
  1335. dataType: "json",
  1336. url:this.state.keys?globalConfig.context + '/api/admin/customer/addFollow':globalConfig.context + '/api/admin/customer/updateFollow',
  1337. data: this.state.keys?{
  1338. userBusinessList:JSON.stringify(this.state.data),
  1339. uid: this.state.uid,
  1340. ocbId:contactsId ,
  1341. contactType:this.state.contactType,
  1342. result: this.state.result,
  1343. followTime: this.state.followTime,
  1344. }:{
  1345. followId:this.state.followIds,
  1346. userBusinessList:JSON.stringify(this.state.data),
  1347. uid: this.state.uid,
  1348. contactType:this.state.contactType,
  1349. result: this.state.result,
  1350. followTime: this.state.followTime,
  1351. }
  1352. }).done(function (data) {
  1353. this.setState({
  1354. loading: false
  1355. });
  1356. if (!data.error.length) {
  1357. message.success('保存成功!');
  1358. this.loadVisit(); //
  1359. this.loadData();
  1360. this.visitCancel();
  1361. } else {
  1362. message.warning(data.error[0].message);
  1363. }
  1364. }.bind(this));
  1365. },
  1366. //当选择联系人的列表变化时,则执行
  1367. hundleName(e){
  1368. let changNub=this.state.telNum[e];
  1369. this.setState({
  1370. nub:this.state.telNum[e],
  1371. lastName: e,
  1372. });
  1373. },
  1374. //添加新业务及单位客户详情新增
  1375. addNew() {
  1376. this.state.data.push({
  1377. customerStatus:undefined,
  1378. businessGlossoryId:undefined,
  1379. followSituation:undefined,
  1380. remarks: '',
  1381. });
  1382. this.setState({
  1383. data: this.state.data
  1384. })
  1385. },
  1386. //tab2新增联系人
  1387. addcontact() {
  1388. this.state.contactList.push({
  1389. id:null,
  1390. name: '',
  1391. mobile: '',
  1392. email: '',
  1393. qq: '',
  1394. wechat: '',
  1395. depatrment: '',
  1396. position: '',
  1397. });
  1398. this.setState({
  1399. contactList: this.state.contactList
  1400. })
  1401. },
  1402. //tab5进入修改时
  1403. //进入修改时
  1404. listFollowUp(e){
  1405. $.ajax({
  1406. method: "get",
  1407. dataType: "json",
  1408. crossDomain: false,
  1409. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  1410. data:{
  1411. ufbId:e
  1412. },
  1413. success: function (data) {
  1414. let thedata=data.data;
  1415. if (!thedata) {
  1416. if (data.error && data.error.length) {
  1417. message.warning(data.error[0].message);
  1418. };
  1419. thedata = {};
  1420. };
  1421. this.setState({
  1422. businessGlossoryIds:thedata.businessGlossoryId,
  1423. followSituations:thedata.followSituation,
  1424. customerStatuss:thedata.customerStatus,
  1425. followTimes:thedata.followTime,
  1426. createTimes:thedata.createTime,
  1427. identifyNames:thedata.identifyName,
  1428. contactTypes:parseInt(thedata.contactType),
  1429. results:thedata.result,
  1430. remarkss:thedata.remarks,
  1431. adminNames:thedata.adminName,
  1432. contactss:thedata.contacts,
  1433. contactMobiles:thedata.contactMobile,
  1434. ufbId:thedata.ufbId,
  1435. followIds:thedata.followId,
  1436. });
  1437. }.bind(this),
  1438. }).always(function () {
  1439. this.setState({
  1440. loading: false
  1441. });
  1442. }.bind(this));
  1443. },
  1444. //修改密码Modul
  1445. modifyPassworld(){
  1446. this.setState({
  1447. passworldModul:true
  1448. });
  1449. },
  1450. passworldOk(e) {
  1451. this.setState({
  1452. passworldModul:false
  1453. });
  1454. },
  1455. passworldCancel(e) {
  1456. this.setState({
  1457. passworldModul:false
  1458. });
  1459. },
  1460. //修改密码保存
  1461. passworldSubmit(e){
  1462. e.preventDefault();
  1463. this.passworldCancel()
  1464. },
  1465. //新增联系人
  1466. addcontactModulOK(){
  1467. this.setState({
  1468. addcontactModul:false
  1469. });
  1470. },
  1471. addcontactModulcancel(){
  1472. this.setState({
  1473. addcontactModul:false
  1474. });
  1475. },
  1476. //点击新增详情
  1477. newContacts(){
  1478. this.setState({
  1479. addcontactModul:true
  1480. });
  1481. },
  1482. //新增联系人保存函数
  1483. submitcontactman(e){
  1484. e.preventDafault();
  1485. },
  1486. //获取联系人下拉框
  1487. getNewWoman(ids) {
  1488. this.state.data = []
  1489. $.ajax({
  1490. method: "get",
  1491. dataType: "json",
  1492. crossDomain: false,
  1493. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  1494. data:{
  1495. uid:ids,
  1496. },
  1497. success: function (data) {
  1498. let theArr = [];
  1499. let thedata=data.data;
  1500. if (!thedata) {
  1501. if (data.error && data.error.length) {
  1502. message.warning(data.error[0].message);
  1503. };
  1504. thedata = {};
  1505. };
  1506. var telNum=[];
  1507. var contactIds=[];
  1508. thedata.map(function (item,index) {
  1509. contactIds.push(thedata[index].id);
  1510. telNum.push(thedata[index].mobile);
  1511. });
  1512. for (let item in data.data) {
  1513. let theData = data.data[item];
  1514. theArr.push(
  1515. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  1516. );
  1517. };
  1518. this.setState({
  1519. contactsIdArr:thedata,
  1520. telNum:telNum,
  1521. orderStatusOption: theArr,
  1522. });
  1523. }.bind(this),
  1524. }).always(function () {
  1525. this.setState({
  1526. deletId:ids,
  1527. loading: false
  1528. });
  1529. }.bind(this));
  1530. },
  1531. //意向服务列表修改保存
  1532. intentionModify(e){
  1533. console.log(e)
  1534. },
  1535. //拜访意向服务列表单个删除
  1536. intentionDelet(e){
  1537. let detId=!this.state.keys?this.state.followIds:this.state.uid;
  1538. if(e.id||e.followId){
  1539. this.setState({
  1540. selectedRowKeys: [],
  1541. });
  1542. $.ajax({
  1543. method: "get",
  1544. dataType: "json",
  1545. crossDomain: false,
  1546. url: globalConfig.context + "/api/admin/customer/transferToPublic",
  1547. data: {
  1548. id: e.id||e.followId
  1549. }
  1550. }).done(function (data) {
  1551. if (!data.error.length) {
  1552. message.success('删除成功');
  1553. this.setState({
  1554. loading: false,
  1555. });
  1556. } else {
  1557. message.warning(data.error[0].message);
  1558. };
  1559. !this.state.keys?this.visitModify(detId):this.deletelist(detId);
  1560. }.bind(this));
  1561. }else{
  1562. !this.state.keys?this.visitModify(detId):this.deletelist(detId);
  1563. }
  1564. },
  1565. //tab5意向业务
  1566. //意向业务查看列表单个详情
  1567. businessIntentionDetails(e){
  1568. $.ajax({
  1569. method: "get",
  1570. dataType: "json",
  1571. crossDomain: false,
  1572. url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
  1573. data: {
  1574. businessId: e.businessId
  1575. },
  1576. success: function (data) {
  1577. let thisData = data.data;
  1578. if (!thisData) {
  1579. if (data.error && data.error.length) {
  1580. message.warning(data.error[0].message);
  1581. };
  1582. thisData = {};
  1583. };
  1584. this.setState({
  1585. businessGlossoryId:thisData.businessGlossoryId,
  1586. identifyName:thisData.identifyName,
  1587. uid:thisData.uid,
  1588. businessId:thisData.businessId,
  1589. followSituation:thisData.followSituation,
  1590. customerStatus:thisData.customerStatus,
  1591. createTime:thisData.createTime,
  1592. followTime:thisData.followTime,
  1593. adminName:thisData.adminName,
  1594. remarks:thisData.remarks,
  1595. result:thisData.result,
  1596. });
  1597. }.bind(this),
  1598. }).always(function () {
  1599. this.loadVisit();
  1600. this.setState({
  1601. loading: false
  1602. });
  1603. }.bind(this));
  1604. this.setState({
  1605. businessModul:true
  1606. })
  1607. },
  1608. //查看跟进记录列表
  1609. loadVisit(pageNo) {
  1610. this.setState({
  1611. loading: true
  1612. });
  1613. $.ajax({
  1614. method: "get",
  1615. dataType: "json",
  1616. crossDomain: false,
  1617. url:globalConfig.context + '/api/admin/customer/listFollowHistory',
  1618. data: {
  1619. pageNo: pageNo || 1,
  1620. pageSize: this.state.paginations.pageSize,
  1621. uid: this.state.rowId, //名称1
  1622. businessGlossoryId:this.state.businessGlossoryId,
  1623. },
  1624. success: function (data) {
  1625. let theArr = [];
  1626. if (data.error.length || data.data.list=="") {
  1627. if (data.error && data.error.length) {
  1628. message.warning(data.error[0].message);
  1629. };
  1630. } else {
  1631. for (let i = 0; i < data.data.list.length; i++) {
  1632. let thisdata = data.data.list[i];
  1633. theArr.push({
  1634. followId:thisdata.followId,
  1635. followTime:thisdata.followTime,
  1636. identityName:thisdata.identityName,
  1637. contacts:thisdata.contacts,
  1638. contactMobile:thisdata.contactMobile,
  1639. result:thisdata.result,
  1640. ufbId:thisdata.ufbId,
  1641. adminName:thisdata.adminName,
  1642. followSituation:thisdata.followSituation,
  1643. customerStatus:thisdata.customerStatus,
  1644. contactType:thisdata.contactType
  1645. });
  1646. };
  1647. this.state.paginations.current = data.data.pageNo;
  1648. this.state.paginations.total = data.data.totalCount;
  1649. };
  1650. this.setState({
  1651. visitArrList: theArr,
  1652. paginations: this.state.paginations
  1653. });
  1654. }.bind(this),
  1655. }).always(function () {
  1656. this.setState({
  1657. loading: false
  1658. });
  1659. }.bind(this));
  1660. },
  1661. //tab3拜访记录
  1662. loadBfVisit(pageNo,ids) {
  1663. this.setState({
  1664. loading: true
  1665. });
  1666. $.ajax({
  1667. method: "get",
  1668. dataType: "json",
  1669. crossDomain: false,
  1670. url:globalConfig.context + '/api/admin/customer/listFollowHistory',
  1671. data: {
  1672. pageNo: pageNo || 1,
  1673. pageSize: this.state.paginationsy.pageSize,
  1674. uid: ids?ids:this.state.rowId, //名称1
  1675. },
  1676. success: function (data) {
  1677. let theArr = [];
  1678. if (data.error.length || data.data.list=="") {
  1679. if (data.error && data.error.length) {
  1680. message.warning(data.error[0].message);
  1681. };
  1682. } else {
  1683. for (let i = 0; i < data.data.list.length; i++) {
  1684. let thisdata = data.data.list[i];
  1685. theArr.push({
  1686. followId:thisdata.followId,
  1687. followTime:thisdata.followTime,
  1688. identityName:thisdata.identityName,
  1689. contacts:thisdata.contacts,
  1690. contactMobile:thisdata.contactMobile,
  1691. result:thisdata.result,
  1692. ufbId:thisdata.ufbId,
  1693. adminName:thisdata.adminName,
  1694. followSituation:thisdata.followSituation,
  1695. customerStatus:thisdata.customerStatus,
  1696. contactType:thisdata.contactType
  1697. });
  1698. };
  1699. this.state.paginationsy.current = data.data.pageNo;
  1700. this.state.paginationsy.total = data.data.totalCount;
  1701. };
  1702. this.setState({
  1703. visitArrList: theArr,
  1704. paginationsy: this.state.paginationsy
  1705. });
  1706. }.bind(this),
  1707. }).always(function () {
  1708. this.setState({
  1709. loading: false
  1710. });
  1711. }.bind(this));
  1712. },
  1713. businessIntentionOk(){
  1714. this.setState({
  1715. businessGlossoryId:'',
  1716. businessModul:false
  1717. })
  1718. },
  1719. businessIntentionCancel(){
  1720. this.setState({
  1721. businessGlossoryId:'',
  1722. businessModul:false
  1723. })
  1724. },
  1725. //业务跟进查看跟多
  1726. businessFollowDetails(e){
  1727. this.listFollowUp(e.ufbId)
  1728. this.setState({
  1729. businessFollowModul:true
  1730. })
  1731. },
  1732. businessFollowOk(e){
  1733. this.setState({
  1734. businessFollowModul:false
  1735. })
  1736. },
  1737. businessFollowCancel(e){
  1738. this.setState({
  1739. businessFollowModul:false
  1740. })
  1741. },
  1742. //tab2联系人保存
  1743. contactSave() {
  1744. let err='';
  1745. let contactArr=this.state.contactList;
  1746. contactArr.map(function(item){
  1747. if(!item.name){
  1748. err='客户名称不能为空!' ;
  1749. }
  1750. if(!item.mobile){
  1751. err='手机号码不能为空!';
  1752. }
  1753. return err;
  1754. })
  1755. if(err){
  1756. message.warning(err)
  1757. return false;
  1758. };
  1759. $.ajax({
  1760. url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
  1761. method: 'post',
  1762. data: {
  1763. uid:this.state.rowId,
  1764. contactList: JSON.stringify(this.state.contactList)
  1765. }
  1766. }).done(function (data) {
  1767. this.setState({
  1768. loading: false
  1769. });
  1770. if (!data.error.length) {
  1771. message.success('保存成功!');
  1772. this.detailsModal()
  1773. this.loadData();
  1774. } else {
  1775. message.warning(data.error[0].message);
  1776. }
  1777. }.bind(this));
  1778. },
  1779. //详情tab切换数据处理
  1780. callback(e){
  1781. if(e==1){
  1782. this.loadInformation(this.state.rowId)
  1783. }
  1784. if(e==2){
  1785. this.contactLists(this.state.rowId)
  1786. }
  1787. if(e==3){
  1788. this.httpAccount(this.state.rowId)
  1789. }
  1790. if(e==4){
  1791. this.loadBfVisit(1,this.state.rowId);
  1792. }
  1793. if(e==5){
  1794. this.BusinessList(1,this.state.rowId);
  1795. }
  1796. if(e==6){
  1797. }
  1798. if(e==7){
  1799. }
  1800. if(e==8){
  1801. }
  1802. if(e==9){
  1803. }
  1804. },
  1805. //账户信息保存
  1806. accountSave(e){
  1807. e.preventDefault();
  1808. this.state.data=[];
  1809. this.setState({
  1810. selectedRowKeys: [],
  1811. });
  1812. this.setState({
  1813. loading: true
  1814. });
  1815. $.ajax({
  1816. method: "post",
  1817. dataType: "json",
  1818. url:globalConfig.context + '/api/admin/customer/updateUserAccount',
  1819. data: {
  1820. id: this.state.Accountuid,
  1821. mobile: this.state.mobile,
  1822. nickname: this.state.nickname,
  1823. email: this.state.email,
  1824. isMember: this.state.isMember,
  1825. currentMemberStatus: this.state.currentMemberStatus,
  1826. serviceCertification: this.state.serviceCertification,
  1827. userCertification: this.state.userCertification,
  1828. lvl:this.state.lvl,
  1829. status:this.state.status,
  1830. }
  1831. }).done(function (data) {
  1832. this.setState({
  1833. loading: false
  1834. });
  1835. if (!data.error.length) {
  1836. message.success('保存成功!');
  1837. this.detailsModal();
  1838. this.loadData();
  1839. } else {
  1840. message.warning(data.error[0].message);
  1841. }
  1842. }.bind(this));
  1843. },
  1844. //tab2删除
  1845. confirmDelet(e){
  1846. console.log(e)
  1847. },
  1848. //tab5业务意向
  1849. BusinessList(pageNo,uids) {
  1850. this.setState({
  1851. loading: true
  1852. });
  1853. $.ajax({
  1854. method: "post",
  1855. dataType: "json",
  1856. crossDomain: false,
  1857. url:globalConfig.context + '/api/admin/customer/listBusiness',
  1858. data: {
  1859. pageNo: pageNo || 1,
  1860. pageSize: this.state.paginationt.pageSize,
  1861. uid:uids?uids:this.state.rowId
  1862. },
  1863. success: function (data) {
  1864. let theArr = [];
  1865. if (data.error.length || data.data.list=="") {
  1866. if (data.error && data.error.length) {
  1867. message.warning(data.error[0].message);
  1868. };
  1869. } else {
  1870. for (let i = 0; i < data.data.list.length; i++) {
  1871. let thisdata = data.data.list[i];
  1872. theArr.push({
  1873. key: i,
  1874. businessId:thisdata.businessId,
  1875. businessName:thisdata.businessName,
  1876. identifyName:thisdata.identifyName,
  1877. followSituation:thisdata.followSituation,
  1878. customerStatus:thisdata.customerStatus,
  1879. adminName:thisdata.adminName,
  1880. createTime:thisdata.createTime
  1881. });
  1882. };
  1883. this.state.paginationt.current = data.data.pageNo;
  1884. this.state.paginationt.total = data.data.totalCount;
  1885. };
  1886. this.setState({
  1887. dataBusiness: theArr,
  1888. paginationt: this.state.paginationt
  1889. });
  1890. }.bind(this),
  1891. }).always(function () {
  1892. this.setState({
  1893. loading: false
  1894. });
  1895. }.bind(this));
  1896. },
  1897. componentWillReceiveProps(nextProps) {
  1898. if (!this.props.visible && nextProps.visible) {
  1899. if (nextProps.data && nextProps.data.id) {
  1900. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  1901. };
  1902. this.state.data = {};
  1903. this.state.companyLogoUrl = [];
  1904. this.state.orgCodeUrl = [];
  1905. };
  1906. },
  1907. render() {
  1908. const FormItem = Form.Item
  1909. const rowSelection = {
  1910. selectedRowKeys: this.state.selectedRowKeys,
  1911. onChange: (selectedRowKeys, selectedRows) => {
  1912. this.setState({
  1913. selectedRows: selectedRows.slice(-1),
  1914. selectedRowKeys: selectedRowKeys.slice(-1)
  1915. });
  1916. },
  1917. onSelect: (recordt, selected, selectedRows) => {
  1918. this.setState({
  1919. recordt:recordt.id
  1920. })
  1921. },
  1922. };
  1923. const rowSelections = {
  1924. selectedRowKeys: this.state.selectedRowKey,
  1925. onChange: (selectedRowKey, selectedRow) => {
  1926. this.setState({
  1927. selectedRow: selectedRow.slice(-1),
  1928. selectedRowKey: selectedRowKey.slice(-1)
  1929. });
  1930. },
  1931. onSelect: (records, selected, selectedRow) => {
  1932. this.setState({
  1933. selectedRow: selectedRow.slice(-1),
  1934. records:records.id,
  1935. })
  1936. },
  1937. };
  1938. const hasSelected = this.state.selectedRowKeys.length > 0;
  1939. const { RangePicker,MonthPicker } = DatePicker;
  1940. const { getFieldDecorator } = this.props.form;
  1941. const formItemLayout = {
  1942. labelCol: { span: 8 },
  1943. wrapperCol: { span: 14 },
  1944. };
  1945. const theInformation=this.state.dataInformation || {}
  1946. const contactsOption="";
  1947. const formItemLayput = {
  1948. labelCol: { span: 10 },
  1949. wrapperCol: { span: 14 },
  1950. };
  1951. const contacts=this.state.contacts || '';
  1952. return (
  1953. <div className="user-content" >
  1954. <div className="content-title">
  1955. <span>我的客户</span>
  1956. </div>
  1957. <div className="user-search">
  1958. <Input placeholder="公司名称"
  1959. value={this.state.nameSearch}
  1960. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  1961. <Select placeholder="省"
  1962. style={{ width: 80 }}
  1963. value={this.state.provinceSearch}
  1964. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  1965. {this.state.Provinces}
  1966. </Select>
  1967. <span style={{marginRight:'10px'}}>
  1968. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  1969. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  1970. </span>
  1971. <Button type="primary" onClick={this.search}>搜索</Button>
  1972. <Button onClick={this.reset}>重置</Button>
  1973. <Button disabled onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }}>下载批量导入模板</Button>
  1974. <Upload
  1975. name="file"
  1976. action={globalConfig.context + "/api/admin/customer/uploadExcel"}
  1977. beforeUpload={beforeUploadFile}
  1978. showUploadList={false}
  1979. onChange={(info) => {
  1980. if (info.file.status !== 'uploading') {
  1981. console.log(info.file, info.fileList);
  1982. }
  1983. if (info.file.status === 'done') {
  1984. if (!info.file.response.error.length) {
  1985. message.success(`${info.file.name} 文件上传成功!`);
  1986. this.loadData();
  1987. } else {
  1988. message.warning(info.file.response.error[0].message);
  1989. return;
  1990. };
  1991. } else if (info.file.status === 'error') {
  1992. message.error(`${info.file.name} 文件上传失败。`);
  1993. };
  1994. }} >
  1995. <Button>上传批量内容</Button>
  1996. </Upload>
  1997. <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
  1998. disabled={!hasSelected}
  1999. onClick={this.delectRow}>删除<Icon type="minus" />
  2000. </Button>
  2001. <Button type="primary" onClick={this.showModa} disabled={!hasSelected}>指定转交人</Button>
  2002. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  2003. disabled={!hasSelected}
  2004. onClick={this.changeRow}>转为公共客户<Icon /></Button>
  2005. <Modal
  2006. footer=''
  2007. title="选择指定人"
  2008. visible={this.state.visible}
  2009. onOk={this.handleOk}
  2010. onCancel={this.handleCancel}
  2011. >
  2012. <Spin spinning={this.state.loading}>
  2013. <Table
  2014. scroll={{y:'350px'}}
  2015. pagination={false}
  2016. columns={this.state.columnsman}
  2017. rowSelection={rowSelections}
  2018. dataSource={this.state.dataman}
  2019. />
  2020. <FormItem wrapperCol={{ span: 12, offset: 12 }} style={{marginTop:'15px'}}>
  2021. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:"50px"}} onClick={this.changeAssigner }>保存</Button>
  2022. <Button className="set-submit" type="ghost" onClick={this.handleCancel } style={{marginLeft:"30px"}} id='change_rem'>取消</Button>
  2023. </FormItem>
  2024. </Spin>
  2025. </Modal>
  2026. <Button style={{marginRight:'10px',background: "#595a5c", border: "none",color: "#fff" }}
  2027. disabled={!hasSelected}
  2028. onClick={this.delectRow}>锁定
  2029. </Button>
  2030. <Button style={{marginRight:'10px',background: "#11a2c6", border: "none",color: "#fff" }}
  2031. disabled={!hasSelected}
  2032. onClick={this.delectRow}>激活
  2033. </Button>
  2034. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  2035. <Button type="primary" className="addButton" onClick={this.addClick}>新增客户<Icon type="plus" /></Button>
  2036. <div className='clearfix' style={{marginTop:'5px'}}>
  2037. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  2038. <RangePicker
  2039. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  2040. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  2041. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  2042. <Select placeholder="客户状态"
  2043. style={{ width: 100 }}
  2044. value={this.state.statusSearch}
  2045. onChange={(e) => { this.setState({ statusSearch: e }) }}>
  2046. {this.state.customerStatusArrOption}
  2047. </Select>
  2048. <Select placeholder="行业"
  2049. style={{ width: 100 }}
  2050. value={this.state.industrySearch}
  2051. onChange={(e) => { this.setState({ industrySearch: e }) }}>
  2052. {this.state.intentionalOption}
  2053. </Select>
  2054. <span>认证:</span>
  2055. <Select placeholder="业务认证"
  2056. style={{ width: 100 }}
  2057. value={this.state.serviceCertificationSearch}
  2058. onChange={(e) => { this.setState({ serviceCertificationSearch: e }) }}>
  2059. <Select.Option value="0" >未认证</Select.Option>
  2060. <Select.Option value="1" >已认证</Select.Option>
  2061. </Select>
  2062. <Select placeholder="实名认证"
  2063. style={{ width: 100 }}
  2064. value={this.state.userCertificationSearch}
  2065. onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
  2066. <Select.Option value="0" >未认证</Select.Option>
  2067. <Select.Option value="1" >已认证</Select.Option>
  2068. </Select>
  2069. <span>专家:</span>
  2070. <Select placeholder="专家"
  2071. style={{ width: 60 }}
  2072. value={this.state.internationalSearchtt}
  2073. onChange={(e) => { this.setState({ internationalSearchtt: e }) }}>
  2074. <Select.Option value="0" >否</Select.Option>
  2075. <Select.Option value="1" >是</Select.Option>
  2076. </Select>
  2077. <span>明星:</span>
  2078. <Select placeholder="明星"
  2079. style={{ width: 60 }}
  2080. value={this.state.internationalSearcht}
  2081. onChange={(e) => { this.setState({ internationalSearcht: e }) }}>
  2082. <Select.Option value="0" >否</Select.Option>
  2083. <Select.Option value="1" >是</Select.Option>
  2084. </Select>
  2085. <span>国际:</span>
  2086. <Select placeholder="国际"
  2087. style={{ width: 60 }}
  2088. value={this.state.internationalSearch}
  2089. onChange={(e) => { this.setState({ internationalSearch: e }) }}>
  2090. <Select.Option value="0" >否</Select.Option>
  2091. <Select.Option value="1" >是</Select.Option>
  2092. </Select>
  2093. <span>高新:</span>
  2094. <Select placeholder="高新"
  2095. style={{ width: 60 }}
  2096. value={this.state.highTechZoneSearch}
  2097. onChange={(e) => { this.setState({ highTechZoneSearch: e }) }}>
  2098. <Select.Option value="0" >否</Select.Option>
  2099. <Select.Option value="1" >是</Select.Option>
  2100. </Select>
  2101. <span>上市:</span>
  2102. <Select placeholder="上市"
  2103. style={{ width: 60 }}
  2104. value={this.state.listedSearch}
  2105. onChange={(e) => { this.setState({ listedSearch: e }) }}>
  2106. <Select.Option value="0" >否</Select.Option>
  2107. <Select.Option value="1" >是</Select.Option>
  2108. </Select>
  2109. <span>会员:</span>
  2110. <Select placeholder="会员等级"
  2111. style={{ width: 100 }}
  2112. value={this.state.lvlSearch}
  2113. onChange={(e) => { this.setState({ lvlSearch: e }) }}>
  2114. {this.state.lvlArrOption}
  2115. </Select>
  2116. <Select placeholder="会员状态"
  2117. style={{ width: 100 }}
  2118. value={this.state.currentMemberStatusSearch}
  2119. onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
  2120. {this.state.currentMemberArrOption}
  2121. </Select>
  2122. </div>
  2123. </div>
  2124. </div>
  2125. <div className="patent-table">
  2126. <Spin spinning={this.state.loading}>
  2127. <Table columns={this.state.columns}
  2128. dataSource={this.state.dataSource}
  2129. rowSelection={rowSelection}
  2130. pagination={this.state.pagination}
  2131. onRowClick={this.tableRowClick}
  2132. />
  2133. </Spin>
  2134. </div>
  2135. <CustomerDetail
  2136. data={this.state.RowData}
  2137. showDesc={this.state.showDesc}
  2138. closeDesc={this.closeDesc}
  2139. newmodal={this.newmodal}
  2140. />
  2141. <Modal
  2142. className="customeDetails"
  2143. title="单位客户详情"
  2144. width='1200px'
  2145. visible={this.state.modal5Visible}
  2146. onOk={this.detailsModal}
  2147. onCancel={this.detailsModal}
  2148. footer=''
  2149. >
  2150. <Tabs defaultActiveKey="1" onChange={this.callback}>
  2151. <TabPane tab="基本信息" key="1">
  2152. <Form horizontal onSubmit={this.newSubmit} id="demand-form">
  2153. <Spin spinning={this.state.loading}>
  2154. <div className="clearfix" >
  2155. <FormItem className="half-item"
  2156. labelCol={{ span: 6 }}
  2157. wrapperCol={{ span: 16 }}
  2158. label="客户名称"
  2159. >
  2160. {getFieldDecorator('name', {
  2161. rules: [{ required: true, message: '此项为必填项!' }],
  2162. initialValue: theInformation.name
  2163. })(
  2164. <Input placeholder="客户名称" />
  2165. )}
  2166. </FormItem>
  2167. </div>
  2168. <div className="clearfix" >
  2169. <FormItem className="half-item"
  2170. labelCol={{ span: 6 }}
  2171. wrapperCol={{ span: 16 }}
  2172. label="行业"
  2173. >
  2174. {getFieldDecorator('industry', {
  2175. rules: [{ required: true, message: '此项为必填项!' }],
  2176. initialValue: this.state.industry
  2177. })(
  2178. <Select placeholder="选择行业" >
  2179. {
  2180. industryList.map(function (item) {
  2181. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2182. })
  2183. }
  2184. </Select>
  2185. )}
  2186. </FormItem>
  2187. <FormItem className="half-item"
  2188. labelCol={{ span: 6 }}
  2189. wrapperCol={{ span: 16 }}
  2190. label="社会属性"
  2191. >
  2192. {getFieldDecorator('societyTag', {
  2193. rules: [{ required: true, message: '此项为必填项!' }],
  2194. initialValue: theInformation.societyTag
  2195. })(
  2196. <Select placeholder="客户社会属性" >
  2197. {
  2198. socialAttribute.map(function (item) {
  2199. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2200. })
  2201. }
  2202. </Select>
  2203. )}
  2204. </FormItem>
  2205. <FormItem className="half-item"
  2206. labelCol={{ span: 6 }}
  2207. wrapperCol={{ span: 16 }}
  2208. label="性别"
  2209. >
  2210. <Radio.Group value={this.state.sex} onChange={(e) => {
  2211. this.setState({sex:e.target.value})
  2212. }}>
  2213. <Radio value={0}>男</Radio>
  2214. <Radio value={1}>女</Radio>
  2215. </Radio.Group>
  2216. </FormItem>
  2217. <FormItem className="half-item"
  2218. labelCol={{ span: 6 }}
  2219. wrapperCol={{ span: 16 }}
  2220. label="出生日期"
  2221. >
  2222. <MonthPicker onChange={(e)=>{this.setState({yearMonth:e})}} value={this.state.yearMonth} placeholder="选择出生年月" />
  2223. </FormItem>
  2224. <FormItem className="half-item"
  2225. labelCol={{ span: 6 }}
  2226. wrapperCol={{ span: 16 }}
  2227. label="身份证号码"
  2228. >
  2229. {getFieldDecorator('legalPersonIdCard', {
  2230. initialValue: theInformation.legalPersonIdCard
  2231. })(
  2232. <Input placeholder="身份证号码"/>
  2233. )}
  2234. </FormItem>
  2235. <div className="clearfix pictures">
  2236. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'60px'}}
  2237. labelCol={{ span: 8 }}
  2238. wrapperCol={{ span: 10 }}
  2239. label="身份证正面" >
  2240. <PicturesWall
  2241. pictureSign="customer_sys_file"
  2242. fileList={this.getOrgCodeUrl}
  2243. pictureUrl={this.state.orgCodeUrl} />
  2244. <p>建议:图片要清晰。</p>
  2245. </FormItem>
  2246. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px'}}
  2247. labelCol={{ span: 8 }}
  2248. wrapperCol={{ span: 10 }}
  2249. label="身份证反面" >
  2250. <PicturesWall
  2251. pictureSign="customer_sys_file"
  2252. fileList={this.getCompanyLogoUrl}
  2253. pictureUrl={this.state.companyLogoUrl} />
  2254. <p>建议:图片要清晰。</p>
  2255. </FormItem>
  2256. <FormItem style={{display:'inline-block' ,width:'350px',marginTop:'20px'}}
  2257. labelCol={{ span: 8 }}
  2258. wrapperCol={{ span: 10 }}
  2259. label="客户照片" >
  2260. <PicturesWall
  2261. pictureSign="customer_sys_file"
  2262. fileList={this.getCompanyLogoUrls}
  2263. pictureUrl={this.state.companyLogoUrls} />
  2264. <p>建议:图片要清晰。</p>
  2265. </FormItem>
  2266. </div>
  2267. <FormItem className="half-item"
  2268. labelCol={{ span: 6 }}
  2269. wrapperCol={{ span: 16 }}
  2270. label="省-市-区"
  2271. >
  2272. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市"
  2273. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  2274. </FormItem>
  2275. <FormItem className="half-item"
  2276. labelCol={{ span: 6 }}
  2277. wrapperCol={{ span: 16 }}
  2278. label="通信地址"
  2279. >
  2280. {getFieldDecorator('postalAddress', {
  2281. initialValue: theInformation.postalAddress
  2282. })(
  2283. <Input placeholder="客户通信地址"/>
  2284. )}
  2285. </FormItem>
  2286. <FormItem className="half-item"
  2287. labelCol={{ span: 6 }}
  2288. wrapperCol={{ span: 16 }}
  2289. label="手机号码"
  2290. >
  2291. {getFieldDecorator('mouile', {
  2292. rules: [{ required: true, message: '此项为必填项!' }],
  2293. initialValue: theInformation.mouile
  2294. })(
  2295. <Input placeholder="手机电话"/>
  2296. )}
  2297. </FormItem>
  2298. <FormItem className="half-item"
  2299. labelCol={{ span: 6 }}
  2300. wrapperCol={{ span: 16 }}
  2301. label="客户传真"
  2302. >
  2303. {getFieldDecorator('contactsFax', {
  2304. initialValue: theInformation.contactsFax
  2305. })(
  2306. <Input placeholder="客户传真"/>
  2307. )}
  2308. </FormItem>
  2309. <FormItem className="half-item"
  2310. labelCol={{ span: 6 }}
  2311. wrapperCol={{ span: 16 }}
  2312. label="固定电话"
  2313. >
  2314. {getFieldDecorator('contactsFixedTel', {
  2315. initialValue: theInformation.contactsFixedTel
  2316. })(
  2317. <Input placeholder="客户固定电话"/>
  2318. )}
  2319. </FormItem>
  2320. <FormItem className="half-item"
  2321. labelCol={{ span: 6 }}
  2322. wrapperCol={{ span: 16 }}
  2323. label="客户QQ"
  2324. >
  2325. {getFieldDecorator('qq', {
  2326. initialValue: theInformation.qq
  2327. })(
  2328. <Input placeholder="客户QQ"/>
  2329. )}
  2330. </FormItem>
  2331. <FormItem className="half-item"
  2332. labelCol={{ span: 6 }}
  2333. wrapperCol={{ span: 16 }}
  2334. label="电子邮箱"
  2335. >
  2336. {getFieldDecorator('email', {
  2337. initialValue: theInformation.email
  2338. })(
  2339. <Input placeholder="客户电子邮箱"/>
  2340. )}
  2341. </FormItem>
  2342. <div className='clearfix'>
  2343. <FormItem
  2344. labelCol={{ span: 3 }}
  2345. wrapperCol={{ span: 16 }}
  2346. label="客户简介" >
  2347. {getFieldDecorator('introduction', {
  2348. initialValue: theInformation.introduction
  2349. })(
  2350. <Input type="textarea" rows={4} />
  2351. )}
  2352. </FormItem>
  2353. </div>
  2354. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'146px',marginBottom:'30px'}}>保存</Button>
  2355. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  2356. </div>
  2357. </Spin>
  2358. </Form>
  2359. </TabPane>
  2360. <TabPane tab="联系人信息" key="2">
  2361. <div className="clearfix" >
  2362. <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button>
  2363. </div>
  2364. <div className="clearfix">
  2365. <Spin spinning={this.state.loading}>
  2366. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  2367. <Table
  2368. pagination={false}
  2369. columns={this.state.ContactsLists}
  2370. dataSource={this.state.contactList}
  2371. />
  2372. <div className="clearfix">
  2373. <Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
  2374. <Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
  2375. </div>
  2376. </Form>
  2377. </Spin>
  2378. </div>
  2379. </TabPane>
  2380. <TabPane tab="账户信息" key="3">
  2381. <div className="clearfix">
  2382. <Form horizontal id="demand-form" onSubmit={this.accountSave} >
  2383. <Spin spinning={this.state.loading} >
  2384. <FormItem className="half-item"
  2385. {...formItemLayout}
  2386. label="注册手机号" >
  2387. <Input value={this.state.mobile} onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
  2388. <Button onClick={this.modifyPassworld}>修改密码</Button>
  2389. </FormItem>
  2390. <FormItem className="half-item"
  2391. {...formItemLayout}
  2392. label="注册用户名" >
  2393. <Input value={this.state.nickname} onChange={(e) => { this.setState({ nickname: e.target.value }); }} />
  2394. </FormItem>
  2395. <FormItem className="half-item"
  2396. {...formItemLayout}
  2397. label="注册邮箱" >
  2398. <Input value={this.state.email} onChange={(e) => { this.setState({ email: e.target.value }); }} />
  2399. </FormItem>
  2400. <div className="clearfix">
  2401. <FormItem className="half-item"
  2402. {...formItemLayout}
  2403. label="客户来源" >
  2404. <span>{this.state.source}</span>
  2405. </FormItem>
  2406. <FormItem className="half-item"
  2407. {...formItemLayout}
  2408. label="客户类型" >
  2409. <span>{this.state.type}</span>
  2410. </FormItem>
  2411. <FormItem className="half-item"
  2412. {...formItemLayout}
  2413. label="创建时间" >
  2414. <span>{this.state.createTimes}</span>
  2415. </FormItem>
  2416. <FormItem className="half-item"
  2417. {...formItemLayout}
  2418. label="账户状态"
  2419. >
  2420. <Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
  2421. {
  2422. statuslist.map(function (item) {
  2423. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2424. })
  2425. }
  2426. </Select>
  2427. </FormItem>
  2428. </div>
  2429. <div className="clearfix">
  2430. <FormItem className="half-item"
  2431. {...formItemLayout}
  2432. label="专家"
  2433. >
  2434. <Radio.Group value={this.state.isMembers} onChange={(e) => {
  2435. this.setState({ isMembers: e.target.value })
  2436. }}>
  2437. <Radio value={0}>否</Radio>
  2438. <Radio value={1}>是</Radio>
  2439. </Radio.Group>
  2440. </FormItem>
  2441. <FormItem className="half-item"
  2442. {...formItemLayout}
  2443. label="明星"
  2444. >
  2445. <Radio.Group value={this.state.star} onChange={(e) => {
  2446. this.setState({ star: e.target.value })
  2447. }}>
  2448. <Radio value={0}>否</Radio>
  2449. <Radio value={1}>是</Radio>
  2450. </Radio.Group>
  2451. </FormItem>
  2452. <FormItem className="half-item"
  2453. {...formItemLayout}
  2454. label="会员"
  2455. >
  2456. <Radio.Group value={this.state.isMember} onChange={(e) => {
  2457. this.setState({ isMember: e.target.value })
  2458. }}>
  2459. <Radio value={0}>否</Radio>
  2460. <Radio value={1}>是</Radio>
  2461. </Radio.Group>
  2462. </FormItem>
  2463. <FormItem className="half-item"
  2464. {...formItemLayout}
  2465. label="会员等级"
  2466. >
  2467. <Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
  2468. {
  2469. lvl.map(function (item) {
  2470. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2471. })
  2472. }
  2473. </Select>
  2474. </FormItem>
  2475. <FormItem className="half-item"
  2476. {...formItemLayout}
  2477. label="会员状态"
  2478. >
  2479. <Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
  2480. {
  2481. currentMember.map(function (item) {
  2482. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2483. })
  2484. }
  2485. </Select>
  2486. </FormItem>
  2487. </div>
  2488. <FormItem className="half-item"
  2489. {...formItemLayout}
  2490. label="业务认证"
  2491. >
  2492. <Radio.Group value={this.state.serviceCertification} onChange={(e) => {
  2493. this.setState({ serviceCertification: e.target.value })
  2494. }}>
  2495. <Radio value={0}>未认证</Radio>
  2496. <Radio value={1}>已认证</Radio>
  2497. </Radio.Group>
  2498. </FormItem>
  2499. <FormItem className="half-item"
  2500. {...formItemLayout}
  2501. label="实名认证"
  2502. >
  2503. <Radio.Group value={this.state.userCertification} onChange={(e) => {
  2504. this.setState({ userCertification: e.target.value })
  2505. }}>
  2506. <Radio value={0}>未认证</Radio>
  2507. <Radio value={1}>已认证</Radio>
  2508. </Radio.Group>
  2509. </FormItem>
  2510. <div className="clearfix">
  2511. <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
  2512. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  2513. </div>
  2514. </Spin>
  2515. </Form>
  2516. </div>
  2517. </TabPane>
  2518. <TabPane tab="客户拜访" key="4">
  2519. <div className="clearfix">
  2520. <Spin spinning={this.state.loading}>
  2521. <Table
  2522. pagination={false}
  2523. columns={this.state.visitsList}
  2524. dataSource={this.state.visitArrList}
  2525. onRowClick={this.VisitRowClick}
  2526. />
  2527. </Spin>
  2528. </div>
  2529. </TabPane>
  2530. <TabPane tab="业务意向" key="5">
  2531. <div className="clearfix">
  2532. <Spin spinning={this.state.loading}>
  2533. <Table
  2534. pagination={this.state.paginationt}
  2535. columns={this.state.businessIntentionList}
  2536. dataSource={this.state.dataBusiness}
  2537. />
  2538. </Spin>
  2539. </div>
  2540. </TabPane>
  2541. <TabPane tab="业务订单" key="6">
  2542. </TabPane>
  2543. <TabPane tab="技术需求" key="7">
  2544. </TabPane>
  2545. <TabPane tab="技术成果" key="8">
  2546. </TabPane>
  2547. <TabPane tab="技术专家" key="9">
  2548. </TabPane>
  2549. </Tabs>
  2550. </Modal>
  2551. <Modal
  2552. className="customeDetails"
  2553. footer=''
  2554. title="拜访详情"
  2555. width='1000px'
  2556. visible={this.state.visitModul}
  2557. onOk={this.visitOk}
  2558. onCancel={this.visitCancel}
  2559. >
  2560. <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
  2561. <Spin spinning={this.state.loading}>
  2562. <div className="clearfix">
  2563. <FormItem className="half-item"
  2564. {...formItemLayout}
  2565. label="拜访方式" >
  2566. <Radio.Group value={this.state.contactType} onChange={(e) => {
  2567. this.setState({ contactType: e.target.value })
  2568. }}>
  2569. <Radio value={0}>外出</Radio>
  2570. <Radio value={1}>电话</Radio>
  2571. <Radio value={2}>QQ</Radio>
  2572. <Radio value={3}>微信</Radio>
  2573. <Radio value={4}>邮箱</Radio>
  2574. </Radio.Group>
  2575. </FormItem>
  2576. <FormItem className="half-item"
  2577. {...formItemLayout}
  2578. >
  2579. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px'}}>添加新联系人</Button>
  2580. </FormItem>
  2581. <div className="clearfix">
  2582. <FormItem className="half-item"
  2583. {...formItemLayout}
  2584. label="客户名称"
  2585. >
  2586. <span>{this.state.identityName}</span>
  2587. </FormItem>
  2588. <FormItem className="half-item"
  2589. {...formItemLayout}
  2590. label="拜访人"
  2591. >
  2592. <span>{this.state.adminName}</span>
  2593. </FormItem>
  2594. <FormItem className="half-item"
  2595. {...formItemLayout}
  2596. label="当前联系人"
  2597. >
  2598. <span>{this.state.contacts}</span>
  2599. </FormItem>
  2600. {this.state.contacts?<span></span>:
  2601. <FormItem className="half-item"
  2602. {...formItemLayout}
  2603. label="联系人"
  2604. >
  2605. <Select placeholder="选择联系人" style={{ width: 140 }}
  2606. value={this.state.lastName}
  2607. onChange={this.hundleName}>
  2608. {this.state.orderStatusOption}
  2609. </Select>
  2610. </FormItem>
  2611. }
  2612. <FormItem className="half-item"
  2613. {...formItemLayout}
  2614. label="拜访时间"
  2615. >
  2616. <span>{this.state.followTime}</span>
  2617. </FormItem>
  2618. <FormItem className="half-item"
  2619. {...formItemLayout}
  2620. label="联系电话"
  2621. >
  2622. <span>{this.state.nub}</span>
  2623. </FormItem>
  2624. </div>
  2625. <div className="clearfix">
  2626. <FormItem
  2627. labelCol={{ span: 4 }}
  2628. wrapperCol={{ span: 16 }}
  2629. label="拜访备注" >
  2630. <Input type="textarea" rows={4} value={this.state.result}
  2631. onChange={(e)=>{this.setState({result:e.target.value})}}/>
  2632. </FormItem>
  2633. </div>
  2634. <div className="clearfix">
  2635. <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
  2636. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  2637. <Spin spinning={this.state.loading}>
  2638. <Table
  2639. rowKey={record => record.id}
  2640. pagination={false}
  2641. columns={this.state.intentionList}
  2642. dataSource={this.state.data}
  2643. />
  2644. </Spin>
  2645. </div>
  2646. </div>
  2647. </div>
  2648. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 35px 35px 120px'}}>保存</Button>
  2649. <Button size="large" onClick={this.visitCancel}>取消</Button>
  2650. </Spin>
  2651. </Form>
  2652. </Modal>
  2653. <Modal
  2654. footer=''
  2655. title="修改密码"
  2656. width='600px'
  2657. visible={this.state.passworldModul}
  2658. onOk={this.passworldOk}
  2659. onCancel={this.passworldCancel}
  2660. >
  2661. <div className="clearfix">
  2662. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2663. <Spin spinning={this.state.loading}>
  2664. <div className="clearfix">
  2665. <FormItem className="half-item"
  2666. {...formItemLayout}
  2667. label="原密码" >
  2668. <Input type="password" value={this.state.companyNamet1} onChange={(e) => { this.setState({ companyNamet1: e.target.value }); }} required="required" />
  2669. </FormItem>
  2670. </div>
  2671. <div className="clearfix">
  2672. <FormItem className="half-item"
  2673. {...formItemLayout}
  2674. label="新密码" >
  2675. <Input type="password" value={this.state.companyName1} onChange={(e) => { this.setState({ companyName1: e.target.value }); }} required="required" />
  2676. </FormItem>
  2677. </div>
  2678. <div className="clearfix">
  2679. <FormItem className="half-item"
  2680. {...formItemLayout}
  2681. label="确认密码" >
  2682. <Input type="password" value={this.state.companyNam1} onChange={(e) => { this.setState({ companyNam1: e.target.value }); }} required="required" />
  2683. </FormItem>
  2684. </div>
  2685. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
  2686. <Button size="large" onClick={this.passworldCancel}>取消</Button>
  2687. </Spin>
  2688. </Form>
  2689. </div>
  2690. </Modal>
  2691. <Modal
  2692. footer=''
  2693. width='800px'
  2694. title="新增联系人"
  2695. visible={this.state.addcontactModul}
  2696. onOk={this.addcontactModulOK}
  2697. onCancel={this.addcontactModulcancel}
  2698. >
  2699. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  2700. <Spin spinning={this.state.loading}>
  2701. <Row>
  2702. <FormItem
  2703. labelCol={{ span: 4 }}
  2704. wrapperCol={{ span: 14 }}
  2705. label="是否是主要联系人:" style={{marginRight:'10px'}}>
  2706. <Radio.Group value={this.state.hotst} onChange={(e) => {
  2707. this.setState({ hotst: e.target.value })
  2708. }}>
  2709. <Radio value={0}>是</Radio>
  2710. <Radio value={1}>否</Radio>
  2711. </Radio.Group>
  2712. </FormItem>
  2713. <FormItem
  2714. labelCol={{ span: 4 }}
  2715. wrapperCol={{ span: 14 }}
  2716. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  2717. <Radio.Group value={this.state.hott} onChange={(e) => {
  2718. this.setState({ hott: e.target.value })
  2719. }}>
  2720. <Radio value={0}>男</Radio>
  2721. <Radio value={1}>女</Radio>
  2722. </Radio.Group>
  2723. </FormItem>
  2724. </Row>
  2725. <Row style={{ paddingLeft:'50px' }}>
  2726. <Col span={2}>姓名:</Col>
  2727. <Col span={8}>
  2728. <Input value={this.state.paymentIdt} required="required"
  2729. onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
  2730. </Col>
  2731. <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
  2732. <Col span={8}>
  2733. <Input value={this.state.entIdt}
  2734. onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
  2735. </Col>
  2736. </Row>
  2737. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2738. <Col span={2}>手机号:</Col>
  2739. <Col span={8}>
  2740. <Input value={this.state.payt} required="required"
  2741. onChange={(e) => { this.setState({ payt: e.target.value }) }} />
  2742. </Col>
  2743. <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
  2744. <Col span={8}>
  2745. <Input value={this.state.paymt}
  2746. onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
  2747. </Col>
  2748. </Row>
  2749. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  2750. <Col span={2}>部门:</Col>
  2751. <Col span={8}>
  2752. <Input value={this.state.paytIdtt}
  2753. onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
  2754. </Col>
  2755. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  2756. <Col span={8}>
  2757. <Input value={this.state.paentIdt}
  2758. onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
  2759. </Col>
  2760. </Row>
  2761. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2762. <Col span={2}>微信号:</Col>
  2763. <Col span={8}>
  2764. <Input value={this.state.payIdt}
  2765. onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
  2766. </Col>
  2767. <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
  2768. <Col span={8}>
  2769. <Input value={this.state.emailst}
  2770. onChange={(e) => { this.setState({ emailst: e.target.value }) }} />
  2771. </Col>
  2772. </Row>
  2773. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  2774. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  2775. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  2776. </Row>
  2777. </Spin>
  2778. </Form>
  2779. </Modal>
  2780. <Modal
  2781. footer=''
  2782. title="业务意向详情"
  2783. width='1000px'
  2784. visible={this.state.businessModul}
  2785. onOk={this.businessIntentionOk}
  2786. onCancel={this.businessIntentionCancel}
  2787. >
  2788. <div className="clearfix">
  2789. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2790. <Spin spinning={this.state.loading}>
  2791. <div className="clearfix">
  2792. <FormItem className="half-item"
  2793. {...formItemLayout}
  2794. label="意向业务名称" >
  2795. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  2796. </FormItem>
  2797. <FormItem className="half-item"
  2798. {...formItemLayout}
  2799. label="意向时间" >
  2800. <span>{this.state.createTime}</span>
  2801. </FormItem>
  2802. <FormItem className="half-item"
  2803. {...formItemLayout}
  2804. label="客户名称" >
  2805. <span>{this.state.identifyName}</span>
  2806. </FormItem>
  2807. <FormItem className="half-item"
  2808. {...formItemLayout}
  2809. label="营销员" >
  2810. <span>{this.state.adminName}</span>
  2811. </FormItem>
  2812. <FormItem className="half-item"
  2813. {...formItemLayout}
  2814. label="意向业务进度" >
  2815. <span>{getfllowSituation(this.state.followSituation)}</span>
  2816. </FormItem>
  2817. <FormItem className="half-item"
  2818. {...formItemLayout}
  2819. label="业务客户状态" >
  2820. <span>{getcustomerStatue(this.state.customerStatus)}</span>
  2821. </FormItem>
  2822. </div>
  2823. <div className="clearfix">
  2824. <FormItem className="half-item"
  2825. {...formItemLayout}
  2826. label="业务意向说明" >
  2827. <span>{this.state.remarks}</span>
  2828. </FormItem>
  2829. </div>
  2830. <div className="clearfix">
  2831. <div style={{fontSize:'18px',lineHeight:'24px',marginBottom:'10px'}}>业务跟进</div>
  2832. <div className="clearfix">
  2833. <Spin spinning={this.state.loading}>
  2834. <Table
  2835. pagination={this.state.paginations}
  2836. columns={this.state.businessFollowList}
  2837. dataSource={this.state.visitArrList}
  2838. />
  2839. </Spin>
  2840. </div>
  2841. </div>
  2842. </Spin>
  2843. </Form>
  2844. </div>
  2845. </Modal>
  2846. <Modal
  2847. footer=''
  2848. title="业务跟进详情"
  2849. width='600px'
  2850. visible={this.state.businessFollowModul}
  2851. onOk={this.businessFollowOk}
  2852. onCancel={this.businessFollowCancel}
  2853. >
  2854. <div className="clearfix">
  2855. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2856. <Spin spinning={this.state.loading}>
  2857. <div className="clearfix">
  2858. <FormItem className="half-item"
  2859. {...formItemLayout}
  2860. label="意向业务名称" >
  2861. <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
  2862. </FormItem>
  2863. <FormItem className="half-item"
  2864. {...formItemLayout}
  2865. label="意向时间" >
  2866. <span>{this.state.createTimes}</span>
  2867. </FormItem>
  2868. <FormItem className="half-item"
  2869. {...formItemLayout}
  2870. label="客户名称" >
  2871. <span>{this.state.identifyNames}</span>
  2872. </FormItem>
  2873. <FormItem className="half-item"
  2874. {...formItemLayout}
  2875. label="营销员" >
  2876. <span>{this.state.adminNames}</span>
  2877. </FormItem>
  2878. <FormItem className="half-item"
  2879. {...formItemLayout}
  2880. label="意向业务进度" >
  2881. <span>{getfllowSituation(this.state.followSituations)}</span>
  2882. </FormItem>
  2883. <FormItem className="half-item"
  2884. {...formItemLayout}
  2885. label="业务客户状态" >
  2886. <span>{getcustomerStatue(this.state.customerStatuss)}</span>
  2887. </FormItem>
  2888. </div>
  2889. <div className="clearfix">
  2890. <FormItem className="half-item"
  2891. {...formItemLayout}
  2892. label="业务意向说明" >
  2893. <span>{this.state.remarkss}</span>
  2894. </FormItem>
  2895. </div>
  2896. <div className="clearfix">
  2897. <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
  2898. <FormItem className="half-item"
  2899. {...formItemLayout}
  2900. label="拜访方式" >
  2901. <span>{getContactType(this.state.contactTypes)}</span>
  2902. </FormItem>
  2903. <FormItem className="half-item"
  2904. {...formItemLayout}
  2905. label="联系人" >
  2906. <span>{this.state.contactss}</span>
  2907. </FormItem>
  2908. <FormItem className="half-item"
  2909. {...formItemLayout}
  2910. label="联系电话" >
  2911. <span>{this.state.contactMobiles}</span>
  2912. </FormItem>
  2913. <FormItem className="half-item"
  2914. {...formItemLayout}
  2915. label="拜访时间" >
  2916. <span>{this.state.followTimes}</span>
  2917. </FormItem>
  2918. <FormItem className="half-item"
  2919. {...formItemLayout}
  2920. label="拜访人" >
  2921. <span>{this.state.adminNames}</span>
  2922. </FormItem>
  2923. <div className="clearfix">
  2924. <FormItem className="half-item"
  2925. {...formItemLayout}
  2926. label="拜访备注" >
  2927. <span>{this.state.results}</span>
  2928. </FormItem>
  2929. </div>
  2930. </div>
  2931. </Spin>
  2932. </Form>
  2933. </div>
  2934. </Modal>
  2935. </div >
  2936. );
  2937. }
  2938. }));
  2939. export default IndividualCustomer;