companyCustomer.jsx 132 KB

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