list.jsx 46 KB

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