individualCustomer.jsx 110 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088
  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.length>6) {
  1043. message.warning('咨询费用不超过6位数');
  1044. this.refs.consul.focus();
  1045. return false;
  1046. };
  1047. if(!reg.test(this.state.consultationPrice)){
  1048. message.warning('咨询费用只能输入数字');
  1049. this.refs.consul.focus();
  1050. return false;
  1051. }
  1052. this.state.data = [];
  1053. this.setState({
  1054. selectedRowKeys: [],
  1055. });
  1056. this.props.form.validateFields((err, values) => {
  1057. let theorgCodeUrl = [];
  1058. if(this.state.headPortraitUrl.length) {
  1059. let picArr = [];
  1060. this.state.headPortraitUrl.map(function(item) {
  1061. if ( item.response && item.response.data && item.response.data.length ){
  1062. picArr.push(item.response.data);
  1063. }
  1064. });
  1065. theorgCodeUrl = picArr.join(",");
  1066. };
  1067. let thecompanyLogoUrl = [];
  1068. if(this.state.positiveIdUrl.length) {
  1069. let picArr = [];
  1070. this.state.positiveIdUrl.map(function(item) {
  1071. if ( item.response && item.response.data && item.response.data.length ){
  1072. picArr.push(item.response.data);
  1073. }
  1074. });
  1075. thecompanyLogoUrl = picArr.join(",");
  1076. };
  1077. let thecompanyLogoUrls = [];
  1078. if(this.state.oppositeIdUrl.length) {
  1079. let picArr = [];
  1080. this.state.oppositeIdUrl.map(function(item) {
  1081. if ( item.response && item.response.data && item.response.data.length ){
  1082. picArr.push(item.response.data);
  1083. }
  1084. });
  1085. thecompanyLogoUrls = picArr.join(",");
  1086. };
  1087. if(!err) {
  1088. let years = [];
  1089. let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
  1090. years = yearMonth.split('/');
  1091. this.setState({
  1092. loading: true
  1093. });
  1094. $.ajax({
  1095. method: "post",
  1096. dataType: "json",
  1097. url: globalConfig.context + '/api/admin/customer/updatePersonalCustomer',
  1098. data: {
  1099. id: this.state.InformationId,
  1100. uid: this.state.InformationUid,
  1101. societyTag: this.state.societyTag,
  1102. identifyName: this.state.identifyName,
  1103. industry: this.state.industry,
  1104. dateOfBirthYear: years[0], //出生年
  1105. dateOfBirthMonth: years[1], //出生月
  1106. province: (this.state.ProvinceCity)[0], //省-
  1107. city: (this.state.ProvinceCity)[1], //市
  1108. area: (this.state.ProvinceCity)[2], //区
  1109. sex: this.state.sex,
  1110. expert: this.state.expert,
  1111. celebrity: this.state.celebrity,
  1112. consultant: this.state.consultant,
  1113. international: this.state.international,
  1114. fixedTel: this.state.fixedTel,
  1115. consultationPrice:this.state.consultationPrice,
  1116. qq: this.state.qq,
  1117. contacts: this.state.contacts,
  1118. contactMobile: this.state.contactMobile,
  1119. idNumber: this.state.idNumber,
  1120. email: this.state.email,
  1121. isMember: this.state.isMember,
  1122. postalAddress: this.state.postalAddress,
  1123. introduction: this.state.introduction,
  1124. positiveIdUrl: thecompanyLogoUrl,
  1125. oppositeIdUrl: thecompanyLogoUrls,
  1126. headPortraitUrl: theorgCodeUrl,
  1127. investment: this.state.investment,
  1128. professionalTitle: this.state.professionalTitle,
  1129. workUnit: this.state.workUnit,
  1130. education: this.state.education,
  1131. graduateSchool: this.state.graduateSchool,
  1132. majorCategory: this.state.majorCategory,
  1133. qualification: this.state.qualification,
  1134. businessAudit: this.state.businessAudit,
  1135. auditStatus: this.state.auditStatus,
  1136. }
  1137. }).done(function(data) {
  1138. this.setState({
  1139. loading: false
  1140. });
  1141. if(!data.error.length) {
  1142. message.success('保存成功!');
  1143. this.detailsModal()
  1144. this.loadData();
  1145. } else {
  1146. message.warning(data.error[0].message);
  1147. }
  1148. }.bind(this));
  1149. }
  1150. })
  1151. },
  1152. //点击整行查看详情
  1153. //查看基本详情基本信息
  1154. loadInformation(record) {
  1155. $.ajax({
  1156. method: "get",
  1157. dataType: "json",
  1158. crossDomain: false,
  1159. url: globalConfig.context + '/api/admin/customer/findPersonalCustomerDetail',
  1160. data: {
  1161. uid: record
  1162. },
  1163. success: function(data) {
  1164. let thisData = data.data;
  1165. if(!thisData) {
  1166. if(data.error && data.error.length) {
  1167. message.warning(data.error[0].message);
  1168. };
  1169. thisData = {};
  1170. };
  1171. let ProvinceCityArr = [];
  1172. let ProvinceS = thisData.province; //getprovince
  1173. let citys = thisData.city;
  1174. let Areas = thisData.area;
  1175. ProvinceCityArr.push(ProvinceS, citys, Areas);
  1176. let month = thisData.dateOfBirthYear ? thisData.dateOfBirthYear + '/' + thisData.dateOfBirthMonth : false;
  1177. this.setState({
  1178. InformationId: thisData.id,
  1179. InformationUid: thisData.uid,
  1180. identifyName: thisData.identifyName,
  1181. listed: thisData.listed,
  1182. highTechZone: thisData.highTechZone,
  1183. headPortraitUrl: thisData.headPortraitUrl ? splitUrl(thisData.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1184. positiveIdUrl: thisData.positiveIdUrl ? splitUrl(thisData.positiveIdUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1185. oppositeIdUrl: thisData.oppositeIdUrl ? splitUrl(thisData.oppositeIdUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1186. dataInformation: thisData,
  1187. idNumber: thisData.idNumber,
  1188. contacts: thisData.contacts,
  1189. contactMobile: thisData.contactMobile,
  1190. ProvinceCity: ProvinceCityArr,
  1191. industry: thisData.industry ? String(thisData.industry) : undefined,
  1192. societyTag: thisData.societyTag,
  1193. sex: thisData.sex,
  1194. yearMonth: month,
  1195. postalAddress: thisData.postalAddress,
  1196. fixedTel: thisData.fixedTel,
  1197. consultationPrice:thisData.consultationPrice,
  1198. email: thisData.email,
  1199. qq: thisData.qq,
  1200. introduction: thisData.introduction,
  1201. expert: thisData.expert,
  1202. celebrity: thisData.celebrity,
  1203. consultant: thisData.consultant,
  1204. international: thisData.international,
  1205. investment: thisData.investment,
  1206. professionalTitle: thisData.professionalTitle,
  1207. workUnit: thisData.workUnit,
  1208. education: thisData.education,
  1209. graduateSchool: thisData.graduateSchool,
  1210. majorCategory: thisData.majorCategory,
  1211. qualification: thisData.qualification,
  1212. businessAudit: thisData.businessAudit,
  1213. auditStatus: thisData.auditStatus ? String(thisData.auditStatus) : undefined,
  1214. });
  1215. }.bind(this),
  1216. }).always(function() {
  1217. this.setState({
  1218. loading: false
  1219. });
  1220. }.bind(this));
  1221. },
  1222. //tab3账户信息请求数据
  1223. httpAccount(record) {
  1224. this.RowClick;
  1225. $.ajax({
  1226. method: "get",
  1227. dataType: "json",
  1228. crossDomain: false,
  1229. url: globalConfig.context + '/api/admin/customer/findUserAccountDetail',
  1230. data: {
  1231. uid: record
  1232. },
  1233. success: function(data) {
  1234. let thisData = data.data;
  1235. if(!thisData) {
  1236. if(data.error && data.error.length) {
  1237. message.warning(data.error[0].message);
  1238. };
  1239. thisData = {};
  1240. };
  1241. let sourcecustomer = ''
  1242. switch(String(thisData.source)) {
  1243. case '0':
  1244. sourcecustomer = '注册客户'
  1245. break;
  1246. case '1':
  1247. sourcecustomer = '录入客户'
  1248. break;
  1249. }
  1250. this.setState({
  1251. Accountuid: thisData.id,
  1252. mobile: thisData.mobile,
  1253. nickname: thisData.nickname,
  1254. email: thisData.email,
  1255. type: getcustomerTyp(String(thisData.type)),
  1256. source: sourcecustomer,
  1257. isMember: thisData.isMember,
  1258. currentMemberStatus: String(thisData.currentMemberStatus),
  1259. lvl: String(thisData.lvl),
  1260. status: String(thisData.status),
  1261. createTimes: thisData.createTimes,
  1262. });
  1263. }.bind(this),
  1264. }).always(function() {
  1265. this.setState({
  1266. loading: false
  1267. });
  1268. }.bind(this));
  1269. },
  1270. detailsModalOk(e) {
  1271. this.setState({ modal5Visible: true }); //需要一个请求数据
  1272. },
  1273. //点击消失函数
  1274. detailsModal(e) {
  1275. this.setState({
  1276. modal5Visible: false
  1277. });
  1278. },
  1279. //拜访modul函数
  1280. visitOk(e) {
  1281. this.setState({
  1282. visitModul: false
  1283. });
  1284. this.loadVisit()
  1285. },
  1286. visitCancel(e) {
  1287. this.setState({
  1288. visitModul: false
  1289. });
  1290. },
  1291. //拜访保存函数
  1292. visitSubmit(e) {
  1293. e.preventDefault();
  1294. if(this.state.contactType == undefined) {
  1295. message.warning('请选择拜访方式')
  1296. return false;
  1297. };
  1298. if(this.state.keys) {
  1299. if(this.state.lastName == undefined) {
  1300. message.warning('请选择联系人')
  1301. return false;
  1302. }
  1303. };
  1304. this.setState({
  1305. selectedRowKeys: [],
  1306. });
  1307. this.setState({
  1308. loading: true
  1309. });
  1310. let contactsId = '';
  1311. if(this.state.keys) {
  1312. let conts = this.state.lastName;
  1313. contactsId = this.state.contactsIdArr[conts].id;
  1314. }
  1315. //新增
  1316. $.ajax({
  1317. method: "post",
  1318. dataType: "json",
  1319. url: this.state.keys ? globalConfig.context + '/api/admin/customer/addFollow' : globalConfig.context + '/api/admin/customer/updateFollow',
  1320. data: this.state.keys ? {
  1321. userBusinessList: JSON.stringify(this.state.data),
  1322. uid: this.state.uid,
  1323. ocbId: contactsId,
  1324. contactType: this.state.contactType,
  1325. result: this.state.result,
  1326. followTime: this.state.followTime,
  1327. } : {
  1328. followId: this.state.followIds,
  1329. userBusinessList: JSON.stringify(this.state.data),
  1330. uid: this.state.uid,
  1331. contactType: this.state.contactType,
  1332. result: this.state.result,
  1333. followTime: this.state.followTime,
  1334. }
  1335. }).done(function(data) {
  1336. this.setState({
  1337. loading: false
  1338. });
  1339. if(!data.error.length) {
  1340. message.success('保存成功!');
  1341. this.loadVisit(); //
  1342. this.loadData();
  1343. this.visitCancel();
  1344. } else {
  1345. message.warning(data.error[0].message);
  1346. }
  1347. }.bind(this));
  1348. },
  1349. //当选择联系人的列表变化时,则执行
  1350. hundleName(e) {
  1351. let changNub = this.state.telNum[e];
  1352. this.setState({
  1353. nub: this.state.telNum[e],
  1354. lastName: e,
  1355. });
  1356. },
  1357. //添加新业务及单位客户详情新增
  1358. addNew() {
  1359. this.state.data.push({
  1360. customerStatus: undefined,
  1361. businessGlossoryId: undefined,
  1362. followSituation: undefined,
  1363. remarks: '',
  1364. });
  1365. this.setState({
  1366. data: this.state.data
  1367. })
  1368. },
  1369. //tab2新增联系人
  1370. addcontact() {
  1371. this.state.contactList.push({
  1372. id: null,
  1373. name: '',
  1374. mobile: '',
  1375. email: '',
  1376. qq: '',
  1377. wechat: '',
  1378. depatrment: '',
  1379. position: '',
  1380. });
  1381. this.setState({
  1382. contactList: this.state.contactList
  1383. })
  1384. },
  1385. //tab5进入修改时
  1386. //进入修改时
  1387. listFollowUp(e) {
  1388. $.ajax({
  1389. method: "get",
  1390. dataType: "json",
  1391. crossDomain: false,
  1392. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  1393. data: {
  1394. ufbId: e
  1395. },
  1396. success: function(data) {
  1397. let thedata = data.data;
  1398. if(!thedata) {
  1399. if(data.error && data.error.length) {
  1400. message.warning(data.error[0].message);
  1401. };
  1402. thedata = {};
  1403. };
  1404. this.setState({
  1405. businessGlossoryIds: thedata.businessGlossoryId,
  1406. followSituations: thedata.followSituation,
  1407. customerStatuss: thedata.customerStatus,
  1408. followTimes: thedata.followTime,
  1409. createTimes: thedata.createTime,
  1410. identifyNames: thedata.identifyName,
  1411. contactTypes: parseInt(thedata.contactType),
  1412. results: thedata.result,
  1413. remarkss: thedata.remarks,
  1414. adminNames: thedata.adminName,
  1415. contactss: thedata.contacts,
  1416. contactMobiles: thedata.contactMobile,
  1417. ufbId: thedata.ufbId,
  1418. followIds: thedata.followId,
  1419. });
  1420. }.bind(this),
  1421. }).always(function() {
  1422. this.setState({
  1423. loading: false
  1424. });
  1425. }.bind(this));
  1426. },
  1427. //修改密码Modul
  1428. modifyPassworld() {
  1429. this.setState({
  1430. passworldModul: true
  1431. });
  1432. },
  1433. passworldOk(e) {
  1434. this.setState({
  1435. passworldModul: false
  1436. });
  1437. },
  1438. passworldCancel(e) {
  1439. this.setState({
  1440. passworldModul: false
  1441. });
  1442. },
  1443. //修改密码保存
  1444. passworldSubmit(e) {
  1445. e.preventDefault();
  1446. this.passworldCancel()
  1447. },
  1448. //新增联系人
  1449. addcontactModulOK() {
  1450. this.setState({
  1451. addcontactModul: false
  1452. });
  1453. },
  1454. addcontactModulcancel() {
  1455. this.setState({
  1456. addcontactModul: false
  1457. });
  1458. },
  1459. //点击新增详情
  1460. newContacts() {
  1461. this.state.newsex = undefined;
  1462. this.state.newname = '';
  1463. this.state.newmobile = '';
  1464. this.state.newwechat = '';
  1465. this.state.newqq = '';
  1466. this.state.newdepatrment = '';
  1467. this.state.newposition = '';
  1468. this.state.newemail = '';
  1469. this.setState({
  1470. uids: this.state.uid,
  1471. addcontactModul: true
  1472. });
  1473. },
  1474. //新增联系人保存函数
  1475. submitcontactman(e) {
  1476. e.preventDefault();
  1477. this.setState({
  1478. loading: true
  1479. })
  1480. $.ajax({
  1481. method: "post",
  1482. dataType: "json",
  1483. crossDomain: false,
  1484. url: globalConfig.context + "/api/admin/customer/addOneContact",
  1485. data: {
  1486. uid: this.state.uids,
  1487. name: this.state.newname,
  1488. mobile: this.state.newmobile,
  1489. email: this.state.newemail,
  1490. wechat: this.state.newwechat,
  1491. depatrment: this.state.newdepatrment,
  1492. position: this.state.newposition,
  1493. sex: this.state.newsex,
  1494. qq: this.state.newqq
  1495. },
  1496. success: function(data) {
  1497. if(!data.error.length) {
  1498. this.addcontactModulOK()
  1499. this.getNewWoman(this.state.uids)
  1500. this.setState({
  1501. loading: false,
  1502. })
  1503. } else {
  1504. message.warning(data.error[0].message);
  1505. };
  1506. }.bind(this)
  1507. });
  1508. },
  1509. //获取联系人下拉框
  1510. getNewWoman(ids) {
  1511. this.state.data = []
  1512. $.ajax({
  1513. method: "get",
  1514. dataType: "json",
  1515. crossDomain: false,
  1516. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  1517. data: {
  1518. uid: ids,
  1519. },
  1520. success: function(data) {
  1521. let theArr = [];
  1522. let thedata = data.data;
  1523. if(!thedata) {
  1524. if(data.error && data.error.length) {
  1525. message.warning(data.error[0].message);
  1526. };
  1527. thedata = {};
  1528. };
  1529. var telNum = [];
  1530. var contactIds = [];
  1531. thedata.map(function(item, index) {
  1532. contactIds.push(thedata[index].id);
  1533. telNum.push(thedata[index].mobile);
  1534. });
  1535. for(let item in data.data) {
  1536. let theData = data.data[item];
  1537. theArr.push(
  1538. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  1539. );
  1540. };
  1541. this.setState({
  1542. contactsIdArr: thedata,
  1543. telNum: telNum,
  1544. orderStatusOption: theArr,
  1545. });
  1546. }.bind(this),
  1547. }).always(function() {
  1548. this.setState({
  1549. deletId: ids,
  1550. loading: false
  1551. });
  1552. }.bind(this));
  1553. },
  1554. //拜访意向服务列表单个删除
  1555. intentionDelet(e, index) {
  1556. if(!this.state.keys) {
  1557. let detId = this.state.followIds;
  1558. if(e.id) {
  1559. this.setState({
  1560. selectedRowKeys: [],
  1561. });
  1562. $.ajax({
  1563. method: "get",
  1564. dataType: "json",
  1565. crossDomain: false,
  1566. url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
  1567. data: {
  1568. ufbId: e.id
  1569. }
  1570. }).done(function(data) {
  1571. if(!data.error.length) {
  1572. message.success('删除成功');
  1573. this.setState({
  1574. loading: false,
  1575. });
  1576. } else {
  1577. message.warning(data.error[0].message);
  1578. };
  1579. this.visitModify(detId);
  1580. }.bind(this));
  1581. } else {
  1582. this.visitModify(detId);
  1583. }
  1584. } else {
  1585. let deteluserBusinessList = (this.state.data).splice(index, 1)
  1586. this.setState({
  1587. selectedRowKeys: [],
  1588. });
  1589. }
  1590. },
  1591. //tab5意向业务
  1592. //意向业务查看列表单个详情
  1593. businessIntentionDetails(e) {
  1594. $.ajax({
  1595. method: "get",
  1596. dataType: "json",
  1597. crossDomain: false,
  1598. url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
  1599. data: {
  1600. businessId: e.businessId
  1601. },
  1602. success: function(data) {
  1603. let thisData = data.data;
  1604. if(!thisData) {
  1605. if(data.error && data.error.length) {
  1606. message.warning(data.error[0].message);
  1607. };
  1608. thisData = {};
  1609. };
  1610. this.setState({
  1611. businessGlossoryId: thisData.businessGlossoryId,
  1612. identifyName: thisData.identifyName,
  1613. uid: thisData.uid,
  1614. businessId: thisData.businessId,
  1615. followSituation: thisData.followSituation,
  1616. customerStatus: thisData.customerStatus,
  1617. createTime: thisData.createTime,
  1618. followTime: thisData.followTime,
  1619. adminName: thisData.adminName,
  1620. remarks: thisData.remarks,
  1621. result: thisData.result,
  1622. });
  1623. }.bind(this),
  1624. }).always(function() {
  1625. this.loadVisit();
  1626. this.setState({
  1627. loading: false
  1628. });
  1629. }.bind(this));
  1630. this.setState({
  1631. businessModul: true
  1632. })
  1633. },
  1634. //查看跟进记录列表
  1635. loadVisit(pageNo) {
  1636. this.setState({
  1637. loading: true
  1638. });
  1639. $.ajax({
  1640. method: "get",
  1641. dataType: "json",
  1642. crossDomain: false,
  1643. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  1644. data: {
  1645. pageNo: pageNo || 1,
  1646. pageSize: this.state.paginations.pageSize,
  1647. uid: this.state.rowId, //名称1
  1648. businessGlossoryId: this.state.businessGlossoryId,
  1649. },
  1650. success: function(data) {
  1651. let theArr = [];
  1652. if(data.error.length || data.data.list == "") {
  1653. if(data.error && data.error.length) {
  1654. message.warning(data.error[0].message);
  1655. };
  1656. } else {
  1657. for(let i = 0; i < data.data.list.length; i++) {
  1658. let thisdata = data.data.list[i];
  1659. theArr.push({
  1660. followId: thisdata.followId,
  1661. followTime: thisdata.followTime,
  1662. identifyName: thisdata.identifyName,
  1663. contacts: thisdata.contacts,
  1664. contactMobile: thisdata.contactMobile,
  1665. result: thisdata.result,
  1666. ufbId: thisdata.ufbId,
  1667. adminName: thisdata.adminName,
  1668. followSituation: thisdata.followSituation,
  1669. customerStatus: thisdata.customerStatus,
  1670. contactType: thisdata.contactType
  1671. });
  1672. };
  1673. this.state.paginations.current = data.data.pageNo;
  1674. this.state.paginations.total = data.data.totalCount;
  1675. };
  1676. this.setState({
  1677. visitArrList: theArr,
  1678. paginations: this.state.paginations
  1679. });
  1680. }.bind(this),
  1681. }).always(function() {
  1682. this.setState({
  1683. loading: false
  1684. });
  1685. }.bind(this));
  1686. },
  1687. //tab3拜访记录
  1688. loadBfVisit(pageNo, ids) {
  1689. this.setState({
  1690. loading: true
  1691. });
  1692. $.ajax({
  1693. method: "get",
  1694. dataType: "json",
  1695. crossDomain: false,
  1696. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  1697. data: {
  1698. pageNo: pageNo || 1,
  1699. pageSize: this.state.paginationsy.pageSize,
  1700. uid: ids ? ids : this.state.rowId, //名称1
  1701. },
  1702. success: function(data) {
  1703. let theArr = [];
  1704. if(data.error.length || data.data.list == "") {
  1705. if(data.error && data.error.length) {
  1706. message.warning(data.error[0].message);
  1707. };
  1708. } else {
  1709. for(let i = 0; i < data.data.list.length; i++) {
  1710. let thisdata = data.data.list[i];
  1711. theArr.push({
  1712. followId: thisdata.followId,
  1713. followTime: thisdata.followTime,
  1714. identifyName: thisdata.identifyName,
  1715. contacts: thisdata.contacts,
  1716. contactMobile: thisdata.contactMobile,
  1717. result: thisdata.result,
  1718. ufbId: thisdata.ufbId,
  1719. adminName: thisdata.adminName,
  1720. followSituation: thisdata.followSituation,
  1721. customerStatus: thisdata.customerStatus,
  1722. contactType: thisdata.contactType
  1723. });
  1724. };
  1725. this.state.paginationsy.current = data.data.pageNo;
  1726. this.state.paginationsy.total = data.data.totalCount;
  1727. };
  1728. this.setState({
  1729. visitArrList: theArr,
  1730. paginationsy: this.state.paginationsy
  1731. });
  1732. }.bind(this),
  1733. }).always(function() {
  1734. this.setState({
  1735. loading: false
  1736. });
  1737. }.bind(this));
  1738. },
  1739. businessIntentionOk() {
  1740. this.setState({
  1741. businessGlossoryId: '',
  1742. businessModul: false
  1743. })
  1744. },
  1745. businessIntentionCancel() {
  1746. this.setState({
  1747. businessGlossoryId: '',
  1748. businessModul: false
  1749. })
  1750. },
  1751. //业务跟进查看跟多
  1752. businessFollowDetails(e) {
  1753. this.listFollowUp(e.ufbId)
  1754. this.setState({
  1755. businessFollowModul: true
  1756. })
  1757. },
  1758. businessFollowOk(e) {
  1759. this.setState({
  1760. businessFollowModul: false
  1761. })
  1762. },
  1763. businessFollowCancel(e) {
  1764. this.setState({
  1765. businessFollowModul: false
  1766. })
  1767. },
  1768. //tab2联系人保存
  1769. contactSave(e) {
  1770. e.preventDefault();
  1771. let err = '';
  1772. let contactArr = this.state.contactList;
  1773. contactArr.map(function(item) {
  1774. if(!item.name) {
  1775. err = '客户姓名不能为空!';
  1776. }
  1777. if(!item.mobile) {
  1778. err = '手机号码不能为空!';
  1779. }
  1780. return err;
  1781. })
  1782. if(err) {
  1783. message.warning(err)
  1784. return false;
  1785. };
  1786. $.ajax({
  1787. url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
  1788. method: 'post',
  1789. data: {
  1790. uid: this.state.rowId,
  1791. contactList: JSON.stringify(this.state.contactList)
  1792. }
  1793. }).done(function(data) {
  1794. this.setState({
  1795. loading: false
  1796. });
  1797. if(!data.error.length) {
  1798. message.success('保存成功!');
  1799. this.detailsModal()
  1800. this.loadData();
  1801. } else {
  1802. message.warning(data.error[0].message);
  1803. }
  1804. }.bind(this));
  1805. },
  1806. //详情tab切换数据处理
  1807. callback(e) {
  1808. if(e == 1) {
  1809. this.loadInformation(this.state.rowId)
  1810. }
  1811. if(e == 2) {
  1812. this.contactLists(this.state.rowId)
  1813. }
  1814. if(e == 3) {
  1815. this.httpAccount(this.state.rowId)
  1816. }
  1817. if(e == 4) {
  1818. this.loadBfVisit(1, this.state.rowId);
  1819. }
  1820. if(e == 5) {
  1821. this.BusinessList(1, this.state.rowId);
  1822. }
  1823. if(e == 6) {
  1824. }
  1825. if(e == 7) {
  1826. }
  1827. if(e == 8) {
  1828. }
  1829. if(e == 9) {
  1830. }
  1831. },
  1832. //账户信息保存
  1833. accountSave(e) {
  1834. e.preventDefault();
  1835. this.state.data = [];
  1836. this.setState({
  1837. selectedRowKeys: [],
  1838. });
  1839. this.setState({
  1840. loading: true
  1841. });
  1842. $.ajax({
  1843. method: "post",
  1844. dataType: "json",
  1845. url: globalConfig.context + '/api/admin/customer/updateUserAccount',
  1846. data: {
  1847. id: this.state.Accountuid,
  1848. mobile: this.state.mobile,
  1849. nickname: this.state.nickname,
  1850. email: this.state.email,
  1851. isMember: this.state.isMember,
  1852. currentMemberStatus: this.state.currentMemberStatus,
  1853. lvl: this.state.lvl,
  1854. status: this.state.status,
  1855. }
  1856. }).done(function(data) {
  1857. this.setState({
  1858. loading: false
  1859. });
  1860. if(!data.error.length) {
  1861. message.success('保存成功!');
  1862. this.detailsModal();
  1863. this.loadData();
  1864. } else {
  1865. message.warning(data.error[0].message);
  1866. }
  1867. }.bind(this));
  1868. },
  1869. //tab2删除
  1870. confirmDelet(e) {
  1871. this.setState({
  1872. loading: true
  1873. });
  1874. if(e.id) {
  1875. $.ajax({
  1876. method: "get",
  1877. dataType: "json",
  1878. crossDomain: false,
  1879. url: globalConfig.context + "/api/admin/customer/deleteOneContact",
  1880. data: {
  1881. ocbId: e.id, //删除的ID
  1882. }
  1883. }).done(function(data) {
  1884. if(!data.error.length) {
  1885. message.success('删除成功!');
  1886. this.setState({
  1887. loading: false,
  1888. });
  1889. } else {
  1890. message.warning(data.error[0].message);
  1891. };
  1892. this.contactLists(this.state.rowId);
  1893. }.bind(this));
  1894. } else {
  1895. this.contactLists(this.state.rowId);
  1896. }
  1897. },
  1898. //tab5业务意向
  1899. BusinessList(pageNo, uids) {
  1900. this.setState({
  1901. loading: true
  1902. });
  1903. $.ajax({
  1904. method: "post",
  1905. dataType: "json",
  1906. crossDomain: false,
  1907. url: globalConfig.context + '/api/admin/customer/listBusiness',
  1908. data: {
  1909. pageNo: pageNo || 1,
  1910. pageSize: this.state.paginationt.pageSize,
  1911. uid: uids ? uids : this.state.rowId
  1912. },
  1913. success: function(data) {
  1914. let theArr = [];
  1915. if(data.error.length || data.data.list == "") {
  1916. if(data.error && data.error.length) {
  1917. message.warning(data.error[0].message);
  1918. };
  1919. } else {
  1920. for(let i = 0; i < data.data.list.length; i++) {
  1921. let thisdata = data.data.list[i];
  1922. theArr.push({
  1923. key: i,
  1924. businessId: thisdata.businessId,
  1925. businessName: thisdata.businessName,
  1926. identifyName: thisdata.identifyName,
  1927. followSituation: thisdata.followSituation,
  1928. customerStatus: thisdata.customerStatus,
  1929. adminName: thisdata.adminName,
  1930. createTime: thisdata.createTime
  1931. });
  1932. };
  1933. this.state.paginationt.current = data.data.pageNo;
  1934. this.state.paginationt.total = data.data.totalCount;
  1935. };
  1936. this.setState({
  1937. dataBusiness: theArr,
  1938. paginationt: this.state.paginationt
  1939. });
  1940. }.bind(this),
  1941. }).always(function() {
  1942. this.setState({
  1943. loading: false
  1944. });
  1945. }.bind(this));
  1946. },
  1947. //指定转交人自动补全
  1948. supervisor(e){
  1949. $.ajax({
  1950. method: "get",
  1951. dataType: "json",
  1952. crossDomain: false,
  1953. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  1954. data:{
  1955. adminName:e
  1956. },
  1957. success: function (data) {
  1958. let thedata=data.data;
  1959. if (!thedata) {
  1960. if (data.error && data.error.length) {
  1961. message.warning(data.error[0].message);
  1962. };
  1963. thedata = {};
  1964. };
  1965. this.setState({
  1966. customerArr:thedata,
  1967. });
  1968. }.bind(this),
  1969. }).always(function () {
  1970. this.setState({
  1971. loading: false
  1972. });
  1973. }.bind(this));
  1974. },
  1975. //上级主管输入框失去焦点是判断客户是否存在
  1976. selectAuto(value,options){
  1977. this.setState({
  1978. auto:value
  1979. })
  1980. },
  1981. blurChange(e){
  1982. console.log(e)
  1983. let theType='';
  1984. let contactLists=this.state.customerArr||[];
  1985. if (e) {
  1986. contactLists.map(function (item) {
  1987. if (item.name == e.toString()) {
  1988. theType = item.id;
  1989. }
  1990. });
  1991. }
  1992. this.setState({
  1993. theTypes:theType
  1994. })
  1995. },
  1996. //值改变时请求客户名称
  1997. httpChange(e){
  1998. if(e.length>=1){
  1999. this.supervisor(e);
  2000. }
  2001. this.setState({
  2002. auto:e
  2003. })
  2004. },
  2005. componentWillReceiveProps(nextProps) {
  2006. if(!this.props.visible && nextProps.visible) {
  2007. if(nextProps.data && nextProps.data.id) {
  2008. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  2009. };
  2010. this.state.data = {};
  2011. this.state.positiveIdUrl = [];
  2012. this.state.oppositeIdUrl = [];
  2013. this.state.headPortraitUrl = [];
  2014. };
  2015. },
  2016. render() {
  2017. const FormItem = Form.Item
  2018. const rowSelection = {
  2019. selectedRowKeys: this.state.selectedRowKeys,
  2020. onChange: (selectedRowKeys, selectedRows) => {
  2021. this.setState({
  2022. selectedRows: selectedRows.slice(-1),
  2023. selectedRowKeys: selectedRowKeys.slice(-1)
  2024. });
  2025. },
  2026. onSelect: (recordt, selected, selectedRows) => {
  2027. this.setState({
  2028. recordt: recordt.id
  2029. })
  2030. },
  2031. };
  2032. const hasSelected = this.state.selectedRowKeys.length > 0;
  2033. const { RangePicker, MonthPicker } = DatePicker;
  2034. const { getFieldDecorator } = this.props.form;
  2035. const formItemLayout = {
  2036. labelCol: { span: 8 },
  2037. wrapperCol: { span: 14 },
  2038. };
  2039. const theInformation = this.state.dataInformation || {}
  2040. const contactsOption = "";
  2041. const formItemLayput = {
  2042. labelCol: { span: 10 },
  2043. wrapperCol: { span: 14 },
  2044. };
  2045. const contacts = this.state.contacts || '';
  2046. const dataSources=this.state.customerArr || [];
  2047. const options = dataSources.map((group) =>
  2048. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  2049. )
  2050. return(
  2051. <div className="user-content" >
  2052. <div className="content-title">
  2053. <span>我的客户</span>
  2054. </div>
  2055. <div className="user-search">
  2056. <Input placeholder="公司名称"
  2057. value={this.state.nameSearch}
  2058. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  2059. <Select placeholder="省"
  2060. style={{ width: 80 }}
  2061. value={this.state.provinceSearch}
  2062. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  2063. {this.state.Provinces}
  2064. </Select>
  2065. <span style={{marginRight:'10px'}}>
  2066. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  2067. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  2068. </span>
  2069. <Button type="primary" onClick={this.search}>搜索</Button>
  2070. <Button onClick={this.reset}>重置</Button>
  2071. <Button onClick={() => { window.open(globalConfig.context + '/api/admin/customer/downloadTemplate?type=0')}}>下载批量导入模板</Button>
  2072. <Upload
  2073. name="file"
  2074. action={globalConfig.context + "/api/admin/customer/uploadExcel"}
  2075. beforeUpload={beforeUploadFile}
  2076. showUploadList={false}
  2077. onChange={(info) => {
  2078. if (info.file.status !== 'uploading') {
  2079. console.log(info.file, info.fileList);
  2080. }
  2081. if (info.file.status === 'done') {
  2082. if (!info.file.response.error.length) {
  2083. message.success(`${info.file.name} 文件上传成功!`);
  2084. this.loadData();
  2085. } else {
  2086. message.warning(info.file.response.error[0].message);
  2087. return;
  2088. };
  2089. } else if (info.file.status === 'error') {
  2090. message.error(`${info.file.name} 文件上传失败。`);
  2091. };
  2092. }} >
  2093. <Button>上传批量内容</Button>
  2094. </Upload>
  2095. {adminData.isSuperAdmin?<Button style={{ marginRight:'10px' ,marginLeft:'10px'}} type='danger'
  2096. disabled={!hasSelected}
  2097. onClick={this.delectRow}>删除<Icon type="minus" />
  2098. </Button>:''
  2099. }
  2100. <AutoComplete
  2101. className="certain-category-search"
  2102. dropdownClassName="certain-category-search-dropdown"
  2103. dropdownMatchSelectWidth={false}
  2104. dropdownStyle={{ width: 120 }}
  2105. style={{ width: '120px',marginLeft:'10px'}}
  2106. dataSource={options}
  2107. placeholder="输入转交人姓名"
  2108. value={this.state.auto}
  2109. onChange={this.httpChange}
  2110. filterOption={true}
  2111. onBlur={this.blurChange}
  2112. onSelect={this.selectAuto}
  2113. disabled={!hasSelected}
  2114. >
  2115. <Input />
  2116. </AutoComplete>
  2117. <Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
  2118. <Button type="primary"
  2119. disabled={!hasSelected}
  2120. onClick={this.changeRow}>转为公共客户<Icon /></Button>
  2121. {/*<Button style={{marginRight:'10px'}} type="primary"
  2122. disabled
  2123. onClick={this.delectRow}>锁定
  2124. </Button>
  2125. <Button style={{marginRight:'10px'}} type="primary"
  2126. disabled
  2127. onClick={this.delectRow}>激活
  2128. </Button>
  2129. */}
  2130. <Button type="primary" className="addButton" onClick={this.addClick}>新增客户<Icon type="plus" /></Button>
  2131. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  2132. <div className='clearfix' style={{marginTop:'5px'}}>
  2133. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  2134. <RangePicker
  2135. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  2136. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  2137. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  2138. <Select placeholder="账户状态"
  2139. style={{ width: 100 }}
  2140. value={this.state.statusSearch}
  2141. onChange={(e) => { this.setState({ statusSearch: e }) }}>
  2142. <Select.Option value="0" >正常</Select.Option>
  2143. <Select.Option value="2" >锁定</Select.Option>
  2144. </Select>
  2145. <Select placeholder="行业"
  2146. style={{ width: 100 }}
  2147. value={this.state.industrySearch}
  2148. onChange={(e) => { this.setState({ industrySearch: e }) }}>
  2149. {this.state.intentionalOption}
  2150. </Select>
  2151. <span>认证:</span>
  2152. <Select placeholder="业务认证"
  2153. style={{ width: 100 }}
  2154. value={this.state.serviceCertificationSearch}
  2155. onChange={(e) => { this.setState({ serviceCertificationSearch: e }) }}>
  2156. <Select.Option value="0" >未认证</Select.Option>
  2157. <Select.Option value="1" >已认证</Select.Option>
  2158. </Select>
  2159. <Select placeholder="实名认证"
  2160. style={{ width: 100 }}
  2161. value={this.state.userCertificationSearch}
  2162. onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
  2163. {
  2164. auditStatusL.map(function (item) {
  2165. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2166. })
  2167. }
  2168. </Select>
  2169. <span>专家:</span>
  2170. <Select placeholder="专家"
  2171. style={{ width: 60 }}
  2172. value={this.state.expertSearch}
  2173. onChange={(e) => { this.setState({ expertSearch: e }) }}>
  2174. <Select.Option value="0" >否</Select.Option>
  2175. <Select.Option value="1" >是</Select.Option>
  2176. </Select>
  2177. <span>明星:</span>
  2178. <Select placeholder="明星"
  2179. style={{ width: 60 }}
  2180. value={this.state.celebritySearch}
  2181. onChange={(e) => { this.setState({ celebritySearch: e }) }}>
  2182. <Select.Option value="0" >否</Select.Option>
  2183. <Select.Option value="1" >是</Select.Option>
  2184. </Select>
  2185. <span>国际:</span>
  2186. <Select placeholder="国际"
  2187. style={{ width: 60 }}
  2188. value={this.state.internationalSearch}
  2189. onChange={(e) => { this.setState({ internationalSearch: e }) }}>
  2190. <Select.Option value="0" >否</Select.Option>
  2191. <Select.Option value="1" >是</Select.Option>
  2192. </Select>
  2193. <span>会员:</span>
  2194. <Select placeholder="会员等级"
  2195. style={{ width: 100 }}
  2196. value={this.state.lvlSearch}
  2197. onChange={(e) => { this.setState({ lvlSearch: e }) }}>
  2198. {this.state.lvlArrOption}
  2199. </Select>
  2200. <Select placeholder="会员状态"
  2201. style={{ width: 100 }}
  2202. value={this.state.currentMemberStatusSearch}
  2203. onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
  2204. {this.state.currentMemberArrOption}
  2205. </Select>
  2206. </div>
  2207. </div>
  2208. </div>
  2209. <div className="patent-table">
  2210. <Spin spinning={this.state.loading}>
  2211. <Table columns={this.state.columns}
  2212. dataSource={this.state.dataSource}
  2213. rowSelection={rowSelection}
  2214. pagination={this.state.pagination}
  2215. onRowClick={this.tableRowClick}
  2216. />
  2217. </Spin>
  2218. </div>
  2219. <CustomerDetail
  2220. data={this.state.RowData}
  2221. showDesc={this.state.showDesc}
  2222. closeDesc={this.closeDesc}
  2223. newmodal={this.newmodal}
  2224. />
  2225. <Modal
  2226. className="customeDetails"
  2227. title="单位客户详情"
  2228. width='1200px'
  2229. visible={this.state.modal5Visible}
  2230. onOk={this.detailsModal}
  2231. onCancel={this.detailsModal}
  2232. footer=''
  2233. >
  2234. <Tabs defaultActiveKey="1" onChange={this.callback}>
  2235. <TabPane tab="基本信息" key="1">
  2236. <Form horizontal onSubmit={this.newSubmit} id="demand-form">
  2237. <Spin spinning={this.state.loading}>
  2238. <div className="clearfix" >
  2239. <FormItem className="half-item"
  2240. {...formItemLayout}
  2241. label="客户姓名"
  2242. >
  2243. <span>{this.state.identifyName}</span>
  2244. </FormItem>
  2245. </div>
  2246. <div className="clearfix" >
  2247. <FormItem className="half-item"
  2248. {...formItemLayout}
  2249. label="行业">
  2250. <Select placeholder="选择行业" value={this.state.industry} style={{width:'300px'}}
  2251. onChange={(e)=>{this.setState({industry:e})}}>
  2252. {
  2253. industry.map(function (item) {
  2254. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2255. })
  2256. }
  2257. </Select>
  2258. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2259. </FormItem>
  2260. <FormItem className="half-item"
  2261. {...formItemLayout}
  2262. label="社会属性"
  2263. >
  2264. <Select placeholder="客户社会属性" value={this.state.societyTag} style={{width:'300px'}}
  2265. onChange={(e)=>{this.setState({societyTag:e})}}>
  2266. {
  2267. socialAttribute.map(function (item) {
  2268. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2269. })
  2270. }
  2271. </Select>
  2272. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2273. </FormItem>
  2274. <FormItem className="half-item"
  2275. {...formItemLayout}
  2276. label="省-市-区"
  2277. >
  2278. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'300px'}}
  2279. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  2280. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2281. </FormItem>
  2282. <FormItem className="half-item"
  2283. {...formItemLayout}
  2284. label="出生日期"
  2285. >
  2286. {!this.state.yearMonth?<MonthPicker placeholder="选择出生年月" value={this.state.yearMonth||null} onChange={(time) => {this.setState({yearMonth: time});}}/>
  2287. :<MonthPicker value={moment(this.state.yearMonth, monthFormat)} format={monthFormat} onChange={(time) => {this.setState({yearMonth: time});}}/>
  2288. }
  2289. </FormItem>
  2290. <FormItem className="half-item"
  2291. {...formItemLayout}
  2292. label="身份证号码"
  2293. >
  2294. <Input placeholder="身份证号码" value={this.state.idNumber} onChange={(e) => {
  2295. this.setState({ idNumber: e.target.value })}}/>
  2296. </FormItem>
  2297. <FormItem className="half-item"
  2298. {...formItemLayout}
  2299. label="主要联系人"
  2300. >
  2301. <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
  2302. this.setState({ contacts: e.target.value })}}/>
  2303. </FormItem>
  2304. <FormItem className="half-item"
  2305. {...formItemLayout}
  2306. label="主要联系人号码"
  2307. >
  2308. <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
  2309. this.setState({ contactMobile: e.target.value })}}/>
  2310. </FormItem>
  2311. <div className="clearfix">
  2312. <FormItem className="half-item"
  2313. {...formItemLayout}
  2314. label="职称名字"
  2315. >
  2316. <Input placeholder="职称名字" value={this.state.professionalTitle} onChange={(e) => {
  2317. this.setState({ professionalTitle: e.target.value })}}/>
  2318. </FormItem>
  2319. <FormItem className="half-item"
  2320. {...formItemLayout}
  2321. label="就业单位"
  2322. >
  2323. <Input placeholder="就业单位" value={this.state.workUnit} onChange={(e) => {
  2324. this.setState({ workUnit: e.target.value })}}/>
  2325. </FormItem>
  2326. <FormItem className="half-item"
  2327. {...formItemLayout}
  2328. label="学历"
  2329. >
  2330. <Input placeholder="学历" value={this.state.education} onChange={(e) => {
  2331. this.setState({ education: e.target.value })}}/>
  2332. </FormItem>
  2333. <FormItem className="half-item"
  2334. {...formItemLayout}
  2335. label="毕业院校"
  2336. >
  2337. <Input placeholder="学历" value={this.state.graduateSchool} onChange={(e) => {
  2338. this.setState({ graduateSchool: e.target.value })}}/>
  2339. </FormItem>
  2340. <FormItem className="half-item"
  2341. {...formItemLayout}
  2342. label="专业类别"
  2343. >
  2344. <Input placeholder="专业类别" value={this.state.majorCategory} onChange={(e) => {
  2345. this.setState({ majorCategory: e.target.value })}}/>
  2346. </FormItem>
  2347. <FormItem className="half-item"
  2348. {...formItemLayout}
  2349. label="职业资格"
  2350. >
  2351. <Input placeholder="职业资格" value={this.state.qualification} onChange={(e) => {
  2352. this.setState({ qualification: e.target.value })}}/>
  2353. </FormItem>
  2354. <FormItem className="half-item"
  2355. {...formItemLayout}
  2356. label="通信地址"
  2357. >
  2358. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  2359. onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
  2360. </FormItem>
  2361. <FormItem className="half-item"
  2362. {...formItemLayout}
  2363. label="固定电话"
  2364. >
  2365. <Input placeholder="客户固定电话" value={this.state.fixedTel}
  2366. onChange={(e) => { this.setState({ fixedTel: e.target.value }) }}/>
  2367. </FormItem>
  2368. <FormItem className="half-item"
  2369. {...formItemLayout}
  2370. label="客户QQ"
  2371. >
  2372. <Input placeholder="客户QQ" value={this.state.qq}
  2373. onChange={(e) => { this.setState({ qq: e.target.value })}}/>
  2374. </FormItem>
  2375. <FormItem className="half-item"
  2376. {...formItemLayout}
  2377. label="电子邮箱"
  2378. >
  2379. <Input placeholder="客户电子邮箱" value={this.state.email}
  2380. onChange={(e) => {this.setState({email: e.target.value })}}/>
  2381. </FormItem>
  2382. <FormItem className="half-item"
  2383. {...formItemLayout}
  2384. label="咨询费用"
  2385. >
  2386. <Input ref='consul' placeholder="请输入咨询费用" value={this.state.consultationPrice}
  2387. onChange={(e) => {this.setState({consultationPrice: e.target.value })}}/>
  2388. </FormItem>
  2389. <FormItem className="half-item"
  2390. {...formItemLayout}
  2391. label="实名认证"
  2392. >
  2393. <Select placeholder="实名认证"
  2394. value={this.state.auditStatus}
  2395. onChange={(e) => { this.setState({ auditStatus: e }) }}>
  2396. {
  2397. auditStatusL.map(function (item) {
  2398. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2399. })
  2400. }
  2401. </Select>
  2402. </FormItem>
  2403. </div>
  2404. <div className="clearfix">
  2405. <FormItem className="half-item"
  2406. {...formItemLayout}
  2407. label="投资机构"
  2408. >
  2409. <Radio.Group value={this.state.investment} onChange={(e) => {
  2410. this.setState({ investment: e.target.value })
  2411. }}>
  2412. <Radio value={0}>否</Radio>
  2413. <Radio value={1}>是</Radio>
  2414. </Radio.Group>
  2415. </FormItem>
  2416. <FormItem className="half-item"
  2417. {...formItemLayout}
  2418. label="业务认证"
  2419. >
  2420. <Radio.Group value={this.state.businessAudit} onChange={(e) => {
  2421. this.setState({ businessAudit: e.target.value })
  2422. }}>
  2423. <Radio value={0}>未认证</Radio>
  2424. <Radio value={1}>已认证</Radio>
  2425. </Radio.Group>
  2426. </FormItem>
  2427. <FormItem className="half-item"
  2428. {...formItemLayout}
  2429. label="专家"
  2430. >
  2431. <Radio.Group value={this.state.expert} onChange={(e) => {
  2432. this.setState({ expert: e.target.value })
  2433. }}>
  2434. <Radio value={0}>否</Radio>
  2435. <Radio value={1}>是</Radio>
  2436. </Radio.Group>
  2437. </FormItem>
  2438. <FormItem className="half-item"
  2439. {...formItemLayout}
  2440. label="明星"
  2441. >
  2442. <Radio.Group value={this.state.celebrity} onChange={(e) => {
  2443. this.setState({ celebrity: e.target.value })
  2444. }}>
  2445. <Radio value={0}>否</Radio>
  2446. <Radio value={1}>是</Radio>
  2447. </Radio.Group>
  2448. </FormItem>
  2449. <FormItem className="half-item"
  2450. {...formItemLayout}
  2451. label="咨询师"
  2452. >
  2453. <Radio.Group value={this.state.consultant} onChange={(e) => {
  2454. this.setState({ consultant: e.target.value })
  2455. }}>
  2456. <Radio value={0}>否</Radio>
  2457. <Radio value={1}>是</Radio>
  2458. </Radio.Group>
  2459. </FormItem>
  2460. <FormItem className="half-item"
  2461. {...formItemLayout}
  2462. label="国际化"
  2463. >
  2464. <Radio.Group value={this.state.international} onChange={(e) => {
  2465. this.setState({ international: e.target.value })
  2466. }}>
  2467. <Radio value={0}>否</Radio>
  2468. <Radio value={1}>是</Radio>
  2469. </Radio.Group>
  2470. </FormItem>
  2471. <FormItem className="half-item"
  2472. {...formItemLayout}
  2473. label="性别"
  2474. >
  2475. <Radio.Group value={this.state.sex} onChange={(e) => {
  2476. this.setState({sex:e.target.value})
  2477. }}>
  2478. <Radio value={'男'}>男</Radio>
  2479. <Radio value={'女'}>女</Radio>
  2480. </Radio.Group>
  2481. </FormItem>
  2482. </div>
  2483. <div className='clearfix'>
  2484. <FormItem
  2485. labelCol={{ span:4 }}
  2486. wrapperCol={{ span: 18 }}
  2487. label="客户简介" >
  2488. <Input type="textarea" rows={4} value={this.state.introduction}
  2489. onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
  2490. </FormItem>
  2491. </div>
  2492. <div className="clearfix pictures">
  2493. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'60px'}}
  2494. labelCol={{ span: 8 }}
  2495. wrapperCol={{ span: 10 }}
  2496. label="身份证正面" >
  2497. <PicturesWall
  2498. fileList={this.getPositiveIdUrl}
  2499. pictureUrl={this.state.positiveIdUrl} />
  2500. <p>建议:图片要清晰。</p>
  2501. </FormItem>
  2502. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px'}}
  2503. labelCol={{ span: 8 }}
  2504. wrapperCol={{ span: 10 }}
  2505. label="身份证反面" >
  2506. <PicturesWall
  2507. fileList={this.getOppositeIdUrl}
  2508. pictureUrl={this.state.oppositeIdUrl} />
  2509. <p>建议:图片要清晰。</p>
  2510. </FormItem>
  2511. <FormItem style={{display:'inline-block' ,width:'350px',marginTop:'20px'}}
  2512. labelCol={{ span: 8 }}
  2513. wrapperCol={{ span: 10 }}
  2514. label="客户照片" >
  2515. <PicturesWall
  2516. fileList={this.getHeadPortraitUrl}
  2517. pictureUrl={this.state.headPortraitUrl} />
  2518. <p>建议:图片要清晰。</p>
  2519. </FormItem>
  2520. </div>
  2521. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'146px',marginBottom:'30px'}}>保存</Button>
  2522. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  2523. </div>
  2524. </Spin>
  2525. </Form>
  2526. </TabPane>
  2527. <TabPane tab="联系人信息" key="2">
  2528. <div className="clearfix" >
  2529. <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button>
  2530. </div>
  2531. <div className="clearfix">
  2532. <Spin spinning={this.state.loading}>
  2533. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  2534. <Table
  2535. pagination={false}
  2536. columns={this.state.ContactsLists}
  2537. dataSource={this.state.contactList}
  2538. />
  2539. <div className="clearfix">
  2540. <Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
  2541. <Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
  2542. </div>
  2543. </Form>
  2544. </Spin>
  2545. </div>
  2546. </TabPane>
  2547. <TabPane tab="账户信息" key="3">
  2548. <div className="clearfix">
  2549. <Form horizontal id="demand-form" onSubmit={this.accountSave} >
  2550. <Spin spinning={this.state.loading} >
  2551. <FormItem className="half-item"
  2552. {...formItemLayout}
  2553. label="注册手机号" >
  2554. <Input value={this.state.mobile} disabled onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
  2555. <Button onClick={this.modifyPassworld}>修改密码</Button>
  2556. </FormItem>
  2557. <FormItem className="half-item"
  2558. {...formItemLayout}
  2559. label="注册用户名" >
  2560. <Input value={this.state.nickname} onChange={(e) => { this.setState({ nickname: e.target.value }); }} />
  2561. </FormItem>
  2562. <FormItem className="half-item"
  2563. {...formItemLayout}
  2564. label="注册邮箱" >
  2565. <Input value={this.state.email} onChange={(e) => { this.setState({ email: e.target.value }); }} />
  2566. </FormItem>
  2567. <div className="clearfix">
  2568. <FormItem className="half-item"
  2569. {...formItemLayout}
  2570. label="客户来源" >
  2571. <span>{this.state.source}</span>
  2572. </FormItem>
  2573. <FormItem className="half-item"
  2574. {...formItemLayout}
  2575. label="客户类型" >
  2576. <span>{this.state.type}</span>
  2577. </FormItem>
  2578. <FormItem className="half-item"
  2579. {...formItemLayout}
  2580. label="创建时间" >
  2581. <span>{this.state.createTimes}</span>
  2582. </FormItem>
  2583. <FormItem className="half-item"
  2584. {...formItemLayout}
  2585. label="账户状态"
  2586. >
  2587. <Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
  2588. {
  2589. statuslist.map(function (item) {
  2590. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2591. })
  2592. }
  2593. </Select>
  2594. </FormItem>
  2595. </div>
  2596. <div className="clearfix">
  2597. <FormItem className="half-item"
  2598. {...formItemLayout}
  2599. label="会员"
  2600. >
  2601. <Radio.Group value={this.state.isMember} onChange={(e) => {
  2602. this.setState({ isMember: e.target.value })
  2603. }}>
  2604. <Radio value={0}>否</Radio>
  2605. <Radio value={1}>是</Radio>
  2606. </Radio.Group>
  2607. </FormItem>
  2608. <FormItem className="half-item"
  2609. {...formItemLayout}
  2610. label="会员等级"
  2611. >
  2612. <Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
  2613. {
  2614. lvl.map(function (item) {
  2615. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2616. })
  2617. }
  2618. </Select>
  2619. </FormItem>
  2620. <FormItem className="half-item"
  2621. {...formItemLayout}
  2622. label="会员状态"
  2623. >
  2624. <Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
  2625. {
  2626. currentMember.map(function (item) {
  2627. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2628. })
  2629. }
  2630. </Select>
  2631. </FormItem>
  2632. </div>
  2633. <div className="clearfix">
  2634. <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
  2635. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  2636. </div>
  2637. </Spin>
  2638. </Form>
  2639. </div>
  2640. </TabPane>
  2641. <TabPane tab="客户拜访" key="4">
  2642. <div className="clearfix">
  2643. <Spin spinning={this.state.loading}>
  2644. <Table
  2645. pagination={false}
  2646. columns={this.state.visitsList}
  2647. dataSource={this.state.visitArrList}
  2648. onRowClick={this.VisitRowClick}
  2649. />
  2650. </Spin>
  2651. </div>
  2652. </TabPane>
  2653. <TabPane tab="业务意向" key="5">
  2654. <div className="clearfix">
  2655. <Spin spinning={this.state.loading}>
  2656. <Table
  2657. pagination={this.state.paginationt}
  2658. columns={this.state.businessIntentionList}
  2659. dataSource={this.state.dataBusiness}
  2660. />
  2661. </Spin>
  2662. </div>
  2663. </TabPane>
  2664. <TabPane tab="业务订单" key="6">
  2665. </TabPane>
  2666. <TabPane tab="技术需求" key="7">
  2667. </TabPane>
  2668. <TabPane tab="技术成果" key="8">
  2669. </TabPane>
  2670. <TabPane tab="技术专家" key="9">
  2671. </TabPane>
  2672. </Tabs>
  2673. </Modal>
  2674. <Modal
  2675. className="customeDetails"
  2676. footer=''
  2677. title="拜访详情"
  2678. width='1000px'
  2679. visible={this.state.visitModul}
  2680. onOk={this.visitOk}
  2681. onCancel={this.visitCancel}
  2682. >
  2683. <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
  2684. <Spin spinning={this.state.loading}>
  2685. <div className="clearfix">
  2686. <FormItem className="half-item"
  2687. {...formItemLayout}
  2688. label="拜访方式" >
  2689. <Radio.Group value={this.state.contactType} onChange={(e) => {
  2690. this.setState({ contactType: e.target.value })
  2691. }}>
  2692. <Radio value={0}>外出</Radio>
  2693. <Radio value={1}>电话</Radio>
  2694. <Radio value={2}>QQ</Radio>
  2695. <Radio value={3}>微信</Radio>
  2696. <Radio value={4}>邮箱</Radio>
  2697. </Radio.Group>
  2698. </FormItem>
  2699. <FormItem className="half-item"
  2700. {...formItemLayout}
  2701. >
  2702. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px',display:this.state.keys?'inline-block':'none'}}>添加新联系人</Button>
  2703. </FormItem>
  2704. <div className="clearfix">
  2705. <FormItem className="half-item"
  2706. {...formItemLayout}
  2707. label="客户姓名"
  2708. >
  2709. <span>{this.state.identifyName}</span>
  2710. </FormItem>
  2711. <FormItem className="half-item"
  2712. {...formItemLayout}
  2713. label="拜访人"
  2714. >
  2715. <span>{this.state.adminName}</span>
  2716. </FormItem>
  2717. <FormItem className="half-item"
  2718. {...formItemLayout}
  2719. label="当前联系人"
  2720. >
  2721. <span>{this.state.contacts}</span>
  2722. </FormItem>
  2723. {this.state.contacts?<span></span>:
  2724. <FormItem className="half-item"
  2725. {...formItemLayout}
  2726. label="联系人"
  2727. >
  2728. <Select placeholder="选择联系人" style={{ width: 140 }}
  2729. value={this.state.lastName}
  2730. onChange={this.hundleName}>
  2731. {this.state.orderStatusOption}
  2732. </Select>
  2733. </FormItem>
  2734. }
  2735. <FormItem className="half-item"
  2736. {...formItemLayout}
  2737. label="拜访时间"
  2738. >
  2739. <span>{this.state.followTime}</span>
  2740. </FormItem>
  2741. <FormItem className="half-item"
  2742. {...formItemLayout}
  2743. label="联系电话"
  2744. >
  2745. <span>{this.state.nub}</span>
  2746. </FormItem>
  2747. </div>
  2748. <div className="clearfix">
  2749. <FormItem
  2750. labelCol={{ span: 4 }}
  2751. wrapperCol={{ span: 16 }}
  2752. label="拜访备注" >
  2753. <Input type="textarea" rows={4} value={this.state.result}
  2754. onChange={(e)=>{this.setState({result:e.target.value})}}/>
  2755. </FormItem>
  2756. </div>
  2757. <div className="clearfix">
  2758. <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
  2759. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  2760. <Spin spinning={this.state.loading}>
  2761. <Table
  2762. rowKey={record => record.id}
  2763. pagination={false}
  2764. columns={this.state.intentionList}
  2765. dataSource={this.state.data}
  2766. />
  2767. </Spin>
  2768. </div>
  2769. </div>
  2770. </div>
  2771. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 35px 35px 120px'}}>保存</Button>
  2772. <Button size="large" onClick={this.visitCancel}>取消</Button>
  2773. </Spin>
  2774. </Form>
  2775. </Modal>
  2776. <Modal
  2777. footer=''
  2778. title="修改密码"
  2779. width='600px'
  2780. visible={this.state.passworldModul}
  2781. onOk={this.passworldOk}
  2782. onCancel={this.passworldCancel}
  2783. >
  2784. <div className="clearfix">
  2785. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2786. <Spin spinning={this.state.loading}>
  2787. <div className="clearfix">
  2788. <FormItem className="half-item"
  2789. {...formItemLayout}
  2790. label="原密码" >
  2791. <Input type="password" value={this.state.companyNamet1} onChange={(e) => { this.setState({ companyNamet1: e.target.value }); }} required="required" />
  2792. </FormItem>
  2793. </div>
  2794. <div className="clearfix">
  2795. <FormItem className="half-item"
  2796. {...formItemLayout}
  2797. label="新密码" >
  2798. <Input type="password" value={this.state.companyName1} onChange={(e) => { this.setState({ companyName1: e.target.value }); }} required="required" />
  2799. </FormItem>
  2800. </div>
  2801. <div className="clearfix">
  2802. <FormItem className="half-item"
  2803. {...formItemLayout}
  2804. label="确认密码" >
  2805. <Input type="password" value={this.state.companyNam1} onChange={(e) => { this.setState({ companyNam1: e.target.value }); }} required="required" />
  2806. </FormItem>
  2807. </div>
  2808. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
  2809. <Button size="large" onClick={this.passworldCancel}>取消</Button>
  2810. </Spin>
  2811. </Form>
  2812. </div>
  2813. </Modal>
  2814. <Modal
  2815. footer=''
  2816. width='800px'
  2817. title="新增联系人"
  2818. visible={this.state.addcontactModul}
  2819. onOk={this.addcontactModulOK}
  2820. onCancel={this.addcontactModulcancel}
  2821. >
  2822. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  2823. <Spin spinning={this.state.loading}>
  2824. <Row>
  2825. <FormItem
  2826. labelCol={{ span: 3 }}
  2827. wrapperCol={{ span: 14 }}
  2828. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  2829. <Radio.Group value={this.state.newsex} onChange={(e) => {
  2830. this.setState({ newsex: e.target.value })
  2831. }}>
  2832. <Radio value='男'>男</Radio>
  2833. <Radio value='女'>女</Radio>
  2834. </Radio.Group>
  2835. </FormItem>
  2836. </Row>
  2837. <Row style={{ paddingLeft:'50px' }}>
  2838. <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
  2839. <Col span={8}>
  2840. <Input value={this.state.newname} required="required"
  2841. onChange={(e) => { this.setState({ newname: e.target.value }) }} />
  2842. </Col>
  2843. <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
  2844. <Col span={8}>
  2845. <Input value={this.state.newmobile} required="required"
  2846. onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
  2847. </Col>
  2848. </Row>
  2849. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2850. <Col span={2}>微信:</Col>
  2851. <Col span={8}>
  2852. <Input value={this.state.newwechat}
  2853. onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
  2854. </Col>
  2855. <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
  2856. <Col span={8}>
  2857. <Input value={this.state.newqq}
  2858. onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
  2859. </Col>
  2860. </Row>
  2861. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  2862. <Col span={2}>部门:</Col>
  2863. <Col span={8}>
  2864. <Input value={this.state.newdepatrment}
  2865. onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
  2866. </Col>
  2867. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  2868. <Col span={8}>
  2869. <Input value={this.state.newposition}
  2870. onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
  2871. </Col>
  2872. </Row>
  2873. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2874. <Col span={2}>邮箱:</Col>
  2875. <Col span={8}>
  2876. <Input value={this.state.newemail}
  2877. onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
  2878. </Col>
  2879. </Row>
  2880. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  2881. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  2882. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  2883. </Row>
  2884. </Spin>
  2885. </Form>
  2886. </Modal>
  2887. <Modal
  2888. footer=''
  2889. title="业务意向详情"
  2890. width='1000px'
  2891. visible={this.state.businessModul}
  2892. onOk={this.businessIntentionOk}
  2893. onCancel={this.businessIntentionCancel}
  2894. >
  2895. <div className="clearfix">
  2896. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2897. <Spin spinning={this.state.loading}>
  2898. <div className="clearfix">
  2899. <FormItem className="half-item"
  2900. {...formItemLayout}
  2901. label="意向业务名称" >
  2902. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  2903. </FormItem>
  2904. <FormItem className="half-item"
  2905. {...formItemLayout}
  2906. label="意向时间" >
  2907. <span>{this.state.createTime}</span>
  2908. </FormItem>
  2909. <FormItem className="half-item"
  2910. {...formItemLayout}
  2911. label="客户姓" >
  2912. <span>{this.state.identifyName}</span>
  2913. </FormItem>
  2914. <FormItem className="half-item"
  2915. {...formItemLayout}
  2916. label="营销员" >
  2917. <span>{this.state.adminName}</span>
  2918. </FormItem>
  2919. <FormItem className="half-item"
  2920. {...formItemLayout}
  2921. label="意向业务进度" >
  2922. <span>{getfllowSituation(this.state.followSituation)}</span>
  2923. </FormItem>
  2924. <FormItem className="half-item"
  2925. {...formItemLayout}
  2926. label="业务客户状态" >
  2927. <span>{getcustomerStatue(this.state.customerStatus)}</span>
  2928. </FormItem>
  2929. </div>
  2930. <div className="clearfix">
  2931. <FormItem className="half-item"
  2932. {...formItemLayout}
  2933. label="业务意向说明" >
  2934. <span>{this.state.remarks}</span>
  2935. </FormItem>
  2936. </div>
  2937. <div className="clearfix">
  2938. <div style={{fontSize:'18px',lineHeight:'24px',marginBottom:'10px'}}>业务跟进</div>
  2939. <div className="clearfix">
  2940. <Spin spinning={this.state.loading}>
  2941. <Table
  2942. pagination={this.state.paginations}
  2943. columns={this.state.businessFollowList}
  2944. dataSource={this.state.visitArrList}
  2945. />
  2946. </Spin>
  2947. </div>
  2948. </div>
  2949. </Spin>
  2950. </Form>
  2951. </div>
  2952. </Modal>
  2953. <Modal
  2954. footer=''
  2955. title="业务跟进详情"
  2956. width='600px'
  2957. visible={this.state.businessFollowModul}
  2958. onOk={this.businessFollowOk}
  2959. onCancel={this.businessFollowCancel}
  2960. >
  2961. <div className="clearfix">
  2962. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2963. <Spin spinning={this.state.loading}>
  2964. <div className="clearfix">
  2965. <FormItem className="half-item"
  2966. {...formItemLayout}
  2967. label="意向业务名称" >
  2968. <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
  2969. </FormItem>
  2970. <FormItem className="half-item"
  2971. {...formItemLayout}
  2972. label="意向时间" >
  2973. <span>{this.state.createTimes}</span>
  2974. </FormItem>
  2975. <FormItem className="half-item"
  2976. {...formItemLayout}
  2977. label="客户姓名" >
  2978. <span>{this.state.identifyNames}</span>
  2979. </FormItem>
  2980. <FormItem className="half-item"
  2981. {...formItemLayout}
  2982. label="营销员" >
  2983. <span>{this.state.adminNames}</span>
  2984. </FormItem>
  2985. <FormItem className="half-item"
  2986. {...formItemLayout}
  2987. label="意向业务进度" >
  2988. <span>{getfllowSituation(this.state.followSituations)}</span>
  2989. </FormItem>
  2990. <FormItem className="half-item"
  2991. {...formItemLayout}
  2992. label="业务客户状态" >
  2993. <span>{getcustomerStatue(this.state.customerStatuss)}</span>
  2994. </FormItem>
  2995. </div>
  2996. <div className="clearfix">
  2997. <FormItem className="half-item"
  2998. {...formItemLayout}
  2999. label="业务意向说明" >
  3000. <span>{this.state.remarkss}</span>
  3001. </FormItem>
  3002. </div>
  3003. <div className="clearfix">
  3004. <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
  3005. <FormItem className="half-item"
  3006. {...formItemLayout}
  3007. label="拜访方式" >
  3008. <span>{getContactType(this.state.contactTypes)}</span>
  3009. </FormItem>
  3010. <FormItem className="half-item"
  3011. {...formItemLayout}
  3012. label="联系人" >
  3013. <span>{this.state.contactss}</span>
  3014. </FormItem>
  3015. <FormItem className="half-item"
  3016. {...formItemLayout}
  3017. label="联系电话" >
  3018. <span>{this.state.contactMobiles}</span>
  3019. </FormItem>
  3020. <FormItem className="half-item"
  3021. {...formItemLayout}
  3022. label="拜访时间" >
  3023. <span>{this.state.followTimes}</span>
  3024. </FormItem>
  3025. <FormItem className="half-item"
  3026. {...formItemLayout}
  3027. label="拜访人" >
  3028. <span>{this.state.adminNames}</span>
  3029. </FormItem>
  3030. <div className="clearfix">
  3031. <FormItem className="half-item"
  3032. {...formItemLayout}
  3033. label="拜访备注" >
  3034. <span>{this.state.results}</span>
  3035. </FormItem>
  3036. </div>
  3037. </div>
  3038. </Spin>
  3039. </Form>
  3040. </div>
  3041. </Modal>
  3042. </div >
  3043. );
  3044. }
  3045. }));
  3046. export default IndividualCustomer;