myClient.jsx 105 KB

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