individualCustomer.jsx 108 KB

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