list.jsx 37 KB

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