yee 7 years ago
parent
commit
614e05b935

+ 331 - 321
js/component/account/services/annualReport.jsx

@@ -12,9 +12,71 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
     getInitialState() {
         return {
             loading: false,
+            data: {},
+            contactsOption: [],
+            contactsObj: {},
             yearOption: []
         };
     },
+    loadData(theYear) {
+        this.setState({
+            loading: true
+        })
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/cognizance/annualReportDetail",
+            data: {
+                year: theYear || this.props.data.year
+            }
+        }).done((data) => {
+            let thisdata = data.data;
+            if (!thisdata) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                };
+                thisdata = {};
+            } else {
+                thisdata.location = getProvince(thisdata.locationProvince, thisdata.locationCity, thisdata.locationArea);
+            };
+            this.setState({
+                data: thisdata
+            });
+        }).always(function () {
+            this.setState({
+                loading: false
+            })
+        }.bind(this));
+    },
+    getContactsOption() {
+        let theOption = [], theObj = {};
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/user/getContacts',
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let item in data.data) {
+                        let theData = data.data[item];
+                        theOption.push(
+                            <Select.Option value={item} key={theData}>{theData}</Select.Option>
+                        );
+                    };
+                    theObj = data.data || {};
+                };
+                this.setState({
+                    contactsOption: theOption,
+                    contactsObj: theObj
+                });
+            }.bind(this)
+        });
+    },
     componentWillMount() {
         let d = new Date();
         let _me = this;
@@ -24,6 +86,17 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                 <Select.Option key={i.toString()} >{i}</Select.Option>
             )
         };
+        this.getContactsOption();
+        if (this.props.data) {
+            this.loadData();
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            if (nextProps.data) {
+                this.loadData(nextProps.data.year)
+            };
+        };
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -61,7 +134,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
-        const theData = this.props.detailData;
+        const theData = this.state.data;
         const formItemLayout = {
             labelCol: { span: 0 },
             wrapperCol: { span: 20 },
@@ -69,325 +142,268 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
         const _me = this;
         return (
             <Form onSubmit={this.handleSubmit} id="annualReport-form">
-                <div className="activityCost-title">
-                    <span>年份: </span>
-                    <span>{this.props.data.year}</span>
-                </div>
-                <div className="clearfix" style={{ padding: '0 10px' }}>
-                    <div className="half-item" style={{ marginRight: "50%" }}>
-                        <p className="item-title">企业名称: </p>
-                        <p>{theData.unitName}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">组织机构代码或统一社会信用代码: </p>
-                        <p>{theData.orgCode}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">所属地区: </p>
-                        <p>{theData.location}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">高新技术企业认定证书编号: </p>
-                        <p>{theData.certificateNumber}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">高新技术企业认定时间: </p>
-                        <p>{theData.issuingDateFormattedDate}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">企业是否上市: </p>
-                        <p>{theData.listed == 0 ? "否" : "是"}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">上市时间: </p>
-                        <p>{theData.listedDateFormattedDate}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">上市类型: </p>
-                        <p>
-                            {(() => {
-                                switch (theData.listedType) {
-                                    case 0:
-                                        return "股票型上市公司";
-                                    case 1:
-                                        return "债券型上市公司";
-                                    default:
-                                        return "";
-                                }
-                            })()}
-                        </p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">股票代码: </p>
-                        <p>{theData.stockCode}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">企业联系人: </p>
-                        <p>{theData.contacts}</p>
-                    </div>
-                </div>
-                <div className="activityCost-title"><span>本年度获得的知识产权数: </span></div>
-                <div className="clearfix annualReport-box">
-                    <div className="four-item">
-                        <p className="item-title">发明专利数: </p>
-                        <p>{theData.inventionPatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国防专利数: </p>
-                        <p>{theData.defensePatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国家级农作物品种数: </p>
-                        <p>{theData.nationalCrop}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">植物新品种数: </p>
-                        <p>{theData.newPlantCariety}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国家新药数: </p>
-                        <p>{theData.nationalDrug}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国家一级中药保护品种数: </p>
-                        <p>{theData.chineseMedicine}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">实用新型专利数: </p>
-                        <p>{theData.utilityPatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">集成电路布图设计专有权数: </p>
-                        <p>{theData.circuitDesign}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">外观设计专利数: </p>
-                        <p>{theData.exteriorPatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">软件著作权数: </p>
-                        <p>{theData.softwareWorks}</p>
-                    </div>
-                </div>
-                <div className="activityCost-title"><span>本年度人员情况(人): </span></div>
-                <div className="clearfix annualReport-box">
-                    <div className="four-item">
-                        <p className="item-title">职工总人数: </p>
-                        <p>{theData.firmTotal}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">科技人员数: </p>
-                        <p>{theData.techTotal}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">新增就业人数: </p>
-                        <p>{theData.newEmployment}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">高校应届毕业生人数: </p>
-                        <p>{theData.graduateNumber}</p>
-                    </div>
-                </div>
-                <div className="activityCost-title"><span>企业本年度财务状况(万元): </span></div>
-                <div className="clearfix annualReport-box">
-                    <div className="four-item">
-                        <p className="item-title">企业总收入: </p>
-                        <p>{theData.totalRevenue}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">销售收入: </p>
-                        <p>{theData.salesRevenue}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">所有者权益(净资产)合计: </p>
-                        <p>{theData.netAsset}</p>
+                <Spin spinning={this.state.loading} className='spin-box'>
+                    <div className="activityCost-title">
+                        <span>年份: </span>
+                        <span>{this.props.data.year}</span>
+                    </div>
+                    <div className="clearfix" style={{ padding: '0 10px' }}>
+                        <div className="half-item" style={{ marginRight: "50%" }}>
+                            <p className="item-title">企业名称: </p>
+                            <p>{theData.unitName}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">组织机构代码或统一社会信用代码: </p>
+                            <p>{theData.orgCode}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">所属地区: </p>
+                            <p>{theData.location}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">高新技术企业认定证书编号: </p>
+                            <p>{theData.certificateNumber}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">高新技术企业认定时间: </p>
+                            <p>{theData.issuingDate}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">企业是否上市: </p>
+                            <p>{theData.listed == 1 ? "是" : "否"}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">上市时间: </p>
+                            <p>{theData.listedDate}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">上市类型: </p>
+                            <p>
+                                {(() => {
+                                    switch (theData.listedType) {
+                                        case '0':
+                                            return "股票型上市公司";
+                                        case '1':
+                                            return "债券型上市公司";
+                                        default:
+                                            return "";
+                                    }
+                                })()}
+                            </p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">股票代码: </p>
+                            <p>{theData.stockCode}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">企业联系人: </p>
+                            <p>{this.state.contactsObj[theData.contacts]}</p>
+                        </div>
                     </div>
-                    <div className="four-item">
-                        <p className="item-title">高新技术产品(服务)收入:
-                        </p>
-                        <p>
-                            <span>{theData.lastYearRevenue} </span>
-                            {(() => {
-                                let s = (theData.lastYearRevenue / theData.totalRevenue * 100).toFixed(2);
-                                if (s < 50) {
-                                    return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
-                                } else {
-                                    return <span> 占比总收入的{s}%</span>
-                                };
-                            })()}
-                        </p>
+                    <div className="activityCost-title"><span>本年度获得的知识产权数: </span></div>
+                    <div className="clearfix annualReport-box">
+                        <div className="four-item">
+                            <p className="item-title">发明专利数: </p>
+                            <p>{theData.inventionPatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国防专利数: </p>
+                            <p>{theData.defensePatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国家级农作物品种数: </p>
+                            <p>{theData.nationalCrop}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">植物新品种数: </p>
+                            <p>{theData.newPlantCariety}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国家新药数: </p>
+                            <p>{theData.nationalDrug}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国家一级中药保护品种数: </p>
+                            <p>{theData.chineseMedicine}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">实用新型专利数: </p>
+                            <p>{theData.utilityPatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">集成电路布图设计专有权数: </p>
+                            <p>{theData.circuitDesign}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">外观设计专利数: </p>
+                            <p>{theData.exteriorPatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">软件著作权数: </p>
+                            <p>{theData.softwareWorks}</p>
+                        </div>
                     </div>
-                    <div className="four-item">
-                        <p className="item-title">利润总额: </p>
-                        <p>{theData.grossProfit}</p>
+                    <div className="activityCost-title"><span>本年度人员情况(人): </span></div>
+                    <div className="clearfix annualReport-box">
+                        <div className="four-item">
+                            <p className="item-title">职工总人数: </p>
+                            <p>{theData.firmTotal}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">科技人员数: </p>
+                            <p>{theData.techTotal}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">新增就业人数: </p>
+                            <p>{theData.newEmployment}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">高校应届毕业生人数: </p>
+                            <p>{theData.graduateNumber}</p>
+                        </div>
                     </div>
-                    <div className="four-item">
-                        <p className="item-title">研发费用总额:
+                    <div className="activityCost-title"><span>企业本年度财务状况(万元): </span></div>
+                    <div className="clearfix annualReport-box">
+                        <div className="four-item">
+                            <p className="item-title">企业总收入: </p>
+                            <p>{theData.totalRevenue}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">销售收入: </p>
+                            <p>{theData.salesRevenue}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">所有者权益(净资产)合计: </p>
+                            <p>{theData.netAsset}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">高新技术产品(服务)收入:
                         </p>
-                        <p>
-                            <span>{theData.researchCost} </span>
-                            {(() => {
-                                let s = (theData.researchCost / theData.salesRevenue * 100).toFixed(2);
-                                if (theData.salesRevenue < 5000) {
-                                    if (s < 5) {
-                                        return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
-                                    } else {
-                                        return <span> 占比总收入的{s}%</span>
-                                    };
-                                } else if (5000 < theData.salesRevenue < 20000) {
-                                    if (s < 4) {
-                                        return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                            <p>
+                                <span>{theData.lastYearRevenue} </span>
+                                {(() => {
+                                    let s = (theData.lastYearRevenue / theData.totalRevenue * 100).toFixed(2);
+                                    if (!isNaN(s)) {
+                                        if (s < 50) {
+                                            return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                        } else {
+                                            return <span> 占比总收入的{s}%</span>
+                                        };
                                     } else {
-                                        return <span> 占比总收入的{s}%</span>
-                                    };
-                                } else if (theData.salesRevenue >= 20000) {
-                                    if (s < 3) {
-                                        return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
-                                    } else {
-                                        return <span> 占比总收入的{s}%</span>
-                                    };
-                                }
-                            })()}
+                                        return <span> 占比总收入的0%</span>
+                                    }
+                                })()}
+                            </p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">利润总额: </p>
+                            <p>{theData.grossProfit}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">研发费用总额:
                         </p>
+                            <p>
+                                <span>{theData.researchCost} </span>
+                                {(() => {
+                                    let s = (theData.researchCost / theData.salesRevenue * 100).toFixed(2);
+                                    if (!isNaN(s)) {
+                                        if (theData.salesRevenue < 5000) {
+                                            if (s < 5) {
+                                                return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                            } else {
+                                                return <span> 占比总收入的{s}%</span>
+                                            };
+                                        } else if (5000 < theData.salesRevenue < 20000) {
+                                            if (s < 4) {
+                                                return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                            } else {
+                                                return <span> 占比总收入的{s}%</span>
+                                            };
+                                        } else if (theData.salesRevenue >= 20000) {
+                                            if (s < 3) {
+                                                return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                            } else {
+                                                return <span> 占比总收入的{s}%</span>
+                                            };
+                                        }
+                                    } else {
+                                        return <span> 占比总收入的0%</span>
+                                    }
+                                })()}
+                            </p>
+                        </div>
+                        <div className="four-item" style={{ marginRight: '25%' }}>
+                            <p className="item-title">在中国境内研发费用: </p>
+                            <p>{theData.territory}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">纳税总额: </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('totalTax', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.totalTax
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">高企所得税减免额: </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('incomeTaxRelief', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.incomeTaxRelief
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">出口创汇总额(人民币): </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('totalExportVolume', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.totalExportVolume
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">基础研究投入费用: </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('basicResearchCost', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.basicResearchCost
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
                     </div>
-                    <div className="four-item" style={{ marginRight: '25%' }}>
-                        <p className="item-title">在中国境内研发费用: </p>
-                        <p>{theData.territory}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">纳税总额: </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('totalTax', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.totalTax
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">高企所得税减免额: </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('incomeTaxRelief', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.incomeTaxRelief
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">出口创汇总额(人民币): </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('totalExportVolume', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.totalExportVolume
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">基础研究投入费用: </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('basicResearchCost', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.basicResearchCost
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                </div>
-                <FormItem style={{ marginTop: '20px' }}>
-                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
-                    <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
-                </FormItem>
+                    <FormItem style={{ marginTop: '20px' }}>
+                        <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                        <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
+                    </FormItem>
+                </Spin>
             </Form >
         );
     },
 }));
 
 const AnnualReportDesc = React.createClass({
-    loadData(v) {
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "post",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/user/cognizance/annualReportDetail",
-            data: {
-                year: this.props.data ? this.props.data.year : (new Date().getFullYear() - 1)
-            }
-        }).done((data) => {
-            let thisdata = data.data;
-            if (!thisdata) {
-                if (data.error && data.error.length) {
-                    message.warning(data.error[0].message);
-                };
-                thisdata = {};
-            };
-            this.state.detailData = {
-                id: thisdata.id,
-                uid: thisdata.uid,
-                unitName: thisdata.unitName,
-                orgCode: thisdata.orgCode,
-                locationProvince: thisdata.locationProvince,
-                locationCity: thisdata.locationCity,
-                locationArea: thisdata.locationArea,
-                location: getProvince(thisdata.locationProvince, thisdata.locationCity, thisdata.locationArea),
-                certificateNumber: thisdata.certificateNumber,
-                issuingDate: thisdata.issuingDate,
-                issuingDateFormattedDate: thisdata.issuingDateFormattedDate,
-                listed: thisdata.listed,
-                listedDate: thisdata.listedDate,
-                listedDateFormattedDate: thisdata.listedDateFormattedDate,
-                listedType: thisdata.listedType,
-                stockCode: thisdata.stockCode,
-                contacts: thisdata.contacts,
-                inventionPatent: thisdata.inventionPatent,
-                defensePatent: thisdata.defensePatent,
-                nationalCrop: thisdata.nationalCrop,
-                newPlantCariety: thisdata.newPlantCariety,
-                nationalDrug: thisdata.nationalDrug,
-                chineseMedicine: thisdata.chineseMedicine,
-                utilityPatent: thisdata.utilityPatent,
-                circuitDesign: thisdata.circuitDesign,
-                exteriorPatent: thisdata.exteriorPatent,
-                softwareWorks: thisdata.softwareWorks,
-                firmTotal: thisdata.firmTotal,
-                techTotal: thisdata.techTotal,
-                newEmployment: thisdata.newEmployment,
-                graduateNumber: thisdata.graduateNumber,
-                totalRevenue: thisdata.totalRevenue,
-                salesRevenue: thisdata.salesRevenue,
-                netAsset: thisdata.netAsset,
-                lastYearRevenue: thisdata.lastYearRevenue,
-                grossProfit: thisdata.grossProfit,
-                researchCost: thisdata.researchCost,
-                territory: thisdata.territory
-            };
-        }).always(function () {
-            this.setState({
-                loading: false,
-                visible: v
-            });
-        }.bind(this));
-    },
     getInitialState() {
         return {
             visible: false,
@@ -395,9 +411,7 @@ const AnnualReportDesc = React.createClass({
         };
     },
     componentWillReceiveProps(nextProps) {
-        if (nextProps.showDesc) {
-            this.loadData(nextProps.showDesc);
-        };
+        this.state.visible = nextProps.showDesc;
     },
     showModal() {
         this.setState({
@@ -416,11 +430,6 @@ const AnnualReportDesc = React.createClass({
         });
         this.props.closeDesc(false);
     },
-    spinChange(e) {
-        this.setState({
-            loading: e
-        });
-    },
     render() {
         return (
             <div className="patent-addNew">
@@ -428,12 +437,12 @@ const AnnualReportDesc = React.createClass({
                     onOk={this.handleOk} onCancel={this.handleCancel}
                     width='1000px'
                     footer='' >
-                    <Spin spinning={this.state.loading} className='spin-box'>
-                        <AnnualReportDescFrom
-                            data={this.props.data}
-                            detailData={this.state.detailData}
-                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
-                    </Spin>
+                    <AnnualReportDescFrom
+                        data={this.props.data}
+                        visible={this.state.visible}
+                        detailData={this.state.detailData}
+                        closeModal={this.handleCancel}
+                        clickOk={this.handleOk} />
                 </Modal>
             </div>
         );
@@ -627,6 +636,7 @@ const AnnualReport = React.createClass({
         return {
             selectedRowKeys: [],
             selectedRows: [],
+            RowData: {},
             loading: false,
             pagination: {
                 defaultCurrent: 1,

+ 1 - 1
js/component/account/services/intellectualDesc.jsx

@@ -230,7 +230,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                     </Upload>
                     <p style={{ margin: '10px 0' }}>{theData.propertyRightUrl ? <a onClick={newDownloadFile.bind(null, theData.id, 'property_right', '/api/user/cognizance/downloadPropertyRight', 'downloadPropertyRight')}>{theData.propertyRightDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传知识产权证书!</span>}</p>
                     {(theData.type && theData.type != 0) ? <p style={{ margin: '10px 0' }}>
-                        {theData.manuscript ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'manuscript', '/api/user/cognizance/downloadManuscript', this.props.data.type)}>稿件下载</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传稿件!</span>}
+                        {theData.manuscript ? <a onClick={newDownloadFile.bind(null, theData.id, 'manuscript', '/api/user/cognizance/downloadManuscript', theData.type)}>稿件下载</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传稿件!</span>}
                     </p> : <span></span>}
                 </div>
                 <FormItem>

+ 3 - 3
js/component/account/services/standard.jsx

@@ -45,7 +45,7 @@ const StandardDesc = React.createClass({
                         standardNumber: data.data.standardNumber,
                         standardLevel: data.data.standardLevel,
                         participateWay: data.data.participateWay,
-                        enclosureUrl: this.state.enclosureUrl
+                        enclosureUrl: data.data.enclosureUrl
                     });
                 } else if (data.error && data.error.length) {
                     message.warning(data.error[0].message);
@@ -82,6 +82,8 @@ const StandardDesc = React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (!this.state.visible && nextProps.showDesc) {
+            this.state.fileList = [];
+            this.state.enclosureUrl = undefined;
             if (nextProps.data) {
                 this.state.standardName = nextProps.data.standardName;
                 this.state.standardNumber = nextProps.data.standardNumber;
@@ -90,8 +92,6 @@ const StandardDesc = React.createClass({
                 this.state.participateWay = nextProps.data.participateWay;
                 this.state.enclosureUrl = nextProps.data.enclosureUrl;
             };
-            this.state.fileList = [];
-            this.state.enclosureUrl = undefined;
         };
         this.state.visible = nextProps.showDesc;
     },

+ 2 - 1
js/component/manageCenter/servicesManage/copyright/copyright.jsx

@@ -208,6 +208,7 @@ const copyright = React.createClass({
     getInitialState() {
         return {
             visible: false,
+            RowData: {},
             stateOption: [],
             companyOption: [],
             authorOption: [],
@@ -283,7 +284,7 @@ const copyright = React.createClass({
         this.getCompanyList();
         this.getStateList();
         this.getContractList();
-        getVacations(function(data){ _me.setState({ vacations: data }); });
+        getVacations(function (data) { _me.setState({ vacations: data }); });
         if (window.location.search) {
             let theObj = getSearchUrl(window.location.search);
             if (theObj.rid) {

+ 28 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/annualReport.jsx

@@ -84,7 +84,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                         </div>
                         <div className="half-item">
                             <p className="item-title">高新技术企业认定时间: </p>
-                            <p>{theData.issuingDateFormattedDate}</p>
+                            <p>{theData.issuingDate}</p>
                         </div>
                         <div className="half-item">
                             <p className="item-title">企业是否上市: </p>
@@ -115,7 +115,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                         </div>
                         <div className="half-item">
                             <p className="item-title">企业联系人: </p>
-                            <p>{theData.contacts}</p>
+                            <p>{this.props.contactsObj[theData.contacts]}</p>
                         </div>
                     </div>
                     <div className="activityCost-title"><span>本年度获得的知识产权数: </span></div>
@@ -432,6 +432,7 @@ const AnnualReportDesc = React.createClass({
                     footer=''>
                     <Spin spinning={this.state.loading} className='spin-box'>
                         <AnnualReportDescFrom
+                            contactsObj={this.props.contactsObj}
                             uid={this.props.uid}
                             data={this.props.data}
                             detailData={this.state.detailData}
@@ -626,6 +627,29 @@ const AnnualReport = React.createClass({
             });
         }.bind(this));
     },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid || this.props.data.uid
+            },
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                } else {
+                    this.setState({
+                        contactsObj: data.data || {}
+                    });
+                };
+            }.bind(this),
+        });
+    },
     getInitialState() {
         return {
             selectedRowKeys: [],
@@ -670,6 +694,7 @@ const AnnualReport = React.createClass({
     },
     componentWillMount() {
         this.loadData();
+        this.getContactsList();
     },
     tableRowClick(record, index) {
         this.state.RowData = record;
@@ -769,6 +794,7 @@ const AnnualReport = React.createClass({
                 <AnnualReportDesc
                     uid={this.props.data.uid}
                     data={this.state.RowData}
+                    contactsObj={this.state.contactsObj}
                     showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
                 <AnnualReportAdd
                     uid={this.props.data.uid}

+ 1 - 1
js/component/subscriberDetail/content.jsx

@@ -365,7 +365,7 @@ const Content = React.createClass({
                                         <img src={achievement_ico_1} alt="交易方式" />
                                     </span>
                                     <span className="detial_sub_title">交易方式: </span>
-                                    <span className="money_text">{getTransferMode(item.transferMode)}</span>
+                                    <span className="money_text">{item.bargainingMode == 1 ? '定价' : '面议'}</span>
                                 </div>
                                 <div className="detial_sub">
                                     <span className="detial_sub_icon">

+ 1 - 1
js/component/tools.js

@@ -95,7 +95,7 @@ module.exports = {
             d2 = d2.getFullYear() + "-" +
                 ((d2.getMonth() + 1) < 10 ? '0' + (d2.getMonth() + 1) : (d2.getMonth() + 1)) + "-" +
                 (d2.getDate() < 10 ? '0' + d2.getDate() : d2.getDate()) + " ";
-            return d2;
+                return d2;
         } else {
             return '';
         }