myClient.jsx 107 KB

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