123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122 |
- import React,{Component} from "react";
- import {
- Button,
- Form,
- Input,
- message,
- Modal,
- Popconfirm,
- Select,
- Spin,
- Table,
- Tabs,
- Upload,
- Tooltip, DatePicker
- } from "antd";
- import {ChooseList} from "../../order/orderNew/chooseList";
- import $ from "jquery/src/ajax";
- import { patentTypeList} from '@/dataDic.js';
- import {getPatentType,ShowModal} from "@/tools.js";
- import ShowModalDiv from "@/showModal.jsx";
- import './patent.less';
- import PatentDetails from './patentDetails';
- import ReminderLog from "../../customer/NEW/crm/reminderLog";
- import moment from "moment";
- const { TabPane } = Tabs;
- const { RangePicker } = DatePicker;
- class List extends Component{
- constructor(props) {
- super(props);
- this.state={
- loading:false,
- columns:[
- {
- title: "序号",
- dataIndex: "id",
- key: "id",
- width:80,
- fixed: 'left'
- },
- {
- title: "专利号",
- dataIndex: "patentNo",
- key: "patentNo",
- width:140,
- fixed: 'left'
- },
- {
- title: "专利名称",
- dataIndex: "name",
- key: "name",
- width:140,
- fixed: 'left'
- },
- {
- title: "专利类型",
- dataIndex: "type",
- key: "type",
- render: (text) => {
- return (
- getPatentType(text)
- )
- }
- },
- {
- title: "申请日",
- dataIndex: "applyDates",
- key: "applyDates",
- },
- {
- title: "权利人",
- dataIndex: "holders",
- key: "holders",
- width: 120,
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div style={{
- maxWidth:'120px',
- overflow:'hidden',
- textOverflow: "ellipsis",
- whiteSpace:'nowrap',
- }}>{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "授权日期",
- dataIndex: "authorizationDates",
- key: "authorizationDates",
- },
- {
- title: "发明人",
- dataIndex: "inventor",
- key: "inventor",
- width: 120,
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div style={{
- maxWidth:'120px',
- overflow:'hidden',
- textOverflow: "ellipsis",
- whiteSpace:'nowrap',
- }}>{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "收费截止日",
- dataIndex: "endDates",
- key: "endDates",
- },
- {
- title: "费减状态",
- dataIndex: "costReduction",
- key: "costReduction",
- render: (text,record) => {
- return (
- record.tid ? (text === 1 ? '有费减' : text === 0 ? '无费减' : '') : '无'
- )
- }
- },
- {
- title: "年费状态",
- dataIndex: "annualFeeStatus",
- key: "annualFeeStatus",
- render: (text)=>{
- return (
- <span style={{
- color: text === 0 ? '#f00' : text === 1 ? '#25e027' : ''
- }}>
- {
- text === 0 ? '待缴费' :
- text === 1 ? '已缴费' : ''
- }
- </span>
- )
- }
- },
- {
- title: "营销员是否提醒",
- dataIndex: "salesmanRemind",
- key: "salesmanRemind",
- render: (text)=>{
- return(
- <span style={{
- color: text === 0 ? '#f00' : text === 1 ? '#25e027' : ''
- }}>
- {
- text === 0 ? '未通知' :
- text === 1 ? '已通知' : ''
- }
- </span>
- )
- }
- },
- {
- title: "Email",
- dataIndex: "email",
- key: "email",
- },
- {
- title: "年费/滞纳金/恢复",
- dataIndex: "delayingAmount",
- key: "delayingAmount",
- render:(text,record)=>{
- return(
- record.patentAmount+ '/' + text + '/' + record.recoveryAmount
- )
- }
- },
- {
- title: "客户名称",
- dataIndex: "userName",
- key: "userName",
- },
- {
- title: "项目名称",
- dataIndex: "projectName",
- key: "projectName",
- },
- {
- title: "项目编号",
- dataIndex: "tid",
- key: "tid",
- },
- {
- title: "营销员",
- dataIndex: "salesmanName",
- key: "salesmanName",
- },
- {
- title: "咨询师",
- dataIndex: "techName",
- key: "techName",
- },
- {
- title: "派单部门",
- dataIndex: "depName",
- key: "depName",
- },
- {
- title: "录入人",
- dataIndex: "inputName",
- key: "inputName",
- width: 120,
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div style={{
- maxWidth:'120px',
- overflow:'hidden',
- textOverflow: "ellipsis",
- whiteSpace:'nowrap',
- }}>{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "录入时间",
- dataIndex: "createTimes",
- key: "createTimes",
- },
- {
- title: "跟进人",
- dataIndex: "aname",
- key: "aname",
- width: 120,
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div style={{
- maxWidth:'120px',
- overflow:'hidden',
- textOverflow: "ellipsis",
- whiteSpace:'nowrap',
- }}>{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "操作",
- dataIndex: "id",
- key: "caozuo",
- width:200,
- fixed: 'right',
- render: (text,record) => {
- return (
- <div>
- <Button disabled={record.isFollow === 0} type="primary" onClick={(e)=>{
- e.stopPropagation();
- this.setState({
- detailsVisible:true,
- detailsInfor:record,
- readOnly:false
- })
- }}>修改</Button>
- <Button style={{marginLeft:'10px'}} type="primary" onClick={(e)=>{
- e.stopPropagation();
- this.setState({
- visible:true,
- id:text
- })
- }}>专利日志</Button>
- </div>
- )
- }
- },
- ],
- dataSource:[],
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page,this.state.searchInfor);
- }.bind(this),
- showTotal: function (total) {
- return "共" + total + "条数据";
- },
- },
- detailsVisible:false,
- detailsInfor:{},
- departmentArr:[],
- selectedRowKeys:[],
- selectedRows:[],
- unSelectedRows:[],
- name:undefined,
- type:undefined,
- depName:undefined,
- inputDep:undefined,
- followDep:undefined,
- releaseDate:[],
- releaseDate1:[],
- annualFeeStatus:undefined,
- userName:undefined,
- salesmanRemind:undefined,
- isFollow:1,
- aname:undefined,
- patentNo:undefined,
- upLoad: {
- customRequest: (options) => {
- this.setState({
- upLoadFileLoading: true,
- })
- let params = new FormData();
- params.append("file", options.file);
- $.ajax({
- method: "post",
- url: globalConfig.context + "/api/admin/patentNew/import",
- async: true,
- cache: false,
- contentType: false,
- processData: false,
- data:params
- }).done(
- function (data) {
- this.setState({
- upLoadFileLoading: false,
- })
- if (data.error.length === 0) {
- message.success("导入成功!");
- this.loadData();
- } else {
- message.warning(data.error[0].message);
- this.loadData();
- }
- }.bind(this)
- ).always(
- function (err) {
- if(err.status === 404){
- message.warning('表格数据错误');
- }
- this.loadData();
- this.setState({
- upLoadFileLoading: false,
- });
- }.bind(this)
- );
- },
- name: "file",
- action: globalConfig.context + "/api/admin/patentNew/import",
- },
- adminList:[],
- status:props.status,
- aid:'',
- }
- this.changeList = this.changeList.bind(this);
- this.loadData = this.loadData.bind(this);
- this.download = this.download.bind(this);
- this.departmentList = this.departmentList.bind(this);
- this.exportExec = this.exportExec.bind(this);
- this.onReset = this.onReset.bind(this);
- this.updateBatch = this.updateBatch.bind(this);
- this.getAdminList = this.getAdminList.bind(this);
- this.downloadFile = this.downloadFile.bind(this);
- }
- componentWillReceiveProps(prevProps) {
- if(prevProps.status !== this.state.status){
- this.setState({
- status:prevProps.status
- },()=>{
- this.setState({
- name:undefined,
- type:undefined,
- depName:undefined,
- inputDep:undefined,
- followDep:undefined,
- releaseDate:[],
- releaseDate1:[],
- annualFeeStatus:undefined,
- userName:undefined,
- salesmanRemind:undefined,
- isFollow:1,
- aname:undefined,
- patentNo:undefined,
- },()=>{this.loadData();})
- this.departmentList();
- })
- }
- }
- componentDidMount() {
- this.loadData();
- this.departmentList();
- }
- changeList(arr) {
- const newArr = [];
- this.state.columns.forEach(item => {
- arr.forEach(val => {
- if (val === item.title) {
- newArr.push(item);
- }
- });
- });
- this.setState({
- changeList: newArr
- });
- }
- loadData(pageNo) {
- this.setState({
- loading: true,
- selectedRowKeys:[],
- selectedRows:[]
- });
- let data = {
- name:this.state.name,
- type:this.state.type,
- depName:this.state.depName,
- inputDep:this.state.inputDep,
- followDep:this.state.followDep,
- createStarts:this.state.releaseDate[0] || undefined,
- createEnds:this.state.releaseDate[1] || undefined,
- startDates:this.state.releaseDate1[0] || undefined,
- endDates:this.state.releaseDate1[1] || undefined,
- annualFeeStatus:this.state.annualFeeStatus,
- userName:this.state.userName,
- salesmanRemind:this.state.salesmanRemind,
- isFollow:this.state.isFollow,
- aname:this.state.aname,
- patentNo:this.state.patentNo,
- pageNo:pageNo || 1,
- pageSize:10,
- }
- if(this.state.status){
- data.status=this.state.status;
- data.isFollow = 1 ;
- }
- for(let i in data){
- if(data[i] === undefined){delete data[i]}
- }
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/patentNew/selectPatentNew",
- data,
- success: function (data) {
- ShowModal(this);
- if(data.error.length === 0){
- this.state.pagination.current = data.data.pageNo;
- this.state.pagination.total = data.data.totalCount;
- if (data.data && data.data.list && !data.data.list.length) {
- this.state.pagination.current = 0;
- this.state.pagination.total = 0;
- }
- data.data.list.map(v=>v.key = v.id)
- this.setState({
- page: data.data.pageNo,
- dataSource: data.data.list,
- pagination: this.state.pagination,
- });
- }else{
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- }
- download() {
- window.location.href =
- globalConfig.context +
- "/api/user/channel/downloadTemplate?" +
- "sign=user_channel";
- }
- downloadFile() {
- this.setState({
- downloadFileLoading:true
- })
- setTimeout(()=>{
- this.setState({
- downloadFileLoading:false
- })
- },1500)
- window.location.href =
- globalConfig.context +
- "/api/admin/patentNew/exportTemplate?" +
- "sign=new_patent_template";
- }
- //部门
- departmentList() {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/organization/selectSuperId",
- data: {},
- success: function(data) {
- if(data.error.length === 0){
- let theArr=[];
- data.data.map(function(item,index){
- theArr.push({
- key:index,
- name:item.name,
- id:item.id,
- })
- })
- this.setState({
- departmentArr:theArr,
- })
- }else{
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(function() {
- }.bind(this));
- }
- exportExec(){
- this.setState({
- exportExecLoading: true
- })
- let loading = message.loading('加载中...');
- let data = {
- name:this.state.name,
- type:this.state.type,
- depName:this.state.depName,
- inputDep:this.state.inputDep,
- followDep:this.state.followDep,
- createStarts:this.state.releaseDate[0] || undefined,
- createEnds:this.state.releaseDate[1] || undefined,
- startDates:this.state.releaseDate1[0] || undefined,
- endDates:this.state.releaseDate1[1] || undefined,
- annualFeeStatus:this.state.annualFeeStatus,
- userName:this.state.userName,
- salesmanRemind:this.state.salesmanRemind,
- isFollow:this.state.isFollow,
- aname:this.state.aname,
- patentNo:this.state.patentNo,
- }
- for(let i in data){
- if(data[i] === undefined){delete data[i]}
- }
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/patentNew/export",
- data,
- success: function(data) {
- loading();
- this.setState({
- exportExecLoading: false
- })
- if(data.error.length === 0){
- this.download(data.data.data);
- }else{
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(function() {
- this.setState({
- exportExecLoading: false
- })
- }.bind(this));
- }
- download(fileName){
- window.location.href = globalConfig.context + "/open/download?fileName=" + fileName
- }
- //获取营销管理员列表
- getAdminList(name) {
- this.setState({
- adminListLoading:true
- })
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/superviser/adminList",
- data: {
- pageNo: 1,
- pageSize: 99,
- name
- },
- success: function (data) {
- let thedata = data.data.list;
- let theArr = [];
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }else{
- thedata.map(function (item, _) {
- theArr.push({
- value: item.id,
- label: item.name,
- });
- });
- }
- this.setState({
- adminList: theArr,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- adminListLoading:false
- })
- }.bind(this)
- );
- }
- onReset(){
- this.setState({
- name:undefined,
- type:undefined,
- depName:undefined,
- inputDep:undefined,
- followDep:undefined,
- releaseDate:[],
- releaseDate1:[],
- annualFeeStatus:undefined,
- userName:undefined,
- salesmanRemind:undefined,
- isFollow:1,
- aname:undefined,
- patentNo:undefined,
- },()=>{this.loadData();})
- }
- updateBatch(type){
- if(type === 2 && !this.state.aid){
- message.warning('请选择营销管理员');
- return;
- }
- let loading = message.loading('加载中...')
- if(type === 0){
- this.setState({
- updateBatchLoading0:true,
- })
- }else if(type === 1){
- this.setState({
- updateBatchLoading1:true,
- })
- }else if(type === 2){
- this.setState({
- updateBatchLoading2:true,
- })
- }
- let ids = this.state.selectedRowKeys.join(',');
- let data = {
- ids,
- type,//0 批量通知 1批量发邮件 2转给营销管理员
- }
- if(type === 2){
- data.aid = this.state.aid
- }
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/patentNew/updateBatch",
- data,
- success: function(data) {
- loading();
- if(data.error.length === 0){
- message.success(type === 0 ? '成功批量标记为已通知' : type === 1 ? '批量发邮件成功' : type === 2 ? '转入成功' : '');
- if(type === 2){
- this.setState({
- adminVisible:false
- })
- }
- this.loadData(this.state.page);
- }else{
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(function() {
- if(type === 0){
- this.setState({
- updateBatchLoading0:false,
- })
- }else if(type === 1){
- this.setState({
- updateBatchLoading1:false,
- })
- }else if(type === 2){
- this.setState({
- updateBatchLoading2:false,
- })
- }
- }.bind(this));
- }
- render() {
- return (
- <div className="user-content patentList">
- <ShowModalDiv ShowModal={this.state.showModal} />
- <div className="content-title">
- <span>专利列表</span>
- </div>
- <Tabs defaultActiveKey="1" className="test">
- <TabPane tab="搜索" key="1">
- <div style={{padding:'10px'}}>
- <Form
- layout="inline"
- name="basic"
- >
- <div style={{display:'flex',alignItems:'center',flexFlow:'wrap'}}>
- <Form.Item>
- <Input style={{ width: '130px' }} value={this.state.patentNo} onChange={(e)=>{this.setState({patentNo:e.target.value})}} placeholder="请输入专利号"/>
- </Form.Item>
- <Form.Item>
- <Input style={{ width: '130px' }} value={this.state.name} onChange={(e)=>{this.setState({name:e.target.value})}} placeholder="请输入专利名称"/>
- </Form.Item>
- <Form.Item>
- <Input style={{ width: '130px' }} value={this.state.userName} onChange={(e)=>{this.setState({userName:e.target.value})}} placeholder="请输入客户名称"/>
- </Form.Item>
- <Form.Item>
- <Input style={{ width: '130px' }} value={this.state.aname} onChange={(e)=>{this.setState({aname:e.target.value})}} placeholder="请输入跟进人名称"/>
- </Form.Item>
- <Form.Item>
- <Select
- placeholder="请选择专利类型"
- style={{ width: "140px" }}
- value={this.state.type}
- onSelect={(e)=>{
- this.setState({
- type:e
- })
- }}
- >
- {patentTypeList.map(function(item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </Form.Item>
- <Form.Item>
- <Select placeholder="请选择是否代缴费" onSelect={(e)=>{
- this.setState({
- annualFeeStatus:e
- })
- }} value={this.state.annualFeeStatus} style={{ width: "140px" }}>
- <Select.Option value={0} >未代缴</Select.Option>
- <Select.Option value={1} >已代缴</Select.Option>
- </Select>
- </Form.Item>
- <Form.Item>
- <Select placeholder="请选择是否通知" value={this.state.salesmanRemind} onSelect={(e)=>{
- this.setState({
- salesmanRemind:e
- })
- }} style={{ width: "140px" }}>
- <Select.Option value={0} >未通知</Select.Option>
- <Select.Option value={1} >已通知</Select.Option>
- </Select>
- </Form.Item>
- {!this.state.status ? <Form.Item>
- <Select placeholder="请选择关系" value={this.state.isFollow} onSelect={(e)=>{
- this.setState({
- isFollow:e
- })
- }} style={{ width: "140px" }}>
- <Select.Option value={0} >我录入</Select.Option>
- <Select.Option value={1} >我跟进</Select.Option>
- </Select>
- </Form.Item> : null}
- <Form.Item>
- <Select placeholder="请选择派单部门" value={this.state.depName} onSelect={e=>{this.setState({depName:e})}} style={{ width: "240px" }}>
- {
- this.state.departmentArr.map(function (item) {
- return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
- })
- }
- </Select>
- </Form.Item>
- <Form.Item>
- <Select placeholder="请选择录入部门" value={this.state.inputDep} onSelect={e=>{this.setState({inputDep:e})}} style={{ width: "240px" }}>
- {
- this.state.departmentArr.map(function (item) {
- return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
- })
- }
- </Select>
- </Form.Item>
- <Form.Item>
- <Select placeholder="请选择跟进部门" value={this.state.followDep} onSelect={e=>{this.setState({followDep:e})}} style={{ width: "240px" }}>
- {
- this.state.departmentArr.map(function (item) {
- return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
- })
- }
- </Select>
- </Form.Item>
- <Form.Item>
- <div style={{display:'flex',alignItems:'center'}}>
- <div style={{marginRight:'10px'}}>录入时间:</div>
- <RangePicker
- style={{ marginRight:'10px' }}
- value={[
- this.state.releaseDate[0]
- ? moment(this.state.releaseDate[0])
- : null,
- this.state.releaseDate[1]
- ? moment(this.state.releaseDate[1])
- : null,
- ]}
- onChange={(data, dataString) => {
- this.setState({ releaseDate: dataString });
- }}
- />
- </div>
- </Form.Item>
- <Form.Item>
- <div style={{display:'flex',alignItems:'center'}}>
- <span style={{marginRight:'10px'}}>申请时间:</span>
- <RangePicker
- style={{ marginRight:'10px'}}
- value={[
- this.state.releaseDate1[0]
- ? moment(this.state.releaseDate1[0])
- : null,
- this.state.releaseDate1[1]
- ? moment(this.state.releaseDate1[1])
- : null,
- ]}
- onChange={(data, dataString) => {
- this.setState({ releaseDate1: dataString });
- }}
- />
- </div>
- </Form.Item>
- <Form.Item>
- <Button type="primary" onClick={()=>{this.loadData();}}>
- 搜索
- </Button>
- </Form.Item>
- <Form.Item>
- <Button onClick={this.onReset}>
- 重置
- </Button>
- </Form.Item>
- </div>
- </Form>
- </div>
- </TabPane>
- <TabPane tab="操作" key="2">
- <Popconfirm placement="top" title="确定要标识为已通知吗?" onConfirm={(e)=>{
- e.stopPropagation();
- this.updateBatch(0);
- }} okText="确定" cancelText="取消">
- <Button
- loading={this.state.updateBatchLoading0}
- type="primary"
- style={{ margin: "11px 0px 10px 10px" }}
- disabled={this.state.selectedRowKeys.length === 0}
- >
- 标识为已通知
- </Button>
- </Popconfirm>
- <Popconfirm placement="top" title="确定要批量发邮件吗?" onConfirm={(e)=>{
- e.stopPropagation();
- let arr = this.state.selectedRows.filter(v=>v.status === 0);
- if(arr.length > 0){
- this.setState({
- unSelectedRows: arr,
- unSelectedRowsVisible:true
- })
- }else{
- this.updateBatch(1)
- }
- }} okText="确定" cancelText="取消">
- <Button
- loading={this.state.updateBatchLoading1}
- type="primary"
- style={{ margin: "11px 0px 10px 10px" }}
- disabled={this.state.selectedRowKeys.length === 0}
- >
- 批量发邮件
- </Button>
- </Popconfirm>
- <Button
- loading={this.state.updateBatchLoading2}
- type="primary"
- style={{ margin: "11px 0px 10px 10px" }}
- disabled={this.state.selectedRowKeys.length === 0}
- onClick={()=>{
- this.setState({
- adminVisible:true,
- adminList:[],
- })
- }}
- >
- 转交专利
- </Button>
- <Upload {...this.state.upLoad} disabled={this.state.upLoadFileLoading}>
- <Button
- loading={this.state.upLoadFileLoading}
- type="primary"
- style={{ marginRight: "10px",marginLeft:'20px' }}
- >
- 批量导入
- </Button>
- </Upload>
- <Button
- type="primary"
- loading={this.state.downloadFileLoading}
- onClick={(e) => {
- e.stopPropagation();
- this.downloadFile();
- }}
- style={{ margin: "11px 0px 10px 10px" }}
- >
- 下载专利模板
- </Button>
- <Button
- type="primary"
- style={{ margin: "11px 0px 10px 10px" }}
- loading={this.state.exportExecLoading}
- onClick={()=>{
- this.exportExec();
- }}
- >
- 导出Excel
- </Button>
- </TabPane>
- <TabPane tab="更改表格显示数据" key="3">
- <div style={{ marginLeft: 10 }}>
- <ChooseList
- columns={this.state.columns}
- changeFn={this.changeList}
- changeList={this.state.changeList}
- top={55}
- margin={11}
- />
- </div>
- </TabPane>
- </Tabs>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table
- columns={
- this.state.changeList
- ? this.state.changeList
- : this.state.columns
- }
- dataSource={this.state.dataSource}
- pagination={this.state.pagination}
- style={{
- cursor: 'pointer',
- }}
- onRowClick={(record)=>{
- this.setState({
- detailsVisible:true,
- readOnly:true,
- detailsInfor:record
- })
- }}
- rowSelection={{
- getCheckboxProps:record => ({
- disabled: record.isFollow === 0
- }),
- selectedRowKeys:this.state.selectedRowKeys,
- onChange: (selectedRowKeys,selectedRows)=>{
- this.setState({ selectedRowKeys,selectedRows });
- },
- }}
- scroll={{ x: "max-content", y: 0 }}
- bordered
- size="small"
- />
- </Spin>
- </div>
- {this.state.detailsVisible ? <PatentDetails
- readOnly={this.state.readOnly}
- visible={this.state.detailsVisible}
- detailsInfor={this.state.detailsInfor}
- onRefresh={()=>{
- this.loadData(this.state.page);
- }}
- onCancel={()=>{
- this.setState({
- readOnly:true,
- detailsVisible:false,
- detailsInfor:{}
- })
- }}
- /> : null}
- {this.state.visible ? <ReminderLog
- id={this.state.id}
- visible={this.state.visible}
- cancel={()=>{
- this.setState({
- visible:false,
- id:undefined
- })
- }}
- /> : null}
- {this.state.unSelectedRowsVisible ? <Modal
- title='提醒'
- className='payRecordComponent'
- width={500}
- maskClosable={false}
- footer={null}
- visible={this.state.unSelectedRowsVisible}
- onCancel={()=>{
- this.setState({
- unSelectedRowsVisible:false,
- unSelectedRows:[]
- })
- }}
- >
- <div style={{paddingBottom:'15px'}}>下列专利,不在专利需缴费的90天提醒之内,不可发送邮件</div>
- <Table
- columns={[
- {
- title: "专利号",
- dataIndex: "patentNo",
- key: "patentNo",
- },
- {
- title: "专利名称",
- dataIndex: "name",
- key: "name",
- },
- ]}
- dataSource={this.state.unSelectedRows}
- pagination={false}
- scroll={{ x: "max-content", y: 0 }}
- bordered
- size="small"
- />
- <div style={{display:'flex',justifyContent:'center',paddingTop:'20px'}}>
- <Button type="primary" onClick={()=>{
- this.setState({
- unSelectedRowsVisible:false,
- unSelectedRows:[]
- })
- }}>关闭</Button>
- </div>
- </Modal> : null}
- {this.state.adminVisible ? <Modal
- title='请选择需转交的跟进人'
- className='payRecordComponent'
- width={300}
- maskClosable={false}
- footer={null}
- visible={this.state.adminVisible}
- onCancel={()=>{
- this.setState({
- adminVisible:false
- })
- }}
- >
- <div style={{display:'flex',flexFlow:"column",justifyContent:'center',alignItems:'center'}}>
- <div style={{display:'flex',alignItems:'center'}}>
- <span style={{paddingRight:'15px'}}>跟进人:</span>
- <Select
- showSearch
- style={{ width: 200 }}
- placeholder="请选择跟进人"
- optionFilterProp="children"
- onSelect={(aid)=>{
- this.setState({
- aid
- })
- }}
- onSearch={(value) => {this.getAdminList(value)}}
- >
- {
- this.state.adminList.map(v=>(
- <Select.Option value={v.value} key={v.value}>{v.label}</Select.Option>
- ))
- }
- </Select>
- </div>
- <Popconfirm placement="top" title="确定要转入此营销管理吗?" onConfirm={(e)=>{
- e.stopPropagation();
- this.updateBatch(2);
- }} okText="确定" cancelText="取消">
- <Button
- loading={this.state.updateBatchLoading2}
- type='primary'
- style={{marginAuto:'0 auto',marginTop:'20px'}}
- >
- 确定
- </Button>
- </Popconfirm>
- </div>
- </Modal> : null}
- </div>
- )
- }
- }
- export default List;
|