myClient.jsx 105 KB

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