crm.jsx 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340
  1. import React from 'react';
  2. import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message,Calendar , DatePicker, Upload, Form ,Modal,Tabs,Card } from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import Jquery from 'jquery/dist/jquery.js';
  6. import moment from 'moment';
  7. import {Document,Page}from 'react-pdf';
  8. import PDF from 'react-pdf';
  9. import 'viewer/dist/crocodoc.viewer.css';
  10. import TechAchievementDesc from '@/manageCenter/achievement/crmAchievement.jsx';
  11. import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
  12. import { socialAttribute, industry, auditStatusL, lvl, currentMember ,slcRedit,dataGrade,year,xiangmoState} from '@/dataDic.js';
  13. import {
  14. getSocialAttribute,
  15. beforeUploadFile,
  16. splitUrl,
  17. getSlcRedit,
  18. getDataGrade,
  19. getAchievementCategory,
  20. getTechAuditStatus,
  21. getboutique,
  22. getPreviews,
  23. getPreview,
  24. getXiangmoState,
  25. ShowModal
  26. } from "@/tools.js";
  27. import './customer.less';
  28. const TabPane = Tabs.TabPane;
  29. import ShowModalDiv from "@/showModal.jsx";
  30. const Dragger = Upload.Dragger;
  31. //图片组件
  32. const PicturesWall = React.createClass({
  33. getInitialState() {
  34. return {
  35. previewVisible: false,
  36. previewImage: '',
  37. fileList: [],
  38. }
  39. },
  40. handleCancel() {
  41. this.setState({
  42. previewVisible: false
  43. })
  44. },
  45. handlePreview(file) {
  46. this.setState({
  47. previewImage: file.url || file.thumbUrl,
  48. previewVisible: true,
  49. });
  50. },
  51. handleChange(info) {
  52. let fileList = info.fileList;
  53. this.setState({
  54. fileList
  55. });
  56. this.props.fileList(fileList);
  57. },
  58. componentWillReceiveProps(nextProps) {
  59. this.state.fileList = nextProps.pictureUrl;
  60. this.state.pojectApplicationUrl = undefined;
  61. },
  62. render() {
  63. const {
  64. previewVisible,
  65. previewImage,
  66. fileList
  67. } = this.state;
  68. const uploadButton = (
  69. <div>
  70. <Icon type="plus" />
  71. <div className="ant-upload-text">点击上传</div>
  72. </div>
  73. );
  74. return(
  75. <div style={{display:"inline-block"}}>
  76. <Upload
  77. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  78. data={{ 'sign': '' }}
  79. listType="picture-card"
  80. fileList={fileList}
  81. onPreview={this.handlePreview}
  82. onChange={this.handleChange} >
  83. {fileList.length >= 1 ? null : uploadButton}
  84. </Upload>
  85. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  86. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  87. </Modal>
  88. </div>
  89. );
  90. }
  91. });
  92. const IntentionCustomer = Form.create()(React.createClass({
  93. loadData(pageNo, apiUrl) {
  94. this.setState({
  95. visitModul:false,
  96. loading: true,
  97. ispage:pageNo,
  98. modalVisible:false
  99. });
  100. $.ajax({
  101. method: "post",
  102. dataType: "json",
  103. crossDomain: false,
  104. url: globalConfig.context +"/api/admin/customer/listCustomerInformation",
  105. data: {
  106. pageNo: pageNo || 1,
  107. pageSize: this.state.pagination.pageSize,
  108. name: this.state.nameSearch,
  109. dataGrade: this.state.dataGrade,
  110. follow: this.state.follow,
  111. province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
  112. city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
  113. startDate: this.state.releaseDate[0],
  114. endDate: this.state.releaseDate[1],
  115. },
  116. success: function(data) {
  117. ShowModal(this);
  118. let theArr = [];
  119. if(data.error.length || data.data.list == "") {
  120. if(data.error && data.error.length) {
  121. message.warning(data.error[0].message);
  122. };
  123. } else {
  124. for(let i = 0; i < data.data.list.length; i++) {
  125. let thisdata = data.data.list[i];
  126. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  127. theArr.push({
  128. key: i,
  129. id: thisdata.id,//用户ID
  130. type:thisdata.type,//类型
  131. name: thisdata.name,//用户名称
  132. diqu: diqu,//省市区
  133. industry: thisdata.industry,//行业
  134. dataGrade:thisdata.dataGrade?(thisdata.dataGrade*100).toFixed(2)+"%":"",//是否完善render:(text)=>{return ((text*100).toFixed(2)+"%") }
  135. contacts: thisdata.contacts,//联系人
  136. contactMobile: thisdata.contactMobile,//联系人电话
  137. createTime: thisdata.createTime,//行业
  138. });
  139. };
  140. this.state.pagination.current = data.data.pageNo;
  141. this.state.pagination.total = data.data.totalCount;
  142. };
  143. if(data.data&&data.data.list&&!data.data.list.length){
  144. this.state.pagination.current=0
  145. this.state.pagination.total=0
  146. }
  147. this.setState({
  148. dataSource: theArr,
  149. pageNo: pageNo,
  150. pagination: this.state.pagination,
  151. selectedRowKeys:[]
  152. });
  153. }.bind(this),
  154. }).always(function() {
  155. this.setState({
  156. loading: false
  157. });
  158. }.bind(this));
  159. },
  160. loadDatas(pageNos) {
  161. this.setState({
  162. loading: true,
  163. });
  164. $.ajax({
  165. method: "get",
  166. dataType: "json",
  167. crossDomain: false,
  168. url: globalConfig.context + "/api/admin/achievement/listUserAchievement",
  169. data: {
  170. pageNo: pageNos || 1,
  171. pageSize: this.state.paginationDate.pageSize,
  172. uid:this.state.uid,
  173. },
  174. success: function (data) {
  175. let theArr = [];
  176. if (!data.data || !data.data.list) {
  177. if (data.error && data.error.length) {
  178. message.warning(data.error[0].message);
  179. };
  180. } else {
  181. for (let i = 0; i < data.data.list.length; i++) {
  182. let thisdata = data.data.list[i];
  183. theArr.push({
  184. key: i,
  185. id: thisdata.id,
  186. serialNumber: thisdata.serialNumber,
  187. dataCategory: thisdata.dataCategory,
  188. name: thisdata.name,
  189. keyword: thisdata.keyword,
  190. theName: thisdata.username || thisdata.ownerName,
  191. category: thisdata.category,
  192. ownerName: thisdata.username ? thisdata.username : thisdata.ownerName,
  193. ownerType: thisdata.ownerType,
  194. ownerMobile: thisdata.ownerMobile,
  195. status: thisdata.status,
  196. releaseDate: thisdata.releaseDate,
  197. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  198. auditStatus: thisdata.auditStatus,
  199. boutique: thisdata.boutique,
  200. hot: thisdata.hot,
  201. techBrokerId:thisdata.techBrokerId,
  202. createTimeFormattedDate: thisdata.createTimeFormattedDate,
  203. remark:thisdata.remark
  204. });
  205. };
  206. this.state.paginationDate.current = data.data.pageNo;
  207. this.state.paginationDate.total = data.data.totalCount;
  208. };
  209. this.setState({
  210. dataSourceDate: theArr,
  211. pageNos: pageNos,
  212. paginationDate: this.state.paginationDate
  213. });
  214. }.bind(this),
  215. }).always(function () {
  216. this.setState({
  217. loading: false
  218. });
  219. }.bind(this));
  220. },
  221. loadDatac(pageNo, apiUrl) {
  222. this.setState({
  223. loading: true,
  224. });
  225. $.ajax({
  226. method: "get",
  227. dataType: "json",
  228. crossDomain: false,
  229. url: globalConfig.context +"/api/admin/customers/selectListOrgAnnual",
  230. data: {
  231. // pageNo: pageNo || 1,
  232. // pageSize: this.state.pagination.pageSize,
  233. uid:this.state.uid,
  234. },
  235. success: function(data) {
  236. let theArr = [];
  237. if(data.error.length || data.data.list == "") {
  238. if(data.error && data.error.length) {
  239. message.warning(data.error[0].message);
  240. };
  241. } else {
  242. for(let i = 0; i < data.data.list.length; i++) {
  243. let thisdata = data.data.list[i];
  244. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  245. theArr.push({
  246. key: i,
  247. id: thisdata.id,//年报ID
  248. uid: thisdata.uid,//客户ID
  249. year:thisdata.year,//年份
  250. salesAmount: thisdata.salesAmount,//营销额
  251. researchAmount: thisdata.researchAmount,//研发费用
  252. assets: thisdata.assets,//总资产
  253. fixedAssets:thisdata.fixedAssets,//固定资产
  254. aid: thisdata.aid,//录入人
  255. });
  256. };
  257. // this.state.pagination.current = data.data.pageNo;
  258. // this.state.pagination.total = data.data.totalCount;
  259. };
  260. if(data.data&&data.data.list&&!data.data.list.length){
  261. this.state.pagination.current=0
  262. this.state.pagination.total=0
  263. }
  264. this.setState({
  265. dataSourcec: theArr,
  266. // pageNo: pageNo,
  267. // pagination: this.state.pagination,
  268. // selectedRowKeys:[]
  269. });
  270. }.bind(this),
  271. }).always(function() {
  272. this.setState({
  273. loading: false
  274. });
  275. }.bind(this));
  276. },
  277. loadDatax(pageNo, apiUrl) {
  278. this.setState({
  279. loading: true,
  280. });
  281. $.ajax({
  282. method: "get",
  283. dataType: "json",
  284. crossDomain: false,
  285. url: globalConfig.context +"/api/admin/customers/selectListOrgYearProject",
  286. data: {
  287. uid:this.state.uid,
  288. },
  289. success: function(data) {
  290. let theArr = [];
  291. if(data.error.length || data.data.list == "") {
  292. if(data.error && data.error.length) {
  293. message.warning(data.error[0].message);
  294. };
  295. } else {
  296. for(let i = 0; i < data.data.list.length; i++) {
  297. let thisdata = data.data.list[i];
  298. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  299. theArr.push({
  300. key: i,
  301. id: thisdata.id,//用户ID
  302. uid: thisdata.uid,//客户ID
  303. projectName:thisdata.projectName,//项目名称
  304. year: thisdata.year,//年份
  305. status: thisdata.status?thisdata.status.toString():"",//项目状态
  306. remark: thisdata.remark,//备注
  307. aid: thisdata.aid,//录入人
  308. });
  309. };
  310. // this.state.pagination.current = data.data.pageNo;
  311. // this.state.pagination.total = data.data.totalCount;
  312. };
  313. if(data.data&&data.data.list&&!data.data.list.length){
  314. this.state.pagination.current=0
  315. this.state.pagination.total=0
  316. }
  317. this.setState({
  318. dataSourcex: theArr,
  319. });
  320. }.bind(this),
  321. }).always(function() {
  322. this.setState({
  323. loading: false
  324. });
  325. }.bind(this));
  326. },
  327. getInitialState() {
  328. return {
  329. pages:1,
  330. pdfUrl:'',
  331. addressSearch: [],
  332. orgCodeUrl: [],
  333. companyLogoUrl: [],
  334. visible: false,
  335. releaseDate: [],
  336. visitModul:false,
  337. detailApi:'',
  338. followData:{},
  339. selectedRowKeys: [],
  340. selectedRows: [],
  341. loading: false,
  342. callnub:"0",
  343. pojectApplicationUrl:"",
  344. isXian:0,
  345. modalVisible:false,
  346. numPages: null,
  347. pageNumber: 1,
  348. pagec:0,
  349. pages:18,
  350. isXin:1,
  351. pagination: {
  352. defaultCurrent: 1,
  353. defaultPageSize: 10,
  354. showQuickJumper: true,
  355. pageSize: 10,
  356. onChange: function(page) {
  357. this.loadData(page);
  358. }.bind(this),
  359. showTotal: function(total) {
  360. return '共' + total + '条数据';
  361. }
  362. },
  363. paginationDate: {
  364. defaultCurrent: 1,
  365. defaultPageSize: 10,
  366. showQuickJumper: true,
  367. pageSize: 10,
  368. onChange: function(page) {
  369. this.loadDatas(page);
  370. }.bind(this),
  371. showTotal: function(total) {
  372. return '共' + total + '条数据';
  373. }
  374. },
  375. columns: [{
  376. title: '客户名称',
  377. dataIndex: 'name',
  378. key: 'name',
  379. }, {
  380. title: '地区',
  381. dataIndex: 'diqu',
  382. key: 'diqu',
  383. }, {
  384. title: '联系人',
  385. dataIndex: 'contacts',
  386. key: 'contacts',
  387. },{
  388. title: '联系电话',
  389. dataIndex: 'contactMobile',
  390. key: 'contactMobile',
  391. },
  392. {
  393. title: '资料完整度',
  394. dataIndex: 'dataGrade',
  395. key: 'dataGrade',
  396. },
  397. {
  398. title: '行业',
  399. dataIndex: 'industry',
  400. key: 'industry'
  401. },
  402. {
  403. title: '创建时间',
  404. dataIndex: 'createTime',
  405. key: 'createTime',
  406. }
  407. ],
  408. data: [],
  409. dataSource: [],
  410. columnsDate: [
  411. {
  412. title: '编号',
  413. dataIndex: 'serialNumber',
  414. key: 'serialNumber',
  415. }, {
  416. title: '名称',
  417. dataIndex: 'name',
  418. key: 'name',
  419. }, {
  420. title: '关键字',
  421. dataIndex: 'keyword',
  422. key: 'keyword',
  423. }, {
  424. title: '类型',
  425. dataIndex: 'category',
  426. key: 'category',
  427. render: text => { return getAchievementCategory(text); }
  428. },{
  429. title: '审核状态',
  430. dataIndex: 'auditStatus',
  431. key: 'auditStatus',
  432. render: text => { return getTechAuditStatus(text) }
  433. },
  434. {
  435. title: '是否精品',
  436. dataIndex: 'boutique',
  437. key: 'boutique',
  438. render: text => { return getboutique(text) }
  439. },
  440. {
  441. title: '发布时间',
  442. dataIndex: 'releaseDateFormattedDate',
  443. key: 'releaseDateFormattedDate',
  444. },{
  445. title: '录入时间',
  446. dataIndex: 'createTimeFormattedDate',
  447. key: 'createTimeFormattedDate',
  448. },
  449. ],
  450. dataSourceDate: [],
  451. columnsc: [{
  452. title: '年份',
  453. dataIndex: 'year',
  454. key: 'year',
  455. }, {
  456. title: '营销收入(万)',
  457. dataIndex: 'salesAmount',
  458. key: 'salesAmount',
  459. },
  460. {
  461. title: '总资产(万)',
  462. dataIndex: 'assets',
  463. key: 'assets'
  464. },
  465. {
  466. title: '固定资产(万)',
  467. dataIndex: 'fixedAssets',
  468. key: 'fixedAssets'
  469. }, {
  470. title: '研发费用(万)',
  471. dataIndex: 'researchAmount',
  472. key: 'researchAmount',
  473. },{
  474. title: '操作',
  475. dataIndex: 'rrtk',
  476. key: 'rrtk',
  477. render:(text,record,index)=>{
  478. return (
  479. <div>
  480. <Popconfirm title={'您将删除该条财务信息,请确认!'} onConfirm={(e)=>{this.deltalc(record)}} okText="确认" cancelText="取消">
  481. <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  482. </Popconfirm>
  483. </div>
  484. )
  485. }
  486. }
  487. ],
  488. dataSourcec: [],
  489. columnsx: [{
  490. title: '项目名称',
  491. dataIndex: 'projectName',
  492. key: 'projectName',
  493. },{
  494. title: '年份',
  495. dataIndex: 'year',
  496. key: 'year',
  497. },
  498. {
  499. title: '项目状态',
  500. dataIndex: 'status',
  501. key: 'status',
  502. render: text => { return getXiangmoState(text); }
  503. }, {
  504. title: '备注',
  505. dataIndex: 'remark',
  506. key: 'remark',
  507. },{
  508. title: '操作',
  509. dataIndex: 'rrtk',
  510. key: 'rrtk',
  511. render:(text,record,index)=>{
  512. return (
  513. <div>
  514. <Popconfirm title={'您将删除该项目,请确认!'} onConfirm={(e)=>{this.deltalx(record)}} okText="确认" cancelText="取消">
  515. <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  516. </Popconfirm>
  517. </div>
  518. )
  519. }
  520. }
  521. ],
  522. dataSourcex: [],
  523. };
  524. },
  525. componentWillMount() {
  526. //城市
  527. let Province = [];
  528. provinceList.map(function(item) {
  529. var id = String(item.id)
  530. Province.push(
  531. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  532. )
  533. });
  534. //行业
  535. let intentionalArr = [];
  536. industry.map(function(item) {
  537. intentionalArr.push(
  538. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  539. )
  540. });
  541. //会员等级
  542. let lvlArr = [];
  543. lvl.map(function(item) {
  544. lvlArr.push(
  545. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  546. )
  547. });
  548. //会员状态customerStatus
  549. let currentMemberArr = [];
  550. currentMember.map(function(item) {
  551. currentMemberArr.push(
  552. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  553. )
  554. });
  555. this.state.Provinces = Province;
  556. this.state.intentionalOption = intentionalArr;
  557. this.state.lvlArrOption = lvlArr;
  558. this.state.currentMemberArrOption = currentMemberArr;
  559. this.loadData();
  560. },
  561. search() {
  562. this.loadData();
  563. },
  564. reset() {
  565. this.state.nameSearch = '';
  566. this.state.addressSearch = [];
  567. this.state.dataGrade=undefined;
  568. this.state.follow=undefined;
  569. this.state.provinceSearch = undefined;
  570. this.state.citySearch = undefined;
  571. this.state.releaseDate[0] = undefined;
  572. this.state.releaseDate[1] = undefined;
  573. this.loadData();
  574. },
  575. resetc() {
  576. this.state.id=undefined;//年报ID
  577. this.state.assets=undefined;//总资产
  578. this.state.fixedAssets=undefined;//固定资产
  579. this.state.researchAmount=undefined;//研发费用
  580. this.state.salesAmount = undefined;//销售额
  581. this.state.year = undefined;//年份清零
  582. },
  583. resetx() {
  584. this.state.id=undefined;//年报ID
  585. this.state.projectName=undefined;//项目名称
  586. this.state.status=undefined;//项目状态
  587. this.state.remark = undefined;//备注
  588. this.state.year = undefined;//年份清零
  589. },
  590. //列表详情
  591. details(id) {
  592. $.ajax({
  593. method: "get",
  594. dataType: "json",
  595. crossDomain: false,
  596. url: globalConfig.context +"/api/admin/customer/findOrganizationCustomerDetail",
  597. data: {
  598. uid:id
  599. },
  600. success: function(data) {
  601. let thisDetail= data.data;
  602. if(data.error.length || data.data.list == "") {
  603. if(data.error && data.error.length) {
  604. message.warning(data.error[0].message);
  605. };
  606. } else {
  607. let ProvinceCityArr = [];
  608. let ProvinceS = thisDetail.locationProvince; //省
  609. let citys = thisDetail.locationCity;//市
  610. let Areas = thisDetail.locationArea;//区
  611. ProvinceCityArr.push(ProvinceS, citys, Areas);
  612. this.setState({
  613. detailId:thisDetail.id,//详情ID
  614. identifyName:thisDetail.identifyName,//客户名称
  615. uid:thisDetail.uid,//客户ID
  616. societyTag:thisDetail.societyTag,//社会标签
  617. companyLogoUrl:thisDetail.companyLogoUrl? splitUrl(thisDetail.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],//公司LOGO
  618. introduction:thisDetail.introduction,//介绍
  619. industry:thisDetail.industry?thisDetail.industry.toString():"",//行业
  620. locationProvince:thisDetail.locationProvince,//省
  621. locationCity:thisDetail.locationCity,//市
  622. locationArea:thisDetail.locationArea,//区
  623. ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,//省市区
  624. postalAddress:thisDetail.postalAddress,//通讯地址
  625. contactsFixedTel:thisDetail.contactsFixedTel,//固定电话
  626. contactsFax:thisDetail.contactsFax,//传真地址
  627. registeredCapital:thisDetail.registeredCapital,//注册资金
  628. enterpriseScale:thisDetail.enterpriseScale,//企业规模
  629. legalPerson:thisDetail.legalPerson,//法人
  630. legalPersonIdCard:thisDetail.legalPersonIdCard,//法人身份证
  631. legalPersonTel:thisDetail.legalPersonTel,//法人联系电话
  632. legalPersonEmail:thisDetail.legalPersonEmail,//法人联系邮箱
  633. highTechZone:thisDetail.highTechZone,//是否高新
  634. listed:thisDetail.listed,//是否高新
  635. international:thisDetail.international,//是否国际化
  636. orgCode:thisDetail.orgCode,//社会统一机构
  637. orgCodeUrl:thisDetail.orgCodeUrl? splitUrl(thisDetail.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],//社会统一机构地址
  638. businessScope:thisDetail.businessScope,//业务范围
  639. contacts:thisDetail.contacts,//主要联系人姓名
  640. contactMobile:thisDetail.contactMobile,//主要联系人电话
  641. investment:thisDetail.investment,//投资机构
  642. businessAudit:thisDetail.businessAudit,//业务认证
  643. auditStatus:thisDetail.auditStatus,//实名认证
  644. intellectualProperty:thisDetail.intellectualProperty,//已有知识产权情况
  645. yearSalesAmount:thisDetail.yearSalesAmount,//年度销售额
  646. lastYearResearchAmount:thisDetail.lastYearResearchAmount,//上年度研发费用
  647. assets:thisDetail.assets,//总资产
  648. qualification:thisDetail.qualification,//企业资质情况
  649. cooperationSituation:thisDetail.cooperationSituation,//企业与高校院所
  650. informationMaintainer:thisDetail.informationMaintainer,//资料维护人
  651. informationMaintainerName:thisDetail.informationMaintainerName,//资料维护人
  652. coreTechnology:thisDetail.coreTechnology,//核心技术
  653. accomplishSituation:thisDetail.accomplishSituation,//客户已完成项目情况
  654. creditRating:thisDetail.creditRating?thisDetail.creditRating.toString():"",//信用等级
  655. pojectApplicationUrl:thisDetail.pojectApplicationUrl,//文件地址
  656. });
  657. console.log(this.state.ProvinceCity)
  658. }}.bind(this),
  659. }).always(function() {
  660. this.setState({
  661. loading: false
  662. });
  663. }.bind(this));
  664. },
  665. //基本信息提交
  666. newSubmit(e) {
  667. e.preventDefault();
  668. if(!this.state.industry) {
  669. message.warning('请选择行业');
  670. return false;
  671. };
  672. if(!this.state.societyTag) {
  673. message.warning('请选择社会属性');
  674. return false;
  675. };
  676. if(!this.state.ProvinceCity[1]) {
  677. message.warning('请选择地区');
  678. return false;
  679. };
  680. if(!this.state.registeredCapital) {
  681. message.warning('请填写注册资本');
  682. return false;
  683. };
  684. if(!this.state.businessScope) {
  685. message.warning('请填写公司主营产品');
  686. return false;
  687. };
  688. var reg = /^[1-9]\d*$|^0$/;
  689. if(this.state.consultationPrice) {
  690. if(this.state.consultationPrice.length > 6) {
  691. message.warning('咨询费用不超过6位数');
  692. this.refs.consul.focus();
  693. return false;
  694. };
  695. if(!reg.test(this.state.consultationPrice)) {
  696. message.warning('咨询费用只能输入数字');
  697. this.refs.consul.focus();
  698. return false;
  699. }
  700. }
  701. this.state.data = [];
  702. this.setState({
  703. selectedRowKeys: [],
  704. });
  705. let theorgCodeUrl = [];
  706. if(this.state.orgCodeUrl.length) {
  707. let picArr = [];
  708. this.state.orgCodeUrl.map(function(item) {
  709. if(item.response && item.response.data && item.response.data.length) {
  710. picArr.push(item.response.data);
  711. }
  712. });
  713. theorgCodeUrl = picArr.join(",");
  714. };
  715. let thecompanyLogoUrl = [];
  716. if(this.state.companyLogoUrl.length) {
  717. let picArr = [];
  718. this.state.companyLogoUrl.map(function(item) {
  719. if(item.response && item.response.data && item.response.data.length) {
  720. picArr.push(item.response.data);
  721. }
  722. });
  723. thecompanyLogoUrl = picArr.join(",");
  724. };
  725. let years = [];
  726. let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
  727. years = yearMonth.split('/');
  728. this.setState({
  729. loading: true
  730. });
  731. $.ajax({
  732. method: "post",
  733. dataType: "json",
  734. url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  735. data: {
  736. id:this.state.detailId,//详情ID
  737. identifyName:this.state.identifyName,//客户名称
  738. uid:this.state.uid,//客户ID
  739. societyTag:this.state.societyTag,//社会标签
  740. companyLogoUrl:thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',//公司LOGO
  741. introduction:this.state.introduction,//介绍
  742. industry:this.state.industry,//行业
  743. locationProvince:(this.state.ProvinceCity)[0],//省
  744. locationCity:(this.state.ProvinceCity)[1],//市
  745. locationArea:(this.state.ProvinceCity)[2],//区
  746. postalAddress:this.state.postalAddress,//通讯地址
  747. contactsFixedTel:this.state.contactsFixedTel,//固定电话
  748. contactsFax:this.state.contactsFax,//传真地址
  749. registeredCapital:this.state.registeredCapital,//注册资金
  750. enterpriseScale:this.state.enterpriseScale,//企业规模
  751. legalPerson:this.state.legalPerson,//法人
  752. legalPersonIdCard:this.state.legalPersonIdCard,//法人身份证
  753. legalPersonTel:this.state.legalPersonTel,//法人联系电话
  754. legalPersonEmail:this.state.legalPersonEmail,//法人联系邮箱
  755. highTechZone:this.state.highTechZone,//是否高新
  756. listed:this.state.listed,//是否高新
  757. international:this.state.international,//是否国际化
  758. orgCode:this.state.orgCode,//社会统一机构
  759. orgCodeUrl: theorgCodeUrl.length != 0 ? theorgCodeUrl : '',//社会统一机构地址
  760. businessScope:this.state.businessScope,//业务范围
  761. contacts:this.state.contacts,//主要联系人姓名
  762. contactMobile:this.state.contactMobile,//主要联系人电话
  763. investment:this.state.investment,//投资机构
  764. businessAudit:this.state.businessAudit,//业务认证
  765. auditStatus:this.state.auditStatus,//实名认证
  766. intellectualProperty:this.state.intellectualProperty,//已有知识产权情况
  767. qualification:this.state.qualification,//企业资质情况
  768. cooperationSituation:this.state.cooperationSituation,//企业与高校院所
  769. informationMaintainer:this.state.informationMaintainer,//资料维护人
  770. informationMaintainerName:this.state.informationMaintainerName,//资料维护人
  771. coreTechnology:this.state.coreTechnology,//核心技术
  772. creditRating:this.state.creditRating,//信用等级
  773. pojectApplicationUrl:this.state.pojectApplicationUrl,//文件地址
  774. }
  775. }).done(function(data) {
  776. this.setState({
  777. loading: false
  778. });
  779. if(!data.error.length) {
  780. message.success('保存成功!');
  781. this.visitCancel();
  782. this.loadData(this.state.pageNo);
  783. } else {
  784. message.warning(data.error[0].message);
  785. }
  786. }.bind(this));
  787. },
  788. //财务信息提交
  789. newSubmitc(e) {
  790. e.preventDefault();
  791. if(!this.state.year) {
  792. message.warning('请选择年份');
  793. return false;
  794. };
  795. this.setState({
  796. loading: true
  797. });
  798. $.ajax({
  799. method: "post",
  800. dataType: "json",
  801. url: globalConfig.context + this.state.isXin==1?'/api/admin/customers/addOrgAnnual':'/api/admin/customers/updateOrgAnnual',
  802. data: {
  803. id:this.state.id?this.state.id:undefined,//年报ID
  804. uid:this.state.uid,//客户ID
  805. year:this.state.year,//年份
  806. researchAmount:this.state.researchAmount,//研发费用
  807. assets:this.state.assets,//总资产
  808. fixedAssets:this.state.fixedAssets,//固定资产
  809. salesAmount:this.state.salesAmount,//销售额
  810. }
  811. }).done(function(data) {
  812. this.setState({
  813. loading: false
  814. });
  815. if(!data.error.length) {
  816. message.success('保存成功!');
  817. this.visitCancelc();
  818. this.loadDatac();
  819. this.loadData();
  820. } else {
  821. message.warning(data.error[0].message);
  822. }
  823. }.bind(this));
  824. },
  825. //财务信息提交
  826. newSubmitx(e) {
  827. e.preventDefault();
  828. if(!this.state.year) {
  829. message.warning('请选择年份');
  830. return false;
  831. };
  832. this.setState({
  833. loading: true
  834. });
  835. $.ajax({
  836. method: "post",
  837. dataType: "json",
  838. url: globalConfig.context + this.state.isXinx==1?'/api/admin/customers/addOrgYearProject':'/api/admin/customers/updateOrgYearProject',
  839. data: {
  840. id:this.state.id?this.state.id:undefined,//年报ID
  841. uid:this.state.uid,//客户ID
  842. year:this.state.year,//年份
  843. projectName:this.state.projectName,//研发费用
  844. status:this.state.status,//总资产
  845. remark:this.state.remark,//销售额
  846. }
  847. }).done(function(data) {
  848. this.setState({
  849. loading: false
  850. });
  851. if(!data.error.length) {
  852. message.success('保存成功!');
  853. this.visitCancelc();
  854. this.loadDatax();
  855. this.loadData();
  856. } else {
  857. message.warning(data.error[0].message);
  858. }
  859. }.bind(this));
  860. },
  861. //获取ID
  862. getStateData(id) {
  863. this.setState({
  864. loading: true
  865. });
  866. $.ajax({
  867. method: "post",
  868. dataType: "json",
  869. crossDomain: false,
  870. url: globalConfig.context + "/api/admin/techproject/techProjectLog",
  871. data: {
  872. pid: id || this.props.data.id
  873. },
  874. success: function (data) {
  875. if (!data.data) {
  876. if (data.error && data.error.length) {
  877. message.warning(data.error[0].message);
  878. };
  879. return;
  880. };
  881. var myDate = new Date();
  882. this.state.stateTable = [];
  883. for (let i = 0; i < data.data.length; i++) {
  884. this.state.stateTable.push({
  885. key: i,
  886. state: data.data[i].state,
  887. recordTime: data.data[i].recordTime,
  888. recordTimeFormattedDate: data.data[i].recordTimeFormattedDate,
  889. principal: data.data[i].principal,
  890. operator: data.data[i].operator,
  891. comment: data.data[i].comment
  892. });
  893. };
  894. }.bind(this),
  895. }).always(function () {
  896. this.setState({
  897. loading: false
  898. });
  899. }.bind(this));
  900. },
  901. //整行点击
  902. tableRowClick(record, index) {
  903. this.state.visitModul=true;
  904. this.state.pojectApplicationUrl = undefined;
  905. this.state.isXian=0;
  906. this.details(record.id);
  907. },
  908. //指定转交人自动补全
  909. supervisor(e){
  910. $.ajax({
  911. method: "get",
  912. dataType: "json",
  913. crossDomain: false,
  914. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  915. data:{
  916. adminName:e
  917. },
  918. success: function (data) {
  919. let thedata=data.data;
  920. if (!thedata) {
  921. if (data.error && data.error.length) {
  922. message.warning(data.error[0].message);
  923. };
  924. thedata = {};
  925. };
  926. this.setState({
  927. customerArr:thedata,
  928. });
  929. }.bind(this),
  930. }).always(function () {
  931. this.setState({
  932. loading: false
  933. });
  934. }.bind(this));
  935. },
  936. //输入转交人输入框失去焦点是判断客户是否存在
  937. selectAuto(value,options){
  938. this.setState({
  939. auto:value
  940. })
  941. },
  942. blurChange(e){
  943. let theType='';
  944. let contactLists=this.state.customerArr||[];
  945. if (e) {
  946. contactLists.map(function (item) {
  947. if (item.name == e.toString()) {
  948. theType = item.id;
  949. }
  950. });
  951. }
  952. this.setState({
  953. theTypes:theType
  954. })
  955. },
  956. //值改变时请求客户名称
  957. httpChange(e){
  958. if(e.length>=1){
  959. this.supervisor(e);
  960. }
  961. this.setState({
  962. auto:e
  963. })
  964. },
  965. //转交
  966. changeAssigner() {
  967. if(this.state.theTypes){
  968. this.setState({
  969. selectedRowKeys: [],
  970. });
  971. let id;
  972. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  973. let rowItem = this.state.selectedRows[idx];
  974. if(rowItem.id) {
  975. id=rowItem.id;
  976. };
  977. };
  978. $.ajax({
  979. method: "post",
  980. dataType: "json",
  981. crossDomain: false,
  982. url: globalConfig.context + "/api/admin/customer/updateInformationMaintainerr",
  983. data: {
  984. id: id, //客户ID
  985. aid: this.state.theTypes, //指定转交人的ID
  986. }
  987. }).done(function(data) {
  988. if(!data.error.length) {
  989. message.success('转交成功!');
  990. this.setState({
  991. auto:'',
  992. loading: false,
  993. });
  994. } else {
  995. message.warning(data.error[0].message);
  996. };
  997. this.loadData(Math.min(this.state.pageNo==undefined?1:this.state.pageNo,Math.ceil((this.state.pagination.total-1)/10)));
  998. }.bind(this));
  999. }else{
  1000. message.warning('请输入转交人姓名')
  1001. }
  1002. },
  1003. //详情打开
  1004. visitOk(e) {
  1005. this.setState({
  1006. visitModul: false
  1007. });
  1008. },
  1009. //详情关闭
  1010. visitCancel(e) {
  1011. this.state.fileList = [];
  1012. this.setState({
  1013. visitModul: false,
  1014. callnub:"0"
  1015. });
  1016. },
  1017. //新增年报打开
  1018. visitOkc(e) {
  1019. this.setState({
  1020. visitModulc: true,
  1021. visitModulx: true
  1022. });
  1023. },
  1024. //新增年报关闭
  1025. visitCancelc(e) {
  1026. this.resetc();
  1027. this.resetx();
  1028. this.setState({
  1029. visitModulc: false,
  1030. visitModulx: false,
  1031. });
  1032. },
  1033. //PDF打开
  1034. visitOk1(e) {
  1035. this.getPrevie(this.state.uid, 'techProject', 'organization_application');
  1036. this.setState({
  1037. visitModul1: true
  1038. });
  1039. },
  1040. //PDF关闭
  1041. visitCancel1(e) {
  1042. this.setState({
  1043. visitModul1: false,
  1044. loading:false,
  1045. });
  1046. },
  1047. //获取PDF地址
  1048. getPrevie(id,url,sign){
  1049. $.ajax({
  1050. method: "get",
  1051. dataType: "json",
  1052. crossDomain: false,
  1053. url: globalConfig.context + "/api/admin/customer/" + url,
  1054. data:{
  1055. "id": id,
  1056. "sign": sign
  1057. },
  1058. success: function (data) {
  1059. if (!data.data) {
  1060. if ( data.error && data.error.length ) {
  1061. message.warning(data.error[0].message);
  1062. };
  1063. };
  1064. this.setState({
  1065. pdfUrl: location.origin + globalConfig.context + "/open/preview?" + data.data,
  1066. });
  1067. }.bind(this)
  1068. });
  1069. },
  1070. //PDF分页
  1071. //一开始就加载这个函数
  1072. onDocumentComplete (pages) {
  1073. this.setState({
  1074. loading: true,
  1075. });
  1076. this.setState({ pagec:0, pages:pages.total });
  1077. },
  1078. //随后
  1079. onPageComplete (pagec) {
  1080. this.setState({ pagec });
  1081. },
  1082. handlePrevious (){
  1083. this.setState({ pagec: this.state.pagec - 1 });
  1084. },
  1085. handleNext (){
  1086. this.setState({ pagec: this.state.pagec + 1 });
  1087. },
  1088. renderPagination (pagec,pages) {
  1089. let previousButton = <li className="previous" onClick={this.handlePrevious}><a href="#"><span className="fa fa-arrow-left">上一页</span> </a></li>;
  1090. if (pagec==0) {
  1091. previousButton = <li className="previous disabled"><a href="#"><span className="fa fa-arrow-left">上一页</span> </a></li>;
  1092. }
  1093. let nextButton = <li className="next" onClick={this.handleNext}><a href="#"> <span className="fa fa-arrow-right">下一页</span></a></li>;
  1094. if (pagec==pages) {
  1095. nextButton = <li className="next disabled"><a href="#"> <span className="fa fa-arrow-right">下一页</span></a></li>;
  1096. }
  1097. return (
  1098. <nav>
  1099. <ul className="pager">
  1100. {previousButton}
  1101. {nextButton}
  1102. </ul>
  1103. </nav>
  1104. );
  1105. },
  1106. //上面是做PDF分页的
  1107. getOrgCodeUrl(e) {
  1108. this.setState({ orgCodeUrl: e });
  1109. },
  1110. getCompanyLogoUrl(e) {
  1111. this.setState({ companyLogoUrl: e });
  1112. },
  1113. componentWillReceiveProps(nextProps) {
  1114. if(nextProps.ApiUrl!=this.props.ApiUrl) {
  1115. this.state.nameSearch = '';
  1116. this.state.addressSearch = [];
  1117. this.state.provinceSearch = undefined;
  1118. this.state.citySearch = undefined;
  1119. this.state.releaseDate[0] = undefined;
  1120. this.state.releaseDate[1] = undefined;
  1121. this.loadData(null,nextProps.ApiUrl);
  1122. };
  1123. },
  1124. callback(e) {
  1125. if(e == '0') {
  1126. this.setState({
  1127. callnub: e,
  1128. })
  1129. }
  1130. if(e == '1') {
  1131. this.setState({
  1132. callnub: e,
  1133. })
  1134. this.loadDatas();
  1135. }
  1136. if(e == '2') {
  1137. this.setState({
  1138. callnub: e,
  1139. })
  1140. this.loadDatac();
  1141. }
  1142. if(e == '3') {
  1143. this.setState({
  1144. callnub: e,
  1145. })
  1146. this.loadDatax();
  1147. }
  1148. },
  1149. //发布成果
  1150. addClick() {
  1151. this.state.RowData = {};
  1152. this.setState({
  1153. showDesc: true,
  1154. });
  1155. },
  1156. //新增财务信息
  1157. addClickc() {
  1158. this.state.RowData = {};
  1159. this.resetc();
  1160. this.setState({
  1161. visitModulc: true,
  1162. isXin:1,
  1163. });
  1164. },
  1165. //新增项目信息
  1166. addClickx() {
  1167. this.state.RowData = {};
  1168. this.resetx();
  1169. this.setState({
  1170. visitModulx: true,
  1171. isXinx:1,
  1172. });
  1173. },
  1174. //关闭发布成果
  1175. closeDesc(e, s) {
  1176. this.state.showDesc = e;
  1177. if (s) {
  1178. this.loadDatas();
  1179. };
  1180. },
  1181. //客户资料每行点击
  1182. tableRowClickDate(record, index) {
  1183. this.state.RowData = record;
  1184. if(index!=undefined){
  1185. this.setState({
  1186. showDesc: true
  1187. });
  1188. }
  1189. },
  1190. //年度每行点击
  1191. tableRowClickDatec(record, index) {
  1192. this.state.RowData = record;
  1193. if(index!=undefined){
  1194. this.setState({
  1195. isXin:2,
  1196. visitModulc: true,
  1197. year:record.year.toString(),//年份
  1198. id:record.id,//年报详情ID
  1199. assets:record.assets,//总资产
  1200. fixedAssets:record.fixedAssets,//固定资产
  1201. researchAmount:record.researchAmount,//研发费用
  1202. salesAmount:record.salesAmount,//销售额
  1203. });
  1204. }
  1205. },
  1206. //项目每行点击
  1207. tableRowClickDatex(record, index) {
  1208. this.state.RowData = record;
  1209. if(index!=undefined){
  1210. this.setState({
  1211. isXinx:2,
  1212. visitModulx: true,
  1213. year:record.year.toString(),//年份
  1214. id:record.id,//年报详情ID
  1215. projectName:record.projectName,//项目名称
  1216. status:record.status.toString(),//项目状态
  1217. remark:record.remark,//销售额
  1218. });
  1219. }
  1220. },
  1221. //删除财务信息
  1222. deltalc(record){
  1223. this.setState({
  1224. loading: true
  1225. });
  1226. $.ajax({
  1227. method: "post",
  1228. dataType: "json",
  1229. crossDomain: false,
  1230. url: globalConfig.context + '/api/admin/customers/delectOrgAnnual',
  1231. data: {
  1232. id:record.id,
  1233. uid:record.uid
  1234. }
  1235. }).done(function (data) {
  1236. if (!data.error.length) {
  1237. message.success('操作成功');
  1238. this.setState({
  1239. loading: false,
  1240. });
  1241. this.loadDatac();
  1242. this.loadData();
  1243. } else {
  1244. message.warning(data.error[0].message);
  1245. };
  1246. }.bind(this));
  1247. },
  1248. //删除财务信息
  1249. deltalx(record){
  1250. this.setState({
  1251. loading: true
  1252. });
  1253. $.ajax({
  1254. method: "post",
  1255. dataType: "json",
  1256. crossDomain: false,
  1257. url: globalConfig.context + '/api/admin/customers/delectOrgYearProject',
  1258. data: {
  1259. id:record.id,
  1260. uid:record.uid
  1261. }
  1262. }).done(function (data) {
  1263. if (!data.error.length) {
  1264. message.success('操作成功');
  1265. this.setState({
  1266. loading: false,
  1267. });
  1268. this.loadDatax();
  1269. this.loadData();
  1270. } else {
  1271. message.warning(data.error[0].message);
  1272. };
  1273. }.bind(this));
  1274. },
  1275. render() {
  1276. let paginationss = null;
  1277. if (this.state.pagec>=0) {
  1278. paginationss = this.renderPagination(this.state.pagec, this.state.pages);
  1279. }
  1280. const {
  1281. RangePicker,
  1282. MonthPicker
  1283. } = DatePicker;
  1284. const formItemLayout = {
  1285. labelCol: { span: 8 },
  1286. wrapperCol: { span: 14 },
  1287. };
  1288. const formItemLayoutc = {
  1289. labelCol: { span: 6 },
  1290. wrapperCol: { span: 14 },
  1291. };
  1292. const FormItem = Form.Item;
  1293. const rowSelection = {
  1294. selectedRowKeys: this.state.selectedRowKeys,
  1295. onChange: (selectedRowKeys, selectedRows) => {
  1296. this.setState({
  1297. modalVisible:false,
  1298. selectedRows: selectedRows.slice(-1),
  1299. selectedRowKeys: selectedRowKeys.slice(-1)
  1300. });
  1301. },
  1302. onSelect: (recordt, selected, selectedRows) => {
  1303. this.setState({
  1304. modalVisible:false,
  1305. recordt: recordt.id
  1306. })
  1307. },
  1308. };
  1309. const hasSelected = this.state.selectedRowKeys.length > 0;
  1310. const dataSources=this.state.customerArr || [];
  1311. const options = dataSources.map((group) =>
  1312. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  1313. )
  1314. const intentionState = this.props.intentionState ||'';
  1315. const props = {
  1316. name: 'file',
  1317. multiple: true,
  1318. action: '/api/admin/techproject/upload',
  1319. onChange(info) {
  1320. const status = info.file.status;
  1321. if (status !== 'uploading') {
  1322. }
  1323. if (status === 'done') {
  1324. message.success(`${info.file.name} file uploaded successfully.`);
  1325. } else if (status === 'error') {
  1326. message.error(`${info.file.name} file upload failed.`);
  1327. }
  1328. },
  1329. };
  1330. let pdfUrl =this.state.pdfUrl||'';
  1331. return (
  1332. <div className="user-content">
  1333. <ShowModalDiv ShowModal={this.state.showModal} />
  1334. <div className="content-title">
  1335. <span>客户资料维护</span>
  1336. </div>
  1337. <div className="user-search">
  1338. <Tabs
  1339. defaultActiveKey="1"
  1340. className="test">
  1341. <TabPane tab="搜索" key="1">
  1342. <Input
  1343. placeholder="客户名称"
  1344. value={this.state.nameSearch}
  1345. style={{width: 150,marginRight:10}}
  1346. onChange={e => {
  1347. this.setState({ nameSearch: e.target.value });
  1348. }}
  1349. />
  1350. <Select
  1351. placeholder="省"
  1352. style={{ width: 80 }}
  1353. value={this.state.provinceSearch}
  1354. onChange={e => {
  1355. this.setState({ provinceSearch: e });
  1356. }}
  1357. >
  1358. {this.state.Provinces}
  1359. </Select>
  1360. <span style={{ marginRight: "10px" }}>
  1361. <Cascader
  1362. options={citySelect()}
  1363. value={this.state.addressSearch}
  1364. placeholder="选择城市"
  1365. onChange={(e, pre) => {
  1366. this.setState({ addressSearch: e });
  1367. }}
  1368. />
  1369. </span>
  1370. <Select
  1371. placeholder="资料是否完善"
  1372. style={{ width: 120 }}
  1373. value={this.state.dataGrade}
  1374. onChange={e => {
  1375. this.setState({ dataGrade: e });
  1376. }}
  1377. >
  1378. <Select.Option value="0">未完善</Select.Option>
  1379. <Select.Option value="1">已完善</Select.Option>
  1380. </Select>
  1381. <Select
  1382. placeholder="是否面谈客户"
  1383. style={{ width: 120 }}
  1384. value={this.state.follow}
  1385. onChange={e => {
  1386. this.setState({ follow: e });
  1387. }}
  1388. >
  1389. <Select.Option value="0">否</Select.Option>
  1390. <Select.Option value="1">是</Select.Option>
  1391. </Select>
  1392. <RangePicker
  1393. style={{ marginRight: "10px" }}
  1394. value={[
  1395. this.state.releaseDate[0]
  1396. ? moment(this.state.releaseDate[0])
  1397. : null,
  1398. this.state.releaseDate[1]
  1399. ? moment(this.state.releaseDate[1])
  1400. : null
  1401. ]}
  1402. onChange={(data, dataString) => {
  1403. this.setState({ releaseDate: dataString });
  1404. }}
  1405. />
  1406. <Button type="primary" onClick={this.search} style={{marginRight: 10}}>
  1407. 搜索
  1408. </Button>
  1409. <Button onClick={this.reset}>重置</Button>
  1410. </TabPane>
  1411. <TabPane key="2" tab="转交" >
  1412. <AutoComplete
  1413. className="certain-category-search"
  1414. dropdownClassName="certain-category-search-dropdown"
  1415. dropdownMatchSelectWidth={false}
  1416. dropdownStyle={{ width: 120 }}
  1417. style={{ width: "120px" }}
  1418. dataSource={options}
  1419. placeholder="输入转交人姓名"
  1420. value={this.state.auto}
  1421. onChange={this.httpChange}
  1422. filterOption={true}
  1423. onBlur={this.blurChange}
  1424. onSelect={this.selectAuto}
  1425. disabled={!hasSelected}
  1426. >
  1427. <Input />
  1428. </AutoComplete>
  1429. <Button
  1430. type="primary"
  1431. onClick={this.changeAssigner}
  1432. disabled={!hasSelected}
  1433. >
  1434. 转交
  1435. </Button>
  1436. </TabPane>
  1437. </Tabs>
  1438. </div>
  1439. <div className="patent-table">
  1440. <Spin spinning={this.state.loading}>
  1441. <Table
  1442. columns={this.state.columns}
  1443. dataSource={this.state.dataSource}
  1444. rowSelection={rowSelection}
  1445. pagination={this.state.pagination}
  1446. onRowClick={this.tableRowClick}
  1447. bordered
  1448. size="small"
  1449. />
  1450. </Spin>
  1451. </div>
  1452. <Modal
  1453. className="customeDetails"
  1454. footer=""
  1455. title="客户资料"
  1456. width="1000px"
  1457. visible={this.state.visitModul}
  1458. onOk={this.visitOk}
  1459. onCancel={this.visitCancel}
  1460. >
  1461. <Tabs onChange={this.callback} activeKey={this.state.callnub}>
  1462. <TabPane tab="基本信息" key="0">
  1463. <div>
  1464. <Form
  1465. layout="horizontal"
  1466. onSubmit={this.newSubmit}
  1467. id="demand-form"
  1468. >
  1469. <Spin spinning={this.state.loading}>
  1470. <div
  1471. style={{
  1472. fontSize: "18px",
  1473. marginLeft: "50px",
  1474. marginTop: "15px",
  1475. marginBottom: "10px",
  1476. color: "red",
  1477. fontWeight: "bold"
  1478. }}
  1479. >
  1480. 基本信息
  1481. </div>
  1482. <div className="clearfix">
  1483. <FormItem
  1484. className="half-item"
  1485. {...formItemLayout}
  1486. label="客户姓名"
  1487. >
  1488. <span>{this.state.identifyName}</span>
  1489. </FormItem>
  1490. <FormItem
  1491. className="half-item"
  1492. {...formItemLayout}
  1493. label="资料所属人"
  1494. >
  1495. <span>{this.state.informationMaintainerName}</span>
  1496. </FormItem>
  1497. </div>
  1498. <div className="clearfix">
  1499. <FormItem
  1500. className="half-item"
  1501. {...formItemLayout}
  1502. label="企业行业"
  1503. >
  1504. <Select
  1505. placeholder="选择行业"
  1506. value={this.state.industry}
  1507. style={{ width: "95%" }}
  1508. onChange={e => {
  1509. this.setState({ industry: e });
  1510. }}
  1511. >
  1512. {industry.map(function(item) {
  1513. return (
  1514. <Select.Option key={item.value}>
  1515. {item.key}
  1516. </Select.Option>
  1517. );
  1518. })}
  1519. </Select>
  1520. <span style={{ color: "red", marginLeft: "5px" }}>
  1521. *
  1522. </span>
  1523. </FormItem>
  1524. <FormItem
  1525. className="half-item"
  1526. {...formItemLayout}
  1527. label="社会属性"
  1528. >
  1529. <Select
  1530. placeholder="客户社会属性"
  1531. value={this.state.societyTag}
  1532. style={{ width: "95%" }}
  1533. onChange={e => {
  1534. this.setState({ societyTag: e });
  1535. }}
  1536. >
  1537. {socialAttribute.map(function(item) {
  1538. return (
  1539. <Select.Option key={item.value}>
  1540. {item.key}
  1541. </Select.Option>
  1542. );
  1543. })}
  1544. </Select>
  1545. <span style={{ color: "red", marginLeft: "5px" }}>
  1546. *
  1547. </span>
  1548. </FormItem>
  1549. <FormItem
  1550. className="half-item"
  1551. {...formItemLayout}
  1552. label="省-市-区"
  1553. >
  1554. <Cascader
  1555. options={areaSelect()}
  1556. value={this.state.ProvinceCity}
  1557. placeholder="选择城市"
  1558. style={{ width: "95%" }}
  1559. onChange={(e, pre) => {
  1560. this.setState({ ProvinceCity: e });
  1561. }}
  1562. />
  1563. <span style={{ color: "red", marginLeft: "5px" }}>
  1564. *
  1565. </span>
  1566. </FormItem>
  1567. <FormItem
  1568. className="half-item"
  1569. {...formItemLayout}
  1570. label="注册资本"
  1571. >
  1572. <Input
  1573. placeholder="注册资本"
  1574. style={{ width: "90%" }}
  1575. value={this.state.registeredCapital}
  1576. onChange={e => {
  1577. this.setState({
  1578. registeredCapital: e.target.value
  1579. });
  1580. }}
  1581. />
  1582. <span style={{ color: "red", marginLeft: "5px" }}>
  1583. *
  1584. </span>
  1585. </FormItem>
  1586. <div className="clearfix">
  1587. <FormItem
  1588. labelCol={{ span: 4 }}
  1589. wrapperCol={{ span: 20 }}
  1590. label="主营产品"
  1591. >
  1592. <Input
  1593. type="textarea"
  1594. rows={2}
  1595. value={this.state.businessScope}
  1596. style={{ width: "95%" }}
  1597. onChange={(e, pre) => {
  1598. this.setState({ businessScope: e.target.value });
  1599. }}
  1600. />
  1601. <span style={{ color: "red", marginLeft: "5px" }}>
  1602. *
  1603. </span>
  1604. </FormItem>
  1605. </div>
  1606. <div
  1607. style={{
  1608. fontSize: "18px",
  1609. marginLeft: "50px",
  1610. marginTop: "15px",
  1611. marginBottom: "10px",
  1612. color: "red",
  1613. fontWeight: "bold"
  1614. }}
  1615. >
  1616. 企业资料
  1617. </div>
  1618. <FormItem
  1619. className="half-item"
  1620. {...formItemLayout}
  1621. label="通信地址"
  1622. >
  1623. <Input
  1624. placeholder="客户通信地址"
  1625. value={this.state.postalAddress}
  1626. onChange={(e, pre) => {
  1627. this.setState({ postalAddress: e.target.value });
  1628. }}
  1629. />
  1630. </FormItem>
  1631. <FormItem
  1632. className="half-item"
  1633. {...formItemLayout}
  1634. label="固定电话"
  1635. >
  1636. <Input
  1637. placeholder="客户固定电话"
  1638. value={this.state.contactsFixedTel}
  1639. onChange={e => {
  1640. this.setState({ contactsFixedTel: e.target.value });
  1641. }}
  1642. />
  1643. </FormItem>
  1644. <FormItem
  1645. className="half-item"
  1646. {...formItemLayout}
  1647. label="客户传真"
  1648. >
  1649. <Input
  1650. placeholder="客户传真"
  1651. value={this.state.contactsFax}
  1652. onChange={e => {
  1653. this.setState({ contactsFax: e.target.value });
  1654. }}
  1655. />
  1656. </FormItem>
  1657. <FormItem
  1658. className="half-item"
  1659. {...formItemLayout}
  1660. label="企业人数"
  1661. >
  1662. <Input
  1663. placeholder="单位规模"
  1664. value={this.state.enterpriseScale}
  1665. onChange={e => {
  1666. this.setState({ enterpriseScale: e.target.value });
  1667. }}
  1668. />
  1669. </FormItem>
  1670. <FormItem
  1671. className="half-item"
  1672. {...formItemLayout}
  1673. label="法人名称"
  1674. >
  1675. <Input
  1676. placeholder="法人名称"
  1677. value={this.state.legalPerson}
  1678. onChange={e => {
  1679. this.setState({ legalPerson: e.target.value });
  1680. }}
  1681. />
  1682. </FormItem>
  1683. <FormItem
  1684. className="half-item"
  1685. {...formItemLayout}
  1686. label="法人身份证"
  1687. >
  1688. <Input
  1689. placeholder="法人身份证"
  1690. value={this.state.legalPersonIdCard}
  1691. onChange={e => {
  1692. this.setState({
  1693. legalPersonIdCard: e.target.value
  1694. });
  1695. }}
  1696. />
  1697. </FormItem>
  1698. <FormItem
  1699. className="half-item"
  1700. {...formItemLayout}
  1701. label="联系人"
  1702. >
  1703. <Input
  1704. placeholder="联系人名称"
  1705. value={this.state.contacts}
  1706. onChange={e => {
  1707. this.setState({ contacts: e.target.value });
  1708. }}
  1709. />
  1710. </FormItem>
  1711. <FormItem
  1712. className="half-item"
  1713. {...formItemLayout}
  1714. label="联系人号码"
  1715. >
  1716. <Input
  1717. placeholder="联系人号码"
  1718. value={this.state.contactMobile}
  1719. onChange={e => {
  1720. this.setState({ contactMobile: e.target.value });
  1721. }}
  1722. />
  1723. </FormItem>
  1724. <FormItem
  1725. className="half-item"
  1726. {...formItemLayout}
  1727. label="法人电话"
  1728. >
  1729. <Input
  1730. placeholder="法人电话"
  1731. value={this.state.legalPersonTel}
  1732. onChange={e => {
  1733. this.setState({ legalPersonTel: e.target.value });
  1734. }}
  1735. />
  1736. </FormItem>
  1737. <FormItem
  1738. className="half-item"
  1739. {...formItemLayout}
  1740. label="法人邮箱"
  1741. >
  1742. <Input
  1743. placeholder="法人电子邮箱"
  1744. value={this.state.legalPersonEmail}
  1745. onChange={e => {
  1746. this.setState({ legalPersonEmail: e.target.value });
  1747. }}
  1748. />
  1749. </FormItem>
  1750. <FormItem
  1751. className="half-item"
  1752. {...formItemLayout}
  1753. label="社会统一信用机构代码"
  1754. >
  1755. <Input
  1756. placeholder="社会统一信用机构代码"
  1757. value={this.state.orgCode}
  1758. onChange={e => {
  1759. this.setState({ orgCode: e.target.value });
  1760. }}
  1761. />
  1762. </FormItem>
  1763. <div className="clearfix">
  1764. <FormItem
  1765. labelCol={{ span: 4 }}
  1766. wrapperCol={{ span: 18 }}
  1767. label="客户简介"
  1768. >
  1769. <Input
  1770. type="textarea"
  1771. rows={3}
  1772. value={this.state.introduction}
  1773. onChange={(e, pre) => {
  1774. this.setState({ introduction: e.target.value });
  1775. }}
  1776. />
  1777. </FormItem>
  1778. </div>
  1779. <div className="clearfix pictures">
  1780. <FormItem
  1781. style={{
  1782. display: "inline-block",
  1783. width: "350px",
  1784. marginTop: "20px",
  1785. marginLeft: "95px"
  1786. }}
  1787. labelCol={{ span: 8 }}
  1788. wrapperCol={{ span: 10 }}
  1789. label="机构证书(PIC)"
  1790. >
  1791. <PicturesWall
  1792. fileList={this.getOrgCodeUrl}
  1793. pictureUrl={this.state.orgCodeUrl}
  1794. />
  1795. <p>建议:图片要清晰。</p>
  1796. </FormItem>
  1797. <FormItem
  1798. style={{
  1799. display: "inline-block",
  1800. width: "350px",
  1801. marginTop: "20px",
  1802. marginTop: "20px"
  1803. }}
  1804. labelCol={{ span: 8 }}
  1805. wrapperCol={{ span: 10 }}
  1806. label="单位LOGO"
  1807. >
  1808. <PicturesWall
  1809. fileList={this.getCompanyLogoUrl}
  1810. pictureUrl={this.state.companyLogoUrl}
  1811. />
  1812. <p>建议:图片要清晰。</p>
  1813. </FormItem>
  1814. </div>
  1815. <div
  1816. style={{
  1817. fontSize: "18px",
  1818. marginLeft: "50px",
  1819. marginTop: "15px",
  1820. marginBottom: "10px",
  1821. color: "red",
  1822. fontWeight: "bold"
  1823. }}
  1824. >
  1825. 重要资料
  1826. </div>
  1827. <div className="clearfix">
  1828. <FormItem
  1829. className="half-item"
  1830. {...formItemLayout}
  1831. label="客户信用等级"
  1832. >
  1833. <Select
  1834. placeholder="客户信用等级"
  1835. value={this.state.creditRating}
  1836. style={{ width: "90%" }}
  1837. onChange={e => {
  1838. this.setState({ creditRating: e });
  1839. }}
  1840. >
  1841. {slcRedit.map(function(item) {
  1842. return (
  1843. <Select.Option key={item.value}>
  1844. {item.key}
  1845. </Select.Option>
  1846. );
  1847. })}
  1848. </Select>
  1849. <span style={{ color: "red", marginLeft: "5px" }}>
  1850. *
  1851. </span>
  1852. </FormItem>
  1853. <div className="clearfix">
  1854. <FormItem
  1855. labelCol={{ span: 4 }}
  1856. wrapperCol={{ span: 19 }}
  1857. label="企业核心技术"
  1858. >
  1859. <Input
  1860. type="textarea"
  1861. rows={3}
  1862. value={this.state.coreTechnology}
  1863. style={{ width: "96%" }}
  1864. onChange={(e, pre) => {
  1865. this.setState({
  1866. coreTechnology: e.target.value
  1867. });
  1868. }}
  1869. />
  1870. <span style={{ color: "red", marginLeft: "5px" }}>
  1871. *
  1872. </span>
  1873. </FormItem>
  1874. </div>
  1875. <div className="clearfix">
  1876. <FormItem
  1877. labelCol={{ span: 4 }}
  1878. wrapperCol={{ span: 19 }}
  1879. label="企业资质情况"
  1880. >
  1881. <Input
  1882. type="textarea"
  1883. rows={3}
  1884. value={this.state.qualification}
  1885. placeholder="请按如下格式填写:资质名称+获得时间+拥有人+发证机构"
  1886. onChange={(e, pre) => {
  1887. this.setState({
  1888. qualification: e.target.value
  1889. });
  1890. }}
  1891. style={{ width: "96%" }}
  1892. />
  1893. <span style={{ color: "red", marginLeft: "5px" }}>
  1894. *
  1895. </span>
  1896. </FormItem>
  1897. </div>
  1898. <div className="clearfix">
  1899. <FormItem
  1900. labelCol={{ span: 4 }}
  1901. wrapperCol={{ span: 19 }}
  1902. label="高企合作情况"
  1903. >
  1904. <Input
  1905. type="textarea"
  1906. rows={3}
  1907. value={this.state.cooperationSituation}
  1908. onChange={(e, pre) => {
  1909. this.setState({
  1910. cooperationSituation: e.target.value
  1911. });
  1912. }}
  1913. style={{ width: "96%" }}
  1914. />
  1915. <span style={{ color: "red", marginLeft: "5px" }}>
  1916. *
  1917. </span>
  1918. </FormItem>
  1919. </div>
  1920. <div className="clearfix">
  1921. <FormItem
  1922. labelCol={{ span: 4 }}
  1923. wrapperCol={{ span: 19 }}
  1924. label="项目申请书"
  1925. >
  1926. <Upload
  1927. style={{ display: "inlineBlock" }}
  1928. name="avatar"
  1929. action={
  1930. globalConfig.context +
  1931. "/api/admin/customer/upload"
  1932. }
  1933. data={{
  1934. uid: this.state.detailId,
  1935. sign: "organization_application"
  1936. }}
  1937. beforeUpload={beforeUploadFile}
  1938. fileList={this.state.fileList}
  1939. onChange={info => {
  1940. if (info.file.status !== "uploading") {
  1941. }
  1942. if (info.file.status === "done") {
  1943. if (!info.file.response.error.length) {
  1944. let isPDF = this.state.fileList[0].originFileObj.name.split(
  1945. "."
  1946. );
  1947. let isIndex = isPDF.length - 1;
  1948. if (isPDF[isIndex] == "pdf") {
  1949. message.success(
  1950. `${info.file.name} 文件上传成功!`
  1951. );
  1952. } else {
  1953. message.error("请上传pdf文件!");
  1954. }
  1955. } else {
  1956. message.warning(
  1957. info.file.response.error[0].message
  1958. );
  1959. return;
  1960. }
  1961. this.setState({
  1962. pojectApplicationUrl:
  1963. info.file.response.data,
  1964. isXian: 1
  1965. });
  1966. } else if (info.file.status === "error") {
  1967. message.error(
  1968. `${info.file.name} 文件上传失败。`
  1969. );
  1970. }
  1971. this.setState({
  1972. fileList: info.fileList.slice(-1)
  1973. });
  1974. }}
  1975. >
  1976. {/*<a onClick={
  1977. () => {var newTab = window.open('about:blank'); getPreviews(this.state.uid, 'techProject', 'organization_application', function (data) { newTab.location.href = data; });
  1978. }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>*/}
  1979. <Button>
  1980. <Icon type="upload" /> 项目材料上传{" "}
  1981. </Button>
  1982. </Upload>
  1983. <span
  1984. style={{ marginTop: "10px", marginLeft: "20px" }}
  1985. >
  1986. {this.state.pojectApplicationUrl ? (
  1987. <span className="download-file">
  1988. <a onClick={this.visitOk1}>
  1989. <Icon
  1990. style={{ fontSize: "16px" }}
  1991. type="eye-o"
  1992. />{" "}
  1993. </a>
  1994. </span>
  1995. ) : (
  1996. <span>
  1997. <Icon
  1998. type="exclamation-circle"
  1999. style={{
  2000. color: "#ffbf00",
  2001. marginRight: "6px"
  2002. }}
  2003. />
  2004. 未上传!
  2005. </span>
  2006. )}
  2007. </span>
  2008. </FormItem>
  2009. </div>
  2010. </div>
  2011. <Button
  2012. className="setSubmit"
  2013. type="primary"
  2014. htmlType="submit"
  2015. >
  2016. 保存
  2017. </Button>
  2018. <Button type="ghost" onClick={this.visitCancel}>
  2019. 取消
  2020. </Button>
  2021. </div>
  2022. </Spin>
  2023. </Form>
  2024. </div>
  2025. </TabPane>
  2026. <TabPane tab="知识产权列表" key="1">
  2027. <Button
  2028. type="primary"
  2029. className="addButton"
  2030. onClick={this.addClick}
  2031. >
  2032. 发布知识产权
  2033. <Icon type="plus" />
  2034. </Button>
  2035. <Spin spinning={this.state.loading}>
  2036. <Table
  2037. columns={this.state.columnsDate}
  2038. dataSource={this.state.dataSourceDate}
  2039. rowSelection={rowSelection}
  2040. pagination={this.state.paginationDate}
  2041. onRowClick={this.tableRowClickDate}
  2042. />
  2043. </Spin>
  2044. </TabPane>
  2045. <TabPane tab="财务信息" key="2">
  2046. <Button
  2047. type="primary"
  2048. className="addButton"
  2049. onClick={this.addClickc}
  2050. >
  2051. 添加年度财务信息
  2052. <Icon type="plus" />
  2053. </Button>
  2054. <Spin spinning={this.state.loading}>
  2055. <Table
  2056. columns={this.state.columnsc}
  2057. dataSource={this.state.dataSourcec}
  2058. rowSelection={rowSelection}
  2059. onRowClick={this.tableRowClickDatec}
  2060. />
  2061. </Spin>
  2062. </TabPane>
  2063. <TabPane tab="项目信息" key="3">
  2064. <Button
  2065. type="primary"
  2066. className="addButton"
  2067. onClick={this.addClickx}
  2068. >
  2069. 添加项目信息
  2070. <Icon type="plus" />
  2071. </Button>
  2072. <Spin spinning={this.state.loading}>
  2073. <Table
  2074. columns={this.state.columnsx}
  2075. dataSource={this.state.dataSourcex}
  2076. rowSelection={rowSelection}
  2077. onRowClick={this.tableRowClickDatex}
  2078. />
  2079. </Spin>
  2080. </TabPane>
  2081. </Tabs>
  2082. </Modal>
  2083. <Modal
  2084. className="customeDetails"
  2085. footer=""
  2086. title="项目申请书"
  2087. width="800px"
  2088. visible={this.state.visitModul1}
  2089. onOk={this.visitOk1}
  2090. onCancel={this.visitCancel1}
  2091. >
  2092. <div>
  2093. {/*<Button type="primary" onClick={this.pdfShows(pdfUrl)}>点击查看</Button>
  2094. <div id="pdfContent" style={{height:"500px",width:"500px",marginLeft:"300px"}} >
  2095. </div>
  2096. onDocumentLoad={this.onDocumentComplete}
  2097. onLoadSuccess={this.onDocumentComplete}
  2098. onDocumentComplete={this.onDocumentComplete}
  2099. onPageRender={this.onPageComplete}
  2100. // "http://s.jishutao.com/upload/achievement/achievement/34576808907162737_achievement_maturity_text_file.pdf"//{pdfUrl}
  2101. */}
  2102. <PDF
  2103. file={pdfUrl}
  2104. onDocumentLoad={this.onDocumentComplete}
  2105. pageIndex={parseInt(this.state.pagec)}
  2106. scale={1.2}
  2107. />
  2108. {paginationss}
  2109. </div>
  2110. </Modal>
  2111. <Modal
  2112. className="customeDetails"
  2113. footer=""
  2114. title="财务资料"
  2115. width="500px"
  2116. visible={this.state.visitModulc}
  2117. onOk={this.visitOkc}
  2118. onCancel={this.visitCancelc}
  2119. >
  2120. {" "}
  2121. <Form layout="horizontal" onSubmit={this.newSubmitc} id="demand-form">
  2122. <Spin spinning={this.state.loading}>
  2123. <div className="clearfix">
  2124. <FormItem {...formItemLayoutc} label="年份">
  2125. <Select
  2126. placeholder="年份"
  2127. value={this.state.year}
  2128. style={{ width: "90%" }}
  2129. onChange={e => {
  2130. this.setState({ year: e });
  2131. }}
  2132. >
  2133. {year.map(function(item) {
  2134. return (
  2135. <Select.Option key={item.value}>
  2136. {item.key}
  2137. </Select.Option>
  2138. );
  2139. })}
  2140. </Select>
  2141. </FormItem>
  2142. </div>
  2143. <div className="clearfix">
  2144. <FormItem {...formItemLayoutc} label="营销收入">
  2145. <Input
  2146. placeholder="营销收入"
  2147. style={{ width: "90%" }}
  2148. value={this.state.salesAmount}
  2149. onChange={e => {
  2150. this.setState({ salesAmount: e.target.value });
  2151. }}
  2152. />
  2153. </FormItem>
  2154. </div>
  2155. <div className="clearfix">
  2156. <FormItem {...formItemLayoutc} label="总资产">
  2157. <Input
  2158. placeholder="总资产"
  2159. style={{ width: "90%" }}
  2160. value={this.state.assets}
  2161. onChange={e => {
  2162. this.setState({ assets: e.target.value });
  2163. }}
  2164. />
  2165. </FormItem>
  2166. </div>
  2167. <div className="clearfix">
  2168. <FormItem {...formItemLayoutc} label="固定资产">
  2169. <Input
  2170. placeholder="总资产"
  2171. style={{ width: "90%" }}
  2172. value={this.state.fixedAssets}
  2173. onChange={e => {
  2174. this.setState({ fixedAssets: e.target.value });
  2175. }}
  2176. />
  2177. </FormItem>
  2178. </div>
  2179. <div className="clearfix">
  2180. <FormItem {...formItemLayoutc} label="研发费用">
  2181. <Input
  2182. placeholder="研发费用"
  2183. style={{ width: "90%" }}
  2184. value={this.state.researchAmount}
  2185. onChange={e => {
  2186. this.setState({ researchAmount: e.target.value });
  2187. }}
  2188. />
  2189. </FormItem>
  2190. </div>
  2191. <Button
  2192. className="setSubmit"
  2193. type="primary"
  2194. htmlType="submit"
  2195. style={{ marginLeft: "100px" }}
  2196. >
  2197. 保存
  2198. </Button>
  2199. <Button type="ghost" onClick={this.visitCancelc}>
  2200. 取消
  2201. </Button>
  2202. </Spin>
  2203. </Form>
  2204. </Modal>
  2205. <Modal
  2206. className="customeDetails"
  2207. footer=""
  2208. title="项目资料"
  2209. width="500px"
  2210. visible={this.state.visitModulx}
  2211. onOk={this.visitOkc}
  2212. onCancel={this.visitCancelc}
  2213. >
  2214. {" "}
  2215. <Form layout="horizontal" onSubmit={this.newSubmitx} id="demand-form">
  2216. <Spin spinning={this.state.loading}>
  2217. <div className="clearfix">
  2218. <FormItem {...formItemLayoutc} label="年份">
  2219. <Select
  2220. placeholder="年份"
  2221. value={this.state.year}
  2222. style={{ width: "90%" }}
  2223. onChange={e => {
  2224. this.setState({ year: e });
  2225. }}
  2226. >
  2227. {year.map(function(item) {
  2228. return (
  2229. <Select.Option key={item.value}>
  2230. {item.key}
  2231. </Select.Option>
  2232. );
  2233. })}
  2234. </Select>
  2235. </FormItem>
  2236. </div>
  2237. <div className="clearfix">
  2238. <FormItem {...formItemLayoutc} label="项目名称">
  2239. <Input
  2240. placeholder="项目名称"
  2241. style={{ width: "90%" }}
  2242. value={this.state.projectName}
  2243. onChange={e => {
  2244. this.setState({ projectName: e.target.value });
  2245. }}
  2246. />
  2247. </FormItem>
  2248. </div>
  2249. <div className="clearfix">
  2250. <FormItem {...formItemLayoutc} label="项目状态">
  2251. <Select
  2252. placeholder="项目状态"
  2253. value={this.state.status}
  2254. style={{ width: "90%" }}
  2255. onChange={e => {
  2256. this.setState({ status: e });
  2257. }}
  2258. >
  2259. {xiangmoState.map(function(item) {
  2260. return (
  2261. <Select.Option key={item.value}>
  2262. {item.key}
  2263. </Select.Option>
  2264. );
  2265. })}
  2266. </Select>
  2267. </FormItem>
  2268. </div>
  2269. <div className="clearfix">
  2270. <FormItem {...formItemLayoutc} label="备注">
  2271. <Input
  2272. type="textarea"
  2273. rows={3}
  2274. placeholder="备注"
  2275. style={{ width: "90%" }}
  2276. value={this.state.remark}
  2277. onChange={e => {
  2278. this.setState({ remark: e.target.value });
  2279. }}
  2280. />
  2281. </FormItem>
  2282. </div>
  2283. <Button
  2284. className="setSubmit"
  2285. type="primary"
  2286. htmlType="submit"
  2287. style={{ marginLeft: "100px" }}
  2288. >
  2289. 保存
  2290. </Button>
  2291. <Button type="ghost" onClick={this.visitCancelc}>
  2292. 取消
  2293. </Button>
  2294. </Spin>
  2295. </Form>
  2296. </Modal>
  2297. <TechAchievementDesc
  2298. data={this.state.RowData}
  2299. detailApiUrl={this.props["data-detailApiUrl"]}
  2300. achievementCategoryOption={this.state.achievementCategoryOption}
  2301. showDesc={this.state.showDesc}
  2302. uid={this.state.uid}
  2303. closeDesc={this.closeDesc}
  2304. loadDatas={this.loadDatas}
  2305. />
  2306. </div>
  2307. );
  2308. }
  2309. }));
  2310. export default IntentionCustomer;