individualCustomer.jsx 109 KB

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