list.jsx 36 KB

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