myClient.jsx 104 KB

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