crm.jsx 78 KB

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