publicManages.jsx 103 KB

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