publicManagesOne.jsx 111 KB

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