myClient.jsx 100 KB

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