myClient.jsx 107 KB

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