publicQuery.jsx 93 KB

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