individualCustomer.jsx 107 KB

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