patentPayment.jsx 38 KB

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