myClient.jsx 120 KB

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