HW il y a 3 ans
Parent
commit
b6ac273a7a

+ 2 - 2
js/component/common/patentCheck/index.jsx

@@ -114,12 +114,12 @@ class PatentCheck extends Component{
                               '有官费' : '不含官费'
                       }
                     </span>
-                    <span style={{color:'#4472f5'}}>
+                    {this.props.patentTypeId === 0 || this.props.patentTypeId === 2 ? <span style={{color:'#4472f5'}}>
                       {
                           this.props.orderTaskCostReduction === 1?
                               '有费减' : '无费减'
                       }
-                    </span>
+                    </span> : null}
                 </div>
                 {this.props.patentType === 0 ? <div style={{display:'flex',alignItems:'center'}}>
                     {/*checkStatus  核对状态  0未发起 1核对中 2核对完成 3已申请付款*/}

+ 5 - 3
js/component/common/projectOperation/index.jsx

@@ -283,6 +283,7 @@ class ProjectOperation extends Component{
                 displayFees: "none",
             });
         }
+        console.log(value.indexOf("贯标"),'value.indexOf("贯标")')
         //0通用 1专利 2软著 3审计 4双软 5高新 6商标
         this.setState({
             commodityName: value,
@@ -469,6 +470,7 @@ class ProjectOperation extends Component{
                                 label="实签价格(万元)"
                             >
                                 {readOnly ? this.state.commodityPrice : <Input
+                                    type='number'
                                     placeholder="请输入实签价格"
                                     value={this.state.commodityPrice}
                                     style={{ width: "200px" }}
@@ -557,7 +559,7 @@ class ProjectOperation extends Component{
                                 </div>: null
                             }
                             {
-                                this.props.isIso?<div className="clearfix">
+                                this.props.isIso || this.state.isIso?<div className="clearfix">
                                     <FormItem
                                         className="half-item"
                                         {...formItemLayout}
@@ -574,10 +576,10 @@ class ProjectOperation extends Component{
                                                 this.setState({ ifCertificationFee: e });
                                             }}
                                         >
-                                            <Select.Option value={'0'}>
+                                            <Select.Option value={0}>
                                             </Select.Option>
-                                            <Select.Option value={'1'}>
+                                            <Select.Option value={1}>
                                             </Select.Option>
                                         </Select>}

+ 4 - 14
js/component/dataDic.js

@@ -3932,34 +3932,24 @@ module.exports = {
     },
     {
       value: "2",
-      key: "已触发剩余30天提醒",
+      key: "已触发剩余60天提醒",
       color:'#5084d2'
     },
     {
       value: "3",
-      key: "已触发剩余20天提醒",
+      key: "已触发剩余30天提醒",
       color:'#665107'
     },
     {
       value: "4",
-      key: "已触发剩余10天提醒",
+      key: "已触发剩余15天提醒",
       color:'#2d7d59'
     },
     {
       value: "5",
-      key: "已触发剩余3天提醒",
+      key: "已触发剩余7天提醒",
       color:'#b300ff'
     },
-    {
-      value: "6",
-      key: "已触发剩余2天提醒",
-      color:'#ff5500'
-    },
-    {
-      value: "7",
-      key: "已触发剩余1天提醒",
-      color:'#f00'
-    },
   ],
   //详情申请状态
   clockState : [

+ 1 - 0
js/component/manageCenter/components/checkProject/index.jsx

@@ -1001,6 +1001,7 @@ class CheckProject extends Component {
                                   isAuditPayment={this.props.isAuditPayment}
                                   isAuditPaymentGLY={this.props.isAuditPaymentGLY}
                                   patentTypeName={this.props.patentTypeName}
+                                  patentTypeId={this.props.patentTypeId}
                                   checkStatus={this.props.checkStatus}  //核对状态
                                   projectType={this.props.projectType}  //项目类型
                                   patentType={this.props.patentType}   //专利类型

+ 2 - 0
js/component/manageCenter/order/orderNew/costAuditList/detailsModal/index.js

@@ -276,6 +276,7 @@ class DetailsModal extends Component{
                         checkStatus:thisdata.checkStatus,//核对状态
                         commodityQuantity:thisdata.commodityQuantity,//项目数量
                         patentTypeName:thisdata.patentTypeName,//官费类型名称
+                        patentTypeId: thisdata.patentType,//官费专利类型
                         sort: thisdata.sort,
                     })
 
@@ -368,6 +369,7 @@ class DetailsModal extends Component{
                             tid={this.props.tid}
                             sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
+                            patentTypeId={this.state.patentTypeId}
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态
                             orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有

+ 2 - 0
js/component/manageCenter/order/orderNew/glCostAuditList/detailsModal/index.js

@@ -276,6 +276,7 @@ class DetailsModal extends Component{
                         checkStatus:thisdata.checkStatus,//核对状态
                         commodityQuantity:thisdata.commodityQuantity,//项目数量
                         patentTypeName:thisdata.patentTypeName,//官费类型名称
+                        patentTypeId: thisdata.patentType,//官费专利类型
                     })
                 }
             }.bind(this),
@@ -365,6 +366,7 @@ class DetailsModal extends Component{
                             tid={this.props.tid}
                             sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
+                            patentTypeId={this.state.patentTypeId}
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态
                             orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有

+ 2 - 0
js/component/manageCenter/order/orderNew/outsourcingPro.jsx

@@ -635,6 +635,7 @@ const outsourcingPro = Form.create()(
               checkStatus:thisdata.checkStatus,//核对状态
               commodityQuantity:thisdata.commodityQuantity,//项目数量
               patentTypeName:thisdata.patentTypeName,//官费类型名称
+              patentTypeId: thisdata.patentType,//官费专利类型
             })
           }
         }.bind(this),
@@ -1549,6 +1550,7 @@ const outsourcingPro = Form.create()(
                         tid={this.state.tid}
                         sort={this.state.sort}
                         patentTypeName={this.state.patentTypeName}                  //官费类型
+                        patentTypeId={this.state.patentTypeId}
                         commodityQuantity={this.state.commodityQuantity}            //项目数量
                         checkStatus={this.state.checkStatus}                        //核对状态
                         orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有

+ 50 - 0
js/component/manageCenter/project/content.jsx

@@ -146,6 +146,56 @@ class Content extends Component {
                     });
                 });
                 break;
+            //7天内提醒缴费专利列表
+            case "patentSevenList":
+                require.ensure([], () => {
+                    const PatentList = require("./patent/list")
+                        .default;
+                    this.setState({
+                        component: <PatentList status={5}/>
+                    });
+                });
+                break;
+            //15天内提醒缴费专利列表
+            case "patentFifteenList":
+                require.ensure([], () => {
+                    const PatentList = require("./patent/list")
+                        .default;
+                    this.setState({
+                        component: <PatentList status={4}/>
+                    });
+                });
+                break;
+            //30天内提醒缴费专利列表
+            case "patentThirtyList":
+                require.ensure([], () => {
+                    const PatentList = require("./patent/list")
+                        .default;
+                    this.setState({
+                        component: <PatentList status={3}/>
+                    });
+                });
+                break;
+            //60天内提醒缴费专利列表
+            case "patentSixtyList":
+                require.ensure([], () => {
+                    const PatentList = require("./patent/list")
+                        .default;
+                    this.setState({
+                        component: <PatentList status={2}/>
+                    });
+                });
+                break;
+            //90天内提醒缴费专利列表
+            case "patentNinetyList":
+                require.ensure([], () => {
+                    const PatentList = require("./patent/list")
+                        .default;
+                    this.setState({
+                        component: <PatentList status={1}/>
+                    });
+                });
+                break;
         //专利成本审核列表(专利管理员查看)
         case "patentCostList":
             require.ensure([], () => {

+ 376 - 17
js/component/manageCenter/project/patent/list.jsx

@@ -1,5 +1,5 @@
 import React,{Component} from "react";
-import {Button, Form, Input, message, Popconfirm, Select, Spin, Table, Tabs, Upload} from "antd";
+import {Button, Form, Input, message, Modal, Popconfirm, Select, Spin, Table, Tabs, Upload,AutoComplete} from "antd";
 import {ChooseList} from "../../order/orderNew/chooseList";
 import $ from "jquery/src/ajax";
 import { patentTypeList} from '@/dataDic.js';
@@ -9,6 +9,7 @@ import {getPatentType} from "@/tools.js";
 import './patent.less';
 
 import PatentDetails from './patentDetails';
+import ReminderLog from "../../customer/NEW/crm/reminderLog";
 
 const { TabPane } = Tabs;
 
@@ -24,6 +25,11 @@ class List extends Component{
                     key: "id",
                 },
                 {
+                    title: "专利号",
+                    dataIndex: "patentNo",
+                    key: "patentNo",
+                },
+                {
                     title: "专利名称",
                     dataIndex: "name",
                     key: "name",
@@ -49,14 +55,19 @@ class List extends Component{
                     key: "holders",
                 },
                 {
+                    title: "授权日期",
+                    dataIndex: "authorizationDates",
+                    key: "authorizationDates",
+                },
+                {
                     title: "发明人",
                     dataIndex: "inventor",
                     key: "inventor",
                 },
                 {
                     title: "收费截止日",
-                    dataIndex: "",
-                    key: "",
+                    dataIndex: "endDates",
+                    key: "endDates",
                 },
                 {
                     title: "年费状态",
@@ -64,8 +75,14 @@ class List extends Component{
                     key: "annualFeeStatus",
                     render: (text)=>{
                         return (
-                            text === 0 ? '无信息' :
-                                text === 1 ? '代缴费' : ''
+                            <span style={{
+                                color: text === 0 ? '#f00' : text === 1 ? '#25e027' : ''
+                            }}>
+                                {
+                                    text === 0 ? '待缴费' :
+                                        text === 1 ? '已缴费' : ''
+                                }
+                            </span>
                         )
                     }
                 },
@@ -75,25 +92,36 @@ class List extends Component{
                     key: "salesmanRemind",
                     render: (text)=>{
                         return(
-                            text === 0 ? '未提醒' :
-                                text === 1 ? '已提醒' : ''
+                            <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 || '无')
+                            record.patentAmount+ '/' + text + '/' + record.recoveryAmount
                         )
                     }
                 },
                 {
                     title: "客户名称",
-                    dataIndex: "companyName",
-                    key: "companyName",
+                    dataIndex: "userName",
+                    key: "userName",
                 },
                 {
                     title: "项目名称",
@@ -121,14 +149,42 @@ class List extends Component{
                     key: "depName",
                 },
                 {
+                    title: "录入人",
+                    dataIndex: "inputName",
+                    key: "inputName",
+                },
+                {
+                    title: "录入时间",
+                    dataIndex: "createTimes",
+                    key: "createTimes",
+                },
+                {
+                    title: "跟进人",
+                    dataIndex: "aname",
+                    key: "aname",
+                },
+                {
                     title: "操作",
                     dataIndex: "id",
                     key: "caozuo",
                     render: (text,record) => {
                         return (
                             <div>
-                                <Button type="primary" style={{marginRight:"15px"}}>发邮件</Button>
-                                <Button type="primary">发通知</Button>
+                                <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>
                         )
                     }
@@ -151,6 +207,9 @@ class List extends Component{
             detailsInfor:{},
             departmentArr:[],
             selectedRowKeys:[],
+            selectedRows:[],
+
+            unSelectedRows:[],
 
             name:undefined,
             type:undefined,
@@ -158,7 +217,9 @@ class List extends Component{
             annualFeeStatus:undefined,
             userName:undefined,
             salesmanRemind:undefined,
+            isFollow:undefined,
             aname:undefined,
+            patentNo:undefined,
 
             upLoad: {
                 customRequest: (options) => {
@@ -199,7 +260,13 @@ class List extends Component{
                 },
                 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);
@@ -207,6 +274,19 @@ class List extends Component{
         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);
+    }
+
+    componentWillReceiveProps(prevProps) {
+        if(prevProps.status !== this.state.status){
+            this.setState({
+                status:prevProps.status
+            },()=>{
+                this.loadData();
+                this.departmentList();
+            })
+        }
     }
 
     componentDidMount() {
@@ -232,6 +312,7 @@ class List extends Component{
         this.setState({
             loading: true,
             selectedRowKeys:[],
+            selectedRows:[]
         });
         let data = {
             name:this.state.name,
@@ -240,10 +321,15 @@ class List extends Component{
             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;
+        }
         for(let i in data){
             if(data[i] === undefined){delete data[i]}
         }
@@ -261,6 +347,7 @@ class List extends Component{
                         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,
@@ -289,7 +376,7 @@ class List extends Component{
     downloadFile() {
         window.location.href =
             globalConfig.context +
-            "/api/admin/patentNewexportTemplate?" +
+            "/api/admin/patentNew/exportTemplate?" +
             "sign=new_patent_template";
     }
 
@@ -331,7 +418,9 @@ class List extends Component{
             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]}
@@ -359,6 +448,47 @@ class List extends Component{
         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,
@@ -367,10 +497,76 @@ class List extends Component{
             annualFeeStatus:undefined,
             userName:undefined,
             salesmanRemind:undefined,
+            isFollow:undefined,
             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">
@@ -389,6 +585,9 @@ class List extends Component{
                                         <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.patentNo} onChange={(e)=>{this.setState({patentNo: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>
@@ -435,6 +634,16 @@ class List extends Component{
                                         </Select>
                                     </Form.Item>
                                     <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>
+                                    <Form.Item>
                                         <Select placeholder="请选择派单部门" value={this.state.depName} onSelect={e=>{this.setState({depName:e})}} style={{ width: "240px" }}>
                                             {
                                                 this.state.departmentArr.map(function (item) {
@@ -460,9 +669,10 @@ class List extends Component{
                     <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}
@@ -470,6 +680,41 @@ class List extends Component{
                                 标识为已通知
                             </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}
@@ -489,6 +734,15 @@ class List extends Component{
                         >
                             下载专利模板
                         </Button>
+                        <Button
+                            type="primary"
+                            style={{ margin: "11px 0px 10px 10px" }}
+                            onClick={()=>{
+                                this.exportExec();
+                            }}
+                        >
+                            导出Excel
+                        </Button>
                     </TabPane>
                     <TabPane tab="更改表格显示数据" key="3">
                         <div style={{ marginLeft: 10 }}>
@@ -518,13 +772,17 @@ class List extends Component{
                             onRowClick={(record)=>{
                                 this.setState({
                                     detailsVisible:true,
+                                    readOnly:true,
                                     detailsInfor:record
                                 })
                             }}
                             rowSelection={{
+                                getCheckboxProps:record => ({
+                                    disabled: record.isFollow === 0
+                                }),
                                 selectedRowKeys:this.state.selectedRowKeys,
-                                onChange: (selectedRowKeys)=>{
-                                    this.setState({ selectedRowKeys });
+                                onChange: (selectedRowKeys,selectedRows)=>{
+                                    this.setState({ selectedRowKeys,selectedRows });
                                 },
                             }}
                             scroll={{ x: "max-content", y: 0 }}
@@ -534,15 +792,116 @@ class List extends Component{
                     </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'}}>下列选项不能批量发邮件,请取消后再批量发邮件</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"
+                    />
+                </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>
         )
     }

+ 3 - 0
js/component/manageCenter/project/patent/patent.less

@@ -1,3 +1,6 @@
 .ant-table-thead .ant-table-selection-column .ant-checkbox-wrapper{
   display: inline-block;
 }
+.ant-upload-list{
+  display: none;
+}

+ 244 - 33
js/component/manageCenter/project/patent/patentDetails.jsx

@@ -1,11 +1,12 @@
 import React,{Component} from "react";
-import {Modal, Form, Row, Col, Tabs, Table, Spin, message, Button} from "antd";
+import {Modal, Form, Row, Col, Tabs, Table, Spin, message, Button, Input, Select, DatePicker, Popconfirm} from "antd";
 import $ from "jquery/src/ajax";
+import moment from 'moment';
+import ReminderLog from "../../customer/NEW/crm/reminderLog";
 
-import ReminderLog from './reminderLog';
+import {getPatentType} from "@/tools.js";
 
 const FormItem = Form.Item;
-const TabPane  = Tabs.TabPane;
 
 const formItemLayout = {
     labelCol: { span: 10 },
@@ -21,21 +22,36 @@ class PatentDetails extends Component{
                     title: "序号",
                     dataIndex: "key",
                     key: "key",
+                    width:'50px'
                 },
                 {
                     title: "费用种类",
-                    dataIndex: "status",
-                    key: "status",
+                    dataIndex: "years",
+                    key: "years",
+                    width:'150px',
+                    render:(text)=>(
+                        <span>
+                            {getPatentType(this.props.detailsInfor.type)}
+                            第
+                            {text}
+                            年年费
+                        </span>
+                    )
                 },
                 {
                     title: "金额",
                     dataIndex: "patentAmount",
                     key: "patentAmount",
+                    width:'100px'
                 },
                 {
                     title: "缴费日",
-                    dataIndex: "createTime",
-                    key: "createTime",
+                    dataIndex: "endDate",
+                    key: "endDate",
+                    width:'100px',
+                    render:(text)=>(
+                        moment(text).format('YYYY-MM-DD')
+                    )
                 },
             ],
             dataSource:[],
@@ -43,10 +59,24 @@ class PatentDetails extends Component{
             detailsInfor:{},
         }
         this.payLoadData = this.payLoadData.bind(this);
+        this.onChange = this.onChange.bind(this);
     }
 
     componentDidMount() {
         this.payLoadData();
+        const {detailsInfor, readOnly} = this.props;
+        if (!readOnly) {
+            this.setState({
+                patentNo: detailsInfor.patentNo,
+                email:detailsInfor.email,
+                name: detailsInfor.name,
+                applyDates: detailsInfor.applyDates,
+                authorizationDates: detailsInfor.authorizationDates,
+                annualFeeStatus: detailsInfor.annualFeeStatus,
+                delayingAmount: detailsInfor.delayingAmount,
+                recoveryAmount: detailsInfor.recoveryAmount,
+            })
+        }
     }
 
     payLoadData() {
@@ -67,7 +97,6 @@ class PatentDetails extends Component{
                     for(let i =0;i<data.data.length;i++){
                         data.data[i].key = i+1;
                     }
-                    console.log(data.data,'data.data')
                     this.setState({
                         dataSource: data.data,
                     });
@@ -84,10 +113,79 @@ class PatentDetails extends Component{
         );
     }
 
-
+    onChange(){
+        if(!this.state.patentNo){
+            message.warning('请输入专利号')
+            return;
+        }
+        if(!this.state.name){
+            message.warning('请输入专利名称')
+            return;
+        }
+        if(!this.state.applyDates){
+            message.warning('请选择申请日期')
+            return;
+        }
+        if(!this.state.authorizationDates){
+            message.warning('请选择授权日期')
+            return;
+        }
+        if(!this.state.email){
+            message.warning('请输入邮箱')
+            return;
+        }
+        if(isNaN(parseInt(this.state.annualFeeStatus))){
+            message.warning('请选择年费状态')
+            return;
+        }
+        if(isNaN(parseInt(this.state.delayingAmount))){
+            message.warning('请输入滞纳金')
+            return;
+        }
+        if(isNaN(parseInt(this.state.recoveryAmount))){
+            message.warning('请输入权利恢复费')
+            return;
+        }
+        this.setState({
+            loading: true,
+        });
+        const {detailsInfor} = this.props;
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/patentNew/updatePatentNew",
+            data: {
+                id:detailsInfor.id,
+                patentNo: this.state.patentNo,
+                email: this.state.email,
+                name: this.state.name,
+                applyDates: this.state.applyDates,
+                authorizationDates: this.state.authorizationDates,
+                annualFeeStatus: this.state.annualFeeStatus,
+                delayingAmount: this.state.delayingAmount,
+                recoveryAmount: this.state.recoveryAmount,
+            },
+            success: function (data) {
+                if(data.error.length === 0){
+                    message.success('修改成功');
+                    this.payLoadData();
+                    this.props.onRefresh();
+                }else{
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this),
+        }).always(
+            function () {
+                this.setState({
+                    loading: false,
+                });
+            }.bind(this)
+        );
+    }
 
     render() {
-        const {detailsInfor} = this.props;
+        const {detailsInfor,readOnly} = this.props;
         return (
             <Modal
                 title='年费数据'
@@ -105,7 +203,17 @@ class PatentDetails extends Component{
                                 {...formItemLayout}
                                 label='专利号'
                             >
-                                {detailsInfor.patentNo}
+                                {
+                                    readOnly ? detailsInfor.patentNo :
+                                        <Input
+                                            value={this.state.patentNo}
+                                            onChange={(e)=>{
+                                                this.setState({
+                                                    patentNo:e.target.value
+                                                })
+                                            }}
+                                        />
+                                }
                             </FormItem>
                         </Col>
                         <Col span={8}>
@@ -113,7 +221,17 @@ class PatentDetails extends Component{
                                 {...formItemLayout}
                                 label='专利名称'
                             >
-                                {detailsInfor.name}
+                                {
+                                    readOnly ? detailsInfor.name :
+                                        <Input
+                                            value={this.state.name}
+                                            onChange={(e)=>{
+                                                this.setState({
+                                                    name:e.target.value
+                                                })
+                                            }}
+                                        />
+                                }
                             </FormItem>
                         </Col>
                         <Col span={8}>
@@ -122,9 +240,7 @@ class PatentDetails extends Component{
                                 label='专利类型'
                             >
                                 {
-                                    detailsInfor.type === 0 ? '发明专利':
-                                        detailsInfor.type === 1 ? '实用新型':
-                                            detailsInfor.type === 2 ? '外观设计': ''
+                                    getPatentType(detailsInfor.type)
                                 }
                             </FormItem>
                         </Col>
@@ -133,32 +249,85 @@ class PatentDetails extends Component{
                                 {...formItemLayout}
                                 label='申请日期'
                             >
-                                {detailsInfor.applyDates}
+                                {
+                                    readOnly ? detailsInfor.applyDates:
+                                        <DatePicker
+                                            value={this.state.applyDates ? moment(this.state.applyDates) : ''}
+                                            format='YYYY-MM-DD'
+                                            onChange={(date)=>{
+                                                console.log(date,'date')
+                                                this.setState({
+                                                    applyDates:date ? moment(date).format('YYYY-MM-DD') : '',
+                                                })
+                                            }}
+                                        />
+                                }
                             </FormItem>
                         </Col>
-                        <Col span={16}>
+                        <Col span={8}>
                             <FormItem
-                                labelCol={{span: 5}}
-                                wrapperCol={{span: 19}}
+                                {...formItemLayout}
                                 label='授权日期'
                             >
-                                {detailsInfor.authorizationDates}
+                                {
+                                    readOnly ? detailsInfor.authorizationDates:
+                                        <DatePicker
+                                            value={this.state.authorizationDates ? moment(this.state.authorizationDates) : ''}
+                                            format='YYYY-MM-DD'
+                                            onChange={(date)=>{
+                                                console.log(date,'date')
+                                                this.setState({
+                                                    authorizationDates:date ? moment(date).format('YYYY-MM-DD') : '',
+                                                })
+                                            }}
+                                        />
+                                }
                             </FormItem>
                         </Col>
                         <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
-                                label='年费'
+                                label='Email'
                             >
-                                {detailsInfor.authorizationDates}
+                                {
+                                    readOnly ? detailsInfor.email:
+                                        <Input
+                                            value={this.state.email}
+                                            onChange={(e)=>{
+                                                this.setState({
+                                                    email:e.target.value
+                                                })
+                                            }}
+                                        />
+                                }
                             </FormItem>
                         </Col>
+                        {readOnly ? <Col span={8}>
+                            <FormItem
+                                {...formItemLayout}
+                                label='年费'
+                            >
+                                {detailsInfor.patentAmount}
+                            </FormItem>
+                        </Col> : null }
                         <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
                                 label='滞纳金'
                             >
-                                {detailsInfor.delayingAmount}
+                                {
+                                    readOnly ? detailsInfor.delayingAmount :
+                                        <Input
+                                            style={{paddingTop: '5px'}}
+                                            type='number'
+                                            value={this.state.delayingAmount}
+                                            onChange={(e)=>{
+                                                this.setState({
+                                                    delayingAmount:e.target.value
+                                                })
+                                            }}
+                                        />
+                                }
                             </FormItem>
                         </Col>
                         <Col span={8}>
@@ -166,7 +335,19 @@ class PatentDetails extends Component{
                                 {...formItemLayout}
                                 label='权利恢复费'
                             >
-                                {detailsInfor.recoveryAmount}
+                                {
+                                    readOnly ? detailsInfor.recoveryAmount :
+                                        <Input
+                                            style={{paddingTop: '5px'}}
+                                            type='number'
+                                            value={this.state.recoveryAmount}
+                                            onChange={(e)=>{
+                                                this.setState({
+                                                    recoveryAmount:e.target.value
+                                                })
+                                            }}
+                                        />
+                                }
                             </FormItem>
                         </Col>
                         <Col span={8}>
@@ -175,8 +356,14 @@ class PatentDetails extends Component{
                                 label='年费状态'
                             >
                                 {
-                                    detailsInfor.annualFeeStatus === 0 ? '无代缴' :
-                                        detailsInfor.annualFeeStatus === 1 ? '已代缴' : ''
+                                    readOnly ? (
+                                            detailsInfor.annualFeeStatus === 0 ? '待缴费' :
+                                                detailsInfor.annualFeeStatus === 1 ? '已缴费' : ''
+                                        ) :
+                                        <Select style={{paddingTop: '5px'}} value={this.state.annualFeeStatus} onSelect={(e)=>{this.setState({annualFeeStatus:e})}}>
+                                            <Select.Option value={0}>待缴费</Select.Option>
+                                            <Select.Option value={1}>已缴费</Select.Option>
+                                        </Select>
                                 }
                             </FormItem>
                         </Col>
@@ -188,8 +375,8 @@ class PatentDetails extends Component{
                             >
                                <div style={{display:'flex',alignItems:'center'}}>
                                    {
-                                       detailsInfor.salesmanRemind === 0 ? '未提醒' :
-                                           detailsInfor.salesmanRemind === 1 ? '已提醒' : ''
+                                       detailsInfor.salesmanRemind === 0 ? '未通知' :
+                                           detailsInfor.salesmanRemind === 1 ? '已通知' : ''
                                    }
                                    <Button
                                        onClick={()=>{
@@ -200,15 +387,39 @@ class PatentDetails extends Component{
                                        }}
                                        style={{marginLeft:"15px"}}
                                        type='primary'>
-                                       查看提醒日志
+                                       查看专利日志
                                    </Button>
                                </div>
                             </FormItem>
                         </Col>
                     </Row>
+                    {!readOnly ?
+                        <div style={{
+                            margin:'30px',
+                            display:'flex',
+                            justifyContent:'center'
+                        }}>
+                            <Popconfirm placement="top" title="确定提交吗?" onConfirm={(e)=>{
+                                e.stopPropagation();
+                                this.onChange();
+                            }} okText="确定" cancelText="取消">
+                                <Button
+                                    loading={this.state.loading}
+                                    size='large'
+                                    type="primary"
+                                    onClick={(e)=>{
+                                        e.stopPropagation();
+                                    }}
+                                >
+                                    确定提交
+                                </Button>
+                            </Popconfirm>
+                        </div>
+                        : null}
                 </Form>
                 <Spin spinning={this.state.loading}>
                     <Table
+                        scroll={{ y: 320 }}
                         columns={this.state.columns}
                         dataSource={this.state.dataSource}
                         pagination={false}
@@ -217,12 +428,12 @@ class PatentDetails extends Component{
                     />
                 </Spin>
                 {this.state.visible ? <ReminderLog
-                    visible={this.state.visible}
                     id={this.state.id}
-                    onCancel={()=>{
+                    visible={this.state.visible}
+                    cancel={()=>{
                         this.setState({
-                            visible: false,
-                            id: undefined,
+                            visible:false,
+                            id:undefined
                         })
                     }}
                 /> : null}

+ 0 - 70
js/component/manageCenter/project/patent/reminderLog.jsx

@@ -1,70 +0,0 @@
-import React,{Component} from "react";
-import {message, Modal, Table} from "antd";
-import $ from "jquery/src/ajax";
-
-class ReminderLog extends Component{
-    constructor(props) {
-        super(props);
-        this.state={
-            dataSource:[],
-            columns:[],
-        }
-        this.loadData = this.loadData.bind(this);
-    }
-
-    componentDidMount() {
-        this.loadData();
-    }
-
-    loadData() {
-        this.setState({
-            loading: true,
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/company/selectPaymentList",
-            data: {},
-            success: function (data) {
-                if(data.error.length === 0){
-                    this.setState({
-                        columns: [],
-                    });
-                }else{
-                    message.warning(data.error[0].message);
-                }
-            }.bind(this),
-        }).always(
-            function () {
-                this.setState({
-                    loading: false,
-                });
-            }.bind(this)
-        );
-    }
-
-    render() {
-        return (
-            this.props.visible ? <Modal
-                title='提醒日志'
-                className='payRecordComponent'
-                width={800}
-                maskClosable={false}
-                footer={null}
-                visible={this.props.visible}
-                onCancel={this.props.onCancel}
-            >
-                <Table
-                    columns={this.state.columns}
-                    dataSource={this.state.dataSource}
-                    pagination={false}
-                    bordered
-                    size="small"
-                />
-            </Modal> : null
-        );
-    }
-}
-
-export default ReminderLog;

+ 6 - 1
js/component/manageCenter/project/task/myTask.jsx

@@ -1671,7 +1671,8 @@ const Task = React.createClass({
                         timeRecord: thisdata.timeRecord || '{}',//项目状态JSON
                         timeRecordparse: thisdata.timeRecord ? JSON.parse(thisdata.timeRecord) : {},//项目状态JSON
                         checkStatus: thisdata.checkStatus,//核对状态
-                        patentTypeName: thisdata.patentTypeName
+                        patentTypeName: thisdata.patentTypeName,
+                        patentTypeId: thisdata.patentType,//官费专利类型
                     })
                 }
             }.bind(this),
@@ -4741,6 +4742,7 @@ const Task = React.createClass({
                                                                     }}
                                                                     id={this.state.id}
                                                                     patentTypeName={this.state.patentTypeName}
+                                                                    patentTypeId={this.state.patentTypeId}
                                                                     checkStatus={this.state.checkStatus}  //核对状态
                                                                     projectType={this.state.projectType}  //项目类型
                                                                     patentType={this.state.patentType}   //专利类型
@@ -5022,6 +5024,7 @@ const Task = React.createClass({
                                                         {...this.props}
                                                         sort={this.state.sort}
                                                         patentTypeName={this.state.patentTypeName}                  //官费类型
+                                                        patentTypeId={this.state.patentTypeId}
                                                         commodityQuantity={this.state.commodityQuantity}            //项目数量
                                                         checkStatus={this.state.checkStatus}                        //核对状态
                                                         orderTaskOfficialCost={this.state.orderTaskOfficialCost}    //是否含官费  0无1有
@@ -6062,6 +6065,7 @@ const Task = React.createClass({
                                                                     }}
                                                                     id={this.state.id}
                                                                     patentTypeName={this.state.patentTypeName}
+                                                                    patentTypeId={this.state.patentTypeId}
                                                                     checkStatus={this.state.checkStatus}  //核对状态
                                                                     projectType={this.state.projectType}  //项目类型
                                                                     patentType={this.state.patentType}   //专利类型
@@ -6327,6 +6331,7 @@ const Task = React.createClass({
                                                         tid={this.state.tid}
                                                         sort={this.state.sort}
                                                         patentTypeName={this.state.patentTypeName}                  //官费类型
+                                                        patentTypeId={this.state.patentTypeId}
                                                         commodityQuantity={this.state.commodityQuantity}            //项目数量
                                                         checkStatus={this.state.checkStatus}                        //核对状态
                                                         orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有

+ 5 - 1
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -1113,7 +1113,8 @@ const MyTaskOutsource = React.createClass({
             timeRecord: thisdata.timeRecord || '{}',//项目状态JSON
             timeRecordparse: thisdata.timeRecord ? JSON.parse(thisdata.timeRecord) : {},//项目状态JSON
             checkStatus:thisdata.checkStatus,//核对状态
-            patentTypeName:thisdata.patentTypeName
+            patentTypeName:thisdata.patentTypeName,
+            patentTypeId: thisdata.patentType,//官费专利类型
           });
         }
       }.bind(this),
@@ -4395,6 +4396,7 @@ const MyTaskOutsource = React.createClass({
                                             }}
                                             id={this.state.id}
                                             patentTypeName={this.props.patentTypeName}
+                                            patentTypeId={this.state.patentTypeId}
                                             checkStatus={this.state.checkStatus}  //核对状态
                                             projectType={this.state.projectType}  //项目类型
                                             patentType={this.state.patentType}   //专利类型
@@ -4639,6 +4641,7 @@ const MyTaskOutsource = React.createClass({
                             sort={this.state.sort}
                             orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有
                             patentTypeName={this.state.patentTypeName}                  //官费类型
+                            patentTypeId={this.state.patentTypeId}
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}
                             orderTaskOfficialCost={this.state.orderTaskOfficialCost}    //是否含官费  0无1有
@@ -5434,6 +5437,7 @@ const MyTaskOutsource = React.createClass({
                     sort={this.state.sort}
                     orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有
                     patentTypeName={this.state.patentTypeName}                  //官费类型
+                    patentTypeId={this.state.patentTypeId}
                     commodityQuantity={this.state.commodityQuantity}            //项目数量
                     checkStatus={this.state.checkStatus}
                     orderTaskOfficialCost={this.state.orderTaskOfficialCost}    //是否含官费  0无1有

+ 2 - 0
js/component/manageCenter/project/task/payApplyReject/detailsModal/index.js

@@ -276,6 +276,7 @@ class DetailsModal extends Component{
                         checkStatus:thisdata.checkStatus,//核对状态
                         commodityQuantity:thisdata.commodityQuantity,//项目数量
                         patentTypeName:thisdata.patentTypeName,//官费类型名称
+                        patentTypeId: thisdata.patentType,//官费专利类型
                         sort: thisdata.sort,
                     })
                 }
@@ -361,6 +362,7 @@ class DetailsModal extends Component{
                             tid={this.props.tid}
                             sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
+                            patentTypeId={this.state.patentTypeId}
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态
                             orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有

+ 2 - 0
js/component/project.jsx

@@ -231,6 +231,7 @@ const project = React.createClass({
             checkStatus:thisdata.checkStatus,//核对状态
             commodityQuantity:thisdata.commodityQuantity,//项目数量
             patentTypeName:thisdata.patentTypeName,//官费类型名称
+            patentTypeId: thisdata.patentType,//官费专利类型
             id: thisdata.id, //ID
             orderNo: thisdata.orderNo, //订单编号
             userName: thisdata.userName, //客户名称
@@ -1326,6 +1327,7 @@ const project = React.createClass({
                             tid={this.props.record.id}
                             sort={this.state.sort}
                             patentTypeName={this.state.patentTypeName}                  //官费类型
+                            patentTypeId={this.state.patentTypeId}
                             commodityQuantity={this.state.commodityQuantity}            //项目数量
                             checkStatus={this.state.checkStatus}                        //核对状态
                             orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.81",
+  "version": "1.1.83",
   "description": "",
   "main": "index.js",
   "scripts": {