patentPayment.jsx 33 KB

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