individualCustomer.jsx 103 KB

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