individualCustomer.jsx 108 KB

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