publicManages.jsx 108 KB

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