individualCustomer.jsx 127 KB

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