myClient.jsx 107 KB

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