personalManages.jsx 110 KB

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