|
@@ -1,7 +1,12 @@
|
|
|
import React,{Component} from "react";
|
|
|
-import {Button, message, Spin, Table, Tabs} from "antd";
|
|
|
+import {Button, Form, Input, message, Popconfirm, Select, Spin, Table, Tabs, Upload} from "antd";
|
|
|
import {ChooseList} from "../../order/orderNew/chooseList";
|
|
|
import $ from "jquery/src/ajax";
|
|
|
+import { patentTypeList} from '@/dataDic.js';
|
|
|
+
|
|
|
+import {getPatentType} from "@/tools.js";
|
|
|
+
|
|
|
+import './patent.less';
|
|
|
|
|
|
import PatentDetails from './patentDetails';
|
|
|
|
|
@@ -15,58 +20,75 @@ class List extends Component{
|
|
|
columns:[
|
|
|
{
|
|
|
title: "序号",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "id",
|
|
|
+ key: "id",
|
|
|
},
|
|
|
{
|
|
|
title: "专利名称",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "name",
|
|
|
+ key: "name",
|
|
|
},
|
|
|
{
|
|
|
title: "专利类型",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "type",
|
|
|
+ key: "type",
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ getPatentType(text)
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: "申请日",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "applyDates",
|
|
|
+ key: "applyDates",
|
|
|
},
|
|
|
{
|
|
|
title: "权利人",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "holders",
|
|
|
+ key: "holders",
|
|
|
},
|
|
|
{
|
|
|
title: "发明人",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "inventor",
|
|
|
+ key: "inventor",
|
|
|
},
|
|
|
{
|
|
|
title: "收费截止日",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "",
|
|
|
+ key: "",
|
|
|
},
|
|
|
{
|
|
|
title: "年费状态",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "annualFeeStatus",
|
|
|
+ key: "annualFeeStatus",
|
|
|
+ render: (text)=>{
|
|
|
+ return (
|
|
|
+ text === 0 ? '无信息' :
|
|
|
+ text === 1 ? '代缴费' : ''
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: "营销员是否提醒",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "salesmanRemind",
|
|
|
+ key: "salesmanRemind",
|
|
|
+ render: (text)=>{
|
|
|
+ return(
|
|
|
+ text === 0 ? '未提醒' :
|
|
|
+ text === 1 ? '已提醒' : ''
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: "年费/滞纳金/恢复",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "delayingAmount",
|
|
|
+ key: "delayingAmount",
|
|
|
+ render:(text,record)=>{
|
|
|
+ return(
|
|
|
+ (record.patentAmount || '无') + '/' + (text || '无') + '/' + (record.recoveryAmount || '无')
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: "客户名称",
|
|
@@ -75,13 +97,41 @@ class List extends Component{
|
|
|
},
|
|
|
{
|
|
|
title: "项目名称",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "projectName",
|
|
|
+ key: "projectName",
|
|
|
},
|
|
|
{
|
|
|
title: "项目编号",
|
|
|
- dataIndex: "companyName",
|
|
|
- key: "companyName",
|
|
|
+ dataIndex: "tid",
|
|
|
+ key: "tid",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "营销员",
|
|
|
+ dataIndex: "salesmanName",
|
|
|
+ key: "salesmanName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "咨询师",
|
|
|
+ dataIndex: "techName",
|
|
|
+ key: "techName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "派单部门",
|
|
|
+ dataIndex: "depName",
|
|
|
+ key: "depName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ dataIndex: "id",
|
|
|
+ key: "caozuo",
|
|
|
+ render: (text,record) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Button type="primary" style={{marginRight:"15px"}}>发邮件</Button>
|
|
|
+ <Button type="primary">发通知</Button>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
],
|
|
|
dataSource:[],
|
|
@@ -97,16 +147,71 @@ class List extends Component{
|
|
|
return "共" + total + "条数据";
|
|
|
},
|
|
|
},
|
|
|
- detailsVisible:true,
|
|
|
- detailsInfor:{}
|
|
|
+ detailsVisible:false,
|
|
|
+ detailsInfor:{},
|
|
|
+ departmentArr:[],
|
|
|
+ selectedRowKeys:[],
|
|
|
+
|
|
|
+ name:undefined,
|
|
|
+ type:undefined,
|
|
|
+ depName:undefined,
|
|
|
+ annualFeeStatus:undefined,
|
|
|
+ userName:undefined,
|
|
|
+ salesmanRemind:undefined,
|
|
|
+ aname: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 () {
|
|
|
+ this.loadData();
|
|
|
+ this.setState({
|
|
|
+ upLoadFileLoading: false,
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ name: "file",
|
|
|
+ action: globalConfig.context + "/api/admin/patentNew/import",
|
|
|
+ }
|
|
|
}
|
|
|
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);
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
this.loadData();
|
|
|
+ this.departmentList();
|
|
|
}
|
|
|
|
|
|
changeList(arr) {
|
|
@@ -126,16 +231,28 @@ class List extends Component{
|
|
|
loadData(pageNo) {
|
|
|
this.setState({
|
|
|
loading: true,
|
|
|
+ selectedRowKeys:[],
|
|
|
});
|
|
|
+ let data = {
|
|
|
+ name:this.state.name,
|
|
|
+ type:this.state.type,
|
|
|
+ depName:this.state.depName,
|
|
|
+ annualFeeStatus:this.state.annualFeeStatus,
|
|
|
+ userName:this.state.userName,
|
|
|
+ salesmanRemind:this.state.salesmanRemind,
|
|
|
+ aname:this.state.aname,
|
|
|
+ pageNo:pageNo || 1,
|
|
|
+ pageSize:10,
|
|
|
+ }
|
|
|
+ for(let i in data){
|
|
|
+ if(data[i] === undefined){delete data[i]}
|
|
|
+ }
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/company/selectPaymentList",
|
|
|
- data: {
|
|
|
- pageNo:pageNo || 1,
|
|
|
- pageSize:10,
|
|
|
- },
|
|
|
+ url: globalConfig.context + "/api/admin/patentNew/selectPatentNew",
|
|
|
+ data,
|
|
|
success: function (data) {
|
|
|
if(data.error.length === 0){
|
|
|
this.state.pagination.current = data.data.pageNo;
|
|
@@ -169,6 +286,91 @@ class List extends Component{
|
|
|
"sign=user_channel";
|
|
|
}
|
|
|
|
|
|
+ downloadFile() {
|
|
|
+ window.location.href =
|
|
|
+ globalConfig.context +
|
|
|
+ "/api/admin/patentNewexportTemplate?" +
|
|
|
+ "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(){
|
|
|
+ let loading = message.loading('加载中...');
|
|
|
+ let data = {
|
|
|
+ name:this.state.name,
|
|
|
+ type:this.state.type,
|
|
|
+ depName:this.state.depName,
|
|
|
+ annualFeeStatus:this.state.annualFeeStatus,
|
|
|
+ userName:this.state.userName,
|
|
|
+ salesmanRemind:this.state.salesmanRemind,
|
|
|
+ aname:this.state.aname,
|
|
|
+ }
|
|
|
+ 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) {
|
|
|
+ if(data.error.length === 0){
|
|
|
+ loading();
|
|
|
+ this.download(data.data.data);
|
|
|
+ }else{
|
|
|
+ loading();
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ }.bind(this));
|
|
|
+ }
|
|
|
+
|
|
|
+ download(fileName){
|
|
|
+ window.location.href = globalConfig.context + "/open/download?fileName=" + fileName
|
|
|
+ }
|
|
|
+
|
|
|
+ onReset(){
|
|
|
+ this.setState({
|
|
|
+ name:undefined,
|
|
|
+ type:undefined,
|
|
|
+ depName:undefined,
|
|
|
+ annualFeeStatus:undefined,
|
|
|
+ userName:undefined,
|
|
|
+ salesmanRemind:undefined,
|
|
|
+ aname:undefined,
|
|
|
+ },()=>{this.loadData();})
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
return (
|
|
|
<div className="user-content">
|
|
@@ -177,30 +379,111 @@ class List extends Component{
|
|
|
</div>
|
|
|
<Tabs defaultActiveKey="1" className="test">
|
|
|
<TabPane tab="搜索" key="1">
|
|
|
- <div style={{paddingTop:'10px'}}>
|
|
|
-
|
|
|
+ <div style={{padding:'10px'}}>
|
|
|
+ <Form
|
|
|
+ layout="inline"
|
|
|
+ name="basic"
|
|
|
+ >
|
|
|
+ <div style={{display:'flex',alignItems:'center'}}>
|
|
|
+ <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.aname} onChange={(e)=>{this.setState({aname: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>
|
|
|
+ <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>
|
|
|
+ <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.name} value={item.name}>{item.name}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ </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">
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- onClick={this.exportExec}
|
|
|
- style={{ margin: "11px 0px 10px 10px" }}
|
|
|
- >
|
|
|
- 标识为已通知
|
|
|
- </Button>
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- onClick={this.exportExec}
|
|
|
- style={{ margin: "11px 0px 10px 10px" }}
|
|
|
- >
|
|
|
- 批量导入
|
|
|
- </Button>
|
|
|
+ <Popconfirm placement="top" title="确定要标识为已通知吗?" onConfirm={(e)=>{
|
|
|
+ e.stopPropagation();
|
|
|
+
|
|
|
+ }} okText="确定" cancelText="取消">
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ disabled={this.state.selectedRowKeys.length === 0}
|
|
|
+ >
|
|
|
+ 标识为已通知
|
|
|
+ </Button>
|
|
|
+ </Popconfirm>
|
|
|
+ <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"
|
|
|
onClick={(e) => {
|
|
|
e.stopPropagation();
|
|
|
- this.download();
|
|
|
+ this.downloadFile();
|
|
|
}}
|
|
|
style={{ margin: "11px 0px 10px 10px" }}
|
|
|
>
|