individualCustomer.jsx 108 KB

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