individualCustomer.jsx 110 KB

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