queryCustomer.jsx 132 KB

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