myClient.jsx 100 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413
  1. import React from 'react';
  2. import { Radio, Icon, Button, Cascader,Input, Select, Tabs,Spin,Popconfirm, Popover,Table, Switch, message, DatePicker, Modal, Upload,Form ,Row,Col,TimePicker} from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import moment from 'moment';
  6. import './myClient.less';
  7. import { citySelect,provinceList,areaSelect} from '../../../NewDicProvinceList';
  8. const { Column, ColumnGroup } = Table;
  9. const TabPane = Tabs.TabPane;
  10. import CustomerDetail from './myClientDesc.jsx';
  11. import {socialAttribute,newFollow,lvl,currentMember,cityArr, customerStatus,intentionalService,sex} from '../../../dataDic.js';
  12. import {getCompanyIntention,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
  13. const data = [{
  14. id: '1',
  15. name: '长沙科技1',
  16. contacts: '午安行',
  17. contactMobile: '321312311',
  18. expert:'0',
  19. serviceCertification:'0',
  20. userCertification:'0',
  21. locationProvince:'湖南',
  22. area:'500',
  23. }, {
  24. id: '2',
  25. name: '上海科技',
  26. contacts: '老王',
  27. contactMobile: '231321311',
  28. expert:'1',
  29. serviceCertification:'1',
  30. userCertification:'0',
  31. locationProvince:'湖南-长沙',
  32. Province:'1',
  33. city:'38',
  34. area:'330',
  35. }, {
  36. id: '3',
  37. name: '广州科技',
  38. contacts: '老李',
  39. contactMobile: '1123213123',
  40. expert:'1',
  41. serviceCertification:'0',
  42. userCertification:'1',
  43. locationProvince:'湖南-长沙-雨花区',
  44. Province:'6',
  45. city:'24',
  46. area:'900',
  47. }
  48. ];
  49. //图片组件
  50. const PicturesWall = React.createClass({
  51. getInitialState() {
  52. return {
  53. previewVisible: false,
  54. previewImage: '',
  55. fileList: [],
  56. }
  57. },
  58. handleCancel() {
  59. this.setState({ previewVisible: false })
  60. },
  61. handlePreview(file) {
  62. this.setState({
  63. previewImage: file.url || file.thumbUrl,
  64. previewVisible: true,
  65. });
  66. },
  67. handleChange(info) {
  68. let fileList = info.fileList;
  69. this.setState({ fileList });
  70. this.props.fileList(fileList);
  71. },
  72. componentWillReceiveProps(nextProps) {
  73. this.state.fileList = nextProps.pictureUrl;
  74. },
  75. render() {
  76. const { previewVisible, previewImage, fileList } = this.state;
  77. const uploadButton = (
  78. <div>
  79. <Icon type="plus" />
  80. <div className="ant-upload-text">点击上传</div>
  81. </div>
  82. );
  83. return (
  84. <div style={{display:"inline-block"}}>
  85. <Upload
  86. action={globalConfig.context + "/api/admin/customer/attachmentUpload"}
  87. data={{ 'sign': this.props.pictureSign }}
  88. listType="picture-card"
  89. fileList={fileList}
  90. onPreview={this.handlePreview}
  91. onChange={this.handleChange} >
  92. {fileList.length >= 5 ? null : uploadButton}
  93. </Upload>
  94. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  95. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  96. </Modal>
  97. </div>
  98. );
  99. }
  100. });
  101. const MyClient = Form.create()(React.createClass({
  102. loadData(pageNo, apiUrl) {
  103. this.state.data = [];
  104. this.setState({
  105. loading: true
  106. });
  107. $.ajax({
  108. method: "post",
  109. dataType: "json",
  110. crossDomain: false,
  111. url:globalConfig.context + '/api/admin/customer/listPrivateOrganizationCustomer',
  112. data: {
  113. pageNo: pageNo || 1,
  114. pageSize: this.state.pagination.pageSize,
  115. type: this.state.typeSearch, //名称1
  116. name:this.state.nameSearch,
  117. province:this.state.addressSearch?this.state.addressSearch[0].value:this.state.provinceSearch,
  118. city: this.state.addressSearch?this.state.addressSearch[1].value:'',
  119. //area: this.state.addressSearch?this.state.addressSearch[2].value:'',
  120. status:this.state.statusSearch,
  121. industry:this.state.industrySearch,
  122. serviceCertification:this.state.serviceCertificationSearch,
  123. userCertification: this.state.userCertificationSearch,
  124. currentMemberStatus:this.state.currentMemberStatusSearch,
  125. lvl:this.state.lvlSearch,
  126. listed:this.state.listedSearch, //是否上市
  127. highTechZone:this.state.highTechZoneSearch, //是否高新
  128. startDate: this.state.releaseDate[0],
  129. endDate: this.state.releaseDate[1],
  130. },
  131. success: function (data) {
  132. let theArr = [];
  133. if (data.error.length || data.data.list=="") {
  134. if (data.error && data.error.length) {
  135. message.warning(data.error[0].message);
  136. };
  137. } else {
  138. for (let i = 0; i < data.data.list.length; i++) {
  139. let thisdata = data.data.list[i];
  140. theArr.push({
  141. key: i,
  142. id: thisdata.uid,
  143. type:thisdata.type,
  144. name:thisdata.name,
  145. status:thisdata.status,
  146. contacts:thisdata.contacts,
  147. contactMobile:thisdata.contactMobile,
  148. industry:thisdata.industry,
  149. createTime:thisdata.createTime,
  150. serviceCertification:thisdata.serviceCertification,
  151. userCertification:thisdata.userCertification,
  152. lvl:thisdata.lvl,
  153. currentMemberStatus:thisdata.currentMemberStatus,
  154. international:thisdata.international,
  155. listed:thisdata.listed,
  156. highTechZone:thisdata.highTechZone,
  157. locationProvince:thisdata.province+'-'+thisdata.city+'-'+thisdata.area
  158. });
  159. };
  160. this.state.pagination.current = data.data.pageNo;
  161. this.state.pagination.total = data.data.totalCount;
  162. };
  163. this.setState({
  164. dataSource: theArr,
  165. pagination: this.state.pagination
  166. });
  167. }.bind(this),
  168. }).always(function () {
  169. this.setState({
  170. loading: false
  171. });
  172. }.bind(this));
  173. },
  174. //点击出现函数
  175. setModal2VisibleOk(e) {
  176. this.setState({
  177. modal2Visible:true
  178. });
  179. },
  180. //点击消失函数
  181. setModal2Visiblecancel(e) {
  182. this.setState({
  183. modal2Visible:false
  184. });
  185. },
  186. getPictureUrl(e) {
  187. this.setState({pictureUrl: e });
  188. },
  189. handleOk(e){
  190. this.setState({
  191. visible: false,
  192. });
  193. },
  194. handleCancel(e){
  195. this.setState({
  196. visible: false,
  197. });
  198. },
  199. getInitialState() {
  200. return {
  201. orgCodeUrl:[],
  202. companyLogoUrl:[],
  203. visible: false ,
  204. searchMore: true,
  205. releaseDate: [],
  206. releaseDate: [],
  207. selectedRowKeys: [],
  208. selectedRowKey: [],
  209. selectedRows: [],
  210. loading: false,
  211. pagination: {
  212. defaultCurrent: 1,
  213. defaultPageSize: 10,
  214. showQuickJumper: true,
  215. pageSize: 10,
  216. onChange: function (page) {
  217. this.loadData(page);
  218. }.bind(this),
  219. showTotal: function (total) {
  220. return '共' + total + '条数据';
  221. }
  222. },
  223. //业务意向列表
  224. intentionList:[{
  225. title: '高新',
  226. dataIndex: 'name',
  227. render: (text, record, index) => {
  228. return <Select value={record.name} onChange={(e) => { record.name=e; this.setState({ data: this.state.data }); }}>
  229. <Select.Option value="0" >否</Select.Option>
  230. <Select.Option value="1" >是</Select.Option>
  231. </Select>
  232. }
  233. },{
  234. title: '最新进度',
  235. dataIndex: 'mobile2',
  236. key: 'mobile2',
  237. render: (text, record, index) => {
  238. return <Select value={record.mobile2} onChange={(e) => { record.mobile2 = e; this.setState({ data: this.state.data }); }}>
  239. {
  240. newFollow.map(function (item) {
  241. return <Select.Option key={item.value} >{item.key}</Select.Option>
  242. })
  243. }
  244. </Select>
  245. }
  246. },{
  247. title: '最新状态',
  248. dataIndex: 'mobile3',
  249. key: 'mobile3',
  250. render: (text, record, index) => {
  251. return <Select value={record.mobile3} onChange={(e) => { record.mobile3 = e; this.setState({ data: this.state.data }); }}>
  252. {
  253. customerStatus.map(function (item) {
  254. return <Select.Option key={item.value} >{item.key}</Select.Option>
  255. })
  256. }
  257. </Select>
  258. }
  259. },{
  260. title: '跟进说明',
  261. dataIndex: 'mobile4',
  262. key: 'mobile4',
  263. render: (text, record, index) => {
  264. return <Input value={record.mobile4}
  265. onChange={(e) => { record.mobile4 = e.target.value; this.setState({ data: this.state.data }); }}
  266. style={{width:'120px'}}/>
  267. }
  268. },{
  269. title: '操作',
  270. dataIndex: 'rrr',
  271. key: 'rrr',
  272. render: (text, record, index) => {
  273. return <div>
  274. <Button type="primary" onClick={(e)=>{this.intentionModify(record)}} style={{marginRight:'10px'}}>保存</Button>
  275. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
  276. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  277. </Popconfirm>
  278. </div>
  279. }
  280. }
  281. ],
  282. businessIntentionList:[{
  283. title: '意向时间',
  284. dataIndex: 'name',
  285. key: 'name'
  286. },{
  287. title: '客户名称',
  288. dataIndex: 'mobile2',
  289. key: 'mobile2'
  290. },{
  291. title: '业务名',
  292. dataIndex: 'mobile3',
  293. key: 'mobile3'
  294. }
  295. ,{
  296. title: '营销员',
  297. dataIndex: 'mobile4',
  298. key: 'mobile4'
  299. },{
  300. title: '业务意向进度',
  301. dataIndex: 'mobile5',
  302. key: 'mobile5'
  303. },{
  304. title: '客户状态',
  305. dataIndex: 'mobile6',
  306. key: 'mobile6'
  307. },{
  308. title: '操作',
  309. dataIndex: 'ooo',
  310. key: 'ooo',
  311. render:(text,record) =>{return (<Button onClick={(e)=>{this.businessIntentionDetails(record)}}>查看</Button>)}
  312. }
  313. ],
  314. businessFollowList:[{
  315. title: '跟进时间',
  316. dataIndex: 'name',
  317. key: 'name'
  318. },{
  319. title: '营销员',
  320. dataIndex: 'mobile2',
  321. key: 'mobile2'
  322. },{
  323. title: '业务意向进度',
  324. dataIndex: 'mobile3',
  325. key: 'mobile3'
  326. }
  327. ,{
  328. title: '客户状态',
  329. dataIndex: 'mobile4',
  330. key: 'mobile4'
  331. },{
  332. title: '拜访方式',
  333. dataIndex: 'mobile5',
  334. key: 'mobile5'
  335. },{
  336. title: '联系人',
  337. dataIndex: 'mobile6',
  338. key: 'mobile6'
  339. },{
  340. title: '联系电话',
  341. dataIndex: 'mobile7',
  342. key: 'mobile7'
  343. },{
  344. title: '操作',
  345. dataIndex: 'ooo',
  346. key: 'ooo',
  347. render:(text,record) =>{return (<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看</Button>)}
  348. }
  349. ],
  350. visitsList:[{
  351. title: '拜访时间',
  352. dataIndex: 'followTime',
  353. key: 'followTime'
  354. },{
  355. title: '客户名称',
  356. dataIndex: 'identityName',
  357. key: 'identityName'
  358. },{
  359. title: '拜访方式',
  360. dataIndex: 'contactType',
  361. key: 'contactType'
  362. }
  363. ,{
  364. title: '联系人',
  365. dataIndex: 'contacts',
  366. key: 'contacts'
  367. },{
  368. title: '联系电话',
  369. dataIndex: 'contactMobile',
  370. key: 'contactMobile'
  371. },{
  372. title: '拜访人',
  373. dataIndex: 'adminName',
  374. key: 'adminName'
  375. },{
  376. title: '拜访说明',
  377. dataIndex: 'result',
  378. key: 'result'
  379. },{
  380. title: '操作',
  381. dataIndex: 'ttt',
  382. key: 'ttt',
  383. render: (text, record, index) => {
  384. return <div>
  385. <Button type="primary" onClick={(e)=>{this.visitModify(record)}} style={{marginRight:'10px'}}>修改</Button>
  386. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
  387. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  388. </Popconfirm>
  389. </div>
  390. }
  391. }
  392. ],
  393. ContactsList:[{
  394. title: '姓名',
  395. dataIndex: 'name',
  396. key: 'name',
  397. render: (text, record, index) => {
  398. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  399. }
  400. },{
  401. title: '联系人部门',
  402. dataIndex: 'mobile1',
  403. key: 'mobile1',
  404. render: (text, record, index) => {
  405. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  406. }
  407. },{
  408. title: '联系人职务',
  409. dataIndex: 'mobile2',
  410. key: 'mobile2',
  411. render: (text, record, index) => {
  412. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  413. }
  414. },{
  415. title: '手机号码',
  416. dataIndex: 'mobile3',
  417. key: 'mobile3',
  418. render: (text, record, index) => {
  419. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  420. }
  421. },{
  422. title: '固定电话',
  423. dataIndex: 'mobile4',
  424. key: 'mobile4',
  425. render: (text, record, index) => {
  426. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  427. }
  428. },{
  429. title: '联系人QQ',
  430. dataIndex: 'mobile5',
  431. key: 'mobile5',
  432. render: (text, record, index) => {
  433. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  434. }
  435. },{
  436. title: '电子邮箱',
  437. dataIndex: 'mobile6',
  438. key: 'mobile6',
  439. render: (text, record, index) => {
  440. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  441. }
  442. },{
  443. title: '营销员',
  444. dataIndex: 'mobile7',
  445. key: 'mobile7',
  446. render: (text, record, index) => {
  447. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  448. }
  449. },{
  450. title: '备注',
  451. dataIndex: 'mobile8',
  452. key: 'mobile8',
  453. render: (text, record, index) => {
  454. return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
  455. }
  456. },{
  457. title: '操作',
  458. dataIndex: 'dels',
  459. key: 'dels',
  460. render: (text, record, index) => {
  461. return <div>
  462. <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
  463. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  464. </Popconfirm>
  465. <Button type="primary" onClick={(e)=>{this.ContactsListSave(record)}}>保存</Button>
  466. </div>
  467. }
  468. }
  469. ],
  470. columnsman:[{
  471. title: '姓名',
  472. dataIndex: 'name',
  473. key: 'name'
  474. },{
  475. title: '手机号码',
  476. dataIndex: 'mobile',
  477. key: 'mobile'
  478. }
  479. ],
  480. columns: [
  481. {
  482. title: '客户名称',
  483. dataIndex: 'name',
  484. key: 'name',
  485. }, {
  486. title: '客户类型',
  487. dataIndex: 'type',
  488. key: 'type',
  489. render: text => { return getcustomerTyp(text) }
  490. }, {
  491. title: '地区',
  492. dataIndex: 'locationProvince',
  493. key: 'locationProvince',
  494. }, {
  495. title: '联系人',
  496. dataIndex: 'contacts',
  497. key: 'contacts',
  498. },
  499. {
  500. title: '联系电话',
  501. dataIndex: 'contactMobile',
  502. key:'contactMobile',
  503. },
  504. {
  505. title: '行业',
  506. dataIndex: 'industry',
  507. key: 'industry',
  508. //render: text => { return getcustomerStatue(text) }
  509. },
  510. {
  511. title: '创建时间',
  512. dataIndex: 'createTime',
  513. key: 'createTime',
  514. },
  515. {
  516. title: '业务认证',
  517. dataIndex: 'serviceCertification',
  518. key: 'serviceCertification',
  519. render: text => { return getCertification(text) }
  520. },
  521. {
  522. title: '实名认证',
  523. dataIndex: 'userCertification',
  524. key: 'userCertification',
  525. render: text => { return getCertification(text) }
  526. },
  527. {
  528. title: '是否高新',
  529. dataIndex: 'highTechZone',
  530. key: 'highTechZone',
  531. render: text => { return getWhether(text) }
  532. },{
  533. title: '是否上市',
  534. dataIndex: 'listed',
  535. key: 'listed',
  536. render: text => { return getWhether(text) }
  537. },
  538. {
  539. title: '是否国际',
  540. dataIndex: 'international',
  541. key: 'international',
  542. render: text => { return getWhether(text) }
  543. },
  544. {
  545. title: '会员等级',
  546. dataIndex: 'lvl',
  547. key: 'lvl',
  548. render:text => {return getLvl(text)}
  549. },
  550. {
  551. title: '会员状态',
  552. dataIndex: 'currentMemberStatus',
  553. key: 'currentMemberStatus',
  554. render:text => {return getCurrentMember(text)}
  555. },
  556. {
  557. title: '操作',
  558. dataIndex: 'abc',
  559. key: 'abc',
  560. render: (text, record, index) => {
  561. return <div>
  562. <Button onClick={(e) =>{ e.stopPropagation(), this.visit(record) }} type="primary">拜访</Button>
  563. </div>
  564. }
  565. }
  566. ],
  567. dataman:[],
  568. dataSource: [],
  569. visitArrList:[],
  570. searchTime: [,]
  571. };
  572. },
  573. //更多操作
  574. ModalOperation(){
  575. this.setState({
  576. visible: true,
  577. });
  578. },
  579. //拜访
  580. visit(e){
  581. this.setState({
  582. visitModul:true
  583. })
  584. console.log(e)
  585. },
  586. //列表删除功能
  587. delectRow() {
  588. let deletedIds;
  589. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  590. let rowItem = this.state.selectedRows[idx];
  591. if (rowItem.id) {
  592. deletedIds=rowItem.id;
  593. };
  594. };
  595. this.setState({
  596. selectedRowKeys: [],
  597. });
  598. $.ajax({
  599. method: "get",
  600. dataType: "json",
  601. crossDomain: false,
  602. url: globalConfig.context + "/api/admin/customer/deleteCustomer",
  603. data: {
  604. id: deletedIds,//删除的ID
  605. }
  606. }).done(function (data) {
  607. if (!data.error.length) {
  608. message.success('删除成功!');
  609. this.setState({
  610. loading: false,
  611. });
  612. } else {
  613. message.warning(data.error[0].message);
  614. };
  615. this.loadData();
  616. }.bind(this));
  617. },
  618. //指定转交人的点击函数
  619. showModa(){
  620. this.setState({
  621. visible: true,
  622. });
  623. this.setState({
  624. selectedRowKey:[],
  625. });
  626. this.setState({
  627. selectedRowKeys:this.state.selectedRowKeys,
  628. });
  629. let changeIds;
  630. let adminName;
  631. let customerStatus;
  632. let companyIntention;
  633. let followSituation;
  634. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  635. let rowItem = this.state.selectedRows[idx];
  636. if (rowItem.id) {
  637. changeIds=rowItem.id;
  638. adminName=rowItem.adminName;
  639. customerStatus=rowItem.customerStatus;
  640. companyIntention=rowItem.companyIntention;
  641. followSituation=rowItem.followSituation;
  642. };
  643. };
  644. $.ajax({
  645. method: "post",
  646. dataType: "json",
  647. crossDomain: false,
  648. url: globalConfig.context + "/api/admin/customer/findAdmin",
  649. data: {
  650. id: changeIds,//这一行数据的ID
  651. beforeCompanyIntention:companyIntention,//意向服务
  652. beforeCustomerStatus:customerStatus,//客户状态
  653. beforeFollowSituation:followSituation,//最新跟进状态
  654. beforeAdminName:adminName,//跟进人
  655. }
  656. }).done(function (data) {
  657. if (data.error && data.error.length) {
  658. message.warning(data.error[0].message);
  659. } else {
  660. let theAssigne = [];
  661. if (!data.data) {
  662. if (data.error && data.error.length) {
  663. message.warning(data.error[0].message);
  664. };
  665. } else {
  666. for (let i = 0; i < data.data.length; i++) {
  667. let thisdata = data.data[i];
  668. //处理数据 进行循环
  669. theAssigne.push({
  670. name: thisdata.name,
  671. id: thisdata.id,
  672. ids: thisdata.cid,
  673. mobile:thisdata.mobile,
  674. adminName: thisdata.beforeAdminName,
  675. customerStatus: thisdata.beforeCustomerStatus,
  676. companyIntention: thisdata.beforeCompanyIntention,
  677. followSituation: thisdata.beforeFollowSituation,
  678. });
  679. };
  680. };
  681. this.setState({
  682. dataman: theAssigne,
  683. paginations:false
  684. });
  685. }
  686. }.bind(this));
  687. },
  688. //选择了指定人之后的保存点击函数,需要修改函数
  689. changeAssigner() {
  690. this.setState({
  691. visible: false,
  692. });
  693. this.setState({
  694. selectedRowKeys:[],
  695. });
  696. let datt=this.state.selectedRow;
  697. $.ajax({
  698. method: "post",
  699. dataType: "json",
  700. crossDomain: false,
  701. url: globalConfig.context + "/api/admin/customer/transferCustomer",
  702. data: {
  703. id: datt[0].ids,//这一行数据的ID
  704. aid:datt[0].id,//指定转交人的ID
  705. beforeAdminName:datt[0].adminName,//之前的跟进人
  706. adminName:datt[0].name,//转交的跟进人
  707. }
  708. }).done(function (data) {
  709. if (!data.error.length) {
  710. message.success('转交成功!');
  711. this.setState({
  712. loading: false,
  713. });
  714. } else {
  715. message.warning(data.error[0].message);
  716. };
  717. this.loadData();
  718. }.bind(this));
  719. },
  720. //转为公共客户
  721. changeRow() {
  722. let deletedIds;
  723. let adminName;
  724. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  725. let rowItem = this.state.selectedRows[idx];
  726. if (rowItem.id) {
  727. deletedIds=rowItem.id;
  728. adminName=rowItem.adminName;
  729. };
  730. };
  731. this.setState({
  732. selectedRowKeys: [],
  733. });
  734. $.ajax({
  735. method: "get",
  736. dataType: "json",
  737. crossDomain: false,
  738. url: globalConfig.context + "/api/admin/customer/transferToPublic",
  739. data: {
  740. id: deletedIds,
  741. beforeAdminName:adminName,
  742. }
  743. }).done(function (data) {
  744. if (!data.error.length) {
  745. message.success('已转为公共客户!');
  746. this.setState({
  747. loading: false,
  748. });
  749. } else {
  750. message.warning(data.error[0].message);
  751. };
  752. this.loadData();
  753. }.bind(this));
  754. },
  755. getOrgCodeUrl(e) {
  756. this.setState({ orgCodeUrl: e });
  757. },
  758. getCompanyLogoUrl(e) {
  759. this.setState({ companyLogoUrl: e });
  760. },
  761. componentWillMount() {
  762. //城市
  763. let Province = [];
  764. provinceList.map(function (item) {
  765. var id=item.id.toString()
  766. Province.push(
  767. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  768. )
  769. });
  770. //意向服务
  771. let intentionalArr = [];
  772. intentionalService.map(function (item) {
  773. intentionalArr.push(
  774. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  775. )
  776. });
  777. //会员等级
  778. let lvlArr = [];
  779. lvl.map(function (item) {
  780. lvlArr.push(
  781. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  782. )
  783. });
  784. //会员状态customerStatus
  785. let currentMemberArr = [];
  786. currentMember.map(function (item) {
  787. currentMemberArr.push(
  788. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  789. )
  790. });
  791. //客户状态
  792. let customerStatusArr = [];
  793. customerStatus.map(function (item) {
  794. customerStatusArr.push(
  795. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  796. )
  797. });
  798. this.state.Provinces = Province;
  799. this.state.intentionalOption = intentionalArr;
  800. this.state.lvlArrOption = lvlArr;
  801. this.state.currentMemberArrOption = currentMemberArr;
  802. this.state.customerStatusArrOption = customerStatusArr;
  803. this.loadData();
  804. },
  805. addClick() {
  806. this.state.RowData={};
  807. this.setState({
  808. showDesc: true,
  809. });
  810. },
  811. newmodal(e){
  812. if(e){
  813. this.tableRowClick();
  814. }
  815. },
  816. closeDesc(e, s) {
  817. this.state.showDesc = e;
  818. if (s) {
  819. this.loadData();
  820. };
  821. },
  822. search() {
  823. this.loadData();
  824. },
  825. reset() {
  826. this.state.typeSearch=undefined; //名称1
  827. this.state.nameSearch='';
  828. this.state.provinceSearch=undefined;
  829. this.state.citySearch=undefined;
  830. this.state.statusSearch=undefined;
  831. this.state.contactsSearch=undefined;
  832. this.state.contactMobileSearch=undefined;
  833. this.state.industrySearch=undefined;
  834. this.state.serviceCertificationSearch=undefined;
  835. this.state.userCertificationSearch=undefined;
  836. this.state.currentMemberStatusSearch=undefined;
  837. this.state.lvlSearch=undefined;
  838. this.state.listedSearch=undefined;
  839. this.state.highTechZoneSearch=undefined;
  840. this.state.releaseDate[0]=undefined;
  841. this.state.releaseDate[1]=undefined;
  842. this.loadData();
  843. },
  844. searchSwitch() {
  845. this.setState({
  846. searchMore: !this.state.searchMore
  847. });
  848. },
  849. //详情保存函数
  850. detailsSubmint(){
  851. this.setState({
  852. modal5Visible:false,
  853. })
  854. },
  855. //整行点击
  856. tableRowClick(record, index) {
  857. this.state.RowData = record;
  858. console.log(record)
  859. this.detailsModalOk(record);
  860. this.setState({
  861. selectedRowKeys:[],
  862. rowId:record.id,
  863. })
  864. },
  865. //基本信息提交
  866. newSubmit(e){
  867. e.preventDefault();
  868. this.state.data=[];
  869. this.setState({
  870. selectedRowKeys: [],
  871. });
  872. this.props.form.validateFields((err, values) => {
  873. let theorgCodeUrl = [];
  874. if (this.state.orgCodeUrl.length) {
  875. let picArr = [];
  876. this.state.orgCodeUrl.map(function (item) {
  877. picArr.push(item.response.data);
  878. });
  879. theorgCodeUrl = picArr.join(",");
  880. };
  881. let thecompanyLogoUrl = [];
  882. if (this.state.companyLogoUrl.length) {
  883. let picArr = [];
  884. this.state.companyLogoUrl.map(function (item) {
  885. picArr.push(item.response.data);
  886. });
  887. thecompanyLogoUrl = picArr.join(",");
  888. };
  889. if (!err) {
  890. this.setState({
  891. loading: true
  892. });
  893. $.ajax({
  894. method: "post",
  895. dataType: "json",
  896. url:globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  897. data: {
  898. id:this.state.InformationId,
  899. uid: this.state.InformationUid,
  900. societyTag:values.societyTag,
  901. introduction:values.introduction,
  902. unitName:this.state.unitName,
  903. industry:this.state.industry,
  904. locationProvince:values.ProvinceCity?values.ProvinceCity[0]:'',//省-
  905. locationCity:values.ProvinceCity?values.ProvinceCity[1]:'',//市
  906. locationArea:values.ProvinceCity?values.ProvinceCity[2]:'',//区
  907. postalAddress:values.postalAddress,
  908. contactsFixedTel:values.contactsFixedTel,
  909. contactsFax:values.contactsFax,
  910. registeredCapital:values.registeredCapital,
  911. enterpriseScale:values.enterpriseScale,
  912. legalPerson:values.legalPerson,
  913. legalPersonIdCard:values.legalPersonIdCard,
  914. legalPersonTel:values.legalPersonTel,
  915. legalPersonEmail:values.legalPersonEmail,
  916. highTechZone:this.state.highTechZone,
  917. listed:this.state.listed,
  918. orgCode:values.orgCode,
  919. businessScope:values.businessScope,
  920. introduction:values.introduction,
  921. companyLogoUrl:thecompanyLogoUrl,
  922. orgCodeUrl:theorgCodeUrl,
  923. }
  924. }).done(function (data) {
  925. this.setState({
  926. loading: false
  927. });
  928. if (!data.error.length) {
  929. message.success('保存成功!');
  930. this.detailsModal()
  931. this.loadData();
  932. } else {
  933. message.warning(data.error[0].message);
  934. }
  935. }.bind(this));
  936. }
  937. })
  938. },
  939. //点击整行查看详情
  940. //查看基本详情基本信息
  941. loadInformation(record){
  942. this.RowClick;
  943. $.ajax({
  944. method: "get",
  945. dataType: "json",
  946. crossDomain: false,
  947. url: globalConfig.context + '/api/admin/customer/findOrganizationCustomerDetail',
  948. data: {
  949. uid: record
  950. },
  951. success: function (data) {
  952. let thisData = data.data;
  953. if (!thisData) {
  954. if (data.error && data.error.length) {
  955. message.warning(data.error[0].message);
  956. };
  957. thisData = {};
  958. };
  959. let ProvinceCityArr=[];
  960. let ProvinceS=getprovince(thisData.locationProvince);
  961. let citys=getprovince(thisData.locationCity);
  962. let Areas=getprovince(thisData.locationArea);
  963. ProvinceCityArr.push(ProvinceS,citys,Areas)
  964. console.log(ProvinceCityArr)
  965. this.setState({
  966. InformationId:thisData.id,
  967. InformationUid:thisData.uid,
  968. unitName:thisData.unitName,
  969. listed:thisData.listed,
  970. highTechZone:thisData.highTechZone,
  971. orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
  972. companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
  973. dataInformation:thisData,
  974. ProvinceCity:ProvinceCityArr,
  975. industry:(thisData.industry).toString(),
  976. });
  977. }.bind(this),
  978. }).always(function () {
  979. this.setState({
  980. loading: false
  981. });
  982. }.bind(this));
  983. },
  984. //tab3账户信息请求数据
  985. httpAccount(record){
  986. this.RowClick;
  987. $.ajax({
  988. method: "get",
  989. dataType: "json",
  990. crossDomain: false,
  991. url: globalConfig.context + '/api/admin/customer/findUserAccountDetail',
  992. data: {
  993. uid: record
  994. },
  995. success: function (data) {
  996. let thisData = data.data;
  997. if (!thisData) {
  998. if (data.error && data.error.length) {
  999. message.warning(data.error[0].message);
  1000. };
  1001. thisData = {};
  1002. };
  1003. let sourcecustomer=''
  1004. switch((thisData.source).toString()){
  1005. case '0':
  1006. sourcecustomer='注册客户'
  1007. break;
  1008. case '1':
  1009. sourcecustomer='录入客户'
  1010. break;
  1011. }
  1012. console.log(thisData)
  1013. this.setState({
  1014. Accountuid:thisData.id,
  1015. mobile:thisData.mobile,
  1016. nickname:thisData.nickname,
  1017. email:thisData.email,
  1018. type:getcustomerTyp(thisData.type),
  1019. source:sourcecustomer,
  1020. isMember:thisData.isMember,
  1021. currentMemberStatus:(thisData.currentMemberStatus).toString(),
  1022. lvl:(thisData.lvl).toString(),
  1023. serviceCertification:thisData.serviceCertification,
  1024. status:(thisData.status).toString(),
  1025. userCertification:thisData.userCertification,
  1026. createTimes:thisData.createTimes,
  1027. });
  1028. }.bind(this),
  1029. }).always(function () {
  1030. this.setState({
  1031. loading: false
  1032. });
  1033. }.bind(this));
  1034. },
  1035. detailsModalOk(e) {
  1036. this.setState({ modal5Visible:true });//需要一个请求数据
  1037. this.loadInformation(e.id)
  1038. },
  1039. //点击消失函数
  1040. detailsModal(e) {
  1041. this.setState({
  1042. modal5Visible:false
  1043. });
  1044. },
  1045. //拜访modul函数
  1046. visitOk(e) {
  1047. this.setState({
  1048. visitModul:false
  1049. });
  1050. },
  1051. visitCancel(e) {
  1052. this.setState({
  1053. visitModul:false
  1054. });
  1055. },
  1056. //拜访保存函数
  1057. visitSubmit(){
  1058. this.setState({
  1059. visitModul:false,
  1060. })
  1061. },
  1062. //根据获取的联系人获取到电话号码函数
  1063. hundleName(e){
  1064. let changNub=this.state.telNumArr[e];
  1065. this.setState({
  1066. lastname:e,
  1067. nub:changNub.mobile
  1068. })
  1069. },
  1070. //tab中列表点击修改拜访详情
  1071. //获取拜访详情ajax
  1072. loadVisit(pageNo) {
  1073. this.state.data = [];
  1074. this.setState({
  1075. loading: true
  1076. });
  1077. $.ajax({
  1078. method: "post",
  1079. dataType: "json",
  1080. crossDomain: false,
  1081. url:globalConfig.context + '/api/admin/customer/listFollowHistory',
  1082. data: {
  1083. pageNo: pageNo || 1,
  1084. pageSize: this.state.pagination.pageSize,
  1085. uid: this.state.rowId, //名称1
  1086. },
  1087. success: function (data) {
  1088. let theArr = [];
  1089. if (data.error.length || data.data.list=="") {
  1090. if (data.error && data.error.length) {
  1091. message.warning(data.error[0].message);
  1092. };
  1093. } else {
  1094. for (let i = 0; i < data.data.list.length; i++) {
  1095. let thisdata = data.data.list[i];
  1096. theArr.push({
  1097. followId:thisdata.followId,
  1098. followTime:thisdata.followTime,
  1099. identityName:thisdata.identityName,
  1100. contacts:thisdata.contacts,
  1101. contactMobile:thisdata.contactMobile,
  1102. result:thisdata.result,
  1103. adminName:thisdata.adminName,
  1104. contactType:thisdata.contactType
  1105. });
  1106. };
  1107. this.state.pagination.current = data.data.pageNo;
  1108. this.state.pagination.total = data.data.totalCount;
  1109. };
  1110. this.setState({
  1111. visitArrList: theArr,
  1112. pagination: this.state.pagination
  1113. });
  1114. }.bind(this),
  1115. }).always(function () {
  1116. this.setState({
  1117. loading: false
  1118. });
  1119. }.bind(this));
  1120. },
  1121. visitModify(e){
  1122. this.setState({
  1123. visitModul:true,
  1124. })
  1125. this.getNewWoman(e);
  1126. },
  1127. //拜访记录删除
  1128. visitDelet(e){
  1129. console.log(e)
  1130. },
  1131. //顶部搜索省份函数
  1132. onChange(value, selectedOptions) {
  1133. this.setState({
  1134. addressSearch:selectedOptions
  1135. });
  1136. },
  1137. //修改密码Modul
  1138. modifyPassworld(){
  1139. this.setState({
  1140. passworldModul:true
  1141. });
  1142. },
  1143. passworldOk(e) {
  1144. this.setState({
  1145. passworldModul:false
  1146. });
  1147. },
  1148. passworldCancel(e) {
  1149. this.setState({
  1150. passworldModul:false
  1151. });
  1152. },
  1153. //修改密码保存
  1154. passworldSubmit(e){
  1155. e.preventDefault();
  1156. this.passworldCancel()
  1157. },
  1158. //新增联系人
  1159. addcontactModulOK(){
  1160. this.setState({
  1161. addcontactModul:false
  1162. });
  1163. },
  1164. addcontactModulcancel(){
  1165. this.setState({
  1166. addcontactModul:false
  1167. });
  1168. },
  1169. //点击新增详情
  1170. newContacts(){
  1171. this.setState({
  1172. addcontactModul:true
  1173. });
  1174. },
  1175. //新增联系人保存函数
  1176. submitcontactman(e){
  1177. e.preventDafault();
  1178. },
  1179. //获取联系人下拉框
  1180. getNewWoman(ids) {
  1181. console.log(ids);
  1182. this.state.data = []
  1183. $.ajax({
  1184. method: "get",
  1185. dataType: "json",
  1186. crossDomain: false,
  1187. url: globalConfig.context + "/api/admin/customer/findCustomerUserList",
  1188. data:{
  1189. uid:ids.id,
  1190. },
  1191. success: function (data) {
  1192. let theArr = [];
  1193. let thedata=data.data;
  1194. if (!thedata) {
  1195. if (data.error && data.error.length) {
  1196. message.warning(data.error[0].message);
  1197. };
  1198. thedata = {};
  1199. };
  1200. thedata.map(function (item,index) {
  1201. theArr.push(<Select.Option value={index}>{item.name}</Select.Option>)
  1202. });
  1203. let telNum=thedata.telNum;
  1204. this.setState({
  1205. telNumArr:thedata,
  1206. orderStatusOption: theArr,
  1207. });
  1208. }.bind(this),
  1209. }).always(function () {
  1210. this.setState({
  1211. loading: false
  1212. });
  1213. }.bind(this));
  1214. },
  1215. //意向服务列表修改保存
  1216. intentionModify(e){
  1217. console.log(e)
  1218. },
  1219. //意向服务列表单个删除
  1220. intentionDelet(e){
  1221. console.log(e)
  1222. },
  1223. //tab5意向业务
  1224. //意向业务查看列表单个详情
  1225. businessIntentionDetails(e){
  1226. this.setState({
  1227. businessModul:true
  1228. })
  1229. },
  1230. businessIntentionOk(){
  1231. this.setState({
  1232. businessModul:false
  1233. })
  1234. },
  1235. businessIntentionCancel(){
  1236. this.setState({
  1237. businessModul:false
  1238. })
  1239. },
  1240. //业务跟进查看跟多
  1241. businessFollowDetails(e){
  1242. this.setState({
  1243. businessFollowModul:true
  1244. })
  1245. },
  1246. businessFollowOk(e){
  1247. this.setState({
  1248. businessFollowModul:false
  1249. })
  1250. },
  1251. businessFollowCancel(e){
  1252. this.setState({
  1253. businessFollowModul:false
  1254. })
  1255. },
  1256. //详情tab切换数据处理
  1257. callback(e){
  1258. if(e==1){
  1259. this.loadInformation(this.state.rowId)
  1260. }
  1261. if(e==2){
  1262. }
  1263. if(e==3){
  1264. this.httpAccount(this.state.rowId)
  1265. }
  1266. if(e==4){
  1267. this.loadVisit()
  1268. }
  1269. if(e==5){
  1270. }
  1271. if(e==6){
  1272. }
  1273. if(e==7){
  1274. }
  1275. if(e==8){
  1276. }
  1277. if(e==9){
  1278. }
  1279. },
  1280. //账户信息保存
  1281. accountSave(e){
  1282. e.preventDefault();
  1283. this.state.data=[];
  1284. this.setState({
  1285. selectedRowKeys: [],
  1286. });
  1287. this.setState({
  1288. loading: true
  1289. });
  1290. $.ajax({
  1291. method: "post",
  1292. dataType: "json",
  1293. url:globalConfig.context + '/api/admin/customer/updateUserAccount',
  1294. data: {
  1295. id: this.state.Accountuid,
  1296. mobile: this.state.mobile,
  1297. nickname: this.state.nickname,
  1298. email: this.state.email,
  1299. isMember: this.state.isMember,
  1300. currentMemberStatus: this.state.currentMemberStatus,
  1301. serviceCertification: this.state.serviceCertification,
  1302. userCertification: this.state.userCertification,
  1303. lvl:this.state.lvl,
  1304. status:this.state.status,
  1305. }
  1306. }).done(function (data) {
  1307. this.setState({
  1308. loading: false
  1309. });
  1310. if (!data.error.length) {
  1311. message.success('保存成功!');
  1312. this.detailsModal();
  1313. this.loadData();
  1314. } else {
  1315. message.warning(data.error[0].message);
  1316. }
  1317. }.bind(this));
  1318. },
  1319. //列表详情tab2联系人新建
  1320. addContact(){
  1321. // this.state.data.push({
  1322. // name: '',
  1323. // });
  1324. //
  1325. // this.setState({
  1326. // data: this.state.data
  1327. // })
  1328. },
  1329. //删除
  1330. confirmDelet(e){
  1331. console.log(e)
  1332. },
  1333. //保存
  1334. ContactsListSave(e){
  1335. console.log(e)
  1336. },
  1337. //
  1338. componentWillReceiveProps(nextProps) {
  1339. if (!this.props.visible && nextProps.visible) {
  1340. if (nextProps.data && nextProps.data.id) {
  1341. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  1342. };
  1343. this.state.data = {};
  1344. this.state.companyLogoUrl = [];
  1345. this.state.orgCodeUrl = [];
  1346. };
  1347. },
  1348. render() {
  1349. const FormItem = Form.Item
  1350. const rowSelection = {
  1351. selectedRowKeys: this.state.selectedRowKeys,
  1352. onChange: (selectedRowKeys, selectedRows) => {
  1353. this.setState({
  1354. selectedRows: selectedRows.slice(-1),
  1355. selectedRowKeys: selectedRowKeys.slice(-1)
  1356. });
  1357. },
  1358. onSelect: (recordt, selected, selectedRows) => {
  1359. this.setState({
  1360. recordt:recordt.id
  1361. })
  1362. },
  1363. };
  1364. const rowSelections = {
  1365. selectedRowKeys: this.state.selectedRowKey,
  1366. onChange: (selectedRowKey, selectedRow) => {
  1367. this.setState({
  1368. selectedRow: selectedRow.slice(-1),
  1369. selectedRowKey: selectedRowKey.slice(-1)
  1370. });
  1371. },
  1372. onSelect: (records, selected, selectedRow) => {
  1373. this.setState({
  1374. selectedRow: selectedRow.slice(-1),
  1375. records:records.id,
  1376. })
  1377. },
  1378. };
  1379. const hasSelected = this.state.selectedRowKeys.length > 0;
  1380. const { RangePicker } = DatePicker;
  1381. const { getFieldDecorator } = this.props.form;
  1382. const formItemLayout = {
  1383. labelCol: { span: 8 },
  1384. wrapperCol: { span: 14 },
  1385. };
  1386. //const theDatak = this.state.datak || {};
  1387. const theInformation=this.state.dataInformation || {}
  1388. const contactsOption="";
  1389. const formItemLayput = {
  1390. labelCol: { span: 10 },
  1391. wrapperCol: { span: 14 },
  1392. };
  1393. return (
  1394. <div className="user-content" >
  1395. <div className="content-title">
  1396. <span>我的客户</span>
  1397. </div>
  1398. <div className="user-search">
  1399. <Input placeholder="公司名称"
  1400. value={this.state.nameSearch}
  1401. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  1402. <Select placeholder="省"
  1403. style={{ width: 80 }}
  1404. value={this.state.provinceSearch}
  1405. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  1406. {this.state.Provinces}
  1407. </Select>
  1408. <span style={{marginRight:'10px'}}>
  1409. {getFieldDecorator('addressSearch', {
  1410. initialValue: this.state.addressSearch
  1411. })(
  1412. <Cascader options={citySelect()} placeholder="详细地址" onChange={this.onChange}/>
  1413. )}
  1414. </span>
  1415. <Button type="primary" onClick={this.search}>搜索</Button>
  1416. <Button onClick={this.reset}>重置</Button>
  1417. <Button disabled onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }}>下载批量导入模板</Button>
  1418. <Upload
  1419. name="file"
  1420. action={globalConfig.context + "/api/admin/customer/uploadExcel"}
  1421. beforeUpload={beforeUploadFile}
  1422. showUploadList={false}
  1423. onChange={(info) => {
  1424. if (info.file.status !== 'uploading') {
  1425. console.log(info.file, info.fileList);
  1426. }
  1427. if (info.file.status === 'done') {
  1428. if (!info.file.response.error.length) {
  1429. message.success(`${info.file.name} 文件上传成功!`);
  1430. this.loadData();
  1431. } else {
  1432. message.warning(info.file.response.error[0].message);
  1433. return;
  1434. };
  1435. } else if (info.file.status === 'error') {
  1436. message.error(`${info.file.name} 文件上传失败。`);
  1437. };
  1438. }} >
  1439. <Button>上传批量内容</Button>
  1440. </Upload>
  1441. <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
  1442. disabled={!hasSelected}
  1443. onClick={this.delectRow}>删除<Icon type="minus" />
  1444. </Button>
  1445. <Button type="primary" onClick={this.showModa} disabled={!hasSelected}>指定转交人</Button>
  1446. <Modal
  1447. footer=''
  1448. title="选择指定人"
  1449. visible={this.state.visible}
  1450. onOk={this.handleOk}
  1451. onCancel={this.handleCancel}
  1452. >
  1453. <Spin spinning={this.state.loading}>
  1454. <Table
  1455. scroll={{y:'350px'}}
  1456. pagination={this.state.paginations}
  1457. columns={this.state.columnsman}
  1458. rowSelection={rowSelections}
  1459. dataSource={this.state.dataman}
  1460. />
  1461. <FormItem wrapperCol={{ span: 12, offset: 12 }} style={{marginTop:'15px'}}>
  1462. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:"50px"}} onClick={this.changeAssigner }>保存</Button>
  1463. <Button className="set-submit" type="ghost" onClick={this.handleCancel } style={{marginLeft:"30px"}} id='change_rem'>取消</Button>
  1464. </FormItem>
  1465. </Spin>
  1466. </Modal>
  1467. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  1468. disabled={!hasSelected}
  1469. onClick={this.changeRow}>转为公共客户<Icon /></Button>
  1470. <Button style={{marginRight:'10px',background: "#595a5c", border: "none",color: "#fff" }}
  1471. disabled={!hasSelected}
  1472. onClick={this.delectRow}>锁定
  1473. </Button>
  1474. <Button style={{marginRight:'10px',background: "#11a2c6", border: "none",color: "#fff" }}
  1475. disabled={!hasSelected}
  1476. onClick={this.delectRow}>激活
  1477. </Button>
  1478. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1479. <Button type="primary" className="addButton" onClick={this.addClick}>新增客户<Icon type="plus" /></Button>
  1480. <div className='clearfix' style={{marginTop:'5px'}}>
  1481. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1482. <RangePicker
  1483. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1484. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1485. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1486. <Select placeholder="客户类型" style={{ width: 100 }}
  1487. value={this.state.typeSearch }
  1488. onChange={(e) => { this.setState({ typeSearch : e }) }}>
  1489. <Select.Option value="0" >个人客户</Select.Option>
  1490. <Select.Option value="1" >单位客户</Select.Option>
  1491. </Select>
  1492. <Select placeholder="客户状态"
  1493. style={{ width: 100 }}
  1494. value={this.state.statusSearch}
  1495. onChange={(e) => { this.setState({ statusSearch: e }) }}>
  1496. {this.state.customerStatusArrOption}
  1497. </Select>
  1498. <Select placeholder="行业"
  1499. style={{ width: 100 }}
  1500. value={this.state.industrySearch}
  1501. onChange={(e) => { this.setState({ industrySearch: e }) }}>
  1502. {this.state.intentionalOption}
  1503. </Select>
  1504. <span>认证:</span>
  1505. <Select placeholder="业务认证"
  1506. style={{ width: 100 }}
  1507. value={this.state.serviceCertificationSearch}
  1508. onChange={(e) => { this.setState({ serviceCertificationSearch: e }) }}>
  1509. <Select.Option value="0" >未认证</Select.Option>
  1510. <Select.Option value="1" >已认证</Select.Option>
  1511. </Select>
  1512. <Select placeholder="实名认证"
  1513. style={{ width: 100 }}
  1514. value={this.state.userCertificationSearch}
  1515. onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
  1516. <Select.Option value="0" >未认证</Select.Option>
  1517. <Select.Option value="1" >已认证</Select.Option>
  1518. </Select>
  1519. <span>国际:</span>
  1520. <Select placeholder="国际"
  1521. style={{ width: 100 }}
  1522. value={this.state.internationalSearch}
  1523. onChange={(e) => { this.setState({ internationalSearch: e }) }}>
  1524. <Select.Option value="0" >否</Select.Option>
  1525. <Select.Option value="1" >是</Select.Option>
  1526. </Select>
  1527. <span>高新:</span>
  1528. <Select placeholder="高新"
  1529. style={{ width: 100 }}
  1530. value={this.state.highTechZoneSearch}
  1531. onChange={(e) => { this.setState({ highTechZoneSearch: e }) }}>
  1532. <Select.Option value="0" >否</Select.Option>
  1533. <Select.Option value="1" >是</Select.Option>
  1534. </Select>
  1535. <span>上市:</span>
  1536. <Select placeholder="上市"
  1537. style={{ width: 100 }}
  1538. value={this.state.listedSearch}
  1539. onChange={(e) => { this.setState({ listedSearch: e }) }}>
  1540. <Select.Option value="0" >否</Select.Option>
  1541. <Select.Option value="1" >是</Select.Option>
  1542. </Select>
  1543. <span>会员:</span>
  1544. <Select placeholder="会员等级"
  1545. style={{ width: 100 }}
  1546. value={this.state.lvlSearch}
  1547. onChange={(e) => { this.setState({ lvlSearch: e }) }}>
  1548. {this.state.lvlArrOption}
  1549. </Select>
  1550. <Select placeholder="会员状态"
  1551. style={{ width: 100 }}
  1552. value={this.state.currentMemberStatusSearch}
  1553. onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
  1554. {this.state.currentMemberArrOption}
  1555. </Select>
  1556. </div>
  1557. </div>
  1558. </div>
  1559. <div className="patent-table">
  1560. <Spin spinning={this.state.loading}>
  1561. <Table columns={this.state.columns}
  1562. dataSource={this.state.dataSource}
  1563. rowSelection={rowSelection}
  1564. pagination={this.state.pagination}
  1565. onRowClick={this.tableRowClick}
  1566. />
  1567. </Spin>
  1568. </div>
  1569. <CustomerDetail
  1570. data={this.state.RowData}
  1571. showDesc={this.state.showDesc}
  1572. closeDesc={this.closeDesc}
  1573. newmodal={this.newmodal}
  1574. />
  1575. <Modal
  1576. className="customeDetails"
  1577. title="单位客户详情"
  1578. width='1200px'
  1579. visible={this.state.modal5Visible}
  1580. onOk={this.detailsModal}
  1581. onCancel={this.detailsModal}
  1582. footer=''
  1583. >
  1584. <Tabs defaultActiveKey="1" onChange={this.callback}>
  1585. <TabPane tab="基本信息" key="1">
  1586. <Form horizontal onSubmit={this.newSubmit} id="demand-form">
  1587. <Spin spinning={this.state.loading}>
  1588. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1589. <FormItem className="half-item"
  1590. labelCol={{ span: 4 }}
  1591. wrapperCol={{ span: 18 }}
  1592. label="客户名称"
  1593. >
  1594. <span>{theInformation.unitName}</span>
  1595. </FormItem>
  1596. </div>
  1597. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1598. <FormItem className="half-item"
  1599. labelCol={{ span: 4 }}
  1600. wrapperCol={{ span: 18 }}
  1601. label="行业"
  1602. >
  1603. <Select placeholder="选择行业" value={this.state.industry} onChange={(e) => {
  1604. this.setState({industry:e})}}>
  1605. {
  1606. intentionalService.map(function (item) {
  1607. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1608. })
  1609. }
  1610. </Select>
  1611. </FormItem>
  1612. <FormItem className="half-item"
  1613. labelCol={{ span: 4 }}
  1614. wrapperCol={{ span: 18 }}
  1615. label="社会属性"
  1616. >
  1617. {getFieldDecorator('societyTag', {
  1618. initialValue: theInformation.societyTag
  1619. })(
  1620. <Select placeholder="客户社会属性" >
  1621. {
  1622. socialAttribute.map(function (item) {
  1623. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1624. })
  1625. }
  1626. </Select>
  1627. )}
  1628. </FormItem>
  1629. <FormItem className="half-item"
  1630. labelCol={{ span: 4 }}
  1631. wrapperCol={{ span: 18 }}
  1632. label="省-市-区"
  1633. >
  1634. {getFieldDecorator('ProvinceCity', {
  1635. initialValue: this.state.ProvinceCity
  1636. })(
  1637. <Cascader options={areaSelect()} placeholder="省-市-区" />
  1638. )}
  1639. </FormItem>
  1640. <FormItem className="half-item"
  1641. labelCol={{ span: 4 }}
  1642. wrapperCol={{ span: 18 }}
  1643. label="通信地址"
  1644. >
  1645. {getFieldDecorator('postalAddress', {
  1646. initialValue: theInformation.postalAddress
  1647. })(
  1648. <Input placeholder="客户通信地址"/>
  1649. )}
  1650. </FormItem>
  1651. <FormItem className="half-item"
  1652. labelCol={{ span: 4 }}
  1653. wrapperCol={{ span: 18 }}
  1654. label="固定电话"
  1655. >
  1656. {getFieldDecorator('contactsFixedTel', {
  1657. initialValue: theInformation.contactsFixedTel
  1658. })(
  1659. <Input placeholder="客户固定电话"/>
  1660. )}
  1661. </FormItem>
  1662. <FormItem className="half-item"
  1663. labelCol={{ span: 4 }}
  1664. wrapperCol={{ span: 18 }}
  1665. label="客户传真"
  1666. >
  1667. {getFieldDecorator('contactsFax', {
  1668. initialValue: theInformation.contactsFax
  1669. })(
  1670. <Input placeholder="客户传真"/>
  1671. )}
  1672. </FormItem>
  1673. <FormItem className="half-item"
  1674. labelCol={{ span: 4 }}
  1675. wrapperCol={{ span: 18 }}
  1676. label="注册资本"
  1677. >
  1678. {getFieldDecorator('registeredCapital', {
  1679. initialValue: theInformation.registeredCapital
  1680. })(
  1681. <Input placeholder="注册资本"/>
  1682. )}
  1683. </FormItem>
  1684. <FormItem className="half-item"
  1685. labelCol={{ span: 4 }}
  1686. wrapperCol={{ span: 18 }}
  1687. label="单位规模"
  1688. >
  1689. {getFieldDecorator('enterpriseScale', {
  1690. initialValue: theInformation.enterpriseScale
  1691. })(
  1692. <Input placeholder="单位规模"/>
  1693. )}
  1694. </FormItem>
  1695. <FormItem className="half-item"
  1696. labelCol={{ span: 4 }}
  1697. wrapperCol={{ span: 18 }}
  1698. label="法人名称"
  1699. >
  1700. {getFieldDecorator('legalPerson', {
  1701. initialValue: theInformation.legalPerson
  1702. })(
  1703. <Input placeholder="法人名称"/>
  1704. )}
  1705. </FormItem>
  1706. <FormItem className="half-item"
  1707. labelCol={{ span: 4 }}
  1708. wrapperCol={{ span: 18 }}
  1709. label="身份证号码"
  1710. >
  1711. {getFieldDecorator('legalPersonIdCard', {
  1712. initialValue: theInformation.legalPersonIdCard
  1713. })(
  1714. <Input placeholder="法人身份证号码"/>
  1715. )}
  1716. </FormItem>
  1717. <FormItem className="half-item"
  1718. labelCol={{ span: 4 }}
  1719. wrapperCol={{ span: 18 }}
  1720. label="法人电话"
  1721. >
  1722. {getFieldDecorator('legalPersonTel', {
  1723. initialValue: theInformation.legalPersonTel
  1724. })(
  1725. <Input placeholder="法人电话"/>
  1726. )}
  1727. </FormItem>
  1728. <FormItem className="half-item"
  1729. labelCol={{ span: 4 }}
  1730. wrapperCol={{ span: 18 }}
  1731. label="电子邮箱"
  1732. >
  1733. {getFieldDecorator('legalPersonEmail', {
  1734. initialValue: theInformation.legalPersonEmail
  1735. })(
  1736. <Input placeholder="法人电子邮箱"/>
  1737. )}
  1738. </FormItem>
  1739. <FormItem className="half-item"
  1740. labelCol={{ span: 4 }}
  1741. wrapperCol={{ span: 18 }}
  1742. label="高新"
  1743. >
  1744. <Radio.Group value={this.state.highTechZone} onChange={(e) => {
  1745. this.setState({highTechZone:e.target.value})
  1746. }}>
  1747. <Radio value={0}>否</Radio>
  1748. <Radio value={1}>是</Radio>
  1749. </Radio.Group>
  1750. </FormItem>
  1751. <FormItem className="half-item"
  1752. labelCol={{ span: 4 }}
  1753. wrapperCol={{ span: 18 }}
  1754. label="上市"
  1755. >
  1756. <Radio.Group value={this.state.listed} onChange={(e) => {
  1757. this.setState({listed:e.target.value })
  1758. }}>
  1759. <Radio value={0}>否</Radio>
  1760. <Radio value={1}>是</Radio>
  1761. </Radio.Group>
  1762. </FormItem>
  1763. <FormItem className="half-item"
  1764. labelCol={{ span: 4 }}
  1765. wrapperCol={{ span: 18 }}
  1766. label="机构代码"
  1767. >
  1768. {getFieldDecorator('orgCode', {
  1769. initialValue: theInformation.orgCode
  1770. })(
  1771. <Input placeholder="社会同意机构代码"/>
  1772. )}
  1773. </FormItem>
  1774. <div className="clearfix pictures">
  1775. <FormItem
  1776. labelCol={{ span: 4 }}
  1777. wrapperCol={{ span: 18 }}
  1778. label="机构证(PIC)" >
  1779. <PicturesWall
  1780. pictureSign="customer_sys_file"
  1781. fileList={this.getOrgCodeUrl}
  1782. pictureUrl={this.state.orgCodeUrl} />
  1783. <p>图片建议:图片要清晰。</p>
  1784. </FormItem>
  1785. <FormItem
  1786. labelCol={{ span: 4 }}
  1787. wrapperCol={{ span: 18 }}
  1788. label="单位logo" >
  1789. <PicturesWall
  1790. pictureSign="customer_sys_file"
  1791. fileList={this.getCompanyLogoUrl}
  1792. pictureUrl={this.state.companyLogoUrl} />
  1793. <p>图片建议:图片要清晰。</p>
  1794. </FormItem>
  1795. </div>
  1796. <div className="clearfix">
  1797. <FormItem
  1798. labelCol={{ span: 2 }}
  1799. wrapperCol={{ span: 18 }}
  1800. label="业务范围" >
  1801. {getFieldDecorator('businessScope', {
  1802. initialValue: theInformation.businessScope
  1803. })(
  1804. <Input type="textarea" rows={4} />
  1805. )}
  1806. </FormItem>
  1807. <FormItem
  1808. labelCol={{ span: 2 }}
  1809. wrapperCol={{ span: 18 }}
  1810. label="单位简介" >
  1811. {getFieldDecorator('introduction', {
  1812. initialValue: theInformation.introduction
  1813. })(
  1814. <Input type="textarea" rows={4} />
  1815. )}
  1816. </FormItem>
  1817. </div>
  1818. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'90px',marginBottom:'30px'}}>保存</Button>
  1819. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  1820. </div>
  1821. </Spin>
  1822. </Form>
  1823. </TabPane>
  1824. <TabPane tab="联系人信息" key="2">
  1825. <div className="clearfix" >
  1826. <Button className="ContactsList" type="primary" onClick={this.addContact}>新增</Button>
  1827. </div>
  1828. <div className="clearfix">
  1829. <Spin spinning={this.state.loading}>
  1830. <Table
  1831. pagination={this.state.paginations}
  1832. columns={this.state.ContactsList}
  1833. dataSource={data}
  1834. />
  1835. </Spin>
  1836. </div>
  1837. </TabPane>
  1838. <TabPane tab="账户信息" key="3">
  1839. <div className="clearfix">
  1840. <Form horizontal id="demand-form" onSubmit={this.accountSave} >
  1841. <Spin spinning={this.state.loading} >
  1842. <FormItem className="half-item"
  1843. {...formItemLayout}
  1844. label="注册手机号" >
  1845. <Input value={this.state.mobile} onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
  1846. <Button onClick={this.modifyPassworld}>修改密码</Button>
  1847. </FormItem>
  1848. <FormItem className="half-item"
  1849. {...formItemLayout}
  1850. label="注册用户名" >
  1851. <Input value={this.state.nickname} onChange={(e) => { this.setState({ nickname: e.target.value }); }} />
  1852. </FormItem>
  1853. <FormItem className="half-item"
  1854. {...formItemLayout}
  1855. label="注册邮箱" >
  1856. <Input value={this.state.email} onChange={(e) => { this.setState({ email: e.target.value }); }} />
  1857. </FormItem>
  1858. <FormItem className="half-item"
  1859. {...formItemLayout}
  1860. label="客户来源" >
  1861. <span>{this.state.source}</span>
  1862. </FormItem>
  1863. <FormItem className="half-item"
  1864. {...formItemLayout}
  1865. label="客户类型" >
  1866. <span>{this.state.type}</span>
  1867. </FormItem>
  1868. <FormItem className="half-item"
  1869. {...formItemLayout}
  1870. label="创建时间" >
  1871. <span>{this.state.createTimes}</span>
  1872. </FormItem>
  1873. <FormItem className="half-item"
  1874. {...formItemLayout}
  1875. label="客户状态"
  1876. >
  1877. <Select placeholder="客户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
  1878. {
  1879. customerStatus.map(function (item) {
  1880. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1881. })
  1882. }
  1883. </Select>
  1884. </FormItem>
  1885. <div className="clearfix">
  1886. <FormItem className="half-item"
  1887. {...formItemLayout}
  1888. label="会员"
  1889. >
  1890. <Radio.Group value={this.state.isMember} onChange={(e) => {
  1891. this.setState({ isMember: e.target.value })
  1892. }}>
  1893. <Radio value={0}>否</Radio>
  1894. <Radio value={1}>是</Radio>
  1895. </Radio.Group>
  1896. </FormItem>
  1897. <FormItem className="half-item"
  1898. {...formItemLayout}
  1899. label="会员等级"
  1900. >
  1901. <Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
  1902. {
  1903. lvl.map(function (item) {
  1904. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1905. })
  1906. }
  1907. </Select>
  1908. </FormItem>
  1909. <FormItem className="half-item"
  1910. {...formItemLayout}
  1911. label="会员状态"
  1912. >
  1913. <Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
  1914. {
  1915. currentMember.map(function (item) {
  1916. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1917. })
  1918. }
  1919. </Select>
  1920. </FormItem>
  1921. </div>
  1922. <FormItem className="half-item"
  1923. {...formItemLayout}
  1924. label="业务认证"
  1925. >
  1926. <Radio.Group value={this.state.serviceCertification} onChange={(e) => {
  1927. this.setState({ serviceCertification: e.target.value })
  1928. }}>
  1929. <Radio value={0}>未认证</Radio>
  1930. <Radio value={1}>已认证</Radio>
  1931. </Radio.Group>
  1932. </FormItem>
  1933. <FormItem className="half-item"
  1934. {...formItemLayout}
  1935. label="实名认证"
  1936. >
  1937. <Radio.Group value={this.state.userCertification} onChange={(e) => {
  1938. this.setState({ userCertification: e.target.value })
  1939. }}>
  1940. <Radio value={0}>未认证</Radio>
  1941. <Radio value={1}>已认证</Radio>
  1942. </Radio.Group>
  1943. </FormItem>
  1944. <div className="clearfix">
  1945. <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
  1946. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  1947. </div>
  1948. </Spin>
  1949. </Form>
  1950. </div>
  1951. </TabPane>
  1952. <TabPane tab="客户拜访" key="4">
  1953. <div className="clearfix">
  1954. <Spin spinning={this.state.loading}>
  1955. <Table
  1956. pagination={this.state.paginations}
  1957. columns={this.state.visitsList}
  1958. dataSource={data}
  1959. />
  1960. </Spin>
  1961. </div>
  1962. </TabPane>
  1963. {/*this.state.visitArrList*/}
  1964. <TabPane tab="业务意向" key="5">
  1965. <div className="clearfix">
  1966. <Spin spinning={this.state.loading}>
  1967. <Table
  1968. pagination={this.state.paginations}
  1969. columns={this.state.businessIntentionList}
  1970. dataSource={data}
  1971. />
  1972. </Spin>
  1973. </div>
  1974. </TabPane>
  1975. <TabPane tab="业务订单" key="6">
  1976. </TabPane>
  1977. <TabPane tab="技术需求" key="7">
  1978. </TabPane>
  1979. <TabPane tab="技术成果" key="8">
  1980. </TabPane>
  1981. <TabPane tab="技术专家" key="9">
  1982. </TabPane>
  1983. </Tabs>
  1984. </Modal>
  1985. <Modal
  1986. className="customeDetails"
  1987. footer=''
  1988. title="拜访详情"
  1989. width='1000px'
  1990. visible={this.state.visitModul}
  1991. onOk={this.visitOk}
  1992. onCancel={this.visitCancel}
  1993. >
  1994. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  1995. <Spin spinning={this.state.loading}>
  1996. <div className="clearfix">
  1997. <FormItem className="half-item"
  1998. {...formItemLayout}
  1999. label="拜访方式" >
  2000. <Radio.Group value={this.state.styles} onChange={(e) => {
  2001. this.setState({ styles: e.target.value })
  2002. }}>
  2003. <Radio value={0}>外出</Radio>
  2004. <Radio value={1}>电话</Radio>
  2005. <Radio value={2}>QQ</Radio>
  2006. <Radio value={3}>微信</Radio>
  2007. <Radio value={4}>邮箱</Radio>
  2008. </Radio.Group>
  2009. </FormItem>
  2010. <FormItem className="half-item"
  2011. {...formItemLayout}
  2012. >
  2013. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px'}}>添加新联系人</Button>
  2014. </FormItem>
  2015. <div className="clearfix">
  2016. <FormItem className="half-item"
  2017. {...formItemLayout}
  2018. label="客户名称"
  2019. >
  2020. <span>{this.state.name}</span>
  2021. </FormItem>
  2022. <FormItem className="half-item"
  2023. {...formItemLayout}
  2024. label="拜访人"
  2025. >
  2026. <span>{this.state.baifangren}</span>
  2027. </FormItem>
  2028. <FormItem className="half-item"
  2029. {...formItemLayout}
  2030. label="当前联系人"
  2031. >
  2032. <span>{this.state.lianxiren}</span>
  2033. </FormItem>
  2034. <FormItem className="half-item"
  2035. {...formItemLayout}
  2036. label="联系人"
  2037. >
  2038. <Select placeholder="选择联系人" style={{ width: 140 }}
  2039. value={this.state.lastName}
  2040. onChange={this.hundleName}>
  2041. {this.state.orderStatusOption}
  2042. </Select>
  2043. </FormItem>
  2044. <FormItem className="half-item"
  2045. {...formItemLayout}
  2046. label="拜访时间"
  2047. >
  2048. <span>{this.state.baifangren}</span>
  2049. </FormItem>
  2050. <FormItem className="half-item"
  2051. {...formItemLayout}
  2052. label="联系电话"
  2053. >
  2054. <span>{this.state.nub}</span>
  2055. </FormItem>
  2056. </div>
  2057. <div className="clearfix">
  2058. <FormItem
  2059. labelCol={{ span: 4 }}
  2060. wrapperCol={{ span: 16 }}
  2061. label="拜访备注" >
  2062. {getFieldDecorator('introduction', {
  2063. initialValue: theInformation.introduction
  2064. })(
  2065. <Input type="textarea" rows={4} />
  2066. )}
  2067. </FormItem>
  2068. </div>
  2069. <div className="clearfix">
  2070. <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addBusiness} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
  2071. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  2072. <Spin spinning={this.state.loading}>
  2073. <Table
  2074. pagination={this.state.paginations}
  2075. columns={this.state.intentionList}
  2076. dataSource={data}
  2077. />
  2078. </Spin>
  2079. </div>
  2080. </div>
  2081. </div>
  2082. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
  2083. <Button size="large" onClick={this.visitCancel}>取消</Button>
  2084. </Spin>
  2085. </Form>
  2086. </Modal>
  2087. <Modal
  2088. footer=''
  2089. title="修改密码"
  2090. width='600px'
  2091. visible={this.state.passworldModul}
  2092. onOk={this.passworldOk}
  2093. onCancel={this.passworldCancel}
  2094. >
  2095. <div className="clearfix">
  2096. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2097. <Spin spinning={this.state.loading}>
  2098. <div className="clearfix">
  2099. <FormItem className="half-item"
  2100. {...formItemLayout}
  2101. label="原密码" >
  2102. <Input type="password" value={this.state.companyNamet1} onChange={(e) => { this.setState({ companyNamet1: e.target.value }); }} required="required" />
  2103. </FormItem>
  2104. </div>
  2105. <div className="clearfix">
  2106. <FormItem className="half-item"
  2107. {...formItemLayout}
  2108. label="新密码" >
  2109. <Input type="password" value={this.state.companyName1} onChange={(e) => { this.setState({ companyName1: e.target.value }); }} required="required" />
  2110. </FormItem>
  2111. </div>
  2112. <div className="clearfix">
  2113. <FormItem className="half-item"
  2114. {...formItemLayout}
  2115. label="确认密码" >
  2116. <Input type="password" value={this.state.companyNam1} onChange={(e) => { this.setState({ companyNam1: e.target.value }); }} required="required" />
  2117. </FormItem>
  2118. </div>
  2119. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
  2120. <Button size="large" onClick={this.passworldCancel}>取消</Button>
  2121. </Spin>
  2122. </Form>
  2123. </div>
  2124. </Modal>
  2125. <Modal
  2126. footer=''
  2127. width='800px'
  2128. title="新增联系人"
  2129. visible={this.state.addcontactModul}
  2130. onOk={this.addcontactModulOK}
  2131. onCancel={this.addcontactModulcancel}
  2132. >
  2133. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  2134. <Spin spinning={this.state.loading}>
  2135. <Row>
  2136. <FormItem
  2137. labelCol={{ span: 4 }}
  2138. wrapperCol={{ span: 14 }}
  2139. label="是否是主要联系人:" style={{marginRight:'10px'}}>
  2140. <Radio.Group value={this.state.hotst} onChange={(e) => {
  2141. this.setState({ hotst: e.target.value })
  2142. }}>
  2143. <Radio value={0}>是</Radio>
  2144. <Radio value={1}>否</Radio>
  2145. </Radio.Group>
  2146. </FormItem>
  2147. <FormItem
  2148. labelCol={{ span: 4 }}
  2149. wrapperCol={{ span: 14 }}
  2150. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  2151. <Radio.Group value={this.state.hott} onChange={(e) => {
  2152. this.setState({ hott: e.target.value })
  2153. }}>
  2154. <Radio value={0}>男</Radio>
  2155. <Radio value={1}>女</Radio>
  2156. </Radio.Group>
  2157. </FormItem>
  2158. </Row>
  2159. <Row style={{ paddingLeft:'50px' }}>
  2160. <Col span={2}>姓名:</Col>
  2161. <Col span={8}>
  2162. <Input value={this.state.paymentIdt} required="required"
  2163. onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
  2164. </Col>
  2165. <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
  2166. <Col span={8}>
  2167. <Input value={this.state.entIdt}
  2168. onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
  2169. </Col>
  2170. </Row>
  2171. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2172. <Col span={2}>手机号:</Col>
  2173. <Col span={8}>
  2174. <Input value={this.state.payt} required="required"
  2175. onChange={(e) => { this.setState({ payt: e.target.value }) }} />
  2176. </Col>
  2177. <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
  2178. <Col span={8}>
  2179. <Input value={this.state.paymt}
  2180. onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
  2181. </Col>
  2182. </Row>
  2183. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  2184. <Col span={2}>部门:</Col>
  2185. <Col span={8}>
  2186. <Input value={this.state.paytIdtt}
  2187. onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
  2188. </Col>
  2189. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  2190. <Col span={8}>
  2191. <Input value={this.state.paentIdt}
  2192. onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
  2193. </Col>
  2194. </Row>
  2195. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2196. <Col span={2}>微信号:</Col>
  2197. <Col span={8}>
  2198. <Input value={this.state.payIdt}
  2199. onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
  2200. </Col>
  2201. <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
  2202. <Col span={8}>
  2203. <Input value={this.state.emailst}
  2204. onChange={(e) => { this.setState({ emailst: e.target.value }) }} />
  2205. </Col>
  2206. </Row>
  2207. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  2208. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  2209. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  2210. </Row>
  2211. </Spin>
  2212. </Form>
  2213. </Modal>
  2214. <Modal
  2215. footer=''
  2216. title="业务意向详情"
  2217. width='600px'
  2218. visible={this.state.businessModul}
  2219. onOk={this.businessIntentionOk}
  2220. onCancel={this.businessIntentionCancel}
  2221. >
  2222. <div className="clearfix">
  2223. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2224. <Spin spinning={this.state.loading}>
  2225. <div className="clearfix">
  2226. <FormItem className="half-item"
  2227. {...formItemLayout}
  2228. label="意向业务名称" >
  2229. <span>{this.state.a}</span>
  2230. </FormItem>
  2231. <FormItem className="half-item"
  2232. {...formItemLayout}
  2233. label="意向时间" >
  2234. <span>{this.state.a1}</span>
  2235. </FormItem>
  2236. <FormItem className="half-item"
  2237. {...formItemLayout}
  2238. label="客户名称" >
  2239. <span>{this.state.a}</span>
  2240. </FormItem>
  2241. <FormItem className="half-item"
  2242. {...formItemLayout}
  2243. label="营销员" >
  2244. <span>{this.state.a}</span>
  2245. </FormItem>
  2246. <FormItem className="half-item"
  2247. {...formItemLayout}
  2248. label="意向业务进度" >
  2249. <span>{this.state.a}</span>
  2250. </FormItem>
  2251. <FormItem className="half-item"
  2252. {...formItemLayout}
  2253. label="业务客户状态" >
  2254. <span>{this.state.a}</span>
  2255. </FormItem>
  2256. </div>
  2257. <div className="clearfix">
  2258. <FormItem className="half-item"
  2259. {...formItemLayout}
  2260. label="业务意向说明" >
  2261. <span>{this.state.a}</span>
  2262. </FormItem>
  2263. </div>
  2264. <div className="clearfix">
  2265. <div>业务跟进</div>
  2266. <div className="clearfix">
  2267. <Spin spinning={this.state.loading}>
  2268. <Table
  2269. pagination={this.state.paginations}
  2270. columns={this.state.businessFollowList}
  2271. dataSource={data}
  2272. />
  2273. </Spin>
  2274. </div>
  2275. </div>
  2276. </Spin>
  2277. </Form>
  2278. </div>
  2279. </Modal>
  2280. <Modal
  2281. footer=''
  2282. title="业务跟进详情"
  2283. width='600px'
  2284. visible={this.state.businessFollowModul}
  2285. onOk={this.businessFollowOk}
  2286. onCancel={this.businessFollowCancel}
  2287. >
  2288. <div className="clearfix">
  2289. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2290. <Spin spinning={this.state.loading}>
  2291. <div className="clearfix">
  2292. <FormItem className="half-item"
  2293. {...formItemLayout}
  2294. label="意向业务名称" >
  2295. <span>{this.state.a}</span>
  2296. </FormItem>
  2297. <FormItem className="half-item"
  2298. {...formItemLayout}
  2299. label="意向时间" >
  2300. <span>{this.state.a1}</span>
  2301. </FormItem>
  2302. <FormItem className="half-item"
  2303. {...formItemLayout}
  2304. label="客户名称" >
  2305. <span>{this.state.a}</span>
  2306. </FormItem>
  2307. <FormItem className="half-item"
  2308. {...formItemLayout}
  2309. label="营销员" >
  2310. <span>{this.state.a}</span>
  2311. </FormItem>
  2312. <FormItem className="half-item"
  2313. {...formItemLayout}
  2314. label="意向业务进度" >
  2315. <span>{this.state.a}</span>
  2316. </FormItem>
  2317. <FormItem className="half-item"
  2318. {...formItemLayout}
  2319. label="业务客户状态" >
  2320. <span>{this.state.a}</span>
  2321. </FormItem>
  2322. </div>
  2323. <div className="clearfix">
  2324. <FormItem className="half-item"
  2325. {...formItemLayout}
  2326. label="业务意向说明" >
  2327. <span>{this.state.a}</span>
  2328. </FormItem>
  2329. </div>
  2330. <div className="clearfix">
  2331. <div>拜访情况</div>
  2332. <FormItem className="half-item"
  2333. {...formItemLayout}
  2334. label="拜访方式" >
  2335. <span>{this.state.a}</span>
  2336. </FormItem>
  2337. <FormItem className="half-item"
  2338. {...formItemLayout}
  2339. label="联系人" >
  2340. <span>{this.state.a}</span>
  2341. </FormItem>
  2342. <FormItem className="half-item"
  2343. {...formItemLayout}
  2344. label="联系电话" >
  2345. <span>{this.state.a}</span>
  2346. </FormItem>
  2347. <FormItem className="half-item"
  2348. {...formItemLayout}
  2349. label="拜访时间" >
  2350. <span>{this.state.a}</span>
  2351. </FormItem>
  2352. <FormItem className="half-item"
  2353. {...formItemLayout}
  2354. label="拜访人" >
  2355. <span>{this.state.a}</span>
  2356. </FormItem>
  2357. <div className="clearfix">
  2358. <FormItem className="half-item"
  2359. {...formItemLayout}
  2360. label="拜访备注" >
  2361. <span>{this.state.a}</span>
  2362. </FormItem>
  2363. </div>
  2364. </div>
  2365. </Spin>
  2366. </Form>
  2367. </div>
  2368. </Modal>
  2369. </div >
  2370. );
  2371. }
  2372. }));
  2373. export default MyClient;