organizationManages.jsx 100 KB

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