myClient.jsx 107 KB

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