myClient.jsx 104 KB

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