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