individualCustomer.jsx 107 KB

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