individualCustomer.jsx 123 KB

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