patentPayment.jsx 36 KB

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