companyCustomer.jsx 114 KB

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