myClient.jsx 107 KB

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