publicManagesOne.jsx 112 KB

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