companyCustomer.jsx 127 KB

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