companyCustomer.jsx 130 KB

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