list.jsx 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185
  1. import React, { Component } from "react";
  2. import {
  3. Button,
  4. Form,
  5. Input,
  6. message,
  7. Modal,
  8. Popconfirm,
  9. Select,
  10. Spin,
  11. Table,
  12. Tabs,
  13. Upload,
  14. Tooltip, DatePicker
  15. } from "antd";
  16. import { ChooseList } from "../../order/orderNew/chooseList";
  17. import $ from "jquery/src/ajax";
  18. import { patentTypeList } from '@/dataDic.js';
  19. import { getPatentType, ShowModal } from "@/tools.js";
  20. import ShowModalDiv from "@/showModal.jsx";
  21. import './patent.less';
  22. import PatentDetails from './patentDetails';
  23. import ReminderLog from "../../customer/NEW/crm/reminderLog";
  24. import moment from "moment";
  25. import Cascaders from "../../../common/cascaders";
  26. const { TabPane } = Tabs;
  27. const { RangePicker } = DatePicker;
  28. class List extends Component {
  29. constructor(props) {
  30. super(props);
  31. this.state = {
  32. loading: false,
  33. columns: [
  34. {
  35. title: "序号",
  36. dataIndex: "id",
  37. key: "id",
  38. width: 80,
  39. fixed: 'left'
  40. },
  41. {
  42. title: "专利号",
  43. dataIndex: "patentNo",
  44. key: "patentNo",
  45. width: 140,
  46. fixed: 'left'
  47. },
  48. {
  49. title: "专利名称",
  50. dataIndex: "name",
  51. key: "name",
  52. width: 140,
  53. fixed: 'left'
  54. },
  55. {
  56. title: "专利类型",
  57. dataIndex: "type",
  58. key: "type",
  59. render: (text) => {
  60. return (
  61. getPatentType(text)
  62. )
  63. }
  64. },
  65. {
  66. title: "申请日",
  67. dataIndex: "applyDates",
  68. key: "applyDates",
  69. },
  70. {
  71. title: "权利人",
  72. dataIndex: "holders",
  73. key: "holders",
  74. width: 120,
  75. render: (text) => {
  76. return (
  77. <Tooltip title={text}>
  78. <div style={{
  79. maxWidth: '120px',
  80. overflow: 'hidden',
  81. textOverflow: "ellipsis",
  82. whiteSpace: 'nowrap',
  83. }}>{text}</div>
  84. </Tooltip>
  85. )
  86. },
  87. },
  88. {
  89. title: "授权日期",
  90. dataIndex: "authorizationDates",
  91. key: "authorizationDates",
  92. },
  93. {
  94. title: "发明人",
  95. dataIndex: "inventor",
  96. key: "inventor",
  97. width: 120,
  98. render: (text) => {
  99. return (
  100. <Tooltip title={text}>
  101. <div style={{
  102. maxWidth: '120px',
  103. overflow: 'hidden',
  104. textOverflow: "ellipsis",
  105. whiteSpace: 'nowrap',
  106. }}>{text}</div>
  107. </Tooltip>
  108. )
  109. },
  110. },
  111. {
  112. title: "收费截止日",
  113. dataIndex: "endDates",
  114. key: "endDates",
  115. },
  116. {
  117. title: "费减状态",
  118. dataIndex: "costReduction",
  119. key: "costReduction",
  120. render: (text, record) => {
  121. return (
  122. record.tid ? (text === 1 ? '有费减' : text === 0 ? '无费减' : '') : '无'
  123. )
  124. }
  125. },
  126. {
  127. title: "年费状态",
  128. dataIndex: "annualFeeStatus",
  129. key: "annualFeeStatus",
  130. render: (text) => {
  131. return (
  132. <span style={{
  133. color: text === 0 ? '#f00' : text === 1 ? '#25e027' : ''
  134. }}>
  135. {
  136. text === 0 ? '待缴费' :
  137. text === 1 ? '已缴费' : ''
  138. }
  139. </span>
  140. )
  141. }
  142. },
  143. {
  144. title: "营销员是否提醒",
  145. dataIndex: "salesmanRemind",
  146. key: "salesmanRemind",
  147. render: (text) => {
  148. return (
  149. <span style={{
  150. color: text === 0 ? '#f00' : text === 1 ? '#25e027' : ''
  151. }}>
  152. {
  153. text === 0 ? '未通知' :
  154. text === 1 ? '已通知' : ''
  155. }
  156. </span>
  157. )
  158. }
  159. },
  160. {
  161. title: "Email",
  162. dataIndex: "email",
  163. key: "email",
  164. },
  165. {
  166. title: "年费/滞纳金/恢复",
  167. dataIndex: "delayingAmount",
  168. key: "delayingAmount",
  169. render: (text, record) => {
  170. return (
  171. record.patentAmount + '/' + text + '/' + record.recoveryAmount
  172. )
  173. }
  174. },
  175. {
  176. title: "客户名称",
  177. dataIndex: "userName",
  178. key: "userName",
  179. },
  180. {
  181. title: "项目名称",
  182. dataIndex: "projectName",
  183. key: "projectName",
  184. },
  185. {
  186. title: "项目编号",
  187. dataIndex: "tid",
  188. key: "tid",
  189. },
  190. {
  191. title: "营销员",
  192. dataIndex: "salesmanName",
  193. key: "salesmanName",
  194. },
  195. {
  196. title: "咨询师",
  197. dataIndex: "techName",
  198. key: "techName",
  199. },
  200. {
  201. title: "派单部门",
  202. dataIndex: "depName",
  203. key: "depName",
  204. },
  205. {
  206. title: "录入人",
  207. dataIndex: "inputName",
  208. key: "inputName",
  209. width: 120,
  210. render: (text) => {
  211. return (
  212. <Tooltip title={text}>
  213. <div style={{
  214. maxWidth: '120px',
  215. overflow: 'hidden',
  216. textOverflow: "ellipsis",
  217. whiteSpace: 'nowrap',
  218. }}>{text}</div>
  219. </Tooltip>
  220. )
  221. },
  222. },
  223. {
  224. title: "录入时间",
  225. dataIndex: "createTimes",
  226. key: "createTimes",
  227. },
  228. {
  229. title: "跟进人",
  230. dataIndex: "aname",
  231. key: "aname",
  232. width: 120,
  233. render: (text) => {
  234. return (
  235. <Tooltip title={text}>
  236. <div style={{
  237. maxWidth: '120px',
  238. overflow: 'hidden',
  239. textOverflow: "ellipsis",
  240. whiteSpace: 'nowrap',
  241. }}>{text}</div>
  242. </Tooltip>
  243. )
  244. },
  245. },
  246. {
  247. title: "操作",
  248. dataIndex: "id",
  249. key: "caozuo",
  250. width: 200,
  251. fixed: 'right',
  252. render: (text, record) => {
  253. return (
  254. <div>
  255. <Button disabled={record.isFollow === 0} type="primary" onClick={(e) => {
  256. e.stopPropagation();
  257. this.setState({
  258. detailsVisible: true,
  259. detailsInfor: record,
  260. readOnly: false
  261. })
  262. }}>修改</Button>
  263. <Button style={{ marginLeft: '10px' }} type="primary" onClick={(e) => {
  264. e.stopPropagation();
  265. this.setState({
  266. visible: true,
  267. id: text
  268. })
  269. }}>专利日志</Button>
  270. </div>
  271. )
  272. }
  273. },
  274. ],
  275. dataSource: [],
  276. pagination: {
  277. defaultCurrent: 1,
  278. defaultPageSize: 10,
  279. showQuickJumper: true,
  280. pageSize: 10,
  281. onChange: function (page) {
  282. this.loadData(page, this.state.searchInfor);
  283. }.bind(this),
  284. showTotal: function (total) {
  285. return "共" + total + "条数据";
  286. },
  287. },
  288. detailsVisible: false,
  289. detailsInfor: {},
  290. departmentArr: [],
  291. selectedRowKeys: [],
  292. selectedRows: [],
  293. unSelectedRows: [],
  294. name: undefined,
  295. type: undefined,
  296. depName: undefined,
  297. inputDep: undefined,
  298. followDep: undefined,
  299. releaseDate: [],
  300. releaseDate1: [],
  301. annualFeeStatus: undefined,
  302. userName: undefined,
  303. salesmanRemind: undefined,
  304. isFollow: 1,
  305. aname: undefined,
  306. patentNo: undefined,
  307. upLoad: {
  308. customRequest: (options) => {
  309. this.setState({
  310. upLoadFileLoading: true,
  311. })
  312. let params = new FormData();
  313. params.append("file", options.file);
  314. $.ajax({
  315. method: "post",
  316. url: globalConfig.context + "/api/admin/patentNew/import",
  317. async: true,
  318. cache: false,
  319. contentType: false,
  320. processData: false,
  321. data: params
  322. }).done(
  323. function (data) {
  324. this.setState({
  325. upLoadFileLoading: false,
  326. })
  327. if (data.error.length === 0) {
  328. message.success("导入成功!");
  329. this.loadData();
  330. } else {
  331. message.warning(data.error[0].message);
  332. this.loadData();
  333. }
  334. }.bind(this)
  335. ).always(
  336. function (err) {
  337. if (err.status === 404) {
  338. message.warning('表格数据错误');
  339. }
  340. this.loadData();
  341. this.setState({
  342. upLoadFileLoading: false,
  343. });
  344. }.bind(this)
  345. );
  346. },
  347. name: "file",
  348. action: globalConfig.context + "/api/admin/patentNew/import",
  349. },
  350. adminList: [],
  351. status: props.status,
  352. aid: '',
  353. }
  354. this.changeList = this.changeList.bind(this);
  355. this.loadData = this.loadData.bind(this);
  356. this.download = this.download.bind(this);
  357. this.departmentList = this.departmentList.bind(this);
  358. this.exportExec = this.exportExec.bind(this);
  359. this.onReset = this.onReset.bind(this);
  360. this.updateBatch = this.updateBatch.bind(this);
  361. this.getAdminList = this.getAdminList.bind(this);
  362. this.downloadFile = this.downloadFile.bind(this);
  363. }
  364. componentWillReceiveProps(prevProps) {
  365. if (prevProps.status !== this.state.status) {
  366. this.setState({
  367. status: prevProps.status
  368. }, () => {
  369. this.setState({
  370. name: undefined,
  371. type: undefined,
  372. depName: undefined,
  373. inputDep: undefined,
  374. followDep: undefined,
  375. releaseDate: [],
  376. releaseDate1: [],
  377. annualFeeStatus: undefined,
  378. userName: undefined,
  379. salesmanRemind: undefined,
  380. isFollow: 1,
  381. aname: undefined,
  382. patentNo: undefined,
  383. }, () => {
  384. this.Cascaders1.empty();
  385. this.Cascaders2.empty();
  386. this.Cascaders3.empty();
  387. this.loadData();
  388. })
  389. // this.departmentList();
  390. })
  391. }
  392. }
  393. componentDidMount() {
  394. this.loadData();
  395. // this.departmentList();
  396. }
  397. changeList(arr) {
  398. const newArr = [];
  399. this.state.columns.forEach(item => {
  400. arr.forEach(val => {
  401. if (val === item.title) {
  402. newArr.push(item);
  403. }
  404. });
  405. });
  406. this.setState({
  407. changeList: newArr
  408. });
  409. }
  410. loadData(pageNo) {
  411. this.setState({
  412. loading: true,
  413. selectedRowKeys: [],
  414. selectedRows: []
  415. });
  416. let data = {
  417. name: this.state.name,
  418. type: this.state.type,
  419. depName: this.state.depName,
  420. inputDep: this.state.inputDep,
  421. followDep: this.state.followDep,
  422. createStarts: this.state.releaseDate[0] || undefined,
  423. createEnds: this.state.releaseDate[1] || undefined,
  424. startDates: this.state.releaseDate1[0] || undefined,
  425. endDates: this.state.releaseDate1[1] || undefined,
  426. annualFeeStatus: this.state.annualFeeStatus,
  427. userName: this.state.userName,
  428. salesmanRemind: this.state.salesmanRemind,
  429. isFollow: this.state.isFollow,
  430. aname: this.state.aname,
  431. patentNo: this.state.patentNo,
  432. pageNo: pageNo || 1,
  433. pageSize: 10,
  434. }
  435. if (this.state.status) {
  436. data.status = this.state.status;
  437. data.isFollow = 1;
  438. }
  439. for (let i in data) {
  440. if (data[i] === undefined) { delete data[i] }
  441. }
  442. $.ajax({
  443. method: "get",
  444. dataType: "json",
  445. crossDomain: false,
  446. url: globalConfig.context + "/api/admin/patentNew/selectPatentNew",
  447. data,
  448. success: function (data) {
  449. ShowModal(this);
  450. if (data.error.length === 0) {
  451. this.state.pagination.current = data.data.pageNo;
  452. this.state.pagination.total = data.data.totalCount;
  453. if (data.data && data.data.list && !data.data.list.length) {
  454. this.state.pagination.current = 0;
  455. this.state.pagination.total = 0;
  456. }
  457. data.data.list.map(v => v.key = v.id)
  458. this.setState({
  459. page: data.data.pageNo,
  460. dataSource: data.data.list,
  461. pagination: this.state.pagination,
  462. });
  463. } else {
  464. message.warning(data.error[0].message);
  465. }
  466. }.bind(this),
  467. }).always(
  468. function () {
  469. this.setState({
  470. loading: false,
  471. });
  472. }.bind(this)
  473. );
  474. }
  475. download() {
  476. window.location.href =
  477. globalConfig.context +
  478. "/api/user/channel/downloadTemplate?" +
  479. "sign=user_channel";
  480. }
  481. downloadFile() {
  482. this.setState({
  483. downloadFileLoading: true
  484. })
  485. setTimeout(() => {
  486. this.setState({
  487. downloadFileLoading: false
  488. })
  489. }, 1500)
  490. window.location.href =
  491. globalConfig.context +
  492. "/api/admin/patentNew/exportTemplate?" +
  493. "sign=new_patent_template";
  494. }
  495. //部门
  496. departmentList() {
  497. $.ajax({
  498. method: "get",
  499. dataType: "json",
  500. crossDomain: false,
  501. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  502. data: {},
  503. success: function (data) {
  504. if (data.error.length === 0) {
  505. let theArr = [];
  506. data.data.map(function (item, index) {
  507. theArr.push({
  508. key: index,
  509. name: item.name,
  510. id: item.id,
  511. })
  512. })
  513. this.setState({
  514. departmentArr: theArr,
  515. })
  516. } else {
  517. message.warning(data.error[0].message);
  518. }
  519. }.bind(this),
  520. }).always(function () {
  521. }.bind(this));
  522. }
  523. exportExec() {
  524. this.setState({
  525. exportExecLoading: true
  526. })
  527. let loading = message.loading('加载中...');
  528. let data = {
  529. name: this.state.name,
  530. type: this.state.type,
  531. depName: this.state.depName,
  532. inputDep: this.state.inputDep,
  533. followDep: this.state.followDep,
  534. createStarts: this.state.releaseDate[0] || undefined,
  535. createEnds: this.state.releaseDate[1] || undefined,
  536. startDates: this.state.releaseDate1[0] || undefined,
  537. endDates: this.state.releaseDate1[1] || undefined,
  538. annualFeeStatus: this.state.annualFeeStatus,
  539. userName: this.state.userName,
  540. salesmanRemind: this.state.salesmanRemind,
  541. isFollow: this.state.isFollow,
  542. aname: this.state.aname,
  543. patentNo: this.state.patentNo,
  544. }
  545. for (let i in data) {
  546. if (data[i] === undefined) { delete data[i] }
  547. }
  548. $.ajax({
  549. method: "get",
  550. dataType: "json",
  551. crossDomain: false,
  552. url: globalConfig.context + "/api/admin/patentNew/export",
  553. data,
  554. success: function (data) {
  555. loading();
  556. this.setState({
  557. exportExecLoading: false
  558. })
  559. if (data.error.length === 0) {
  560. this.download(data.data.data);
  561. } else {
  562. message.warning(data.error[0].message);
  563. }
  564. }.bind(this),
  565. }).always(function () {
  566. this.setState({
  567. exportExecLoading: false
  568. })
  569. }.bind(this));
  570. }
  571. download(fileName) {
  572. window.location.href = globalConfig.context + "/open/download?fileName=" + fileName
  573. }
  574. //获取营销管理员列表
  575. getAdminList(name) {
  576. this.setState({
  577. adminListLoading: true
  578. })
  579. $.ajax({
  580. method: "get",
  581. dataType: "json",
  582. crossDomain: false,
  583. url: globalConfig.context + "/api/admin/superviser/adminList",
  584. data: {
  585. pageNo: 1,
  586. pageSize: 99,
  587. name
  588. },
  589. success: function (data) {
  590. let thedata = data.data.list;
  591. let theArr = [];
  592. if (data.error && data.error.length) {
  593. message.warning(data.error[0].message);
  594. } else {
  595. thedata.map(function (item, _) {
  596. theArr.push({
  597. value: item.id,
  598. label: item.name,
  599. });
  600. });
  601. }
  602. this.setState({
  603. adminList: theArr,
  604. });
  605. }.bind(this),
  606. }).always(
  607. function () {
  608. this.setState({
  609. adminListLoading: false
  610. })
  611. }.bind(this)
  612. );
  613. }
  614. onReset() {
  615. this.setState({
  616. name: undefined,
  617. type: undefined,
  618. depName: undefined,
  619. inputDep: undefined,
  620. followDep: undefined,
  621. releaseDate: [],
  622. releaseDate1: [],
  623. annualFeeStatus: undefined,
  624. userName: undefined,
  625. salesmanRemind: undefined,
  626. isFollow: 1,
  627. aname: undefined,
  628. patentNo: undefined,
  629. }, () => {
  630. this.Cascaders1.empty();
  631. this.Cascaders2.empty();
  632. this.Cascaders3.empty();
  633. this.loadData();
  634. })
  635. }
  636. updateBatch(type) {
  637. if (type === 2 && !this.state.aid) {
  638. message.warning('请选择营销管理员');
  639. return;
  640. }
  641. let loading = message.loading('加载中...')
  642. if (type === 0) {
  643. this.setState({
  644. updateBatchLoading0: true,
  645. })
  646. } else if (type === 1) {
  647. this.setState({
  648. updateBatchLoading1: true,
  649. })
  650. } else if (type === 2) {
  651. this.setState({
  652. updateBatchLoading2: true,
  653. })
  654. }
  655. let ids = this.state.selectedRowKeys.join(',');
  656. let data = {
  657. ids,
  658. type,//0 批量通知 1批量发邮件 2转给营销管理员
  659. }
  660. if (type === 2) {
  661. data.aid = this.state.aid
  662. }
  663. $.ajax({
  664. method: "post",
  665. dataType: "json",
  666. crossDomain: false,
  667. url: globalConfig.context + "/api/admin/patentNew/updateBatch",
  668. data,
  669. success: function (data) {
  670. loading();
  671. if (data.error.length === 0) {
  672. message.success(type === 0 ? '成功批量标记为已通知' : type === 1 ? '批量发邮件成功' : type === 2 ? '转入成功' : '');
  673. if (type === 2) {
  674. this.setState({
  675. adminVisible: false
  676. })
  677. }
  678. this.loadData(this.state.page);
  679. } else {
  680. message.warning(data.error[0].message);
  681. }
  682. }.bind(this),
  683. }).always(function () {
  684. if (type === 0) {
  685. this.setState({
  686. updateBatchLoading0: false,
  687. })
  688. } else if (type === 1) {
  689. this.setState({
  690. updateBatchLoading1: false,
  691. })
  692. } else if (type === 2) {
  693. this.setState({
  694. updateBatchLoading2: false,
  695. })
  696. }
  697. }.bind(this));
  698. }
  699. render() {
  700. return (
  701. <div className="user-content patentList">
  702. <ShowModalDiv ShowModal={this.state.showModal} onClose={() => { this.setState({ showModal: false }) }} />
  703. <div className="content-title" style={{ marginBottom: 10 }}>
  704. <span style={{ fontWeight: 900, fontSize: 16 }}>专利列表</span>
  705. </div>
  706. <Tabs defaultActiveKey="1" className="test">
  707. <TabPane tab="搜索" key="1">
  708. <div style={{ padding: '10px' }}>
  709. <Form
  710. layout="inline"
  711. name="basic"
  712. >
  713. <div style={{ display: 'flex', alignItems: 'center', flexFlow: 'wrap' }}>
  714. <Form.Item>
  715. <Input style={{ width: '160px' }} value={this.state.patentNo} onChange={(e) => { this.setState({ patentNo: e.target.value }) }} placeholder="请输入专利号" />
  716. </Form.Item>
  717. <Form.Item>
  718. <Input style={{ width: '160px' }} value={this.state.name} onChange={(e) => { this.setState({ name: e.target.value }) }} placeholder="请输入专利名称" />
  719. </Form.Item>
  720. <Form.Item>
  721. <Input style={{ width: '160px' }} value={this.state.userName} onChange={(e) => { this.setState({ userName: e.target.value }) }} placeholder="请输入客户名称" />
  722. </Form.Item>
  723. <Form.Item>
  724. <Input style={{ width: '160px' }} value={this.state.aname} onChange={(e) => { this.setState({ aname: e.target.value }) }} placeholder="请输入跟进人名称" />
  725. </Form.Item>
  726. <Form.Item>
  727. <Select
  728. placeholder="请选择专利类型"
  729. style={{ width: "140px" }}
  730. value={this.state.type}
  731. onSelect={(e) => {
  732. this.setState({
  733. type: e
  734. })
  735. }}
  736. >
  737. {patentTypeList.map(function (item) {
  738. return (
  739. <Select.Option key={item.value}>
  740. {item.key}
  741. </Select.Option>
  742. );
  743. })}
  744. </Select>
  745. </Form.Item>
  746. <Form.Item>
  747. <Select placeholder="请选择是否代缴费" onSelect={(e) => {
  748. this.setState({
  749. annualFeeStatus: e
  750. })
  751. }} value={this.state.annualFeeStatus} style={{ width: "140px" }}>
  752. <Select.Option value={0} >未代缴</Select.Option>
  753. <Select.Option value={1} >已代缴</Select.Option>
  754. </Select>
  755. </Form.Item>
  756. <Form.Item>
  757. <Select placeholder="请选择是否通知" value={this.state.salesmanRemind} onSelect={(e) => {
  758. this.setState({
  759. salesmanRemind: e
  760. })
  761. }} style={{ width: "140px" }}>
  762. <Select.Option value={0} >未通知</Select.Option>
  763. <Select.Option value={1} >已通知</Select.Option>
  764. </Select>
  765. </Form.Item>
  766. {!this.state.status ? <Form.Item>
  767. <Select placeholder="请选择关系" value={this.state.isFollow} onSelect={(e) => {
  768. this.setState({
  769. isFollow: e
  770. })
  771. }} style={{ width: "140px" }}>
  772. <Select.Option value={0} >我录入</Select.Option>
  773. <Select.Option value={1} >我跟进</Select.Option>
  774. </Select>
  775. </Form.Item> : null}
  776. <Form.Item>
  777. <Cascaders
  778. ref={ref => this.Cascaders1 = ref}
  779. placeholder="请选择派单部门"
  780. id="name"
  781. name="name"
  782. children="list"
  783. height={32}
  784. onSel={(e) => {
  785. this.setState({
  786. depName: JSON.stringify(e)
  787. })
  788. }}
  789. />
  790. {/* <Select
  791. placeholder="请选择派单部门"
  792. value={this.state.depName}
  793. onSelect={e => { this.setState({ depName: e }) }}
  794. style={{ width: "240px" }}
  795. >
  796. {
  797. this.state.departmentArr.map(function (item) {
  798. return <Select.Option key={item.id} value={item.name}>{item.name}</Select.Option>
  799. })
  800. }
  801. </Select> */}
  802. </Form.Item>
  803. <Form.Item>
  804. <Cascaders
  805. ref={ref => this.Cascaders2 = ref}
  806. placeholder="请选择录入部门"
  807. id="id"
  808. name="name"
  809. children="list"
  810. height={32}
  811. onSel={(e) => {
  812. this.setState({
  813. inputDep: JSON.stringify(e)
  814. })
  815. }}
  816. />
  817. {/* <Select
  818. placeholder="请选择录入部门"
  819. value={this.state.inputDep}
  820. onSelect={e => {
  821. this.setState({ inputDep: e })
  822. }}
  823. style={{ width: "240px" }}
  824. >
  825. {
  826. this.state.departmentArr.map(function (item) {
  827. return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
  828. })
  829. }
  830. </Select> */}
  831. </Form.Item>
  832. <Form.Item>
  833. <Cascaders
  834. ref={ref => this.Cascaders3 = ref}
  835. placeholder="请选择跟进部门"
  836. id="id"
  837. name="name"
  838. children="list"
  839. height={32}
  840. onSel={(e) => {
  841. this.setState({
  842. followDep: JSON.stringify(e)
  843. })
  844. }}
  845. />
  846. {/* <Select
  847. placeholder="请选择跟进部门"
  848. value={this.state.followDep}
  849. onSelect={e => {
  850. this.setState({ followDep: e })
  851. }}
  852. style={{ width: "240px" }}
  853. >
  854. {
  855. this.state.departmentArr.map(function (item) {
  856. return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
  857. })
  858. }
  859. </Select> */}
  860. </Form.Item>
  861. <Form.Item>
  862. <div style={{ display: 'flex', alignItems: 'center' }}>
  863. <div style={{ marginRight: '10px' }}>录入时间:</div>
  864. <RangePicker
  865. style={{ marginRight: '10px', height: 32 }}
  866. value={[
  867. this.state.releaseDate[0]
  868. ? moment(this.state.releaseDate[0])
  869. : null,
  870. this.state.releaseDate[1]
  871. ? moment(this.state.releaseDate[1])
  872. : null,
  873. ]}
  874. onChange={(data, dataString) => {
  875. this.setState({ releaseDate: dataString });
  876. }}
  877. />
  878. </div>
  879. </Form.Item>
  880. <Form.Item>
  881. <div style={{ display: 'flex', alignItems: 'center' }}>
  882. <span style={{ marginRight: '10px' }}>申请时间:</span>
  883. <RangePicker
  884. style={{ marginRight: '10px' }}
  885. value={[
  886. this.state.releaseDate1[0]
  887. ? moment(this.state.releaseDate1[0])
  888. : null,
  889. this.state.releaseDate1[1]
  890. ? moment(this.state.releaseDate1[1])
  891. : null,
  892. ]}
  893. onChange={(data, dataString) => {
  894. this.setState({ releaseDate1: dataString });
  895. }}
  896. />
  897. </div>
  898. </Form.Item>
  899. <Form.Item>
  900. <Button type="primary" onClick={() => { this.loadData(); }}>
  901. 搜索
  902. </Button>
  903. </Form.Item>
  904. <Form.Item>
  905. <Button onClick={this.onReset}>
  906. 重置
  907. </Button>
  908. </Form.Item>
  909. </div>
  910. </Form>
  911. </div>
  912. </TabPane>
  913. <TabPane tab="操作" key="2">
  914. <Popconfirm placement="top" title="确定要标识为已通知吗?" onConfirm={(e) => {
  915. e.stopPropagation();
  916. this.updateBatch(0);
  917. }} okText="确定" cancelText="取消">
  918. <Button
  919. loading={this.state.updateBatchLoading0}
  920. type="primary"
  921. style={{ margin: "11px 0px 10px 10px" }}
  922. disabled={this.state.selectedRowKeys.length === 0}
  923. >
  924. 标识为已通知
  925. </Button>
  926. </Popconfirm>
  927. <Popconfirm placement="top" title="确定要批量发邮件吗?" onConfirm={(e) => {
  928. e.stopPropagation();
  929. let arr = this.state.selectedRows.filter(v => v.status === 0);
  930. if (arr.length > 0) {
  931. this.setState({
  932. unSelectedRows: arr,
  933. unSelectedRowsVisible: true
  934. })
  935. } else {
  936. this.updateBatch(1)
  937. }
  938. }} okText="确定" cancelText="取消">
  939. <Button
  940. loading={this.state.updateBatchLoading1}
  941. type="primary"
  942. style={{ margin: "11px 0px 10px 10px" }}
  943. disabled={this.state.selectedRowKeys.length === 0}
  944. >
  945. 批量发邮件
  946. </Button>
  947. </Popconfirm>
  948. <Button
  949. loading={this.state.updateBatchLoading2}
  950. type="primary"
  951. style={{ margin: "11px 0px 10px 10px" }}
  952. disabled={this.state.selectedRowKeys.length === 0}
  953. onClick={() => {
  954. this.setState({
  955. adminVisible: true,
  956. adminList: [],
  957. })
  958. }}
  959. >
  960. 转交专利
  961. </Button>
  962. <Upload {...this.state.upLoad} disabled={this.state.upLoadFileLoading}>
  963. <Button
  964. loading={this.state.upLoadFileLoading}
  965. type="primary"
  966. style={{ marginRight: "10px", marginLeft: '20px' }}
  967. >
  968. 批量导入
  969. </Button>
  970. </Upload>
  971. <Button
  972. type="primary"
  973. loading={this.state.downloadFileLoading}
  974. onClick={(e) => {
  975. e.stopPropagation();
  976. this.downloadFile();
  977. }}
  978. style={{ margin: "11px 0px 10px 10px" }}
  979. >
  980. 下载专利模板
  981. </Button>
  982. <Button
  983. type="primary"
  984. style={{ margin: "11px 0px 10px 10px" }}
  985. loading={this.state.exportExecLoading}
  986. onClick={() => {
  987. this.exportExec();
  988. }}
  989. >
  990. 导出Excel
  991. </Button>
  992. </TabPane>
  993. <TabPane tab="更改表格显示数据" key="3">
  994. <div style={{ marginLeft: 10 }}>
  995. <ChooseList
  996. columns={this.state.columns}
  997. changeFn={this.changeList}
  998. changeList={this.state.changeList}
  999. top={55}
  1000. margin={11}
  1001. />
  1002. </div>
  1003. </TabPane>
  1004. </Tabs>
  1005. <div className="patent-table">
  1006. <Spin spinning={this.state.loading}>
  1007. <Table
  1008. columns={
  1009. this.state.changeList
  1010. ? this.state.changeList
  1011. : this.state.columns
  1012. }
  1013. dataSource={this.state.dataSource}
  1014. pagination={this.state.pagination}
  1015. style={{
  1016. cursor: 'pointer',
  1017. }}
  1018. onRowClick={(record) => {
  1019. this.setState({
  1020. detailsVisible: true,
  1021. readOnly: true,
  1022. detailsInfor: record
  1023. })
  1024. }}
  1025. rowSelection={{
  1026. getCheckboxProps: record => ({
  1027. disabled: record.isFollow === 0
  1028. }),
  1029. selectedRowKeys: this.state.selectedRowKeys,
  1030. onChange: (selectedRowKeys, selectedRows) => {
  1031. this.setState({ selectedRowKeys, selectedRows });
  1032. },
  1033. }}
  1034. scroll={{ x: "max-content", y: 0 }}
  1035. bordered
  1036. size="small"
  1037. />
  1038. </Spin>
  1039. </div>
  1040. {this.state.detailsVisible ? <PatentDetails
  1041. readOnly={this.state.readOnly}
  1042. visible={this.state.detailsVisible}
  1043. detailsInfor={this.state.detailsInfor}
  1044. onRefresh={() => {
  1045. this.loadData(this.state.page);
  1046. }}
  1047. onCancel={() => {
  1048. this.setState({
  1049. readOnly: true,
  1050. detailsVisible: false,
  1051. detailsInfor: {}
  1052. })
  1053. }}
  1054. /> : null}
  1055. {this.state.visible ? <ReminderLog
  1056. id={this.state.id}
  1057. visible={this.state.visible}
  1058. cancel={() => {
  1059. this.setState({
  1060. visible: false,
  1061. id: undefined
  1062. })
  1063. }}
  1064. /> : null}
  1065. {this.state.unSelectedRowsVisible ? <Modal
  1066. title='提醒'
  1067. className='payRecordComponent'
  1068. width={500}
  1069. maskClosable={false}
  1070. footer={null}
  1071. visible={this.state.unSelectedRowsVisible}
  1072. onCancel={() => {
  1073. this.setState({
  1074. unSelectedRowsVisible: false,
  1075. unSelectedRows: []
  1076. })
  1077. }}
  1078. >
  1079. <div style={{ paddingBottom: '15px' }}>下列专利,不在专利需缴费的90天提醒之内,不可发送邮件</div>
  1080. <Table
  1081. columns={[
  1082. {
  1083. title: "专利号",
  1084. dataIndex: "patentNo",
  1085. key: "patentNo",
  1086. },
  1087. {
  1088. title: "专利名称",
  1089. dataIndex: "name",
  1090. key: "name",
  1091. },
  1092. ]}
  1093. dataSource={this.state.unSelectedRows}
  1094. pagination={false}
  1095. scroll={{ x: "max-content", y: 0 }}
  1096. bordered
  1097. size="small"
  1098. />
  1099. <div style={{ display: 'flex', justifyContent: 'center', paddingTop: '20px' }}>
  1100. <Button type="primary" onClick={() => {
  1101. this.setState({
  1102. unSelectedRowsVisible: false,
  1103. unSelectedRows: []
  1104. })
  1105. }}>关闭</Button>
  1106. </div>
  1107. </Modal> : null}
  1108. {this.state.adminVisible ? <Modal
  1109. title='请选择需转交的跟进人'
  1110. className='payRecordComponent'
  1111. width={300}
  1112. maskClosable={false}
  1113. footer={null}
  1114. visible={this.state.adminVisible}
  1115. onCancel={() => {
  1116. this.setState({
  1117. adminVisible: false
  1118. })
  1119. }}
  1120. >
  1121. <div style={{ display: 'flex', flexFlow: "column", justifyContent: 'center', alignItems: 'center' }}>
  1122. <div style={{ display: 'flex', alignItems: 'center' }}>
  1123. <span style={{ paddingRight: '15px' }}>跟进人:</span>
  1124. <Select
  1125. showSearch
  1126. style={{ width: 200 }}
  1127. placeholder="请选择跟进人"
  1128. optionFilterProp="children"
  1129. onSelect={(aid) => {
  1130. this.setState({
  1131. aid
  1132. })
  1133. }}
  1134. onSearch={(value) => { this.getAdminList(value) }}
  1135. >
  1136. {
  1137. this.state.adminList.map(v => (
  1138. <Select.Option value={v.value} key={v.value}>{v.label}</Select.Option>
  1139. ))
  1140. }
  1141. </Select>
  1142. </div>
  1143. <Popconfirm placement="top" title="确定要转入此营销管理吗?" onConfirm={(e) => {
  1144. e.stopPropagation();
  1145. this.updateBatch(2);
  1146. }} okText="确定" cancelText="取消">
  1147. <Button
  1148. loading={this.state.updateBatchLoading2}
  1149. type='primary'
  1150. style={{ marginAuto: '0 auto', marginTop: '20px' }}
  1151. >
  1152. 确定
  1153. </Button>
  1154. </Popconfirm>
  1155. </div>
  1156. </Modal> : null}
  1157. </div>
  1158. )
  1159. }
  1160. }
  1161. export default List;