individualCustomer.jsx 123 KB

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