myClient.jsx 106 KB

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