organizationManages.jsx 105 KB

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