personalManages.jsx 111 KB

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