individualCustomer.jsx 107 KB

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