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