personalManages.jsx 110 KB

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