organizationManages.jsx 105 KB

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