organizationManages.jsx 106 KB

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