individualCustomer.jsx 109 KB

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