publicManagesOne.jsx 111 KB

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