wubb 8 年之前
父节点
当前提交
55b37bc11a
共有 76 个文件被更改,包括 1657 次插入943 次删除
  1. 1 0
      .gitignore
  2. 4 0
      entry.js
  3. 1 1
      js/component/account/bottom.less
  4. 2 2
      js/component/account/index/content.jsx
  5. 3 1
      js/component/account/leftTab.less
  6. 36 18
      js/component/account/services/achievement.jsx
  7. 33 21
      js/component/account/services/activityCostList.jsx
  8. 18 12
      js/component/account/services/annualReport.jsx
  9. 46 18
      js/component/account/services/cognizance.jsx
  10. 2 2
      js/component/account/services/content.jsx
  11. 31 17
      js/component/account/services/finance.jsx
  12. 33 16
      js/component/account/services/honorList.jsx
  13. 12 5
      js/component/account/services/intellectual.jsx
  14. 20 7
      js/component/account/services/intellectualDesc.jsx
  15. 2 11
      js/component/account/services/leftTab.jsx
  16. 33 24
      js/component/account/services/orgTechCenter.jsx
  17. 16 11
      js/component/account/services/patent.jsx
  18. 29 21
      js/component/account/services/patent.less
  19. 43 73
      js/component/account/services/patentAdd.jsx
  20. 56 27
      js/component/account/services/patentDesc.jsx
  21. 35 20
      js/component/account/services/ratepay.jsx
  22. 14 8
      js/component/account/services/standard.jsx
  23. 37 17
      js/component/account/services/techProduct.jsx
  24. 7 1
      js/component/account/services/techProduct.less
  25. 2 2
      js/component/account/set/base.jsx
  26. 130 61
      js/component/account/set/company.jsx
  27. 9 10
      js/component/account/set/group.jsx
  28. 76 50
      js/component/account/set/hrSituation.jsx
  29. 4 6
      js/component/account/set/person.less
  30. 3 0
      js/component/dataDic.js
  31. 16 16
      js/component/groupCertify/certify.less
  32. 34 34
      js/component/groupCertify/personal.jsx
  33. 2 2
      js/component/groupCertify/result.jsx
  34. 3 2
      js/component/groupCertify/top.jsx
  35. 9 1
      js/component/login/adminLogin.less
  36. 1 1
      js/component/login/login.less
  37. 3 1
      js/component/manageCenter/leftTab.less
  38. 92 27
      js/component/manageCenter/servicesManage/highTech/HighTechApply.jsx
  39. 23 13
      js/component/manageCenter/servicesManage/highTech/fosterDesc/achievement.jsx
  40. 21 16
      js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx
  41. 35 29
      js/component/manageCenter/servicesManage/highTech/fosterDesc/activityCostList.jsx
  42. 12 8
      js/component/manageCenter/servicesManage/highTech/fosterDesc/annualReport.jsx
  43. 25 15
      js/component/manageCenter/servicesManage/highTech/fosterDesc/finance.jsx
  44. 25 13
      js/component/manageCenter/servicesManage/highTech/fosterDesc/honorList.jsx
  45. 43 20
      js/component/manageCenter/servicesManage/highTech/fosterDesc/hrSituation.jsx
  46. 6 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectual.jsx
  47. 34 20
      js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectualDesc.jsx
  48. 47 32
      js/component/manageCenter/servicesManage/highTech/fosterDesc/orgTechCenter.jsx
  49. 27 17
      js/component/manageCenter/servicesManage/highTech/fosterDesc/ratepay.jsx
  50. 5 3
      js/component/manageCenter/servicesManage/highTech/fosterDesc/standard.jsx
  51. 20 12
      js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx
  52. 7 1
      js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.less
  53. 15 3
      js/component/manageCenter/servicesManage/highTech/highTechFoster.jsx
  54. 4 2
      js/component/manageCenter/servicesManage/patent/applyFee.jsx
  55. 1 1
      js/component/manageCenter/servicesManage/patent/applyFeeDesc.jsx
  56. 3 3
      js/component/manageCenter/servicesManage/patent/clientInputPatent.jsx
  57. 7 10
      js/component/manageCenter/servicesManage/patent/comPatentAdd.jsx
  58. 33 31
      js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx
  59. 12 3
      js/component/manageCenter/servicesManage/patent/comprehensive.jsx
  60. 5 16
      js/component/manageCenter/servicesManage/patent/comprehensive.less
  61. 4 2
      js/component/manageCenter/servicesManage/patent/correction.jsx
  62. 1 1
      js/component/manageCenter/servicesManage/patent/correctionDesc.jsx
  63. 4 2
      js/component/manageCenter/servicesManage/patent/express.jsx
  64. 1 1
      js/component/manageCenter/servicesManage/patent/expressDesc.jsx
  65. 4 2
      js/component/manageCenter/servicesManage/patent/payment.jsx
  66. 1 1
      js/component/manageCenter/servicesManage/patent/paymentDesc.jsx
  67. 1 1
      js/component/manageCenter/topTab.jsx
  68. 72 51
      js/component/manageCenter/userManage/orgCertify.jsx
  69. 10 3
      js/component/manageCenter/userManage/orgDesc.jsx
  70. 84 4
      js/component/manageCenter/userManage/orgList.jsx
  71. 66 49
      js/component/manageCenter/userManage/userDesc.jsx
  72. 75 5
      js/component/manageCenter/userManage/userList.jsx
  73. 12 3
      js/component/manageCenter/userManage/userList.less
  74. 1 1
      js/component/sign/account.jsx
  75. 1 1
      js/component/sign/groupAccount.jsx
  76. 12 0
      js/component/tools.js

+ 1 - 0
.gitignore

@@ -28,3 +28,4 @@ node_modules
 clean.sh
 build
 .project
+.vscode

+ 4 - 0
entry.js

@@ -17,8 +17,12 @@ module.exports = {
     //admin-servicesManage
     'admin/servicesManage/patent': './js/admin/servicesManage/patent.js',
     'admin/servicesManage/copyright': './js/admin/servicesManage/copyright.js',
+<<<<<<< HEAD
     'admin/servicesManage/highTech': './js/admin/servicesManage/highTech.js',
     'admin/servicesManage/technology': './js/admin/servicesManage/technology.js'
+=======
+    'admin/servicesManage/highTech': './js/admin/servicesManage/highTech.js'
+>>>>>>> 8ef5b05a87b98526eca6dd95b920f31c23faf073
   },
   watch: {
     'user/index': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port

+ 1 - 1
js/component/account/bottom.less

@@ -2,7 +2,7 @@
         width: 100%;
         color: #d5e4f7;
         background: #212831;
-        position: absolute;
+        position: fixed;
         bottom: 0;
         left: 0;
         z-index: 1;

+ 2 - 2
js/component/account/index/content.jsx

@@ -81,8 +81,8 @@ const Content = React.createClass({
                                     <p className="acc-title">{this.state.number}</p>
                                     <div className="userdata-img">
                                         {this.state.type == 0 ?
-                                        <img src={globalConfig.staticHost + "/upload" + this.state.personPortraitUrl} alt="" /> : 
-                                        <img src={globalConfig.staticHost + "/upload" + this.state.logoUrl} alt="" />}
+                                        <img src={globalConfig.avatarHost + "/upload" + this.state.personPortraitUrl} alt="" /> : 
+                                        <img src={globalConfig.avatarHost + "/upload" + this.state.logoUrl} alt="" />}
                                     </div>
                                     <div className="userdata-content">
                                         {(() => {

+ 3 - 1
js/component/account/leftTab.less

@@ -2,9 +2,11 @@
     .account-left {
         width: 16%;
         height: 100%;
-        padding-top: 40px;
+        margin-top: 40px;
+        padding-bottom: 50px;
         float: left;
         border-right: none;
+        overflow-y: auto;
         //background: #e8f2fc;
         .ant-menu-submenu {
             .ant-menu-submenu-title {

+ 36 - 18
js/component/account/services/achievement.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { getConversionForm, beforeUploadFile } from '../../tools.js';
+import { getConversionForm, beforeUploadFile, downloadFile } from '../../tools.js';
 import { conversionFormList, technicalSourceList } from '../../dataDic.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -71,7 +71,7 @@ const AchievementDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -82,6 +82,11 @@ const AchievementDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -156,8 +161,9 @@ const AchievementDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'enclosure' }}
+                        data={{ 'sign': 'achievement' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -165,17 +171,19 @@ const AchievementDescFrom = Form.create()(React.createClass({
                             if (info.file.status === 'done') {
                                 if (!info.file.response.error.length) {
                                     message.success(`${info.file.name} 文件上传成功!`);
-                                    this.state.enclosureUrl = info.file.response.data;
                                 } else {
                                     message.warning(info.file.response.error[0].message);
+                                    return;
                                 };
+                                this.state.enclosureUrl = info.file.response.data;
                             } else if (info.file.status === 'error') {
                                 message.error(`${info.file.name} 文件上传失败。`);
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传件 </Button>
+                        <Button><Icon type="upload" /> 上传科技成果附件 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ? <a onClick={downloadFile.bind(null, theData.enclosureUrl, theData.enclosureDownloadFileName)}>{theData.enclosureDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -205,7 +213,7 @@ const AchievementDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -229,8 +237,9 @@ const AchievementDesc = React.createClass({
                     >
                         <AchievementDescFrom
                             data={this.props.data}
+                            visible={this.state.visible}
                             activityNumberList={this.props.activityNumberList}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -261,12 +270,18 @@ const Achievement = React.createClass({
         })).done((data1, data2) => {
             let data = data1[0];
             let activityNumber = data2[0];
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data || !data.data.list) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                };
                 return;
             };
-            if (activityNumber.error.length || !activityNumber.data) {
-                message.warning(activityNumber.error[0].message);
+            if (!activityNumber.data) {
+                if (activityNumber.error && activityNumber.error.length) {
+                    message.warning(activityNumber.error[0].message);
+                    this.state.ButtonDisabled = true;
+                };
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -281,6 +296,8 @@ const Achievement = React.createClass({
                     conversionResult: thisdata.conversionResult,
                     year: thisdata.year,
                     enclosureUrl: thisdata.enclosureUrl,
+                    enclosureDownloadFileName: thisdata.enclosureDownloadFileName,
+                    enclosure: [thisdata.enclosureUrl, thisdata.enclosureDownloadFileName]
                 });
             };
             this.state.activityNumberList = activityNumber.data;
@@ -337,12 +354,10 @@ const Achievement = React.createClass({
                     key: 'conversionResult',
                 }, {
                     title: '相关附件',
-                    dataIndex: 'enclosureUrl',
-                    key: 'enclosureUrl',
+                    dataIndex: 'enclosure',
+                    key: 'enclosure',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -390,9 +405,11 @@ const Achievement = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -419,6 +436,7 @@ const Achievement = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 33 - 21
js/component/account/services/activityCostList.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Upload, Button, Input, Spin, Table, message, Select, Modal, DatePicker, InputNumber } from 'antd';
 import './activityCostList.less';
-import { beforeUploadFile,downloadFile } from '../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -13,14 +13,6 @@ const ActivityDescFrom = Form.create()(React.createClass({
             activityNumberOption: [],
         };
     },
-    componentWillMount() {
-        let _me = this;
-        this.props.activityNumberList.map(function (item) {
-            _me.state.activityNumberOption.push(
-                <Select.Option value={item.aid} key={item.uid}>{item.activityNumber}</Select.Option>
-            )
-        });
-    },
     allCostCount() {
         this.state.internalAllCost = this.props.form.getFieldValue('internalLaborCost') + this.props.form.getFieldValue('internalDirectCost') +
             this.props.form.getFieldValue('internalDepreciationCost') + this.props.form.getFieldValue('internalAmortizationCost') +
@@ -37,8 +29,15 @@ const ActivityDescFrom = Form.create()(React.createClass({
             loading: false
         });
     },
-    componentWillReceiveProps() {
+    componentWillReceiveProps(nextProps) {
         this.allCostCount();
+        let _me = this;
+        if (!this.props.visible && nextProps.visible && nextProps.activityNumberList)
+            nextProps.activityNumberList.map(function (item) {
+                _me.state.activityNumberOption.push(
+                    <Select.Option value={item.aid} key={item.uid}>{item.activityNumber}</Select.Option>
+                )
+            });
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -78,7 +77,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.closeModal();
+                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
@@ -290,7 +289,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传研发费用台账 </Button>
                     </Upload>
-                    <p>{theData.accountUrl ? <a onClick={downloadFile.bind(null, theData.accountUrl, theData.accountDownloadFileName)}>{theData.accountDownloadFileName}</a> : <span>未上传!</span>}</p>
+                    <p style={{ marginTop: '20px' }}>{theData.accountUrl ? <a onClick={downloadFile.bind(null, theData.accountUrl, theData.accountDownloadFileName)}>{theData.accountDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -320,7 +319,7 @@ const ActivityDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -342,8 +341,12 @@ const ActivityDesc = React.createClass({
                         width='800px'
                         footer=''
                     >
-                        <ActivityDescFrom data={this.props.data} activityNumberList={this.props.activityNumberList}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <ActivityDescFrom data={this.props.data}
+                            visible={this.state.visible}
+                            activityNumberList={this.props.activityNumberList}
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -377,12 +380,18 @@ const Activity = React.createClass({
         })).done((data1, data2) => {
             let data = data1[0];
             let activityNumber = data2[0];
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data || !data.data.list) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                };
                 return;
             };
-            if (activityNumber.error.length || !activityNumber.data) {
-                message.warning(activityNumber.error[0].message);
+            if (!activityNumber.data) {
+                if (activityNumber.error && activityNumber.error.length) {
+                    message.warning(activityNumber.error[0].message);
+                    this.state.ButtonDisabled = true;
+                };
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -566,9 +575,11 @@ const Activity = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -610,6 +621,7 @@ const Activity = React.createClass({
                     <Button onClick={this.reset}>重置</Button>
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 18 - 12
js/component/account/services/annualReport.jsx

@@ -46,7 +46,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -329,13 +329,13 @@ const AnnualReportDesc = React.createClass({
                 year: this.props.data ? this.props.data.year : (new Date().getFullYear() - 1)
             }
         }).done((data) => {
-            if (!data.data) {
+            let thisdata = data.data;
+            if (!thisdata) {
                 if (data.error && data.error.length) {
                     message.warning(data.error[0].message);
-                }
-                return;
+                };
+                thisdata = {};
             };
-            let thisdata = data.data;
             this.state.detailData = {
                 id: thisdata.id,
                 uid: thisdata.uid,
@@ -403,7 +403,7 @@ const AnnualReportDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -428,7 +428,7 @@ const AnnualReportDesc = React.createClass({
                         <AnnualReportDescFrom
                             data={this.props.data}
                             detailData={this.state.detailData}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -492,7 +492,7 @@ const AnnualReportAdd = React.createClass({
                 this.setState({
                     visible: false
                 });
-                this.props.closeAdd(false);
+                this.props.closeAdd(false, true);
             } else {
                 message.warning(data.error[0].message);
                 this.setState({
@@ -583,6 +583,7 @@ const AnnualReport = React.createClass({
             if (!data.data || !data.data.list) {
                 if (data.error.length) {
                     message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
                 };
                 return;
             };
@@ -699,18 +700,22 @@ const AnnualReport = React.createClass({
     //         this.loadData();
     //     }.bind(this));
     // },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     addClick() {
         this.setState({
             showAdd: true
         });
     },
-    closeAdd(e) {
+    closeAdd(e, s) {
         this.state.showAdd = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     // search() {
     //     this.loadData();
@@ -737,6 +742,7 @@ const AnnualReport = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.addClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff", display: 'none' }}
                             disabled={!hasSelected}

+ 46 - 18
js/component/account/services/cognizance.jsx

@@ -165,7 +165,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.form.resetFields();
                         this.state.targetKeys = [];
                         this.state.selectedKeys = [];
@@ -209,10 +209,17 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                             <span className="item-title">公司地址: </span>
                             <span>{theData.postalAddress}</span>
                         </div>
-                        <div className="half-item">
-                            <span className="item-title">联系人: </span>
-                            <span>{theData.contacts}</span>
-                        </div>
+                        <FormItem className="half-item"
+                            labelCol={{ span: 6 }}
+                            wrapperCol={{ span: 14 }}
+                        >
+                            {getFieldDecorator('contacts', {
+                                rules: [{ required: true, message: '此项为必填项!' }],
+                                initialValue: theData.contacts
+                            })(
+                                <Select placeholder='选择一个联系人'>{this.props.contactsOption}</Select>
+                                )}
+                        </FormItem>
                     </div>
                     <FormItem style={{ width: '50%' }}
                         labelCol={{ span: 0 }}
@@ -338,7 +345,7 @@ const CognizanceDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -362,8 +369,11 @@ const CognizanceDesc = React.createClass({
                     >
                         <CognizanceDescFrom
                             visible={this.state.visible}
+                            contactsOption={this.props.contactsOption}
                             data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -433,7 +443,7 @@ const CognizanceAdd = React.createClass({
                 this.setState({
                     visible: false
                 });
-                this.props.closeAdd(false);
+                this.props.closeAdd(false, true);
             } else {
                 message.warning(data.error[0].message);
                 this.setState({
@@ -478,7 +488,7 @@ const CognizanceAdd = React.createClass({
                         </div>
                         <div className="half-item">
                             <span>选择联系人: </span>
-                            <Select placeholder="请选择年份" style={{ width: 200 }}
+                            <Select placeholder="请选择联系人" style={{ width: 200 }}
                                 onSelect={(e, n) => { this.state.contacts = e }}>
                                 {this.props.contactsOption}
                             </Select>
@@ -520,21 +530,22 @@ const Cognizance = React.createClass({
             this.state.data = [];
             if (data1[0].error || !data1[0].data) {
                 if (data1[0].error.length) {
-                    message.warning(data.error[0].message);
+                    message.warning(data1[0].error[0].message);
                     return;
                 };
             };
             if (data2[0].error || !data2[0].data || !data2[0].data.list) {
                 if (data2[0].error.length) {
                     message.warning(data2[0].error[0].message);
+                    this.state.ButtonDisabled = true;
                     return;
                 };
             };
             let _me = this;
             for (let item in data1[0].data) {
-                let theData = item + ' -- ' + data1[0].data[item];
+                let theData = data1[0].data[item];
                 _me.state.contactsOption.push(
-                    <Select.Option value={theData} key={theData}>{theData}</Select.Option>
+                    <Select.Option value={item} key={theData}>{theData}</Select.Option>
                 );
             };
             for (let i = 0; i < data2[0].data.list.length; i++) {
@@ -547,7 +558,11 @@ const Cognizance = React.createClass({
                     serialNumber: thisdata.serialNumber,
                     locationProvince: thisdata.locationProvince,
                     unitName: thisdata.unitName,
-                    contacts: thisdata.contacts,
+                    contacts: [thisdata.contacts, {
+                        '1': thisdata.firstContacts,
+                        '2': thisdata.secondContacts,
+                        '3': thisdata.thirdContacts
+                    }],
                     createTime: thisdata.createTime,
                     comment: thisdata.comment,
                     state: thisdata.state,
@@ -598,7 +613,14 @@ const Cognizance = React.createClass({
                 }, {
                     title: '联系人',
                     dataIndex: 'contacts',
-                    key: 'contacts'
+                    key: 'contacts',
+                    render: (text) => {
+                        for (let item in text[1]) {
+                            if (text[0] == item) {
+                                return text[1][item];
+                            };
+                        };
+                    }
                 }, {
                     title: '派单日',
                     dataIndex: 'createTimeFormattedDate',
@@ -676,13 +698,17 @@ const Cognizance = React.createClass({
     //         this.loadData();
     //     }.bind(this));
     // },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
-    closeAdd(e) {
+    closeAdd(e, s) {
         this.state.showAdd = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     // search() {
     //     this.loadData();
@@ -709,6 +735,7 @@ const Cognizance = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.addClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff", display: 'none' }}
                             disabled={!hasSelected}
@@ -726,6 +753,7 @@ const Cognizance = React.createClass({
                 </div>
                 <CognizanceDesc
                     data={this.state.RowData}
+                    contactsOption={this.state.contactsOption}
                     showDesc={this.state.showDesc}
                     closeDesc={this.closeDesc} />
                 <CognizanceAdd

+ 2 - 2
js/component/account/services/content.jsx

@@ -65,9 +65,9 @@ const Content = React.createClass({
                             case 'orgTechCenter':
                                 return <OrgTechCenter />;
                             case 'annualReport':
-                                return <AnnualReport />;
+                                return <AnnualReport />
                             case 'cognizance':
-                                return <Cognizance />;
+                                return <Cognizance />
                         };
                     })()}
                 </div>

+ 31 - 17
js/component/account/services/finance.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { beforeUpload } from '../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -56,7 +56,7 @@ const FinanceDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -67,6 +67,11 @@ const FinanceDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -211,8 +216,9 @@ const FinanceDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'finance' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'finance_' + (this.state.year || theData.year) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -230,8 +236,9 @@ const FinanceDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传文件 </Button>
+                        <Button><Icon type="upload" /> 上传企业财务报表 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.financeUrl ? <a onClick={downloadFile.bind(null, theData.financeUrl, theData.financeDownloadFileName)}>{theData.financeDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -261,7 +268,7 @@ const FinanceDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -284,8 +291,9 @@ const FinanceDesc = React.createClass({
                         footer=''
                     >
                         <FinanceDescFrom
+                            visible={this.state.visible}
                             data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -309,8 +317,11 @@ const Finance = React.createClass({
                 pageSize: this.state.pagination.pageSize,
             }
         }).done((data) => {
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                }
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -331,7 +342,9 @@ const Finance = React.createClass({
                     netProfit: thisdata.netProfit,
                     salesRevenue: thisdata.salesRevenue,
                     year: thisdata.year,
-                    financeUrl: thisdata.financeUrl
+                    financeUrl: thisdata.financeUrl,
+                    financeDownloadFileName: thisdata.financeDownloadFileName,
+                    finance: [thisdata.financeUrl, thisdata.financeDownloadFileName]
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -394,12 +407,10 @@ const Finance = React.createClass({
                     key: 'netAsset',
                 }, {
                     title: '相关附件',
-                    dataIndex: 'financeUrl',
-                    key: 'financeUrl',
+                    dataIndex: 'finance',
+                    key: 'finance',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -447,9 +458,11 @@ const Finance = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -476,6 +489,7 @@ const Finance = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 33 - 16
js/component/account/services/honorList.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Modal, Upload, DatePicker } from 'antd';
 import './techProduct.less';
-import { beforeUploadFile } from '../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -32,7 +32,7 @@ const HonorListDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -43,6 +43,11 @@ const HonorListDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -93,8 +98,9 @@ const HonorListDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'enclosure' }}
+                        data={{ 'sign': 'achievement' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -112,8 +118,9 @@ const HonorListDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传件 </Button>
+                        <Button><Icon type="upload" /> 上传科技成果附件 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ? <a onClick={downloadFile.bind(null, theData.enclosureUrl, theData.enclosureDownloadFileName)}>{theData.enclosureDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -143,7 +150,7 @@ const HonorListDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -165,8 +172,12 @@ const HonorListDesc = React.createClass({
                         width='800px'
                         footer=''
                     >
-                        <HonorListDescFrom data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <HonorListDescFrom
+                            data={this.props.data}
+                            spinState={this.spinChange}
+                            visible={this.state.visible}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -190,8 +201,11 @@ const HonorList = React.createClass({
                 pageSize: this.state.pagination.pageSize
             }
         }).done((data) => {
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                }
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -203,6 +217,8 @@ const HonorList = React.createClass({
                     name: thisdata.name,
                     issuingTime: thisdata.issuingTime,
                     enclosureUrl: thisdata.enclosureUrl,
+                    enclosureDownloadFileName: thisdata.enclosureDownloadFileName,
+                    enclosure: [thisdata.enclosureUrl, thisdata.enclosureDownloadFileName],
                     issuingTimeFormattedDate: thisdata.issuingTimeFormattedDate,
                     issuingMechanism: thisdata.issuingMechanism
                 });
@@ -251,12 +267,10 @@ const HonorList = React.createClass({
                     key: 'issuingMechanism'
                 }, {
                     title: '相关附件',
-                    dataIndex: 'enclosureUrl',
-                    key: 'enclosureUrl',
+                    dataIndex: 'enclosure',
+                    key: 'enclosure',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -304,9 +318,11 @@ const HonorList = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -333,6 +349,7 @@ const HonorList = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 12 - 5
js/component/account/services/intellectual.jsx

@@ -26,8 +26,11 @@ const Intellectual = React.createClass({
                 endDate: this.state.endDateFormattedDate
             }
         }).done((data) => {
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                }
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -45,6 +48,8 @@ const Intellectual = React.createClass({
                     authorizationDate: thisdata.authorizationDate,
                     evaluationCategory: thisdata.evaluationCategory,
                     authorizationDateFormattedDate: thisdata.authorizationDateFormattedDate,
+                    propertyRightUrl: thisdata.propertyRightUrl,
+                    propertyRightDownloadFileName: thisdata.propertyRightDownloadFileName
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -153,9 +158,11 @@ const Intellectual = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -193,7 +200,7 @@ const Intellectual = React.createClass({
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
                     <p>
-                        <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                        <Button disabled={this.state.ButtonDisabled} style={{ background: "#ea0862", border: "none", color: "#fff" }}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 20 - 7
js/component/account/services/intellectualDesc.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { Icon, Modal, Button, Form, message, Input, Spin, Select, DatePicker, Upload } from 'antd';
 import './patent.less';
 import { intellectualGetList, catagoryList } from '../../dataDic.js';
-import { beforeUploadFile } from '../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -57,7 +57,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.closeModal();
+                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
@@ -70,6 +70,11 @@ const IntellectualDescFrom = Form.create()(React.createClass({
             callback();
         }
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -78,6 +83,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
             wrapperCol: { span: 12 },
         };
         const _me = this;
+        const theData = this.props.data;
         return (
             <Form horizontal onSubmit={this.handleSubmit}>
                 <FormItem
@@ -164,12 +170,13 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                             onChange={(data, dataString) => { this.state.authorizationDateFormattedDate = dataString }} />
                         )}
                 </FormItem>
-                <FormItem>
+                <div>
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'propertyRight' }}
+                        data={{ 'sign': 'property_ritht' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -189,7 +196,8 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传知识产权证书 </Button>
                     </Upload>
-                </FormItem>
+                    <p style={{ margin: '10px 0' }}>{theData.propertyRightUrl ? <a onClick={downloadFile.bind(null, theData.propertyRightUrl, theData.propertyRightDownloadFileName)}>{theData.propertyRightDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                </div>
                 <FormItem>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                     <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
@@ -219,7 +227,7 @@ const intellectualDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -241,7 +249,12 @@ const intellectualDesc = React.createClass({
                         width='600px'
                         footer=''
                     >
-                        <IntellectualDescFrom data={this.props.data} spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <IntellectualDescFrom
+                            visible={this.state.visible}
+                            data={this.props.data}
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>

+ 2 - 11
js/component/account/services/leftTab.jsx

@@ -13,8 +13,7 @@ const LeftTab = React.createClass({
             keyList: [
                 { key: 'sub1', value: ['patent', 'software', 'intellectual'] },
                 { key: 'sub2', value: ['standard', 'activity', 'activityCostList', 'orgTechCenter', 'techProduct', 'ratepay', 'finance', 'achievement', 'honorList','annualReport','cognizance'] },
-                { key: 'sub3', value: [] },
-                { key: 'sub4', value: ['applyManage', 'websiteManage'] }
+                { key: 'sub3', value: [] }
             ]
         };
     },
@@ -93,15 +92,7 @@ const LeftTab = React.createClass({
                         企业年报
                     </Menu.Item>
                 </SubMenu>
-                <SubMenu key="sub3" title={<span>软著申请</span>}>
-                </SubMenu>
-                <SubMenu key="sub4" title={<span>科技项目申报</span>}>
-                	<Menu.Item key="applyManage">
-                        申报管理
-                    </Menu.Item>
-                    <Menu.Item key="websiteManage">
-                        科技部门网址管理
-                    </Menu.Item>
+                <SubMenu key="sub3" title={<span>科技项目申报</span>}>
                 </SubMenu>
             </Menu>
         );

+ 33 - 24
js/component/account/services/orgTechCenter.jsx

@@ -25,15 +25,15 @@ const CenterListDescFrom = Form.create()(React.createClass({
                     data: {
                         id: this.props.data.id,
                         projectName: values.projectName,
-                        projectTime: values.projectTime.format("YYYY-MM-DD"),
+                        projectTimeFormattedDate: values.projectTimeFormattedDate.format("YYYY-MM-DD"),
                         institution: values.institution,
-                        termTime: values.termTime.format("YYYY-MM-DD"),
+                        termTimeFormattedDate: values.termTimeFormattedDate.format("YYYY-MM-DD"),
                         protocolUrl: this.state.protocolUrl
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -105,8 +105,9 @@ const CenterListDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'protocol' }}
+                        data={{ 'sign': 'protocol' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -124,8 +125,9 @@ const CenterListDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传文件 </Button>
+                        <Button><Icon type="upload" /> 上传研发费用台账 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.protocolUrl ? <a onClick={downloadFile.bind(null, theData.protocolUrl, theData.protocolDownloadFileName)}>{theData.protocolDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -155,7 +157,7 @@ const CenterListDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -178,7 +180,7 @@ const CenterListDesc = React.createClass({
                         footer=''
                     >
                         <CenterListDescFrom data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -199,8 +201,11 @@ const CenterList = React.createClass({
             data: {
             }
         }).done((data) => {
-            if (data.error.length || !data.data) {
-                message.warning(data.error[0].message);
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                }
                 return;
             };
             this.state.cid = data.data.id;
@@ -234,8 +239,10 @@ const CenterList = React.createClass({
                 cid: this.state.cid
             }
         }).done((data) => {
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data || !data.data.list) {
+                if (data.error.length) {
+                    message.warning(data.error[0].message);
+                }
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -246,8 +253,9 @@ const CenterList = React.createClass({
                     cid: thisdata.cid,
                     projectTimeFormattedDate: thisdata.projectTimeFormattedDate,
                     projectName: thisdata.projectName,
-                    protocolDownloadFileName:thisdata.protocolDownloadFileName,
+                    protocolDownloadFileName: thisdata.protocolDownloadFileName,
                     protocolUrl: thisdata.protocolUrl,
+                    protocol: [thisdata.protocolUrl, thisdata.protocolDownloadFileName],
                     institution: thisdata.institution,
                     termTimeFormattedDate: thisdata.termTimeFormattedDate
 
@@ -301,12 +309,10 @@ const CenterList = React.createClass({
                     key: 'institution'
                 }, {
                     title: '协议附件',
-                    dataIndex: 'protocolUrl',
-                    key: 'protocolUrl',
+                    dataIndex: 'protocol',
+                    key: 'protocol',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -329,7 +335,7 @@ const CenterList = React.createClass({
             if (rowItem.id) {
                 deletedIds.push(rowItem.id)
             }
-        }
+        };
         this.setState({
             selectedRowKeys: [],
             loading: deletedIds.length > 0
@@ -354,9 +360,11 @@ const CenterList = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     saveCenterDetail() {
         this.setState({
@@ -464,18 +472,19 @@ const CenterList = React.createClass({
                                 }
                             }}
                         >
-                            <Button><Icon type="upload" /> 上传研发费用台账 </Button>
+                            <Button disabled={this.state.ButtonDisabled}><Icon type="upload" /> 上传研发费用台账 </Button>
                         </Upload>
-                        <p style={{ marginTop: '10px' }}>{this.state.systemUrl ? <a onClick={downloadFile.bind(null, this.state.systemUrl, this.state.systemDownloadFileName)}>{this.state.systemDownloadFileName}</a> : <span>未上传!</span>}</p>
+                        <p style={{ marginTop: '10px' }}>{this.state.systemUrl ? <a onClick={downloadFile.bind(null, this.state.systemUrl, this.state.systemDownloadFileName)}>{this.state.systemDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                     </div>
                 </div>
-                <Button type='primary' onClick={this.saveCenterDetail}>保存</Button>
-                <div className="content-title">
+                <Button disabled={this.state.ButtonDisabled} type='primary' onClick={this.saveCenterDetail}>保存</Button>
+                <div className="content-title" style={{marginTop:'10px'}}>
                     <span>产学研情况</span>
                 </div>
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 16 - 11
js/component/account/services/patent.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Alert, Button, Input, Select, Spin, Table } from 'antd';
+import { Icon, Alert, Button, Input, Select, Spin, Table, message } from 'antd';
 import { patentTypeList, patentStateList } from '../../dataDic.js';
 import { getPatentType, getPatentState, getTime } from '../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
@@ -28,14 +28,18 @@ const Patent = React.createClass({
                 patentState: this.state.searchState
             },
             success: function (data) {
-                if (data.error.length || !data.data || !data.data.list) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        this.state.ButtonDisabled = true;
+                    }
                     return;
-                }
+                };
                 for (let i = 0; i < data.data.list.length; i++) {
                     let thisdata = data.data.list[i];
                     this.state.data.push({
                         key: i,
-                        pid:thisdata.id,
+                        pid: thisdata.id,
                         number: thisdata.serialNumber,
                         patentNum: thisdata.patentNumber,
                         patentName: thisdata.patentName,
@@ -47,10 +51,10 @@ const Patent = React.createClass({
                         patentWritingUrl: thisdata.patentWritingUrl, //专利稿件
                         authorizationNoticeUrl: thisdata.authorizationNoticeUrl, //授权通知书
                         patentCertificateUrl: thisdata.patentCertificateUrl, //专利证书
-                        confirmState:thisdata.confirmState, //稿件确认状态
-                        authorizedTime:getTime(thisdata.authorizedDate),
+                        confirmState: thisdata.confirmState, //稿件确认状态
+                        authorizedTime: getTime(thisdata.authorizedDate),
                         startTime: getTime(thisdata.patentApplicationDate),
-                        endTime: getTime(thisdata.patentApplicationDate,2),
+                        endTime: getTime(thisdata.patentApplicationDate, 2),
                         firstInventorName: thisdata.firstInventorName,
                         firstInventorNationality: thisdata.firstInventorNationality, //国籍
                         firstInventorIdNumber: thisdata.firstInventorIdNumber,   //id
@@ -89,7 +93,6 @@ const Patent = React.createClass({
             patentStateOption: [],
             data: [],
             //dataSource: [],
-            download: globalConfig.context + '/api/warningreports/download',
             loading: false,
             pagination: {
                 defaultCurrent: 1,
@@ -160,9 +163,11 @@ const Patent = React.createClass({
             showDesc: true
         });
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.state.searchNum;
@@ -183,7 +188,7 @@ const Patent = React.createClass({
             <div className="patent-content" >
                 <div className="content-title">
                     <span>专利申请管理</span>
-                    {userData.type == '0' ? <span></span> : <PatentAdd closeDesc={this.closeDesc}/>}
+                    {userData.type == '0' ? <span></span> : <PatentAdd ButtonDisabled={this.state.ButtonDisabled} closeDesc={this.closeDesc} />}
                 </div>
                 <Alert style={{ display: this.state.AlertDis }} className="patent-alert" message={this.state.warningText}
                     type="info"

+ 29 - 21
js/component/account/services/patent.less

@@ -55,24 +55,31 @@
         }
     }
     .ant-modal-body {
-        padding:16px 26px;
-        .ant-form-item-label {
-            text-align: left;
+        padding: 16px 26px;
+        .patent-form {
+            .ant-form-item-label {
+                text-align: left;
+            }
+            .ant-form-item-control {
+                .mini-input {
+                    width: 50%;
+                }
+                .ant-checkbox-wrapper {
+                    margin-left: 60px;
+                    span {
+                        vertical-align: middle;
+                    }
+                }
+            }
+            .ant-form-item {
+                margin-bottom: 12px;
+            }
         }
-       .ant-form-item-control  {
-           .mini-input {
-               width: 50%;
-           }
-           .ant-checkbox-wrapper {
-               margin-left: 60px;
-               span {
-                   vertical-align: middle;
-               }
-           }
-       }
-       .ant-form-item {
-           margin-bottom: 12px;
-       } 
+        .patent-download {
+                >p {
+                    line-height: 32px;
+                }
+            }
     }
     .avatar-uploader,
     .avatar-uploader-trigger,
@@ -93,13 +100,14 @@
         color: #999;
     }
 }
+
 .patent-desc-content {
-    .ant-modal-body{
-        > div {
+    .ant-modal-body {
+        >div {
             color: #333;
             margin-bottom: 20px;
             .widthHalf {
-                display:inline-block;
+                display: inline-block;
                 width: 50%;
             }
             span {
@@ -115,7 +123,7 @@
             }
         }
         .time-line {
-            width:200px;
+            width: 200px;
             margin: 0 auto;
             .ant-timeline-item-content {
                 span {

+ 43 - 73
js/component/account/services/patentAdd.jsx

@@ -1,63 +1,10 @@
 import React from 'react';
 import { Icon, Modal, Button, Form, Upload, message, Input, Spin, Checkbox } from 'antd';
+import { beforeUploadFile, downloadFile } from '../../tools.js';
 import './patent.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
-function getBase64(img, callback) {
-    const reader = new FileReader();
-    reader.addEventListener('load', () => callback(reader.result));
-    reader.readAsDataURL(img);
-};
-
-function beforeUpload(file) {
-    const isJPG = file.type === 'image/jpeg';
-    if (!isJPG) {
-        message.error('You can only upload JPG file!');
-    }
-    const isLt2M = file.size / 1024 / 1024 < 2;
-    if (!isLt2M) {
-        message.error('Image must smaller than 2MB!');
-    }
-    return isJPG && isLt2M;
-};
-
-class Avatar extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            imageUrl: ''
-        }
-    }
-    handleChange(info) {
-        if (info.file.status === 'done') {
-            // Get this url from response in real world.
-            getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
-            this.props.urlData(info.file.response.data);
-        }
-    }
-    render() {
-        const imageUrl = this.state.imageUrl;
-        return (
-            <Upload
-                className="avatar-uploader"
-                name="avatar"
-                showUploadList={false}
-                action={globalConfig.context + "/techservice/patent/patentFile"}
-                data={{ 'sign': this.props.name }}
-                beforeUpload={beforeUpload}
-                onChange={this.handleChange.bind(this)}
-            >
-                {
-                    imageUrl ?
-                        <img src={imageUrl} role="presentation" className="avatar" /> :
-                        <Icon type="plus" className="avatar-uploader-trigger" />
-                }
-            </Upload>
-        );
-    }
-};
-
 const PatentAddFrom = Form.create()(React.createClass({
     getInitialState() {
         return {
@@ -70,6 +17,10 @@ const PatentAddFrom = Form.create()(React.createClass({
     },
     handleSubmit(e) {
         e.preventDefault();
+        if (!this.state.patentProryStatementUrl) {
+            message.warning('未上传代理委托书!');
+            return;
+        };
         this.props.form.validateFields((err, values) => {
             if (!err) {
                 this.props.spinState(true);
@@ -87,7 +38,7 @@ const PatentAddFrom = Form.create()(React.createClass({
                         'firstInventorIsPublish': this.state.firstCheck,
                         'secondInventorIsPublish': this.state.secondCheck,
                         'thirdInventorIsPublish': this.state.thirdCheck,
-                        'patentProryStatementUrl': this.state.avatarUrl
+                        'patentProryStatementUrl': this.state.patentProryStatementUrl
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -97,7 +48,7 @@ const PatentAddFrom = Form.create()(React.createClass({
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.closeModal();
+                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
@@ -143,7 +94,7 @@ const PatentAddFrom = Form.create()(React.createClass({
         };
         const _me = this;
         return (
-            <Form horizontal onSubmit={this.handleSubmit} className="person-form">
+            <Form horizontal onSubmit={this.handleSubmit} className="patent-form">
                 <FormItem
                     labelCol={{ span: 24 }}
                     wrapperCol={{ span: 24 }}
@@ -163,7 +114,7 @@ const PatentAddFrom = Form.create()(React.createClass({
                     label="姓名"
                 >
                     {getFieldDecorator('firstInventorName', {
-                        rules: [{ required: true, message: 'Please input name!' }]
+                        rules: [{ required: true, message: '请输入姓名!' }]
                     })(
                         <Input className="mini-input" />
                         )}
@@ -199,18 +150,37 @@ const PatentAddFrom = Form.create()(React.createClass({
                     )}
                     <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' />
-                    )}
-                    <span>请上传专利代理委托书</span><a onClick={() => { window.open(globalConfig.context + "/open/downloadTemplateFile?sign=patent_prory_statement") }}>模板下载</a>
-                </FormItem>
-                <FormItem>
+                <div className="hrSituation-roster">
+                    <Upload
+                        name="ratepay"
+                        action={globalConfig.context + "/techservice/cognizance/upload"}
+                        data={{ 'sign': 'patent_prory_statement' }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
+                        onChange={(info) => {
+                            if (info.file.status !== 'uploading') {
+                                console.log(info.file, info.fileList);
+                            }
+                            if (info.file.status === 'done') {
+                                if (!info.file.response.error.length) {
+                                    message.success(`${info.file.name} 文件上传成功!`);
+                                } else {
+                                    message.warning(info.file.response.error[0].message);
+                                    return;
+                                };
+                                this.state.patentProryStatementUrl = info.file.response.data;
+                            } else if (info.file.status === 'error') {
+                                message.error(`${info.file.name} 文件上传失败。`);
+                            }
+                        }}
+                    >
+                        <Button><Icon type="upload" /> 上传专利代理委托书 </Button>
+                    </Upload>
+                    <p style={{paddingLeft:'10px',marginTop:'10px'}}>
+                        <a onClick={() => { window.open(globalConfig.context + "/open/downloadTemplateFile?sign=patent_prory_statement") }}>专利代理委托书模板下载</a>
+                    </p>
+                </div>
+                <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                     <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
                 </FormItem>
@@ -236,7 +206,7 @@ const PatentAdd = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -252,14 +222,14 @@ const PatentAdd = React.createClass({
     render() {
         return (
             <div className="patent-addNew">
-                <Button className="patent-addNew" type="primary" onClick={this.showModal}>申请新专利<Icon type="plus" /></Button>
+                <Button disabled={this.props.ButtonDisabled} className="patent-addNew" type="primary" onClick={this.showModal}>申请新专利<Icon type="plus" /></Button>
                 <Spin spinning={this.state.loading} className='spin-box'>
                     <Modal title="新专利申请" visible={this.state.visible}
                         onOk={this.handleOk} onCancel={this.handleCancel}
                         width='720px'
                         footer=''
                     >
-                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>

+ 56 - 27
js/component/account/services/patentDesc.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Icon, Modal, message, Spin, Timeline, Button } from 'antd';
-import { getPatentState, getTime } from '../../tools.js';
+import { getPatentType, getPatentState, getTime, getPatentField, downloadFile } from '../../tools.js';
 import './patent.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
@@ -22,9 +22,10 @@ const PatentDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     getStepList(thepid) {
+        this.state.stepList = [];
         $.ajax({
             method: "post",
             dataType: "json",
@@ -34,7 +35,7 @@ const PatentDesc = React.createClass({
                 pid: thepid
             },
             success: function (data) {
-                if ( data.error && data.error.length && !data.data) {
+                if (data.error && data.error.length && !data.data) {
                     return;
                 };
                 let _me = this;
@@ -49,11 +50,35 @@ const PatentDesc = React.createClass({
             }.bind(this),
         });
     },
+    getPatentInfo(thepid) {
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/patent/clientPatentInfo",
+            data: {
+                pid: thepid
+            },
+            success: function (data) {
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    thisData = {};
+                };
+                this.setState({
+                    patentInfoData: thisData
+                });
+            }.bind(this),
+        });
+    },
     componentWillReceiveProps(nextProps) {
-        this.state.visible = nextProps.showDesc
-        if (nextProps.data && nextProps.data.pid !== null) {
+        if (nextProps.data && nextProps.data.pid !== null && !this.state.visible && nextProps.showDesc) {
             this.getStepList(nextProps.data.pid);
-        }
+            this.getPatentInfo(nextProps.data.pid);
+        };
+        this.state.visible = nextProps.showDesc;
     },
     handleCancel(e) {
         this.setState({
@@ -61,9 +86,6 @@ const PatentDesc = React.createClass({
         });
         this.props.closeDesc(false);
     },
-    downloadFile(url, type) {
-        window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + url + "&sign=" + type)
-    },
     confirmButton() {
         this.setState({
             loading: true
@@ -79,7 +101,10 @@ const PatentDesc = React.createClass({
         }).done(function (data) {
             if (data.error && data.error.length) {
                 message.warning(data.error[0].message);
-            }
+            } else {
+                message.success('已确认完成!');
+                this.state.patentInfoData.confirmState = 1;
+            };
         }.bind(this)).always(function () {
             this.setState({
                 loading: false
@@ -87,8 +112,8 @@ const PatentDesc = React.createClass({
         }.bind(this));
     },
     render() {
-        const theData = this.props.data;
-        if (this.props.data) {
+        let theData = this.state.patentInfoData;
+        if (theData) {
             return (
                 <div className="patent-desc">
                     <Spin spinning={this.state.loading} className='spin-box'>
@@ -98,42 +123,46 @@ const PatentDesc = React.createClass({
                             footer=''
                             className="patent-desc-content">
                             <div>
-                                <p className="widthHalf"><span>编号:</span>{theData.number}</p>
-                                <p className="widthHalf"><span>申请号/专利号:</span>{theData.patentNum}</p>
+                                <p className="widthHalf"><span>编号:</span>{theData.serialNumber}</p>
+                                <p className="widthHalf"><span>申请号/专利号:</span>{theData.patentNumber}</p>
                             </div>
                             <div>
                                 <p className="widthHalf"><span>专利名称:</span>{theData.patentName}</p>
-                                <p className="widthHalf"><span>专利类型:</span>{theData.patentType}</p>
+                                <p className="widthHalf"><span>专利类型:</span>{getPatentType(theData.patentCatagory)}</p>
                             </div>
                             <div>
-                                <p className="widthHalf"><span>专利状态:</span>{theData.patentState}</p>
-                                <p className="widthHalf"><span>专利领域:</span>{theData.patentField}</p>
+                                <p className="widthHalf"><span>专利状态:</span>{getPatentState(theData.patentState)}</p>
+                                <p className="widthHalf"><span>专利领域:</span>{getPatentField(theData.patentField)}</p>
                             </div>
                             <div>
                                 <span>简介:</span>{theData.patentDes}
                             </div>
-                            <div>
+                            <div className="patent-download">
                                 <span>专利相关材料:</span>
                                 {theData.patentWritingUrl !== null && theData.patentWritingUrl !== undefined && theData.patentWritingUrl !== '' ?
                                     <p className="download-file">
-                                        <a href="" onClick={this.downloadFile.bind(this, theData.patentWritingUrl, "patent_writing")}>专利稿件</a>
-                                        {theData.confirmState == '0' ?
-                                            <Button onClick={this.confirmButton}>确认稿件</Button> : <span></span>
-                                        }
+                                        <a onClick={downloadFile.bind(this, theData.patentWritingUrl, theData.patentWritingDownloadFileName)}>{theData.patentWritingDownloadFileName}</a>
+                                        {theData.confirmState == 0 ? <Button onClick={this.confirmButton}>确认稿件</Button> : <span></span>}
                                     </p> :
-                                    <span></span>
+                                    <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利稿件未上传</p>
                                 }
                                 {theData.authorizationNoticeUrl !== null && theData.authorizationNoticeUrl !== undefined && theData.authorizationNoticeUrl !== '' ?
                                     <p className="download-file">
-                                        <a href="" onClick={this.downloadFile.bind(this, theData.authorizationNoticeUrl, "authorization_notice")}>授权通知书</a>
+                                        <a onClick={downloadFile.bind(this, theData.authorizationNoticeUrl, theData.authorizationNoticeDownloadFileName)}>{theData.authorizationNoticeDownloadFileName}</a>
                                     </p> :
-                                    <span></span>
+                                    <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />授权通知书未上传</p>
                                 }
                                 {theData.patentCertificateUrl !== null && theData.patentCertificateUrl !== undefined && theData.patentCertificateUrl !== '' ?
                                     <p className="download-file">
-                                        <a href="" onClick={this.downloadFile.bind(this, theData.patentCertificateUrl, "patent_certificate")}>专利证书</a>
+                                        <a onClick={downloadFile.bind(this, theData.patentCertificateUrl, theData.patentCertificateDownloadFileName)}>{theData.patentCertificateDownloadFileName}</a>
+                                    </p> :
+                                    <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利证书未上传</p>
+                                }
+                                {theData.patentProryStatementUrl !== null && theData.patentProryStatementUrl !== undefined && theData.patentProryStatementUrl !== '' ?
+                                    <p className="download-file">
+                                        <a onClick={downloadFile.bind(this, theData.patentProryStatementUrl, theData.patentProryStatementDownloadFileName)}>{theData.patentProryStatementDownloadFileName}</a>
                                     </p> :
-                                    <span></span>
+                                    <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利代理委托书未上传</p>
                                 }
                             </div>
                             <div>

+ 35 - 20
js/component/account/services/ratepay.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { beforeUpload } from '../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
@@ -46,14 +46,14 @@ const RatepayDescFrom = Form.create()(React.createClass({
                         taxExemptIncome: values.taxExemptIncome,
                         subsidyIncome: values.subsidyIncome,
                         year: this.state.year || this.props.data.year,
-                        taxReturnUrl: this.state.ratepayUrl,
+                        taxReturnUrl: this.state.taxReturnUrl,
                         grossProfit: values.grossProfit,
                         researchCost: values.researchCost
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -64,6 +64,11 @@ const RatepayDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -189,8 +194,9 @@ const RatepayDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'ratepay' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'ratepay_' + (this.state.year || theData.year) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -202,14 +208,15 @@ const RatepayDescFrom = Form.create()(React.createClass({
                                     message.warning(info.file.response.error[0].message);
                                     return;
                                 };
-                                this.state.ratepayUrl = info.file.response.data;
+                                this.state.taxReturnUrl = info.file.response.data;
                             } else if (info.file.status === 'error') {
                                 message.error(`${info.file.name} 文件上传失败。`);
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传文件 </Button>
+                        <Button><Icon type="upload" /> 上传企业纳税申报表 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.taxReturnUrl ? <a onClick={downloadFile.bind(null, theData.taxReturnUrl, theData.taxReturnDownloadFileName)}>{theData.taxReturnDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -239,7 +246,7 @@ const RatepayDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -261,8 +268,10 @@ const RatepayDesc = React.createClass({
                         width='800px'
                         footer=''
                     >
-                        <RatepayDescFrom data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <RatepayDescFrom
+                            visible={this.state.visible}
+                            data={this.props.data}
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -286,8 +295,11 @@ const Ratepay = React.createClass({
                 pageSize: this.state.pagination.pageSize
             }
         }).done((data) => {
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                }
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -306,7 +318,9 @@ const Ratepay = React.createClass({
                     grossProfit: thisdata.grossProfit,
                     researchCost: thisdata.researchCost,
                     year: thisdata.year,
-                    taxReturnUrl: thisdata.taxReturnUrl
+                    taxReturnUrl: thisdata.taxReturnUrl,
+                    taxReturnDownloadFileName: thisdata.taxReturnDownloadFileName,
+                    taxReturn: [thisdata.taxReturnUrl, thisdata.taxReturnDownloadFileName]
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -361,12 +375,10 @@ const Ratepay = React.createClass({
                     key: 'nonOperatingIncome',
                 }, {
                     title: '相关附件',
-                    dataIndex: 'taxReturnUrl',
-                    key: 'taxReturnUrl',
+                    dataIndex: 'taxReturn',
+                    key: 'taxReturn',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -414,9 +426,11 @@ const Ratepay = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -443,6 +457,7 @@ const Ratepay = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 14 - 8
js/component/account/services/standard.jsx

@@ -36,9 +36,9 @@ const StandardDesc = React.createClass({
                         standardLevel: data.data.standardLevel,
                         participateWay: data.data.participateWay
                     });
-                } else if (data.error.length && data.error[0].message) {
+                } else if (data.error && data.error.length) {
                     message.warning(data.error[0].message);
-                }
+                };
             }.bind(this),
         }).done(function (data) {
             if (!data.error.length) {
@@ -50,7 +50,7 @@ const StandardDesc = React.createClass({
             } else {
                 message.warning(data.error[0].message);
             };
-            this.props.closeDesc(false);
+            this.props.closeDesc(false, true);
         }.bind(this));
     },
     handleCancel(e) {
@@ -131,10 +131,13 @@ const Standard = React.createClass({
                 participateWay: this.state.participateWay
             },
             success: function (data) {
-                if (data.error.length || !data.data || !data.data.list) {
-                    message.warning(data.error[0].message);
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        this.state.ButtonDisabled = true;
+                    }
                     return;
-                }
+                };
                 for (let i = 0; i < data.data.list.length; i++) {
                     let thisdata = data.data.list[i];
                     this.state.data.push({
@@ -262,9 +265,11 @@ const Standard = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -313,6 +318,7 @@ const Standard = React.createClass({
                     <Button onClick={this.reset}>重置</Button>
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 37 - 17
js/component/account/services/techProduct.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Upload, Form, Button, Radio, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
 import { techFieldList, technicalSourceList } from '../../dataDic.js';
-import { getTechField, getTechnicalSource, beforeUploadFile } from '../../tools.js';
+import { getTechField, getTechnicalSource, beforeUploadFile, downloadFile } from '../../tools.js';
 import './techProduct.less';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
@@ -26,8 +26,9 @@ const TechProductDescFrom = Form.create()(React.createClass({
         this.state.targetKeys = this.props.data.intellectualPropertyNumber;
     },
     componentWillReceiveProps(nextProps) {
-        if (nextProps.data) {
-            this.state.targetKeys = nextProps.data.intellectualPropertyNumber;
+        if (!this.props.visible && nextProps.visible && nextProps.data) {
+            this.state.targetKeys = nextProps.data.intellectualPropertyNumber || [];
+            this.props.form.resetFields();
         };
     },
     handleSubmit(e) {
@@ -59,7 +60,7 @@ const TechProductDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.form.resetFields();
                         this.state.targetKeys = [];
                         this.state.selectedKeys = [];
@@ -88,7 +89,7 @@ const TechProductDescFrom = Form.create()(React.createClass({
         };
         const _me = this;
         return (
-            <Form onSubmit={this.handleSubmit} className="activityCost-form">
+            <Form onSubmit={this.handleSubmit} id="techProduct-form">
                 <div className="clearfix">
                     <FormItem className="half-item"
                         {...formItemLayout}
@@ -212,11 +213,11 @@ const TechProductDescFrom = Form.create()(React.createClass({
                             <Input type='textarea' rows={6} onChange={(e) => { if (e.target.value.length > 400) { return; } }} />
                             )}
                     </FormItem>
-                    <p style={{ lineHeight: "32px" }}>知识产权获得情况及其对产品(服务)在技术上发挥的支持作用(限400字)*</p>
                     <FormItem className="half-item"
                         labelCol={{ span: 0 }}
                         wrapperCol={{ span: 22 }}
                     >
+                        <p style={{ lineHeight: "32px" }}>知识产权获得情况及其对产品(服务)在技术上发挥的支持作用(限400字)*</p>
                         {getFieldDecorator('conditionEffect', {
                             rules: [{ required: true, message: '此项为必填项!' }],
                             initialValue: theData.conditionEffect
@@ -229,8 +230,9 @@ const TechProductDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'proof' }}
+                        data={{ 'sign': 'tech_product' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -248,8 +250,9 @@ const TechProductDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传台账 </Button>
+                        <Button><Icon type="upload" /> 上传高新技术产品台帐 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.accountUrl ? <a onClick={downloadFile.bind(null, theData.accountUrl, theData.accountDownloadFileName)}>{theData.accountDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -279,7 +282,7 @@ const TechProductDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -301,8 +304,13 @@ const TechProductDesc = React.createClass({
                         width='1000px'
                         footer=''
                     >
-                        <TechProductDescFrom data={this.props.data} mockData={this.props.mockData}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <TechProductDescFrom
+                            data={this.props.data}
+                            mockData={this.props.mockData}
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            visible={this.state.visible}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -337,12 +345,18 @@ const TechProduct = React.createClass({
         })).done((data1, data2) => {
             let data = data1[0];
             let intellectualList = data2[0];
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data || !data.data.list) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                };
                 return;
             };
-            if (intellectualList.error.length || !intellectualList.data || !intellectualList.data.list) {
-                message.warning(intellectualList.error[0].message);
+            if (!intellectualList.data || !intellectualList.data.list) {
+                if (intellectualList.error && intellectualList.error.length) {
+                    message.warning(intellectualList.error[0].message);
+                    this.state.ButtonDisabled = true;
+                };
                 return;
             };
             let theArr = [];
@@ -383,6 +397,9 @@ const TechProduct = React.createClass({
                     conditionEffect: thisdata.conditionEffect,
                     year: thisdata.year,
                     createTime: thisdata.createTime,
+
+                    accountDownloadFileName: thisdata.accountDownloadFileName,
+                    accountUrl: thisdata.accountUrl
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -491,9 +508,11 @@ const TechProduct = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -520,6 +539,7 @@ const TechProduct = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 7 - 1
js/component/account/services/techProduct.less

@@ -1,7 +1,7 @@
 .user-content {
     .clearfix {
         >.orgTech-item {
-            width: 60%;
+            width: 80%;
             display: inline-block;
             >span {
                 margin-right: 10px;
@@ -20,6 +20,12 @@
     }
 }
 
+#techProduct-form {
+    .half-item {
+        height: auto
+    }
+}
+
 .upload-box {
     display: inline-block;
     margin-top: 10px;

+ 2 - 2
js/component/account/set/base.jsx

@@ -282,7 +282,7 @@ export default Base;
 //         <p>{
 //             this.state.oppositeIdUrl !== "" && this.state.oppositeIdUrl !== undefined && this.state.oppositeIdUrl !== null ?
 //                 <span><Icon style={{ 'color': '#79b5ff', 'fontSize': '14px', 'margin': '0 6px' }} type="check-circle" />已上传</span> :
-//                 <span><Icon style={{ 'color': '#fa0', 'fontSize': '14px', 'margin': '0 6px' }} type="exclamation-circle" />未上传</span>
+//                 <span><Icon style={{ 'color': '#fa0', 'fontSize': '14px', 'margin': '0 6px' }} type="exclamation-circle" /><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</span>
 //         }
 //         </p>
 //     </FormItem>
@@ -296,7 +296,7 @@ export default Base;
 //         <p>{
 //             this.state.positiveIdUrl !== "" && this.state.positiveIdUrl !== undefined && this.state.positiveIdUrl !== null ?
 //                 <span><Icon style={{ 'color': '#79b5ff', 'fontSize': '14px', 'margin': '0 6px' }} type="check-circle" />已上传</span> :
-//                 <span><Icon style={{ 'color': '#fa0', 'fontSize': '14px', 'margin': '0 6px' }} type="exclamation-circle" />未上传</span>
+//                 <span><Icon style={{ 'color': '#fa0', 'fontSize': '14px', 'margin': '0 6px' }} type="exclamation-circle" /><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</span>
 //         }
 //         </p>
 //     </FormItem>

+ 130 - 61
js/component/account/set/company.jsx

@@ -30,7 +30,8 @@ class Avatar extends React.Component {
     constructor(props) {
         super(props);
         this.state = {
-            imageUrl: ''
+            imageUrl: '',
+            propsbool: true,
         }
     }
     handleChange(info) {
@@ -40,6 +41,12 @@ class Avatar extends React.Component {
             this.props.urlData(info.file.response.data);
         }
     }
+    componentWillReceiveProps(nextProps) {
+        if (nextProps.logoUrl && this.state.propsbool) {
+            this.state.imageUrl = globalConfig.avatarHost + "/upload" + nextProps.logoUrl;
+            this.state.propsbool = false;
+        }
+    }
     render() {
         const imageUrl = this.state.imageUrl;
         return (
@@ -131,14 +138,16 @@ const PersonFrom = Form.create()(React.createClass({
 
                 if (data.data && data.data.info && data.data.pro) {
                     addressInit('cmbProvince', 'cmbCity', 'cmbArea',
-                        data.data.locationProvince, data.data.locationCity, data.data.locationArea);
-                    let theArr = splitUrl(data.data.info.publicityPictureUrl, ',', globalConfig.staticHost + '/upload');
+                        data.data.info.locationProvince, data.data.info.locationCity, data.data.info.locationArea);
+                    let theArr = splitUrl(data.data.info.publicityPictureUrl, ',', globalConfig.avatarHost + '/upload');
                     this.setState({
                         idttType: data.data.info.identityType,
                         unitName: data.data.info.companyName,
                         unitNumber: data.data.info.unitSize,
                         unitIntro: data.data.info.companyIntroduction,
                         unitFrom: data.data.info.homeUnit,
+                        logoUrl: data.data.info.logoUrl,
+                        publicityPictureUrl: data.data.info.publicityPictureUrl,
                         companyLifePicList: theArr,
                         qiyezizhi: data.data.pro.qualification,
                         turnover: data.data.pro.turnover,
@@ -189,12 +198,14 @@ const PersonFrom = Form.create()(React.createClass({
             let cmbC = document.getElementById('cmbCity').value;
             let cmbA = document.getElementById('cmbArea').value;
             //
-            let leftPicArr = [];
-            this.state.companyLifePicObj.map(function (item) {
-                leftPicArr.push(item.response.data);
-            });
-            let lifePhotoUrl = leftPicArr.join(",");
-
+            let lifePhotoUrl = this.state.publicityPictureUrl;
+            if (this.state.companyLifePicObj.length) {
+                let leftPicArr = [];
+                this.state.companyLifePicObj.map(function (item) {
+                    leftPicArr.push(item.response.data);
+                });
+                lifePhotoUrl = leftPicArr.join(",");
+            };
             if (!err) {
                 this.props.spinState(true);
 
@@ -218,14 +229,14 @@ const PersonFrom = Form.create()(React.createClass({
                         "pro.turnover": values.turnover,
                         "pro.collegeAttribute": values.schoolProp,
                         "pro.collegeEstablishTime": values.schoolTime,
-                        "pro.academician": this.state.aca,
-                        "pro.doctoralTutor": this.state.PhDTutor,
-                        "pro.masterTutor": this.state.MSTutor,
-                        "pro.otherExpert": this.state.otherExperts,
-                        "pro.nationalLab": this.state.StateKeyLab,
-                        "pro.educationLab": this.state.EduKeyLab,
-                        "pro.enterpriseCenter": this.state.ComCenter,
-                        "pro.otherCenter": this.state.otherCenter,
+                        "pro.academician": values.aca,
+                        "pro.doctoralTutor": values.PhDTutor,
+                        "pro.masterTutor": values.MSTutor,
+                        "pro.otherExpert": values.otherExperts,
+                        "pro.nationalLab": values.StateKeyLab,
+                        "pro.educationLab": values.EduKeyLab,
+                        "pro.enterpriseCenter": values.ComCenter,
+                        "pro.otherCenter": values.otherCenter,
                         "pro.institutionEstablishTime": values.resTime
                     }
                 }).done(function (data) {
@@ -407,34 +418,116 @@ const PersonFrom = Form.create()(React.createClass({
                     label="创办时间"
                 >
                     {getFieldDecorator('schoolTime', {
-                        initialValue: this.state.schoolTime
+                        initialValue: this.state.schoolTime || 0
                     })(
                         <InputNumber />
                         )}
                     <span>年</span>
                 </FormItem>
-                <FormItem style={{ 'display': this.state.schoolDis }}
-                    labelCol={{ span: 3 }}
-                    wrapperCol={{ span: 21, offset: 3 }}
-                    label=""
-                >
-                    <div className="school-props clearfix">
-                        <div><span>院士:</span><InputNumber value={this.state.aca} onChange={function (e) { this.setState({ aca: e }) }.bind(this)} />人</div>
-                        <div><span>博士生导师:</span><InputNumber value={this.state.PhDTutor} onChange={function (e) { this.setState({ PhDTutor: e }) }.bind(this)} />人</div>
-                        <div><span>硕士生导师:</span><InputNumber value={this.state.MSTutor} onChange={function (e) { this.setState({ MSTutor: e }) }.bind(this)} />人</div>
-                        <div><span>其他专家:</span><InputNumber value={this.state.otherExperts} onChange={function (e) { this.setState({ otherExperts: e }) }.bind(this)} />人</div>
-                        <div><span>国家级重点实验室:</span><InputNumber value={this.state.StateKeyLab} onChange={function (e) { this.setState({ StateKeyLab: e }) }.bind(this)} />所</div>
-                        <div><span>教育部重点实验室:</span><InputNumber value={this.state.EduKeyLab} onChange={function (e) { this.setState({ EduKeyLab: e }) }.bind(this)} />所</div>
-                        <div><span>企业共建研究中心:</span><InputNumber value={this.state.ComCenter} onChange={function (e) { this.setState({ ComCenter: e }) }.bind(this)} />所</div>
-                        <div><span>其他研究中心:</span><InputNumber value={this.state.otherCenter} onChange={function (e) { this.setState({ otherCenter: e }) }.bind(this)} />所</div>
-                    </div>
-                </FormItem>
+                <div className="school-props clearfix" style={{ 'display': this.state.schoolDis }}>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="院士"
+                    >
+                        {getFieldDecorator('aca', {
+                            initialValue: this.state.aca || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>人</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="博士生导师"
+                    >
+                        {getFieldDecorator('PhDTutor', {
+                            initialValue: this.state.PhDTutor || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>人</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="硕士生导师"
+                    >
+                        {getFieldDecorator('MSTutor', {
+                            initialValue: this.state.MSTutor || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>人</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="其他专家"
+                    >
+                        {getFieldDecorator('otherExperts', {
+                            initialValue: this.state.otherExperts || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>人</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="国家级重点实验室"
+                    >
+                        {getFieldDecorator('StateKeyLab', {
+                            initialValue: this.state.StateKeyLab || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>所</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="教育部重点实验室"
+                    >
+                        {getFieldDecorator('EduKeyLab', {
+                            initialValue: this.state.EduKeyLab || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>所</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="企业共建研究中心"
+                    >
+                        {getFieldDecorator('ComCenter', {
+                            initialValue: this.state.ComCenter || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>所</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 10 }}
+                        wrapperCol={{ span: 12 }}
+                        label="其他研究中心"
+                    >
+                        {getFieldDecorator('otherCenter', {
+                            initialValue: this.state.otherCenter || 0
+                        })(
+                            <InputNumber />
+                            )}
+                        <span>所</span>
+                    </FormItem>
+                </div>
                 <FormItem style={{ 'display': this.state.resDis }}
                     {...formItemLayout}
                     label="创办时间"
                 >
                     {getFieldDecorator('resTime', {
-                        initialValue: this.state.resTime
+                        initialValue: this.state.resTime || 0
                     })(
                         <InputNumber />
                         )}
@@ -447,7 +540,7 @@ const PersonFrom = Form.create()(React.createClass({
                     wrapperCol={{ span: 20 }}
                 >
                     {getFieldDecorator('avatar')(
-                        <Avatar name="companyLogo" urlData={this.companyLogoUrl} />
+                        <Avatar name="companyLogo" urlData={this.companyLogoUrl} logoUrl={this.state.logoUrl} />
                     )}
                 </FormItem>
                 <div className="set-explain">
@@ -495,28 +588,4 @@ const Person = React.createClass({
     }
 });
 
-export default Person;
-
-                // <FormItem
-                //     {...formItemLayout}
-                //     label="单位规模"
-                // >
-                //     {getFieldDecorator('unitNumber', {
-                //         initialValue: this.state.unitNumber
-                //     })(
-                //         <InputNumber />
-                //         )}
-                //     <span>人</span>
-                // </FormItem>
-                //                 <FormItem style={{ 'display': this.state.companyDis }}
-                //     labelCol={{ span: 3 }}
-                //     wrapperCol={{ span: 6 }}
-                //     label="年营业额"
-                // >
-                //     {getFieldDecorator('turnover', {
-                //         initialValue: this.state.turnover
-                //     })(
-                //         <InputNumber />
-                //         )}
-                //     <span>万元</span>
-                // </FormItem>
+export default Person;

+ 9 - 10
js/component/account/set/group.jsx

@@ -24,11 +24,11 @@ const BaseFrom = Form.create()(React.createClass({
                     this.setState({
                         fixedTel: data.data.fixedTel,
                         firstContacts: data.data.firstContacts,
-                        firstMobile:data.data.firstMobil,
+                        firstMobile: data.data.firstMobile,
                         secondContacts: data.data.secondContacts,
-                        secondMobile:data.data.secondMobil,
+                        secondMobile: data.data.secondMobile,
                         thirdContacts: data.data.thirdContacts,
-                        thirdMobile:data.data.thirdMobil,
+                        thirdMobile: data.data.thirdMobile,
                         qq: data.data.qq,
                         address: data.data.postalAddress,
                         postcode: data.data.postcode,
@@ -56,7 +56,6 @@ const BaseFrom = Form.create()(React.createClass({
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (!err) {
-
                 this.props.spinState(true);
                 $.ajax({
                     method: "POST",
@@ -65,11 +64,11 @@ const BaseFrom = Form.create()(React.createClass({
                     url: globalConfig.context + "/api/user/orgIdentity",
                     data: {
                         "firstContacts": values.firstContacts,
-                        "firstMobile":values.firstMobil,
+                        "firstMobile": values.firstMobile,
                         "secondContacts": values.secondContacts,
-                        "secondMobile":values.secondMobil,
+                        "secondMobile": values.secondMobile,
                         "thirdContacts": values.thirdContacts,
-                        "thirdMobile":values.thirdMobil,
+                        "thirdMobile": values.thirdMobile,
                         "email": values.email,
                         "fixedTel": values.telephone,
                         "qq": values.qq,
@@ -111,7 +110,7 @@ const BaseFrom = Form.create()(React.createClass({
     },
     checkPhone(rule, value, callback) {
         const form = this.props.form;
-        if (!(/^1[34578]\d{9}$/.test(value))) {
+        if (value && value.length !== 0 && !(/^1[34578]\d{9}$/.test(value))) {
             callback('请输入正确的手机号码!');
         } else {
             callback();
@@ -140,8 +139,8 @@ const BaseFrom = Form.create()(React.createClass({
                     {...formItemLayout}
                     label="手机号码"
                 >
-                    {getFieldDecorator('firstMoblie', {
-                        initialValue: this.state.firstMoblie,
+                    {getFieldDecorator('firstMobile', {
+                        initialValue: this.state.firstMobile,
                         rules: [
                             {
                                 validator: this.checkPhone

+ 76 - 50
js/component/account/set/hrSituation.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload, Select } from 'antd';
-import { beforeUpload } from '../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../tools.js';
 import './hrSituation.less'
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
@@ -85,7 +85,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -106,6 +106,11 @@ const HrSituationDescFrom = Form.create()(React.createClass({
             )
         };
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const { getFieldDecorator } = this.props.form;
         const formItemLayout = {
@@ -113,6 +118,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
             wrapperCol: { span: 16 },
         };
         const FormItem = Form.Item;
+        const theData = this.props.data;
         return (
             <Form onSubmit={this.handleSubmit} className="hrSituation-form">
                 <div className="clearfix">
@@ -134,7 +140,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmTotal', {
-                            initialValue: this.props.data.firmTotal || null
+                            initialValue: this.props.data.firmTotal || 0
                         })(
                             <InputNumber />
                             )}
@@ -144,7 +150,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techTotal', {
-                            initialValue: this.props.data.techTotal || null
+                            initialValue: this.props.data.techTotal || 0
                         })(
                             <InputNumber />
                             )}
@@ -165,7 +171,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmInService', {
-                            initialValue: this.props.data.firmInService || null
+                            initialValue: this.props.data.firmInService || 0
                         })(
                             <InputNumber />
                             )}
@@ -175,7 +181,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techInService', {
-                            initialValue: this.props.data.techInService || null
+                            initialValue: this.props.data.techInService || 0
                         })(
                             <InputNumber />
                             )}
@@ -186,7 +192,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmPartTime', {
-                            initialValue: this.props.data.firmPartTime || null
+                            initialValue: this.props.data.firmPartTime || 0
                         })(
                             <InputNumber />
                             )}
@@ -196,7 +202,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techPartTime', {
-                            initialValue: this.props.data.techPartTime || null
+                            initialValue: this.props.data.techPartTime || 0
                         })(
                             <InputNumber />
                             )}
@@ -207,7 +213,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmTemporary', {
-                            initialValue: this.props.data.firmTemporary || null
+                            initialValue: this.props.data.firmTemporary || 0
                         })(
                             <InputNumber />
                             )}
@@ -217,7 +223,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techTemporary', {
-                            initialValue: this.props.data.techTemporary || null
+                            initialValue: this.props.data.techTemporary || 0
                         })(
                             <InputNumber />
                             )}
@@ -228,7 +234,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmForeign', {
-                            initialValue: this.props.data.firmForeign || null
+                            initialValue: this.props.data.firmForeign || 0
                         })(
                             <InputNumber />
                             )}
@@ -238,7 +244,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techForeign', {
-                            initialValue: this.props.data.techForeign || null
+                            initialValue: this.props.data.techForeign || 0
                         })(
                             <InputNumber />
                             )}
@@ -249,7 +255,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmAbroad', {
-                            initialValue: this.props.data.firmAbroad || null
+                            initialValue: this.props.data.firmAbroad || 0
                         })(
                             <InputNumber />
                             )}
@@ -259,7 +265,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techAbroad', {
-                            initialValue: this.props.data.techAbroad || null
+                            initialValue: this.props.data.techAbroad || 0
                         })(
                             <InputNumber />
                             )}
@@ -270,7 +276,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmCore', {
-                            initialValue: this.props.data.firmCore || null
+                            initialValue: this.props.data.firmCore || 0
                         })(
                             <InputNumber />
                             )}
@@ -280,7 +286,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techCore', {
-                            initialValue: this.props.data.techCore || null
+                            initialValue: this.props.data.techCore || 0
                         })(
                             <InputNumber />
                             )}
@@ -294,7 +300,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="博士"
                     >
                         {getFieldDecorator('doctor', {
-                            initialValue: this.props.data.doctor || null
+                            initialValue: this.props.data.doctor || 0
                         })(
                             <InputNumber />
                             )}
@@ -304,7 +310,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="硕士"
                     >
                         {getFieldDecorator('master', {
-                            initialValue: this.props.data.master || null
+                            initialValue: this.props.data.master || 0
                         })(
                             <InputNumber />
                             )}
@@ -314,7 +320,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="本科"
                     >
                         {getFieldDecorator('undergraduate', {
-                            initialValue: this.props.data.undergraduate || null
+                            initialValue: this.props.data.undergraduate || 0
                         })(
                             <InputNumber />
                             )}
@@ -324,7 +330,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="大专及以下"
                     >
                         {getFieldDecorator('college', {
-                            initialValue: this.props.data.college || null
+                            initialValue: this.props.data.college || 0
                         })(
                             <InputNumber />
                             )}
@@ -337,7 +343,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="高级职称"
                     >
                         {getFieldDecorator('seniorTitle', {
-                            initialValue: this.props.data.seniorTitle || null
+                            initialValue: this.props.data.seniorTitle || 0
                         })(
                             <InputNumber />
                             )}
@@ -347,7 +353,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="中级职称"
                     >
                         {getFieldDecorator('intermediateTitle', {
-                            initialValue: this.props.data.intermediateTitle || null
+                            initialValue: this.props.data.intermediateTitle || 0
                         })(
                             <InputNumber />
                             )}
@@ -357,7 +363,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="初级职称"
                     >
                         {getFieldDecorator('juniorTitle', {
-                            initialValue: this.props.data.juniorTitle || null
+                            initialValue: this.props.data.juniorTitle || 0
                         })(
                             <InputNumber />
                             )}
@@ -367,7 +373,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="高级技工"
                     >
                         {getFieldDecorator('seniorMechanic', {
-                            initialValue: this.props.data.seniorMechanic || null
+                            initialValue: this.props.data.seniorMechanic || 0
                         })(
                             <InputNumber />
                             )}
@@ -380,7 +386,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="30及以下"
                     >
                         {getFieldDecorator('belowThirty', {
-                            initialValue: this.props.data.belowThirty || null
+                            initialValue: this.props.data.belowThirty || 0
                         })(
                             <InputNumber />
                             )}
@@ -390,7 +396,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="31-34"
                     >
                         {getFieldDecorator('thirtyoneToThirtyfour', {
-                            initialValue: this.props.data.thirtyoneToThirtyfour || null
+                            initialValue: this.props.data.thirtyoneToThirtyfour || 0
                         })(
                             <InputNumber />
                             )}
@@ -400,7 +406,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="41-50"
                     >
                         {getFieldDecorator('fortyoneToFifty', {
-                            initialValue: this.props.data.fortyoneToFifty || null
+                            initialValue: this.props.data.fortyoneToFifty || 0
                         })(
                             <InputNumber />
                             )}
@@ -410,7 +416,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="50以上"
                     >
                         {getFieldDecorator('aboveFifty', {
-                            initialValue: this.props.data.aboveFifty || null
+                            initialValue: this.props.data.aboveFifty || 0
                         })(
                             <InputNumber />
                             )}
@@ -424,7 +430,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="新增就业人数"
                     >
                         {getFieldDecorator('newEmployment', {
-                            initialValue: this.props.data.newEmployment || null
+                            initialValue: this.props.data.newEmployment || 0
                         })(
                             <InputNumber />
                             )}
@@ -435,7 +441,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                         label="高校应届毕业生人数"
                     >
                         {getFieldDecorator('graduateNumber', {
-                            initialValue: this.props.data.graduateNumber || null
+                            initialValue: this.props.data.graduateNumber || 0
                         })(
                             <InputNumber />
                             )}
@@ -443,10 +449,11 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                 </div>
                 <div className="hrSituation-roster">
                     <Upload
-                        name="socialSecurity"
+                        name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'socialSecurity' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'roster_' + (this.state.year || theData.year) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -458,21 +465,23 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                                     message.warning(info.file.response.error[0].message);
                                     return;
                                 };
-                                this.state.socialSecurityUrl = info.file.response.data;
+                                this.state.rosterUrl = info.file.response.data;
                             } else if (info.file.status === 'error') {
                                 message.error(`${info.file.name} 文件上传失败。`);
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传社保文件 </Button>
+                        <Button><Icon type="upload" /> 上传花名册 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.rosterUrl ? <a onClick={downloadFile.bind(null, theData.rosterUrl, theData.rosterDownloadFileName)}>{theData.rosterDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <div className="hrSituation-roster">
                     <Upload
-                        name="roster"
+                        name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'roster' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'social_security_' + (this.state.year || theData.year) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -484,14 +493,15 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                                     message.warning(info.file.response.error[0].message);
                                     return;
                                 };
-                                this.state.rosterUrl = info.file.response.data;
+                                this.state.socialSecurityUrl = info.file.response.data;
                             } else if (info.file.status === 'error') {
                                 message.error(`${info.file.name} 文件上传失败。`);
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传花名册文件 </Button>
+                        <Button><Icon type="upload" /> 上传社保情况 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.socialSecurityUrl ? <a onClick={downloadFile.bind(null, theData.socialSecurityUrl, theData.socialSecurityDownloadFileName)}>{theData.socialSecurityDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <div>
                     <span style={{ color: "red" }}>提示</span>
@@ -526,7 +536,7 @@ const HrSituationDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -549,7 +559,10 @@ const HrSituationDesc = React.createClass({
                         footer=''
                     >
                         <HrSituationDescFrom data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            visible={this.state.visible}
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -573,8 +586,11 @@ const HrSituation = React.createClass({
                 pageSize: this.state.pagination.pageSize
             }
         }).done((data) => {
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    this.state.ButtonDisabled = true;
+                }
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -610,7 +626,13 @@ const HrSituation = React.createClass({
                     techTotal: thisdata.techTotal,
                     thirtyoneToThirtyfour: thisdata.thirtyoneToThirtyfour,
                     undergraduate: thisdata.undergraduate,
-                    attachment: [thisdata.rosterDownloadFileName, thisdata.socialSecurityDownloadFileName],
+
+                    rosterUrl: thisdata.rosterUrl,
+                    rosterDownloadFileName: thisdata.rosterDownloadFileName,
+                    socialSecurityUrl: thisdata.socialSecurityUrl,
+                    socialSecurityDownloadFileName: thisdata.socialSecurityDownloadFileName,
+
+                    attachment: [thisdata.rosterUrl, thisdata.rosterDownloadFileName, thisdata.socialSecurityUrl, thisdata.socialSecurityDownloadFileName],
                     newEmployment: thisdata.newEmployment,
                     graduateNumber: thisdata.graduateNumber
                 });
@@ -674,9 +696,10 @@ const HrSituation = React.createClass({
                     dataIndex: 'attachment',
                     key: 'attachment',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <div>
+                            <a style={{ marginRight: '10px' }} onClick={downloadFile.bind(null, text[0], text[1])}> {text[1]} </a>
+                            <a onClick={downloadFile.bind(null, text[2], text[3])}> {text[3]} </a>
+                        </div>
                     }
                 }
             ],
@@ -724,9 +747,11 @@ const HrSituation = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     render() {
         const rowSelection = {
@@ -747,6 +772,7 @@ const HrSituation = React.createClass({
                 <div className="user-search">
                     <p>
                         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            disabled={this.state.ButtonDisabled}
                             onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
                         <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                             disabled={!hasSelected}

+ 4 - 6
js/component/account/set/person.less

@@ -41,13 +41,9 @@
             }
         }
         .school-props {
-            > div {
+            >div {
                 float: left;
                 width: 50%;
-                span {
-                    display: inline-block;
-                    width: 45%;
-                }
             }
         }
     }
@@ -69,7 +65,9 @@
         font-size: 28px;
         color: #999;
     }
-    #cmbProvince,#cmbCity,#cmbArea {
+    #cmbProvince,
+    #cmbCity,
+    #cmbArea {
         border-radius: 4px;
     }
 }

+ 3 - 0
js/component/dataDic.js

@@ -4202,6 +4202,9 @@ module.exports = {
         },{
             value: "7",
             key: "培育中"
+        },{
+            value: "8",
+            key: "撤销"
         }
     ],
     technologyStateList:[

+ 16 - 16
js/component/groupCertify/certify.less

@@ -10,10 +10,10 @@
                     margin: 0 auto;
                     padding: 10px 0;
                     .logo {
-                        width: 12%;
+                        width: 6%;
                         padding-top: 60px;
                         float: left;
-                        margin-left: 40px;
+                        margin-left: 100px;
                         position: relative;
                         overflow: hidden;
                         img {
@@ -21,7 +21,7 @@
                             top: 0;
                             left: 0;
                             height: 60px;
-                            width: 120px;
+                            width: 60px;
                         }
                     }
                     .certify-text {
@@ -159,7 +159,7 @@
                             }
                         }
                         .ant-form-extra {
-                            width:560px;
+                            width: 560px;
                         }
                         .idCard-text {
                             display: inline-block;
@@ -168,19 +168,19 @@
                             text-align: center;
                         }
                         .idcard-img {
-                                >.idcard-imgbox {
+                            >.idcard-imgbox {
+                                height: 120px;
+                                padding-top: 120px;
+                                position: relative;
+                                img {
                                     height: 120px;
-                                    padding-top: 120px;
-                                    position: relative;
-                                    img {
-                                        height: 120px;
-                                        position: absolute;
-                                        top: 0;
-                                        left: 0;
-                                        border: 1px solid #c9c9c9;
-                                        border-radius: 6px;
-                                    }
+                                    position: absolute;
+                                    top: 0;
+                                    left: 0;
+                                    border: 1px solid #c9c9c9;
+                                    border-radius: 6px;
                                 }
+                            }
                         }
                         .getVcode {
                             height: 32px;
@@ -248,7 +248,7 @@
                                 line-height: 24px;
                             }
                             button {
-                                margin-top:10px; 
+                                margin-top: 10px;
                             }
                         }
                     }

+ 34 - 34
js/component/groupCertify/personal.jsx

@@ -45,30 +45,6 @@ class Avatar extends React.Component {
         );
     }
 };
-class UploadFile extends React.Component {
-    constructor(props) {
-        super(props);
-    }
-
-    handleChange(info) {
-        if (info.file.status === 'done') {
-            this.props.urlData(info.file.response.data);
-        }
-    }
-    render() {
-        return (
-            <Upload
-                name={this.props.name}
-                action={globalConfig.context + "/api/user/identity/upload"}
-                data={{ 'sign': this.props.name }}
-                beforeUpload={beforeUploadFile}
-                onChange={this.handleChange.bind(this)}
-            >
-                <Button><Icon type="upload" />上传</Button>
-            </Upload>
-        );
-    }
-};
 
 const Content = Form.create()(React.createClass({
     getData() {
@@ -100,7 +76,7 @@ const Content = Form.create()(React.createClass({
                         listedDate: data.data.listedDateFormattedDate,
                         listedType: data.data.listedType,
                         stockCode: data.data.stockCode,
-                        auditStatus:data.data.auditStatus
+                        auditStatus: data.data.auditStatus
                     });
                 };
             }.bind(this),
@@ -147,8 +123,8 @@ const Content = Form.create()(React.createClass({
                 this.setState({
                     loading: true
                 });
-                if ( values.listed == 1 ) {
-                    if ( !values.listedDate || !values.listedType || !values.stockCode ) {
+                if (values.listed == 1) {
+                    if (!values.listedDate || !values.listedType || !values.stockCode) {
                         message.warning("请输入上市资料!");
                         return;
                     };
@@ -161,7 +137,7 @@ const Content = Form.create()(React.createClass({
                     data: {
                         contacts: values.contacts,
                         contactMobile: values.contactMobile,
-                        aftUsername: values.aft,
+                        aftUsername: values.aftUsername,
                         unitName: values.unitName,
                         registeredCapital: values.registeredCapital,
                         licenceNumber: values.licenceNumber,
@@ -176,10 +152,10 @@ const Content = Form.create()(React.createClass({
                         legalPersonIdCard: values.legalPersonIdCard,
                         verificationCode: values.captcha,
                         listed: values.listed,
-                        listedDateFormattedDate: values.listedDate.format("YYYY-MM-DD"),
+                        listedDateFormattedDate: values.listedDate ? values.listedDate.format("YYYY-MM-DD") : null,
                         listedType: values.listedType,
                         stockCode: values.stockCode,
-                        auditStatus:this.state.auditStatus,
+                        auditStatus: this.state.auditStatus,
                         process: 1
                     }
                 }).done(function (data) {
@@ -220,7 +196,7 @@ const Content = Form.create()(React.createClass({
         }
     },
     checkNumber(rule, value, callback) {
-        if (!/(^\d{15}$)/.test(value)) {
+        if (!/(^[a-zA-Z0-9]{0,18}$)/.test(value)) {
             callback('请输入正确的营业执照注册号!');
         } else {
             callback();
@@ -447,9 +423,33 @@ const Content = Form.create()(React.createClass({
                         wrapperCol={{ span: 18 }}
                         label="上年度纳税报表"
                     >
-                        {getFieldDecorator('lastYearTaxReportUrl')(
-                            <UploadFile name="lastYearTaxReportUrl" urlData={this.getLastYearTaxReportUrl} />
-                        )}
+                        <div className="hrSituation-roster">
+                            <Upload
+                                name="ratepay"
+                                action={globalConfig.context + "/techservice/cognizance/upload"}
+                                data={{ 'sign': 'ratepay_' + (new Date().getFullYear() - 1) }}
+                                beforeUpload={beforeUploadFile}
+                                showUploadList={false}
+                                onChange={(info) => {
+                                    if (info.file.status !== 'uploading') {
+                                        console.log(info.file, info.fileList);
+                                    }
+                                    if (info.file.status === 'done') {
+                                        if (!info.file.response.error.length) {
+                                            message.success(`${info.file.name} 文件上传成功!`);
+                                        } else {
+                                            message.warning(info.file.response.error[0].message);
+                                            return;
+                                        };
+                                        this.state.lastYearTaxReportUrl = info.file.response.data;
+                                    } else if (info.file.status === 'error') {
+                                        message.error(`${info.file.name} 文件上传失败。`);
+                                    }
+                                }}
+                            >
+                                <Button><Icon type="upload" /> 上传上年度纳税申报表 </Button>
+                            </Upload>
+                        </div>
                     </FormItem>
                     <FormItem
                         {...formItemLayout}

+ 2 - 2
js/component/groupCertify/result.jsx

@@ -62,7 +62,7 @@ const Content = Form.create()(React.createClass({
             <Spin spinning={this.state.loading} className="certify-spin">
                 {(() => {
                     switch (this.state.auditStatus) {
-                        case 5:
+                        case "5":
                             return <div className="certify-result-box">
                                 <p className="certify-title"
                                     style={{ 'textAlign': 'center' }}
@@ -73,7 +73,7 @@ const Content = Form.create()(React.createClass({
                                     <p>建议您下载数字证书,保障您的支付安全。</p>
                                 </div>
                             </div>;
-                        case 4:
+                        case "4":
                             return <div className="certify-result-box">
                                 <p className="certify-title"
                                     style={{ 'textAlign': 'center' }}

+ 3 - 2
js/component/groupCertify/top.jsx

@@ -1,5 +1,6 @@
 import React from 'react';
 import './certify.less';
+import logo from '../../../image/logo.jpg';
 
 const LoginTop = React.createClass({
     render() {
@@ -7,13 +8,13 @@ const LoginTop = React.createClass({
             <div className="certify-header">
                 <div className="certify-logo clearfix">
                     <div className="logo">
-                        <img src="" alt="" />
+                        <img src={logo} alt="" />
                     </div>
                     <div className="certify-text">
                         <span className="text">实名认证</span>
                         <span className="alink">
                             <a href="./index.html">返回首页</a>
-                            <a href="./account/index.html">尊敬的{ userData.nickname || userData.number || this.state.username}</a>
+                            <a href="./account/index.html">尊敬的{userData.nickname || userData.number || this.state.username}</a>
                             <a href="./login.html">退出</a>
                             <a href="./index.html">交易管理中心</a>
                             <a href="./index.html">消息</a>

+ 9 - 1
js/component/login/adminLogin.less

@@ -1,9 +1,17 @@
+body {
+    background: #fff url(../../../image/bg.jpg) no-repeat;
+    background-size: cover;
+}
+
 .login-box {
     width: 400px;
     height: 320px;
     padding: 50px 50px 0 50px;
     background: #fff;
-    margin: 0 auto;
+    margin: 40px auto;
+    position: relative;
+    left: 200px;
+    top: 90px;
     input {
         height: 36px;
         border-radius: 0px;

+ 1 - 1
js/component/login/login.less

@@ -5,7 +5,7 @@
     margin: 0 auto;
     position: relative;
     background-image: url(../../../image/bg.jpg);
-    background-size: 100%;
+    background-size: cover;
     .login-header {
         background: #fff;
         box-shadow: 0 2px 6px 0px #ccc;

+ 3 - 1
js/component/manageCenter/leftTab.less

@@ -2,9 +2,11 @@
     .account-left {
         width: 16%;
         height: 100%;
-        padding-top: 40px;
+        margin-top: 40px;
+        padding-bottom: 50px;
         float: left;
         border-right: none;
+        overflow-y: auto;
         //background: #e8f2fc;
         .ant-menu-submenu {
             .ant-menu-submenu-title {

+ 92 - 27
js/component/manageCenter/servicesManage/highTech/HighTechApply.jsx

@@ -90,6 +90,32 @@ const CognizanceDescFrom = Form.create()(React.createClass({
             });
         }.bind(this));
     },
+    getContactsList() {
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: this.props.data.uid
+            },
+            success: function (data) {
+                let theOption = [];
+                if (data.error.length || !data.data) {
+                    return;
+                };
+                for (let item in data.data) {
+                    let theData = data.data[item];
+                    theOption.push(
+                        <Select.Option value={item} key={theData}>{theData}</Select.Option>
+                    );
+                };
+                this.setState({
+                    contactsOption: theOption
+                });
+            }.bind(this),
+        });
+    },
     getInitialState() {
         return {
             loading: false,
@@ -144,6 +170,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
         });
         this.loadData();
         this.getStateData();
+        this.getContactsList();
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -177,7 +204,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.form.resetFields();
                         this.state.targetKeys = [];
                         this.state.selectedKeys = [];
@@ -221,10 +248,17 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                             <span className="item-title">公司地址: </span>
                             <span>{theData.postalAddress}</span>
                         </div>
-                        <div className="half-item">
-                            <span className="item-title">联系人: </span>
-                            <span>{theData.contacts}</span>
-                        </div>
+                        <FormItem className="half-item"
+                            labelCol={{ span: 6 }}
+                            wrapperCol={{ span: 14 }}
+                        >
+                            {getFieldDecorator('contacts', {
+                                rules: [{ required: true, message: '此项为必填项!' }],
+                                initialValue: theData.contacts
+                            })(
+                                <Select placeholder='选择一个联系人'>{this.state.contactsOption}</Select>
+                                )}
+                        </FormItem>
                     </div>
                     <FormItem style={{ width: '50%' }}
                         labelCol={{ span: 0 }}
@@ -308,7 +342,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                         wrapperCol={{ span: 24 }}
                     >
                         {getFieldDecorator('accident', {
-                            rules: [{ required: true, message: '此项为必填项!' }],
+                            rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
                             initialValue: theData.accident
                         })(
                             <Radio.Group>
@@ -386,7 +420,7 @@ const CognizanceDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -410,9 +444,10 @@ const CognizanceDesc = React.createClass({
                     >
                         <CognizanceDescFrom
                             visible={this.state.visible}
+                            contactsOption={this.props.contactsOption}
                             authorOption={this.props.authorOption}
                             data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -443,9 +478,9 @@ const CognizanceAdd = React.createClass({
                     return;
                 };
                 for (let item in data.data) {
-                    let theData = item + ' -- ' + data.data[item];
+                    let theData = data.data[item];
                     theOption.push(
-                        <Select.Option value={theData} key={theData}>{theData}</Select.Option>
+                        <Select.Option value={item} key={theData}>{theData}</Select.Option>
                     );
                 };
                 this.setState({
@@ -455,7 +490,14 @@ const CognizanceAdd = React.createClass({
         });
     },
     componentWillReceiveProps(nextProps) {
-        this.state.visible = nextProps.showAdd
+        if (!this.props.showAdd && nextProps.showAdd) {
+            this.state.year = undefined;
+            this.state.contacts = undefined;
+            this.state.comment = undefined;
+            this.state.consultant = undefined;
+            this.state.uid = undefined;
+        };
+        this.state.visible = nextProps.showAdd;
     },
     componentWillMount() {
         let d = new Date();
@@ -508,9 +550,10 @@ const CognizanceAdd = React.createClass({
             if (!data.error.length) {
                 message.success('保存成功!');
                 this.setState({
-                    visible: false
+                    visible: false,
+                    loading: false
                 });
-                this.props.closeAdd(false);
+                this.props.closeAdd(false, true);
             } else {
                 message.warning(data.error[0].message);
                 this.setState({
@@ -553,14 +596,16 @@ const CognizanceAdd = React.createClass({
                                 style={{ width: 200 }}
                                 showSearch
                                 filterOption={companySearch}
-                                onSelect={(e, n) => { this.state.uid = e; this.getContactsList(e); }}>
+                                value={this.state.uid}
+                                onSelect={(e, n) => { this.setState({ uid: e }); this.getContactsList(e); }}>
                                 {this.props.companyOption}
                             </Select>
                         </div>
                         <div className="half-item">
                             <span>选择咨询师:  </span>
                             <Select placeholder="请选择咨询师" style={{ width: 200 }}
-                                onSelect={(e, n) => { this.state.consultant = e }}>
+                                value={this.state.consultant}
+                                onSelect={(e, n) => { this.setState({ consultant: e }); }}>
                                 {this.props.authorOption}
                             </Select>
                         </div>
@@ -569,21 +614,25 @@ const CognizanceAdd = React.createClass({
                         <div className="half-item">
                             <span>选择申请年份:  </span>
                             <Select placeholder="请选择年份" style={{ width: 200 }}
-                                onSelect={(e, n) => { this.state.year = e }}>
+                                value={this.state.year}
+                                onSelect={(e, n) => { this.setState({ year: e }); }}>
                                 {this.state.yearOption}
                             </Select>
                         </div>
                         <div className="half-item">
                             <span>选择联系人:  </span>
                             <Select placeholder="请选择联系人" style={{ width: 200 }}
-                                onSelect={(e, n) => { this.state.contacts = e }}>
+                                value={this.state.contacts}
+                                onSelect={(e, n) => { this.setState({ contacts: e }); }}>
                                 {this.state.contactsOption}
                             </Select>
                         </div>
                     </div>
                     <div>
                         <div>
-                            <Input type="textarea" rows={6} onChange={(e) => { this.state.comment = e.target.value; }} />
+                            <Input type="textarea" rows={6}
+                                value={this.state.comment}
+                                onChange={(e) => { this.setState({ comment: e.target.value }); }} />
                         </div>
                     </div>
                 </Modal>
@@ -624,7 +673,11 @@ const Cognizance = React.createClass({
                         serialNumber: thisdata.serialNumber,
                         locationProvince: thisdata.locationProvince,
                         unitName: thisdata.unitName,
-                        contacts: thisdata.contacts,
+                        contacts: [thisdata.contacts, {
+                            '1': thisdata.firstContacts,
+                            '2': thisdata.secondContacts,
+                            '3': thisdata.thirdContacts
+                        }],
                         createTime: thisdata.createTime,
                         comment: thisdata.comment,
                         state: thisdata.state,
@@ -738,7 +791,14 @@ const Cognizance = React.createClass({
                 }, {
                     title: '联系人',
                     dataIndex: 'contacts',
-                    key: 'contacts'
+                    key: 'contacts',
+                    render: (text) => {
+                        for (let item in text[1]) {
+                            if (text[0] == item) {
+                                return text[1][item];
+                            };
+                        };
+                    }
                 }, {
                     title: '派单日',
                     dataIndex: 'createTimeFormattedDate',
@@ -797,19 +857,20 @@ const Cognizance = React.createClass({
         let deletedIds = [];
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
-            if (rowItem.id) {
-                deletedIds.push(rowItem.id)
+            if (rowItem.cid) {
+                deletedIds.push(rowItem.cid)
             }
         }
         this.setState({
             selectedRowKeys: [],
             loading: deletedIds.length > 0
         });
+        debugger;
         $.ajax({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/techservice/cognizance/deleteCognizance",
+            url: globalConfig.context + "/api/admin/deleteCognizance",
             data: {
                 ids: deletedIds
             }
@@ -825,13 +886,17 @@ const Cognizance = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
-    closeAdd(e) {
+    closeAdd(e, s) {
         this.state.showAdd = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 23 - 13
js/component/manageCenter/servicesManage/highTech/fosterDesc/achievement.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { getConversionForm, beforeUploadFile } from '../../../../tools.js';
+import { getConversionForm, beforeUploadFile, downloadFile } from '../../../../tools.js';
 import { conversionFormList, technicalSourceList } from '../../../../dataDic.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -72,7 +72,7 @@ const AchievementDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -83,6 +83,11 @@ const AchievementDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -157,8 +162,9 @@ const AchievementDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'enclosure' }}
+                        data={{ 'sign': 'achievement' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -176,8 +182,9 @@ const AchievementDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传件 </Button>
+                        <Button><Icon type="upload" /> 上传科技成果附件 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ? <a onClick={downloadFile.bind(null, theData.enclosureUrl, theData.enclosureDownloadFileName)}>{theData.enclosureDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -207,7 +214,7 @@ const AchievementDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -232,8 +239,9 @@ const AchievementDesc = React.createClass({
                         <AchievementDescFrom
                             uid={this.props.uid}
                             data={this.props.data}
+                            visible={this.state.visible}
                             activityNumberList={this.props.activityNumberList}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -288,6 +296,8 @@ const Achievement = React.createClass({
                     conversionResult: thisdata.conversionResult,
                     year: thisdata.year,
                     enclosureUrl: thisdata.enclosureUrl,
+                    enclosureDownloadFileName: thisdata.enclosureDownloadFileName,
+                    enclosure: [thisdata.enclosureUrl, thisdata.enclosureDownloadFileName]
                 });
             };
             this.state.activityNumberList = activityNumber.data;
@@ -344,12 +354,10 @@ const Achievement = React.createClass({
                     key: 'conversionResult',
                 }, {
                     title: '相关附件',
-                    dataIndex: 'enclosureUrl',
-                    key: 'enclosureUrl',
+                    dataIndex: 'enclosure',
+                    key: 'enclosure',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -397,9 +405,11 @@ const Achievement = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 21 - 16
js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
 import { techFieldList, technicalSourceList } from '../../../../dataDic.js';
-import { getTechField, getTechnicalSource, beforeUploadFile } from '../../../../tools.js';
+import { getTechField, getTechnicalSource, beforeUploadFile, downloadFile } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -23,7 +23,7 @@ const ActivityDesc = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/techservice/cognizance/activity",
+            url: globalConfig.context + "/api/admin/activity",
             data: {
                 id: this.props.data.id,
                 uid: this.props.uid,
@@ -77,7 +77,7 @@ const ActivityDesc = React.createClass({
                     loading: false,
                     visible: false
                 });
-                this.props.closeDesc(false);
+                this.props.closeDesc(false, true);
             } else {
                 message.warning(data.error[0].message);
                 this.setState({
@@ -93,8 +93,7 @@ const ActivityDesc = React.createClass({
         this.props.closeDesc(false);
     },
     componentWillReceiveProps(nextProps) {
-        this.state.visible = nextProps.showDesc;
-        if (!this.props.showDesc && nextProps.showDesc) {
+        if (!this.state.showDesc && nextProps.showDesc) {
             this.state.activityName = nextProps.data.activityName;
             this.state.activityNumber = nextProps.data.activityNumber;
             this.state.startDateFormattedDate = nextProps.data.startDateFormattedDate;
@@ -114,6 +113,7 @@ const ActivityDesc = React.createClass({
             this.state.proofDownloadFileName = nextProps.data.proofDownloadFileName;
             this.state.mockData = nextProps.data.mockData;
         };
+        this.state.visible = nextProps.showDesc;
     },
     intellectualChange(nextTargetKeys, direction, moveKeys) {
         this.setState({ targetKeys: nextTargetKeys });
@@ -209,23 +209,26 @@ const ActivityDesc = React.createClass({
                             <div className="half-div">
                                 <span>总计(万元):</span>
                                 <InputNumber value={
-                                    this.state.firstYearExpenditure + this.state.secondYearExpenditure + this.state.thirdYearExpenditure || 0
+                                    (this.state.firstYearExpenditure || 0) +
+                                    (this.state.secondYearExpenditure || 0) +
+                                    (this.state.thirdYearExpenditure || 0)
                                 } />
+                                <span>(自动计算)</span>
                             </div>
                             <div className="half-div">
                                 <span>其中(第一年):</span>
-                                <InputNumber value={this.state.firstYearExpenditure}
-                                    onChange={(e) => { this.setState({ firstYearExpenditure: e }); }} />
+                                <InputNumber value={this.state.firstYearExpenditure || 0}
+                                    onChange={(e) => { this.setState({ firstYearExpenditure: e || 0 }); }} />
                             </div>
                             <div className="half-div">
                                 <span>其中(第二年):</span>
-                                <InputNumber value={this.state.secondYearExpenditure}
-                                    onChange={(e) => { this.setState({ secondYearExpenditure: e }); }} />
+                                <InputNumber value={this.state.secondYearExpenditure || 0}
+                                    onChange={(e) => { this.setState({ secondYearExpenditure: e || 0 }); }} />
                             </div>
                             <div className="half-div">
                                 <span>其中(第三年):</span>
-                                <InputNumber value={this.state.thirdYearExpenditure}
-                                    onChange={(e) => { this.setState({ thirdYearExpenditure: e }); }} />
+                                <InputNumber value={this.state.thirdYearExpenditure || 0}
+                                    onChange={(e) => { this.setState({ thirdYearExpenditure: e || 0 }); }} />
                             </div>
                         </div>
                         <div className="clearfix">
@@ -296,7 +299,7 @@ const ActivityDesc = React.createClass({
                             >
                                 <Button><Icon type="upload" /> 上传立项证明材料 </Button>
                             </Upload>
-                            <p>{this.state.proofUrl ? <a onClick={downloadFile.bind(null, this.state.proofUrl, this.state.proofDownloadFileName)}>{this.state.proofDownloadFileName}</a> : <span>未上传!</span>}</p>
+                            <p>{this.state.proofUrl ? <a onClick={downloadFile.bind(null, this.state.proofUrl, this.state.proofDownloadFileName)}>{this.state.proofDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                         </div>
                     </Modal>
                 </div>
@@ -374,7 +377,7 @@ const Activity = React.createClass({
                     technicalField1: thisdata.technicalField1,
                     technicalField2: thisdata.technicalField2,
                     technicalField3: thisdata.technicalField3,
-                    technicalSource: String(thisdata.technicalSource),
+                    technicalSource: thisdata.technicalSource ? String(thisdata.technicalSource) : undefined,
                     intellectualPropertyNumber: thisdata.intellectualPropertyNumber ? thisdata.intellectualPropertyNumber.split(",") : [],
                     budget: thisdata.budget,
                     firstYearExpenditure: thisdata.firstYearExpenditure,
@@ -508,9 +511,11 @@ const Activity = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 35 - 29
js/component/manageCenter/servicesManage/highTech/fosterDesc/activityCostList.jsx

@@ -15,6 +15,8 @@ const ActivityDescFrom = Form.create()(React.createClass({
     },
     componentWillMount() {
         let _me = this;
+        this.state.internalAllCost = this.props.data.internalAllCost;
+        this.state.allCost = this.props.data.allCost;
         this.props.activityNumberList.map(function (item) {
             _me.state.activityNumberOption.push(
                 <Select.Option value={item.aid} key={item.uid}>{item.activityNumber}</Select.Option>
@@ -31,14 +33,14 @@ const ActivityDescFrom = Form.create()(React.createClass({
             this.props.form.getFieldValue('internalDesignCost') + this.props.form.getFieldValue('internalEquipmentCost') +
             this.props.form.getFieldValue('internalOtherCost') + this.props.form.getFieldValue('externalTotalCost');
     },
-    componentDidMount() {
-        this.allCostCount();
-        this.setState({
-            loading: false
-        });
-    },
-    componentWillReceiveProps() {
-        this.allCostCount();
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.internalAllCost = nextProps.data.internalAllCost;
+            this.state.allCost = nextProps.data.allCost;
+            nextProps.form.resetFields();
+        } else {
+            this.allCostCount();
+        };
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -79,7 +81,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.closeModal();
+                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
@@ -99,7 +101,10 @@ const ActivityDescFrom = Form.create()(React.createClass({
                 <p className="activityCost-title">项目编号</p>
                 {
                     theData.activityNumber ? <span>{theData.activityNumber}</span> :
-                        <Select placeholder="请选择项目编号" style={{ width: 200 }}
+                        <Select
+                            notFoundContent="无项目可选"
+                            placeholder="请选择项目编号"
+                            style={{ width: 200 }}
                             onSelect={(e, n) => { this.state.aid = e; this.state.activityNumber = n.props.children }}>
                             {this.state.activityNumberOption}
                         </Select>
@@ -110,11 +115,9 @@ const ActivityDescFrom = Form.create()(React.createClass({
                         {...formItemLayout}
                         label="共计(万元)"
                     >
-                        {getFieldDecorator('internalAllCost')(
-                            <span className="number-box">
-                                {this.state.internalAllCost}
-                            </span>
-                        )}
+                        <span className="number-box">
+                            {this.state.internalAllCost}
+                        </span>
                     </FormItem>
                     <FormItem className="half-item"
                         {...formItemLayout}
@@ -122,7 +125,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('internalLaborCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.internalLaborCost
+                            initialValue: theData.internalLaborCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -133,7 +136,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('internalDirectCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.internalDirectCost
+                            initialValue: theData.internalDirectCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -144,7 +147,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('internalDepreciationCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.internalDepreciationCost
+                            initialValue: theData.internalDepreciationCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -155,7 +158,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('internalAmortizationCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.internalAmortizationCost
+                            initialValue: theData.internalAmortizationCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -166,7 +169,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('internalDesignCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.internalDesignCost
+                            initialValue: theData.internalDesignCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -177,7 +180,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('internalEquipmentCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.internalEquipmentCost
+                            initialValue: theData.internalEquipmentCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -188,7 +191,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('internalOtherCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.internalOtherCost
+                            initialValue: theData.internalOtherCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -202,7 +205,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('externalTotalCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.externalTotalCost
+                            initialValue: theData.externalTotalCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -213,7 +216,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         {getFieldDecorator('externalAbroadCost', {
                             rules: [{ type: "number", required: true, message: '此项为必填项!' }],
-                            initialValue: theData.externalAbroadCost
+                            initialValue: theData.externalAbroadCost || 0
                         })(
                             <InputNumber />
                             )}
@@ -291,7 +294,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传研发费用台账 </Button>
                     </Upload>
-                    <p>{theData.accountUrl ? <a onClick={downloadFile.bind(null, theData.accountUrl, theData.accountDownloadFileName)}>{theData.accountDownloadFileName}</a> : <span>未上传!</span>}</p>
+                    <p style={{ marginTop: '20px' }}>{theData.accountUrl ? <a onClick={downloadFile.bind(null, theData.accountUrl, theData.accountDownloadFileName)}>{theData.accountDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -321,7 +324,7 @@ const ActivityDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -345,9 +348,10 @@ const ActivityDesc = React.createClass({
                     >
                         <ActivityDescFrom
                             uid={this.props.uid}
+                            visible={this.state.visible}
                             data={this.props.data}
                             activityNumberList={this.props.activityNumberList}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -574,9 +578,11 @@ const Activity = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
 

+ 12 - 8
js/component/manageCenter/servicesManage/highTech/fosterDesc/annualReport.jsx

@@ -37,7 +37,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -401,7 +401,7 @@ const AnnualReportDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -427,7 +427,7 @@ const AnnualReportDesc = React.createClass({
                             uid={this.props.uid}
                             data={this.props.data}
                             detailData={this.state.detailData}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel}  clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -492,7 +492,7 @@ const AnnualReportAdd = React.createClass({
                 this.setState({
                     visible: false
                 });
-                this.props.closeAdd(false);
+                this.props.closeAdd(false, true);
             } else {
                 message.warning(data.error[0].message);
                 this.setState({
@@ -700,18 +700,22 @@ const AnnualReport = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     addClick() {
         this.setState({
             showAdd: true
         });
     },
-    closeAdd(e) {
+    closeAdd(e, s) {
         this.state.showAdd = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     // search() {
     //     this.loadData();

+ 25 - 15
js/component/manageCenter/servicesManage/highTech/fosterDesc/finance.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { beforeUpload } from '../../../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -59,7 +59,7 @@ const FinanceDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -70,6 +70,11 @@ const FinanceDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -214,8 +219,9 @@ const FinanceDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'finance' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'finance' + ( this.state.year || theData.year ) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -233,8 +239,9 @@ const FinanceDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传文件 </Button>
+                        <Button><Icon type="upload" /> 上传财务报表 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.financeUrl ? <a onClick={downloadFile.bind(null, theData.financeUrl, theData.financeDownloadFileName)}>{theData.financeDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -264,7 +271,7 @@ const FinanceDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -289,7 +296,8 @@ const FinanceDesc = React.createClass({
                         <FinanceDescFrom
                             uid={this.props.uid}
                             data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            visible={this.state.visible}
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -336,7 +344,9 @@ const Finance = React.createClass({
                     netProfit: thisdata.netProfit,
                     salesRevenue: thisdata.salesRevenue,
                     year: thisdata.year,
-                    financeUrl: thisdata.financeUrl
+                    financeUrl: thisdata.financeUrl,
+                    financeDownloadFileName: thisdata.financeDownloadFileName,
+                    finance: [thisdata.financeUrl, thisdata.financeDownloadFileName]
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -399,12 +409,10 @@ const Finance = React.createClass({
                     key: 'netAsset',
                 }, {
                     title: '相关附件',
-                    dataIndex: 'financeUrl',
-                    key: 'financeUrl',
+                    dataIndex: 'finance',
+                    key: 'finance',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -452,9 +460,11 @@ const Finance = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 25 - 13
js/component/manageCenter/servicesManage/highTech/fosterDesc/honorList.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Modal, Upload, DatePicker } from 'antd';
 import './techProduct.less';
-import { beforeUploadFile } from '../../../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -33,7 +33,7 @@ const HonorListDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -44,6 +44,11 @@ const HonorListDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -94,8 +99,9 @@ const HonorListDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'enclosure' }}
+                        data={{ 'sign': 'achievement' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -113,8 +119,9 @@ const HonorListDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传件 </Button>
+                        <Button><Icon type="upload" /> 上传科技成果附件 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ? <a onClick={downloadFile.bind(null, theData.enclosureUrl, theData.enclosureDownloadFileName)}>{theData.enclosureDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -144,7 +151,7 @@ const HonorListDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -169,7 +176,10 @@ const HonorListDesc = React.createClass({
                         <HonorListDescFrom
                             uid={this.props.uid}
                             data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange}
+                            visible={this.state.visible}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -207,6 +217,8 @@ const HonorList = React.createClass({
                     name: thisdata.name,
                     issuingTime: thisdata.issuingTime,
                     enclosureUrl: thisdata.enclosureUrl,
+                    enclosureDownloadFileName: thisdata.enclosureDownloadFileName,
+                    enclosure: [thisdata.enclosureUrl, thisdata.enclosureDownloadFileName],
                     issuingTimeFormattedDate: thisdata.issuingTimeFormattedDate,
                     issuingMechanism: thisdata.issuingMechanism
                 });
@@ -255,12 +267,10 @@ const HonorList = React.createClass({
                     key: 'issuingMechanism'
                 }, {
                     title: '相关附件',
-                    dataIndex: 'enclosureUrl',
-                    key: 'enclosureUrl',
+                    dataIndex: 'enclosure',
+                    key: 'enclosure',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -308,9 +318,11 @@ const HonorList = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 43 - 20
js/component/manageCenter/servicesManage/highTech/fosterDesc/hrSituation.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload } from 'antd';
-import { beforeUpload } from '../../../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../../../tools.js';
 import './hrSituation.less'
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
@@ -85,7 +85,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -96,6 +96,11 @@ const HrSituationDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const { getFieldDecorator } = this.props.form;
         const formItemLayout = {
@@ -103,6 +108,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
             wrapperCol: { span: 16 },
         };
         const FormItem = Form.Item;
+        const theData = this.props.data;
         return (
             <Form onSubmit={this.handleSubmit} className="hrSituation-form">
                 <div className="clearfix">
@@ -434,10 +440,11 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                 </div>
                 <div className="hrSituation-roster">
                     <Upload
-                        name="socialSecurity"
+                        name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'socialSecurity' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'roster_' + (this.state.year || theData.year) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -449,21 +456,23 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                                     message.warning(info.file.response.error[0].message);
                                     return;
                                 };
-                                this.state.socialSecurityUrl = info.file.response.data;
+                                this.state.rosterUrl = info.file.response.data;
                             } else if (info.file.status === 'error') {
                                 message.error(`${info.file.name} 文件上传失败。`);
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传社保文件 </Button>
+                        <Button><Icon type="upload" /> 上传花名册 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.rosterUrl ? <a onClick={downloadFile.bind(null, theData.rosterUrl, theData.rosterDownloadFileName)}>{theData.rosterDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <div className="hrSituation-roster">
                     <Upload
-                        name="roster"
+                        name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'roster' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'social_security_' + (this.state.year || theData.year) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -475,14 +484,15 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                                     message.warning(info.file.response.error[0].message);
                                     return;
                                 };
-                                this.state.rosterUrl = info.file.response.data;
+                                this.state.socialSecurityUrl = info.file.response.data;
                             } else if (info.file.status === 'error') {
                                 message.error(`${info.file.name} 文件上传失败。`);
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传花名册文件 </Button>
+                        <Button><Icon type="upload" /> 上传社保情况 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.socialSecurityUrl ? <a onClick={downloadFile.bind(null, theData.socialSecurityUrl, theData.socialSecurityDownloadFileName)}>{theData.socialSecurityDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <div>
                     <span style={{ color: "red" }}>提示</span>
@@ -517,7 +527,7 @@ const HrSituationDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -542,7 +552,10 @@ const HrSituationDesc = React.createClass({
                         <HrSituationDescFrom
                             uid={this.props.uid}
                             data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange}
+                            visible={this.state.visible}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -604,7 +617,14 @@ const HrSituation = React.createClass({
                     techTotal: thisdata.techTotal,
                     thirtyoneToThirtyfour: thisdata.thirtyoneToThirtyfour,
                     undergraduate: thisdata.undergraduate,
-                    attachment: [thisdata.rosterDownloadFileName, thisdata.socialSecurityDownloadFileName],
+
+                    rosterUrl: thisdata.rosterUrl,
+                    rosterDownloadFileName: thisdata.rosterDownloadFileName,
+                    socialSecurityUrl: thisdata.socialSecurityUrl,
+                    socialSecurityDownloadFileName: thisdata.socialSecurityDownloadFileName,
+
+                    attachment: [thisdata.rosterUrl, thisdata.rosterDownloadFileName, thisdata.socialSecurityUrl, thisdata.socialSecurityDownloadFileName],
+
                     newEmployment: thisdata.newEmployment,
                     graduateNumber: thisdata.graduateNumber
                 });
@@ -668,9 +688,10 @@ const HrSituation = React.createClass({
                     dataIndex: 'attachment',
                     key: 'attachment',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <div>
+                            <a style={{ marginRight: '10px' }} onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
+                            <a onClick={downloadFile.bind(null, text[2], text[3])}>{text[3]}</a>
+                        </div>
                     }
                 }
             ],
@@ -718,9 +739,11 @@ const HrSituation = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     render() {
         const rowSelection = {

+ 6 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectual.jsx

@@ -45,6 +45,8 @@ const Intellectual = React.createClass({
                     authorizationDate: thisdata.authorizationDate,
                     evaluationCategory: thisdata.evaluationCategory,
                     authorizationDateFormattedDate: thisdata.authorizationDateFormattedDate,
+                    propertyRightUrl: thisdata.propertyRightUrl,
+                    propertyRightDownloadFileName: thisdata.propertyRightDownloadFileName
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -153,9 +155,11 @@ const Intellectual = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 34 - 20
js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectualDesc.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Modal, Button, Form, message, Input, Spin, Select, DatePicker, Upload } from 'antd';
 import { intellectualGetList, catagoryList } from '../../../../dataDic.js';
-import { beforeUploadFile } from '../../../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -57,19 +57,24 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.closeModal();
+                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
         });
     },
-    checkIdcardnum(rule, value, callback) {
-        if (!/(^\d{15}$)|(^\d{17}(\d|X)$)/.test(value)) {
-            callback('请输入正确的身份证号!');
-        } else {
-            callback();
-        }
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
     },
+    // checkIdcardnum(rule, value, callback) {
+    //     if (!/(^\d{15}$)|(^\d{17}(\d|X)$)/.test(value)) {
+    //         callback('请输入正确的身份证号!');
+    //     } else {
+    //         callback();
+    //     }
+    // },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -78,6 +83,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
             wrapperCol: { span: 12 },
         };
         const _me = this;
+        const theData = this.props.data;
         return (
             <Form horizontal onSubmit={this.handleSubmit}>
                 <FormItem
@@ -86,7 +92,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 >
                     {getFieldDecorator('intellectualPropertyNumber', {
                         rules: [{ required: true, message: '请输入,知识产权编号不能为空!' }],
-                        initialValue: this.props.data.intellectualPropertyNumber
+                        initialValue: theData.intellectualPropertyNumber
                     })(
                         <Input placeholder="请输入知识产权编号" />
                         )}
@@ -97,7 +103,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 >
                     {getFieldDecorator('intellectualPropertyName', {
                         rules: [{ required: true, message: '请输入,知识产权名称不能为空!' }],
-                        initialValue: this.props.data.intellectualPropertyName
+                        initialValue: theData.intellectualPropertyName
                     })(
                         <Input placeholder="请输入知识产权名称" />
                         )}
@@ -108,7 +114,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 >
                     {getFieldDecorator('sortNumber', {
                         rules: [{ required: true, message: '请输入,排序号不能为空!' }],
-                        initialValue: this.props.data.sortNumber
+                        initialValue: theData.sortNumber
                     })(
                         <Input placeholder="请输入排序号" />
                         )}
@@ -119,7 +125,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 >
                     {getFieldDecorator('catagory', {
                         rules: [{ required: true, message: '请选择,知识产权类型不能为空!' }],
-                        initialValue: this.props.data.catagory
+                        initialValue: theData.catagory
                     })(
                         <Select placeholder="请选择知识产权类型" style={{ width: 200 }}
                             onChange={(e) => { this.state.catagory = e; }}>
@@ -133,7 +139,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 >
                     {getFieldDecorator('obtainWay', {
                         rules: [{ required: true, message: '请选择,获得方式不能为空!' }],
-                        initialValue: this.props.data.obtainWay
+                        initialValue: theData.obtainWay
                     })(
                         <Select placeholder="请选择获得方式" style={{ width: 200 }}
                             onChange={(e) => { this.state.obtainWay = e; }}>
@@ -147,7 +153,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 >
                     {getFieldDecorator('authorizationNumber', {
                         rules: [{ required: true, message: '请输入,授权号不能为空!' }],
-                        initialValue: this.props.data.authorizationNumber
+                        initialValue: theData.authorizationNumber
                     })(
                         <Input placeholder="请输入授权号" />
                         )}
@@ -158,18 +164,19 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 >
                     {getFieldDecorator('authorizationDate', {
                         rules: [{ type: 'object', required: true, message: '请选择,授权日期不能为空!' }],
-                        initialValue: !this.props.data.authorizationDateFormattedDate ? null : moment(this.props.data.authorizationDateFormattedDate, 'YYYY/MM/DD')
+                        initialValue: !theData.authorizationDateFormattedDate ? null : moment(theData.authorizationDateFormattedDate, 'YYYY/MM/DD')
                     })(
                         <DatePicker style={{ width: 200 }}
                             onChange={(data, dataString) => { this.state.authorizationDateFormattedDate = dataString }} />
                         )}
                 </FormItem>
-                <FormItem>
+                <div className="hrSituation-roster">
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'propertyRight' }}
+                        data={{ 'sign': 'property_ritht' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -189,7 +196,8 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传知识产权证书 </Button>
                     </Upload>
-                </FormItem>
+                    <p style={{ margin: '10px 0' }}>{theData.propertyRightUrl ? <a onClick={downloadFile.bind(null, theData.propertyRightUrl, theData.propertyRightDownloadFileName)}>{theData.propertyRightDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                </div>
                 <FormItem>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                     <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
@@ -219,7 +227,7 @@ const intellectualDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -241,7 +249,13 @@ const intellectualDesc = React.createClass({
                         width='600px'
                         footer=''
                     >
-                        <IntellectualDescFrom uid={this.props.uid} data={this.props.data} spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <IntellectualDescFrom
+                            uid={this.props.uid}
+                            data={this.props.data}
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            visible={this.state.visible}
+                            clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>

+ 47 - 32
js/component/manageCenter/servicesManage/highTech/fosterDesc/orgTechCenter.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Modal, Upload, DatePicker } from 'antd';
 import './techProduct.less';
-import { beforeUploadFile } from '../../../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -26,15 +26,15 @@ const CenterListDescFrom = Form.create()(React.createClass({
                         id: this.props.data.id,
                         uid: this.props.uid,
                         projectName: values.projectName,
-                        projectTime: values.projectTime.format("YYYY-MM-DD"),
+                        projectTimeFormattedDate: values.projectTime.format("YYYY-MM-DD"),
                         institution: values.institution,
-                        termTime: values.termTime.format("YYYY-MM-DD"),
+                        termTimeFormattedDate: values.termTime.format("YYYY-MM-DD"),
                         protocolUrl: this.state.protocolUrl
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -106,8 +106,9 @@ const CenterListDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'protocol' }}
+                        data={{ 'sign': 'protocol' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -125,8 +126,9 @@ const CenterListDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传文件 </Button>
+                        <Button><Icon type="upload" /> 上传研发费用台账 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.protocolUrl ? <a onClick={downloadFile.bind(null, theData.protocolUrl, theData.protocolDownloadFileName)}>{theData.protocolDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -156,7 +158,7 @@ const CenterListDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -179,7 +181,7 @@ const CenterListDesc = React.createClass({
                         footer=''
                     >
                         <CenterListDescFrom data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -201,20 +203,21 @@ const CenterList = React.createClass({
                 uid: this.props.data.uid
             }
         }).done((data) => {
-            if (!data.data) {
+            let theData = data.data;
+            if (!theData) {
                 if (data.error.length) {
                     message.warning(data.error[0].message);
                 };
-                return;
+                theData = {};
             };
-            this.state.cid = data.data.id;
-            this.state.foundingTime = data.data.foundingTime;
-            this.state.principal = data.data.principal;
-            this.state.systemCatalog = data.data.systemCatalog;
-            this.state.systemUrl = data.data.systemUrl;
-            this.state.systemDownloadFileName = data.data.systemDownloadFileName;
-            this.state.centerName = data.data.centerName;
-            this.state.comment = data.data.comment;
+            this.state.cid = theData.id;
+            this.state.foundingTime = theData.foundingTimeFormattedDate;
+            this.state.principal = theData.principal;
+            this.state.systemCatalog = theData.systemCatalog;
+            this.state.systemUrl = theData.systemUrl;
+            this.state.systemDownloadFileName = theData.systemDownloadFileName;
+            this.state.centerName = theData.centerName;
+            this.state.comment = theData.comment;
             this.loadData();
         }).always(function () {
             this.setState({
@@ -238,8 +241,10 @@ const CenterList = React.createClass({
                 cid: this.state.cid,
             }
         }).done((data) => {
-            if (data.error.length || !data.data || !data.data.list) {
-                message.warning(data.error[0].message);
+            if (!data.data || !data.data.list) {
+                if (data.error.length) {
+                    message.warning(data.error[0].message);
+                }
                 return;
             };
             for (let i = 0; i < data.data.list.length; i++) {
@@ -250,7 +255,9 @@ const CenterList = React.createClass({
                     cid: thisdata.cid,
                     projectTimeFormattedDate: thisdata.projectTimeFormattedDate,
                     projectName: thisdata.projectName,
+                    protocolDownloadFileName: thisdata.protocolDownloadFileName,
                     protocolUrl: thisdata.protocolUrl,
+                    protocol: [thisdata.protocolUrl, thisdata.protocolDownloadFileName],
                     institution: thisdata.institution,
                     termTimeFormattedDate: thisdata.termTimeFormattedDate
                 });
@@ -303,12 +310,10 @@ const CenterList = React.createClass({
                     key: 'institution'
                 }, {
                     title: '协议附件',
-                    dataIndex: 'protocolUrl',
-                    key: 'protocolUrl',
+                    dataIndex: 'protocol',
+                    key: 'protocol',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -318,6 +323,12 @@ const CenterList = React.createClass({
     componentWillMount() {
         this.loadOrgTechCenterDetail();
     },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.data.uid !== nextProps.data.uid) {
+            this.props.data.uid = nextProps.data.uid;
+            this.loadOrgTechCenterDetail();
+        };
+    },
     tableRowClick(record, index) {
         this.state.RowData = record;
         this.setState({
@@ -356,9 +367,11 @@ const CenterList = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     saveCenterDetail() {
         this.setState({
@@ -371,6 +384,7 @@ const CenterList = React.createClass({
             url: globalConfig.context + "/api/admin/disposeCenter",
             data: {
                 uid: this.props.data.uid,
+                id: this.state.cid,
                 principal: this.state.principal,
                 systemUrl: this.state.systemUrl,
                 systemCatalog: this.state.systemCatalog,
@@ -382,12 +396,12 @@ const CenterList = React.createClass({
             if (!data.error.length) {
                 message.success('保存成功!');
                 this.loadOrgTechCenterDetail();
-                this.setState({
-                    loading: false,
-                });
             } else {
                 message.warning(data.error[0].message);
             };
+            this.setState({
+                loading: false,
+            });
         });
     },
     render() {
@@ -415,6 +429,7 @@ const CenterList = React.createClass({
                         />
                         <span>成立时间: </span>
                         <DatePicker
+                            allowClear={false}
                             value={moment(this.state.foundingTime)}
                             onChange={(date, dateString) => { this.setState({ foundingTime: dateString }); }}
                         />
@@ -465,9 +480,9 @@ const CenterList = React.createClass({
                                 }
                             }}
                         >
-                            <Button><Icon type="upload" /> 上传研发费用台账 </Button>
+                            <Button><Icon type="upload" /> 上传研发部门制度 </Button>
                         </Upload>
-                        <p style={{ marginTop: '10px' }}>{this.state.systemUrl ? <a onClick={downloadFile.bind(null, this.state.systemUrl, this.state.systemDownloadFileName)}>{this.state.systemDownloadFileName}</a> : <span>未上传!</span>}</p>
+                        <p style={{ marginTop: '10px' }}>{this.state.systemUrl ? <a onClick={downloadFile.bind(null, this.state.systemUrl, this.state.systemDownloadFileName)}>{this.state.systemDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                     </div>
                 </div>
                 <Button type='primary' onClick={this.saveCenterDetail} style={{ marginBottom: '10px' }}>保存</Button>

+ 27 - 17
js/component/manageCenter/servicesManage/highTech/fosterDesc/ratepay.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { beforeUpload } from '../../../../tools.js';
+import { beforeUploadFile, downloadFile } from '../../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
@@ -49,12 +49,12 @@ const RatepayDescFrom = Form.create()(React.createClass({
                         grossProfit: values.grossProfit,
                         researchCost: values.researchCost,
                         year: this.state.year || this.props.data.year,
-                        taxReturnUrl: this.state.ratepayUrl
+                        taxReturnUrl: this.state.taxReturnUrl
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
@@ -65,6 +65,11 @@ const RatepayDescFrom = Form.create()(React.createClass({
             }
         });
     },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.props.form.resetFields();
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -190,8 +195,9 @@ const RatepayDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'ratepay' }}
-                        beforeUpload={beforeUpload}
+                        data={{ 'sign': 'ratepay_' + (this.state.year || theData.year) }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -203,14 +209,15 @@ const RatepayDescFrom = Form.create()(React.createClass({
                                     message.warning(info.file.response.error[0].message);
                                     return;
                                 };
-                                this.state.ratepayUrl = info.file.response.data;
+                                this.state.taxReturnUrl = info.file.response.data;
                             } else if (info.file.status === 'error') {
                                 message.error(`${info.file.name} 文件上传失败。`);
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传文件 </Button>
+                        <Button><Icon type="upload" /> 上传企业纳税申报表 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.taxReturnUrl ? <a onClick={downloadFile.bind(null, theData.taxReturnUrl, theData.taxReturnDownloadFileName)}>{theData.taxReturnDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -240,7 +247,7 @@ const RatepayDesc = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -265,7 +272,8 @@ const RatepayDesc = React.createClass({
                         <RatepayDescFrom
                             uid={this.props.uid}
                             data={this.props.data}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            visible={this.state.visible}
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -310,7 +318,9 @@ const Ratepay = React.createClass({
                     researchCost: thisdata.researchCost,
                     grossProfit: thisdata.grossProfit,
                     year: thisdata.year,
-                    taxReturnUrl: thisdata.taxReturnUrl
+                    taxReturnUrl: thisdata.taxReturnUrl,
+                    taxReturnDownloadFileName: thisdata.taxReturnDownloadFileName,
+                    taxReturn: [thisdata.taxReturnUrl, thisdata.taxReturnDownloadFileName]
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -365,12 +375,10 @@ const Ratepay = React.createClass({
                     key: 'nonOperatingIncome',
                 }, {
                     title: '相关附件',
-                    dataIndex: 'taxReturnUrl',
-                    key: 'taxReturnUrl',
+                    dataIndex: 'taxReturn',
+                    key: 'taxReturn',
                     render: (text) => {
-                        <a href="" onClick={() => {
-                            window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + text + "&sign=" + "type")
-                        }}></a>
+                        return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
                 }
             ],
@@ -418,9 +426,11 @@ const Ratepay = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 5 - 3
js/component/manageCenter/servicesManage/highTech/fosterDesc/standard.jsx

@@ -50,7 +50,7 @@ const StandardDesc = React.createClass({
             } else {
                 message.warning(data.error[0].message);
             };
-            this.props.closeDesc(false);
+            this.props.closeDesc(false,true);
         }.bind(this));
     },
     handleCancel(e) {
@@ -263,9 +263,11 @@ const Standard = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 20 - 12
js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Upload, Form, Button, Radio, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
 import { techFieldList, technicalSourceList } from '../../../../dataDic.js';
-import { getTechField, getTechnicalSource, beforeUploadFile } from '../../../../tools.js';
+import { getTechField, getTechnicalSource, beforeUploadFile, downloadFile } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -25,10 +25,10 @@ const TechProductDescFrom = Form.create()(React.createClass({
         this.state.targetKeys = this.props.data.intellectualPropertyNumber || [];
     },
     componentWillReceiveProps(nextProps) {
-        if (this.props.resetForm) {
+        if (!this.props.visible && nextProps.visible && nextProps.data && this.props.resetForm) {
             this.state.targetKeys = nextProps.data.intellectualPropertyNumber || [];
             this.props.form.resetFields();
-        }
+        };
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -60,7 +60,7 @@ const TechProductDescFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
-                        this.props.closeModal();
+                        this.props.clickOk();
                         this.props.form.resetFields();
                         this.state.targetKeys = [];
                         this.state.selectedKeys = [];
@@ -89,7 +89,7 @@ const TechProductDescFrom = Form.create()(React.createClass({
         };
         const _me = this;
         return (
-            <Form onSubmit={this.handleSubmit} className="activityCost-form">
+            <Form onSubmit={this.handleSubmit} id="techProduct-form">
                 <div className="clearfix">
                     <FormItem className="half-item"
                         {...formItemLayout}
@@ -228,10 +228,11 @@ const TechProductDescFrom = Form.create()(React.createClass({
                 </div>
                 <div style={{ width: '50%' }}>
                     <Upload
-                        name="account"
+                        name="ratepay"
                         action={globalConfig.context + "/techservice/cognizance/upload"}
-                        data={{ 'sign': this.props.year + 'proof' }}
+                        data={{ 'sign': 'tech_product' }}
                         beforeUpload={beforeUploadFile}
+                        showUploadList={false}
                         onChange={(info) => {
                             if (info.file.status !== 'uploading') {
                                 console.log(info.file, info.fileList);
@@ -249,8 +250,9 @@ const TechProductDescFrom = Form.create()(React.createClass({
                             }
                         }}
                     >
-                        <Button><Icon type="upload" /> 上传台账 </Button>
+                        <Button><Icon type="upload" /> 上传高新技术产品台帐 </Button>
                     </Upload>
+                    <p style={{ marginTop: '10px' }}>{theData.accountUrl ? <a onClick={downloadFile.bind(null, theData.accountUrl, theData.accountDownloadFileName)}>{theData.accountDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -282,7 +284,7 @@ const TechProductDesc = React.createClass({
             visible: false,
             resetForm: true
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false, true);
     },
     handleCancel(e) {
         this.setState({
@@ -310,7 +312,7 @@ const TechProductDesc = React.createClass({
                             uid={this.props.uid}
                             resetForm={this.state.resetForm}
                             mockData={this.props.mockData}
-                            spinState={this.spinChange} closeModal={this.handleCancel} />
+                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>
@@ -393,6 +395,10 @@ const TechProduct = React.createClass({
                     conditionEffect: thisdata.conditionEffect,
                     year: thisdata.year,
                     createTime: thisdata.createTime,
+
+                    accountDownloadFileName: thisdata.accountDownloadFileName,
+                    accountUrl: thisdata.accountUrl
+
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -501,9 +507,11 @@ const TechProduct = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 7 - 1
js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.less

@@ -2,7 +2,7 @@
     padding: 0px;
     .clearfix {
         >.orgTech-item {
-            width: 60%;
+            width: 80%;
             display: inline-block;
             >span {
                 margin-right: 10px;
@@ -21,6 +21,12 @@
     }
 }
 
+#techProduct-form {
+    .half-item {
+        height: auto
+    }
+}
+
 .upload-box {
     display: inline-block;
     margin-top: 10px;

+ 15 - 3
js/component/manageCenter/servicesManage/highTech/highTechFoster.jsx

@@ -38,7 +38,11 @@ const Patent = React.createClass({
                         serialNumber: thisdata.serialNumber,
                         locationProvince: thisdata.locationProvince,
                         unitName: thisdata.unitName,
-                        contacts: thisdata.contacts,
+                        contacts: [thisdata.contacts, {
+                            '1': thisdata.firstContacts,
+                            '2': thisdata.secondContacts,
+                            '3': thisdata.thirdContacts
+                        }],
                         createTime: thisdata.createTime,
                         comment: thisdata.comment,
                         state: thisdata.state,
@@ -146,9 +150,16 @@ const Patent = React.createClass({
                     dataIndex: 'unitName',
                     key: 'unitName',
                 }, {
-                    title: '联系方式',
+                    title: '联系',
                     dataIndex: 'contacts',
                     key: 'contacts',
+                    render: (text) => {
+                        for (let item in text[1]) {
+                            if (text[0] == item) {
+                                return text[1][item];
+                            };
+                        };
+                    }
                 }, {
                     title: '状态',
                     dataIndex: 'state',
@@ -244,7 +255,8 @@ const Patent = React.createClass({
                         </Spin>
                     </div>
                 </div >
-                <FosterDesc style={this.state.fosterDescDisplay}
+                <FosterDesc
+                    style={this.state.fosterDescDisplay}
                     data={this.state.RowData}
                     returnBtn={this.returnBtn} />
             </div>

+ 4 - 2
js/component/manageCenter/servicesManage/patent/applyFee.jsx

@@ -184,9 +184,11 @@ const applyFee = React.createClass({
             });
         };
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     searchAuthorizedDate(data, dataString) {
         this.state.searchData = dataString;

+ 1 - 1
js/component/manageCenter/servicesManage/patent/applyFeeDesc.jsx

@@ -48,7 +48,7 @@ const PatentDesc = React.createClass({
                 visible: false,
             });
         }.bind(this));
-        this.props.closeDesc(false);
+        this.props.closeDesc(false,true);
     },
     handleConfirm() {
         this.state.paymentState = 1;

+ 3 - 3
js/component/manageCenter/servicesManage/patent/clientInputPatent.jsx

@@ -83,7 +83,7 @@ const PatentAddFrom = Form.create()(React.createClass({
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.closeModal();
+                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
@@ -225,7 +225,7 @@ const PatentAdd = React.createClass({
         this.setState({
             visible: false,
         });
-        this.props.closeDesc(false);
+        this.props.closeDesc(false,true);
     },
     handleCancel(e) {
         this.setState({
@@ -248,7 +248,7 @@ const PatentAdd = React.createClass({
                         width='720px'
                         footer=''
                     >
-                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel}  clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>

+ 7 - 10
js/component/manageCenter/servicesManage/patent/comPatentAdd.jsx

@@ -3,7 +3,7 @@ import { Icon, Modal, Button, Form, Upload, message, Input, Spin, Checkbox, Sele
 import './comprehensive.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
-import { getBase64, beforeUpload ,companySearch} from '../../../tools.js';
+import { getBase64, beforeUpload, companySearch } from '../../../tools.js';
 
 class Avatar extends React.Component {
     constructor(props) {
@@ -24,7 +24,6 @@ class Avatar extends React.Component {
         }
     }
     render() {
-        const imageUrl = this.state.imageUrl;
         return (
             <Upload
                 className="avatar-uploader"
@@ -35,11 +34,7 @@ class Avatar extends React.Component {
                 beforeUpload={beforeUpload}
                 onChange={this.handleChange.bind(this)}
             >
-                {
-                    imageUrl ?
-                        <img src={imageUrl} role="presentation" className="avatar" /> :
-                        <Icon type="plus" className="avatar-uploader-trigger" />
-                }
+                <Button><Icon type="upload" />上传专利代理委托书</Button>
             </Upload>
         );
     }
@@ -119,7 +114,7 @@ const PatentAddFrom = Form.create()(React.createClass({
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.closeModal();
+                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
@@ -228,7 +223,9 @@ const PatentAddFrom = Form.create()(React.createClass({
                     {getFieldDecorator('avatar')(
                         <Avatar urlData={this.avatarUrl} name='patent_prory_statement' oid={this.state.companyName} />
                     )}
-                    <span>请上传专利代理委托书</span><a onClick={() => { window.open(globalConfig.context + "/open/downloadTemplateFile?sign=patent_prory_statement") }}>模板下载</a>
+                    <p>
+                        <a onClick={() => { window.open(globalConfig.context + "/open/downloadTemplateFile?sign=patent_prory_statement") }}>模板下载</a>
+                    </p>
                 </FormItem>
                 <FormItem>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
@@ -278,7 +275,7 @@ const PatentAdd = React.createClass({
                         width='800px'
                         footer=''
                     >
-                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} />
+                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>

+ 33 - 31
js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx

@@ -4,7 +4,7 @@ import './comprehensive.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import { patentTypeList, patentFieldList, patentStateList } from '../../../dataDic.js';
-import { getBase64, beforeUpload, getPatentState, getTime } from '../../../tools.js';
+import { getBase64, beforeUpload, getPatentState, getTime, downloadFile } from '../../../tools.js';
 
 class Avatar extends React.Component {
     constructor(props) {
@@ -14,17 +14,24 @@ class Avatar extends React.Component {
         }
     }
     handleChange(info) {
+        if (info.file.status !== 'uploading') {
+            console.log(info.file, info.fileList);
+        }
         if (info.file.status === 'done') {
-            // Get this url from response in real world.
-            getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
+            if (!info.file.response.error.length) {
+                message.success(`${info.file.name} 文件上传成功!`);
+            } else {
+                message.warning(info.file.response.error[0].message);
+                return;
+            };
             this.props.urlData(info.file.response.data);
-        }
+        } else if (info.file.status === 'error') {
+            message.error(`${info.file.name} 文件上传失败。`);
+        };
     }
     render() {
-        const imageUrl = this.state.imageUrl;
         return (
-            <Upload
-                className="avatar-uploader"
+            <Upload className="upload-file"
                 name="avatar"
                 showUploadList={false}
                 action={globalConfig.context + "/techservice/patent/patentFile"}
@@ -32,11 +39,7 @@ class Avatar extends React.Component {
                 beforeUpload={beforeUpload}
                 onChange={this.handleChange.bind(this)}
             >
-                {
-                    imageUrl ?
-                        <img src={imageUrl} role="presentation" className="avatar" /> :
-                        <Icon type="plus" className="avatar-uploader-trigger" />
-                }
+                <Button><Icon type="upload" /> 点击上传 </Button>
             </Upload>
         );
     }
@@ -123,9 +126,6 @@ const PatentDesc = React.createClass({
             )
         });
     },
-    downloadFile(url, type) {
-        window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + url + "&sign=" + type)
-    },
     showModal() {
         this.setState({
             visible: true,
@@ -150,6 +150,7 @@ const PatentDesc = React.createClass({
                 "patentWritingUrl": this.state.patentWritingUrl,
                 "authorizationNoticeUrl": this.state.authorizationNoticeUrl,
                 "patentCertificateUrl": this.state.patentCertificateUrl,
+                "pState": this.props.data.patentState,
                 "state": this.state.patentStateAdd,
                 "recordTimeFormattedDate": this.state.recordTime,
                 "principal": this.state.adminName
@@ -164,7 +165,7 @@ const PatentDesc = React.createClass({
             this.setState({
                 visible: false,
             });
-            this.props.closeDesc(false);
+            this.props.closeDesc(false, true);
         }.bind(this));
     },
     checkPatentProcess() {
@@ -178,15 +179,16 @@ const PatentDesc = React.createClass({
             this.handleOk()
         };
     },
+    componentWillMount() {
+        this.getOption();
+    },
     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) {
+        if (nextProps.data && !this.state.visible && nextProps.showDesc) {
             this.state.xid = nextProps.data.pid;
             this.state.patentDes = nextProps.data.patentDes;
             this.state.patentName = nextProps.data.patentName;
@@ -195,8 +197,8 @@ const PatentDesc = React.createClass({
             this.state.patentState = String(nextProps.data.patentState);
             this.state.patentField = String(nextProps.data.patentField);
             this.loadData();
-            this.getOption();
-        }
+        };
+        this.state.visible = nextProps.showDesc;
     },
     handleCancel(e) {
         this.setState({
@@ -280,36 +282,36 @@ const PatentDesc = React.createClass({
                                 <div>材料管理:
                                     {theData.patentWritingUrl !== null && theData.patentWritingUrl !== undefined && theData.patentWritingUrl !== '' ?
                                     <p className="download-file">
-                                        <a href="" onClick={this.downloadFile.bind(this, theData.patentWritingUrl, "patent_writing")}>专利稿件</a>
+                                        <a onClick={downloadFile.bind(null, theData.patentWritingUrl, theData.patentWritingDownloadFileName)}>{theData.patentWritingDownloadFileName}</a>
                                         {theData.confirmState == '0' ?
                                             <Button onClick={this.confirmButton}>确认稿件</Button> : <span></span>
                                         }
                                     </p> :
-                                    <span></span>
+                                    <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利稿件未上传</p>
                                     }
                                     {theData.authorizationNoticeUrl !== null && theData.authorizationNoticeUrl !== undefined && theData.authorizationNoticeUrl !== '' ?
                                         <p className="download-file">
-                                            <a href="" onClick={this.downloadFile.bind(this, theData.authorizationNoticeUrl, "authorization_notice")}>授权通知书</a>
+                                            <a onClick={downloadFile.bind(null, theData.authorizationNoticeUrl, theData.authorizationNoticeDownloadFileName)}>{theData.authorizationNoticeDownloadFileName}</a>
                                         </p> :
-                                        <span></span>
+                                        <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />授权通知书未上传</p>
                                     }
                                     {theData.patentCertificateUrl !== null && theData.patentCertificateUrl !== undefined && theData.patentCertificateUrl !== '' ?
                                         <p className="download-file">
-                                            <a href="" onClick={this.downloadFile.bind(this, theData.patentCertificateUrl, "patent_certificate")}>专利证书</a>
+                                            <a onClick={downloadFile.bind(null, theData.patentCertificateUrl, theData.patentCertificateDownloadFileName)}>{theData.patentCertificateDownloadFileName}</a>
                                         </p> :
-                                        <span></span>
+                                        <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利证书未上传</p>
                                     }
                                     {theData.patentProryStatementUrl !== null && theData.patentProryStatementUrl !== undefined && theData.patentProryStatementUrl !== '' ?
                                         <p className="download-file">
-                                            <a href="" onClick={this.downloadFile.bind(this, theData.patentProryStatementUrl, "patent_prory_statement")}>专利代理委托书</a>
+                                            <a onClick={downloadFile.bind(null, theData.patentProryStatementUrl, theData.patentProryStatementDownloadFileName)}>{theData.patentProryStatementDownloadFileName}</a>
                                         </p> :
-                                        <span></span>
+                                        <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利代理委托书未上传</p>
                                     }
                                     {theData.lastYearTaxReportUrl !== null && theData.lastYearTaxReportUrl !== undefined && theData.lastYearTaxReportUrl !== '' ?
                                         <p className="download-file">
-                                            <a href="" onClick={this.downloadFile.bind(this, theData.lastYearTaxReportUrl, "last_year_taxReport")}>专利代理委托书</a>
+                                            <a onClick={downloadFile.bind(null, theData.lastYearTaxReportUrl, theData.lastYearTaxReportDownloadFileName)}>{theData.lastYearTaxReportDownloadFileName}</a>
                                         </p> :
-                                        <span></span>
+                                        <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />上年度纳税报表未上传</p>
                                     }
                                 </div>
                                 <Avatar urlData={this.getPatentWritingUrl} name='patent_writing' oid={theData.oid}/>

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

@@ -54,11 +54,19 @@ const Patent = React.createClass({
                         patentState: thisdata.patentState || '0',
                         patentField: thisdata.patentField || '0',
                         patentDes: thisdata.patentDes || '',
+
                         patentProryStatementUrl: thisdata.patentProryStatementUrl, //专利代理委托书
                         patentWritingUrl: thisdata.patentWritingUrl, //专利稿件
                         authorizationNoticeUrl: thisdata.authorizationNoticeUrl, //授权通知书
                         patentCertificateUrl: thisdata.patentCertificateUrl, //专利证书
                         lastYearTaxReportUrl: thisdata.lastYearTaxReportUrl, //上年度纳税表
+
+                        patentProryStatementDownloadFileName: thisdata.patentProryStatementDownloadFileName, //专利代理委托书
+                        patentWritingDownloadFileName: thisdata.patentWritingDownloadFileName, //专利稿件
+                        authorizationNoticeDownloadFileName: thisdata.authorizationNoticeDownloadFileName, //授权通知书
+                        patentCertificateDownloadFileName: thisdata.patentCertificateDownloadFileName, //专利证书
+                        lastYearTaxReportDownloadFileName: thisdata.lastYearTaxReportDownloadFileName, //上年度纳税表
+
                         startTime: thisdata.patentApplicationDate,
                         endTime: thisdata.authorizedDate,
                         orgCode: thisdata.orgCode,
@@ -168,7 +176,6 @@ const Patent = React.createClass({
             provinceOption: [],
             searchMore: true,
             data: [],
-            download: globalConfig.context + '/api/warningreports/download',
             loading: false,
             pagination: {
                 defaultCurrent: 1,
@@ -263,9 +270,11 @@ const Patent = React.createClass({
             showDesc: true
         });
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 5 - 16
js/component/manageCenter/servicesManage/patent/comprehensive.less

@@ -94,23 +94,12 @@
             margin-bottom: 12px;
         }
     }
-    .avatar-uploader,
-    .avatar-uploader-trigger,
-    .avatar {
+    .upload-file {
+        display: inline-block;
         width: 150px;
-        height: 150px;
-    }
-    .avatar-uploader {
-        display: block;
-        border: 1px dashed #d9d9d9;
-        border-radius: 6px;
-        cursor: pointer;
-    }
-    .avatar-uploader-trigger {
-        display: table-cell;
-        vertical-align: middle;
-        font-size: 28px;
-        color: #999;
+        margin-right: 40px;
+        margin-top: 20px;
+        text-align: center;
     }
 }
 

+ 4 - 2
js/component/manageCenter/servicesManage/patent/correction.jsx

@@ -147,9 +147,11 @@ const Correction = React.createClass({
             showDesc: true
         });
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     render() {
         const { MonthPicker, RangePicker } = DatePicker;

+ 1 - 1
js/component/manageCenter/servicesManage/patent/correctionDesc.jsx

@@ -43,7 +43,7 @@ const CorrectionDesc = React.createClass({
                 visible: false,
             });
         }.bind(this));
-        this.props.closeDesc(false);
+        this.props.closeDesc(false,true);
     },
     handleCancel(e) {
         this.setState({

+ 4 - 2
js/component/manageCenter/servicesManage/patent/express.jsx

@@ -168,9 +168,11 @@ const Express = React.createClass({
             showDesc: true
         });
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     render() {
         return (

+ 1 - 1
js/component/manageCenter/servicesManage/patent/expressDesc.jsx

@@ -57,7 +57,7 @@ const ExpressDesc = React.createClass({
                 visible: false,
             });
         }.bind(this));
-        this.props.closeDesc(false);
+        this.props.closeDesc(false,true);
     },
     handleCancel(e) {
         this.setState({

+ 4 - 2
js/component/manageCenter/servicesManage/patent/payment.jsx

@@ -150,9 +150,11 @@ const Payment = React.createClass({
             });
         };
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 1 - 1
js/component/manageCenter/servicesManage/patent/paymentDesc.jsx

@@ -42,7 +42,7 @@ const PatentDesc = React.createClass({
                 visible: false,
             });
         }.bind(this));
-        this.props.closeDesc(false);
+        this.props.closeDesc(false,true);
     },
     handleCancel(e) {
         this.setState({

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

@@ -27,7 +27,7 @@ const TopTab = React.createClass({
         return (
             <div className="account-top" >
                 <div className="acc-top-user">
-                    <span className="acc-top-user-name">欢迎您, {userData.nickname || userData.number || this.state.username} <a onClick={this.logOut}>[ 退出 ]</a></span>
+                    <span className="acc-top-user-name">欢迎您, {adminData.name || adminData.mobile || this.state.username} <a onClick={this.logOut}>[ 退出 ]</a></span>
                     <span className="acc-top-user-toindex"><a href={globalConfig.context + "/admin/index.html"}>返回首页</a></span>
                 </div>
                 <div className="acc-index">

+ 72 - 51
js/component/manageCenter/userManage/orgCertify.jsx

@@ -16,7 +16,7 @@ const OrgCertify = Form.create()(React.createClass({
             auditStatusOption: []
         };
     },
-    loadData() {
+    loadData(uid) {
         this.state.data = [];
         this.setState({
             loading: true
@@ -27,50 +27,54 @@ const OrgCertify = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/orgDetail",
             data: {
-                uid: this.props.uid
+                uid: uid
             },
             success: function (data) {
-                if (data.error.length || !data.data) {
-                    message.warning(data.error[0].message);
-                    return;
-                }
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                };
                 addressInit('licenceProvince', 'licenceCity', 'licenceArea',
-                    data.data.licenceProvince, data.data.licenceCity, data.data.licenceArea);
+                    thisData.licenceProvince, thisData.licenceCity, thisData.licenceArea);
                 addressInit('locationProvince', 'locationCity', 'locationArea',
-                    data.data.locationProvince, data.data.locationCity, data.data.locationArea);
+                    thisData.locationProvince, thisData.locationCity, thisData.locationArea);
                 this.setState({
-                    id: data.data.id,
-                    contacts: data.data.contacts,
-                    contactMobile: data.data.contactMobile,
-                    fixedTel: data.data.fixedTel,
-                    qq: data.data.qq,
-                    postalAddress: data.data.postalAddress,
-                    postcode: data.data.postcode,
-                    aftUsername: data.data.aftUsername,
-                    unitName: data.data.unitName,
-                    identityType: String(data.data.identityType), //组织性质
-                    registeredCapital: data.data.registeredCapital, //注册资金
+                    id: thisData.id,
+                    contacts: thisData.contacts,
+                    contactMobile: thisData.contactMobile,
+                    fixedTel: thisData.fixedTel,
+                    qq: thisData.qq,
+                    postalAddress: thisData.postalAddress,
+                    postcode: thisData.postcode,
+                    aftUsername: thisData.aftUsername,
+                    unitName: thisData.unitName,
+                    identityType: thisData.identityType, //组织性质
+                    registeredCapital: thisData.registeredCapital, //注册资金
 
-                    legalPerson: data.data.legalPerson,
-                    legalPersonIdCard: data.data.legalPersonIdCard,
+                    legalPerson: thisData.legalPerson,
+                    legalPersonIdCard: thisData.legalPersonIdCard,
 
-                    licenceNumber: data.data.licenceNumber,
-                    licenceScanningUrl: data.data.licenceScanningUrl,
-                    orgCode: data.data.orgCode,
-                    orgCodeUrl: data.data.orgCodeUrl,
+                    licenceNumber: thisData.licenceNumber,
+                    licenceScanningUrl: thisData.licenceScanningUrl,
+                    orgCode: thisData.orgCode,
+                    orgCodeUrl: thisData.orgCodeUrl,
 
-                    bankAccount: data.data.bankAccount,
-                    banks: data.data.banks,
-                    bankBranch: data.data.bankBranch,
-                    bankCardNumber: data.data.bankCardNumber,
+                    bankAccount: thisData.bankAccount,
+                    banks: thisData.banks,
+                    bankBranch: thisData.bankBranch,
+                    bankCardNumber: thisData.bankCardNumber,
 
-                    validationAmount: data.data.validationAmount, //打款金额
-                    paymentDate: data.data.paymentDate,
-                    paymentDateFormattedDate: data.data.paymentDateFormattedDate,
-                    lastYearTaxReportUrl: data.data.lastYearTaxReportUrl,
-                    auditStatus: String(data.data.auditStatus),
-                    process: data.data.process
+                    validationAmount: thisData.validationAmount, //打款金额
+                    paymentDate: thisData.paymentDate,
+                    paymentDateFormattedDate: thisData.paymentDateFormattedDate,
+                    lastYearTaxReportUrl: thisData.lastYearTaxReportUrl,
+                    auditStatus: thisData.auditStatus,
+                    process: thisData.process
                 });
+                this.props.form.resetFields();
             }.bind(this),
         }).always(function () {
             this.setState({
@@ -85,12 +89,19 @@ const OrgCertify = Form.create()(React.createClass({
                 this.setState({
                     loading: true
                 });
+                let licenceA = document.getElementById('licenceArea').value;
+                let licenceC = document.getElementById('licenceCity').value;
+                let licenceP = document.getElementById('licenceProvince').value;
+                let locationA = document.getElementById('locationArea').value;
+                let locationC = document.getElementById('locationCity').value;
+                let locationP = document.getElementById('locationProvince').value;
                 $.ajax({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
                     url: globalConfig.context + "/api/admin/updateOrgDetail",
                     data: {
+                        uid: this.props.uid,
                         id: this.state.id,
                         contacts: values.contacts,
                         contactMobile: values.contactMobile,
@@ -113,9 +124,16 @@ const OrgCertify = Form.create()(React.createClass({
                         bankCardNumber: values.bankCardNumber,
 
                         validationAmount: values.validationAmount, //打款金额
-                        paymentDateFormattedDate: values.paymentDateFormattedDate.format("YYYY-MM-DD"),
+                        paymentDateFormattedDate: values.paymentDateFormattedDate ? values.paymentDateFormattedDate.format("YYYY-MM-DD") : undefined,
                         auditStatus: values.auditStatus,
-                        process: values.process
+                        process: values.process,
+
+                        licenceArea: licenceA,
+                        licenceCity: licenceC,
+                        licenceProvince: licenceP,
+                        locationArea: locationA,
+                        locationCity: locationC,
+                        locationProvince: locationP
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -127,11 +145,14 @@ const OrgCertify = Form.create()(React.createClass({
                     this.setState({
                         visible: false,
                     });
-                    this.props.closeDesc(false);
+                    this.props.handleOk();
                 }.bind(this));
             }
         });
     },
+    handleCancel() {
+        this.props.closeDesc(false);
+    },
     componentWillMount() {
         let _me = this;
         eduLevelList.map(function (item, i) {
@@ -148,19 +169,18 @@ const OrgCertify = Form.create()(React.createClass({
     componentDidMount() {
         addressInit('licenceProvince', 'licenceCity', 'licenceArea');
         addressInit('locationProvince', 'locationCity', 'locationArea');
-        this.loadData();
+        this.loadData(this.props.uid);
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
-            this.props.form.resetFields();
-            this.loadData();
+            this.loadData(nextProps.uid);
         };
     },
     render() {
         const { getFieldDecorator } = this.props.form;
         const FormItem = Form.Item
         const formItemLayout = {
-            labelCol: { span: 4 },
+            labelCol: { span: 6 },
             wrapperCol: { span: 12 },
         };
         return (
@@ -259,7 +279,7 @@ const OrgCertify = Form.create()(React.createClass({
                         )}
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
+                    labelCol={{ span: 6 }}
                     wrapperCol={{ span: 18 }}
                     label="营业执照所在地"
                 >
@@ -272,7 +292,7 @@ const OrgCertify = Form.create()(React.createClass({
                     )}
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
+                    labelCol={{ span: 6 }}
                     wrapperCol={{ span: 18 }}
                     label="营业执照图片"
                 >
@@ -282,7 +302,7 @@ const OrgCertify = Form.create()(React.createClass({
                                 <img src={globalConfig.context + '/open/writeImage?path=' + this.state.licenceScanningUrl} alt="点击查看大图"
                                     onClick={(e) => { window.open(e.target.src) }} />
                             </div>
-                        </div> : <div>未上传</div>}
+                        </div> : <div><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</div>}
                     </div>
                 </FormItem>
                 <FormItem
@@ -296,7 +316,7 @@ const OrgCertify = Form.create()(React.createClass({
                         )}
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
+                    labelCol={{ span: 6 }}
                     wrapperCol={{ span: 18 }}
                     label="组织机构代码证图片"
                 >
@@ -306,11 +326,11 @@ const OrgCertify = Form.create()(React.createClass({
                                 <img src={globalConfig.context + '/open/writeImage?path=' + this.state.orgCodeUrl} alt="点击查看大图"
                                     onClick={(e) => { window.open(e.target.src) }} />
                             </div>
-                        </div> : <div>未上传</div>}
+                        </div> : <div><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</div>}
                     </div>
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
+                    labelCol={{ span: 6 }}
                     wrapperCol={{ span: 18 }}
                     label="上年度纳税报表"
                 >
@@ -320,7 +340,7 @@ const OrgCertify = Form.create()(React.createClass({
                                 <img src={globalConfig.context + '/open/writeImage?path=' + this.state.lastYearTaxReportUrl} alt="点击查看大图"
                                     onClick={(e) => { window.open(e.target.src) }} />
                             </div>
-                        </div> : <div>未上传</div>}
+                        </div> : <div><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</div>}
                     </div>
                 </FormItem>
                 <FormItem
@@ -354,7 +374,7 @@ const OrgCertify = Form.create()(React.createClass({
                         )}
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
+                    labelCol={{ span: 6 }}
                     wrapperCol={{ span: 18 }}
                     label="开户行所在地"
                 >
@@ -411,10 +431,11 @@ const OrgCertify = Form.create()(React.createClass({
                 </FormItem>
                 <FormItem wrapperCol={{ span: 12, offset: 4 }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                    <Button className="set-submit" type="ghost" onClick={this.handleCancel} >取消</Button>
                 </FormItem>
             </Form >
         );
-    },
+    }
 }));
 
 export default OrgCertify;

+ 10 - 3
js/component/manageCenter/userManage/orgDesc.jsx

@@ -21,6 +21,12 @@ const OrgDesc = React.createClass({
         });
         this.props.closeDesc(false);
     },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false,true);
+    },
     componentWillReceiveProps(nextProps) {
         this.state.visible = nextProps.showDesc;
     },
@@ -31,13 +37,14 @@ const OrgDesc = React.createClass({
                     <Spin spinning={this.state.loading} className='spin-box'>
                         <Modal title="用户详情" visible={this.state.visible}
                             onCancel={this.handleCancel}
-                            width='800px'
-                            footer={[]}
+                            width='600px'
+                            footer=''
                             className="admin-desc-content">
                             <OrgCertify
                                 visible={this.state.visible}
                                 uid={this.props.data.id}
-                                closeDesc={this.handleCancel} />
+                                closeDesc={this.handleCancel}
+                                handleOk={this.handleOk} />
                         </Modal>
                     </Spin>
                 </div>

+ 84 - 4
js/component/manageCenter/userManage/orgList.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker } from 'antd';
+import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -7,6 +7,78 @@ import './userList.less';
 import OrgDesc from './orgDesc.jsx';
 import { auditStatusList } from '../../dataDic.js';
 
+const OrgAdd = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    showModal() {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+    },
+    handleOk() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/addNewUser",
+            data: {
+                mobile: this.state.mobile,
+                unitName: this.state.unitName,
+                type: 1
+            }
+        }).done(function (data) {
+            this.setState({
+                loading: false
+            });
+            if (!data.error.length) {
+                message.success('新增成功!');
+                this.setState({
+                    visible: false,
+                });
+                this.props.closeDesc(false, true);
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    render() {
+        return (
+            <div className="patent-desc" style={{ float: 'right', marginRight: '20px' }}>
+                <Button type="primary" onClick={this.showModal}>添加用户</Button>
+                <Modal title="新增团体用户" visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    width='350px'
+                    footer={[
+                        <Button key="submit" type="primary" loading={this.state.loading} onClick={this.handleOk}>提交</Button>,
+                        <Button key="back" onClick={this.handleCancel}>返回</Button>
+                    ]}
+                    className="admin-desc-content">
+                    <div className='orgAdd-input'>
+                        <span>用户手机号码:</span>
+                        <Input onChange={(e) => { this.state.mobile = e.target.value }} />
+                    </div>
+                    <div className='orgAdd-input'>
+                        <span>公司名称:</span>
+                        <Input onChange={(e) => { this.state.unitName = e.target.value }} />
+                    </div>
+                </Modal>
+            </div>
+        );
+    }
+});
+
 const OrgList = React.createClass({
     loadData(pageNo) {
         this.state.data = [];
@@ -45,7 +117,8 @@ const OrgList = React.createClass({
                         number: thisdata.number,
                         auditStatus: thisdata.auditStatus,
                         createTimeFormattedDate: thisdata.createTimeFormattedDate,
-                        adminName:thisdata.adminName
+                        adminName: thisdata.adminName,
+                        unitName: thisdata.unitName
                     });
                 };
                 this.state.pagination.current = data.data.pageNo;
@@ -89,6 +162,10 @@ const OrgList = React.createClass({
                     dataIndex: 'mobile',
                     key: 'mobile',
                 }, {
+                    title: '公司名称',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
                     title: '认证状态',
                     dataIndex: 'auditStatus',
                     key: 'auditStatus',
@@ -138,9 +215,11 @@ const OrgList = React.createClass({
             showDesc: true
         });
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -168,6 +247,7 @@ const OrgList = React.createClass({
             <div className="user-content" >
                 <div className="content-title">
                     <span>组织用户管理</span>
+                    <OrgAdd closeDesc={this.closeDesc} />
                 </div>
                 <div className="user-search">
                     <Input placeholder="阿凡提号" value={this.state.searchAftId}

+ 66 - 49
js/component/manageCenter/userManage/userDesc.jsx

@@ -14,7 +14,7 @@ const UserForm = Form.create()(React.createClass({
             loading: false
         };
     },
-    loadData() {
+    loadData(uid) {
         this.state.data = [];
         this.setState({
             loading: true
@@ -25,39 +25,43 @@ const UserForm = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/userDetail",
             data: {
-                uid: this.props.uid
+                uid: uid
             },
             success: function (data) {
-                if (data.error.length || !data.data) {
-                    message.warning(data.error[0].message);
-                    return;
-                }
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                };
                 let d = new Date()
-                if (data.data.dateOfBirthMonth && data.data.dateOfBirthYear) {
-                    d.setMonth(data.data.dateOfBirthMonth - 1);
-                    d.setYear(parseInt(data.data.dateOfBirthYear));
+                if (thisData && thisData.dateOfBirthMonth && thisData.dateOfBirthYear) {
+                    d.setMonth(thisData.dateOfBirthMonth - 1);
+                    d.setYear(parseInt(thisData.dateOfBirthYear));
                 };
                 addressInit('cmbProvince', 'cmbCity', 'cmbArea',
-                    data.data.province, data.data.city, data.data.area);
+                    thisData.province, thisData.city, thisData.area);
                 this.setState({
-                    username: data.data.username,
-                    sex: data.data.sex,
-                    id: data.data.id,
+                    username: thisData.username,
+                    sex: thisData.sex,
+                    id: thisData.id,
                     birth: d,
-                    idNumber: data.data.idNumber,
-                    positiveIdUrl: data.data.positiveIdUrl,
-                    oppositeIdUrl: data.data.oppositeIdUrl,
-                    aftUsername: data.data.aftUsername,
-                    contactMobile: data.data.contactMobile,
-                    bankName: data.data.bankName,
-                    bankAccount: data.data.bankAccount,
-                    bankCardNumber: data.data.bankCardNumber,
-                    amountMoney: data.data.amountMoney,
-                    auditStatus: String(data.data.auditStatus),
-                    process: data.data.process,
-                    paymentDateFormattedDate: data.data.paymentDateFormattedDate,
-                    paymentDate: data.data.paymentDate
+                    idNumber: thisData.idNumber,
+                    positiveIdUrl: thisData.positiveIdUrl,
+                    oppositeIdUrl: thisData.oppositeIdUrl,
+                    aftUsername: thisData.aftUsername,
+                    contactMobile: thisData.contactMobile,
+                    bankName: thisData.bankName,
+                    bankAccount: thisData.bankAccount,
+                    bankCardNumber: thisData.bankCardNumber,
+                    amountMoney: thisData.amountMoney,
+                    auditStatus: thisData.auditStatus,
+                    process: thisData.process,
+                    paymentDateFormattedDate: thisData.paymentDateFormattedDate,
+                    paymentDate: thisData.paymentDate
                 });
+                this.props.form.resetFields();
             }.bind(this),
         }).always(function () {
             this.setState({
@@ -82,6 +86,7 @@ const UserForm = Form.create()(React.createClass({
                     crossDomain: false,
                     url: globalConfig.context + "/api/admin/updateUserDetail",
                     data: {
+                        uid: this.props.uid,
                         id: this.state.id,
                         username: values.username,
                         sex: values.sex,
@@ -98,7 +103,7 @@ const UserForm = Form.create()(React.createClass({
                         bankCardNumber: values.bankCardNumber,
                         amountMoney: values.amountMoney,
                         auditStatus: values.auditStatus,
-                        paymentDateFormattedDate: values.paymentDateFormattedDate.format("YYYY-MM-DD"),
+                        paymentDateFormattedDate: values.paymentDateFormattedDate ? values.paymentDateFormattedDate.format("YYYY-MM-DD") : undefined,
                         process: values.process
                     }
                 }).done(function (data) {
@@ -111,24 +116,26 @@ const UserForm = Form.create()(React.createClass({
                     this.setState({
                         visible: false,
                     });
-                    this.props.closeDesc(false);
+                    this.props.handleOk();
                 }.bind(this));
             }
         });
     },
     componentDidMount() {
         addressInit('cmbProvince', 'cmbCity', 'cmbArea');
-        this.loadData();
+        this.loadData(this.props.uid);
     },
-    componentWillReceiveProps() {
-        this.loadData();
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.uid);
+        };
     },
     render() {
         const { getFieldDecorator } = this.props.form;
         const { MonthPicker } = DatePicker;
         const FormItem = Form.Item
         const formItemLayout = {
-            labelCol: { span: 4 },
+            labelCol: { span: 6 },
             wrapperCol: { span: 12 },
         };
         return (
@@ -138,7 +145,7 @@ const UserForm = Form.create()(React.createClass({
                     label="用户名"
                 >
                     {getFieldDecorator('username', {
-                        initialValue: this.state.username || null
+                        initialValue: this.state.username
                     })(
                         <Input />
                         )}
@@ -148,7 +155,7 @@ const UserForm = Form.create()(React.createClass({
                     label="性别"
                 >
                     {getFieldDecorator('sex', {
-                        initialValue: this.state.sex || null
+                        initialValue: this.state.sex
                     })(
                         <Radio.Group>
                             <Radio value="男">男</Radio>
@@ -171,13 +178,13 @@ const UserForm = Form.create()(React.createClass({
                     label="身份证号"
                 >
                     {getFieldDecorator('idNumber', {
-                        initialValue: this.state.idNumber || null
+                        initialValue: this.state.idNumber
                     })(
                         <Input />
                         )}
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
+                    labelCol={{ span: 6 }}
                     wrapperCol={{ span: 18 }}
                     label="身份证图片"
                 >
@@ -187,13 +194,13 @@ const UserForm = Form.create()(React.createClass({
                                 <img src={globalConfig.context + '/open/writeImage?path=' + this.state.positiveIdUrl} alt="点击查看大图"
                                     onClick={(e) => { window.open(e.target.src) }} />
                             </div>
-                        </div> : <div>未上传</div>}
+                        </div> : <div><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</div>}
                         {this.state.oppositeIdUrl ? <div>
                             <div className="idcard-imgbox">
                                 <img src={globalConfig.context + '/open/writeImage?path=' + this.state.oppositeIdUrl} alt="点击查看大图"
                                     onClick={(e) => { window.open(e.target.src) }} />
                             </div>
-                        </div> : <div>未上传</div>}
+                        </div> : <div><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</div>}
                     </div>
                 </FormItem>
                 <FormItem
@@ -201,7 +208,7 @@ const UserForm = Form.create()(React.createClass({
                     label="认证姓名"
                 >
                     {getFieldDecorator('aftUsername', {
-                        initialValue: this.state.aftUsername || null
+                        initialValue: this.state.aftUsername
                     })(
                         <Input />
                         )}
@@ -211,13 +218,13 @@ const UserForm = Form.create()(React.createClass({
                     label="联系电话"
                 >
                     {getFieldDecorator('contactMobile', {
-                        initialValue: this.state.contactMobile || null
+                        initialValue: this.state.contactMobile
                     })(
                         <Input />
                         )}
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
+                    labelCol={{ span: 6 }}
                     wrapperCol={{ span: 18 }}
                     label="所在地"
                 >
@@ -234,7 +241,7 @@ const UserForm = Form.create()(React.createClass({
                     label="开户银行"
                 >
                     {getFieldDecorator('bankAccount', {
-                        initialValue: this.state.bankAccount || null
+                        initialValue: this.state.bankAccount
                     })(
                         <Input />
                         )}
@@ -244,7 +251,7 @@ const UserForm = Form.create()(React.createClass({
                     label="银行卡号"
                 >
                     {getFieldDecorator('bankCardNumber', {
-                        initialValue: this.state.bankCardNumber || null
+                        initialValue: this.state.bankCardNumber
                     })(
                         <Input />
                         )}
@@ -254,7 +261,7 @@ const UserForm = Form.create()(React.createClass({
                     label="打款金额"
                 >
                     {getFieldDecorator('amountMoney', {
-                        initialValue: this.state.amountMoney || null
+                        initialValue: this.state.amountMoney
                     })(
                         <Input />
                         )}
@@ -274,7 +281,7 @@ const UserForm = Form.create()(React.createClass({
                     label="认证状态"
                 >
                     {getFieldDecorator('auditStatus', {
-                        initialValue: this.state.auditStatus || null
+                        initialValue: this.state.auditStatus
                     })(
                         <Select placeholder="选择认证状态" style={{ width: 200 }}
                             onChange={(e) => { this.state.auditStatus = e }}>
@@ -291,7 +298,7 @@ const UserForm = Form.create()(React.createClass({
                     label="认证步骤"
                 >
                     {getFieldDecorator('process', {
-                        initialValue: this.state.process || null
+                        initialValue: this.state.process
                     })(
                         <Input />
                         )}
@@ -322,6 +329,12 @@ const PatentDesc = React.createClass({
         });
         this.props.closeDesc(false);
     },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
     componentWillReceiveProps(nextProps) {
         this.state.visible = nextProps.showDesc;
     },
@@ -332,10 +345,14 @@ const PatentDesc = React.createClass({
                     <Spin spinning={this.state.loading} className='spin-box'>
                         <Modal title="用户详情" visible={this.state.visible}
                             onOk={this.checkPatentProcess} onCancel={this.handleCancel}
-                            width='800px'
-                            footer={[]}
+                            width='600px'
+                            footer=''
                             className="admin-desc-content">
-                            <UserForm uid={this.props.data.id} closeDesc={this.handleCancel} />
+                            <UserForm
+                                uid={this.props.data.id}
+                                closeDesc={this.handleCancel}
+                                visible={this.state.visible}
+                                handleOk={this.handleOk} />
                         </Modal>
                     </Spin>
                 </div>

+ 75 - 5
js/component/manageCenter/userManage/userList.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker } from 'antd';
+import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -7,6 +7,73 @@ import './userList.less';
 import UserDesc from './userDesc.jsx';
 import { auditStatusList } from '../../dataDic.js';
 
+const OrgAdd = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    showModal() {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+    },
+    handleOk() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/addNewUser",
+            data: {
+                mobile: this.state.mobile,
+                type: 0
+            }
+        }).done(function (data) {
+            this.setState({
+                loading: false
+            });
+            if (!data.error.length) {
+                message.success('新增成功!');
+                this.setState({
+                    visible: false,
+                });
+                this.props.closeDesc(false, true);
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    render() {
+        return (
+            <div className="patent-desc" style={{ float: 'right', marginRight: '20px' }}>
+                <Button type="primary" onClick={this.showModal}>添加用户</Button>
+                <Modal title="新增个人用户" visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    width='350px'
+                    footer={[
+                        <Button key="submit" type="primary" loading={this.state.loading} onClick={this.handleOk}>提交</Button>,
+                        <Button key="back" onClick={this.handleCancel}>返回</Button>
+                    ]}
+                    className="admin-desc-content">
+                    <div className='orgAdd-input'>
+                        <span>用户手机号码:</span>
+                        <Input onChange={(e) => { this.state.mobile = e.target.value }} />
+                    </div>
+                </Modal>
+            </div>
+        );
+    }
+});
+
 const UserList = React.createClass({
     loadData(pageNo) {
         this.state.data = [];
@@ -43,9 +110,9 @@ const UserList = React.createClass({
                         createTime: thisdata.createTime,
                         aftUsername: thisdata.aftUsername,
                         number: thisdata.number,
-                        auditStatus:thisdata.auditStatus,
+                        auditStatus: thisdata.auditStatus,
                         createTimeFormattedDate: thisdata.createTimeFormattedDate,
-                        adminName:thisdata.adminName
+                        adminName: thisdata.adminName
                     });
                 };
                 this.state.pagination.current = data.data.pageNo;
@@ -138,9 +205,11 @@ const UserList = React.createClass({
             showDesc: true
         });
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();
@@ -168,6 +237,7 @@ const UserList = React.createClass({
             <div className="user-content" >
                 <div className="content-title">
                     <span>个人用户管理</span>
+                    <OrgAdd closeDesc={this.closeDesc} />
                 </div>
                 <div className="user-search">
                     <Input placeholder="阿凡提号" value={this.state.searchAftId}

+ 12 - 3
js/component/manageCenter/userManage/userList.less

@@ -23,6 +23,18 @@
         }
     }
 }
+.ant-modal-body {
+    .orgAdd-input {
+        margin-bottom: 20px;
+        >span {
+            display: inline-block;
+            width: 100px;
+        }
+    }
+    .set-submit {
+        margin-right: 20px;
+    }
+}
 
 .admin-desc-content {
     #address,
@@ -35,7 +47,4 @@
             border-color: #d9d9d9;
         }
     }
-    .ant-input {
-        width: 200px;
-    }
 }

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

@@ -36,7 +36,6 @@ const LoginContent = Form.create()(React.createClass({
                         "mobile": values.phone,
                         "password": values.password,
                         "type": 0,
-                        "verificationCode": values.captcha,
                         "mobileCode": values.phonecaptcha
                     }
                 }).done(function (data) {
@@ -94,6 +93,7 @@ const LoginContent = Form.create()(React.createClass({
             url: globalConfig.context + "/open/getMCode",
             data: {
                 "mobile": form.getFieldValue('phone'),
+                "verificationCode": form.getFieldValue('captcha')
             },
             success: function (data) {
                 if (data.error.length == 0) {

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

@@ -35,7 +35,6 @@ const Group = Form.create()(React.createClass({
                         "type": 1,
                         "companyName": values.company,
                         "contacts": values.user,
-                        "verificationCode": values.captcha,
                         "mobileCode": values.phonecaptcha
                     }
                 }).done(function (data) {
@@ -66,6 +65,7 @@ const Group = Form.create()(React.createClass({
             url: globalConfig.context + "/open/getMCode",
             data: {
                 "mobile": form.getFieldValue('phone'),
+                "verificationCode": form.getFieldValue('captcha')
             },
             success: function (data) {
                 if (data.error.length == 0) {

+ 12 - 0
js/component/tools.js

@@ -5,6 +5,7 @@ import {
     provinceList,
     patentTypeList,
     patentStateList,
+    patentFieldList,
     techFieldList,
     technicalSourceList,
     catagoryList,
@@ -157,6 +158,17 @@ module.exports = {
             return theState;
         }
     },
+    getPatentField: function (e) {
+        if (e) {
+            let theState = '';
+            patentFieldList.map(function (item) {
+                if (item.value == e) {
+                    theState = item.key;
+                };
+            });
+            return theState;
+        }
+    },
     getTechnicalSource: function (e) {
         if (e) {
             let theSource = '';