publicQuery.jsx 93 KB

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