queryCustomer.jsx 117 KB

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