expertReview.jsx 117 KB

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