list.jsx 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  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. }, () => { this.loadData(); })
  384. // this.departmentList();
  385. })
  386. }
  387. }
  388. componentDidMount() {
  389. this.loadData();
  390. // this.departmentList();
  391. }
  392. changeList(arr) {
  393. const newArr = [];
  394. this.state.columns.forEach(item => {
  395. arr.forEach(val => {
  396. if (val === item.title) {
  397. newArr.push(item);
  398. }
  399. });
  400. });
  401. this.setState({
  402. changeList: newArr
  403. });
  404. }
  405. loadData(pageNo) {
  406. this.setState({
  407. loading: true,
  408. selectedRowKeys: [],
  409. selectedRows: []
  410. });
  411. let data = {
  412. name: this.state.name,
  413. type: this.state.type,
  414. depName: this.state.depName,
  415. inputDep: this.state.inputDep,
  416. followDep: this.state.followDep,
  417. createStarts: this.state.releaseDate[0] || undefined,
  418. createEnds: this.state.releaseDate[1] || undefined,
  419. startDates: this.state.releaseDate1[0] || undefined,
  420. endDates: this.state.releaseDate1[1] || undefined,
  421. annualFeeStatus: this.state.annualFeeStatus,
  422. userName: this.state.userName,
  423. salesmanRemind: this.state.salesmanRemind,
  424. isFollow: this.state.isFollow,
  425. aname: this.state.aname,
  426. patentNo: this.state.patentNo,
  427. pageNo: pageNo || 1,
  428. pageSize: 10,
  429. }
  430. if (this.state.status) {
  431. data.status = this.state.status;
  432. data.isFollow = 1;
  433. }
  434. for (let i in data) {
  435. if (data[i] === undefined) { delete data[i] }
  436. }
  437. $.ajax({
  438. method: "get",
  439. dataType: "json",
  440. crossDomain: false,
  441. url: globalConfig.context + "/api/admin/patentNew/selectPatentNew",
  442. data,
  443. success: function (data) {
  444. ShowModal(this);
  445. if (data.error.length === 0) {
  446. this.state.pagination.current = data.data.pageNo;
  447. this.state.pagination.total = data.data.totalCount;
  448. if (data.data && data.data.list && !data.data.list.length) {
  449. this.state.pagination.current = 0;
  450. this.state.pagination.total = 0;
  451. }
  452. data.data.list.map(v => v.key = v.id)
  453. this.setState({
  454. page: data.data.pageNo,
  455. dataSource: data.data.list,
  456. pagination: this.state.pagination,
  457. });
  458. } else {
  459. message.warning(data.error[0].message);
  460. }
  461. }.bind(this),
  462. }).always(
  463. function () {
  464. this.setState({
  465. loading: false,
  466. });
  467. }.bind(this)
  468. );
  469. }
  470. download() {
  471. window.location.href =
  472. globalConfig.context +
  473. "/api/user/channel/downloadTemplate?" +
  474. "sign=user_channel";
  475. }
  476. downloadFile() {
  477. this.setState({
  478. downloadFileLoading: true
  479. })
  480. setTimeout(() => {
  481. this.setState({
  482. downloadFileLoading: false
  483. })
  484. }, 1500)
  485. window.location.href =
  486. globalConfig.context +
  487. "/api/admin/patentNew/exportTemplate?" +
  488. "sign=new_patent_template";
  489. }
  490. //部门
  491. departmentList() {
  492. $.ajax({
  493. method: "get",
  494. dataType: "json",
  495. crossDomain: false,
  496. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  497. data: {},
  498. success: function (data) {
  499. if (data.error.length === 0) {
  500. let theArr = [];
  501. data.data.map(function (item, index) {
  502. theArr.push({
  503. key: index,
  504. name: item.name,
  505. id: item.id,
  506. })
  507. })
  508. this.setState({
  509. departmentArr: theArr,
  510. })
  511. } else {
  512. message.warning(data.error[0].message);
  513. }
  514. }.bind(this),
  515. }).always(function () {
  516. }.bind(this));
  517. }
  518. exportExec() {
  519. this.setState({
  520. exportExecLoading: true
  521. })
  522. let loading = message.loading('加载中...');
  523. let data = {
  524. name: this.state.name,
  525. type: this.state.type,
  526. depName: this.state.depName,
  527. inputDep: this.state.inputDep,
  528. followDep: this.state.followDep,
  529. createStarts: this.state.releaseDate[0] || undefined,
  530. createEnds: this.state.releaseDate[1] || undefined,
  531. startDates: this.state.releaseDate1[0] || undefined,
  532. endDates: this.state.releaseDate1[1] || undefined,
  533. annualFeeStatus: this.state.annualFeeStatus,
  534. userName: this.state.userName,
  535. salesmanRemind: this.state.salesmanRemind,
  536. isFollow: this.state.isFollow,
  537. aname: this.state.aname,
  538. patentNo: this.state.patentNo,
  539. }
  540. for (let i in data) {
  541. if (data[i] === undefined) { delete data[i] }
  542. }
  543. $.ajax({
  544. method: "get",
  545. dataType: "json",
  546. crossDomain: false,
  547. url: globalConfig.context + "/api/admin/patentNew/export",
  548. data,
  549. success: function (data) {
  550. loading();
  551. this.setState({
  552. exportExecLoading: false
  553. })
  554. if (data.error.length === 0) {
  555. this.download(data.data.data);
  556. } else {
  557. message.warning(data.error[0].message);
  558. }
  559. }.bind(this),
  560. }).always(function () {
  561. this.setState({
  562. exportExecLoading: false
  563. })
  564. }.bind(this));
  565. }
  566. download(fileName) {
  567. window.location.href = globalConfig.context + "/open/download?fileName=" + fileName
  568. }
  569. //获取营销管理员列表
  570. getAdminList(name) {
  571. this.setState({
  572. adminListLoading: true
  573. })
  574. $.ajax({
  575. method: "get",
  576. dataType: "json",
  577. crossDomain: false,
  578. url: globalConfig.context + "/api/admin/superviser/adminList",
  579. data: {
  580. pageNo: 1,
  581. pageSize: 99,
  582. name
  583. },
  584. success: function (data) {
  585. let thedata = data.data.list;
  586. let theArr = [];
  587. if (data.error && data.error.length) {
  588. message.warning(data.error[0].message);
  589. } else {
  590. thedata.map(function (item, _) {
  591. theArr.push({
  592. value: item.id,
  593. label: item.name,
  594. });
  595. });
  596. }
  597. this.setState({
  598. adminList: theArr,
  599. });
  600. }.bind(this),
  601. }).always(
  602. function () {
  603. this.setState({
  604. adminListLoading: false
  605. })
  606. }.bind(this)
  607. );
  608. }
  609. onReset() {
  610. this.setState({
  611. name: undefined,
  612. type: undefined,
  613. depName: undefined,
  614. inputDep: undefined,
  615. followDep: undefined,
  616. releaseDate: [],
  617. releaseDate1: [],
  618. annualFeeStatus: undefined,
  619. userName: undefined,
  620. salesmanRemind: undefined,
  621. isFollow: 1,
  622. aname: undefined,
  623. patentNo: undefined,
  624. }, () => {
  625. this.Cascaders1.empty();
  626. this.Cascaders2.empty();
  627. this.Cascaders3.empty();
  628. this.loadData();
  629. })
  630. }
  631. updateBatch(type) {
  632. if (type === 2 && !this.state.aid) {
  633. message.warning('请选择营销管理员');
  634. return;
  635. }
  636. let loading = message.loading('加载中...')
  637. if (type === 0) {
  638. this.setState({
  639. updateBatchLoading0: true,
  640. })
  641. } else if (type === 1) {
  642. this.setState({
  643. updateBatchLoading1: true,
  644. })
  645. } else if (type === 2) {
  646. this.setState({
  647. updateBatchLoading2: true,
  648. })
  649. }
  650. let ids = this.state.selectedRowKeys.join(',');
  651. let data = {
  652. ids,
  653. type,//0 批量通知 1批量发邮件 2转给营销管理员
  654. }
  655. if (type === 2) {
  656. data.aid = this.state.aid
  657. }
  658. $.ajax({
  659. method: "post",
  660. dataType: "json",
  661. crossDomain: false,
  662. url: globalConfig.context + "/api/admin/patentNew/updateBatch",
  663. data,
  664. success: function (data) {
  665. loading();
  666. if (data.error.length === 0) {
  667. message.success(type === 0 ? '成功批量标记为已通知' : type === 1 ? '批量发邮件成功' : type === 2 ? '转入成功' : '');
  668. if (type === 2) {
  669. this.setState({
  670. adminVisible: false
  671. })
  672. }
  673. this.loadData(this.state.page);
  674. } else {
  675. message.warning(data.error[0].message);
  676. }
  677. }.bind(this),
  678. }).always(function () {
  679. if (type === 0) {
  680. this.setState({
  681. updateBatchLoading0: false,
  682. })
  683. } else if (type === 1) {
  684. this.setState({
  685. updateBatchLoading1: false,
  686. })
  687. } else if (type === 2) {
  688. this.setState({
  689. updateBatchLoading2: false,
  690. })
  691. }
  692. }.bind(this));
  693. }
  694. render() {
  695. return (
  696. <div className="user-content patentList">
  697. <ShowModalDiv ShowModal={this.state.showModal} />
  698. <div className="content-title" style={{ marginBottom: 10 }}>
  699. <span style={{ fontWeight: 900, fontSize: 16 }}>专利列表</span>
  700. </div>
  701. <Tabs defaultActiveKey="1" className="test">
  702. <TabPane tab="搜索" key="1">
  703. <div style={{ padding: '10px' }}>
  704. <Form
  705. layout="inline"
  706. name="basic"
  707. >
  708. <div style={{ display: 'flex', alignItems: 'center', flexFlow: 'wrap' }}>
  709. <Form.Item>
  710. <Input style={{ width: '140px' }} value={this.state.patentNo} onChange={(e) => { this.setState({ patentNo: e.target.value }) }} placeholder="请输入专利号" />
  711. </Form.Item>
  712. <Form.Item>
  713. <Input style={{ width: '140px' }} value={this.state.name} onChange={(e) => { this.setState({ name: e.target.value }) }} placeholder="请输入专利名称" />
  714. </Form.Item>
  715. <Form.Item>
  716. <Input style={{ width: '140px' }} value={this.state.userName} onChange={(e) => { this.setState({ userName: e.target.value }) }} placeholder="请输入客户名称" />
  717. </Form.Item>
  718. <Form.Item>
  719. <Input style={{ width: '140px' }} value={this.state.aname} onChange={(e) => { this.setState({ aname: e.target.value }) }} placeholder="请输入跟进人名称" />
  720. </Form.Item>
  721. <Form.Item>
  722. <Select
  723. placeholder="请选择专利类型"
  724. style={{ width: "140px" }}
  725. value={this.state.type}
  726. onSelect={(e) => {
  727. this.setState({
  728. type: e
  729. })
  730. }}
  731. >
  732. {patentTypeList.map(function (item) {
  733. return (
  734. <Select.Option key={item.value}>
  735. {item.key}
  736. </Select.Option>
  737. );
  738. })}
  739. </Select>
  740. </Form.Item>
  741. <Form.Item>
  742. <Select placeholder="请选择是否代缴费" onSelect={(e) => {
  743. this.setState({
  744. annualFeeStatus: e
  745. })
  746. }} value={this.state.annualFeeStatus} style={{ width: "140px" }}>
  747. <Select.Option value={0} >未代缴</Select.Option>
  748. <Select.Option value={1} >已代缴</Select.Option>
  749. </Select>
  750. </Form.Item>
  751. <Form.Item>
  752. <Select placeholder="请选择是否通知" value={this.state.salesmanRemind} onSelect={(e) => {
  753. this.setState({
  754. salesmanRemind: e
  755. })
  756. }} style={{ width: "140px" }}>
  757. <Select.Option value={0} >未通知</Select.Option>
  758. <Select.Option value={1} >已通知</Select.Option>
  759. </Select>
  760. </Form.Item>
  761. {!this.state.status ? <Form.Item>
  762. <Select placeholder="请选择关系" value={this.state.isFollow} onSelect={(e) => {
  763. this.setState({
  764. isFollow: e
  765. })
  766. }} style={{ width: "140px" }}>
  767. <Select.Option value={0} >我录入</Select.Option>
  768. <Select.Option value={1} >我跟进</Select.Option>
  769. </Select>
  770. </Form.Item> : null}
  771. <Form.Item>
  772. <Cascaders
  773. ref={ref => this.Cascaders1 = ref}
  774. placeholder="请选择派单部门"
  775. id="name"
  776. name="name"
  777. children="list"
  778. height={24}
  779. onSel={(e) => {
  780. this.setState({
  781. depName: JSON.stringify(e)
  782. })
  783. }}
  784. />
  785. {/* <Select
  786. placeholder="请选择派单部门"
  787. value={this.state.depName}
  788. onSelect={e => { this.setState({ depName: e }) }}
  789. style={{ width: "240px" }}
  790. >
  791. {
  792. this.state.departmentArr.map(function (item) {
  793. return <Select.Option key={item.id} value={item.name}>{item.name}</Select.Option>
  794. })
  795. }
  796. </Select> */}
  797. </Form.Item>
  798. <Form.Item>
  799. <Cascaders
  800. ref={ref => this.Cascaders2 = ref}
  801. placeholder="请选择录入部门"
  802. id="id"
  803. name="name"
  804. children="list"
  805. height={24}
  806. onSel={(e) => {
  807. this.setState({
  808. inputDep: JSON.stringify(e)
  809. })
  810. }}
  811. />
  812. {/* <Select
  813. placeholder="请选择录入部门"
  814. value={this.state.inputDep}
  815. onSelect={e => {
  816. this.setState({ inputDep: e })
  817. }}
  818. style={{ width: "240px" }}
  819. >
  820. {
  821. this.state.departmentArr.map(function (item) {
  822. return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
  823. })
  824. }
  825. </Select> */}
  826. </Form.Item>
  827. <Form.Item>
  828. <Cascaders
  829. ref={ref => this.Cascaders3 = ref}
  830. placeholder="请选择跟进部门"
  831. id="id"
  832. name="name"
  833. children="list"
  834. height={24}
  835. onSel={(e) => {
  836. this.setState({
  837. followDep: JSON.stringify(e)
  838. })
  839. }}
  840. />
  841. {/* <Select
  842. placeholder="请选择跟进部门"
  843. value={this.state.followDep}
  844. onSelect={e => {
  845. this.setState({ followDep: e })
  846. }}
  847. style={{ width: "240px" }}
  848. >
  849. {
  850. this.state.departmentArr.map(function (item) {
  851. return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
  852. })
  853. }
  854. </Select> */}
  855. </Form.Item>
  856. <Form.Item>
  857. <div style={{ display: 'flex', alignItems: 'center' }}>
  858. <div style={{ marginRight: '10px' }}>录入时间:</div>
  859. <RangePicker
  860. style={{ marginRight: '10px' }}
  861. value={[
  862. this.state.releaseDate[0]
  863. ? moment(this.state.releaseDate[0])
  864. : null,
  865. this.state.releaseDate[1]
  866. ? moment(this.state.releaseDate[1])
  867. : null,
  868. ]}
  869. onChange={(data, dataString) => {
  870. this.setState({ releaseDate: dataString });
  871. }}
  872. />
  873. </div>
  874. </Form.Item>
  875. <Form.Item>
  876. <div style={{ display: 'flex', alignItems: 'center' }}>
  877. <span style={{ marginRight: '10px' }}>申请时间:</span>
  878. <RangePicker
  879. style={{ marginRight: '10px' }}
  880. value={[
  881. this.state.releaseDate1[0]
  882. ? moment(this.state.releaseDate1[0])
  883. : null,
  884. this.state.releaseDate1[1]
  885. ? moment(this.state.releaseDate1[1])
  886. : null,
  887. ]}
  888. onChange={(data, dataString) => {
  889. this.setState({ releaseDate1: dataString });
  890. }}
  891. />
  892. </div>
  893. </Form.Item>
  894. <Form.Item>
  895. <Button type="primary" onClick={() => { this.loadData(); }}>
  896. 搜索
  897. </Button>
  898. </Form.Item>
  899. <Form.Item>
  900. <Button onClick={this.onReset}>
  901. 重置
  902. </Button>
  903. </Form.Item>
  904. </div>
  905. </Form>
  906. </div>
  907. </TabPane>
  908. <TabPane tab="操作" key="2">
  909. <Popconfirm placement="top" title="确定要标识为已通知吗?" onConfirm={(e) => {
  910. e.stopPropagation();
  911. this.updateBatch(0);
  912. }} okText="确定" cancelText="取消">
  913. <Button
  914. loading={this.state.updateBatchLoading0}
  915. type="primary"
  916. style={{ margin: "11px 0px 10px 10px" }}
  917. disabled={this.state.selectedRowKeys.length === 0}
  918. >
  919. 标识为已通知
  920. </Button>
  921. </Popconfirm>
  922. <Popconfirm placement="top" title="确定要批量发邮件吗?" onConfirm={(e) => {
  923. e.stopPropagation();
  924. let arr = this.state.selectedRows.filter(v => v.status === 0);
  925. if (arr.length > 0) {
  926. this.setState({
  927. unSelectedRows: arr,
  928. unSelectedRowsVisible: true
  929. })
  930. } else {
  931. this.updateBatch(1)
  932. }
  933. }} okText="确定" cancelText="取消">
  934. <Button
  935. loading={this.state.updateBatchLoading1}
  936. type="primary"
  937. style={{ margin: "11px 0px 10px 10px" }}
  938. disabled={this.state.selectedRowKeys.length === 0}
  939. >
  940. 批量发邮件
  941. </Button>
  942. </Popconfirm>
  943. <Button
  944. loading={this.state.updateBatchLoading2}
  945. type="primary"
  946. style={{ margin: "11px 0px 10px 10px" }}
  947. disabled={this.state.selectedRowKeys.length === 0}
  948. onClick={() => {
  949. this.setState({
  950. adminVisible: true,
  951. adminList: [],
  952. })
  953. }}
  954. >
  955. 转交专利
  956. </Button>
  957. <Upload {...this.state.upLoad} disabled={this.state.upLoadFileLoading}>
  958. <Button
  959. loading={this.state.upLoadFileLoading}
  960. type="primary"
  961. style={{ marginRight: "10px", marginLeft: '20px' }}
  962. >
  963. 批量导入
  964. </Button>
  965. </Upload>
  966. <Button
  967. type="primary"
  968. loading={this.state.downloadFileLoading}
  969. onClick={(e) => {
  970. e.stopPropagation();
  971. this.downloadFile();
  972. }}
  973. style={{ margin: "11px 0px 10px 10px" }}
  974. >
  975. 下载专利模板
  976. </Button>
  977. <Button
  978. type="primary"
  979. style={{ margin: "11px 0px 10px 10px" }}
  980. loading={this.state.exportExecLoading}
  981. onClick={() => {
  982. this.exportExec();
  983. }}
  984. >
  985. 导出Excel
  986. </Button>
  987. </TabPane>
  988. <TabPane tab="更改表格显示数据" key="3">
  989. <div style={{ marginLeft: 10 }}>
  990. <ChooseList
  991. columns={this.state.columns}
  992. changeFn={this.changeList}
  993. changeList={this.state.changeList}
  994. top={55}
  995. margin={11}
  996. />
  997. </div>
  998. </TabPane>
  999. </Tabs>
  1000. <div className="patent-table">
  1001. <Spin spinning={this.state.loading}>
  1002. <Table
  1003. columns={
  1004. this.state.changeList
  1005. ? this.state.changeList
  1006. : this.state.columns
  1007. }
  1008. dataSource={this.state.dataSource}
  1009. pagination={this.state.pagination}
  1010. style={{
  1011. cursor: 'pointer',
  1012. }}
  1013. onRowClick={(record) => {
  1014. this.setState({
  1015. detailsVisible: true,
  1016. readOnly: true,
  1017. detailsInfor: record
  1018. })
  1019. }}
  1020. rowSelection={{
  1021. getCheckboxProps: record => ({
  1022. disabled: record.isFollow === 0
  1023. }),
  1024. selectedRowKeys: this.state.selectedRowKeys,
  1025. onChange: (selectedRowKeys, selectedRows) => {
  1026. this.setState({ selectedRowKeys, selectedRows });
  1027. },
  1028. }}
  1029. scroll={{ x: "max-content", y: 0 }}
  1030. bordered
  1031. size="small"
  1032. />
  1033. </Spin>
  1034. </div>
  1035. {this.state.detailsVisible ? <PatentDetails
  1036. readOnly={this.state.readOnly}
  1037. visible={this.state.detailsVisible}
  1038. detailsInfor={this.state.detailsInfor}
  1039. onRefresh={() => {
  1040. this.loadData(this.state.page);
  1041. }}
  1042. onCancel={() => {
  1043. this.setState({
  1044. readOnly: true,
  1045. detailsVisible: false,
  1046. detailsInfor: {}
  1047. })
  1048. }}
  1049. /> : null}
  1050. {this.state.visible ? <ReminderLog
  1051. id={this.state.id}
  1052. visible={this.state.visible}
  1053. cancel={() => {
  1054. this.setState({
  1055. visible: false,
  1056. id: undefined
  1057. })
  1058. }}
  1059. /> : null}
  1060. {this.state.unSelectedRowsVisible ? <Modal
  1061. title='提醒'
  1062. className='payRecordComponent'
  1063. width={500}
  1064. maskClosable={false}
  1065. footer={null}
  1066. visible={this.state.unSelectedRowsVisible}
  1067. onCancel={() => {
  1068. this.setState({
  1069. unSelectedRowsVisible: false,
  1070. unSelectedRows: []
  1071. })
  1072. }}
  1073. >
  1074. <div style={{ paddingBottom: '15px' }}>下列专利,不在专利需缴费的90天提醒之内,不可发送邮件</div>
  1075. <Table
  1076. columns={[
  1077. {
  1078. title: "专利号",
  1079. dataIndex: "patentNo",
  1080. key: "patentNo",
  1081. },
  1082. {
  1083. title: "专利名称",
  1084. dataIndex: "name",
  1085. key: "name",
  1086. },
  1087. ]}
  1088. dataSource={this.state.unSelectedRows}
  1089. pagination={false}
  1090. scroll={{ x: "max-content", y: 0 }}
  1091. bordered
  1092. size="small"
  1093. />
  1094. <div style={{ display: 'flex', justifyContent: 'center', paddingTop: '20px' }}>
  1095. <Button type="primary" onClick={() => {
  1096. this.setState({
  1097. unSelectedRowsVisible: false,
  1098. unSelectedRows: []
  1099. })
  1100. }}>关闭</Button>
  1101. </div>
  1102. </Modal> : null}
  1103. {this.state.adminVisible ? <Modal
  1104. title='请选择需转交的跟进人'
  1105. className='payRecordComponent'
  1106. width={300}
  1107. maskClosable={false}
  1108. footer={null}
  1109. visible={this.state.adminVisible}
  1110. onCancel={() => {
  1111. this.setState({
  1112. adminVisible: false
  1113. })
  1114. }}
  1115. >
  1116. <div style={{ display: 'flex', flexFlow: "column", justifyContent: 'center', alignItems: 'center' }}>
  1117. <div style={{ display: 'flex', alignItems: 'center' }}>
  1118. <span style={{ paddingRight: '15px' }}>跟进人:</span>
  1119. <Select
  1120. showSearch
  1121. style={{ width: 200 }}
  1122. placeholder="请选择跟进人"
  1123. optionFilterProp="children"
  1124. onSelect={(aid) => {
  1125. this.setState({
  1126. aid
  1127. })
  1128. }}
  1129. onSearch={(value) => { this.getAdminList(value) }}
  1130. >
  1131. {
  1132. this.state.adminList.map(v => (
  1133. <Select.Option value={v.value} key={v.value}>{v.label}</Select.Option>
  1134. ))
  1135. }
  1136. </Select>
  1137. </div>
  1138. <Popconfirm placement="top" title="确定要转入此营销管理吗?" onConfirm={(e) => {
  1139. e.stopPropagation();
  1140. this.updateBatch(2);
  1141. }} okText="确定" cancelText="取消">
  1142. <Button
  1143. loading={this.state.updateBatchLoading2}
  1144. type='primary'
  1145. style={{ marginAuto: '0 auto', marginTop: '20px' }}
  1146. >
  1147. 确定
  1148. </Button>
  1149. </Popconfirm>
  1150. </div>
  1151. </Modal> : null}
  1152. </div>
  1153. )
  1154. }
  1155. }
  1156. export default List;