myClient.jsx 118 KB

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