individualCustomer.jsx 108 KB

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