expertManage.jsx 109 KB

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