publicManages.jsx 109 KB

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