queryCustomer.jsx 134 KB

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