companyCustomer.jsx 132 KB

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