personalManages.jsx 111 KB

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