HW 3 år sedan
förälder
incheckning
e90847cfb4

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

@@ -9,11 +9,11 @@ class OrderItemStatus extends Component{
     render() {
         return (
             <span>
-                {/*0正常 1作废 2锁定 3变更中*/}
+                {/*0正常 1作废 2锁定变更中 3变更中*/}
                 {
                     this.props.deleteSign === 0 ? <Tag color="#87d068">正常</Tag> :
                         this.props.deleteSign === 1 ? <Tag color="#f00">作废</Tag> :
-                            this.props.deleteSign === 2 ? <Tag color="#f50">锁定</Tag> :
+                            this.props.deleteSign === 2 ? <Tag color="#f50">变更中</Tag> :
                                 this.props.deleteSign === 3? <Tag color="#108ee9">变更中</Tag> : <Tag color="#000">未知</Tag>
                 }
             </span>

+ 5 - 5
js/component/dataDic.js

@@ -241,16 +241,16 @@ module.exports = {
   //patent
   patentTypeList: [
     {
-      value: "1",
+      value: "0",
       key: "实用新型专利",
     },
     {
-      value: "2",
-      key: "外观设计专利",
+      value: "1",
+      key: "发明专利",
     },
     {
-      value: "3",
-      key: "发明专利",
+      value: "2",
+      key: "外观设计专利",
     },
   ],
 

+ 70 - 69
js/component/manageCenter/components/checkProject/applyPaymentModal.js

@@ -129,43 +129,43 @@ class ApplyPaymentModal extends Component{
                                 )}
                             </Form.Item>
                             {/* 0正常 1专利 2软著 3审计 */}
-                            {/*{this.props.projectType === 1 && this.props.patentType === 1 ?<Form.Item*/}
-                            {/*            {...formItemLayout}*/}
-                            {/*            style={{*/}
-                            {/*                display:'flex'*/}
-                            {/*            }}*/}
-                            {/*            label="支付状态:"*/}
-                            {/*        >*/}
-                            {/*            {getFieldDecorator('paymentStatus', {*/}
-                            {/*                constructor: this.state.paymentStatus,*/}
-                            {/*                rules: [{ required: false, message: '请选择支付状态!' }],*/}
-                            {/*            })(*/}
-                            {/*                <Radio.Group onChange={(e)=>{*/}
-                            {/*                    this.setState({*/}
-                            {/*                        paymentStatus: e.target.value*/}
-                            {/*                    })*/}
-                            {/*                    if(e.target.value === 1){*/}
-                            {/*                        setFieldsValue({*/}
-                            {/*                            quantity:parseInt(previewPayInfor.quantity),*/}
-                            {/*                            applicationAmount:(previewPayInfor.partyAmount ?*/}
-                            {/*                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :*/}
-                            {/*                                parseFloat(previewPayInfor.totalAmount))/2*/}
-                            {/*                        });*/}
-                            {/*                    } else if(e.target.value === 2){*/}
-                            {/*                        setFieldsValue({*/}
-                            {/*                            quantity:parseInt(previewPayInfor.quantity),*/}
-                            {/*                            applicationAmount:(previewPayInfor.partyAmount ?*/}
-                            {/*                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :*/}
-                            {/*                                parseFloat(previewPayInfor.totalAmount))*/}
-                            {/*                        });*/}
-                            {/*                    }*/}
-                            {/*                }}>*/}
-                            {/*                    <Radio value={0}>自定义</Radio>*/}
-                            {/*                    <Radio value={1}>半款</Radio>*/}
-                            {/*                    <Radio value={2}>全款</Radio>*/}
-                            {/*                </Radio.Group>*/}
-                            {/*            )}*/}
-                            {/*        </Form.Item> : <div/>}*/}
+                            {this.props.projectType === 1 && this.props.patentType === 1 ?<Form.Item
+                                        {...formItemLayout}
+                                        style={{
+                                            display:'flex'
+                                        }}
+                                        label="支付状态:"
+                                    >
+                                        {getFieldDecorator('paymentStatus', {
+                                            initialValue: this.state.paymentStatus,
+                                            rules: [{ required: false, message: '请选择支付状态!' }],
+                                        })(
+                                            <Radio.Group onChange={(e)=>{
+                                                this.setState({
+                                                    paymentStatus: e.target.value
+                                                })
+                                                if(e.target.value === 1){
+                                                    setFieldsValue({
+                                                        quantity:parseInt(previewPayInfor.quantity),
+                                                        applicationAmount:(previewPayInfor.partyAmount ?
+                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                                            parseFloat(previewPayInfor.totalAmount))/2
+                                                    });
+                                                } else if(e.target.value === 2){
+                                                    setFieldsValue({
+                                                        quantity:parseInt(previewPayInfor.quantity),
+                                                        applicationAmount:(previewPayInfor.partyAmount ?
+                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                                            parseFloat(previewPayInfor.totalAmount))
+                                                    });
+                                                }
+                                            }}>
+                                                <Radio value={0}>自定义</Radio>
+                                                <Radio value={1}>半款</Radio>
+                                                <Radio value={2}>全款</Radio>
+                                            </Radio.Group>
+                                        )}
+                                    </Form.Item> : <div/>}
                             {this.props.type !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 style={{
@@ -241,44 +241,45 @@ class ApplyPaymentModal extends Component{
                                     rules: [{ required: false, message: '请输入本次申请支付数量!' }],
                                 })(
                                     <InputNumber
+                                        disabled={this.state.paymentStatus !== 0}
                                         style={{ width: '200px' }}
                                         precision={0}
                                         placeholder="请输入本次申请支付数量"
                                     />
                                 )}
                             </Form.Item>
-                            {/* 0正常 1专利 2软著 3审计 */}
-                            {/*{this.props.type !== 2 ? <Form.Item*/}
-                            {/*    {...formItemLayout}*/}
-                            {/*    style={{*/}
-                            {/*        display:'flex'*/}
-                            {/*    }}*/}
-                            {/*    label="本次申请支付金额(万元):"*/}
-                            {/*>*/}
-                            {/*    {getFieldDecorator('applicationAmount', {*/}
-                            {/*        initialValue:this.props.type === 2 ?(*/}
-                            {/*            ((previewPayInfor.costReduction === 1 ? previewPayInfor.reductionAmount : previewPayInfor.officialUnitPrice) * 1000000 * parseInt(previewPayInfor.quantity)) / 1000000*/}
-                            {/*        ): (*/}
-                            {/*            !isNaN(parseFloat(previewPayInfor.totalAmount)) && !isNaN(parseFloat(previewPayInfor.partyAmount))?*/}
-                            {/*            (*/}
-                            {/*                this.state.paymentStatus === 1 ?*/}
-                            {/*                (previewPayInfor.partyAmount ?*/}
-                            {/*                    ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :*/}
-                            {/*                parseFloat(previewPayInfor.totalAmount)) / 2 :*/}
-                            {/*                previewPayInfor.partyAmount ?*/}
-                            {/*                    ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :*/}
-                            {/*                parseFloat(previewPayInfor.totalAmount)*/}
-                            {/*            ) : null*/}
-                            {/*        ),*/}
-                            {/*        rules: [{ required: true, message: '请输入本次申请支付金额!' }],*/}
-                            {/*    })(*/}
-                            {/*        <InputNumber*/}
-                            {/*            min={0}*/}
-                            {/*            disabled={this.state.paymentStatus !== 0}*/}
-                            {/*            style={{ width: '200px' }}*/}
-                            {/*            placeholder="请输入本次申请支付金额"/>*/}
-                            {/*    )}*/}
-                            {/*</Form.Item> : null}*/}
+                            {/*0正常 1专利 2软著 3审计    只有专利里面的专利申请没有本次申请支付金额*/}
+                            {!(this.props.projectType === 1 && this.props.patentType === 0) ? <Form.Item
+                                {...formItemLayout}
+                                style={{
+                                    display:'flex'
+                                }}
+                                label="本次申请支付金额(万元):"
+                            >
+                                {getFieldDecorator('applicationAmount', {
+                                    initialValue:this.props.type === 2 ?(
+                                        ((previewPayInfor.costReduction === 1 ? previewPayInfor.reductionAmount : previewPayInfor.officialUnitPrice) * 1000000 * parseInt(previewPayInfor.quantity)) / 1000000
+                                    ): (
+                                        !isNaN(parseFloat(previewPayInfor.totalAmount)) && !isNaN(parseFloat(previewPayInfor.partyAmount))?
+                                        (
+                                            this.state.paymentStatus === 1 ?
+                                            (previewPayInfor.partyAmount ?
+                                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                            parseFloat(previewPayInfor.totalAmount)) / 2 :
+                                            previewPayInfor.partyAmount ?
+                                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
+                                            parseFloat(previewPayInfor.totalAmount)
+                                        ) : null
+                                    ),
+                                    rules: [{ required: true, message: '请输入本次申请支付金额!' }],
+                                })(
+                                    <InputNumber
+                                        min={0}
+                                        disabled={this.state.paymentStatus !== 0}
+                                        style={{ width: '200px' }}
+                                        placeholder="请输入本次申请支付金额"/>
+                                )}
+                            </Form.Item> : null}
                             <Form.Item
                                 {...formItemLayout}
                                 style={{

+ 337 - 54
js/component/manageCenter/project/patent/list.jsx

@@ -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" }}
                         >

+ 117 - 114
js/component/manageCenter/project/patent/patentDetails.jsx

@@ -1,7 +1,9 @@
 import React,{Component} from "react";
-import {Modal, Form, Row, Col, Tabs, Table, Spin, message} from "antd";
+import {Modal, Form, Row, Col, Tabs, Table, Spin, message, Button} from "antd";
 import $ from "jquery/src/ajax";
 
+import ReminderLog from './reminderLog';
+
 const FormItem = Form.Item;
 const TabPane  = Tabs.TabPane;
 
@@ -14,78 +16,60 @@ class PatentDetails extends Component{
     constructor(props) {
         super(props);
         this.state={
-            payDataSource :[],
-            payColumns:[
-                {
-                    title: "序号",
-                    dataIndex: "companyName",
-                    key: "companyName",
-                },
-                {
-                    title: "费用种类",
-                    dataIndex: "companyName",
-                    key: "companyName",
-                },
-                {
-                    title: "金额",
-                    dataIndex: "companyName",
-                    key: "companyName",
-                },
-                {
-                    title: "缴费日",
-                    dataIndex: "companyName",
-                    key: "companyName",
-                },
-            ],
-            unPayDataSource:[],
-            unPayColumns:[
+            columns:[
                 {
                     title: "序号",
-                    dataIndex: "companyName",
-                    key: "companyName",
+                    dataIndex: "key",
+                    key: "key",
                 },
                 {
                     title: "费用种类",
-                    dataIndex: "companyName",
-                    key: "companyName",
+                    dataIndex: "status",
+                    key: "status",
                 },
                 {
                     title: "金额",
-                    dataIndex: "companyName",
-                    key: "companyName",
+                    dataIndex: "patentAmount",
+                    key: "patentAmount",
                 },
                 {
                     title: "缴费日",
-                    dataIndex: "companyName",
-                    key: "companyName",
+                    dataIndex: "createTime",
+                    key: "createTime",
                 },
             ],
-            unPayLoading:false,
-            payLoading:false,
+            dataSource:[],
+            loading:false,
+            detailsInfor:{},
         }
         this.payLoadData = this.payLoadData.bind(this);
-        this.unPayLoadData = this.unPayLoadData.bind(this);
     }
 
     componentDidMount() {
         this.payLoadData();
-        this.unPayLoadData();
     }
 
     payLoadData() {
         this.setState({
-            payLoading: true,
+            loading: true,
         });
+        const {detailsInfor} = this.props;
         $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/company/selectPaymentList",
-            data: {},
+            url: globalConfig.context + "/api/admin/patentNew/patentPaymentDetails",
+            data: {
+                id:detailsInfor.id
+            },
             success: function (data) {
                 if(data.error.length === 0){
+                    for(let i =0;i<data.data.length;i++){
+                        data.data[i].key = i+1;
+                    }
+                    console.log(data.data,'data.data')
                     this.setState({
-                        payDataSource: [],
+                        dataSource: data.data,
                     });
                 }else{
                     message.warning(data.error[0].message);
@@ -94,41 +78,16 @@ class PatentDetails extends Component{
         }).always(
             function () {
                 this.setState({
-                    payLoading: false,
+                    loading: false,
                 });
             }.bind(this)
         );
     }
 
-    unPayLoadData() {
-        this.setState({
-            unPayLoading: 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({
-                        unPayDataSource: [],
-                    });
-                }else{
-                    message.warning(data.error[0].message);
-                }
-            }.bind(this),
-        }).always(
-            function () {
-                this.setState({
-                    unPayLoading: false,
-                });
-            }.bind(this)
-        );
-    }
+
 
     render() {
+        const {detailsInfor} = this.props;
         return (
             <Modal
                 title='年费数据'
@@ -141,88 +100,132 @@ class PatentDetails extends Component{
             >
                 <Form layout="horizontal">
                     <Row gutter={40}>
-                        <Col span={12}>
+                        <Col span={8}>
+                            <FormItem
+                                {...formItemLayout}
+                                label='专利号'
+                            >
+                                {detailsInfor.patentNo}
+                            </FormItem>
+                        </Col>
+                        <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
-                                label='申请日'
+                                label='专利名称'
                             >
-                                2020-06-19
+                                {detailsInfor.name}
                             </FormItem>
                         </Col>
-                        <Col span={12}>
+                        <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
-                                label='上回缴费年度'
+                                label='专利类型'
                             >
-                                发明专利第2年年费,2021-03-30
+                                {
+                                    detailsInfor.type === 0 ? '发明专利':
+                                        detailsInfor.type === 1 ? '实用新型':
+                                            detailsInfor.type === 2 ? '外观设计': ''
+                                }
                             </FormItem>
                         </Col>
-                        <Col span={12}>
+                        <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
-                                label='状态'
+                                label='申请日期'
                             >
-                                待缴
+                                {detailsInfor.applyDates}
                             </FormItem>
                         </Col>
-                        <Col span={12}>
+                        <Col span={16}>
+                            <FormItem
+                                labelCol={{span: 5}}
+                                wrapperCol={{span: 19}}
+                                label='授权日期'
+                            >
+                                {detailsInfor.authorizationDates}
+                            </FormItem>
+                        </Col>
+                        <Col span={8}>
+                            <FormItem
+                                {...formItemLayout}
+                                label='年费'
+                            >
+                                {detailsInfor.authorizationDates}
+                            </FormItem>
+                        </Col>
+                        <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
                                 label='滞纳金'
                             >
-                                0
+                                {detailsInfor.delayingAmount}
                             </FormItem>
                         </Col>
-                        <Col span={12}>
+                        <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
                                 label='权利恢复费'
                             >
-                               0
+                                {detailsInfor.recoveryAmount}
                             </FormItem>
                         </Col>
-                        <Col span={12}>
+                        <Col span={8}>
                             <FormItem
                                 {...formItemLayout}
-                                label='截止日'
+                                label='年费状态'
                             >
-                                2022-07-19
+                                {
+                                    detailsInfor.annualFeeStatus === 0 ? '无代缴' :
+                                        detailsInfor.annualFeeStatus === 1 ? '已代缴' : ''
+                                }
                             </FormItem>
                         </Col>
-                        <Col span={12}>
+                        <Col span={16}>
                             <FormItem
-                                {...formItemLayout}
-                                label='年费'
+                                labelCol={{span: 5}}
+                                wrapperCol={{span: 19}}
+                                label='通知'
                             >
-                                900.00
+                               <div style={{display:'flex',alignItems:'center'}}>
+                                   {
+                                       detailsInfor.salesmanRemind === 0 ? '未提醒' :
+                                           detailsInfor.salesmanRemind === 1 ? '已提醒' : ''
+                                   }
+                                   <Button
+                                       onClick={()=>{
+                                           this.setState({
+                                               visible:true,
+                                               id:detailsInfor.id
+                                           })
+                                       }}
+                                       style={{marginLeft:"15px"}}
+                                       type='primary'>
+                                       查看提醒日志
+                                   </Button>
+                               </div>
                             </FormItem>
                         </Col>
                     </Row>
                 </Form>
-                <Tabs defaultActiveKey="1">
-                    <TabPane tab="应缴费信息" key="1">
-                        <Spin spinning={this.state.unPayLoading}>
-                            <Table
-                                columns={this.state.unPayColumns}
-                                dataSource={this.state.unPayDataSource}
-                                pagination={false}
-                                bordered
-                                size="small"
-                            />
-                        </Spin>
-                    </TabPane>
-                    <TabPane tab="已缴费信息" key="2">
-                        <Spin spinning={this.state.payLoading}>
-                            <Table
-                                columns={this.state.payColumns}
-                                dataSource={this.state.payDataSource}
-                                pagination={false}
-                                bordered
-                                size="small"
-                            />
-                        </Spin>
-                    </TabPane>
-                </Tabs>
+                <Spin spinning={this.state.loading}>
+                    <Table
+                        columns={this.state.columns}
+                        dataSource={this.state.dataSource}
+                        pagination={false}
+                        bordered
+                        size="small"
+                    />
+                </Spin>
+                {this.state.visible ? <ReminderLog
+                    visible={this.state.visible}
+                    id={this.state.id}
+                    onCancel={()=>{
+                        this.setState({
+                            visible: false,
+                            id: undefined,
+                        })
+                    }}
+                /> : null}
             </Modal>
         )
     }

+ 2 - 1
js/component/manageCenter/project/summary/highTech.jsx

@@ -272,7 +272,8 @@ class HighTech extends Component{
                 url = url+`&${key}=${data[key]}`;
             }
         }
-        window.open(globalConfig.context +url);
+
+        window.location.href = globalConfig.context +url;
     }
 
     componentWillMount() {

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

@@ -2800,7 +2800,7 @@ const Task = React.createClass({
                         }
                     }
 
-                    if ((type === 0 || type === 1 ) && lv) {
+                    if ((type === 0 || type === 1 ) && lv && arr.length > 0) {
                         this.setState({
                             patentType: type === 0 ? 0 : 1,    //0专利申请 1专利买卖
                             patentNameType: patentNameType,                         //0实用新型 1发明专利 2外观专利 3 其他

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

@@ -2048,7 +2048,7 @@ const MyTaskOutsource = React.createClass({
             }
           }
 
-          if(type === 0 || type === 1){
+          if((type === 0 || type === 1) && arr.length > 0){
             this.setState({
               patentType: type === 0 ? 0 : 1,    //0专利申请 1专利买卖
               patentNameType: patentNameType,                         //0实用新型 1发明专利 2外观专利 3 其他

+ 2 - 2
js/component/manageCenter/set/projectConfigure/addOfficialFeePrice.js

@@ -108,8 +108,8 @@ class AddOfficialFeePrice extends Component{
                             })(
                                 <Select style={{ width:'200px'}}>
                                     <Select.Option value={0}>实用新型</Select.Option>
-                                    <Select.Option value={1}>外观专利</Select.Option>
-                                    <Select.Option value={2}>发明专利</Select.Option>
+                                    <Select.Option value={1}>发明专利</Select.Option>
+                                    <Select.Option value={2}>外观专利</Select.Option>
                                 </Select>
                             )}
                         </Form.Item>

+ 2 - 5
js/component/manageCenter/set/projectConfigure/officialFees.js

@@ -16,11 +16,8 @@ class OfficialFees extends Component{
             columns: [
                 {
                     title: '项目类型',
-                    dataIndex: 'type',
-                    key: 'type',
-                    render: (text) => {
-                        return text === 0 ? '实用新型' : text === 1 ? '外观专利' : '发明专利'
-                    }
+                    dataIndex: 'typeName',
+                    key: 'typeName',
                 },
                 {
                     title: '专利类型',

+ 1 - 1
js/component/project.jsx

@@ -699,7 +699,7 @@ const project = React.createClass({
             }
           }
 
-          if(type === 0 || type === 1){
+          if((type === 0 || type === 1) && arr.length > 0){
             this.setState({
               patentType: type === 0 ? 0 : 1,    //0专利申请 1专利买卖
               patentNameType: patentNameType,                         //0实用新型 1发明专利 2外观专利 3 其他

+ 0 - 2
js/component/tools.js

@@ -193,7 +193,6 @@ module.exports = {
     }
   },
   getPatentType: function (e) {
-    if (e) {
       let theType = "";
       patentTypeList.map(function (item) {
         if (item.value == e) {
@@ -201,7 +200,6 @@ module.exports = {
         }
       });
       return theType;
-    }
   },
   getPatentTypeva: function (e) {
     if (e) {

+ 1 - 1
package.json

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