individualCustomer.jsx 108 KB

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