Explorar o código

v1.0.23 update

yee %!s(int64=7) %!d(string=hai) anos
pai
achega
31025fae79
Modificáronse 22 ficheiros con 289 adicións e 108 borrados
  1. 23 26
      js/component/certify/personal.jsx
  2. 5 3
      js/component/groupCertify/personal.jsx
  3. 18 3
      js/component/manageCenter/servicesManage/copyright/comPatentChange.jsx
  4. 6 0
      js/component/manageCenter/servicesManage/copyright/comprehensive.less
  5. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/achievement.jsx
  6. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx
  7. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/activityCostList.jsx
  8. 9 0
      js/component/manageCenter/servicesManage/highTech/fosterDesc/content.less
  9. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/finance.jsx
  10. 10 3
      js/component/manageCenter/servicesManage/highTech/fosterDesc/honorList.jsx
  11. 18 3
      js/component/manageCenter/servicesManage/highTech/fosterDesc/hrSituation.jsx
  12. 24 24
      js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectualDesc.jsx
  13. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/orgTechCenter.jsx
  14. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/ratepay.jsx
  15. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/standard.jsx
  16. 9 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx
  17. 35 7
      js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx
  18. 6 0
      js/component/manageCenter/servicesManage/patent/comprehensive.less
  19. 10 3
      js/component/manageCenter/servicesManage/technology/applyChange.jsx
  20. 31 19
      js/component/manageCenter/servicesManage/technology/technology.less
  21. 21 0
      js/component/tools.js
  22. 1 1
      package.json

+ 23 - 26
js/component/certify/personal.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
-import { Input, Button, Form, Upload, Icon, Spin, message, Row, Col ,Cascader} from 'antd';
+import { Input, Button, Form, Upload, Icon, Spin, message, Row, Col, Cascader } from 'antd';
 import './certify.less';
-import { getBase64, beforeUpload,provinceSelect } from '../tools.js';
+import { getBase64, beforeUpload, provinceSelect } from '../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
@@ -60,7 +60,7 @@ const Content = Form.create()(React.createClass({
                     this.setState({
                         positiveIdUrl: data.data.positiveIdUrl,
                         oppositeIdUrl: data.data.oppositeIdUrl,
-                        address:[data.data.province,data.data.city,data.data.area],
+                        address: [data.data.province, data.data.city, data.data.area],
                         aftUsername: data.data.aftUsername,
                         username: data.data.username,
                         idNumber: data.data.idNumber,
@@ -76,14 +76,17 @@ const Content = Form.create()(React.createClass({
             this.setState({
                 loading: false
             });
+            this.reloadVCode();
         }.bind(this));
     },
     getInitialState() {
         return {
-            loading: false
+            loading: false,
+            vsCodeSrc: globalConfig.context + '/open/getVCode'
         };
     },
     handleSubmit(e) {
+        this.reloadVCode();
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (!this.state.positiveIdUrl || !this.state.oppositeIdUrl) {
@@ -118,13 +121,12 @@ const Content = Form.create()(React.createClass({
                         this.props.changeStep(2);
                     } else {
                         message.warning(data.error[0].message);
-                        this.reloadVCode();
                         this.setState({
                             loading: false
                         });
                     }
                 }.bind(this));
-            }
+            };
         });
     },
     checkPhone(rule, value, callback) {
@@ -158,8 +160,10 @@ const Content = Form.create()(React.createClass({
     componentWillMount() {
         this.getData();
     },
-    reloadVCode(e) {
-        e.target.src = globalConfig.context + '/open/getVCode?t=' + Math.random();
+    reloadVCode() {
+        this.setState({
+            vsCodeSrc: globalConfig.context + '/open/getVCode?t=' + Math.random()
+        });
     },
     render() {
         const FormItem = Form.Item;
@@ -200,12 +204,12 @@ const Content = Form.create()(React.createClass({
                         wrapperCol={{ span: 18 }}
                         label="所在地"
                     >
-                        {getFieldDecorator('address',{
+                        {getFieldDecorator('address', {
                             initialValue: this.state.address || null,
-                            rules: [{type:'array', required: true, message: '请选择地址!' }]
+                            rules: [{ type: 'array', required: true, message: '请选择地址!' }]
                         })(
                             <Cascader options={provinceSelect()} placeholder="请选择" />
-                        )}
+                            )}
                     </FormItem>
                     <FormItem
                         {...formItemLayout}
@@ -227,18 +231,14 @@ const Content = Form.create()(React.createClass({
                     <FormItem
                         labelCol={{ span: 4 }}
                         wrapperCol={{ span: 18 }}
-                        label="身份证图片"
-                    >
-                        {getFieldDecorator('idcard')(
-                            <div>
-                                <Avatar name="idcard1" urlData={this.getIdCardUrl1} />
-                                <Avatar name="idcard2" urlData={this.getIdCardUrl2} />
-                            </div>
-                        )}
+                        label="身份证正面">
+                        <Avatar name="idcard1" urlData={this.getIdCardUrl1} />
                     </FormItem>
-                    <FormItem wrapperCol={{ span: 18, offset: 4 }}>
-                        <span className="idCard-text">上传身份证正面</span>
-                        <span className="idCard-text">上传身份证反面</span>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="身份证反面">
+                        <Avatar name="idcard2" urlData={this.getIdCardUrl2} />
                     </FormItem>
                     <FormItem wrapperCol={{ span: 21, offset: 4 }}>
                         <p className="acc-title">示例</p>
@@ -282,10 +282,7 @@ const Content = Form.create()(React.createClass({
                             </Col>
                             <Col span={8}>
                                 <div className="getVcode">
-                                    <img id="VCode" 
-                                    src={globalConfig.context + '/open/getVCode'} 
-                                    alt="看不清楚点击切换" 
-                                    onClick={this.reloadVCode} />
+                                    <img id="VCode" src={this.state.vsCodeSrc} alt="" onClick={this.reloadVCode} />
                                 </div>
                             </Col>
                         </Row>

+ 5 - 3
js/component/groupCertify/personal.jsx

@@ -64,7 +64,7 @@ const Content = Form.create()(React.createClass({
                         unitName: data.data.unitName,
                         registeredCapital: data.data.registeredCapital,
                         licenceNumber: data.data.licenceNumber,
-                        licenceAddress: [data.data.licenceProvince, data.data.licenceCity, data.data.licenceArea],
+                        address: [data.data.licenceProvince, data.data.licenceCity, data.data.licenceArea],
                         orgCode: data.data.orgCode,
                         legalPerson: data.data.legalPerson,
                         legalPersonIdCard: data.data.legalPersonIdCard,
@@ -87,6 +87,7 @@ const Content = Form.create()(React.createClass({
             this.setState({
                 loading: false
             });
+            this.reloadVCode();
         }.bind(this));
     },
     getInitialState() {
@@ -96,6 +97,7 @@ const Content = Form.create()(React.createClass({
         };
     },
     handleSubmit(e) {
+        this.reloadVCode();
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (!this.state.licenceScanningUrl) {
@@ -161,7 +163,7 @@ const Content = Form.create()(React.createClass({
                         });
                     }
                 }.bind(this));
-            }
+            };
         });
     },
     checkIdcardnum(rule, value, callback) {
@@ -415,7 +417,7 @@ const Content = Form.create()(React.createClass({
                         <div className="hrSituation-roster">
                             <Upload
                                 name="ratepay"
-                                action={globalConfig.context + "/api/user/cognizance/uploadRatepay"}
+                                action={globalConfig.context + "/api/user/cognizance/uploadLastYearRatepay"}
                                 data={{ 'sign': 'ratepay' }}
                                 beforeUpload={beforeUploadFile}
                                 showUploadList={false}

+ 18 - 3
js/component/manageCenter/servicesManage/copyright/comPatentChange.jsx

@@ -4,7 +4,7 @@ import './comprehensive.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import { copyrightStateList } from '../../../dataDic.js';
-import { getCopyrightState, getTime, copyrightDownloadFile, beforeUploadFile, getInUrgentTime } from '../../../tools.js';
+import { getCopyrightState, getTime, copyrightDownloadFile, beforeUploadFile, getInUrgentTime, getPreview } from '../../../tools.js';
 
 const CopyrightDescForm = Form.create()(React.createClass({
     getInitialState() {
@@ -366,7 +366,14 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传软著申请书 </Button>
                     </Upload>
-                    <p style={{ margin: '10px 0' }}>{theData.applicationUrl ? <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_apply', '/api/admin/copyright/download')}>软著申请书</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ margin: '10px 0' }}>{theData.applicationUrl ?
+                        <span className="download-file">
+                            <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_apply', '/api/admin/copyright/download')}>软著申请书</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'copyright', 'copyright_apply', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
+                        </span>
+                        : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <div className="hrSituation-roster">
                     <Upload
@@ -394,7 +401,15 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传软著证书 </Button>
                     </Upload>
-                    <p style={{ margin: '10px 0' }}>{theData.certificateUrl ? <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_auth', '/api/admin/copyright/download')}>软著证书</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ margin: '10px 0' }}>{
+                        theData.certificateUrl ?
+                            <span className="download-file">
+                                <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_auth', '/api/admin/copyright/download')}>软著证书</a>
+                                <a onClick={() => {
+                                    getPreview(theData.id, 'copyright', 'copyright_auth', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
+                            </span>
+                            : <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>

+ 6 - 0
js/component/manageCenter/servicesManage/copyright/comprehensive.less

@@ -10,6 +10,12 @@
             margin-right: 20px;
         }
     }
+    .download-file {
+        a {
+            display:inline-block;
+            width: 80px;
+        }
+    }
 }
 
 .ant-modal-body {

+ 9 - 2
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, Switch } from 'antd';
 import './techProduct.less';
-import { getConversionForm, beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { getConversionForm, beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import { conversionFormList, technicalSourceList } from '../../../../dataDic.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -184,7 +184,14 @@ const AchievementDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传科技成果附件 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'achievement', '/api/admin/downloadAchievement')}>{theData.enclosureDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'achievement', '/api/admin/downloadAchievement')}>{theData.enclosureDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'achievement', 'achievement', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <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>

+ 9 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber, Switch, Form } from 'antd';
 import { technicalSourceList } from '../../../../dataDic.js';
 import { techFieldList } from '../../../../DicTechFieldList.js';
-import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -330,7 +330,14 @@ const ActivityForm = Form.create()(React.createClass({
                             >
                                 <Button><Icon type="upload" /> 上传立项证明材料 </Button>
                             </Upload>
-                            <p>{theData.proofUrl ? <a onClick={newDownloadFile.bind(null, theData.id, 'proof', '/api/admin/downloadProof')}>{theData.proofDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                            <p>{theData.proofUrl ?
+                                <span className="download-file">
+                                    <a onClick={newDownloadFile.bind(null, theData.id, 'proof', '/api/admin/downloadProof')}>{theData.proofDownloadFileName}</a>
+                                    <a onClick={() => {
+                                        getPreview(theData.id, 'activity', 'proof', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                    }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                                </span>
+                                : <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>

+ 9 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/activityCostList.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Switch, Icon, Form, Upload, Button, Input, Spin, Table, message, Select, Modal, DatePicker, InputNumber } from 'antd';
 import './activityCostList.less';
-import { beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import YearSelect from '../../../../yearSelect.jsx';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
@@ -298,7 +298,14 @@ const ActivityDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传研发费用台账 </Button>
                     </Upload>
-                    <p style={{ marginTop: '20px' }}>{theData.accountUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'activity_cost_account', '/api/admin/downloadActivityCost')}>{theData.accountDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '20px' }}>{theData.accountUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'activity_cost_account', '/api/admin/downloadActivityCost')}>{theData.accountDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'activityCost', 'activity_cost_account', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <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>

+ 9 - 0
js/component/manageCenter/servicesManage/highTech/fosterDesc/content.less

@@ -150,4 +150,13 @@
     display: inline-block;
     margin-top: 10px;
     margin-bottom: 20px;
+}
+
+.download-file {
+    a {
+        margin-right: 20px;
+        i {
+            vertical-align: middle;
+        }
+    }
 }

+ 9 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/finance.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Switch, Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -312,7 +312,14 @@ const FinanceDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传财务报表 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.financeUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'finance', '/api/admin/downloadFinance')}>{theData.financeDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.financeUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'finance', '/api/admin/downloadFinance')}>{theData.financeDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'finance', 'finance', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <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>

+ 10 - 3
js/component/manageCenter/servicesManage/highTech/fosterDesc/honorList.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
-import { Switch, Icon, Form, Button, Input, Spin, Table, message, Modal, Upload, DatePicker } from 'antd';
+import { Switch, Icon, Form, Button, Input, Spin, Table, message, Modal, Upload, DatePicker, Select } from 'antd';
 import './techProduct.less';
-import { beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -137,7 +137,14 @@ const HonorListDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传企业相关资质证书 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'honor', '/api/admin/downloadHonor')}>{theData.enclosureDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.enclosureUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'honor', '/api/admin/downloadHonor')}>{theData.enclosureDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'honor', 'honor', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <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>

+ 18 - 3
js/component/manageCenter/servicesManage/highTech/fosterDesc/hrSituation.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Switch, Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload, Select } from 'antd';
-import { beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import './hrSituation.less'
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
@@ -474,7 +474,15 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传花名册 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.rosterUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'roster', '/api/admin/downloadHumanResource')}>{theData.rosterDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.rosterUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'roster', '/api/admin/downloadHumanResource')}>{theData.rosterDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'humanResource', 'roster', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+
                 </div>
                 <div className="hrSituation-roster">
                     <Upload
@@ -502,7 +510,14 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传社保情况 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.socialSecurityUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'social_security', '/api/admin/downloadHumanResource')}>{theData.socialSecurityDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.socialSecurityUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'social_security', '/api/admin/downloadHumanResource')}>{theData.socialSecurityDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'humanResource', 'social_security', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                         : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <div>
                     <span style={{ color: "red" }}>提示</span>

+ 24 - 24
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, newDownloadFile } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getPreview } from '../../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -25,25 +25,8 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 if (data.error && data.error.length) {
                     message.warning(data.error[0].message);
                 };
-                return;
-            };
-            this.setState({
-                id: data.data.id,
-                uid: data.data.uid,
-                pid: data.data.pid,
-                intellectualPropertyNumber: data.data.intellectualPropertyNumber,
-                intellectualPropertyName: data.data.intellectualPropertyName,
-                sortNumber: data.data.sortNumber,
-                catagory: data.data.catagory,
-                obtainWay: data.data.obtainWay,
-                authorizationNumber: data.data.authorizationNumber,
-                authorizationDate: data.data.authorizationDate,
-                propertyRightUrl: data.data.propertyRightUrl,
-                type: data.data.type,
-                manuscript: data.data.manuscript,
-                propertyRightDownloadFileName: data.data.propertyRightDownloadFileName,
-                authorizationDateFormattedDate: data.data.authorizationDateFormattedDate
-            });
+                this.state.data = {};
+            } else { this.state.data = data.data };
         }).always(function () {
             this.setState({
                 loading: false
@@ -54,7 +37,8 @@ const IntellectualDescFrom = Form.create()(React.createClass({
         return {
             loading: false,
             intellectualGetOption: [],
-            catagoryOption: []
+            catagoryOption: [],
+            data: {}
         };
     },
     componentWillMount() {
@@ -121,7 +105,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
             wrapperCol: { span: 12 },
         };
         const _me = this;
-        const theData = this.state;
+        const theData = this.state.data;
         return (
             <Form horizontal onSubmit={this.handleSubmit}>
                 <FormItem
@@ -234,9 +218,25 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传知识产权证书 </Button>
                     </Upload>
-                    <p style={{ margin: '10px 0' }}>{theData.propertyRightUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'property_right', '/api/admin/downloadPropertyRight')}>{theData.propertyRightDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传知识产权证书!</span>}</p>
+                    <p style={{ margin: '10px 0' }}>
+                        {theData.propertyRightUrl ?
+                            <span className="download-file">
+                                <a onClick={newDownloadFile.bind(null, this.props.data.id, 'property_right', '/api/admin/downloadPropertyRight')}>{theData.propertyRightDownloadFileName}</a>
+                                <a onClick={() => {
+                                    getPreview(theData.id, 'intellectualProperty', 'property_right', function (data) { console.log(data); window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传知识产权证书!</span>}
+                    </p>
                     {theData.type != 0 ? <p style={{ margin: '10px 0' }}>
-                        {theData.manuscript ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'manuscript', '/api/admin/downloadManuscript', this.props.data.type)}>稿件下载</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传稿件!</span>}
+                        {theData.manuscript ?
+                            <span className="download-file">
+                                <a onClick={newDownloadFile.bind(null, this.props.data.id, 'manuscript', '/api/admin/downloadManuscript', this.props.data.type)}>稿件下载</a>
+                                <a onClick={() => {
+                                    getPreview(theData.pid, 'intellectualProperty', theData.type == 1 ? 'patent_writing' : 'copyright_apply', function (data) { console.log(data); window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传稿件!</span>}
                     </p> : <span></span>}
                 </div>
                 <FormItem>

+ 9 - 2
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, Switch } from 'antd';
 import './techProduct.less';
-import { beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -130,7 +130,14 @@ const CenterListDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传协议附件 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.protocolUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'protocol', '/api/admin/downloadProtocol')}>{theData.protocolDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.protocolUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'protocol', '/api/admin/downloadProtocol')}>{theData.protocolDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'techCenterDetail', 'protocol', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <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>

+ 9 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/ratepay.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Switch, Icon, Form, Button, Input, Spin, Table, message, Select, Modal, InputNumber, Upload } from 'antd';
 import './techProduct.less';
-import { beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
@@ -265,7 +265,14 @@ const RatepayDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传企业所得税纳税申报表 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.taxReturnUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'ratepay', '/api/admin/downloadRatepay')}>{theData.taxReturnDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.taxReturnUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'ratepay', '/api/admin/downloadRatepay')}>{theData.taxReturnDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'ratepay', 'ratepay', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <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>

+ 9 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/standard.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Switch, Icon, Button, Input, Spin, Table, message, Radio, Select, Modal, Upload } from 'antd';
-import { beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
@@ -154,7 +154,14 @@ const StandardDesc = React.createClass({
                             >
                                 <Button><Icon type="upload" /> 上传标准制定附件 </Button>
                             </Upload>
-                            <p style={{ marginTop: '10px' }}>{this.state.enclosureUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'standard', '/api/admin/downloadStandard')}>标准定制附件</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                            <p style={{ marginTop: '10px' }}>{this.state.enclosureUrl ?
+                                <span className="download-file">
+                                    <a onClick={newDownloadFile.bind(null, this.props.data.id, 'standard', '/api/admin/downloadStandard')}>标准定制附件</a>
+                                    <a onClick={() => {
+                                        getPreview(this.props.data.id, 'standard', 'standard', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                    }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                                </span>
+                                : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                         </div>
                     </Modal>
                 </div>

+ 9 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { Switch, Icon, Upload, Form, Button, Radio, Input, Spin, Table, message, Select, Modal, Cascader, Transfer, InputNumber } from 'antd';
 import { technicalSourceList } from '../../../../dataDic.js';
 import { techFieldList } from '../../../../DicTechFieldList.js';
-import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { getPreview, getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -253,7 +253,14 @@ const TechProductDescFrom = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传高新技术产品台帐 </Button>
                     </Upload>
-                    <p style={{ marginTop: '10px' }}>{theData.accountUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'tech_product', '/api/admin/downloadTecProduct')}>{theData.accountDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ marginTop: '10px' }}>{theData.accountUrl ?
+                        <span className="download-file">
+                            <a onClick={newDownloadFile.bind(null, this.props.data.id, 'tech_product', '/api/admin/downloadTecProduct')}>{theData.accountDownloadFileName}</a>
+                            <a onClick={() => {
+                                getPreview(theData.id, 'techProduct', 'tech_product', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /></a>
+                        </span>
+                        : <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>

+ 35 - 7
js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx

@@ -5,7 +5,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import moment from 'moment';
 import $ from 'jquery/src/ajax';
 import { patentTypeList, patentStateList, industryList } from '../../../dataDic.js';
-import { getBase64, beforeUpload, getPatentState, getTime, newDownloadFile } from '../../../tools.js';
+import { getBase64, beforeUpload, getPatentState, getTime, newDownloadFile, getPreview } from '../../../tools.js';
 
 class Avatar extends React.Component {
     constructor(props) {
@@ -79,7 +79,7 @@ const PatentDesc = React.createClass({
             }]
         };
     },
-    loadData() {
+    loadData(uid) {
         this.setState({
             loading: true
         });
@@ -94,8 +94,14 @@ const PatentDesc = React.createClass({
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + "/api/admin/patent/logs",
-            data: { pid: this.state.xid }
-        })).done((data1, data2) => {
+            data: { "pid": this.state.xid }
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/patent/lastYearTax",
+            data: { "uid": uid || this.props.data.uid, "sign": "last_year_ratepay" }
+        })).done((data1, data2, data3) => {
             let _me = this;
             if (!data1[0].data) {
                 if (data1[0].error.length) {
@@ -133,6 +139,13 @@ const PatentDesc = React.createClass({
                     });
                 });
             };
+            if (!data3[0].data) {
+                if (data3[0].error.length) {
+                    message.warning(data3[0].error[0].message);
+                };
+            } else {
+                this.state.lastYearTaxReportId = data3[0].data.id
+            };
         }).always(function () {
             this.setState({
                 loading: false
@@ -248,7 +261,7 @@ const PatentDesc = React.createClass({
         this.state.comment = undefined;
         if (nextProps.data && !this.state.visible && nextProps.showDesc) {
             this.state.xid = nextProps.data.pid;
-            this.loadData();
+            this.loadData(nextProps.data.uid);
             this.getContactsList(nextProps.data.uid);
         };
         this.state.visible = nextProps.showDesc;
@@ -397,30 +410,45 @@ const PatentDesc = React.createClass({
                                             {theData.confirmState == '0' ?
                                                 <Button onClick={this.confirmButton}>确认稿件</Button> : <span></span>
                                             }
+                                            <a onClick={() => {
+                                                getPreview(this.state.data.id, 'patent', 'patent_writing', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
                                         </p> :
                                         <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利稿件未上传</p>
                                     }
                                     {theData.authorizationNoticeUrl ?
                                         <p className="download-file">
                                             <a onClick={newDownloadFile.bind(null, this.state.xid, "authorization_notice", "/api/admin/patent/download")}>授权通知书</a>
+                                            <a onClick={() => {
+                                                getPreview(this.state.data.id, 'patent', 'authorization_notice', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
                                         </p> :
                                         <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />授权通知书未上传</p>
                                     }
                                     {theData.patentCertificateUrl ?
                                         <p className="download-file">
                                             <a onClick={newDownloadFile.bind(null, this.state.xid, "patent_certificate", "/api/admin/patent/download")}>专利证书</a>
+                                            <a onClick={() => {
+                                                getPreview(this.state.data.id, 'patent', 'patent_certificate', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
                                         </p> :
                                         <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利证书未上传</p>
                                     }
                                     {theData.patentProryStatementUrl ?
                                         <p className="download-file">
                                             <a onClick={newDownloadFile.bind(null, this.state.xid, "patent_prory_statement", "/api/admin/patent/download")}>专利代理委托书</a>
+                                            <a onClick={() => {
+                                                getPreview(this.state.data.id, 'patent', 'patent_prory_statement', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
                                         </p> :
                                         <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利代理委托书未上传</p>
                                     }
-                                    {theData.lastYearTaxReportUrl ?
+                                    {this.state.lastYearTaxReportId ?
                                         <p className="download-file">
-                                            <a onClick={newDownloadFile.bind(null, this.state.xid, "last_year_ratepay", "/api/admin/patent/downloadHonor")}>上年度纳税报表</a>
+                                            <a onClick={newDownloadFile.bind(null, this.state.lastYearTaxReportId, "last_year_ratepay", "/api/admin/patent/downloadRatepay")}>上年度纳税报表</a>
+                                            <a onClick={() => {
+                                                getPreview(this.state.lastYearTaxReportId, 'patent', 'last_year_ratepay', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                            }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
                                         </p> :
                                         <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />上年度纳税报表未上传</p>
                                     }

+ 6 - 0
js/component/manageCenter/servicesManage/patent/comprehensive.less

@@ -123,6 +123,12 @@
         >div {
             color: #333;
             margin-bottom: 10px;
+            .download-file {
+                a {
+                    display: inline-block;
+                    width: 100px;
+                }
+            }
             >p {
                 margin-bottom: 10px;
             }

+ 10 - 3
js/component/manageCenter/servicesManage/technology/applyChange.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Select, Spin, Table, DatePicker, message, Modal, Upload, Radio } from 'antd';
 import { technologyStateList } from '../../../dataDic.js';
-import { getTechnologyState, beforeUpload, beforeUploadFile, techDownloadFile } from '../../../tools.js';
+import { getTechnologyState, beforeUpload, beforeUploadFile, techDownloadFile, getPreview } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
@@ -317,7 +317,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                     </div>
                     <div>
                         <div className="item-title">状态流转记录: </div>
-                        <Table style={{ background: "#eee",margin:"10px 0" }}
+                        <Table style={{ background: "#eee", margin: "10px 0" }}
                             pagination={false}
                             dataSource={this.state.stateTable}
                             columns={this.state.stateColumns} />
@@ -472,7 +472,14 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                         >
                             <Button><Icon type="upload" /> 项目材料上传 </Button>
                         </Upload>
-                        <p style={{ marginTop: '10px' }}>{theData.approvalUrl ? <a onClick={techDownloadFile.bind(null, "/api/admin/techproject/download", this.state.data.id)}>项目材料</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                        <p style={{ marginTop: '10px' }}>{theData.approvalUrl ?
+                            <span className="download-file">
+                                <a onClick={techDownloadFile.bind(null, "/api/admin/techproject/download", this.state.data.id)}>项目材料</a>
+                                <a onClick={() => {
+                                    getPreview(theData.id, 'techProject', 'tech_project', function (data) { window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data)) });
+                                }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
+                            </span>
+                            : <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>

+ 31 - 19
js/component/manageCenter/servicesManage/technology/technology.less

@@ -78,25 +78,37 @@
             display: none;
         }
     }
+    .hrSituation-roster {
+        .download-file {
+            a {
+                display: inline-block;
+                width: 80px;
+            }
+        }
+    }
 }
 
 .avatar-uploader,
-    .avatar-uploader-trigger,
-    .avatar {
-        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;
-    }
-    
-textarea{margin-bottom: 10px;}
+.avatar-uploader-trigger,
+.avatar {
+    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;
+}
+
+textarea {
+    margin-bottom: 10px;
+}

+ 21 - 0
js/component/tools.js

@@ -538,5 +538,26 @@ module.exports = {
             searchURL.split("&")[1].split("=")[1],
             searchURL.split("&")[2] ? searchURL.split("&")[2].split("=")[1] : undefined];
         return theArr;
+    },
+    //预览接口
+    getPreview(id,url,sign,callback){
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/preview/" + url,
+            data:{
+                "id": id,
+                "sign": sign
+                },
+            success: function (data) {
+                if (!data.data) {
+                    if ( data.error && data.error.length ) {
+                        message.warning(data.error[0].message);
+                    };
+                };
+                callback(data.data);
+            }
+        });
     }
 }

+ 1 - 1
package.json

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