crm.jsx 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254
  1. import React from 'react';
  2. import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, 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 TechAchievementDesc from '@/manageCenter/achievement/crmAchievement.jsx';
  7. import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
  8. import { socialAttribute, industry, auditStatusL, lvl, currentMember ,slcRedit,dataGrade} from '@/dataDic.js';
  9. import { getSocialAttribute, beforeUploadFile,splitUrl ,getSlcRedit,getDataGrade,getAchievementCategory,getTechAuditStatus,getboutique,getPreviews,getPreview} from '@/tools.js';
  10. import './customer.less';
  11. const TabPane = Tabs.TabPane;
  12. const Dragger = Upload.Dragger;
  13. //图片组件
  14. const PicturesWall = React.createClass({
  15. getInitialState() {
  16. return {
  17. previewVisible: false,
  18. previewImage: '',
  19. fileList: [],
  20. }
  21. },
  22. handleCancel() {
  23. this.setState({
  24. previewVisible: false
  25. })
  26. },
  27. handlePreview(file) {
  28. this.setState({
  29. previewImage: file.url || file.thumbUrl,
  30. previewVisible: true,
  31. });
  32. },
  33. handleChange(info) {
  34. let fileList = info.fileList;
  35. this.setState({
  36. fileList
  37. });
  38. this.props.fileList(fileList);
  39. },
  40. componentWillReceiveProps(nextProps) {
  41. this.state.fileList = nextProps.pictureUrl;
  42. this.state.pojectApplicationUrl = undefined;
  43. },
  44. render() {
  45. const {
  46. previewVisible,
  47. previewImage,
  48. fileList
  49. } = this.state;
  50. const uploadButton = (
  51. <div>
  52. <Icon type="plus" />
  53. <div className="ant-upload-text">点击上传</div>
  54. </div>
  55. );
  56. return(
  57. <div style={{display:"inline-block"}}>
  58. <Upload
  59. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  60. data={{ 'sign': '' }}
  61. listType="picture-card"
  62. fileList={fileList}
  63. onPreview={this.handlePreview}
  64. onChange={this.handleChange} >
  65. {fileList.length >= 1 ? null : uploadButton}
  66. </Upload>
  67. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  68. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  69. </Modal>
  70. </div>
  71. );
  72. }
  73. });
  74. const IntentionCustomer = Form.create()(React.createClass({
  75. loadData(pageNo, apiUrl) {
  76. this.setState({
  77. visitModul:false,
  78. loading: true,
  79. ispage:pageNo,
  80. modalVisible:false
  81. });
  82. $.ajax({
  83. method: "post",
  84. dataType: "json",
  85. crossDomain: false,
  86. url: globalConfig.context +"/api/admin/customer/listCustomerInformation",
  87. data: {
  88. pageNo: pageNo || 1,
  89. pageSize: this.state.pagination.pageSize,
  90. name: this.state.nameSearch,
  91. dataGrade: this.state.dataGrade,
  92. follow: this.state.follow,
  93. province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
  94. city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
  95. startDate: this.state.releaseDate[0],
  96. endDate: this.state.releaseDate[1],
  97. },
  98. success: function(data) {
  99. let theArr = [];
  100. if(data.error.length || data.data.list == "") {
  101. if(data.error && data.error.length) {
  102. message.warning(data.error[0].message);
  103. };
  104. } else {
  105. for(let i = 0; i < data.data.list.length; i++) {
  106. let thisdata = data.data.list[i];
  107. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  108. theArr.push({
  109. key: i,
  110. id: thisdata.id,//用户ID
  111. type:thisdata.type,//类型
  112. name: thisdata.name,//用户名称
  113. diqu: diqu,//省市区
  114. industry: thisdata.industry,//行业
  115. contacts: thisdata.contacts,//联系人
  116. contactMobile: thisdata.contactMobile,//联系人电话
  117. createTime: thisdata.createTime,//行业
  118. });
  119. };
  120. this.state.pagination.current = data.data.pageNo;
  121. this.state.pagination.total = data.data.totalCount;
  122. };
  123. if(data.data&&data.data.list&&!data.data.list.length){
  124. this.state.pagination.current=0
  125. this.state.pagination.total=0
  126. }
  127. this.setState({
  128. dataSource: theArr,
  129. pageNo: pageNo,
  130. pagination: this.state.pagination,
  131. selectedRowKeys:[]
  132. });
  133. }.bind(this),
  134. }).always(function() {
  135. this.setState({
  136. loading: false
  137. });
  138. }.bind(this));
  139. },
  140. loadDatas(pageNos) {
  141. this.setState({
  142. loading: true,
  143. });
  144. $.ajax({
  145. method: "get",
  146. dataType: "json",
  147. crossDomain: false,
  148. url: globalConfig.context + "/api/admin/achievement/listUserAchievement",
  149. data: {
  150. pageNo: pageNos || 1,
  151. pageSize: this.state.paginationDate.pageSize,
  152. uid:this.state.uid,
  153. },
  154. success: function (data) {
  155. let theArr = [];
  156. if (!data.data || !data.data.list) {
  157. if (data.error && data.error.length) {
  158. message.warning(data.error[0].message);
  159. };
  160. } else {
  161. for (let i = 0; i < data.data.list.length; i++) {
  162. let thisdata = data.data.list[i];
  163. theArr.push({
  164. key: i,
  165. id: thisdata.id,
  166. serialNumber: thisdata.serialNumber,
  167. dataCategory: thisdata.dataCategory,
  168. name: thisdata.name,
  169. keyword: thisdata.keyword,
  170. theName: thisdata.username || thisdata.ownerName,
  171. category: thisdata.category,
  172. ownerName: thisdata.username ? thisdata.username : thisdata.ownerName,
  173. ownerType: thisdata.ownerType,
  174. ownerMobile: thisdata.ownerMobile,
  175. status: thisdata.status,
  176. releaseDate: thisdata.releaseDate,
  177. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  178. auditStatus: thisdata.auditStatus,
  179. boutique: thisdata.boutique,
  180. hot: thisdata.hot,
  181. techBrokerId:thisdata.techBrokerId,
  182. createTimeFormattedDate: thisdata.createTimeFormattedDate,
  183. remark:thisdata.remark
  184. });
  185. };
  186. this.state.paginationDate.current = data.data.pageNo;
  187. this.state.paginationDate.total = data.data.totalCount;
  188. };
  189. this.setState({
  190. dataSourceDate: theArr,
  191. pageNos: pageNos,
  192. paginationDate: this.state.paginationDate
  193. });
  194. }.bind(this),
  195. }).always(function () {
  196. this.setState({
  197. loading: false
  198. });
  199. }.bind(this));
  200. },
  201. getInitialState() {
  202. return {
  203. addressSearch: [],
  204. orgCodeUrl: [],
  205. companyLogoUrl: [],
  206. visible: false,
  207. releaseDate: [],
  208. visitModul:false,
  209. detailApi:'',
  210. followData:{},
  211. selectedRowKeys: [],
  212. selectedRows: [],
  213. loading: false,
  214. callnub:"0",
  215. pojectApplicationUrl:"",
  216. isXian:0,
  217. modalVisible:false,
  218. pagination: {
  219. defaultCurrent: 1,
  220. defaultPageSize: 10,
  221. showQuickJumper: true,
  222. pageSize: 10,
  223. onChange: function(page) {
  224. this.loadData(page);
  225. }.bind(this),
  226. showTotal: function(total) {
  227. return '共' + total + '条数据';
  228. }
  229. },
  230. paginationDate: {
  231. defaultCurrent: 1,
  232. defaultPageSize: 10,
  233. showQuickJumper: true,
  234. pageSize: 10,
  235. onChange: function(page) {
  236. this.loadDatas(page);
  237. }.bind(this),
  238. showTotal: function(total) {
  239. return '共' + total + '条数据';
  240. }
  241. },
  242. columns: [{
  243. title: '客户名称',
  244. dataIndex: 'name',
  245. key: 'name',
  246. }, {
  247. title: '地区',
  248. dataIndex: 'diqu',
  249. key: 'diqu',
  250. }, {
  251. title: '联系人',
  252. dataIndex: 'contacts',
  253. key: 'contacts',
  254. },
  255. {
  256. title: '行业',
  257. dataIndex: 'industry',
  258. key: 'industry'
  259. },
  260. {
  261. title: '联系电话',
  262. dataIndex: 'contactMobile',
  263. key: 'contactMobile',
  264. },
  265. {
  266. title: '创建时间',
  267. dataIndex: 'createTime',
  268. key: 'createTime',
  269. }
  270. ],
  271. data: [],
  272. dataman: [],
  273. dataSource: [],
  274. visitArrList: [],
  275. columnsDate: [
  276. {
  277. title: '编号',
  278. dataIndex: 'serialNumber',
  279. key: 'serialNumber',
  280. }, {
  281. title: '名称',
  282. dataIndex: 'name',
  283. key: 'name',
  284. }, {
  285. title: '关键字',
  286. dataIndex: 'keyword',
  287. key: 'keyword',
  288. }, {
  289. title: '类型',
  290. dataIndex: 'category',
  291. key: 'category',
  292. render: text => { return getAchievementCategory(text); }
  293. },{
  294. title: '审核状态',
  295. dataIndex: 'auditStatus',
  296. key: 'auditStatus',
  297. render: text => { return getTechAuditStatus(text) }
  298. },
  299. {
  300. title: '是否精品',
  301. dataIndex: 'boutique',
  302. key: 'boutique',
  303. render: text => { return getboutique(text) }
  304. },
  305. {
  306. title: '发布时间',
  307. dataIndex: 'releaseDateFormattedDate',
  308. key: 'releaseDateFormattedDate',
  309. },{
  310. title: '录入时间',
  311. dataIndex: 'createTimeFormattedDate',
  312. key: 'createTimeFormattedDate',
  313. },
  314. ],
  315. dataSourceDate: [],
  316. };
  317. },
  318. componentWillMount() {
  319. //城市
  320. let Province = [];
  321. provinceList.map(function(item) {
  322. var id = String(item.id)
  323. Province.push(
  324. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  325. )
  326. });
  327. //行业
  328. let intentionalArr = [];
  329. industry.map(function(item) {
  330. intentionalArr.push(
  331. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  332. )
  333. });
  334. //会员等级
  335. let lvlArr = [];
  336. lvl.map(function(item) {
  337. lvlArr.push(
  338. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  339. )
  340. });
  341. //会员状态customerStatus
  342. let currentMemberArr = [];
  343. currentMember.map(function(item) {
  344. currentMemberArr.push(
  345. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  346. )
  347. });
  348. this.state.Provinces = Province;
  349. this.state.intentionalOption = intentionalArr;
  350. this.state.lvlArrOption = lvlArr;
  351. this.state.currentMemberArrOption = currentMemberArr;
  352. this.loadData();
  353. },
  354. search() {
  355. this.loadData();
  356. },
  357. reset() {
  358. this.state.nameSearch = '';
  359. this.state.addressSearch = [];
  360. this.state.dataGrade=undefined;
  361. this.state.follow=undefined;
  362. this.state.provinceSearch = undefined;
  363. this.state.citySearch = undefined;
  364. this.state.releaseDate[0] = undefined;
  365. this.state.releaseDate[1] = undefined;
  366. this.loadData();
  367. },
  368. //列表详情
  369. details(id) {
  370. $.ajax({
  371. method: "get",
  372. dataType: "json",
  373. crossDomain: false,
  374. url: globalConfig.context +"/api/admin/customer/findOrganizationCustomerDetail",
  375. data: {
  376. uid:id
  377. },
  378. success: function(data) {
  379. let thisDetail= data.data;
  380. if(data.error.length || data.data.list == "") {
  381. if(data.error && data.error.length) {
  382. message.warning(data.error[0].message);
  383. };
  384. } else {
  385. let ProvinceCityArr = [];
  386. let ProvinceS = thisDetail.locationProvince; //省
  387. let citys = thisDetail.locationCity;//市
  388. let Areas = thisDetail.locationArea;//区
  389. ProvinceCityArr.push(ProvinceS, citys, Areas);
  390. this.setState({
  391. detailId:thisDetail.id,//详情ID
  392. identifyName:thisDetail.identifyName,//客户名称
  393. uid:thisDetail.uid,//客户ID
  394. societyTag:thisDetail.societyTag,//社会标签
  395. companyLogoUrl:thisDetail.companyLogoUrl? splitUrl(thisDetail.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],//公司LOGO
  396. introduction:thisDetail.introduction,//介绍
  397. industry:thisDetail.industry?thisDetail.industry.toString():"",//行业
  398. locationProvince:thisDetail.locationProvince,//省
  399. locationCity:thisDetail.locationCity,//市
  400. locationArea:thisDetail.locationArea,//区
  401. ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,//省市区
  402. postalAddress:thisDetail.postalAddress,//通讯地址
  403. contactsFixedTel:thisDetail.contactsFixedTel,//固定电话
  404. contactsFax:thisDetail.contactsFax,//传真地址
  405. registeredCapital:thisDetail.registeredCapital,//注册资金
  406. enterpriseScale:thisDetail.enterpriseScale,//企业规模
  407. legalPerson:thisDetail.legalPerson,//法人
  408. legalPersonIdCard:thisDetail.legalPersonIdCard,//法人身份证
  409. legalPersonTel:thisDetail.legalPersonTel,//法人联系电话
  410. legalPersonEmail:thisDetail.legalPersonEmail,//法人联系邮箱
  411. highTechZone:thisDetail.highTechZone,//是否高新
  412. listed:thisDetail.listed,//是否高新
  413. international:thisDetail.international,//是否国际化
  414. orgCode:thisDetail.orgCode,//社会统一机构
  415. orgCodeUrl:thisDetail.orgCodeUrl? splitUrl(thisDetail.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],//社会统一机构地址
  416. businessScope:thisDetail.businessScope,//业务范围
  417. contacts:thisDetail.contacts,//主要联系人姓名
  418. contactMobile:thisDetail.contactMobile,//主要联系人电话
  419. investment:thisDetail.investment,//投资机构
  420. businessAudit:thisDetail.businessAudit,//业务认证
  421. auditStatus:thisDetail.auditStatus,//实名认证
  422. intellectualProperty:thisDetail.intellectualProperty,//已有知识产权情况
  423. yearSalesAmount:thisDetail.yearSalesAmount,//年度销售额
  424. lastYearResearchAmount:thisDetail.lastYearResearchAmount,//上年度研发费用
  425. assets:thisDetail.assets,//总资产
  426. qualification:thisDetail.qualification,//企业资质情况
  427. cooperationSituation:thisDetail.cooperationSituation,//企业与高校院所
  428. informationMaintainer:thisDetail.informationMaintainer,//资料维护人
  429. informationMaintainerName:thisDetail.informationMaintainerName,//资料维护人
  430. coreTechnology:thisDetail.coreTechnology,//核心技术
  431. accomplishSituation:thisDetail.accomplishSituation,//客户已完成项目情况
  432. creditRating:thisDetail.creditRating?thisDetail.creditRating.toString():"",//信用等级
  433. pojectApplicationUrl:thisDetail.pojectApplicationUrl,//文件地址
  434. });
  435. }}.bind(this),
  436. }).always(function() {
  437. this.setState({
  438. loading: false
  439. });
  440. }.bind(this));
  441. },
  442. //基本信息提交
  443. newSubmit(e) {
  444. e.preventDefault();
  445. if(!this.state.industry) {
  446. message.warning('请选择行业');
  447. return false;
  448. };
  449. if(!this.state.societyTag) {
  450. message.warning('请选择社会属性');
  451. return false;
  452. };
  453. if(!this.state.ProvinceCity[1]) {
  454. message.warning('请选择地区');
  455. return false;
  456. };
  457. if(!this.state.registeredCapital) {
  458. message.warning('请填写注册资本');
  459. return false;
  460. };
  461. if(!this.state.businessScope) {
  462. message.warning('请填写公司主营产品');
  463. return false;
  464. };
  465. var reg = /^[1-9]\d*$|^0$/;
  466. if(this.state.consultationPrice) {
  467. if(this.state.consultationPrice.length > 6) {
  468. message.warning('咨询费用不超过6位数');
  469. this.refs.consul.focus();
  470. return false;
  471. };
  472. if(!reg.test(this.state.consultationPrice)) {
  473. message.warning('咨询费用只能输入数字');
  474. this.refs.consul.focus();
  475. return false;
  476. }
  477. }
  478. this.state.data = [];
  479. this.setState({
  480. selectedRowKeys: [],
  481. });
  482. let theorgCodeUrl = [];
  483. if(this.state.orgCodeUrl.length) {
  484. let picArr = [];
  485. this.state.orgCodeUrl.map(function(item) {
  486. if(item.response && item.response.data && item.response.data.length) {
  487. picArr.push(item.response.data);
  488. }
  489. });
  490. theorgCodeUrl = picArr.join(",");
  491. };
  492. let thecompanyLogoUrl = [];
  493. if(this.state.companyLogoUrl.length) {
  494. let picArr = [];
  495. this.state.companyLogoUrl.map(function(item) {
  496. if(item.response && item.response.data && item.response.data.length) {
  497. picArr.push(item.response.data);
  498. }
  499. });
  500. thecompanyLogoUrl = picArr.join(",");
  501. };
  502. let years = [];
  503. let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
  504. years = yearMonth.split('/');
  505. this.setState({
  506. loading: true
  507. });
  508. $.ajax({
  509. method: "post",
  510. dataType: "json",
  511. url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  512. data: {
  513. id:this.state.detailId,//详情ID
  514. identifyName:this.state.identifyName,//客户名称
  515. uid:this.state.uid,//客户ID
  516. societyTag:this.state.societyTag,//社会标签
  517. companyLogoUrl:thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',//公司LOGO
  518. introduction:this.state.introduction,//介绍
  519. industry:this.state.industry,//行业
  520. locationProvince:(this.state.ProvinceCity)[0],//省
  521. locationCity:(this.state.ProvinceCity)[1],//市
  522. locationArea:(this.state.ProvinceCity)[2],//区
  523. postalAddress:this.state.postalAddress,//通讯地址
  524. contactsFixedTel:this.state.contactsFixedTel,//固定电话
  525. contactsFax:this.state.contactsFax,//传真地址
  526. registeredCapital:this.state.registeredCapital,//注册资金
  527. enterpriseScale:this.state.enterpriseScale,//企业规模
  528. legalPerson:this.state.legalPerson,//法人
  529. legalPersonIdCard:this.state.legalPersonIdCard,//法人身份证
  530. legalPersonTel:this.state.legalPersonTel,//法人联系电话
  531. legalPersonEmail:this.state.legalPersonEmail,//法人联系邮箱
  532. highTechZone:this.state.highTechZone,//是否高新
  533. listed:this.state.listed,//是否高新
  534. international:this.state.international,//是否国际化
  535. orgCode:this.state.orgCode,//社会统一机构
  536. orgCodeUrl: theorgCodeUrl.length != 0 ? theorgCodeUrl : '',//社会统一机构地址
  537. businessScope:this.state.businessScope,//业务范围
  538. contacts:this.state.contacts,//主要联系人姓名
  539. contactMobile:this.state.contactMobile,//主要联系人电话
  540. investment:this.state.investment,//投资机构
  541. businessAudit:this.state.businessAudit,//业务认证
  542. auditStatus:this.state.auditStatus,//实名认证
  543. intellectualProperty:this.state.intellectualProperty,//已有知识产权情况
  544. yearSalesAmount:this.state.yearSalesAmount,//年度销售额
  545. lastYearResearchAmount:this.state.lastYearResearchAmount,//上年度研发费用
  546. assets:this.state.assets,//总资产
  547. qualification:this.state.qualification,//企业资质情况
  548. cooperationSituation:this.state.cooperationSituation,//企业与高校院所
  549. informationMaintainer:this.state.informationMaintainer,//资料维护人
  550. informationMaintainerName:this.state.informationMaintainerName,//资料维护人
  551. coreTechnology:this.state.coreTechnology,//核心技术
  552. accomplishSituation:this.state.accomplishSituation,//客户已完成项目情况
  553. creditRating:this.state.creditRating,//信用等级
  554. pojectApplicationUrl:this.state.pojectApplicationUrl,//文件地址
  555. }
  556. }).done(function(data) {
  557. this.setState({
  558. loading: false
  559. });
  560. if(!data.error.length) {
  561. message.success('保存成功!');
  562. this.visitCancel();
  563. this.loadData(this.state.pageNo);
  564. } else {
  565. message.warning(data.error[0].message);
  566. }
  567. }.bind(this));
  568. },
  569. //获取ID
  570. getStateData(id) {
  571. this.setState({
  572. loading: true
  573. });
  574. $.ajax({
  575. method: "post",
  576. dataType: "json",
  577. crossDomain: false,
  578. url: globalConfig.context + "/api/admin/techproject/techProjectLog",
  579. data: {
  580. pid: id || this.props.data.id
  581. },
  582. success: function (data) {
  583. if (!data.data) {
  584. if (data.error && data.error.length) {
  585. message.warning(data.error[0].message);
  586. };
  587. return;
  588. };
  589. var myDate = new Date();
  590. this.state.stateTable = [];
  591. for (let i = 0; i < data.data.length; i++) {
  592. this.state.stateTable.push({
  593. key: i,
  594. state: data.data[i].state,
  595. recordTime: data.data[i].recordTime,
  596. recordTimeFormattedDate: data.data[i].recordTimeFormattedDate,
  597. principal: data.data[i].principal,
  598. operator: data.data[i].operator,
  599. comment: data.data[i].comment
  600. });
  601. };
  602. }.bind(this),
  603. }).always(function () {
  604. this.setState({
  605. loading: false
  606. });
  607. }.bind(this));
  608. },
  609. //整行点击
  610. tableRowClick(record, index) {
  611. this.state.visitModul=true;
  612. this.state.pojectApplicationUrl = undefined;
  613. this.state.isXian=0;
  614. this.details(record.id);
  615. },
  616. //指定转交人自动补全
  617. supervisor(e){
  618. $.ajax({
  619. method: "get",
  620. dataType: "json",
  621. crossDomain: false,
  622. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  623. data:{
  624. adminName:e
  625. },
  626. success: function (data) {
  627. let thedata=data.data;
  628. if (!thedata) {
  629. if (data.error && data.error.length) {
  630. message.warning(data.error[0].message);
  631. };
  632. thedata = {};
  633. };
  634. this.setState({
  635. customerArr:thedata,
  636. });
  637. }.bind(this),
  638. }).always(function () {
  639. this.setState({
  640. loading: false
  641. });
  642. }.bind(this));
  643. },
  644. //输入转交人输入框失去焦点是判断客户是否存在
  645. selectAuto(value,options){
  646. this.setState({
  647. auto:value
  648. })
  649. },
  650. blurChange(e){
  651. let theType='';
  652. let contactLists=this.state.customerArr||[];
  653. if (e) {
  654. contactLists.map(function (item) {
  655. if (item.name == e.toString()) {
  656. theType = item.id;
  657. }
  658. });
  659. }
  660. this.setState({
  661. theTypes:theType
  662. })
  663. },
  664. //值改变时请求客户名称
  665. httpChange(e){
  666. if(e.length>=1){
  667. this.supervisor(e);
  668. }
  669. this.setState({
  670. auto:e
  671. })
  672. },
  673. //转交
  674. changeAssigner() {
  675. if(this.state.theTypes){
  676. this.setState({
  677. selectedRowKeys: [],
  678. });
  679. let id;
  680. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  681. let rowItem = this.state.selectedRows[idx];
  682. if(rowItem.id) {
  683. id=rowItem.id;
  684. };
  685. };
  686. $.ajax({
  687. method: "post",
  688. dataType: "json",
  689. crossDomain: false,
  690. url: globalConfig.context + "/api/admin/customer/updateInformationMaintainerr",
  691. data: {
  692. id: id, //客户ID
  693. aid: this.state.theTypes, //指定转交人的ID
  694. }
  695. }).done(function(data) {
  696. if(!data.error.length) {
  697. message.success('转交成功!');
  698. this.setState({
  699. auto:'',
  700. loading: false,
  701. });
  702. } else {
  703. message.warning(data.error[0].message);
  704. };
  705. this.loadData(Math.min(this.state.pageNo==undefined?1:this.state.pageNo,Math.ceil((this.state.pagination.total-1)/10)));
  706. }.bind(this));
  707. }else{
  708. message.warning('请输入转交人姓名')
  709. }
  710. },
  711. //详情打开
  712. visitOk(e) {
  713. this.setState({
  714. visitModul: false
  715. });
  716. },
  717. //详情关闭
  718. visitCancel(e) {
  719. this.state.fileList = [];
  720. this.setState({
  721. visitModul: false,
  722. callnub:"0"
  723. });
  724. },
  725. getOrgCodeUrl(e) {
  726. this.setState({ orgCodeUrl: e });
  727. },
  728. getCompanyLogoUrl(e) {
  729. this.setState({ companyLogoUrl: e });
  730. },
  731. componentWillReceiveProps(nextProps) {
  732. if(nextProps.ApiUrl!=this.props.ApiUrl) {
  733. this.state.nameSearch = '';
  734. this.state.addressSearch = [];
  735. this.state.provinceSearch = undefined;
  736. this.state.citySearch = undefined;
  737. this.state.releaseDate[0] = undefined;
  738. this.state.releaseDate[1] = undefined;
  739. this.loadData(null,nextProps.ApiUrl);
  740. };
  741. },
  742. callback(e) {
  743. if(e == '0') {
  744. this.setState({
  745. callnub: e,
  746. })
  747. }
  748. if(e == '1') {
  749. this.setState({
  750. callnub: e,
  751. })
  752. this.loadDatas();
  753. }
  754. },
  755. //发布成果
  756. addClick() {
  757. this.state.RowData = {};
  758. this.setState({
  759. showDesc: true,
  760. });
  761. },
  762. //关闭发布成果
  763. closeDesc(e, s) {
  764. this.state.showDesc = e;
  765. if (s) {
  766. this.loadDatas();
  767. };
  768. },
  769. tableRowClickDate(record, index) {
  770. this.state.RowData = record;
  771. if(index!=undefined){
  772. this.setState({
  773. showDesc: true
  774. });
  775. }
  776. },
  777. render() {
  778. const {
  779. RangePicker,
  780. MonthPicker
  781. } = DatePicker;
  782. const formItemLayout = {
  783. labelCol: { span: 8 },
  784. wrapperCol: { span: 14 },
  785. };
  786. const FormItem = Form.Item;
  787. const rowSelection = {
  788. selectedRowKeys: this.state.selectedRowKeys,
  789. onChange: (selectedRowKeys, selectedRows) => {
  790. this.setState({
  791. modalVisible:false,
  792. selectedRows: selectedRows.slice(-1),
  793. selectedRowKeys: selectedRowKeys.slice(-1)
  794. });
  795. },
  796. onSelect: (recordt, selected, selectedRows) => {
  797. this.setState({
  798. modalVisible:false,
  799. recordt: recordt.id
  800. })
  801. },
  802. };
  803. const hasSelected = this.state.selectedRowKeys.length > 0;
  804. const dataSources=this.state.customerArr || [];
  805. const options = dataSources.map((group) =>
  806. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  807. )
  808. const intentionState = this.props.intentionState ||'';
  809. const props = {
  810. name: 'file',
  811. multiple: true,
  812. action: '/api/admin/techproject/upload',
  813. onChange(info) {
  814. const status = info.file.status;
  815. if (status !== 'uploading') {
  816. }
  817. if (status === 'done') {
  818. message.success(`${info.file.name} file uploaded successfully.`);
  819. } else if (status === 'error') {
  820. message.error(`${info.file.name} file upload failed.`);
  821. }
  822. },
  823. };
  824. return(
  825. <div className="user-content" >
  826. <div className="content-title">
  827. <span>客户资料维护</span>
  828. </div>
  829. <div className="user-search">
  830. <Input placeholder="客户名称"
  831. value={this.state.nameSearch}
  832. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  833. <Select placeholder="省"
  834. style={{ width: 80 }}
  835. value={this.state.provinceSearch}
  836. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  837. {this.state.Provinces}
  838. </Select>
  839. <span style={{marginRight:'10px'}}>
  840. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  841. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  842. </span>
  843. <Select placeholder="选择资料质量" style={{ width: 120 }}
  844. value={this.state.dataGrade}
  845. onChange={(e) => { this.setState({ dataGrade: e }) }}>
  846. <Select.Option value="0" >有效资料</Select.Option>
  847. <Select.Option value="1" >优质资料</Select.Option>
  848. </Select>
  849. <Select placeholder="是否面谈客户" style={{ width: 120 }}
  850. value={this.state.follow}
  851. onChange={(e) => { this.setState({ follow: e }) }}>
  852. <Select.Option value="0" >否</Select.Option>
  853. <Select.Option value="1" >是</Select.Option>
  854. </Select>
  855. <RangePicker style={{marginRight:'10px'}}
  856. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  857. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  858. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  859. <Button type="primary" onClick={this.search}>搜索</Button>
  860. <Button onClick={this.reset}>重置</Button>
  861. <AutoComplete
  862. className="certain-category-search"
  863. dropdownClassName="certain-category-search-dropdown"
  864. dropdownMatchSelectWidth={false}
  865. dropdownStyle={{ width: 120 }}
  866. style={{ width: '120px'}}
  867. dataSource={options}
  868. placeholder="输入转交人姓名"
  869. value={this.state.auto}
  870. onChange={this.httpChange}
  871. filterOption={true}
  872. onBlur={this.blurChange}
  873. onSelect={this.selectAuto}
  874. disabled={!hasSelected}
  875. >
  876. <Input />
  877. </AutoComplete>
  878. <Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
  879. </div>
  880. <div className="patent-table">
  881. <Spin spinning={this.state.loading}>
  882. <Table columns={this.state.columns}
  883. dataSource={this.state.dataSource}
  884. rowSelection={rowSelection}
  885. pagination={this.state.pagination}
  886. onRowClick={this.tableRowClick}
  887. />
  888. </Spin>
  889. </div>
  890. <Modal
  891. className="customeDetails"
  892. footer=''
  893. title="客户资料"
  894. width='1000px'
  895. visible={this.state.visitModul}
  896. onOk={this.visitOk}
  897. onCancel={this.visitCancel}
  898. >
  899. <Tabs onChange={this.callback} activeKey={this.state.callnub}>
  900. <TabPane tab="基本信息" key="0">
  901. <div>
  902. <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
  903. <Spin spinning={this.state.loading}>
  904. <div style={{fontSize:'18px',marginLeft:'50px',marginTop:'15px',marginBottom:'10px',color:"red",fontWeight:"bold"}}>基本信息</div>
  905. <div className="clearfix" >
  906. <FormItem className="half-item"
  907. {...formItemLayout}
  908. label="客户姓名"
  909. >
  910. <span>{this.state.identifyName}</span>
  911. </FormItem>
  912. <FormItem className="half-item"
  913. {...formItemLayout}
  914. label="资料所属人"
  915. >
  916. <span>{this.state.informationMaintainerName}</span>
  917. </FormItem>
  918. </div>
  919. <div className="clearfix" >
  920. <FormItem className="half-item"
  921. {...formItemLayout}
  922. label="企业行业">
  923. <Select placeholder="选择行业" value={this.state.industry} style={{width:'95%'}}
  924. onChange={(e)=>{this.setState({industry:e})}}>
  925. {
  926. industry.map(function (item) {
  927. return <Select.Option key={item.value} >{item.key}</Select.Option>
  928. })
  929. }
  930. </Select>
  931. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  932. </FormItem>
  933. <FormItem className="half-item"
  934. {...formItemLayout}
  935. label="社会属性"
  936. >
  937. <Select placeholder="客户社会属性" value={this.state.societyTag} style={{width:'95%'}}
  938. onChange={(e)=>{this.setState({societyTag:e})}}>
  939. {
  940. socialAttribute.map(function (item) {
  941. return <Select.Option key={item.value} >{item.key}</Select.Option>
  942. })
  943. }
  944. </Select>
  945. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  946. </FormItem>
  947. <FormItem className="half-item"
  948. {...formItemLayout}
  949. label="省-市-区"
  950. >
  951. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'95%'}}
  952. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  953. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  954. </FormItem>
  955. <FormItem className="half-item"
  956. {...formItemLayout}
  957. label="注册资本"
  958. >
  959. <Input placeholder="注册资本" style={{width:'90%'}} value={this.state.registeredCapital} onChange={(e) => {
  960. this.setState({ registeredCapital: e.target.value }) }} />万
  961. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  962. </FormItem>
  963. <div className='clearfix'>
  964. <FormItem
  965. labelCol={{ span:4 }}
  966. wrapperCol={{ span: 20 }}
  967. label="主营产品" >
  968. <Input type="textarea" rows={2} value={this.state.businessScope} style={{width:'95%'}}
  969. onChange={(e,pre) => { this.setState({ businessScope: e.target.value })}}/>
  970. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  971. </FormItem>
  972. </div>
  973. <div style={{fontSize:'18px',marginLeft:'50px',marginTop:'15px',marginBottom:'10px',color:"red",fontWeight:"bold"}}>企业资料</div>
  974. <FormItem className="half-item"
  975. {...formItemLayout}
  976. label="通信地址"
  977. >
  978. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  979. onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
  980. </FormItem>
  981. <FormItem className="half-item"
  982. {...formItemLayout}
  983. label="固定电话"
  984. >
  985. <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
  986. onChange={(e) => { this.setState({ contactsFixedTel: e.target.value }) }}/>
  987. </FormItem>
  988. <FormItem className="half-item"
  989. {...formItemLayout}
  990. label="客户传真"
  991. >
  992. <Input placeholder="客户传真" value={this.state.contactsFax}
  993. onChange={(e) => { this.setState({ contactsFax: e.target.value })}}/>
  994. </FormItem>
  995. <FormItem className="half-item"
  996. {...formItemLayout}
  997. label="企业人数"
  998. >
  999. <Input placeholder="单位规模" value={this.state.enterpriseScale} onChange={(e) => {
  1000. this.setState({ enterpriseScale: e.target.value })}}/>
  1001. </FormItem>
  1002. <FormItem className="half-item"
  1003. {...formItemLayout}
  1004. label="法人名称"
  1005. >
  1006. <Input placeholder="法人名称" value={this.state.legalPerson} onChange={(e) => {
  1007. this.setState({ legalPerson: e.target.value })}}/>
  1008. </FormItem>
  1009. <FormItem className="half-item"
  1010. {...formItemLayout}
  1011. label="法人身份证"
  1012. >
  1013. <Input placeholder="法人身份证" value={this.state.legalPersonIdCard} onChange={(e) => {
  1014. this.setState({ legalPersonIdCard: e.target.value })}}/>
  1015. </FormItem>
  1016. <FormItem className="half-item"
  1017. {...formItemLayout}
  1018. label="联系人"
  1019. >
  1020. <Input placeholder="联系人名称" value={this.state.contacts} onChange={(e) => {
  1021. this.setState({ contacts: e.target.value })}}/>
  1022. </FormItem>
  1023. <FormItem className="half-item"
  1024. {...formItemLayout}
  1025. label="联系人号码"
  1026. >
  1027. <Input placeholder="联系人号码" value={this.state.contactMobile} onChange={(e) => {
  1028. this.setState({ contactMobile: e.target.value })}}/>
  1029. </FormItem>
  1030. <FormItem className="half-item"
  1031. {...formItemLayout}
  1032. label="法人电话"
  1033. >
  1034. <Input placeholder="法人电话" value={this.state.legalPersonTel} onChange={(e) => {
  1035. this.setState({ legalPersonTel: e.target.value })}}/>
  1036. </FormItem>
  1037. <FormItem className="half-item"
  1038. {...formItemLayout}
  1039. label="法人邮箱"
  1040. >
  1041. <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
  1042. onChange={(e) => {this.setState({legalPersonEmail: e.target.value })}}/>
  1043. </FormItem>
  1044. <FormItem className="half-item"
  1045. {...formItemLayout}
  1046. label="社会统一信用机构代码"
  1047. >
  1048. <Input placeholder="社会统一信用机构代码" value={this.state.orgCode} onChange={(e) => {
  1049. this.setState({ orgCode: e.target.value })}}/>
  1050. </FormItem>
  1051. <div className='clearfix'>
  1052. <FormItem
  1053. labelCol={{ span:4 }}
  1054. wrapperCol={{ span: 18 }}
  1055. label="客户简介" >
  1056. <Input type="textarea" rows={3} value={this.state.introduction}
  1057. onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
  1058. </FormItem>
  1059. </div>
  1060. <div className="clearfix pictures">
  1061. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'95px'}}
  1062. labelCol={{ span: 8 }}
  1063. wrapperCol={{ span: 10 }}
  1064. label="机构证书(PIC)" >
  1065. <PicturesWall
  1066. fileList={this.getOrgCodeUrl}
  1067. pictureUrl={this.state.orgCodeUrl} />
  1068. <p>建议:图片要清晰。</p>
  1069. </FormItem>
  1070. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginTop:'20px'}}
  1071. labelCol={{ span: 8 }}
  1072. wrapperCol={{ span: 10 }}
  1073. label="单位LOGO" >
  1074. <PicturesWall
  1075. fileList={this.getCompanyLogoUrl}
  1076. pictureUrl={this.state.companyLogoUrl} />
  1077. <p>建议:图片要清晰。</p>
  1078. </FormItem>
  1079. </div>
  1080. <div style={{fontSize:'18px',marginLeft:'50px',marginTop:'15px',marginBottom:'10px',color:"red",fontWeight:"bold"}}>重要资料</div>
  1081. <div className='clearfix' >
  1082. <FormItem className="half-item"
  1083. {...formItemLayout}
  1084. label="上年度销售额"
  1085. >
  1086. <Input ref='consul' placeholder="请输入上年度销售额" value={this.state.yearSalesAmount} style={{width:'90%'}}
  1087. onChange={(e) => {this.setState({yearSalesAmount: e.target.value })}}/>万
  1088. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1089. </FormItem>
  1090. <FormItem className="half-item"
  1091. {...formItemLayout}
  1092. label="上年度研发费用"
  1093. >
  1094. <Input ref='consul' placeholder="请输入上年度研发费用" value={this.state.lastYearResearchAmount} style={{width:'90%'}}
  1095. onChange={(e) => {this.setState({lastYearResearchAmount: e.target.value })}}/>万
  1096. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1097. </FormItem>
  1098. <FormItem className="half-item"
  1099. {...formItemLayout}
  1100. label="客户信用等级"
  1101. >
  1102. <Select placeholder="客户信用等级" value={this.state.creditRating} style={{width:'90%'}}
  1103. onChange={(e)=>{this.setState({creditRating:e})}}>
  1104. {
  1105. slcRedit.map(function (item) {
  1106. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1107. })
  1108. }
  1109. </Select>
  1110. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1111. </FormItem>
  1112. <FormItem className="half-item"
  1113. {...formItemLayout}
  1114. label="上年度总资产情况"
  1115. >
  1116. <Input ref='consul' placeholder="上年度总资产情况" value={this.state.assets} style={{width:'90%'}}
  1117. onChange={(e) => {this.setState({assets: e.target.value })}}/>万
  1118. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1119. </FormItem>
  1120. <div className='clearfix'>
  1121. <FormItem
  1122. labelCol={{ span:4 }}
  1123. wrapperCol={{ span: 19 }}
  1124. label="企业核心技术" >
  1125. <Input type="textarea" rows={3} value={this.state.coreTechnology} style={{width:'96%'}}
  1126. onChange={(e,pre) => { this.setState({ coreTechnology: e.target.value })}}/>
  1127. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1128. </FormItem>
  1129. </div>
  1130. <div className='clearfix'>
  1131. <FormItem
  1132. labelCol={{ span:4 }}
  1133. wrapperCol={{ span: 19 }}
  1134. label="企业资质情况" >
  1135. <Input type="textarea" rows={3} value={this.state.qualification} placeholder="请按如下格式填写:资质名称+获得时间+拥有人+发证机构"
  1136. onChange={(e,pre) => { this.setState({ qualification: e.target.value })}} style={{width:'96%'}}/>
  1137. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1138. </FormItem>
  1139. </div>
  1140. <div className='clearfix'>
  1141. <FormItem
  1142. labelCol={{ span:4 }}
  1143. wrapperCol={{ span: 19 }}
  1144. label="企业已做项目" >
  1145. <Input type="textarea" rows={3} value={this.state.accomplishSituation} placeholder="请按如下格式填写:项目类型+主管部门+申报时间+立项情况+验收情况"
  1146. onChange={(e,pre) => { this.setState({ accomplishSituation: e.target.value })}} style={{width:'96%'}}/>
  1147. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1148. </FormItem>
  1149. </div>
  1150. <div className='clearfix'>
  1151. <FormItem
  1152. labelCol={{ span:4 }}
  1153. wrapperCol={{ span: 19 }}
  1154. label="高企合作情况" >
  1155. <Input type="textarea" rows={3} value={this.state.cooperationSituation}
  1156. onChange={(e,pre) => { this.setState({ cooperationSituation: e.target.value })}} style={{width:'96%'}}/>
  1157. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1158. </FormItem>
  1159. </div>
  1160. <div className='clearfix' >
  1161. <FormItem
  1162. labelCol={{ span:4 }}
  1163. wrapperCol={{ span: 19 }}
  1164. label="项目申请书" >
  1165. <Upload
  1166. name="avatar"
  1167. action={globalConfig.context + "/api/admin/customer/upload"}
  1168. data={{
  1169. 'uid': this.state.detailId,
  1170. 'sign': 'organization_application'
  1171. }}
  1172. beforeUpload={beforeUploadFile}
  1173. fileList={this.state.fileList}
  1174. onChange={(info) => {
  1175. if (info.file.status !== 'uploading') {
  1176. }
  1177. if (info.file.status === 'done') {
  1178. if (!info.file.response.error.length) {
  1179. message.success(`${info.file.name} 文件上传成功!`);
  1180. } else {
  1181. message.warning(info.file.response.error[0].message);
  1182. return;
  1183. };
  1184. this.setState({
  1185. pojectApplicationUrl:info.file.response.data,
  1186. isXian:1,
  1187. })
  1188. } else if (info.file.status === 'error') {
  1189. message.error(`${info.file.name} 文件上传失败。`);
  1190. }
  1191. this.setState({ fileList: info.fileList.slice(-1) });
  1192. }}
  1193. >
  1194. <Button><Icon type="upload" /> 项目材料上传 </Button>
  1195. <span style={{ marginTop: '10px' ,marginLeft:"20px"}}>{this.state.pojectApplicationUrl ?
  1196. <span className="download-file">
  1197. <a onClick={() => {
  1198. var newTab = window.open('about:blank'); getPreviews(this.state.uid, 'techProject', 'organization_application', function (data) { newTab.location.href = data; });
  1199. }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
  1200. </span>
  1201. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}
  1202. </span>
  1203. </Upload>
  1204. </FormItem>
  1205. </div>
  1206. </div>
  1207. <Button className="setSubmit" type="primary" htmlType="submit">保存</Button>
  1208. <Button type="ghost" onClick={this.visitCancel}>取消</Button>
  1209. </div>
  1210. </Spin>
  1211. </Form>
  1212. </div>
  1213. </TabPane>
  1214. <TabPane tab="知识产权列表" key="1">
  1215. <Button type="primary" className="addButton" onClick={this.addClick}>发布成果<Icon type="plus" /></Button>
  1216. <Spin spinning={this.state.loading}>
  1217. <Table columns={this.state.columnsDate}
  1218. dataSource={this.state.dataSourceDate}
  1219. rowSelection={rowSelection}
  1220. pagination={this.state.paginationDate}
  1221. onRowClick={this.tableRowClickDate} />
  1222. </Spin>
  1223. </TabPane>
  1224. </Tabs>
  1225. </Modal>
  1226. <TechAchievementDesc
  1227. data={this.state.RowData}
  1228. detailApiUrl={this.props['data-detailApiUrl']}
  1229. achievementCategoryOption={this.state.achievementCategoryOption}
  1230. showDesc={this.state.showDesc}
  1231. uid={this.state.uid}
  1232. closeDesc={this.closeDesc}
  1233. loadDatas={this.loadDatas}
  1234. />
  1235. </div >
  1236. );
  1237. }
  1238. }));
  1239. export default IntentionCustomer;