patentPayment.jsx 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139
  1. import React from 'react';
  2. import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form ,Modal,Tabs} 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,cityArr,patentTypeList} from '@/dataDic.js';
  9. import {
  10. getSocialAttribute,
  11. beforeUploadFile,
  12. splitUrl,
  13. getSlcRedit,
  14. getDataGrade,
  15. getAchievementCategory,
  16. getTechAuditStatus,
  17. getboutique,
  18. getPatentType,
  19. getcityArr,
  20. getPatentTypeva,
  21. ShowModal
  22. } from "@/tools.js";
  23. import './customer.less';
  24. import ShowModalDiv from "@/showModal.jsx";
  25. import ImgList from "../../../../common/imgList";
  26. import {ChooseList} from "../../../order/orderNew/chooseList";
  27. const Option = AutoComplete.Option;
  28. const { TabPane } = Tabs;
  29. //图片组件
  30. const PicturesWall = React.createClass({
  31. getInitialState() {
  32. return {
  33. previewVisible: false,
  34. previewImage: '',
  35. fileList: this.props.pictureUrl,
  36. }
  37. },
  38. getDefaultProps(){
  39. return{
  40. changeClick:this.modifyChange
  41. }
  42. },
  43. handleCancel() {
  44. this.setState({ previewVisible: false })
  45. },
  46. handlePreview(file) {
  47. this.setState({
  48. previewImage: file.url || file.thumbUrl,
  49. previewVisible: true,
  50. });
  51. },
  52. handleChange(info) {
  53. let fileList = info.fileList;
  54. this.setState({ fileList });
  55. this.props.fileList(fileList);
  56. },
  57. componentWillReceiveProps(nextProps) {
  58. this.state.fileList = nextProps.pictureUrl;
  59. },
  60. render() {
  61. const { previewVisible, previewImage, fileList } = this.state;
  62. const uploadButton = (
  63. <div>
  64. <Icon type="plus" />
  65. <div className="ant-upload-text">点击上传</div>
  66. </div>
  67. );
  68. return (
  69. <div style={{display:"inline-block"}}>
  70. <ImgList
  71. domId={this.props.domId}
  72. uploadConfig={{
  73. action:globalConfig.context + "/api/admin/patentNew/uploadFile",
  74. data:{ 'sign': '' },
  75. multiple:true,
  76. listType:"picture-card",
  77. beforeUpload:(infor)=>{beforeUploadFile(infor)}
  78. }}
  79. onChange={(infor)=>{
  80. this.handleChange(infor)
  81. }}
  82. fileList={fileList}
  83. />
  84. </div>
  85. );
  86. }
  87. });
  88. const PatentPayment = Form.create()(React.createClass({
  89. departmentList() {
  90. this.setState({
  91. loading: true
  92. });
  93. $.ajax({
  94. method: "get",
  95. dataType: "json",
  96. crossDomain: false,
  97. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  98. data: {},
  99. success: function(data) {
  100. let thedata = data.data;
  101. let theArr=[];
  102. if(!thedata) {
  103. if(data.error && data.error.length) {
  104. message.warning(data.error[0].message);
  105. };
  106. }else{
  107. thedata.map(function(item,index){
  108. theArr.push({
  109. key:index,
  110. name:item.name,
  111. id:item.id,
  112. })
  113. })
  114. }
  115. this.setState({
  116. departmentArr:theArr,
  117. })
  118. }.bind(this),
  119. }).always(function() {
  120. this.setState({
  121. loading: false
  122. });
  123. }.bind(this));
  124. },
  125. loadData(pageNo){
  126. this.setState({
  127. loading: true
  128. }),
  129. $.ajax({
  130. method: "get",
  131. dataType: "json",
  132. crossDomain: false,
  133. url: globalConfig.context + '/api/admin/patentNew/selectPatentNew',
  134. data: {
  135. pageNo: pageNo || 1,
  136. pageSize: this.state.pagination.pageSize,
  137. status:this.state.statusSearch,
  138. name:this.state.nameSearch,
  139. aname:this.state.anameSearch,
  140. patentNo:this.state.patentNoSearch,
  141. departmentId:this.state.departmentSearch,
  142. startDate:this.state.timesArr[0],
  143. endDate:this.state.timesArr[1],
  144. type:this.state.typeSearch,
  145. },
  146. success:function (data) {
  147. ShowModal(this);
  148. let theArr = [];
  149. if(!data.data) {
  150. if(data.error && data.error.length) {
  151. message.warning(data.error[0].message);
  152. };
  153. } else {
  154. for(let i = 0; i < data.data.list.length; i++) {
  155. let thisdata = data.data.list[i];
  156. theArr.push({
  157. id:thisdata.id,
  158. province:thisdata.province,
  159. status:thisdata.status,
  160. patentNo:thisdata.patentNo,
  161. name:thisdata.name,
  162. type:thisdata.type,
  163. applyDates:thisdata.applyDates,
  164. authorizationDates:thisdata.authorizationDates,
  165. patentAmount:thisdata.patentAmount,
  166. applicant:thisdata.applicant,
  167. contactMobile:thisdata.contactMobile,
  168. email:thisdata.email,
  169. certificateUrl:thisdata.certificateUrl,
  170. aname:thisdata.aname,
  171. depName:thisdata.depName,
  172. });
  173. };
  174. this.state.pagination.current = data.data.pageNo;
  175. this.state.pagination.total = data.data.totalCount;
  176. };
  177. if(!data.data.list.length) {
  178. this.state.pagination.current = 0
  179. this.state.pagination.total = 0
  180. }
  181. this.setState({
  182. pageNo: pageNo,
  183. dataSource: theArr,
  184. pagination: this.state.pagination,
  185. });
  186. }.bind(this)
  187. }).always(function() {
  188. this.setState({
  189. loading: false
  190. });
  191. }.bind(this));
  192. },
  193. getInitialState(){
  194. return {
  195. loading:false,
  196. visible:false,
  197. orgCodeUrl:[],
  198. fileList:[],
  199. departmentArr:[],
  200. timesArr:[],
  201. pagination: {
  202. defaultCurrent: 1,
  203. defaultPageSize: 10,
  204. showQuickJumper: true,
  205. pageSize: 10,
  206. onChange: function(page) {
  207. this.loadData(page);
  208. }.bind(this),
  209. showTotal: function(total) {
  210. return '共' + total + '条数据';
  211. }
  212. },
  213. dataSource:[],
  214. columns:[{
  215. title: '专利号',
  216. dataIndex: 'patentNo',
  217. key: 'patentNo'
  218. },{
  219. title: '专利名称',
  220. dataIndex: 'name',
  221. key: 'name'
  222. },{
  223. title: '专利类型',
  224. dataIndex: 'type',
  225. key: 'type',
  226. render:text=>{
  227. return getPatentType(text)
  228. }
  229. },{
  230. title: '申请日期',
  231. dataIndex: 'applyDates',
  232. key: 'applyDates'
  233. },{
  234. title: '授权日期',
  235. dataIndex: 'authorizationDates',
  236. key: 'authorizationDates'
  237. },{
  238. title: '费用',
  239. dataIndex: 'patentAmount',
  240. key: 'patentAmount'
  241. },{
  242. title: '授权公司',
  243. dataIndex: 'applicant',
  244. key: 'applicant'
  245. },{
  246. title: '录入人',
  247. dataIndex: 'aname',
  248. key: 'aname'
  249. },{
  250. title: '录入公司',
  251. dataIndex: 'depName',
  252. key: 'depName'
  253. },{
  254. title: '联系电话',
  255. dataIndex: 'contactMobile',
  256. key: 'contactMobile'
  257. },{
  258. title: '电子邮箱',
  259. dataIndex: 'email',
  260. key: 'email'
  261. },{
  262. title: '状态',
  263. dataIndex: 'status',
  264. key: 'status',
  265. render:text=>{
  266. if (text === 1) {
  267. return '已提醒'
  268. }else{
  269. return '待提醒'
  270. }
  271. }
  272. }]
  273. }
  274. },
  275. componentWillMount(){
  276. this.loadData()
  277. this.departmentList()
  278. let data=localStorage.getItem('newData');
  279. if(data!='{}'&&data){
  280. var newData = JSON.parse(data);
  281. this.tableRowClick(newData);
  282. };
  283. },
  284. new(){
  285. this.reset();
  286. this.setState({
  287. visible:true
  288. })
  289. },
  290. visitCancel(){
  291. this.state.fileList = [];
  292. this.setState({
  293. visible:false
  294. })
  295. },
  296. onSure(){
  297. let theorgCodeUrl = [];
  298. if (this.state.orgCodeUrl.length) {
  299. let picArr = [];
  300. this.state.orgCodeUrl.map(function (item) {
  301. if ( item.response && item.response.data && item.response.data.length ){
  302. picArr.push(item.response.data);
  303. }
  304. });
  305. theorgCodeUrl = picArr.join(",");
  306. };
  307. if (!this.state.patentNo) {
  308. message.warning('专利号不能为空')
  309. return
  310. }
  311. if (!this.state.patentName) {
  312. message.warning('专利名称不能为空')
  313. return
  314. }
  315. if(this.state.patentType === ''){
  316. message.warning('专利类型不能为空');
  317. return
  318. }
  319. let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
  320. if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
  321. message.warning('电话格式不正确');
  322. return
  323. }
  324. let emailReg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
  325. if(this.state.email === ''){
  326. message.warning('电子邮箱不能为空');
  327. return
  328. }
  329. if(!emailReg.test(this.state.email)){
  330. message.warning('电子邮箱格式不正确');
  331. return
  332. }
  333. $.ajax({
  334. method: "POST",
  335. dataType: "json",
  336. crossDomain: false,
  337. url: globalConfig.context +'/api/admin/patentNew/addPatentNew' ,
  338. data: {
  339. patentNo:this.state.patentNo,
  340. name:this.state.patentName,
  341. type:this.state.patentType,
  342. applyDates:this.state.appDate,
  343. authorizationDates:this.state.authDate,
  344. applicant:this.state.proposer,
  345. province:this.state.province,
  346. contactMobile:this.state.contactPhone,
  347. email:this.state.email,
  348. certificateUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  349. }
  350. }).done(function(data) {
  351. this.setState({
  352. loading: false
  353. });
  354. if(!data.error.length) {
  355. message.success('保存成功!');
  356. this.onCal()
  357. this.loadData()
  358. } else {
  359. message.warning(data.error[0].message);
  360. }
  361. }.bind(this));
  362. },
  363. tableRowClick(record,index){
  364. this.state.RowData = record
  365. this.setState({
  366. avisible:true,
  367. patentNo:record.patentNo,
  368. patentName:record.name,
  369. province:record.province,
  370. status:record.status,
  371. patentType:record.type,
  372. appDate:record.applyDates,
  373. authDate:record.authorizationDates,
  374. proposer:record.applicant,
  375. contactPhone:record.contactMobile,
  376. email:record.email,
  377. certificateUrl:record.certificateUrl,
  378. orgCodeUrl: record.certificateUrl ? splitUrl(record.certificateUrl, ',', globalConfig.avatarHost + '/upload') : [],
  379. })
  380. localStorage.setItem('newData','{}');
  381. },
  382. xiugai(record){
  383. let theorgCodeUrl = [];
  384. if (this.state.orgCodeUrl.length) {
  385. let picArr = [];
  386. this.state.orgCodeUrl.map(function (item) {
  387. if ( item.response && item.response.data && item.response.data.length ){
  388. picArr.push(item.response.data);
  389. }
  390. });
  391. theorgCodeUrl = picArr.join(",");
  392. };
  393. console.log(typeof this.state.patentType)
  394. if (!this.state.patentNo) {
  395. message.warning('专利号不能为空')
  396. return
  397. }
  398. if (!this.state.patentName) {
  399. message.warning('专利名称不能为空')
  400. return
  401. }
  402. if(this.state.patentType === ''){
  403. message.warning('专利类型不能为空');
  404. return
  405. }
  406. let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
  407. if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
  408. message.warning('电话格式不正确');
  409. return
  410. }
  411. let emailReg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
  412. if(this.state.email === ''){
  413. message.warning('电子邮箱不能为空');
  414. return
  415. }
  416. if(!emailReg.test(this.state.email)){
  417. message.warning('电子邮箱格式不正确');
  418. return
  419. }
  420. $.ajax({
  421. method: "POST",
  422. dataType: "json",
  423. crossDomain: false,
  424. url: globalConfig.context +'/api/admin/patentNew/updatePatentNew' ,
  425. data: {
  426. id:record.id,
  427. patentNo:this.state.patentNo,
  428. name:this.state.patentName,
  429. type:this.state.patentType,
  430. applyDates:this.state.appDate,
  431. authorizationDates:this.state.authDate,
  432. applicant:this.state.proposer,
  433. province:this.state.province,
  434. contactMobile:this.state.contactPhone,
  435. email:this.state.email,
  436. status:this.state.status,
  437. certificateUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  438. },
  439. success: function (data) {
  440. }.bind(this),
  441. }).done(function(data) {
  442. this.setState({
  443. loading: false
  444. });
  445. if(!data.error.length) {
  446. message.success('修改成功!');
  447. this.avisitCancel()
  448. this.loadData(this.state.pageNo)
  449. } else {
  450. message.warning(data.error[0].message);
  451. }
  452. }.bind(this));
  453. },
  454. baocunxiugai(){
  455. this.xiugai(this.state.RowData)
  456. },
  457. avisitCancel(){
  458. this.setState({
  459. avisible:false
  460. })
  461. },
  462. reset(){
  463. this.setState({
  464. patentNo:'',
  465. patentName:'',
  466. patentType:undefined,
  467. appDate:undefined,
  468. authDate:undefined,
  469. orgCodeUrl:[],
  470. proposer:'',
  471. province:undefined,
  472. contactPhone:'',
  473. email:''
  474. })
  475. },
  476. searchReset(){
  477. this.setState({
  478. statusSearch:undefined,
  479. nameSearch:undefined,
  480. anameSearch:undefined,
  481. patentNoSearch:undefined,
  482. departmentSearch:undefined,
  483. typeSearch:undefined,
  484. timesArr:[],
  485. },()=>{
  486. this.loadData()
  487. })
  488. },
  489. search(){
  490. this.loadData()
  491. },
  492. onCal(){
  493. this.setState({
  494. visible:false
  495. })
  496. },
  497. getOrgCodeUrl(e) {
  498. this.setState({ orgCodeUrl: e });
  499. },
  500. changeList(arr) {
  501. const newArr = [];
  502. this.state.columns.forEach(item => {
  503. arr.forEach(val => {
  504. if (val === item.title) {
  505. newArr.push(item);
  506. }
  507. });
  508. });
  509. this.setState({
  510. changeList: newArr
  511. });
  512. },
  513. render(){
  514. const theData = this.state.RowData || {};
  515. const FormItem = Form.Item;
  516. const formItemLayout = {
  517. labelCol: { span: 8 },
  518. wrapperCol: { span: 14 },
  519. };
  520. const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
  521. return (
  522. <div className="user-content">
  523. <ShowModalDiv ShowModal={this.state.showModal} />
  524. <div className="content-title">
  525. <span style={{ fontSize: "16px" }}>客户专利提醒</span>
  526. <Tabs
  527. defaultActiveKey="1"
  528. className="test">
  529. <TabPane tab="搜索" key="1">
  530. <div className="user-search">
  531. <Select
  532. value={this.state.typeSearch}
  533. placeholder="请选择专利类型"
  534. onChange={e => {
  535. this.setState({
  536. typeSearch: e
  537. });
  538. }}
  539. style={{ width: "140px" }}
  540. >
  541. <Option value={1}>实用新型</Option>
  542. <Option value={2}>外观设计</Option>
  543. <Option value={3}>发明</Option>
  544. </Select>
  545. <Input
  546. value={this.state.nameSearch}
  547. placeholder="请输入授权公司"
  548. onChange={e => {
  549. this.setState({
  550. nameSearch: e.target.value
  551. });
  552. }}
  553. />
  554. <Select
  555. value={this.state.departmentSearch}
  556. placeholder="请选择录入公司"
  557. onChange={e => {
  558. this.setState({
  559. departmentSearch: e
  560. });
  561. }}
  562. style={{ width: "140px" }}
  563. >
  564. {this.state.departmentArr.map(e => {
  565. return <Option value={e.id}>{e.name}</Option>;
  566. })}
  567. </Select>
  568. <Input
  569. value={this.state.anameSearch}
  570. placeholder="请输入录入人"
  571. onChange={e => {
  572. this.setState({
  573. anameSearch: e.target.value
  574. });
  575. }}
  576. />
  577. <Select
  578. value={this.state.statusSearch}
  579. placeholder="请选择状态"
  580. onChange={e => {
  581. this.setState({
  582. statusSearch: e
  583. });
  584. }}
  585. style={{ width: "140px" }}
  586. >
  587. <Option value={0}>正常</Option>
  588. <Option value={1}>提醒中</Option>
  589. </Select>
  590. <Input
  591. value={this.state.patentNoSearch}
  592. placeholder="请输入专利号"
  593. onChange={e => {
  594. this.setState({
  595. patentNoSearch: e.target.value
  596. });
  597. }}
  598. />
  599. <Button
  600. type="primary"
  601. onClick={this.search}
  602. style={{ marginLeft: "10px" }}
  603. >
  604. 搜索
  605. </Button>
  606. <Button
  607. type="primary"
  608. onClick={this.searchReset}
  609. style={{ marginLeft: "10px" }}
  610. >
  611. 重置
  612. </Button>
  613. <span>
  614. 更多搜索
  615. <Switch
  616. onChange={mark => {
  617. this.setState({ mark: mark });
  618. }}
  619. />
  620. </span>
  621. {!this.props.isOnlyRead ? <Button
  622. type="primary"
  623. onClick={this.new}
  624. style={{ marginRight: "10px", float: "right" }}
  625. >
  626. 新建
  627. </Button> : <div/>}
  628. {/*<Button onClick={this.reset}>导出</Button>*/}
  629. </div>
  630. </TabPane>
  631. <TabPane tab="更改表格显示数据" key="2">
  632. <div style={{ marginLeft: 10 }}>
  633. <ChooseList
  634. columns={this.state.columns}
  635. changeFn={this.changeList}
  636. changeList={this.state.changeList}
  637. top={55}
  638. margin={11}
  639. />
  640. </div>
  641. </TabPane>
  642. </Tabs>
  643. {this.state.mark ? (
  644. <div className="user-search" style={{ paddingTop: "10px" }}>
  645. <span style={{ fontSize: "14px" }}>请选择申请时间:</span>
  646. <RangePicker
  647. value={[
  648. this.state.timesArr[0]
  649. ? moment(this.state.timesArr[0])
  650. : null,
  651. this.state.timesArr[1] ? moment(this.state.timesArr[1]) : null
  652. ]}
  653. onChange={(e, f) => {
  654. this.setState({
  655. timesArr: f
  656. });
  657. }}
  658. style={{ marginTop: "0", marginLeft: "10px" }}
  659. />
  660. </div>
  661. ) : (
  662. ""
  663. )}
  664. <div className="patent-table">
  665. <Spin spinning={this.state.loading}>
  666. <Table
  667. columns={
  668. this.state.changeList
  669. ? this.state.changeList
  670. : this.state.columns
  671. }
  672. dataSource={this.state.dataSource}
  673. pagination={this.state.pagination}
  674. onRowClick={this.tableRowClick}
  675. size="middle"
  676. bordered
  677. />
  678. </Spin>
  679. </div>
  680. {this.state.avisible ? <Modal
  681. maskClosable={false}
  682. visible={this.state.avisible}
  683. onCancel={this.avisitCancel}
  684. width="800px"
  685. title={!this.props.isOnlyRead ? "修改详情" : "查看详情"}
  686. footer=""
  687. className="admin-desc-content"
  688. >
  689. <div className="clearfix">
  690. <FormItem
  691. className="half-item"
  692. {...formItemLayout}
  693. label={
  694. <span>
  695. <strong style={{ color: "#f00" }}>*</strong>专利号
  696. </span>
  697. }
  698. >
  699. {!this.props.isOnlyRead ?
  700. <Input
  701. placeholder="请输入专利号"
  702. value={this.state.patentNo}
  703. onChange={e => {
  704. this.setState({ patentNo: e.target.value });
  705. }}
  706. style={{ width: "240px" }}
  707. /> : <span>{this.state.patentNo}</span>
  708. }
  709. </FormItem>
  710. <FormItem
  711. className="half-item"
  712. {...formItemLayout}
  713. label={
  714. <span>
  715. <strong style={{ color: "#f00" }}>*</strong>专利名称
  716. </span>
  717. }
  718. >
  719. {!this.props.isOnlyRead ?
  720. <Input
  721. placeholder="请输入专利名称"
  722. value={this.state.patentName}
  723. onChange={e => {
  724. this.setState({ patentName: e.target.value });
  725. }}
  726. style={{ width: "240px" }}
  727. /> : <div>{this.state.patentName}</div>
  728. }
  729. </FormItem>
  730. <FormItem
  731. className="half-item"
  732. {...formItemLayout}
  733. label="专利类型"
  734. >
  735. {!this.props.isOnlyRead ?
  736. <Select
  737. placeholder="请选择专利类型"
  738. style={{ width: "240px" }}
  739. value={getPatentType(this.state.patentType)}
  740. onChange={e => {
  741. this.setState({ patentType: e });
  742. }}
  743. >
  744. {patentTypeList.map(function(item) {
  745. return (
  746. <Select.Option key={item.value}>
  747. {item.key}
  748. </Select.Option>
  749. );
  750. })}
  751. </Select> : <div>{getPatentType(this.state.patentType)}</div>
  752. }
  753. </FormItem>
  754. <FormItem
  755. className="half-item"
  756. {...formItemLayout}
  757. label="申请日期"
  758. >
  759. {
  760. !this.props.isOnlyRead ?
  761. <DatePicker
  762. style={{ marginTop: "2px", width: "240px", height: "32px" }}
  763. showTime
  764. format="YYYY-MM-DD"
  765. onOk={e => {}}
  766. value={this.state.appDate ? moment(this.state.appDate) : null}
  767. onChange={(data, dataString) => {
  768. this.setState({ appDate: dataString });
  769. }}
  770. /> : <div>{this.state.appDate ? moment(this.state.appDate).format('YYYY-MM-DD') : ''}</div>
  771. }
  772. </FormItem>
  773. <FormItem
  774. className="half-item"
  775. {...formItemLayout}
  776. label="授权日期"
  777. >
  778. {
  779. !this.props.isOnlyRead ?
  780. <DatePicker
  781. style={{ marginTop: "2px", width: "240px", height: "32px" }}
  782. showTime
  783. format="YYYY-MM-DD"
  784. onOk={e => {}}
  785. value={
  786. this.state.authDate ? moment(this.state.authDate) : null
  787. }
  788. onChange={(data, dataString) => {
  789. this.setState({ authDate: dataString });
  790. }}
  791. /> : <div>{this.state.authDate ? moment(this.state.authDate).format('YYYY-MM-DD') : ''}</div> }
  792. </FormItem>
  793. <FormItem className="half-item" {...formItemLayout} label="费用">
  794. <span>{theData.patentAmount}</span>
  795. </FormItem>
  796. <div className="clearfix">
  797. <FormItem
  798. labelCol={{ span: 4 }}
  799. wrapperCol={{ span: 18 }}
  800. label="合同扫描件"
  801. >
  802. {!this.props.isOnlyRead ? <PicturesWall
  803. domId={'patentPayment1'}
  804. fileList={this.getOrgCodeUrl}
  805. pictureUrl={this.state.orgCodeUrl}
  806. /> :
  807. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  808. <ImgList domId={'patentPayment3'} fileList={this.state.orgCodeUrl}/>
  809. </div>
  810. }
  811. {!this.props.isOnlyRead ? <p>图片建议:要清晰。</p> : null}
  812. </FormItem>
  813. </div>
  814. <FormItem
  815. className="half-item"
  816. {...formItemLayout}
  817. label="申请人"
  818. >
  819. {
  820. !this.props.isOnlyRead ?
  821. <Input
  822. placeholder="请输入申请人/公司"
  823. value={this.state.proposer}
  824. onChange={e => {
  825. this.setState({ proposer: e.target.value });
  826. }}
  827. style={{ width: "240px" }}
  828. /> : <div>{this.state.proposer}</div>
  829. }
  830. </FormItem>
  831. <FormItem className="half-item" {...formItemLayout} label="省份">
  832. {
  833. !this.props.isOnlyRead ?
  834. <Select
  835. placeholder="请选择省份"
  836. style={{ width: "240px" }}
  837. value={getcityArr(this.state.province)}
  838. onChange={e => {
  839. this.setState({ province: e });
  840. }}
  841. >
  842. {cityArr.map(function(item) {
  843. return (
  844. <Select.Option key={item.value}>{item.key}</Select.Option>
  845. );
  846. })}
  847. </Select> : <div>{getcityArr(this.state.province)}</div> }
  848. </FormItem>
  849. <FormItem
  850. className="half-item"
  851. {...formItemLayout}
  852. label="联系电话"
  853. >
  854. {
  855. !this.props.isOnlyRead ?
  856. <Input
  857. placeholder="请输入联系手机"
  858. value={this.state.contactPhone}
  859. onChange={e => {
  860. this.setState({ contactPhone: e.target.value });
  861. }}
  862. style={{ width: "240px" }}
  863. /> : <div>{this.state.contactPhone}</div>
  864. }
  865. </FormItem>
  866. <FormItem
  867. className="half-item"
  868. {...formItemLayout}
  869. label={
  870. <span>
  871. <strong style={{ color: "#f00" }}>*</strong>电子邮箱
  872. </span>
  873. }
  874. >
  875. {
  876. !this.props.isOnlyRead ?
  877. <Input
  878. placeholder="请输入电子邮箱"
  879. value={this.state.email}
  880. onChange={e => {
  881. this.setState({ email: e.target.value });
  882. }}
  883. style={{ width: "240px" }}
  884. /> : <div>{this.state.email}</div>
  885. }
  886. </FormItem>
  887. <FormItem
  888. className="half-item"
  889. {...formItemLayout}
  890. label={"状态"}
  891. >
  892. <span>{this.state.status ? "已提醒" : "待提醒"}</span>
  893. </FormItem>
  894. </div>
  895. {!this.props.isOnlyRead ? <div style={{ overflow: "hidden" }}>
  896. <Button style={{ float: "right" }} onClick={this.avisitCancel}>
  897. 取消
  898. </Button>
  899. <Button
  900. type="primary"
  901. style={{ float: "right", marginRight: "10px" }}
  902. onClick={this.baocunxiugai}
  903. >
  904. 保存
  905. </Button>
  906. </div> : <div/>}
  907. </Modal> : <div/>}
  908. {this.state.visible ?<Modal
  909. maskClosable={false}
  910. visible={this.state.visible}
  911. onOk={this.visitOk}
  912. onCancel={this.visitCancel}
  913. width="1000px"
  914. title="专利资料"
  915. footer=""
  916. className="admin-desc-content"
  917. >
  918. <div className="clearfix">
  919. <FormItem
  920. className="half-item"
  921. {...formItemLayout}
  922. label={
  923. <span>
  924. <strong style={{ color: "#f00" }}>*</strong>专利号
  925. </span>
  926. }
  927. >
  928. {
  929. <Input
  930. placeholder="请输入专利号"
  931. value={this.state.patentNo}
  932. onChange={e => {
  933. this.setState({ patentNo: e.target.value });
  934. }}
  935. style={{ width: "240px" }}
  936. />
  937. }
  938. </FormItem>
  939. <FormItem
  940. className="half-item"
  941. {...formItemLayout}
  942. label={
  943. <span>
  944. <strong style={{ color: "#f00" }}>*</strong>专利名称
  945. </span>
  946. }
  947. >
  948. {
  949. <Input
  950. placeholder="请输入专利名称"
  951. value={this.state.patentName}
  952. onChange={e => {
  953. this.setState({ patentName: e.target.value });
  954. }}
  955. style={{ width: "240px" }}
  956. />
  957. }
  958. </FormItem>
  959. <FormItem
  960. className="half-item"
  961. {...formItemLayout}
  962. label="申请日期"
  963. >
  964. <DatePicker
  965. style={{ marginTop: "2px", width: "240px", height: "32px" }}
  966. showTime
  967. format="YYYY-MM-DD"
  968. onOk={e => {}}
  969. value={this.state.appDate ? moment(this.state.appDate) : null}
  970. onChange={(data, dataString) => {
  971. this.setState({ appDate: dataString });
  972. }}
  973. />
  974. </FormItem>
  975. <FormItem
  976. className="half-item"
  977. {...formItemLayout}
  978. label={
  979. <span>
  980. <strong style={{ color: "#f00" }}>*</strong>专利类型
  981. </span>
  982. }
  983. >
  984. {
  985. <Select
  986. placeholder="请选择专利类型"
  987. style={{ width: "240px" }}
  988. value={this.state.patentType}
  989. onChange={e => {
  990. this.setState({ patentType: e });
  991. }}
  992. >
  993. {patentTypeList.map(function(item) {
  994. return (
  995. <Select.Option key={item.value}>
  996. {item.key}
  997. </Select.Option>
  998. );
  999. })}
  1000. </Select>
  1001. }
  1002. </FormItem>
  1003. <FormItem
  1004. className="half-item"
  1005. {...formItemLayout}
  1006. label="授权日期"
  1007. >
  1008. <DatePicker
  1009. style={{ marginTop: "2px", width: "240px", height: "32px" }}
  1010. showTime
  1011. format="YYYY-MM-DD"
  1012. onOk={e => {}}
  1013. value={
  1014. this.state.authDate ? moment(this.state.authDate) : null
  1015. }
  1016. onChange={(data, dataString) => {
  1017. this.setState({ authDate: dataString });
  1018. }}
  1019. />
  1020. </FormItem>
  1021. <div className="clearfix">
  1022. <FormItem
  1023. labelCol={{ span: 4 }}
  1024. wrapperCol={{ span: 18 }}
  1025. label="合同扫描件"
  1026. >
  1027. <PicturesWall
  1028. domId={'patentPayment2'}
  1029. fileList={this.getOrgCodeUrl}
  1030. pictureUrl={this.state.orgCodeUrl}
  1031. />
  1032. <p>图片建议:要清晰。</p>
  1033. </FormItem>
  1034. </div>
  1035. <div>
  1036. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1037. 申请人资料
  1038. </span>
  1039. </div>
  1040. <FormItem
  1041. className="half-item"
  1042. {...formItemLayout}
  1043. label="申请人/公司"
  1044. >
  1045. {
  1046. <Input
  1047. placeholder="请输入申请人/公司"
  1048. value={this.state.proposer}
  1049. onChange={e => {
  1050. this.setState({ proposer: e.target.value });
  1051. }}
  1052. style={{ width: "240px" }}
  1053. />
  1054. }
  1055. </FormItem>
  1056. <FormItem className="half-item" {...formItemLayout} label="省份">
  1057. <Select
  1058. placeholder="请选择省份"
  1059. style={{ width: "240px" }}
  1060. value={this.state.province}
  1061. onChange={e => {
  1062. this.setState({ province: e });
  1063. }}
  1064. >
  1065. {cityArr.map(function(item) {
  1066. return (
  1067. <Select.Option key={item.value}>{item.key}</Select.Option>
  1068. );
  1069. })}
  1070. </Select>
  1071. </FormItem>
  1072. <FormItem
  1073. className="half-item"
  1074. {...formItemLayout}
  1075. label="联系手机"
  1076. >
  1077. {
  1078. <Input
  1079. placeholder="请输入联系手机"
  1080. value={this.state.contactPhone}
  1081. onChange={e => {
  1082. this.setState({ contactPhone: e.target.value });
  1083. }}
  1084. style={{ width: "240px" }}
  1085. />
  1086. }
  1087. </FormItem>
  1088. <FormItem
  1089. className="half-item"
  1090. {...formItemLayout}
  1091. label={
  1092. <span>
  1093. <strong style={{ color: "#f00" }}>*</strong>电子邮箱
  1094. </span>
  1095. }
  1096. >
  1097. {
  1098. <Input
  1099. placeholder="请输入电子邮箱"
  1100. value={this.state.email}
  1101. onChange={e => {
  1102. this.setState({ email: e.target.value });
  1103. }}
  1104. style={{ width: "240px" }}
  1105. />
  1106. }
  1107. </FormItem>
  1108. </div>
  1109. <div style={{ overflow: "hidden" }}>
  1110. <Button style={{ float: "right" }} onClick={this.onCal}>
  1111. 取消
  1112. </Button>
  1113. <Button
  1114. type="primary"
  1115. style={{ float: "right", marginRight: "10px" }}
  1116. onClick={this.onSure}
  1117. >
  1118. 保存
  1119. </Button>
  1120. </div>
  1121. </Modal> : <div/>}
  1122. </div>
  1123. </div>
  1124. );
  1125. }
  1126. }))
  1127. export default PatentPayment;