Browse Source

bug修复完成

yee 8 years ago
parent
commit
8ef5b05a87

+ 6 - 2
js/component/account/set/hrSituation.jsx

@@ -586,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++) {
@@ -769,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}

+ 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;
                             }
                         }
                     }

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

@@ -137,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,
@@ -152,7 +152,7 @@ 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,
@@ -196,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();

+ 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>

+ 25 - 10
js/component/manageCenter/servicesManage/highTech/HighTechApply.jsx

@@ -490,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();
@@ -543,7 +550,8 @@ const CognizanceAdd = React.createClass({
             if (!data.error.length) {
                 message.success('保存成功!');
                 this.setState({
-                    visible: false
+                    visible: false,
+                    loading: false
                 });
                 this.props.closeAdd(false, true);
             } else {
@@ -588,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>
@@ -604,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>
@@ -843,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
             }

+ 15 - 12
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,
@@ -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">
@@ -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,

+ 27 - 23
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();
@@ -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 />
                             )}
@@ -345,6 +348,7 @@ 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} clickOk={this.handleOk} />

+ 8 - 7
js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectualDesc.jsx

@@ -83,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
@@ -91,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="请输入知识产权编号" />
                         )}
@@ -102,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="请输入知识产权名称" />
                         )}
@@ -113,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="请输入排序号" />
                         )}
@@ -124,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; }}>
@@ -138,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; }}>
@@ -152,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="请输入授权号" />
                         )}
@@ -163,7 +164,7 @@ 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 }} />

+ 11 - 9
js/component/manageCenter/servicesManage/highTech/fosterDesc/orgTechCenter.jsx

@@ -26,9 +26,9 @@ 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) {
@@ -211,7 +211,7 @@ const CenterList = React.createClass({
                 theData = {};
             };
             this.state.cid = theData.id;
-            this.state.foundingTime = theData.foundingTime;
+            this.state.foundingTime = theData.foundingTimeFormattedDate;
             this.state.principal = theData.principal;
             this.state.systemCatalog = theData.systemCatalog;
             this.state.systemUrl = theData.systemUrl;
@@ -310,8 +310,8 @@ const CenterList = React.createClass({
                     key: 'institution'
                 }, {
                     title: '协议附件',
-                    dataIndex: 'protocolUrl',
-                    key: 'protocolUrl',
+                    dataIndex: 'protocol',
+                    key: 'protocol',
                     render: (text) => {
                         return <a onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
                     }
@@ -324,9 +324,10 @@ const CenterList = React.createClass({
         this.loadOrgTechCenterDetail();
     },
     componentWillReceiveProps(nextProps) {
-        debugger
-        this.props.data.uid;
-        nextProps.data.uid;
+        if (this.props.data.uid !== nextProps.data.uid) {
+            this.props.data.uid = nextProps.data.uid;
+            this.loadOrgTechCenterDetail();
+        };
     },
     tableRowClick(record, index) {
         this.state.RowData = record;
@@ -383,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,
@@ -478,7 +480,7 @@ 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><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                     </div>

+ 6 - 9
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>
         );
     }
@@ -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}  clickOk={this.handleOk} />
+                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
                     </Modal>
                 </Spin>
             </div>