patentPayment.jsx 36 KB

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