myClient.jsx 100 KB

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