personalManages.jsx 111 KB

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