list.jsx 41 KB

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