crm.jsx 79 KB

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