organizationManages.jsx 105 KB

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