myClient.jsx 107 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010
  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. this.setState({
  975. selectedRowKeys: [],
  976. });
  977. this.props.form.validateFields((err, values) => {
  978. let theorgCodeUrl = [];
  979. if(this.state.orgCodeUrl.length) {
  980. let picArr = [];
  981. this.state.orgCodeUrl.map(function(item) {
  982. picArr.push(item.response.data);
  983. });
  984. theorgCodeUrl = picArr.join(",");
  985. };
  986. let thecompanyLogoUrl = [];
  987. if(this.state.companyLogoUrl.length) {
  988. let picArr = [];
  989. this.state.companyLogoUrl.map(function(item) {
  990. picArr.push(item.response.data);
  991. });
  992. thecompanyLogoUrl = picArr.join(",");
  993. };
  994. if(!err) {
  995. this.setState({
  996. loading: true
  997. });
  998. $.ajax({
  999. method: "post",
  1000. dataType: "json",
  1001. url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  1002. data: {
  1003. id: this.state.InformationId,
  1004. uid: this.state.InformationUid,
  1005. societyTag: this.state.societyTag,
  1006. introduction: this.state.introduction,
  1007. unitName: this.state.unitName,
  1008. industry: this.state.industry,
  1009. locationProvince: (this.state.ProvinceCity)[0], //省-
  1010. locationCity: (this.state.ProvinceCity)[1], //市
  1011. locationArea: (this.state.ProvinceCity)[2], //区
  1012. postalAddress: this.state.postalAddress,
  1013. contactsFixedTel: this.state.contactsFixedTel,
  1014. contactsFax: this.state.contactsFax,
  1015. registeredCapital: this.state.registeredCapital,
  1016. enterpriseScale: this.state.enterpriseScale,
  1017. legalPerson: this.state.legalPerson,
  1018. legalPersonIdCard: this.state.legalPersonIdCard,
  1019. legalPersonTel: this.state.legalPersonTel,
  1020. legalPersonEmail: this.state.legalPersonEmail,
  1021. highTechZone: this.state.highTechZone,
  1022. listed: this.state.listed,
  1023. contacts: this.state.contacts,
  1024. contactMobile: this.state.contactMobile,
  1025. international: this.state.international,
  1026. orgCode: this.state.orgCode,
  1027. businessScope: this.state.businessScope,
  1028. introduction: this.state.introduction,
  1029. companyLogoUrl: thecompanyLogoUrl,
  1030. orgCodeUrl: theorgCodeUrl,
  1031. investment: this.state.investment,
  1032. businessAudit: this.state.businessAudit,
  1033. auditStatus: this.state.auditStatus
  1034. }
  1035. }).done(function(data) {
  1036. this.setState({
  1037. loading: false
  1038. });
  1039. if(!data.error.length) {
  1040. message.success('保存成功!');
  1041. this.detailsModal()
  1042. this.loadData();
  1043. } else {
  1044. message.warning(data.error[0].message);
  1045. }
  1046. }.bind(this));
  1047. }
  1048. })
  1049. },
  1050. //点击整行查看详情
  1051. //查看基本详情基本信息
  1052. loadInformation(record) {
  1053. $.ajax({
  1054. method: "get",
  1055. dataType: "json",
  1056. url: globalConfig.context + '/api/admin/customer/findOrganizationCustomerDetail',
  1057. data: {
  1058. uid: record
  1059. },
  1060. success: function(data) {
  1061. let thisData = data.data;
  1062. if(!thisData) {
  1063. if(data.error && data.error.length) {
  1064. message.warning(data.error[0].message);
  1065. };
  1066. thisData = {};
  1067. };
  1068. let ProvinceCityArr = [];
  1069. let ProvinceS = thisData.locationProvince; //getprovince
  1070. let citys = thisData.locationCity;
  1071. let Areas = thisData.locationArea;
  1072. ProvinceCityArr.push(ProvinceS, citys, Areas);
  1073. this.setState({
  1074. InformationId: thisData.id,
  1075. InformationUid: thisData.uid,
  1076. identifyName: thisData.identifyName,
  1077. listed: thisData.listed,
  1078. highTechZone: thisData.highTechZone,
  1079. orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1080. companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
  1081. dataInformation: thisData,
  1082. ProvinceCity: ProvinceCityArr,
  1083. contacts: thisData.contacts,
  1084. contactMobile: thisData.contactMobile,
  1085. industry: String(thisData.industry) == 'null' ? undefined : String(thisData.industry),
  1086. international: thisData.international,
  1087. societyTag: thisData.societyTag,
  1088. introduction: thisData.introduction,
  1089. postalAddress: thisData.postalAddress,
  1090. contactsFixedTel: thisData.contactsFixedTel,
  1091. contactsFax: thisData.contactsFax,
  1092. registeredCapital: thisData.registeredCapital,
  1093. enterpriseScale: thisData.enterpriseScale,
  1094. legalPerson: thisData.legalPerson,
  1095. legalPersonIdCard: thisData.legalPersonIdCard,
  1096. legalPersonTel: thisData.legalPersonTel,
  1097. legalPersonEmail: thisData.legalPersonEmail,
  1098. businessScope: thisData.businessScope,
  1099. orgCode: thisData.orgCode,
  1100. investment: thisData.investment,
  1101. auditStatus: thisData.auditStatus ? String(thisData.auditStatus) : undefined,
  1102. businessAudit: thisData.businessAudit
  1103. });
  1104. }.bind(this),
  1105. }).always(function() {
  1106. this.setState({
  1107. loading: false
  1108. });
  1109. }.bind(this));
  1110. },
  1111. //tab3账户信息请求数据
  1112. httpAccount(record) {
  1113. this.RowClick;
  1114. $.ajax({
  1115. method: "get",
  1116. dataType: "json",
  1117. crossDomain: false,
  1118. url: globalConfig.context + '/api/admin/customer/findUserAccountDetail',
  1119. data: {
  1120. uid: record
  1121. },
  1122. success: function(data) {
  1123. let thisData = data.data;
  1124. if(!thisData) {
  1125. if(data.error && data.error.length) {
  1126. message.warning(data.error[0].message);
  1127. };
  1128. thisData = {};
  1129. };
  1130. let sourcecustomer = ''
  1131. switch(String(thisData.source)) {
  1132. case '0':
  1133. sourcecustomer = '注册客户'
  1134. break;
  1135. case '1':
  1136. sourcecustomer = '录入客户'
  1137. break;
  1138. }
  1139. this.setState({
  1140. Accountuid: thisData.id,
  1141. mobile: thisData.mobile,
  1142. nickname: thisData.nickname,
  1143. email: thisData.email,
  1144. type: getcustomerTyp(String(thisData.type)),
  1145. source: sourcecustomer,
  1146. isMember: thisData.isMember,
  1147. currentMemberStatus: String(thisData.currentMemberStatus),
  1148. lvl: String(thisData.lvl),
  1149. status: String(thisData.status),
  1150. createTimes: thisData.createTimes,
  1151. });
  1152. }.bind(this),
  1153. }).always(function() {
  1154. this.setState({
  1155. loading: false
  1156. });
  1157. }.bind(this));
  1158. },
  1159. detailsModalOk(e) {
  1160. this.setState({ modal5Visible: true }); //需要一个请求数据
  1161. },
  1162. //点击消失函数
  1163. detailsModal(e) {
  1164. this.setState({
  1165. modal5Visible: false
  1166. });
  1167. },
  1168. //拜访modul函数
  1169. visitOk(e) {
  1170. this.setState({
  1171. visitModul: false
  1172. });
  1173. this.loadVisit()
  1174. },
  1175. visitCancel(e) {
  1176. this.setState({
  1177. visitModul: false
  1178. });
  1179. },
  1180. //拜访保存函数
  1181. visitSubmit(e) {
  1182. e.preventDefault();
  1183. let GlossoryId;
  1184. this.state.data.map(function(item) {
  1185. if(!item.businessGlossoryId) {
  1186. GlossoryId = true
  1187. }
  1188. })
  1189. if(this.state.contactType == undefined) {
  1190. message.warning('请选择拜访方式')
  1191. return false;
  1192. };
  1193. if(this.state.keys) {
  1194. if(this.state.lastName == undefined) {
  1195. message.warning('请选择联系人')
  1196. return false;
  1197. }
  1198. };
  1199. if(GlossoryId) {
  1200. message.warning("请选择业务名称!")
  1201. return false;
  1202. };
  1203. this.setState({
  1204. loading: true
  1205. });
  1206. let contactsId = '';
  1207. if(this.state.keys) {
  1208. let conts = this.state.lastName;
  1209. contactsId = this.state.contactsIdArr[conts].id;
  1210. }
  1211. //新增
  1212. $.ajax({
  1213. method: "post",
  1214. dataType: "json",
  1215. url: this.state.keys ? globalConfig.context + '/api/admin/customer/addFollow' : globalConfig.context + '/api/admin/customer/updateFollow',
  1216. data: this.state.keys ? {
  1217. userBusinessList: JSON.stringify(this.state.data),
  1218. uid: this.state.uid,
  1219. ocbId: contactsId,
  1220. contactType: this.state.contactType,
  1221. result: this.state.result,
  1222. followTime: this.state.followTime,
  1223. } : {
  1224. followId: this.state.followIds,
  1225. userBusinessList: JSON.stringify(this.state.data),
  1226. uid: this.state.uid,
  1227. contactType: this.state.contactType,
  1228. result: this.state.result,
  1229. followTime: this.state.followTime,
  1230. }
  1231. }).done(function(data) {
  1232. this.setState({
  1233. loading: false
  1234. });
  1235. if(!data.error.length) {
  1236. message.success('保存成功!');
  1237. this.loadVisit(); //
  1238. this.loadData();
  1239. this.visitCancel();
  1240. } else {
  1241. message.warning(data.error[0].message);
  1242. }
  1243. }.bind(this));
  1244. },
  1245. //当选择联系人的列表变化时,则执行
  1246. hundleName(e) {
  1247. let changNub = this.state.telNum[e];
  1248. this.setState({
  1249. nub: this.state.telNum[e],
  1250. lastName: e,
  1251. });
  1252. },
  1253. //添加新业务及单位客户详情新增
  1254. addNew() {
  1255. this.state.data.push({
  1256. customerStatus: undefined,
  1257. businessGlossoryId: undefined,
  1258. followSituation: undefined,
  1259. remarks: '',
  1260. });
  1261. this.setState({
  1262. data: this.state.data
  1263. })
  1264. },
  1265. //tab2新增联系人
  1266. addcontact() {
  1267. this.state.contactList.push({
  1268. id: null,
  1269. name: '',
  1270. mobile: '',
  1271. email: '',
  1272. qq: '',
  1273. wechat: '',
  1274. depatrment: '',
  1275. position: '',
  1276. });
  1277. this.setState({
  1278. contactList: this.state.contactList
  1279. })
  1280. },
  1281. //tab5进入修改时
  1282. //进入修改时
  1283. listFollowUp(e) {
  1284. $.ajax({
  1285. method: "get",
  1286. dataType: "json",
  1287. crossDomain: false,
  1288. url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
  1289. data: {
  1290. ufbId: e
  1291. },
  1292. success: function(data) {
  1293. let thedata = data.data;
  1294. if(!thedata) {
  1295. if(data.error && data.error.length) {
  1296. message.warning(data.error[0].message);
  1297. };
  1298. thedata = {};
  1299. };
  1300. this.setState({
  1301. businessGlossoryIds: thedata.businessGlossoryId,
  1302. followSituations: thedata.followSituation,
  1303. customerStatuss: thedata.customerStatus,
  1304. followTimes: thedata.followTime,
  1305. createTimes: thedata.createTime,
  1306. identifyNames: thedata.identifyName,
  1307. contactTypes: parseInt(thedata.contactType),
  1308. results: thedata.result,
  1309. remarkss: thedata.remarks,
  1310. adminNames: thedata.adminName,
  1311. contactss: thedata.contacts,
  1312. contactMobiles: thedata.contactMobile,
  1313. ufbId: thedata.ufbId,
  1314. followIds: thedata.followId,
  1315. });
  1316. }.bind(this),
  1317. }).always(function() {
  1318. this.setState({
  1319. loading: false
  1320. });
  1321. }.bind(this));
  1322. },
  1323. //修改密码Modul
  1324. modifyPassworld() {
  1325. this.setState({
  1326. passworldModul: true
  1327. });
  1328. },
  1329. passworldOk(e) {
  1330. this.setState({
  1331. passworldModul: false
  1332. });
  1333. },
  1334. passworldCancel(e) {
  1335. this.setState({
  1336. passworldModul: false
  1337. });
  1338. },
  1339. //修改密码保存
  1340. passworldSubmit(e) {
  1341. e.preventDefault();
  1342. this.passworldCancel()
  1343. },
  1344. //新增联系人
  1345. addcontactModulOK() {
  1346. this.setState({
  1347. addcontactModul: false
  1348. });
  1349. },
  1350. addcontactModulcancel() {
  1351. this.setState({
  1352. addcontactModul: false
  1353. });
  1354. },
  1355. //点击新增详情
  1356. newContacts() {
  1357. this.state.newsex = undefined;
  1358. this.state.newname = '';
  1359. this.state.newmobile = '';
  1360. this.state.newwechat = '';
  1361. this.state.newqq = '';
  1362. this.state.newdepatrment = '';
  1363. this.state.newposition = '';
  1364. this.state.newemail = '';
  1365. this.setState({
  1366. uids: this.state.uid,
  1367. addcontactModul: true
  1368. });
  1369. },
  1370. //新增联系人保存函数
  1371. submitcontactman() {
  1372. this.setState({
  1373. loading: true
  1374. })
  1375. $.ajax({
  1376. method: "post",
  1377. dataType: "json",
  1378. crossDomain: false,
  1379. url: globalConfig.context + "/api/admin/customer/addOneContact",
  1380. data: {
  1381. uid: this.state.uids,
  1382. name: this.state.newname,
  1383. mobile: this.state.newmobile,
  1384. email: this.state.newemail,
  1385. wechat: this.state.newwechat,
  1386. depatrment: this.state.newdepatrment,
  1387. position: this.state.newposition,
  1388. sex: this.state.newsex,
  1389. qq: this.state.newqq
  1390. },
  1391. success: function(data) {
  1392. if(!data.error.length) {
  1393. this.addcontactModulOK()
  1394. this.getNewWoman(this.state.uids)
  1395. this.setState({
  1396. loading: false,
  1397. })
  1398. } else {
  1399. message.warning(data.error[0].message);
  1400. };
  1401. }.bind(this)
  1402. });
  1403. },
  1404. //获取联系人下拉框
  1405. getNewWoman(ids) {
  1406. this.state.data = []
  1407. $.ajax({
  1408. method: "get",
  1409. dataType: "json",
  1410. crossDomain: false,
  1411. url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
  1412. data: {
  1413. uid: ids,
  1414. },
  1415. success: function(data) {
  1416. let theArr = [];
  1417. let thedata = data.data;
  1418. if(!thedata) {
  1419. if(data.error && data.error.length) {
  1420. message.warning(data.error[0].message);
  1421. };
  1422. thedata = {};
  1423. };
  1424. var telNum = [];
  1425. var contactIds = [];
  1426. thedata.map(function(item, index) {
  1427. contactIds.push(thedata[index].id);
  1428. telNum.push(thedata[index].mobile);
  1429. });
  1430. for(let item in data.data) {
  1431. let theData = data.data[item];
  1432. theArr.push(
  1433. <Select.Option value={item} key={theData.name}>{theData.name}</Select.Option>
  1434. );
  1435. };
  1436. this.setState({
  1437. contactsIdArr: thedata,
  1438. telNum: telNum,
  1439. orderStatusOption: theArr,
  1440. });
  1441. }.bind(this),
  1442. }).always(function() {
  1443. this.setState({
  1444. deletId: ids,
  1445. loading: false
  1446. });
  1447. }.bind(this));
  1448. },
  1449. //拜访意向服务列表单个删除
  1450. intentionDelet(e, index) {
  1451. if(!this.state.keys) {
  1452. let detId = this.state.followIds;
  1453. if(e.id) {
  1454. this.setState({
  1455. selectedRowKeys: [],
  1456. });
  1457. $.ajax({
  1458. method: "get",
  1459. dataType: "json",
  1460. crossDomain: false,
  1461. url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
  1462. data: {
  1463. ufbId: e.id
  1464. }
  1465. }).done(function(data) {
  1466. if(!data.error.length) {
  1467. message.success('删除成功');
  1468. this.setState({
  1469. loading: false,
  1470. });
  1471. } else {
  1472. message.warning(data.error[0].message);
  1473. };
  1474. this.visitModify(detId);
  1475. }.bind(this));
  1476. } else {
  1477. this.visitModify(detId);
  1478. }
  1479. } else {
  1480. let deteluserBusinessList = (this.state.data).splice(index, 1)
  1481. this.setState({
  1482. selectedRowKeys: [],
  1483. });
  1484. }
  1485. },
  1486. //tab5意向业务
  1487. //意向业务查看列表单个详情
  1488. businessIntentionDetails(e) {
  1489. $.ajax({
  1490. method: "get",
  1491. dataType: "json",
  1492. crossDomain: false,
  1493. url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
  1494. data: {
  1495. businessId: e.businessId
  1496. },
  1497. success: function(data) {
  1498. let thisData = data.data;
  1499. if(!thisData) {
  1500. if(data.error && data.error.length) {
  1501. message.warning(data.error[0].message);
  1502. };
  1503. thisData = {};
  1504. };
  1505. this.setState({
  1506. businessGlossoryId: thisData.businessGlossoryId,
  1507. identifyName: thisData.identifyName,
  1508. uid: thisData.uid,
  1509. businessId: thisData.businessId,
  1510. followSituation: thisData.followSituation,
  1511. customerStatus: thisData.customerStatus,
  1512. createTime: thisData.createTime,
  1513. followTime: thisData.followTime,
  1514. adminName: thisData.adminName,
  1515. remarks: thisData.remarks,
  1516. result: thisData.result,
  1517. });
  1518. }.bind(this),
  1519. }).always(function() {
  1520. this.loadVisit();
  1521. this.setState({
  1522. loading: false
  1523. });
  1524. }.bind(this));
  1525. this.setState({
  1526. businessModul: true
  1527. })
  1528. },
  1529. //查看跟进记录列表
  1530. loadVisit(pageNo) {
  1531. this.setState({
  1532. loading: true
  1533. });
  1534. $.ajax({
  1535. method: "get",
  1536. dataType: "json",
  1537. crossDomain: false,
  1538. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  1539. data: {
  1540. pageNo: pageNo || 1,
  1541. pageSize: this.state.paginations.pageSize,
  1542. uid: this.state.rowId, //名称1
  1543. businessGlossoryId: this.state.businessGlossoryId,
  1544. },
  1545. success: function(data) {
  1546. let theArr = [];
  1547. if(data.error.length || data.data.list == "") {
  1548. if(data.error && data.error.length) {
  1549. message.warning(data.error[0].message);
  1550. };
  1551. } else {
  1552. for(let i = 0; i < data.data.list.length; i++) {
  1553. let thisdata = data.data.list[i];
  1554. theArr.push({
  1555. followId: thisdata.followId,
  1556. followTime: thisdata.followTime,
  1557. identifyName: thisdata.identifyName,
  1558. contacts: thisdata.contacts,
  1559. contactMobile: thisdata.contactMobile,
  1560. result: thisdata.result,
  1561. ufbId: thisdata.ufbId,
  1562. adminName: thisdata.adminName,
  1563. followSituation: thisdata.followSituation,
  1564. customerStatus: thisdata.customerStatus,
  1565. contactType: thisdata.contactType
  1566. });
  1567. };
  1568. this.state.paginations.current = data.data.pageNo;
  1569. this.state.paginations.total = data.data.totalCount;
  1570. };
  1571. this.setState({
  1572. visitArrList: theArr,
  1573. paginations: this.state.paginations
  1574. });
  1575. }.bind(this),
  1576. }).always(function() {
  1577. this.setState({
  1578. loading: false
  1579. });
  1580. }.bind(this));
  1581. },
  1582. //tab3拜访记录
  1583. loadBfVisit(pageNo, uids) {
  1584. this.setState({
  1585. loading: true
  1586. });
  1587. $.ajax({
  1588. method: "get",
  1589. dataType: "json",
  1590. crossDomain: false,
  1591. url: globalConfig.context + '/api/admin/customer/listFollowHistory',
  1592. data: {
  1593. pageNo: pageNo || 1,
  1594. pageSize: this.state.paginationsy.pageSize,
  1595. uid: uids ? uids : this.state.rowId, //名称1
  1596. },
  1597. success: function(data) {
  1598. let theArr = [];
  1599. if(data.error.length || data.data.list == "") {
  1600. if(data.error && data.error.length) {
  1601. message.warning(data.error[0].message);
  1602. };
  1603. } else {
  1604. for(let i = 0; i < data.data.list.length; i++) {
  1605. let thisdata = data.data.list[i];
  1606. theArr.push({
  1607. followId: thisdata.followId,
  1608. followTime: thisdata.followTime,
  1609. identifyName: thisdata.identifyName,
  1610. contacts: thisdata.contacts,
  1611. contactMobile: thisdata.contactMobile,
  1612. result: thisdata.result,
  1613. ufbId: thisdata.ufbId,
  1614. adminName: thisdata.adminName,
  1615. followSituation: thisdata.followSituation,
  1616. customerStatus: thisdata.customerStatus,
  1617. contactType: thisdata.contactType
  1618. });
  1619. };
  1620. this.state.paginationsy.current = data.data.pageNo;
  1621. this.state.paginationsy.total = data.data.totalCount;
  1622. };
  1623. this.setState({
  1624. visitArrList: theArr,
  1625. paginationsy: this.state.paginationsy
  1626. });
  1627. }.bind(this),
  1628. }).always(function() {
  1629. this.setState({
  1630. loading: false
  1631. });
  1632. }.bind(this));
  1633. },
  1634. businessIntentionOk() {
  1635. this.setState({
  1636. businessGlossoryId: '',
  1637. businessModul: false
  1638. })
  1639. },
  1640. businessIntentionCancel() {
  1641. this.setState({
  1642. businessGlossoryId: '',
  1643. businessModul: false
  1644. })
  1645. },
  1646. //业务跟进查看跟多
  1647. businessFollowDetails(e) {
  1648. this.listFollowUp(e.ufbId)
  1649. this.setState({
  1650. businessFollowModul: true
  1651. })
  1652. },
  1653. businessFollowOk(e) {
  1654. this.setState({
  1655. businessFollowModul: false
  1656. })
  1657. },
  1658. businessFollowCancel(e) {
  1659. this.setState({
  1660. businessFollowModul: false
  1661. })
  1662. },
  1663. //tab2联系人保存
  1664. contactSave(e) {
  1665. e.preventDefault();
  1666. this.setState({
  1667. loading: true
  1668. });
  1669. $.ajax({
  1670. url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
  1671. method: 'post',
  1672. data: {
  1673. uid: this.state.rowId,
  1674. contactList: JSON.stringify(this.state.contactList)
  1675. }
  1676. }).done(function(data) {
  1677. this.setState({
  1678. loading: false
  1679. });
  1680. if(!data.error.length) {
  1681. message.success('保存成功!');
  1682. this.detailsModal()
  1683. this.loadData();
  1684. } else {
  1685. message.warning(data.error[0].message);
  1686. }
  1687. }.bind(this));
  1688. },
  1689. //详情tab切换数据处理
  1690. callback(e) {
  1691. if(e == 1) {
  1692. this.loadInformation(this.state.rowId)
  1693. }
  1694. if(e == 2) {
  1695. this.contactLists(this.state.rowId)
  1696. }
  1697. if(e == 3) {
  1698. this.httpAccount(this.state.rowId)
  1699. }
  1700. if(e == 4) {
  1701. this.loadBfVisit(1, this.state.rowId);
  1702. }
  1703. if(e == 5) {
  1704. this.BusinessList(1, this.state.rowId);
  1705. }
  1706. if(e == 6) {
  1707. }
  1708. if(e == 7) {
  1709. }
  1710. if(e == 8) {
  1711. }
  1712. if(e == 9) {
  1713. }
  1714. },
  1715. //账户信息保存
  1716. accountSave(e) {
  1717. e.preventDefault();
  1718. if(!this.state.mobile) {
  1719. message.warning('手机号码不能为空!')
  1720. return false;
  1721. }
  1722. this.setState({
  1723. loading: true
  1724. });
  1725. $.ajax({
  1726. method: "post",
  1727. dataType: "json",
  1728. url: globalConfig.context + '/api/admin/customer/updateUserAccount',
  1729. data: {
  1730. id: this.state.Accountuid,
  1731. mobile: this.state.mobile,
  1732. nickname: this.state.nickname,
  1733. email: this.state.email,
  1734. isMember: this.state.isMember,
  1735. currentMemberStatus: this.state.currentMemberStatus,
  1736. lvl: this.state.lvl,
  1737. status: this.state.status,
  1738. }
  1739. }).done(function(data) {
  1740. this.setState({
  1741. loading: false
  1742. });
  1743. if(!data.error.length) {
  1744. message.success('保存成功!');
  1745. this.detailsModal();
  1746. this.loadData();
  1747. } else {
  1748. message.warning(data.error[0].message);
  1749. }
  1750. }.bind(this));
  1751. },
  1752. //tab2删除
  1753. confirmDelet(e) {
  1754. this.setState({
  1755. loading: true
  1756. });
  1757. if(e.id) {
  1758. $.ajax({
  1759. method: "get",
  1760. dataType: "json",
  1761. crossDomain: false,
  1762. url: globalConfig.context + "/api/admin/customer/deleteOneContact",
  1763. data: {
  1764. ocbId: e.id, //删除的ID
  1765. }
  1766. }).done(function(data) {
  1767. if(!data.error.length) {
  1768. message.success('删除成功!');
  1769. this.setState({
  1770. loading: false,
  1771. });
  1772. } else {
  1773. message.warning(data.error[0].message);
  1774. };
  1775. this.contactLists(this.state.rowId);
  1776. }.bind(this));
  1777. } else {
  1778. this.contactLists(this.state.rowId);
  1779. }
  1780. },
  1781. //tab5业务意向
  1782. BusinessList(pageNo, uids) {
  1783. this.setState({
  1784. loading: true
  1785. });
  1786. $.ajax({
  1787. method: "post",
  1788. dataType: "json",
  1789. crossDomain: false,
  1790. url: globalConfig.context + '/api/admin/customer/listBusiness',
  1791. data: {
  1792. pageNo: pageNo || 1,
  1793. pageSize: this.state.paginationt.pageSize,
  1794. uid: uids ? uids : this.state.rowId
  1795. },
  1796. success: function(data) {
  1797. let theArr = [];
  1798. if(data.error.length || data.data.list == "") {
  1799. if(data.error && data.error.length) {
  1800. message.warning(data.error[0].message);
  1801. };
  1802. } else {
  1803. for(let i = 0; i < data.data.list.length; i++) {
  1804. let thisdata = data.data.list[i];
  1805. theArr.push({
  1806. key: i,
  1807. businessId: thisdata.businessId,
  1808. businessName: thisdata.businessName,
  1809. identifyName: thisdata.identifyName,
  1810. followSituation: thisdata.followSituation,
  1811. customerStatus: thisdata.customerStatus,
  1812. adminName: thisdata.adminName,
  1813. createTime: thisdata.createTime
  1814. });
  1815. };
  1816. this.state.paginationt.current = data.data.pageNo;
  1817. this.state.paginationt.total = data.data.totalCount;
  1818. };
  1819. this.setState({
  1820. dataBusiness: theArr,
  1821. paginationt: this.state.paginationt
  1822. });
  1823. }.bind(this),
  1824. }).always(function() {
  1825. this.setState({
  1826. loading: false
  1827. });
  1828. }.bind(this));
  1829. },
  1830. //指定转交人自动补全
  1831. supervisor(e){
  1832. $.ajax({
  1833. method: "get",
  1834. dataType: "json",
  1835. crossDomain: false,
  1836. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  1837. data:{
  1838. adminName:e
  1839. },
  1840. success: function (data) {
  1841. let thedata=data.data;
  1842. if (!thedata) {
  1843. if (data.error && data.error.length) {
  1844. message.warning(data.error[0].message);
  1845. };
  1846. thedata = {};
  1847. };
  1848. this.setState({
  1849. customerArr:thedata,
  1850. });
  1851. }.bind(this),
  1852. }).always(function () {
  1853. this.setState({
  1854. loading: false
  1855. });
  1856. }.bind(this));
  1857. },
  1858. //上级主管输入框失去焦点是判断客户是否存在
  1859. selectAuto(value,options){
  1860. this.setState({
  1861. auto:value
  1862. })
  1863. },
  1864. blurChange(e){
  1865. console.log(e)
  1866. let theType='';
  1867. let contactLists=this.state.customerArr||[];
  1868. if (e) {
  1869. contactLists.map(function (item) {
  1870. if (item.name == e.toString()) {
  1871. theType = item.id;
  1872. }
  1873. });
  1874. }
  1875. this.setState({
  1876. theTypes:theType
  1877. })
  1878. },
  1879. //值改变时请求客户名称
  1880. httpChange(e){
  1881. if(e.length>=1){
  1882. this.supervisor(e);
  1883. }
  1884. this.setState({
  1885. auto:e
  1886. })
  1887. },
  1888. //转交
  1889. changeAssigner() {
  1890. if(this.state.theTypes){
  1891. this.setState({
  1892. selectedRowKeys: [],
  1893. });
  1894. let changeIds;
  1895. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1896. let rowItem = this.state.selectedRows[idx];
  1897. if(rowItem.id) {
  1898. changeIds = rowItem.id;
  1899. };
  1900. };
  1901. $.ajax({
  1902. method: "get",
  1903. dataType: "json",
  1904. crossDomain: false,
  1905. url: globalConfig.context + "/api/admin/customer/transferToOther",
  1906. data: {
  1907. uid: changeIds, //这一行数据的ID
  1908. aid: this.state.theTypes, //指定转交人的ID
  1909. }
  1910. }).done(function(data) {
  1911. if(!data.error.length) {
  1912. message.success('转交成功!');
  1913. this.setState({
  1914. auto:'',
  1915. loading: false,
  1916. });
  1917. } else {
  1918. message.warning(data.error[0].message);
  1919. };
  1920. this.loadData();
  1921. }.bind(this));
  1922. }else{
  1923. message.warning('请输入转交人姓名')
  1924. }
  1925. },
  1926. componentWillReceiveProps(nextProps) {
  1927. if(!this.props.visible && nextProps.visible) {
  1928. if(nextProps.data && nextProps.data.id) {
  1929. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  1930. };
  1931. this.state.data = {};
  1932. this.state.companyLogoUrl = [];
  1933. this.state.orgCodeUrl = [];
  1934. };
  1935. },
  1936. render() {
  1937. const FormItem = Form.Item
  1938. const rowSelection = {
  1939. selectedRowKeys: this.state.selectedRowKeys,
  1940. onChange: (selectedRowKeys, selectedRows) => {
  1941. this.setState({
  1942. selectedRows: selectedRows.slice(-1),
  1943. selectedRowKeys: selectedRowKeys.slice(-1)
  1944. });
  1945. },
  1946. onSelect: (recordt, selected, selectedRows) => {
  1947. this.setState({
  1948. recordt: recordt.id
  1949. })
  1950. },
  1951. };
  1952. const rowSelections = {
  1953. selectedRowKeys: this.state.selectedRowKey,
  1954. onChange: (selectedRowKey, selectedRow) => {
  1955. this.setState({
  1956. selectedRow: selectedRow.slice(-1),
  1957. selectedRowKey: selectedRowKey.slice(-1)
  1958. });
  1959. },
  1960. onSelect: (records, selected, selectedRow) => {
  1961. this.setState({
  1962. selectedRow: selectedRow.slice(-1),
  1963. records: records.id,
  1964. })
  1965. },
  1966. };
  1967. const hasSelected = this.state.selectedRowKeys.length > 0;
  1968. const { RangePicker } = DatePicker;
  1969. const { getFieldDecorator } = this.props.form;
  1970. const formItemLayout = {
  1971. labelCol: { span: 8 },
  1972. wrapperCol: { span: 14 },
  1973. };
  1974. const theInformation = this.state.dataInformation || {}
  1975. const contactsOption = "";
  1976. const formItemLayput = {
  1977. labelCol: { span: 10 },
  1978. wrapperCol: { span: 14 },
  1979. };
  1980. const contacts = this.state.contacts || '';
  1981. const dataSources=this.state.customerArr || [];
  1982. const options = dataSources.map((group) =>
  1983. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  1984. )
  1985. return(
  1986. <div className="user-content" >
  1987. <div className="content-title">
  1988. <span>我的客户</span>
  1989. </div>
  1990. <div className="user-search">
  1991. <Input placeholder="客户名称"
  1992. value={this.state.nameSearch}
  1993. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  1994. <Select placeholder="省"
  1995. style={{ width: 80 }}
  1996. value={this.state.provinceSearch}
  1997. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  1998. {this.state.Provinces}
  1999. </Select>
  2000. <span style={{marginRight:'10px'}}>
  2001. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  2002. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  2003. </span>
  2004. <Button type="primary" onClick={this.search}>搜索</Button>
  2005. <Button onClick={this.reset}>重置</Button>
  2006. <Button onClick={() => { window.open(globalConfig.context + '/api/admin/customer/downloadTemplate?type=1') }}>下载批量导入模板</Button>
  2007. <Upload
  2008. name="file"
  2009. action={globalConfig.context + "/api/admin/customer/uploadExcel"}
  2010. beforeUpload={beforeUploadFile}
  2011. showUploadList={false}
  2012. onChange={(info) => {
  2013. if (info.file.status !== 'uploading') {
  2014. console.log(info.file, info.fileList);
  2015. }
  2016. if (info.file.status === 'done') {
  2017. if (!info.file.response.error.length) {
  2018. message.success(`${info.file.name} 文件上传成功!`);
  2019. this.loadData();
  2020. } else {
  2021. message.warning(info.file.response.error[0].message);
  2022. return;
  2023. };
  2024. } else if (info.file.status === 'error') {
  2025. message.error(`${info.file.name} 文件上传失败。`);
  2026. };
  2027. }} >
  2028. <Button>上传批量内容</Button>
  2029. </Upload>
  2030. <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  2031. <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
  2032. disabled={!hasSelected}
  2033. >删除<Icon type="minus" />
  2034. </Button>
  2035. </Popconfirm>
  2036. <AutoComplete
  2037. className="certain-category-search"
  2038. dropdownClassName="certain-category-search-dropdown"
  2039. dropdownMatchSelectWidth={false}
  2040. dropdownStyle={{ width: 120 }}
  2041. style={{ width: '120px'}}
  2042. dataSource={options}
  2043. placeholder="输入转交人姓名"
  2044. value={this.state.auto}
  2045. onChange={this.httpChange}
  2046. filterOption={true}
  2047. onBlur={this.blurChange}
  2048. onSelect={this.selectAuto}
  2049. disabled={!hasSelected}
  2050. >
  2051. <Input />
  2052. </AutoComplete>
  2053. <Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
  2054. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  2055. disabled={!hasSelected}
  2056. onClick={this.changeRow}>转为公共客户<Icon /></Button>
  2057. <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  2058. <Button type="primary" className="addButton" onClick={this.addClick}>新增客户<Icon type="plus" /></Button>
  2059. <div className='clearfix' style={{marginTop:'5px'}}>
  2060. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  2061. <RangePicker
  2062. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  2063. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  2064. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  2065. <Select placeholder="账户状态"
  2066. style={{ width: 100 }}
  2067. value={this.state.statusSearch}
  2068. onChange={(e) => { this.setState({ statusSearch: e }) }}>
  2069. <Select.Option value="0" >正常</Select.Option>
  2070. <Select.Option value="2" >锁定</Select.Option>
  2071. </Select>
  2072. <Select placeholder="行业"
  2073. style={{ width: 100 }}
  2074. value={this.state.industrySearch}
  2075. onChange={(e) => { this.setState({ industrySearch: e }) }}>
  2076. {this.state.intentionalOption}
  2077. </Select>
  2078. <span>认证:</span>
  2079. <Select placeholder="业务认证"
  2080. style={{ width: 100 }}
  2081. value={this.state.serviceCertificationSearch}
  2082. onChange={(e) => { this.setState({ serviceCertificationSearch: e }) }}>
  2083. <Select.Option value="0" >未认证</Select.Option>
  2084. <Select.Option value="1" >已认证</Select.Option>
  2085. </Select>
  2086. <Select placeholder="实名认证"
  2087. style={{ width: 100 }}
  2088. value={this.state.userCertificationSearch}
  2089. onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
  2090. {
  2091. auditStatusL.map(function (item) {
  2092. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2093. })
  2094. }
  2095. </Select>
  2096. <span>国际:</span>
  2097. <Select placeholder="国际"
  2098. style={{ width: 100 }}
  2099. value={this.state.internationalSearch}
  2100. onChange={(e) => { this.setState({ internationalSearch: e }) }}>
  2101. <Select.Option value="0" >否</Select.Option>
  2102. <Select.Option value="1" >是</Select.Option>
  2103. </Select>
  2104. <span>高新:</span>
  2105. <Select placeholder="高新"
  2106. style={{ width: 100 }}
  2107. value={this.state.highTechZoneSearch}
  2108. onChange={(e) => { this.setState({ highTechZoneSearch: e }) }}>
  2109. <Select.Option value="0" >否</Select.Option>
  2110. <Select.Option value="1" >是</Select.Option>
  2111. </Select>
  2112. <span>上市:</span>
  2113. <Select placeholder="上市"
  2114. style={{ width: 100 }}
  2115. value={this.state.listedSearch}
  2116. onChange={(e) => { this.setState({ listedSearch: e }) }}>
  2117. <Select.Option value="0" >否</Select.Option>
  2118. <Select.Option value="1" >是</Select.Option>
  2119. </Select>
  2120. <span>会员:</span>
  2121. <Select placeholder="是否会员"
  2122. style={{ width: 100 }}
  2123. value={this.state.isMemberSearch}
  2124. onChange={(e) => { this.setState({ isMemberSearch: e }) }}>
  2125. <Select.Option value="0" >否</Select.Option>
  2126. <Select.Option value="1" >是</Select.Option>
  2127. </Select>
  2128. <Select placeholder="会员等级"
  2129. style={{ width: 100 }}
  2130. value={this.state.lvlSearch}
  2131. onChange={(e) => { this.setState({ lvlSearch: e }) }}>
  2132. {this.state.lvlArrOption}
  2133. </Select>
  2134. <Select placeholder="会员状态"
  2135. style={{ width: 100 }}
  2136. value={this.state.currentMemberStatusSearch}
  2137. onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
  2138. {this.state.currentMemberArrOption}
  2139. </Select>
  2140. <Select placeholder="社会性质"
  2141. style={{ width: 100 }}
  2142. value={this.state.societyTagSearch}
  2143. onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
  2144. {
  2145. socialAttribute.map(function (item) {
  2146. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2147. })
  2148. }
  2149. </Select>
  2150. </div>
  2151. </div>
  2152. </div>
  2153. <div className="patent-table">
  2154. <Spin spinning={this.state.loading}>
  2155. <Table columns={this.state.columns}
  2156. dataSource={this.state.dataSource}
  2157. rowSelection={rowSelection}
  2158. pagination={this.state.pagination}
  2159. onRowClick={this.tableRowClick}
  2160. />
  2161. </Spin>
  2162. </div>
  2163. <CustomerDetail
  2164. data={this.state.RowData}
  2165. showDesc={this.state.showDesc}
  2166. closeDesc={this.closeDesc}
  2167. newmodal={this.newmodal}
  2168. />
  2169. <Modal
  2170. className="customeDetails"
  2171. title="单位客户详情"
  2172. width='1200px'
  2173. visible={this.state.modal5Visible}
  2174. onOk={this.detailsModal}
  2175. onCancel={this.detailsModal}
  2176. footer=''
  2177. >
  2178. <Tabs defaultActiveKey="1" onChange={this.callback}>
  2179. <TabPane tab="基本信息" key="1">
  2180. <Form horizontal onSubmit={this.newSubmit} id="demand-form">
  2181. <Spin spinning={this.state.loading}>
  2182. <div className="clearfix" style={{paddingLeft:'60px'}}>
  2183. <FormItem className="half-item"
  2184. labelCol={{ span: 4 }}
  2185. wrapperCol={{ span: 18 }}
  2186. label="客户名称"
  2187. >
  2188. <span>{theInformation.identifyName}</span>
  2189. </FormItem>
  2190. </div>
  2191. <div className="clearfix" style={{paddingLeft:'60px'}}>
  2192. <FormItem className="half-item"
  2193. labelCol={{ span: 4 }}
  2194. wrapperCol={{ span: 18 }}
  2195. label="行业">
  2196. <Select placeholder="选择行业" value={this.state.industry} style={{width:'300px'}}
  2197. onChange={(e)=>{this.setState({industry:e})}}>
  2198. {
  2199. industry.map(function (item) {
  2200. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2201. })
  2202. }
  2203. </Select>
  2204. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2205. </FormItem>
  2206. <FormItem className="half-item"
  2207. labelCol={{ span: 4 }}
  2208. wrapperCol={{ span: 18 }}
  2209. label="社会属性"
  2210. >
  2211. <Select placeholder="客户社会属性(必填项)" value={this.state.societyTag} style={{width:'300px'}}
  2212. onChange={(e)=>{this.setState({societyTag:e})}}>
  2213. {
  2214. socialAttribute.map(function (item) {
  2215. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2216. })
  2217. }
  2218. </Select>
  2219. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2220. </FormItem>
  2221. <FormItem className="half-item"
  2222. labelCol={{ span: 4 }}
  2223. wrapperCol={{ span: 18 }}
  2224. label="省-市-区"
  2225. >
  2226. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'300px'}}
  2227. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  2228. <span style={{color:'red',marginLeft:'15px'}}>*</span>
  2229. </FormItem>
  2230. <FormItem className="half-item"
  2231. labelCol={{ span: 4 }}
  2232. wrapperCol={{ span: 18 }}
  2233. label="通信地址"
  2234. >
  2235. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  2236. onChange={(e)=>{this.setState({postalAddress:e.target.value})}}/>
  2237. </FormItem>
  2238. <FormItem className="half-item"
  2239. labelCol={{ span: 4 }}
  2240. wrapperCol={{ span: 18 }}
  2241. label="固定电话"
  2242. >
  2243. <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
  2244. onChange={(e)=>{this.setState({contactsFixedTel:e.target.value})}}/>
  2245. </FormItem>
  2246. <FormItem className="half-item"
  2247. labelCol={{ span: 4 }}
  2248. wrapperCol={{ span: 18 }}
  2249. label="客户传真"
  2250. >
  2251. <Input placeholder="客户传真" value={this.state.contactsFax}
  2252. onChange={(e)=>{this.setState({contactsFax:e.target.value})}}/>
  2253. </FormItem>
  2254. <FormItem className="half-item"
  2255. labelCol={{ span: 4 }}
  2256. wrapperCol={{ span: 18 }}
  2257. label="注册资本"
  2258. >
  2259. <Input placeholder="注册资本" value={this.state.registeredCapital}
  2260. onChange={(e)=>{this.setState({registeredCapital:e.target.value})}}/>
  2261. </FormItem>
  2262. <FormItem className="half-item"
  2263. labelCol={{ span: 4 }}
  2264. wrapperCol={{ span: 18 }}
  2265. label="单位规模"
  2266. >
  2267. <Input placeholder="单位规模" value={this.state.enterpriseScale}
  2268. onChange={(e)=>{this.setState({enterpriseScale:e.target.value})}}/>
  2269. </FormItem>
  2270. <FormItem className="half-item"
  2271. labelCol={{ span: 4 }}
  2272. wrapperCol={{ span: 18 }}
  2273. label="法人名称"
  2274. >
  2275. <Input placeholder="法人名称" value={this.state.legalPerson}
  2276. onChange={(e)=>{this.setState({legalPerson:e.target.value})}}/>
  2277. </FormItem>
  2278. <FormItem className="half-item"
  2279. labelCol={{ span: 4 }}
  2280. wrapperCol={{ span: 18 }}
  2281. label="身份证号码"
  2282. >
  2283. <Input placeholder="法人身份证号码" value={this.state.legalPersonIdCard}
  2284. onChange={(e)=>{this.setState({legalPersonIdCard:e.target.value})}}/>
  2285. </FormItem>
  2286. <FormItem className="half-item"
  2287. labelCol={{ span: 4 }}
  2288. wrapperCol={{ span: 18 }}
  2289. label="主要联系人"
  2290. >
  2291. <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
  2292. this.setState({ contacts: e.target.value })}}/>
  2293. </FormItem>
  2294. <FormItem className="half-item"
  2295. labelCol={{ span: 4 }}
  2296. wrapperCol={{ span: 18 }}
  2297. label="主要联系人号码"
  2298. >
  2299. <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
  2300. this.setState({ contactMobile: e.target.value })}}/>
  2301. </FormItem>
  2302. <FormItem className="half-item"
  2303. labelCol={{ span: 4 }}
  2304. wrapperCol={{ span: 18 }}
  2305. label="法人电话"
  2306. >
  2307. <Input placeholder="法人电话" value={this.state.legalPersonTel}
  2308. onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}}/>
  2309. </FormItem>
  2310. <FormItem className="half-item"
  2311. labelCol={{ span: 4 }}
  2312. wrapperCol={{ span: 18 }}
  2313. label="电子邮箱"
  2314. >
  2315. <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
  2316. onChange={(e)=>{this.setState({legalPersonEmail:e.target.value})}}/>
  2317. </FormItem>
  2318. <FormItem className="half-item"
  2319. labelCol={{ span: 4 }}
  2320. wrapperCol={{ span: 18 }}
  2321. label="机构代码"
  2322. >
  2323. <Input placeholder="社会同意机构代码" value={this.state.orgCode}
  2324. onChange={(e)=>{this.setState({orgCode:e.target.value})}}/>
  2325. </FormItem>
  2326. <FormItem className="half-item"
  2327. labelCol={{ span: 4 }}
  2328. wrapperCol={{ span: 18 }}
  2329. label="实名认证"
  2330. >
  2331. <Select placeholder="实名认证"
  2332. value={this.state.auditStatus}
  2333. onChange={(e) => { this.setState({ auditStatus: e }) }}>
  2334. {
  2335. auditStatusL.map(function (item) {
  2336. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2337. })
  2338. }
  2339. </Select>
  2340. </FormItem>
  2341. <div className="clearfix">
  2342. <FormItem className="half-item"
  2343. labelCol={{ span: 4 }}
  2344. wrapperCol={{ span: 18 }}
  2345. label="投资机构"
  2346. >
  2347. <Radio.Group value={this.state.investment} onChange={(e) => {
  2348. this.setState({investment:e.target.value})
  2349. }}>
  2350. <Radio value={0}>否</Radio>
  2351. <Radio value={1}>是</Radio>
  2352. </Radio.Group>
  2353. </FormItem>
  2354. <FormItem className="half-item"
  2355. labelCol={{ span: 4 }}
  2356. wrapperCol={{ span: 18 }}
  2357. label="业务认证"
  2358. >
  2359. <Radio.Group value={this.state.businessAudit} onChange={(e) => {
  2360. this.setState({ businessAudit: e.target.value })
  2361. }}>
  2362. <Radio value={0}>未认证</Radio>
  2363. <Radio value={1}>已认证</Radio>
  2364. </Radio.Group>
  2365. </FormItem>
  2366. <FormItem className="half-item"
  2367. labelCol={{ span: 4 }}
  2368. wrapperCol={{ span: 18 }}
  2369. label="高新"
  2370. >
  2371. <Radio.Group value={this.state.highTechZone} onChange={(e) => {
  2372. this.setState({highTechZone:e.target.value})
  2373. }}>
  2374. <Radio value={0}>否</Radio>
  2375. <Radio value={1}>是</Radio>
  2376. </Radio.Group>
  2377. </FormItem>
  2378. <FormItem className="half-item"
  2379. labelCol={{ span: 4 }}
  2380. wrapperCol={{ span: 18 }}
  2381. label="上市"
  2382. >
  2383. <Radio.Group value={this.state.listed} onChange={(e) => {
  2384. this.setState({listed:e.target.value })
  2385. }}>
  2386. <Radio value={0}>否</Radio>
  2387. <Radio value={1}>是</Radio>
  2388. </Radio.Group>
  2389. </FormItem>
  2390. <FormItem className="half-item"
  2391. labelCol={{ span: 4 }}
  2392. wrapperCol={{ span: 18 }}
  2393. label="国际化"
  2394. >
  2395. <Radio.Group value={this.state.international} onChange={(e) => {
  2396. this.setState({international:e.target.value })
  2397. }}>
  2398. <Radio value={0}>否</Radio>
  2399. <Radio value={1}>是</Radio>
  2400. </Radio.Group>
  2401. </FormItem>
  2402. </div>
  2403. <div className="clearfix pictures">
  2404. <FormItem
  2405. labelCol={{ span: 4 }}
  2406. wrapperCol={{ span: 18 }}
  2407. label="机构证(PIC)" >
  2408. <PicturesWall
  2409. pictureSign="PIC"
  2410. fileList={this.getOrgCodeUrl}
  2411. pictureUrl={this.state.orgCodeUrl} />
  2412. <p>图片建议:图片要清晰。</p>
  2413. </FormItem>
  2414. <FormItem
  2415. labelCol={{ span: 4 }}
  2416. wrapperCol={{ span: 18 }}
  2417. label="单位logo" >
  2418. <PicturesWall
  2419. pictureSign="logo"
  2420. fileList={this.getCompanyLogoUrl}
  2421. pictureUrl={this.state.companyLogoUrl} />
  2422. <p>图片建议:图片要清晰。</p>
  2423. </FormItem>
  2424. </div>
  2425. <div className="clearfix">
  2426. <FormItem
  2427. labelCol={{ span: 2 }}
  2428. wrapperCol={{ span: 18 }}
  2429. label="业务范围" >
  2430. <Input type="textarea" rows={4} value={this.state.businessScope}
  2431. onChange={(e)=>{this.setState({businessScope:e.target.value})}}/>
  2432. </FormItem>
  2433. <FormItem
  2434. labelCol={{ span: 2 }}
  2435. wrapperCol={{ span: 18 }}
  2436. label="单位简介" >
  2437. <Input type="textarea" rows={4} value={this.state.introduction}
  2438. onChange={(e)=>{this.setState({introduction:e.target.value})}}/>
  2439. </FormItem>
  2440. </div>
  2441. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'90px',marginBottom:'30px'}}>保存</Button>
  2442. <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
  2443. </div>
  2444. </Spin>
  2445. </Form>
  2446. </TabPane>
  2447. <TabPane tab="联系人信息" key="2">
  2448. <div className="clearfix" >
  2449. <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button>
  2450. </div>
  2451. <div className="clearfix">
  2452. <Spin spinning={this.state.loading}>
  2453. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  2454. <Table
  2455. pagination={false}
  2456. columns={this.state.ContactsLists}
  2457. dataSource={this.state.contactList}
  2458. />
  2459. <div className="clearfix">
  2460. <Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
  2461. <Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
  2462. </div>
  2463. </Form>
  2464. </Spin>
  2465. </div>
  2466. </TabPane>
  2467. <TabPane tab="账户信息" key="3">
  2468. <div className="clearfix">
  2469. <Form horizontal id="demand-form" onSubmit={this.accountSave} >
  2470. <Spin spinning={this.state.loading} >
  2471. <FormItem className="half-item"
  2472. {...formItemLayout}
  2473. label="注册手机号" >
  2474. <Input value={this.state.mobile} disabled
  2475. onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
  2476. <Button onClick={this.modifyPassworld}>修改密码</Button>
  2477. </FormItem>
  2478. <FormItem className="half-item"
  2479. {...formItemLayout}
  2480. label="注册用户名" >
  2481. <Input value={this.state.nickname} onChange={(e) => { this.setState({ nickname: e.target.value }); }} />
  2482. </FormItem>
  2483. <FormItem className="half-item"
  2484. {...formItemLayout}
  2485. label="注册邮箱" >
  2486. <Input value={this.state.email} onChange={(e) => { this.setState({ email: e.target.value }); }} />
  2487. </FormItem>
  2488. <div className="clearfix">
  2489. <FormItem className="half-item"
  2490. {...formItemLayout}
  2491. label="客户来源" >
  2492. <span>{this.state.source}</span>
  2493. </FormItem>
  2494. <FormItem className="half-item"
  2495. {...formItemLayout}
  2496. label="客户类型" >
  2497. <span>{this.state.type}</span>
  2498. </FormItem>
  2499. <FormItem className="half-item"
  2500. {...formItemLayout}
  2501. label="创建时间" >
  2502. <span>{this.state.createTimes}</span>
  2503. </FormItem>
  2504. <FormItem className="half-item"
  2505. {...formItemLayout}
  2506. label="账户状态"
  2507. >
  2508. <Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
  2509. {
  2510. statuslist.map(function (item) {
  2511. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2512. })
  2513. }
  2514. </Select>
  2515. </FormItem>
  2516. </div>
  2517. <div className="clearfix">
  2518. <FormItem className="half-item"
  2519. {...formItemLayout}
  2520. label="会员"
  2521. >
  2522. <Radio.Group value={this.state.isMember} onChange={(e) => {
  2523. this.setState({ isMember: e.target.value })
  2524. }}>
  2525. <Radio value={0}>否</Radio>
  2526. <Radio value={1}>是</Radio>
  2527. </Radio.Group>
  2528. </FormItem>
  2529. <FormItem className="half-item"
  2530. {...formItemLayout}
  2531. label="会员等级"
  2532. >
  2533. <Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
  2534. {
  2535. lvl.map(function (item) {
  2536. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2537. })
  2538. }
  2539. </Select>
  2540. </FormItem>
  2541. <FormItem className="half-item"
  2542. {...formItemLayout}
  2543. label="会员状态"
  2544. >
  2545. <Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
  2546. {
  2547. currentMember.map(function (item) {
  2548. return <Select.Option key={item.value} >{item.key}</Select.Option>
  2549. })
  2550. }
  2551. </Select>
  2552. </FormItem>
  2553. </div>
  2554. <div className="clearfix">
  2555. <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
  2556. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  2557. </div>
  2558. </Spin>
  2559. </Form>
  2560. </div>
  2561. </TabPane>
  2562. <TabPane tab="客户拜访" key="4">
  2563. <div className="clearfix">
  2564. <Spin spinning={this.state.loading}>
  2565. <Table
  2566. pagination={false}
  2567. columns={this.state.visitsList}
  2568. dataSource={this.state.visitArrList}
  2569. onRowClick={this.VisitRowClick}
  2570. />
  2571. </Spin>
  2572. </div>
  2573. </TabPane>
  2574. <TabPane tab="业务意向" key="5">
  2575. <div className="clearfix">
  2576. <Spin spinning={this.state.loading}>
  2577. <Table
  2578. pagination={this.state.paginationt}
  2579. columns={this.state.businessIntentionList}
  2580. dataSource={this.state.dataBusiness}
  2581. />
  2582. </Spin>
  2583. </div>
  2584. </TabPane>
  2585. <TabPane tab="业务订单" key="6">
  2586. </TabPane>
  2587. <TabPane tab="技术需求" key="7">
  2588. </TabPane>
  2589. <TabPane tab="技术成果" key="8">
  2590. </TabPane>
  2591. <TabPane tab="技术专家" key="9">
  2592. </TabPane>
  2593. </Tabs>
  2594. </Modal>
  2595. <Modal
  2596. className="customeDetails"
  2597. footer=''
  2598. title="拜访详情"
  2599. width='1000px'
  2600. visible={this.state.visitModul}
  2601. onOk={this.visitOk}
  2602. onCancel={this.visitCancel}
  2603. >
  2604. <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
  2605. <Spin spinning={this.state.loading}>
  2606. <div className="clearfix">
  2607. <FormItem className="half-item"
  2608. {...formItemLayout}
  2609. label="拜访方式" >
  2610. <Radio.Group value={this.state.contactType} onChange={(e) => {
  2611. this.setState({ contactType: e.target.value })
  2612. }}>
  2613. <Radio value={0}>外出</Radio>
  2614. <Radio value={1}>电话</Radio>
  2615. <Radio value={2}>QQ</Radio>
  2616. <Radio value={3}>微信</Radio>
  2617. <Radio value={4}>邮箱</Radio>
  2618. </Radio.Group>
  2619. </FormItem>
  2620. <FormItem className="half-item"
  2621. {...formItemLayout}
  2622. >
  2623. <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px',display:this.state.keys?'inline-block':'none'}}>添加新联系人</Button>
  2624. </FormItem>
  2625. <div className="clearfix">
  2626. <FormItem className="half-item"
  2627. {...formItemLayout}
  2628. label="客户名称"
  2629. >
  2630. <span>{this.state.identifyName}</span>
  2631. </FormItem>
  2632. <FormItem className="half-item"
  2633. {...formItemLayout}
  2634. label="拜访人"
  2635. >
  2636. <span>{this.state.adminName}</span>
  2637. </FormItem>
  2638. <FormItem className="half-item"
  2639. {...formItemLayout}
  2640. label="当前联系人"
  2641. >
  2642. <span>{this.state.contacts}</span>
  2643. </FormItem>
  2644. {this.state.contacts?<span></span>:
  2645. <FormItem className="half-item"
  2646. {...formItemLayout}
  2647. label="联系人"
  2648. >
  2649. <Select placeholder="选择联系人" style={{ width: 140 }}
  2650. value={this.state.lastName}
  2651. onChange={this.hundleName}>
  2652. {this.state.orderStatusOption}
  2653. </Select>
  2654. </FormItem>
  2655. }
  2656. <FormItem className="half-item"
  2657. {...formItemLayout}
  2658. label="拜访时间"
  2659. >
  2660. <span>{this.state.followTime}</span>
  2661. </FormItem>
  2662. <FormItem className="half-item"
  2663. {...formItemLayout}
  2664. label="联系电话"
  2665. >
  2666. <span>{this.state.nub}</span>
  2667. </FormItem>
  2668. </div>
  2669. <div className="clearfix">
  2670. <FormItem
  2671. labelCol={{ span: 4 }}
  2672. wrapperCol={{ span: 16 }}
  2673. label="拜访备注" >
  2674. <Input type="textarea" rows={4} value={this.state.result}
  2675. onChange={(e)=>{this.setState({result:e.target.value})}}/>
  2676. </FormItem>
  2677. </div>
  2678. <div className="clearfix">
  2679. <div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
  2680. <div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
  2681. <Spin spinning={this.state.loading}>
  2682. <Table
  2683. rowKey={record => record.id}
  2684. pagination={false}
  2685. columns={this.state.intentionList}
  2686. dataSource={this.state.data}
  2687. />
  2688. </Spin>
  2689. </div>
  2690. </div>
  2691. </div>
  2692. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 35px 35px 120px'}}>保存</Button>
  2693. <Button size="large" onClick={this.visitCancel}>取消</Button>
  2694. </Spin>
  2695. </Form>
  2696. </Modal>
  2697. <Modal
  2698. footer=''
  2699. title="修改密码"
  2700. width='600px'
  2701. visible={this.state.passworldModul}
  2702. onOk={this.passworldOk}
  2703. onCancel={this.passworldCancel}
  2704. >
  2705. <div className="clearfix">
  2706. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2707. <Spin spinning={this.state.loading}>
  2708. <div className="clearfix">
  2709. <FormItem className="half-item"
  2710. {...formItemLayout}
  2711. label="原密码" >
  2712. <Input type="password" value={this.state.companyNamet1} onChange={(e) => { this.setState({ companyNamet1: e.target.value }); }} required="required" />
  2713. </FormItem>
  2714. </div>
  2715. <div className="clearfix">
  2716. <FormItem className="half-item"
  2717. {...formItemLayout}
  2718. label="新密码" >
  2719. <Input type="password" value={this.state.companyName1} onChange={(e) => { this.setState({ companyName1: 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.companyNam1} onChange={(e) => { this.setState({ companyNam1: e.target.value }); }} required="required" />
  2727. </FormItem>
  2728. </div>
  2729. <Button type="primary" size="large" htmlType="submit" style={{margin:'15px 15px 20px 95px'}}>保存</Button>
  2730. <Button size="large" onClick={this.passworldCancel}>取消</Button>
  2731. </Spin>
  2732. </Form>
  2733. </div>
  2734. </Modal>
  2735. <Modal
  2736. footer=''
  2737. width='800px'
  2738. title="新增联系人"
  2739. visible={this.state.addcontactModul}
  2740. onOk={this.addcontactModulOK}
  2741. onCancel={this.addcontactModulcancel}
  2742. >
  2743. <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
  2744. <Spin spinning={this.state.loading}>
  2745. <Row>
  2746. <FormItem
  2747. labelCol={{ span: 3 }}
  2748. wrapperCol={{ span: 14 }}
  2749. label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
  2750. <Radio.Group value={this.state.newsex} onChange={(e) => {
  2751. this.setState({ newsex: e.target.value })
  2752. }}>
  2753. <Radio value='男'>男</Radio>
  2754. <Radio value='女'>女</Radio>
  2755. </Radio.Group>
  2756. </FormItem>
  2757. </Row>
  2758. <Row style={{ paddingLeft:'50px' }}>
  2759. <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
  2760. <Col span={8}>
  2761. <Input value={this.state.newname} required="required"
  2762. onChange={(e) => { this.setState({ newname: e.target.value }) }} />
  2763. </Col>
  2764. <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
  2765. <Col span={8}>
  2766. <Input value={this.state.newmobile} required="required"
  2767. onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
  2768. </Col>
  2769. </Row>
  2770. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2771. <Col span={2}>微信:</Col>
  2772. <Col span={8}>
  2773. <Input value={this.state.newwechat}
  2774. onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
  2775. </Col>
  2776. <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
  2777. <Col span={8}>
  2778. <Input value={this.state.newqq}
  2779. onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
  2780. </Col>
  2781. </Row>
  2782. <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
  2783. <Col span={2}>部门:</Col>
  2784. <Col span={8}>
  2785. <Input value={this.state.newdepatrment}
  2786. onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
  2787. </Col>
  2788. <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
  2789. <Col span={8}>
  2790. <Input value={this.state.newposition}
  2791. onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
  2792. </Col>
  2793. </Row>
  2794. <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
  2795. <Col span={2}>邮箱:</Col>
  2796. <Col span={8}>
  2797. <Input value={this.state.newemail}
  2798. onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
  2799. </Col>
  2800. </Row>
  2801. <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
  2802. <Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:'60px'}}>保存</Button>
  2803. <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
  2804. </Row>
  2805. </Spin>
  2806. </Form>
  2807. </Modal>
  2808. <Modal
  2809. footer=''
  2810. title="业务意向详情"
  2811. width='1000px'
  2812. visible={this.state.businessModul}
  2813. onOk={this.businessIntentionOk}
  2814. onCancel={this.businessIntentionCancel}
  2815. >
  2816. <div className="clearfix">
  2817. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2818. <Spin spinning={this.state.loading}>
  2819. <div className="clearfix">
  2820. <FormItem className="half-item"
  2821. {...formItemLayout}
  2822. label="意向业务名称" >
  2823. <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
  2824. </FormItem>
  2825. <FormItem className="half-item"
  2826. {...formItemLayout}
  2827. label="意向时间" >
  2828. <span>{this.state.createTime}</span>
  2829. </FormItem>
  2830. <FormItem className="half-item"
  2831. {...formItemLayout}
  2832. label="客户名称" >
  2833. <span>{this.state.identifyName}</span>
  2834. </FormItem>
  2835. <FormItem className="half-item"
  2836. {...formItemLayout}
  2837. label="营销员" >
  2838. <span>{this.state.adminName}</span>
  2839. </FormItem>
  2840. <FormItem className="half-item"
  2841. {...formItemLayout}
  2842. label="意向业务进度" >
  2843. <span>{getfllowSituation(this.state.followSituation)}</span>
  2844. </FormItem>
  2845. <FormItem className="half-item"
  2846. {...formItemLayout}
  2847. label="业务客户状态" >
  2848. <span>{getcustomerStatue(this.state.customerStatus)}</span>
  2849. </FormItem>
  2850. </div>
  2851. <div className="clearfix">
  2852. <FormItem className="half-item"
  2853. {...formItemLayout}
  2854. label="业务意向说明" >
  2855. <span>{this.state.remarks}</span>
  2856. </FormItem>
  2857. </div>
  2858. <div className="clearfix">
  2859. <div style={{fontSize:'18px',lineHeight:'24px',marginBottom:'10px'}}>业务跟进</div>
  2860. <div className="clearfix">
  2861. <Spin spinning={this.state.loading}>
  2862. <Table
  2863. pagination={this.state.paginations}
  2864. columns={this.state.businessFollowList}
  2865. dataSource={this.state.visitArrList}
  2866. />
  2867. </Spin>
  2868. </div>
  2869. </div>
  2870. </Spin>
  2871. </Form>
  2872. </div>
  2873. </Modal>
  2874. <Modal
  2875. footer=''
  2876. title="业务跟进详情"
  2877. width='600px'
  2878. visible={this.state.businessFollowModul}
  2879. onOk={this.businessFollowOk}
  2880. onCancel={this.businessFollowCancel}
  2881. >
  2882. <div className="clearfix">
  2883. <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
  2884. <Spin spinning={this.state.loading}>
  2885. <div className="clearfix">
  2886. <FormItem className="half-item"
  2887. {...formItemLayout}
  2888. label="意向业务名称" >
  2889. <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
  2890. </FormItem>
  2891. <FormItem className="half-item"
  2892. {...formItemLayout}
  2893. label="意向时间" >
  2894. <span>{this.state.createTimes}</span>
  2895. </FormItem>
  2896. <FormItem className="half-item"
  2897. {...formItemLayout}
  2898. label="客户名称" >
  2899. <span>{this.state.identifyNames}</span>
  2900. </FormItem>
  2901. <FormItem className="half-item"
  2902. {...formItemLayout}
  2903. label="营销员" >
  2904. <span>{this.state.adminNames}</span>
  2905. </FormItem>
  2906. <FormItem className="half-item"
  2907. {...formItemLayout}
  2908. label="意向业务进度" >
  2909. <span>{getfllowSituation(this.state.followSituations)}</span>
  2910. </FormItem>
  2911. <FormItem className="half-item"
  2912. {...formItemLayout}
  2913. label="业务客户状态" >
  2914. <span>{getcustomerStatue(this.state.customerStatuss)}</span>
  2915. </FormItem>
  2916. </div>
  2917. <div className="clearfix">
  2918. <FormItem className="half-item"
  2919. {...formItemLayout}
  2920. label="业务意向说明" >
  2921. <span>{this.state.remarkss}</span>
  2922. </FormItem>
  2923. </div>
  2924. <div className="clearfix">
  2925. <div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
  2926. <FormItem className="half-item"
  2927. {...formItemLayout}
  2928. label="拜访方式" >
  2929. <span>{getContactType(this.state.contactTypes)}</span>
  2930. </FormItem>
  2931. <FormItem className="half-item"
  2932. {...formItemLayout}
  2933. label="联系人" >
  2934. <span>{this.state.contactss}</span>
  2935. </FormItem>
  2936. <FormItem className="half-item"
  2937. {...formItemLayout}
  2938. label="联系电话" >
  2939. <span>{this.state.contactMobiles}</span>
  2940. </FormItem>
  2941. <FormItem className="half-item"
  2942. {...formItemLayout}
  2943. label="拜访时间" >
  2944. <span>{this.state.followTimes}</span>
  2945. </FormItem>
  2946. <FormItem className="half-item"
  2947. {...formItemLayout}
  2948. label="拜访人" >
  2949. <span>{this.state.adminNames}</span>
  2950. </FormItem>
  2951. <div className="clearfix">
  2952. <FormItem className="half-item"
  2953. {...formItemLayout}
  2954. label="拜访备注" >
  2955. <span>{this.state.results}</span>
  2956. </FormItem>
  2957. </div>
  2958. </div>
  2959. </Spin>
  2960. </Form>
  2961. </div>
  2962. </Modal>
  2963. </div >
  2964. );
  2965. }
  2966. }));
  2967. export default MyClient;