crm.jsx 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341
  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. onChange={this.callback}
  1341. className="test">
  1342. <TabPane tab="搜索" key="1">
  1343. <Input
  1344. placeholder="客户名称"
  1345. value={this.state.nameSearch}
  1346. style={{width: 150,marginRight:10}}
  1347. onChange={e => {
  1348. this.setState({ nameSearch: e.target.value });
  1349. }}
  1350. />
  1351. <Select
  1352. placeholder="省"
  1353. style={{ width: 80 }}
  1354. value={this.state.provinceSearch}
  1355. onChange={e => {
  1356. this.setState({ provinceSearch: e });
  1357. }}
  1358. >
  1359. {this.state.Provinces}
  1360. </Select>
  1361. <span style={{ marginRight: "10px" }}>
  1362. <Cascader
  1363. options={citySelect()}
  1364. value={this.state.addressSearch}
  1365. placeholder="选择城市"
  1366. onChange={(e, pre) => {
  1367. this.setState({ addressSearch: e });
  1368. }}
  1369. />
  1370. </span>
  1371. <Select
  1372. placeholder="资料是否完善"
  1373. style={{ width: 120 }}
  1374. value={this.state.dataGrade}
  1375. onChange={e => {
  1376. this.setState({ dataGrade: e });
  1377. }}
  1378. >
  1379. <Select.Option value="0">未完善</Select.Option>
  1380. <Select.Option value="1">已完善</Select.Option>
  1381. </Select>
  1382. <Select
  1383. placeholder="是否面谈客户"
  1384. style={{ width: 120 }}
  1385. value={this.state.follow}
  1386. onChange={e => {
  1387. this.setState({ follow: e });
  1388. }}
  1389. >
  1390. <Select.Option value="0">否</Select.Option>
  1391. <Select.Option value="1">是</Select.Option>
  1392. </Select>
  1393. <RangePicker
  1394. style={{ marginRight: "10px" }}
  1395. value={[
  1396. this.state.releaseDate[0]
  1397. ? moment(this.state.releaseDate[0])
  1398. : null,
  1399. this.state.releaseDate[1]
  1400. ? moment(this.state.releaseDate[1])
  1401. : null
  1402. ]}
  1403. onChange={(data, dataString) => {
  1404. this.setState({ releaseDate: dataString });
  1405. }}
  1406. />
  1407. <Button type="primary" onClick={this.search} style={{marginRight: 10}}>
  1408. 搜索
  1409. </Button>
  1410. <Button onClick={this.reset}>重置</Button>
  1411. </TabPane>
  1412. <TabPane key="2" tab="转交" >
  1413. <AutoComplete
  1414. className="certain-category-search"
  1415. dropdownClassName="certain-category-search-dropdown"
  1416. dropdownMatchSelectWidth={false}
  1417. dropdownStyle={{ width: 120 }}
  1418. style={{ width: "120px" }}
  1419. dataSource={options}
  1420. placeholder="输入转交人姓名"
  1421. value={this.state.auto}
  1422. onChange={this.httpChange}
  1423. filterOption={true}
  1424. onBlur={this.blurChange}
  1425. onSelect={this.selectAuto}
  1426. disabled={!hasSelected}
  1427. >
  1428. <Input />
  1429. </AutoComplete>
  1430. <Button
  1431. type="primary"
  1432. onClick={this.changeAssigner}
  1433. disabled={!hasSelected}
  1434. >
  1435. 转交
  1436. </Button>
  1437. </TabPane>
  1438. </Tabs>
  1439. </div>
  1440. <div className="patent-table">
  1441. <Spin spinning={this.state.loading}>
  1442. <Table
  1443. columns={this.state.columns}
  1444. dataSource={this.state.dataSource}
  1445. rowSelection={rowSelection}
  1446. pagination={this.state.pagination}
  1447. onRowClick={this.tableRowClick}
  1448. bordered
  1449. size="small"
  1450. />
  1451. </Spin>
  1452. </div>
  1453. <Modal
  1454. className="customeDetails"
  1455. footer=""
  1456. title="客户资料"
  1457. width="1000px"
  1458. visible={this.state.visitModul}
  1459. onOk={this.visitOk}
  1460. onCancel={this.visitCancel}
  1461. >
  1462. <Tabs onChange={this.callback} activeKey={this.state.callnub}>
  1463. <TabPane tab="基本信息" key="0">
  1464. <div>
  1465. <Form
  1466. layout="horizontal"
  1467. onSubmit={this.newSubmit}
  1468. id="demand-form"
  1469. >
  1470. <Spin spinning={this.state.loading}>
  1471. <div
  1472. style={{
  1473. fontSize: "18px",
  1474. marginLeft: "50px",
  1475. marginTop: "15px",
  1476. marginBottom: "10px",
  1477. color: "red",
  1478. fontWeight: "bold"
  1479. }}
  1480. >
  1481. 基本信息
  1482. </div>
  1483. <div className="clearfix">
  1484. <FormItem
  1485. className="half-item"
  1486. {...formItemLayout}
  1487. label="客户姓名"
  1488. >
  1489. <span>{this.state.identifyName}</span>
  1490. </FormItem>
  1491. <FormItem
  1492. className="half-item"
  1493. {...formItemLayout}
  1494. label="资料所属人"
  1495. >
  1496. <span>{this.state.informationMaintainerName}</span>
  1497. </FormItem>
  1498. </div>
  1499. <div className="clearfix">
  1500. <FormItem
  1501. className="half-item"
  1502. {...formItemLayout}
  1503. label="企业行业"
  1504. >
  1505. <Select
  1506. placeholder="选择行业"
  1507. value={this.state.industry}
  1508. style={{ width: "95%" }}
  1509. onChange={e => {
  1510. this.setState({ industry: e });
  1511. }}
  1512. >
  1513. {industry.map(function(item) {
  1514. return (
  1515. <Select.Option key={item.value}>
  1516. {item.key}
  1517. </Select.Option>
  1518. );
  1519. })}
  1520. </Select>
  1521. <span style={{ color: "red", marginLeft: "5px" }}>
  1522. *
  1523. </span>
  1524. </FormItem>
  1525. <FormItem
  1526. className="half-item"
  1527. {...formItemLayout}
  1528. label="社会属性"
  1529. >
  1530. <Select
  1531. placeholder="客户社会属性"
  1532. value={this.state.societyTag}
  1533. style={{ width: "95%" }}
  1534. onChange={e => {
  1535. this.setState({ societyTag: e });
  1536. }}
  1537. >
  1538. {socialAttribute.map(function(item) {
  1539. return (
  1540. <Select.Option key={item.value}>
  1541. {item.key}
  1542. </Select.Option>
  1543. );
  1544. })}
  1545. </Select>
  1546. <span style={{ color: "red", marginLeft: "5px" }}>
  1547. *
  1548. </span>
  1549. </FormItem>
  1550. <FormItem
  1551. className="half-item"
  1552. {...formItemLayout}
  1553. label="省-市-区"
  1554. >
  1555. <Cascader
  1556. options={areaSelect()}
  1557. value={this.state.ProvinceCity}
  1558. placeholder="选择城市"
  1559. style={{ width: "95%" }}
  1560. onChange={(e, pre) => {
  1561. this.setState({ ProvinceCity: e });
  1562. }}
  1563. />
  1564. <span style={{ color: "red", marginLeft: "5px" }}>
  1565. *
  1566. </span>
  1567. </FormItem>
  1568. <FormItem
  1569. className="half-item"
  1570. {...formItemLayout}
  1571. label="注册资本"
  1572. >
  1573. <Input
  1574. placeholder="注册资本"
  1575. style={{ width: "90%" }}
  1576. value={this.state.registeredCapital}
  1577. onChange={e => {
  1578. this.setState({
  1579. registeredCapital: e.target.value
  1580. });
  1581. }}
  1582. />
  1583. <span style={{ color: "red", marginLeft: "5px" }}>
  1584. *
  1585. </span>
  1586. </FormItem>
  1587. <div className="clearfix">
  1588. <FormItem
  1589. labelCol={{ span: 4 }}
  1590. wrapperCol={{ span: 20 }}
  1591. label="主营产品"
  1592. >
  1593. <Input
  1594. type="textarea"
  1595. rows={2}
  1596. value={this.state.businessScope}
  1597. style={{ width: "95%" }}
  1598. onChange={(e, pre) => {
  1599. this.setState({ businessScope: e.target.value });
  1600. }}
  1601. />
  1602. <span style={{ color: "red", marginLeft: "5px" }}>
  1603. *
  1604. </span>
  1605. </FormItem>
  1606. </div>
  1607. <div
  1608. style={{
  1609. fontSize: "18px",
  1610. marginLeft: "50px",
  1611. marginTop: "15px",
  1612. marginBottom: "10px",
  1613. color: "red",
  1614. fontWeight: "bold"
  1615. }}
  1616. >
  1617. 企业资料
  1618. </div>
  1619. <FormItem
  1620. className="half-item"
  1621. {...formItemLayout}
  1622. label="通信地址"
  1623. >
  1624. <Input
  1625. placeholder="客户通信地址"
  1626. value={this.state.postalAddress}
  1627. onChange={(e, pre) => {
  1628. this.setState({ postalAddress: e.target.value });
  1629. }}
  1630. />
  1631. </FormItem>
  1632. <FormItem
  1633. className="half-item"
  1634. {...formItemLayout}
  1635. label="固定电话"
  1636. >
  1637. <Input
  1638. placeholder="客户固定电话"
  1639. value={this.state.contactsFixedTel}
  1640. onChange={e => {
  1641. this.setState({ contactsFixedTel: e.target.value });
  1642. }}
  1643. />
  1644. </FormItem>
  1645. <FormItem
  1646. className="half-item"
  1647. {...formItemLayout}
  1648. label="客户传真"
  1649. >
  1650. <Input
  1651. placeholder="客户传真"
  1652. value={this.state.contactsFax}
  1653. onChange={e => {
  1654. this.setState({ contactsFax: e.target.value });
  1655. }}
  1656. />
  1657. </FormItem>
  1658. <FormItem
  1659. className="half-item"
  1660. {...formItemLayout}
  1661. label="企业人数"
  1662. >
  1663. <Input
  1664. placeholder="单位规模"
  1665. value={this.state.enterpriseScale}
  1666. onChange={e => {
  1667. this.setState({ enterpriseScale: e.target.value });
  1668. }}
  1669. />
  1670. </FormItem>
  1671. <FormItem
  1672. className="half-item"
  1673. {...formItemLayout}
  1674. label="法人名称"
  1675. >
  1676. <Input
  1677. placeholder="法人名称"
  1678. value={this.state.legalPerson}
  1679. onChange={e => {
  1680. this.setState({ legalPerson: e.target.value });
  1681. }}
  1682. />
  1683. </FormItem>
  1684. <FormItem
  1685. className="half-item"
  1686. {...formItemLayout}
  1687. label="法人身份证"
  1688. >
  1689. <Input
  1690. placeholder="法人身份证"
  1691. value={this.state.legalPersonIdCard}
  1692. onChange={e => {
  1693. this.setState({
  1694. legalPersonIdCard: e.target.value
  1695. });
  1696. }}
  1697. />
  1698. </FormItem>
  1699. <FormItem
  1700. className="half-item"
  1701. {...formItemLayout}
  1702. label="联系人"
  1703. >
  1704. <Input
  1705. placeholder="联系人名称"
  1706. value={this.state.contacts}
  1707. onChange={e => {
  1708. this.setState({ contacts: e.target.value });
  1709. }}
  1710. />
  1711. </FormItem>
  1712. <FormItem
  1713. className="half-item"
  1714. {...formItemLayout}
  1715. label="联系人号码"
  1716. >
  1717. <Input
  1718. placeholder="联系人号码"
  1719. value={this.state.contactMobile}
  1720. onChange={e => {
  1721. this.setState({ contactMobile: e.target.value });
  1722. }}
  1723. />
  1724. </FormItem>
  1725. <FormItem
  1726. className="half-item"
  1727. {...formItemLayout}
  1728. label="法人电话"
  1729. >
  1730. <Input
  1731. placeholder="法人电话"
  1732. value={this.state.legalPersonTel}
  1733. onChange={e => {
  1734. this.setState({ legalPersonTel: e.target.value });
  1735. }}
  1736. />
  1737. </FormItem>
  1738. <FormItem
  1739. className="half-item"
  1740. {...formItemLayout}
  1741. label="法人邮箱"
  1742. >
  1743. <Input
  1744. placeholder="法人电子邮箱"
  1745. value={this.state.legalPersonEmail}
  1746. onChange={e => {
  1747. this.setState({ legalPersonEmail: e.target.value });
  1748. }}
  1749. />
  1750. </FormItem>
  1751. <FormItem
  1752. className="half-item"
  1753. {...formItemLayout}
  1754. label="社会统一信用机构代码"
  1755. >
  1756. <Input
  1757. placeholder="社会统一信用机构代码"
  1758. value={this.state.orgCode}
  1759. onChange={e => {
  1760. this.setState({ orgCode: e.target.value });
  1761. }}
  1762. />
  1763. </FormItem>
  1764. <div className="clearfix">
  1765. <FormItem
  1766. labelCol={{ span: 4 }}
  1767. wrapperCol={{ span: 18 }}
  1768. label="客户简介"
  1769. >
  1770. <Input
  1771. type="textarea"
  1772. rows={3}
  1773. value={this.state.introduction}
  1774. onChange={(e, pre) => {
  1775. this.setState({ introduction: e.target.value });
  1776. }}
  1777. />
  1778. </FormItem>
  1779. </div>
  1780. <div className="clearfix pictures">
  1781. <FormItem
  1782. style={{
  1783. display: "inline-block",
  1784. width: "350px",
  1785. marginTop: "20px",
  1786. marginLeft: "95px"
  1787. }}
  1788. labelCol={{ span: 8 }}
  1789. wrapperCol={{ span: 10 }}
  1790. label="机构证书(PIC)"
  1791. >
  1792. <PicturesWall
  1793. fileList={this.getOrgCodeUrl}
  1794. pictureUrl={this.state.orgCodeUrl}
  1795. />
  1796. <p>建议:图片要清晰。</p>
  1797. </FormItem>
  1798. <FormItem
  1799. style={{
  1800. display: "inline-block",
  1801. width: "350px",
  1802. marginTop: "20px",
  1803. marginTop: "20px"
  1804. }}
  1805. labelCol={{ span: 8 }}
  1806. wrapperCol={{ span: 10 }}
  1807. label="单位LOGO"
  1808. >
  1809. <PicturesWall
  1810. fileList={this.getCompanyLogoUrl}
  1811. pictureUrl={this.state.companyLogoUrl}
  1812. />
  1813. <p>建议:图片要清晰。</p>
  1814. </FormItem>
  1815. </div>
  1816. <div
  1817. style={{
  1818. fontSize: "18px",
  1819. marginLeft: "50px",
  1820. marginTop: "15px",
  1821. marginBottom: "10px",
  1822. color: "red",
  1823. fontWeight: "bold"
  1824. }}
  1825. >
  1826. 重要资料
  1827. </div>
  1828. <div className="clearfix">
  1829. <FormItem
  1830. className="half-item"
  1831. {...formItemLayout}
  1832. label="客户信用等级"
  1833. >
  1834. <Select
  1835. placeholder="客户信用等级"
  1836. value={this.state.creditRating}
  1837. style={{ width: "90%" }}
  1838. onChange={e => {
  1839. this.setState({ creditRating: e });
  1840. }}
  1841. >
  1842. {slcRedit.map(function(item) {
  1843. return (
  1844. <Select.Option key={item.value}>
  1845. {item.key}
  1846. </Select.Option>
  1847. );
  1848. })}
  1849. </Select>
  1850. <span style={{ color: "red", marginLeft: "5px" }}>
  1851. *
  1852. </span>
  1853. </FormItem>
  1854. <div className="clearfix">
  1855. <FormItem
  1856. labelCol={{ span: 4 }}
  1857. wrapperCol={{ span: 19 }}
  1858. label="企业核心技术"
  1859. >
  1860. <Input
  1861. type="textarea"
  1862. rows={3}
  1863. value={this.state.coreTechnology}
  1864. style={{ width: "96%" }}
  1865. onChange={(e, pre) => {
  1866. this.setState({
  1867. coreTechnology: e.target.value
  1868. });
  1869. }}
  1870. />
  1871. <span style={{ color: "red", marginLeft: "5px" }}>
  1872. *
  1873. </span>
  1874. </FormItem>
  1875. </div>
  1876. <div className="clearfix">
  1877. <FormItem
  1878. labelCol={{ span: 4 }}
  1879. wrapperCol={{ span: 19 }}
  1880. label="企业资质情况"
  1881. >
  1882. <Input
  1883. type="textarea"
  1884. rows={3}
  1885. value={this.state.qualification}
  1886. placeholder="请按如下格式填写:资质名称+获得时间+拥有人+发证机构"
  1887. onChange={(e, pre) => {
  1888. this.setState({
  1889. qualification: e.target.value
  1890. });
  1891. }}
  1892. style={{ width: "96%" }}
  1893. />
  1894. <span style={{ color: "red", marginLeft: "5px" }}>
  1895. *
  1896. </span>
  1897. </FormItem>
  1898. </div>
  1899. <div className="clearfix">
  1900. <FormItem
  1901. labelCol={{ span: 4 }}
  1902. wrapperCol={{ span: 19 }}
  1903. label="高企合作情况"
  1904. >
  1905. <Input
  1906. type="textarea"
  1907. rows={3}
  1908. value={this.state.cooperationSituation}
  1909. onChange={(e, pre) => {
  1910. this.setState({
  1911. cooperationSituation: e.target.value
  1912. });
  1913. }}
  1914. style={{ width: "96%" }}
  1915. />
  1916. <span style={{ color: "red", marginLeft: "5px" }}>
  1917. *
  1918. </span>
  1919. </FormItem>
  1920. </div>
  1921. <div className="clearfix">
  1922. <FormItem
  1923. labelCol={{ span: 4 }}
  1924. wrapperCol={{ span: 19 }}
  1925. label="项目申请书"
  1926. >
  1927. <Upload
  1928. style={{ display: "inlineBlock" }}
  1929. name="avatar"
  1930. action={
  1931. globalConfig.context +
  1932. "/api/admin/customer/upload"
  1933. }
  1934. data={{
  1935. uid: this.state.detailId,
  1936. sign: "organization_application"
  1937. }}
  1938. beforeUpload={beforeUploadFile}
  1939. fileList={this.state.fileList}
  1940. onChange={info => {
  1941. if (info.file.status !== "uploading") {
  1942. }
  1943. if (info.file.status === "done") {
  1944. if (!info.file.response.error.length) {
  1945. let isPDF = this.state.fileList[0].originFileObj.name.split(
  1946. "."
  1947. );
  1948. let isIndex = isPDF.length - 1;
  1949. if (isPDF[isIndex] == "pdf") {
  1950. message.success(
  1951. `${info.file.name} 文件上传成功!`
  1952. );
  1953. } else {
  1954. message.error("请上传pdf文件!");
  1955. }
  1956. } else {
  1957. message.warning(
  1958. info.file.response.error[0].message
  1959. );
  1960. return;
  1961. }
  1962. this.setState({
  1963. pojectApplicationUrl:
  1964. info.file.response.data,
  1965. isXian: 1
  1966. });
  1967. } else if (info.file.status === "error") {
  1968. message.error(
  1969. `${info.file.name} 文件上传失败。`
  1970. );
  1971. }
  1972. this.setState({
  1973. fileList: info.fileList.slice(-1)
  1974. });
  1975. }}
  1976. >
  1977. {/*<a onClick={
  1978. () => {var newTab = window.open('about:blank'); getPreviews(this.state.uid, 'techProject', 'organization_application', function (data) { newTab.location.href = data; });
  1979. }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>*/}
  1980. <Button>
  1981. <Icon type="upload" /> 项目材料上传{" "}
  1982. </Button>
  1983. </Upload>
  1984. <span
  1985. style={{ marginTop: "10px", marginLeft: "20px" }}
  1986. >
  1987. {this.state.pojectApplicationUrl ? (
  1988. <span className="download-file">
  1989. <a onClick={this.visitOk1}>
  1990. <Icon
  1991. style={{ fontSize: "16px" }}
  1992. type="eye-o"
  1993. />{" "}
  1994. </a>
  1995. </span>
  1996. ) : (
  1997. <span>
  1998. <Icon
  1999. type="exclamation-circle"
  2000. style={{
  2001. color: "#ffbf00",
  2002. marginRight: "6px"
  2003. }}
  2004. />
  2005. 未上传!
  2006. </span>
  2007. )}
  2008. </span>
  2009. </FormItem>
  2010. </div>
  2011. </div>
  2012. <Button
  2013. className="setSubmit"
  2014. type="primary"
  2015. htmlType="submit"
  2016. >
  2017. 保存
  2018. </Button>
  2019. <Button type="ghost" onClick={this.visitCancel}>
  2020. 取消
  2021. </Button>
  2022. </div>
  2023. </Spin>
  2024. </Form>
  2025. </div>
  2026. </TabPane>
  2027. <TabPane tab="知识产权列表" key="1">
  2028. <Button
  2029. type="primary"
  2030. className="addButton"
  2031. onClick={this.addClick}
  2032. >
  2033. 发布知识产权
  2034. <Icon type="plus" />
  2035. </Button>
  2036. <Spin spinning={this.state.loading}>
  2037. <Table
  2038. columns={this.state.columnsDate}
  2039. dataSource={this.state.dataSourceDate}
  2040. rowSelection={rowSelection}
  2041. pagination={this.state.paginationDate}
  2042. onRowClick={this.tableRowClickDate}
  2043. />
  2044. </Spin>
  2045. </TabPane>
  2046. <TabPane tab="财务信息" key="2">
  2047. <Button
  2048. type="primary"
  2049. className="addButton"
  2050. onClick={this.addClickc}
  2051. >
  2052. 添加年度财务信息
  2053. <Icon type="plus" />
  2054. </Button>
  2055. <Spin spinning={this.state.loading}>
  2056. <Table
  2057. columns={this.state.columnsc}
  2058. dataSource={this.state.dataSourcec}
  2059. rowSelection={rowSelection}
  2060. onRowClick={this.tableRowClickDatec}
  2061. />
  2062. </Spin>
  2063. </TabPane>
  2064. <TabPane tab="项目信息" key="3">
  2065. <Button
  2066. type="primary"
  2067. className="addButton"
  2068. onClick={this.addClickx}
  2069. >
  2070. 添加项目信息
  2071. <Icon type="plus" />
  2072. </Button>
  2073. <Spin spinning={this.state.loading}>
  2074. <Table
  2075. columns={this.state.columnsx}
  2076. dataSource={this.state.dataSourcex}
  2077. rowSelection={rowSelection}
  2078. onRowClick={this.tableRowClickDatex}
  2079. />
  2080. </Spin>
  2081. </TabPane>
  2082. </Tabs>
  2083. </Modal>
  2084. <Modal
  2085. className="customeDetails"
  2086. footer=""
  2087. title="项目申请书"
  2088. width="800px"
  2089. visible={this.state.visitModul1}
  2090. onOk={this.visitOk1}
  2091. onCancel={this.visitCancel1}
  2092. >
  2093. <div>
  2094. {/*<Button type="primary" onClick={this.pdfShows(pdfUrl)}>点击查看</Button>
  2095. <div id="pdfContent" style={{height:"500px",width:"500px",marginLeft:"300px"}} >
  2096. </div>
  2097. onDocumentLoad={this.onDocumentComplete}
  2098. onLoadSuccess={this.onDocumentComplete}
  2099. onDocumentComplete={this.onDocumentComplete}
  2100. onPageRender={this.onPageComplete}
  2101. // "http://s.jishutao.com/upload/achievement/achievement/34576808907162737_achievement_maturity_text_file.pdf"//{pdfUrl}
  2102. */}
  2103. <PDF
  2104. file={pdfUrl}
  2105. onDocumentLoad={this.onDocumentComplete}
  2106. pageIndex={parseInt(this.state.pagec)}
  2107. scale={1.2}
  2108. />
  2109. {paginationss}
  2110. </div>
  2111. </Modal>
  2112. <Modal
  2113. className="customeDetails"
  2114. footer=""
  2115. title="财务资料"
  2116. width="500px"
  2117. visible={this.state.visitModulc}
  2118. onOk={this.visitOkc}
  2119. onCancel={this.visitCancelc}
  2120. >
  2121. {" "}
  2122. <Form layout="horizontal" onSubmit={this.newSubmitc} id="demand-form">
  2123. <Spin spinning={this.state.loading}>
  2124. <div className="clearfix">
  2125. <FormItem {...formItemLayoutc} label="年份">
  2126. <Select
  2127. placeholder="年份"
  2128. value={this.state.year}
  2129. style={{ width: "90%" }}
  2130. onChange={e => {
  2131. this.setState({ year: e });
  2132. }}
  2133. >
  2134. {year.map(function(item) {
  2135. return (
  2136. <Select.Option key={item.value}>
  2137. {item.key}
  2138. </Select.Option>
  2139. );
  2140. })}
  2141. </Select>
  2142. </FormItem>
  2143. </div>
  2144. <div className="clearfix">
  2145. <FormItem {...formItemLayoutc} label="营销收入">
  2146. <Input
  2147. placeholder="营销收入"
  2148. style={{ width: "90%" }}
  2149. value={this.state.salesAmount}
  2150. onChange={e => {
  2151. this.setState({ salesAmount: e.target.value });
  2152. }}
  2153. />
  2154. </FormItem>
  2155. </div>
  2156. <div className="clearfix">
  2157. <FormItem {...formItemLayoutc} label="总资产">
  2158. <Input
  2159. placeholder="总资产"
  2160. style={{ width: "90%" }}
  2161. value={this.state.assets}
  2162. onChange={e => {
  2163. this.setState({ assets: e.target.value });
  2164. }}
  2165. />
  2166. </FormItem>
  2167. </div>
  2168. <div className="clearfix">
  2169. <FormItem {...formItemLayoutc} label="固定资产">
  2170. <Input
  2171. placeholder="总资产"
  2172. style={{ width: "90%" }}
  2173. value={this.state.fixedAssets}
  2174. onChange={e => {
  2175. this.setState({ fixedAssets: e.target.value });
  2176. }}
  2177. />
  2178. </FormItem>
  2179. </div>
  2180. <div className="clearfix">
  2181. <FormItem {...formItemLayoutc} label="研发费用">
  2182. <Input
  2183. placeholder="研发费用"
  2184. style={{ width: "90%" }}
  2185. value={this.state.researchAmount}
  2186. onChange={e => {
  2187. this.setState({ researchAmount: e.target.value });
  2188. }}
  2189. />
  2190. </FormItem>
  2191. </div>
  2192. <Button
  2193. className="setSubmit"
  2194. type="primary"
  2195. htmlType="submit"
  2196. style={{ marginLeft: "100px" }}
  2197. >
  2198. 保存
  2199. </Button>
  2200. <Button type="ghost" onClick={this.visitCancelc}>
  2201. 取消
  2202. </Button>
  2203. </Spin>
  2204. </Form>
  2205. </Modal>
  2206. <Modal
  2207. className="customeDetails"
  2208. footer=""
  2209. title="项目资料"
  2210. width="500px"
  2211. visible={this.state.visitModulx}
  2212. onOk={this.visitOkc}
  2213. onCancel={this.visitCancelc}
  2214. >
  2215. {" "}
  2216. <Form layout="horizontal" onSubmit={this.newSubmitx} id="demand-form">
  2217. <Spin spinning={this.state.loading}>
  2218. <div className="clearfix">
  2219. <FormItem {...formItemLayoutc} label="年份">
  2220. <Select
  2221. placeholder="年份"
  2222. value={this.state.year}
  2223. style={{ width: "90%" }}
  2224. onChange={e => {
  2225. this.setState({ year: e });
  2226. }}
  2227. >
  2228. {year.map(function(item) {
  2229. return (
  2230. <Select.Option key={item.value}>
  2231. {item.key}
  2232. </Select.Option>
  2233. );
  2234. })}
  2235. </Select>
  2236. </FormItem>
  2237. </div>
  2238. <div className="clearfix">
  2239. <FormItem {...formItemLayoutc} label="项目名称">
  2240. <Input
  2241. placeholder="项目名称"
  2242. style={{ width: "90%" }}
  2243. value={this.state.projectName}
  2244. onChange={e => {
  2245. this.setState({ projectName: e.target.value });
  2246. }}
  2247. />
  2248. </FormItem>
  2249. </div>
  2250. <div className="clearfix">
  2251. <FormItem {...formItemLayoutc} label="项目状态">
  2252. <Select
  2253. placeholder="项目状态"
  2254. value={this.state.status}
  2255. style={{ width: "90%" }}
  2256. onChange={e => {
  2257. this.setState({ status: e });
  2258. }}
  2259. >
  2260. {xiangmoState.map(function(item) {
  2261. return (
  2262. <Select.Option key={item.value}>
  2263. {item.key}
  2264. </Select.Option>
  2265. );
  2266. })}
  2267. </Select>
  2268. </FormItem>
  2269. </div>
  2270. <div className="clearfix">
  2271. <FormItem {...formItemLayoutc} label="备注">
  2272. <Input
  2273. type="textarea"
  2274. rows={3}
  2275. placeholder="备注"
  2276. style={{ width: "90%" }}
  2277. value={this.state.remark}
  2278. onChange={e => {
  2279. this.setState({ remark: e.target.value });
  2280. }}
  2281. />
  2282. </FormItem>
  2283. </div>
  2284. <Button
  2285. className="setSubmit"
  2286. type="primary"
  2287. htmlType="submit"
  2288. style={{ marginLeft: "100px" }}
  2289. >
  2290. 保存
  2291. </Button>
  2292. <Button type="ghost" onClick={this.visitCancelc}>
  2293. 取消
  2294. </Button>
  2295. </Spin>
  2296. </Form>
  2297. </Modal>
  2298. <TechAchievementDesc
  2299. data={this.state.RowData}
  2300. detailApiUrl={this.props["data-detailApiUrl"]}
  2301. achievementCategoryOption={this.state.achievementCategoryOption}
  2302. showDesc={this.state.showDesc}
  2303. uid={this.state.uid}
  2304. closeDesc={this.closeDesc}
  2305. loadDatas={this.loadDatas}
  2306. />
  2307. </div>
  2308. );
  2309. }
  2310. }));
  2311. export default IntentionCustomer;