organizationManages.jsx 104 KB

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