myClient.jsx 119 KB

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