personalManages.jsx 106 KB

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