companyCustomer.jsx 127 KB

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