crm.jsx 79 KB

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