crm.jsx 73 KB

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