expertManage.jsx 103 KB

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