myClient.jsx 105 KB

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