publicManagesOne.jsx 105 KB

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