Bladeren bron

专利流程测试版本

yee 8 jaren geleden
bovenliggende
commit
84d18e4c36

File diff suppressed because it is too large
+ 1 - 1
build/admin/index.js


File diff suppressed because it is too large
+ 22 - 22
build/admin/servicesManage/patent.js


File diff suppressed because it is too large
+ 2 - 2
build/user/account/services.js


File diff suppressed because it is too large
+ 5 - 5
build/user/account/set.js


File diff suppressed because it is too large
+ 1 - 1
build/user/login.js


File diff suppressed because it is too large
+ 1 - 1
build/user/signIn.js


+ 6 - 0
js/component/account/services/content.jsx

@@ -16,6 +16,12 @@ const Content = React.createClass({
         this.setState({
             leftKey: key,
         });
+        window.location.hash = key;
+    },
+    componentWillMount() {
+        if (window.location.hash) {
+            this.handlekey(window.location.hash.substr(1));
+        };
     },
     render() {
         return (

+ 5 - 0
js/component/account/services/leftTab.jsx

@@ -17,6 +17,11 @@ const LeftTab = React.createClass({
             current: e.key,
         });
     },
+    componentWillMount(){
+        if ( window.location.hash ) {
+            this.state.current = window.location.hash.substr(1);
+        };
+    },
     render() {
         return (
             <Menu onClick={this.handleClick}

+ 5 - 1
js/component/account/set/content.jsx

@@ -24,6 +24,7 @@ const Content = React.createClass({
         this.setState({
             leftKey: key,
         });
+        window.location.hash = key;
     },
     componentWillMount() {
         if (userData) {
@@ -32,7 +33,10 @@ const Content = React.createClass({
             } else if (userData.type == '1') {
                 this.state.leftKey = 'group';
             };
-        }
+        };
+        if ( window.location.hash ) {
+            this.handlekey(window.location.hash.substr(1));
+        };
     },
     render() {
         return (

+ 5 - 0
js/component/account/set/leftTab.jsx

@@ -17,6 +17,11 @@ const LeftTab = React.createClass({
             current: e.key,
         });
     },
+    componentWillMount(){
+        if ( window.location.hash ) {
+            this.state.current = window.location.hash.substr(1);
+        };
+    },
     render() {
         return (
             <Menu onClick={this.handleClick}

+ 5 - 0
js/component/account/set/leftTabgroup.jsx

@@ -17,6 +17,11 @@ const LeftTab = React.createClass({
             current: e.key,
         });
     },
+    componentWillMount(){
+        if ( window.location.hash ) {
+            this.state.current = window.location.hash.substr(1);
+        };
+    },
     render() {
         return (
             <Menu onClick={this.handleClick}

+ 6 - 1
js/component/login/loginContent.jsx

@@ -26,6 +26,11 @@ const LoginContent = React.createClass({
             loading: e
         });
     },
+    componentWillMount(){
+        if ( window.location.search === "?1" ) {
+            this.state.theKey = '1'
+        }
+    },
     render() {
         return (
             <Spin spinning={this.state.loading} className='spin-box'>
@@ -34,7 +39,7 @@ const LoginContent = React.createClass({
                         <img src="" alt="" />
                     </div>
                     <div className="login-right">
-                        <Tabs defaultActiveKey="0" onChange={this.tabChange} className="login-from">
+                        <Tabs defaultActiveKey={this.state.theKey} onChange={this.tabChange} className="login-from">
                             <TabPane tab="个人登录" key="0">
                                 <LoginForm loginProp={this.state.theKey} spinState={this.spinChange}/>
                             </TabPane>

+ 5 - 0
js/component/manageCenter/servicesManage/leftTab.jsx

@@ -17,6 +17,11 @@ const LeftTab = React.createClass({
             current: e.key,
         });
     },
+    componentWillMount(){
+        if ( window.location.hash ) {
+            this.state.current = window.location.hash.substr(1);
+        };
+    },
     render() {
         return (
             <Menu onClick={this.handleClick}

+ 59 - 50
js/component/manageCenter/servicesManage/patent/comPatentAdd.jsx

@@ -1,9 +1,9 @@
 import React from 'react';
-import { Icon, Modal, Button, Form, Upload, message, Input, Spin, Checkbox,Select } from 'antd';
+import { Icon, Modal, Button, Form, Upload, message, Input, Spin, Checkbox, Select } from 'antd';
 import './comprehensive.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
-import { getBase64,beforeUpload } from '../../../tools.js';
+import { getBase64, beforeUpload } from '../../../tools.js';
 
 class Avatar extends React.Component {
     constructor(props) {
@@ -13,12 +13,11 @@ class Avatar extends React.Component {
         }
     }
     handleChange(info) {
-        if ( !this.props.oid ) {
+        if (!this.props.oid || this.props.oid === "") {
             message.warning('请先选择公司!');
             return;
-        }
+        };
         if (info.file.status === 'done') {
-            debugger
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
             this.props.urlData(info.file.response.data);
@@ -32,10 +31,10 @@ class Avatar extends React.Component {
                 name="avatar"
                 showUploadList={false}
                 action={globalConfig.context + "/techservice/patent/patentFile"}
-                data={{ 'sign': this.props.name,'oid':this.props.oid }}
+                data={{ 'sign': this.props.name, 'oid': this.props.oid }}
                 beforeUpload={beforeUpload}
                 onChange={this.handleChange.bind(this)}
-                >
+            >
                 {
                     imageUrl ?
                         <img src={imageUrl} role="presentation" className="avatar" /> :
@@ -63,7 +62,7 @@ const PatentAddFrom = Form.create()(React.createClass({
                 let _me = this;
                 for (var item in data.data) {
                     _me.state.companyOption.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                        <Select.Option value={data.data[item]} key={item}>{data.data[item]}</Select.Option>
                     )
                 };
             }.bind(this),
@@ -77,17 +76,21 @@ const PatentAddFrom = Form.create()(React.createClass({
         return {
             loading: false,
             companyOption: [],
-            firstCheck:0,
-            secondCheck:0,
-            thirdCheck:0
+            firstCheck: 0,
+            secondCheck: 0,
+            thirdCheck: 0
 
         };
     },
-    componentWillMount(){
+    componentWillMount() {
         this.getCompanyList();
     },
     handleSubmit(e) {
         e.preventDefault();
+        if (!this.state.companyName || this.state.companyName === "") {
+            message.warning('请先选择公司!');
+            return;
+        };
         this.props.form.validateFields((err, values) => {
             if (!err) {
                 this.props.spinState(true);
@@ -95,17 +98,18 @@ const PatentAddFrom = Form.create()(React.createClass({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/techservice/patent/clientApplyPatent",
+                    url: globalConfig.context + "/techservice/patent/managerApplyPatent",
                     data: {
-                        'firstInventorIdNumber':values.firstInventorID,
-                        'firstInventorName':values.firstInventorName,
-                        'patentDes':values.intro,
-                        'secondInventorName':values.secondInventorName,
-                        'thirdInventorName':values.thirdInventorName,
-                        'firstInventorIsPublish':this.state.firstCheck,
-                        'secondInventorIsPublish':this.state.secondCheck,
-                        'thirdInventorIsPublish':this.state.thirdCheck,
-                        'patentProryStatementUrl':this.state.avatarUrl
+                        'uid':this.state.companyId,
+                        'firstInventorIdNumber': values.firstInventorID,
+                        'firstInventorName': values.firstInventorName,
+                        'patentDes': values.intro,
+                        'secondInventorName': values.secondInventorName,
+                        'thirdInventorName': values.thirdInventorName,
+                        'firstInventorIsPublish': this.state.firstCheck,
+                        'secondInventorIsPublish': this.state.secondCheck,
+                        'thirdInventorIsPublish': this.state.thirdCheck,
+                        'patentProryStatementUrl': this.state.avatarUrl
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -122,27 +126,27 @@ const PatentAddFrom = Form.create()(React.createClass({
         });
     },
     firstInventorCheck(e) {
-        if ( e.target.checked == true ) {
+        if (e.target.checked == true) {
             this.state.firstCheck = 1;
-        } else if ( e.target.checked == false ) {
+        } else if (e.target.checked == false) {
             this.state.firstCheck = 0;
         }
     },
     secondInventorCheck(e) {
-        if ( e.target.checked == true ) {
+        if (e.target.checked == true) {
             this.state.secondCheck = 1;
-        } else if ( e.target.checked == false ) {
+        } else if (e.target.checked == false) {
             this.state.secondCheck = 0;
         };
     },
     thirdInventorCheck(e) {
-        if ( e.target.checked == true ) {
+        if (e.target.checked == true) {
             this.state.thirdCheck = 1;
-        } else if ( e.target.checked == false ) {
+        } else if (e.target.checked == false) {
             this.state.thirdCheck = 0;
         };
     },
-    avatarUrl(e){
+    avatarUrl(e) {
         this.state.avatarUrl = e;
     },
     render() {
@@ -155,12 +159,17 @@ const PatentAddFrom = Form.create()(React.createClass({
         const _me = this;
         return (
             <Form horizontal onSubmit={this.handleSubmit} className="person-form">
-                <Select placeholder="选择公司" value={this.state.companyName} style={{ width: 200 }} onChange={(e) => { this.setState({ companyName: e }); } }>{this.state.companyOption}</Select>
+                <Select placeholder="选择公司" 
+                filterOption={(input, option) => { 
+                    this.state.companyId = option.key;
+                    option.props.value.indexOf(input) >= 0;
+                }}
+                showSearch={true} style={{ width: 200 }} >{this.state.companyOption}</Select>
                 <FormItem
                     labelCol={{ span: 24 }}
                     wrapperCol={{ span: 18 }}
                     label="专利简要描述"
-                    >
+                >
                     {getFieldDecorator('intro', {
                         initialValue: this.state.intro || null
                     })(
@@ -173,58 +182,58 @@ const PatentAddFrom = Form.create()(React.createClass({
                 <FormItem
                     {...formItemLayout}
                     label="姓名"
-                    >
+                >
                     {getFieldDecorator('firstInventorName', {
                         rules: [{ required: true, message: 'Please input name!' }]
                     })(
-                        <Input className="mini-input"/>
+                        <Input className="mini-input" />
                         )}
-                    <Checkbox onChange={this.firstInventorCheck}>是否公布</Checkbox>
+                    <Checkbox onChange={this.firstInventorCheck}>告知专利局是否公布</Checkbox>
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="身份证"
-                    >
+                >
                     {getFieldDecorator('firstInventorID', {
                         rules: [{ required: true, message: 'Please input ID!' }]
                     })(
-                        <Input className="mini-input"/>
+                        <Input className="mini-input" />
                         )}
                 </FormItem>
                 <p>第二发明人</p>
                 <FormItem
                     {...formItemLayout}
                     label="姓名"
-                    >
+                >
                     {getFieldDecorator('secondInventorName')(
-                        <Input className="mini-input"/>
-                        )}
-                    <Checkbox onChange={this.secondInventorCheck}>是否公布</Checkbox>
+                        <Input className="mini-input" />
+                    )}
+                    <Checkbox onChange={this.secondInventorCheck}>告知专利局是否公布</Checkbox>
                 </FormItem>
                 <p>第三发明人</p>
                 <FormItem
                     {...formItemLayout}
                     label="姓名"
-                    >
+                >
                     {getFieldDecorator('thirdInventorName')(
-                        <Input className="mini-input"/>
-                        )}
-                    <Checkbox onChange={this.thirdInventorCheck}>是否公布</Checkbox>
+                        <Input className="mini-input" />
+                    )}
+                    <Checkbox onChange={this.thirdInventorCheck}>告知专利局是否公布</Checkbox>
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="上传代理委托书"
                     labelCol={{ span: 24 }}
                     wrapperCol={{ span: 12 }}
-                    >
+                >
                     {getFieldDecorator('avatar')(
-                        <Avatar urlData={this.avatarUrl} name='patent_prory_statement' oid={this.state.companyName}/>
+                        <Avatar urlData={this.avatarUrl} name='patent_prory_statement' oid={this.state.companyName} />
                     )}
-                    <span>请上传专利代理委托书</span><a onClick={()=>{window.open(globalConfig.context + "/techservice/patent/downLoadTemplate")}}>模板下载</a>
+                    <span>请上传专利代理委托书</span><a onClick={() => { window.open(globalConfig.context + "/techservice/patent/downLoadTemplate") }}>模板下载</a>
                 </FormItem>
                 <FormItem>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
-                    <Button type="ghost" style={{marginLeft:'20px'}} onClick={this.props.closeModal}>取消</Button>
+                    <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
                 </FormItem>
             </Form >
         );
@@ -268,8 +277,8 @@ const PatentAdd = React.createClass({
                         onOk={this.handleOk} onCancel={this.handleCancel}
                         width='800px'
                         footer=''
-                        >
-                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel}/>
+                    >
+                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} />
                     </Modal>
                 </Spin>
             </div>

+ 15 - 11
js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx

@@ -64,7 +64,7 @@ const PatentDesc = React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/techservice/patent/patentProcess",
             data: {
-                pid: this.state.pid
+                pid: this.state.xid
             }
         }), $.ajax({
             method: "get",
@@ -79,7 +79,7 @@ const PatentDesc = React.createClass({
             let _me = this;
             data1[0].data.map(function (item) {
                 _me.state.patentProcessList.push(
-                    <p className="patent-process-list" key={item.recordTime}>
+                    <p className="patent-process-list" key={item.id}>
                         <span>专利状态: {getPatentState(item.state)}</span>
                         <span>处理时间: {getTime(item.recordTime)}</span>
                         <span>负责人:{item.principal}</span>
@@ -141,8 +141,8 @@ const PatentDesc = React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/techservice/patent/managePatentInfo",
             data: {
-                "pid": this.props.data.pid,
-                "patentNumber": this.state.patentNum,
+                "xid": this.state.xid,
+                "patentNumber": this.state.patentNumber,
                 "patentName": this.state.patentName,
                 "patentCatagory": this.state.patentType,
                 "patentField": this.state.patentField,
@@ -151,7 +151,7 @@ const PatentDesc = React.createClass({
                 "authorizationNoticeUrl": this.state.authorizationNoticeUrl,
                 "patentCertificateUrl": this.state.patentCertificateUrl,
                 "state": this.state.patentStateAdd,
-                "recordTimeFromattedDate": this.state.recordTime,
+                "recordTimeFormattedDate": this.state.recordTime,
                 "principal": this.state.adminName
             }
         }).done(function (data) {
@@ -180,16 +180,20 @@ const PatentDesc = React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         let _me = this;
+        this.state.patentStateAdd ='';
+        this.state.adminName ='';
+        this.state.recordTime = '';
         this.state.adminOption = [];
         this.state.patentProcessList = [];
         this.state.visible = nextProps.showDesc;
         if (nextProps.data) {
-            this.state.pid = nextProps.data.pid;
+            this.state.xid = nextProps.data.pid;
             this.state.patentDes = nextProps.data.patentDes;
             this.state.patentName = nextProps.data.patentName;
-            this.state.patentNum = nextProps.data.patentNum;
-            this.state.patentState = nextProps.data.patentState;
-            this.state.patentField = nextProps.data.patentField;
+            this.state.patentNumber = nextProps.data.patentNumber;
+            this.state.patentType = String(nextProps.data.patentType);
+            this.state.patentState = String(nextProps.data.patentState);
+            this.state.patentField = String(nextProps.data.patentField);
             this.loadData();
             this.getOption();
         }
@@ -234,7 +238,7 @@ const PatentDesc = React.createClass({
                             </div>
                             <div>
                                 <p className="widthHalf"><span className="two2four">编号</span>:{theData.number}</p>
-                                <p className="widthHalf"><span className="seven2eight">申请号/专利号</span>:<Input value={this.state.patentNum} onChange={(e) => { this.setState({ patentNum: e.target.value }); }} /></p>
+                                <p className="widthHalf"><span className="seven2eight">申请号/专利号</span>:<Input value={this.state.patentNumber} onChange={(e) => { this.setState({ patentNumber: e.target.value }); }} /></p>
                             </div>
                             <div>
                                 <p className="widthHalf"><span>专利名称:</span><Input value={this.state.patentName} onChange={(e) => { this.setState({ patentName: e.target.value }); }} /></p>
@@ -291,7 +295,7 @@ const PatentDesc = React.createClass({
                                 </div>
                                 <p className="widthThird">
                                     <span>处理时间:</span>
-                                    <DatePicker onChange={(data,dataString)=>{this.state.recordTime = dataString}}/>
+                                    <DatePicker defaultValue={null} onChange={(data,dataString)=>{this.state.recordTime = dataString}}/>
                                 </p>
                                 <div className="widthThird">
                                     <span>负责人:</span>

+ 14 - 12
js/component/manageCenter/servicesManage/patent/comprehensive.jsx

@@ -46,14 +46,14 @@ const Patent = React.createClass({
                         key: i,
                         pid: thisdata.pid,
                         oid: thisdata.oid,
-                        number: thisdata.serialNumber,
-                        patentNumber: thisdata.patentNumber,
-                        unitName: thisdata.unitName,
-                        patentName: thisdata.patentName,
-                        patentType: thisdata.patentCatagory,
-                        patentState: thisdata.patentState,
-                        patentField: thisdata.patentField,
-                        patentDes: thisdata.patentDes,
+                        number: thisdata.serialNumber || '',
+                        patentNumber: thisdata.patentNumber || '',
+                        unitName: thisdata.unitName || '',
+                        patentName: thisdata.patentName || '',
+                        patentType: thisdata.patentCatagory || '0',
+                        patentState: thisdata.patentState || '0',
+                        patentField: thisdata.patentField || '0',
+                        patentDes: thisdata.patentDes || '',
                         patentProryStatementUrl: thisdata.patentProryStatementUrl, //专利代理委托书
                         patentWritingUrl: thisdata.patentWritingUrl, //专利稿件
                         authorizationNoticeUrl: thisdata.authorizationNoticeUrl, //授权通知书
@@ -62,6 +62,7 @@ const Patent = React.createClass({
                         startTime: thisdata.patentApplicationDate,
                         endTime: thisdata.authorizedDate,
                         orgCode: thisdata.orgCode,
+                        province:thisdata.locationProvince,
                         companyAddress: thisdata.locationProvince + '/' + thisdata.locationCity + '/' + thisdata.locationArea,
                         companyContacts: thisdata.contacts, //联系人
                         firstInventorName: thisdata.firstInventorName,
@@ -200,8 +201,8 @@ const Patent = React.createClass({
                     key: 'province',
                 }, {
                     title: '公司名称',
-                    dataIndex: 'companyName',
-                    key: 'companyName',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
                 }, {
                     title: '专利名称',
                     dataIndex: 'patentName',
@@ -213,8 +214,8 @@ const Patent = React.createClass({
                     render: text => { return getPatentState(text) },
                 }, {
                     title: '派单日',
-                    dataIndex: 'createtime',
-                    key: 'createtime',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
                     render: text => { return getTime(text) },
                 }, {
                     title: '申请日',
@@ -264,6 +265,7 @@ const Patent = React.createClass({
     },
     closeDesc(e) {
         this.state.showDesc = e;
+        this.loadData();
     },
     search() {
         this.loadData();

+ 6 - 0
js/component/manageCenter/servicesManage/patent/content.jsx

@@ -20,6 +20,12 @@ const Content = React.createClass({
         this.setState({
             leftKey: key,
         });
+        window.location.hash = key;
+    },
+    componentWillMount(){
+        if ( window.location.hash ) {
+            this.handlekey(window.location.hash.substr(1));
+        };
     },
     render() {
         return (

+ 1 - 0
js/component/manageCenter/servicesManage/patent/correction.jsx

@@ -40,6 +40,7 @@ const Correction = React.createClass({
                         patentType: thisdata.patentCatagory,
                         patentName: thisdata.patentName,
                         patentState: thisdata.patentState,
+                        province:thisdata.locationProvince,
                         endData:[thisdata.patentCatagory,thisdata.authorizedDate],
                         author: thisdata.author,
                         authorizedDate: thisdata.authorizedDate

+ 1 - 1
js/component/manageCenter/topTab.jsx

@@ -38,7 +38,7 @@ const TopTab = React.createClass({
                     <div className="acc-index-imgbox">
                         <img src={logo} alt="" />
                     </div>
-                    <span><a href="./index.html">管理中心首页</a></span>
+                    <span><a href="../index.html">管理中心首页</a></span>
                 </div>
                 <div className="acc-top-tab">
                     <Row>

+ 1 - 1
js/component/sign/account.jsx

@@ -41,7 +41,7 @@ const LoginContent = Form.create()(React.createClass({
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
-                        window.location.href = "/login.html"
+                        window.location.href = "./login.html?1"
                     } else {
                         message.warning(data.error[0].message);
                         document.getElementById('VCode').src=globalConfig.context + '/open/getVCode?t=' + Math.random();

+ 1 - 1
js/component/sign/groupAccount.jsx

@@ -40,7 +40,7 @@ const Group = Form.create()(React.createClass({
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
-                        window.location.href = "/login.html"
+                        window.location.href = "./login.html"
                     } else {
                         message.warning(data.error[0].message);
                         document.getElementById('VCode').src=globalConfig.context + '/open/getVCode?t=' + Math.random();