Sfoglia il codice sorgente

成果和需求增加审核

yee 7 anni fa
parent
commit
1256f522c9

File diff suppressed because it is too large
+ 826 - 786
js/component/DicIndustryList.js


+ 34 - 42
js/component/account/achievement/techAchievement.jsx

@@ -5,8 +5,8 @@ import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './techAchievement.less';
 import TechAchievementDesc from './techAchievementDesc.jsx';
-import { provinceArr, achievementCategoryList } from '../../dataDic.js';
-import { companySearch, getAchievementCategory } from '../../tools.js';
+import { provinceArr, achievementCategoryList, techAuditStatusList } from '../../dataDic.js';
+import { companySearch, getAchievementCategory, getTechAuditStatus } from '../../tools.js';
 
 const AchievementList = React.createClass({
     loadData(pageNo) {
@@ -27,10 +27,10 @@ const AchievementList = React.createClass({
                 keyword: this.state.keyword, // 关键词
                 category: this.state.category, //类型(0--专利, 2--软著, 3--项目, 4--版权, 5--工业设计, 6--配方, 7--非标)
                 ownerType: this.state.ownerType, //所有人类型(0-个人,1-组织)
-                status: this.state.status ? Number(this.state.status) : undefined, //状态
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
                 releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined, //是否发布(0--未发布,1--已发布)
+                auditStatus: this.state.auditStatus
             },
             success: function (data) {
                 let theArr = [];
@@ -54,7 +54,8 @@ const AchievementList = React.createClass({
                             ownerMobile: thisdata.ownerMobile,
                             status: thisdata.status,
                             releaseDate: thisdata.releaseDate,
-                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            auditStatus: thisdata.auditStatus
                         });
                     };
                 }
@@ -126,23 +127,10 @@ const AchievementList = React.createClass({
                         }
                     }
                 }, {
-                    title: '所有人联系方式',
-                    dataIndex: 'ownerMobile',
-                    key: 'ownerMobile',
-                }, {
-                    title: '状态',
-                    dataIndex: 'status',
-                    key: 'status',
-                    render: text => {
-                        switch (text) {
-                            case "0":
-                                return <span>进行中</span>;
-                            case "1":
-                                return <span>未解决</span>;
-                            case "2":
-                                return <span>已解决</span>;
-                        }
-                    }
+                    title: '审核状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => { return getTechAuditStatus(text) }
                 }, {
                     title: '发布时间',
                     dataIndex: 'releaseDateFormattedDate',
@@ -160,7 +148,14 @@ const AchievementList = React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
+        let auditArr = [];
+        techAuditStatusList.map(function (item) {
+            auditArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
         this.state.achievementCategoryOption = theArr;
+        this.state.auditStatusOption = auditArr;
         this.loadData();
     },
     tableRowClick(record, index) {
@@ -222,9 +217,9 @@ const AchievementList = React.createClass({
         this.state.keyword = undefined;
         this.state.category = undefined;
         this.state.ownerType = undefined;
-        this.state.status = undefined;
         this.state.releaseStatus = undefined;
         this.state.releaseDate = [];
+        this.state.auditStatus = undefined;
         this.loadData();
     },
     searchSwitch() {
@@ -267,19 +262,11 @@ const AchievementList = React.createClass({
                         onChange={(e) => { this.setState({ category: e }) }}>
                         {this.state.achievementCategoryOption}
                     </Select>
-                    <Select placeholder="选择所有人类型"
-                        style={{ width: 120 }}
-                        value={this.state.ownerType}
-                        onChange={(e) => { this.setState({ ownerType: e }) }}>
-                        <Select.Option value="0" >个人</Select.Option>
-                        <Select.Option value="1" >组织</Select.Option>
-                    </Select>
-                    <Select placeholder="选择成果状态" style={{ width: 120 }}
-                        value={this.state.status}
-                        onChange={(e) => { this.setState({ status: e }) }}>
-                        <Select.Option value="0" >进行中</Select.Option>
-                        <Select.Option value="1" >未解决</Select.Option>
-                        <Select.Option value="2" >已解决</Select.Option>
+                    <Select placeholder="选择审核状态"
+                        style={{ width: 160 }}
+                        value={this.state.auditStatus}
+                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                        {this.state.auditStatusOption}
                     </Select>
                     <Select placeholder="选择是否发布" style={{ width: 120 }}
                         value={this.state.releaseStatus}
@@ -294,13 +281,18 @@ const AchievementList = React.createClass({
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
-                        <p>
-                            <span>发布时间 :</span>
-                            <RangePicker
-                                value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
-                                this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
-                                onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
-                        </p>
+                        <Select placeholder="选择所有人类型"
+                            style={{ width: 120 }}
+                            value={this.state.ownerType}
+                            onChange={(e) => { this.setState({ ownerType: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
+                        <span>发布时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
                     </div>
                 </div>
                 <div className="patent-table">

+ 16 - 4
js/component/account/achievement/techAchievement.less

@@ -21,10 +21,8 @@
         }
         .search-more {
             margin: 10px 0;
-            >p {
-                span {
-                    margin-right: 10px
-                }
+            >span {
+                margin-right: 10px
             }
         }
     }
@@ -69,4 +67,18 @@
     .set-submit {
         margin-right: 20px;
     }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete {
+            display: none
+        }
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
 }

+ 546 - 32
js/component/account/achievement/techAchievementDesc.jsx

@@ -4,8 +4,8 @@ import moment from 'moment';
 import './techAchievement.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import { IndustryObject } from '../../DicIndustryList.js';
-import { beforeUploadFile, splitUrl, companySearch } from '../../tools.js';
+import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
+import { beforeUploadFile, splitUrl, companySearch, getAchievementCategory } from '../../tools.js';
 
 const KeyWordTagGroup = React.createClass({
     getInitialState() {
@@ -130,7 +130,7 @@ const PicturesWall = React.createClass({
     }
 });
 
-const AchievementDetailForm = Form.create()(React.createClass({
+const AchievementDetailShow = Form.create()(React.createClass({
     getInitialState() {
         return {
             visible: false,
@@ -163,10 +163,490 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     };
                     thisData = {};
                 };
-                let d = new Date()
-                if (thisData && thisData.dateOfBirthMonth && thisData.dateOfBirthYear) {
-                    d.setMonth(thisData.dateOfBirthMonth - 1);
-                    d.setYear(parseInt(thisData.dateOfBirthYear));
+                this.setState({
+                    data: thisData,
+                    tags: thisData.keyword ? thisData.keyword.split(",") : [],
+                    technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                    maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    offShelf() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/achievement/offShelf",
+            data: { "id": this.props.data.id }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('撤销成功!');
+                this.setState({
+                    visible: false,
+                    releaseSubmitVisible: false
+                });
+                this.props.handleOk();
+            } else {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this));
+    },
+    componentWillMount() {
+        if (this.props.data.id) {
+            this.loadData(this.props.data.id);
+        } else {
+            this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.techPlanFileList = [];
+            this.state.businessPlanFileList = [];
+            if (nextProps.data.id) {
+                this.loadData(nextProps.data.id);
+            } else {
+                this.state.data = {};
+                this.state.tags = [];
+                this.state.maturityPictureUrl = [];
+                this.state.technicalPictureUrl = [];
+            };
+            this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 8 },
+            wrapperCol: { span: 14 },
+        };
+        return (
+            <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
+                <Spin spinning={this.state.loading}>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="编号" >
+                            <span>{theData.serialNumber}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="名称" >
+                            <span>{theData.name}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="数据类别" >
+                            {(() => {
+                                switch (theData.dataCategory) {
+                                    case "0":
+                                        return <span>成果</span>;
+                                    case "1":
+                                        return <span>技术</span>;
+                                    case "2":
+                                        return <span>项目</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="类型" >
+                            <span>{getAchievementCategory(theData.category)}</span>
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                            {(() => {
+                                switch (theData.releaseStatus) {
+                                    case "0":
+                                        return <span>未发布</span>;
+                                    case "1":
+                                        return <div>
+                                            <span>已发布</span>
+                                            <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
+                                            <Modal maskClosable={false} title="确认"
+                                                visible={this.state.releaseSubmitVisible}
+                                                width='300px'
+                                                footer={null}
+                                                onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
+                                                <span>确认要撤销发布吗?</span>
+                                                <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
+                                                <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
+                                            </Modal>
+                                        </div>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="发布时间" >
+                            <span>{theData.releaseDateFormattedDate}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="审核状态" >
+                            {(() => {
+                                switch (theData.auditStatus) {
+                                    case "0":
+                                        return <span>未提交审核(草稿)</span>;
+                                    case "1":
+                                        return <span>提交审核</span>;
+                                    case "2":
+                                        return <span>审核中</span>;
+                                    case "3":
+                                        return <span>审核通过</span>;
+                                    case "4":
+                                        return <span>审核未通过</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="关键词" >
+                        {this.state.tags.map((tag) => {
+                            return <Tooltip key={tag} title={tag}>
+                                <Tag key={tag}>{tag}</Tag>
+                            </Tooltip>;
+                        })}
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="摘要" >
+                        <span>{theData.summary}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="成果简介" >
+                        <span>{theData.introduction}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术图片" >
+                        <div className="clearfix">
+                            <Upload className="demandDetailShow-upload"
+                                listType="picture-card"
+                                fileList={this.state.technicalPictureUrl}
+                                onPreview={(file) => {
+                                    this.setState({
+                                        previewImage: file.url || file.thumbUrl,
+                                        previewVisible: true,
+                                    });
+                                }} >
+                            </Upload>
+                            <Modal maskClosable={false} footer={null}
+                                visible={this.state.previewVisible}
+                                onCancel={() => { this.setState({ previewVisible: false }) }}>
+                                <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+                            </Modal>
+                        </div>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="应用领域" >
+                        <span>{getIndustryCategory(theData.fieldA, theData.fieldB)}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="成熟度" >
+                            {(() => {
+                                switch (theData.maturity) {
+                                    case "0":
+                                        return <span>正在研发</span>;
+                                    case "1":
+                                        return <span>已有样品</span>;
+                                    case "2":
+                                        return <span>通过小试</span>;
+                                    case "3":
+                                        return <span>通过中试</span>;
+                                    case "4":
+                                        return <span>可以量产</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="创新度" >
+                            {(() => {
+                                switch (theData.innovation) {
+                                    case "0":
+                                        return <span>行业先进</span>;
+                                    case "1":
+                                        return <span>行业领先</span>;
+                                    case "2":
+                                        return <span>国内先进</span>;
+                                    case "3":
+                                        return <span>国内领先</span>;
+                                    case "4":
+                                        return <span>国际先进</span>;
+                                    case "5":
+                                        return <span>国际领先</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="成熟度证明材料(图片)" >
+                        <Upload className="demandDetailShow-upload"
+                            listType="picture-card"
+                            fileList={this.state.maturityPictureUrl}
+                            onPreview={(file) => {
+                                this.setState({
+                                    previewImage: file.url || file.thumbUrl,
+                                    previewVisible: true,
+                                });
+                            }} >
+                        </Upload>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 6 }}
+                        label="成熟度证明材料(文本)" >
+                        <p>{theData.maturityTextFileUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="成熟度证明材料(视频地址)" >
+                        <span>{theData.maturityVideoUrl}</span>
+                    </FormItem>
+                    <div className="clearfix" >
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="成果所有人名称" >
+                            <span>{theData.ownerName}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人证件号" >
+                            <span>{theData.ownerIdNumber}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人联系电话" >
+                            <span>{theData.ownerMobile}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人电子邮箱" >
+                            <span>{theData.ownerEmail}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人通信地址" >
+                            <span>{theData.ownerPostalAddress}</span>
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人类型" >
+                            {(() => {
+                                switch (theData.ownerType) {
+                                    case "0":
+                                        return <span>个人</span>;
+                                    case "1":
+                                        return <span>组织</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    {theData.ownerType == "1" ? <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织名称" >
+                            <span>{theData.orgName}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织地址" >
+                            <span>{theData.orgAddress}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织邮箱" >
+                            <span>{theData.orgEmail}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织联系人名称" >
+                            <span>{theData.orgContacts}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织联系人电话" >
+                            <span>{theData.orgContactsMobile}</span>
+                        </FormItem>
+                    </div> : <div></div>}
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="合作方式" >
+                            {(() => {
+                                switch (theData.cooperationMode) {
+                                    case "0":
+                                        return <span>技术转让</span>;
+                                    case "1":
+                                        return <span>授权生产</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="转让方式" >
+                            {(() => {
+                                switch (theData.transferMode) {
+                                    case "0":
+                                        return <span>完全转让</span>;
+                                    case "1":
+                                        return <span>许可转让</span>;
+                                    case "2":
+                                        return <span>技术入股</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="议价方式" >
+                            {(() => {
+                                switch (theData.bargainingMode) {
+                                    case "0":
+                                        return <span>面议</span>;
+                                    case "1":
+                                        return <span>定价</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="转让价格" >
+                            <span>{theData.transferPrice} 万元</span>
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术场景" >
+                        <span>{theData.technicalScene}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术突破" >
+                        <span>{theData.breakthrough}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="专利情况" >
+                        <span>{theData.patentCase}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="获奖情况" >
+                        <span>{theData.awards}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术团队情况" >
+                        <span>{theData.teamDes}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术参数" >
+                        <span>{theData.parameter}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 6 }}
+                        label="技术方案" >
+                        <p>{theData.techPlanUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 6 }}
+                        label="商业计划书" >
+                        <p>{theData.businessPlanUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/user/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    </FormItem>
+                    <FormItem wrapperCol={{ span: 12, offset: 4 }}>
+                        <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
+                    </FormItem>
+                </Spin>
+            </Form >
+        )
+    }
+}));
+
+const AchievementDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            auditStatus: 0,
+            textFileList: [],
+            techPlanFileList: [],
+            businessPlanFileList: [],
+            maturityPictureUrl: [],
+            technicalPictureUrl: [],
+            tags: []
+        };
+    },
+    loadData(id) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/achievement/detail",
+            data: {
+                id: id
+            },
+            success: function (data) {
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
                 };
                 this.setState({
                     data: thisData,
@@ -266,9 +746,11 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         orgContactsMobile: values.orgContactsMobile,
                         releaseStatus: values.releaseStatus,
                         techPlanUrl: this.state.techPlanUrl,
-                        businessPlanUrl: this.state.businessPlanUrl
+                        businessPlanUrl: this.state.businessPlanUrl,
+                        auditStatus: this.state.auditStatus
                     }
                 }).done(function (data) {
+                    this.state.auditStatus = 0;
                     if (!data.error.length) {
                         message.success('保存成功!');
                         this.setState({
@@ -357,23 +839,44 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             </Select>
                             )}
                     </FormItem>
-                    <FormItem className="half-item"
-                        {...formItemLayout}
-                        label="是否发布" >
-                        {getFieldDecorator('releaseStatus', {
-                            initialValue: theData.releaseStatus
-                        })(
-                            <Radio.Group>
-                                <Radio value="0">未发布</Radio>
-                                <Radio value="1">发布</Radio>
-                            </Radio.Group>
-                            )}
-                    </FormItem>
-                    <FormItem className="half-item"
-                        {...formItemLayout}
-                        label="发布时间" >
-                        <span>{theData.releaseDateFormattedDate}</span>
-                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                            {(() => {
+                                switch (theData.releaseStatus) {
+                                    case "0":
+                                        return <span>未发布</span>;
+                                    case "1":
+                                        return <span>已发布</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="发布时间" >
+                            <span>{theData.releaseDateFormattedDate}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="审核状态" >
+                            {(() => {
+                                switch (theData.auditStatus) {
+                                    case "0":
+                                        return <span>未提交审核(草稿)</span>;
+                                    case "1":
+                                        return <span>提交审核</span>;
+                                    case "2":
+                                        return <span>审核中</span>;
+                                    case "3":
+                                        return <span>审核通过</span>;
+                                    case "4":
+                                        return <span>审核未通过</span>;
+                                }
+                            })()}
+                        </FormItem>
+
+                    </div>
                 </div>
                 <FormItem
                     labelCol={{ span: 4 }}
@@ -808,8 +1311,9 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         </span>
                         : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </FormItem>
-                <FormItem wrapperCol={{ span: 12, offset: 3 }}>
+                <FormItem wrapperCol={{ span: 12, offset: 4 }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                    <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>
                     <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
                 </FormItem>
             </Form >
@@ -852,12 +1356,22 @@ const AchievementDetail = React.createClass({
                         width='1000px'
                         footer=''
                         className="admin-desc-content">
-                        <AchievementDetailForm
-                            data={this.props.data}
-                            achievementCategoryOption={this.props.achievementCategoryOption}
-                            closeDesc={this.handleCancel}
-                            visible={this.state.visible}
-                            handleOk={this.handleOk} />
+                        {(() => {
+                            if (this.props.data.auditStatus && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
+                                return <AchievementDetailShow
+                                    data={this.props.data}
+                                    closeDesc={this.handleCancel}
+                                    visible={this.state.visible}
+                                    handleOk={this.handleOk} />
+                            } else {
+                                return <AchievementDetailForm
+                                    data={this.props.data}
+                                    achievementCategoryOption={this.props.achievementCategoryOption}
+                                    closeDesc={this.handleCancel}
+                                    visible={this.state.visible}
+                                    handleOk={this.handleOk} />
+                            }
+                        })()}
                     </Modal>
                 </div>
             );

+ 46 - 18
js/component/account/demand/techDemand.jsx

@@ -32,6 +32,7 @@ const DemandList = React.createClass({
                 validityPeriodEndDate: this.state.validityPeriodDate[1],
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
+                auditStatus: this.state.auditStatus
             },
             success: function (data) {
                 let theArr = [];
@@ -56,7 +57,8 @@ const DemandList = React.createClass({
                             releaseStatus: thisdata.releaseStatus,
                             employerId: thisdata.employerId,
                             releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
-                            validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate
+                            validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
+                            auditStatus: thisdata.auditStatus
                         });
                     };
                 }
@@ -112,6 +114,24 @@ const DemandList = React.createClass({
                     key: 'demandType',
                     render: text => { return getDemandType(text); }
                 }, {
+                    title: '审核状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>未提交审核(草稿)</span>;
+                            case "1":
+                                return <span>提交审核</span>;
+                            case "2":
+                                return <span>审核中</span>;
+                            case "3":
+                                return <span>审核通过</span>;
+                            case "4":
+                                return <span>审核未通过</span>;
+                        }
+                    }
+                }, {
                     title: '需求状态',
                     dataIndex: 'status',
                     key: 'status',
@@ -204,6 +224,7 @@ const DemandList = React.createClass({
     },
     reset() {
         this.state.serialNumber = undefined;
+        this.state.auditStatus = undefined;
         this.state.name = undefined;
         this.state.keyword = undefined;
         this.state.demandType = undefined;
@@ -262,11 +283,14 @@ const DemandList = React.createClass({
                         <Select.Option value="1" >未解决</Select.Option>
                         <Select.Option value="2" >已解决</Select.Option>
                     </Select>
-                    <Select placeholder="选择是否发布" style={{ width: 120 }}
-                        value={this.state.releaseStatus}
-                        onChange={(e) => { this.setState({ releaseStatus: e }) }}>
-                        <Select.Option value="0" >未发布</Select.Option>
-                        <Select.Option value="1" >已发布</Select.Option>
+                    <Select placeholder="选择审核状态" style={{ width: 160 }}
+                        value={this.state.auditStatus}
+                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                        <Select.Option value="0" >未提交审核(草稿)</Select.Option>
+                        <Select.Option value="1" >提交审核</Select.Option>
+                        <Select.Option value="2" >审核中</Select.Option>
+                        <Select.Option value="3" >审核通过</Select.Option>
+                        <Select.Option value="4" >审核未通过</Select.Option>
                     </Select>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
@@ -275,18 +299,22 @@ const DemandList = React.createClass({
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
-                        <p>
-                            <span>有效期限 :</span>
-                            <RangePicker
-                                value={[this.state.validityPeriodDate[0] ? moment(this.state.validityPeriodDate[0]) : null,
-                                this.state.validityPeriodDate[1] ? moment(this.state.validityPeriodDate[1]) : null]}
-                                onChange={(data, dataString) => { this.setState({ validityPeriodDate: dataString }); }} />
-                            <span>发布时间 :</span>
-                            <RangePicker
-                                value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
-                                this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
-                                onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
-                        </p>
+                        <Select placeholder="选择是否发布" style={{ width: 120 }}
+                            value={this.state.releaseStatus}
+                            onChange={(e) => { this.setState({ releaseStatus: e }) }}>
+                            <Select.Option value="0" >未发布</Select.Option>
+                            <Select.Option value="1" >已发布</Select.Option>
+                        </Select>
+                        <span>有效期限 :</span>
+                        <RangePicker
+                            value={[this.state.validityPeriodDate[0] ? moment(this.state.validityPeriodDate[0]) : null,
+                            this.state.validityPeriodDate[1] ? moment(this.state.validityPeriodDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ validityPeriodDate: dataString }); }} />
+                        <span>发布时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
                     </div>
                 </div>
                 <div className="patent-table">

+ 16 - 4
js/component/account/demand/techDemand.less

@@ -21,10 +21,8 @@
         }
         .search-more {
             margin: 10px 0;
-            >p {
-                span {
-                    margin-right: 10px
-                }
+            span {
+                margin-right: 10px
             }
         }
     }
@@ -69,4 +67,18 @@
     .set-submit {
         margin-right: 20px;
     }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete {
+            display: none
+        }
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
 }

File diff suppressed because it is too large
+ 670 - 278
js/component/account/demand/techDemandDesc.jsx


+ 19 - 0
js/component/dataDic.js

@@ -661,5 +661,24 @@ module.exports = {
             value: "6",
             key: "非标"
         }
+    ],
+    //需求和成果审核状态
+    techAuditStatusList:[
+        {
+            value: "0",
+            key: "未提交审核(草稿)"
+        }, {
+            value: "1",
+            key: "提交审核"
+        }, {
+            value: "2",
+            key: "审核中"
+        }, {
+            value: "3",
+            key: "审核通过"
+        }, {
+            value: "4",
+            key: "审核未通过"
+        }
     ]
 };

+ 43 - 42
js/component/manageCenter/achievement/techAchievement.jsx

@@ -5,8 +5,8 @@ import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './techAchievement.less';
 import TechAchievementDesc from './techAchievementDesc.jsx';
-import { provinceArr, achievementCategoryList } from '../../dataDic.js';
-import { companySearch, getAchievementCategory } from '../../tools.js';
+import { provinceArr, achievementCategoryList, techAuditStatusList } from '../../dataDic.js';
+import { companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus } from '../../tools.js';
 
 const AchievementList = React.createClass({
     loadData(pageNo) {
@@ -27,10 +27,10 @@ const AchievementList = React.createClass({
                 keyword: this.state.keyword, // 关键词
                 category: this.state.category, //类型(0--专利, 2--软著, 3--项目, 4--版权, 5--工业设计, 6--配方, 7--非标)
                 ownerType: this.state.ownerType, //所有人类型(0-个人,1-组织)
-                status: this.state.status ? Number(this.state.status) : undefined, //状态
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
                 releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined, //是否发布(0--未发布,1--已发布)
+                auditStatus: this.state.auditStatus
             },
             success: function (data) {
                 let theArr = [];
@@ -54,7 +54,8 @@ const AchievementList = React.createClass({
                             ownerMobile: thisdata.ownerMobile,
                             status: thisdata.status,
                             releaseDate: thisdata.releaseDate,
-                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            auditStatus: thisdata.auditStatus
                         });
                     };
                 }
@@ -126,23 +127,10 @@ const AchievementList = React.createClass({
                         }
                     }
                 }, {
-                    title: '所有人联系方式',
-                    dataIndex: 'ownerMobile',
-                    key: 'ownerMobile',
-                }, {
-                    title: '状态',
-                    dataIndex: 'status',
-                    key: 'status',
-                    render: text => {
-                        switch (text) {
-                            case "0":
-                                return <span>进行中</span>;
-                            case "1":
-                                return <span>未解决</span>;
-                            case "2":
-                                return <span>已解决</span>;
-                        }
-                    }
+                    title: '审核状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => { return getTechAuditStatus(text) }
                 }, {
                     title: '发布时间',
                     dataIndex: 'releaseDateFormattedDate',
@@ -160,7 +148,23 @@ const AchievementList = React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
+        let auditArr = [];
+        techAuditStatusList.map(function (item) {
+            auditArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
         this.state.achievementCategoryOption = theArr;
+        this.state.auditStatusOption = auditArr;
+        if (window.location.search) {
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.rid) {
+                theObj.id = theObj.rid;
+                if (theObj.rid != 'null' && theObj.uid != 'null') {
+                    this.tableRowClick(theObj);
+                };
+            };
+        };
         this.loadData();
     },
     tableRowClick(record, index) {
@@ -222,8 +226,8 @@ const AchievementList = React.createClass({
         this.state.keyword = undefined;
         this.state.category = undefined;
         this.state.ownerType = undefined;
-        this.state.status = undefined;
         this.state.releaseStatus = undefined;
+        this.state.auditStatus = undefined;
         this.state.releaseDate = [];
         this.loadData();
     },
@@ -267,19 +271,11 @@ const AchievementList = React.createClass({
                         onChange={(e) => { this.setState({ category: e }) }}>
                         {this.state.achievementCategoryOption}
                     </Select>
-                    <Select placeholder="选择所有人类型"
-                        style={{ width: 120 }}
-                        value={this.state.ownerType}
-                        onChange={(e) => { this.setState({ ownerType: e }) }}>
-                        <Select.Option value="0" >个人</Select.Option>
-                        <Select.Option value="1" >组织</Select.Option>
-                    </Select>
-                    <Select placeholder="选择成果状态" style={{ width: 120 }}
-                        value={this.state.status}
-                        onChange={(e) => { this.setState({ status: e }) }}>
-                        <Select.Option value="0" >进行中</Select.Option>
-                        <Select.Option value="1" >未解决</Select.Option>
-                        <Select.Option value="2" >已解决</Select.Option>
+                    <Select placeholder="选择审核状态"
+                        style={{ width: 160 }}
+                        value={this.state.auditStatus}
+                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                        {this.state.auditStatusOption}
                     </Select>
                     <Select placeholder="选择是否发布" style={{ width: 120 }}
                         value={this.state.releaseStatus}
@@ -294,13 +290,18 @@ const AchievementList = React.createClass({
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
-                        <p>
-                            <span>发布时间 :</span>
-                            <RangePicker
-                                value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
-                                this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
-                                onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
-                        </p>
+                        <Select placeholder="选择所有人类型"
+                            style={{ width: 140 }}
+                            value={this.state.ownerType}
+                            onChange={(e) => { this.setState({ ownerType: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
+                        <span>发布时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
                     </div>
                 </div>
                 <div className="patent-table">

+ 16 - 4
js/component/manageCenter/achievement/techAchievement.less

@@ -21,10 +21,8 @@
         }
         .search-more {
             margin: 10px 0;
-            >p {
-                span {
-                    margin-right: 10px
-                }
+            >span {
+                margin-right: 10px
             }
         }
     }
@@ -69,4 +67,18 @@
     .set-submit {
         margin-right: 20px;
     }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete {
+            display: none
+        }
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
 }

+ 671 - 50
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -4,8 +4,8 @@ import moment from 'moment';
 import './techAchievement.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import { IndustryObject } from '../../DicIndustryList.js';
-import { beforeUploadFile, splitUrl, companySearch } from '../../tools.js';
+import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
+import { beforeUploadFile, splitUrl, companySearch, getAchievementCategory } from '../../tools.js';
 
 const KeyWordTagGroup = React.createClass({
     getInitialState() {
@@ -130,7 +130,7 @@ const PicturesWall = React.createClass({
     }
 });
 
-const AchievementDetailForm = Form.create()(React.createClass({
+const AchievementDetailShow = Form.create()(React.createClass({
     getInitialState() {
         return {
             visible: false,
@@ -163,14 +163,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     };
                     thisData = {};
                 };
-                let d = new Date()
-                if (thisData && thisData.dateOfBirthMonth && thisData.dateOfBirthYear) {
-                    d.setMonth(thisData.dateOfBirthMonth - 1);
-                    d.setYear(parseInt(thisData.dateOfBirthYear));
-                };
                 this.setState({
                     data: thisData,
-                    orgDisplay: thisData.ownerType,
                     tags: thisData.keyword ? thisData.keyword.split(",") : [],
                     technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
                     maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
@@ -182,7 +176,560 @@ const AchievementDetailForm = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    getSalesmanList() {
+    offShelf() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/achievement/offShelf",
+            data: { "id": this.props.data.id }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('撤销成功!');
+                this.setState({
+                    visible: false,
+                    releaseSubmitVisible: false
+                });
+                this.props.handleOk();
+            } else {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this));
+    },
+    formSubmit() {
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 3 && !values.techBroderId) {
+                message.warning('必须选择一个技术经纪人!');
+                return
+            };
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/achievement',
+                    data: {
+                        id: this.props.data.id,
+                        techBroderId: values.techBroderId,
+                        auditStatus: values.auditStatus
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.setState({
+                            visible: false,
+                            formSubmitVisible: false
+                        });
+                        this.props.handleOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+    },
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 4) {
+                this.setState({
+                    formSubmitVisible: true
+                });
+            } else {
+                this.formSubmit();
+            };
+        });
+    },
+    componentWillMount() {
+        if (this.props.data.id) {
+            this.loadData(this.props.data.id);
+        } else {
+            this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.techPlanFileList = [];
+            this.state.businessPlanFileList = [];
+            if (nextProps.data.id) {
+                this.loadData(nextProps.data.id);
+            } else {
+                this.state.data = {};
+                this.state.tags = [];
+                this.state.maturityPictureUrl = [];
+                this.state.technicalPictureUrl = [];
+            };
+            this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 8 },
+            wrapperCol: { span: 14 },
+        };
+        return (
+            <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
+                <Spin spinning={this.state.loading}>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="编号" >
+                            <span>{theData.serialNumber}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="名称" >
+                            <span>{theData.name}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="数据类别" >
+                            {(() => {
+                                switch (theData.dataCategory) {
+                                    case "0":
+                                        return <span>成果</span>;
+                                    case "1":
+                                        return <span>技术</span>;
+                                    case "2":
+                                        return <span>项目</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="类型" >
+                            <span>{getAchievementCategory(theData.category)}</span>
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                            {(() => {
+                                switch (theData.releaseStatus) {
+                                    case "0":
+                                        return <span>未发布</span>;
+                                    case "1":
+                                        return <div>
+                                            <span>已发布</span>
+                                            <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
+                                            <Modal maskClosable={false} title="确认"
+                                                visible={this.state.releaseSubmitVisible}
+                                                width='300px'
+                                                footer={null}
+                                                onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
+                                                <span>确认要撤销发布吗?</span>
+                                                <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
+                                                <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
+                                            </Modal>
+                                        </div>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="发布时间" >
+                            <span>{theData.releaseDateFormattedDate}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="审核状态" >
+                            {(() => {
+                                switch (theData.auditStatus) {
+                                    case "0":
+                                        return <span>未提交审核(草稿)</span>;
+                                    case "1":
+                                        return <span>提交审核</span>;
+                                    case "2":
+                                        return <span>审核中</span>;
+                                    case "3":
+                                        return <span>审核通过</span>;
+                                    case "4":
+                                        return <span>审核未通过</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="关键词" >
+                        {this.state.tags.map((tag) => {
+                            return <Tooltip key={tag} title={tag}>
+                                <Tag key={tag}>{tag}</Tag>
+                            </Tooltip>;
+                        })}
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="摘要" >
+                        <span>{theData.summary}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="成果简介" >
+                        <span>{theData.introduction}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术图片" >
+                        <div className="clearfix">
+                            <Upload className="demandDetailShow-upload"
+                                listType="picture-card"
+                                fileList={this.state.technicalPictureUrl}
+                                onPreview={(file) => {
+                                    this.setState({
+                                        previewImage: file.url || file.thumbUrl,
+                                        previewVisible: true,
+                                    });
+                                }} >
+                            </Upload>
+                            <Modal maskClosable={false} footer={null}
+                                visible={this.state.previewVisible}
+                                onCancel={() => { this.setState({ previewVisible: false }) }}>
+                                <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+                            </Modal>
+                        </div>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="应用领域" >
+                        <span>{getIndustryCategory(theData.fieldA, theData.fieldB)}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="成熟度" >
+                            {(() => {
+                                switch (theData.maturity) {
+                                    case "0":
+                                        return <span>正在研发</span>;
+                                    case "1":
+                                        return <span>已有样品</span>;
+                                    case "2":
+                                        return <span>通过小试</span>;
+                                    case "3":
+                                        return <span>通过中试</span>;
+                                    case "4":
+                                        return <span>可以量产</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="创新度" >
+                            {(() => {
+                                switch (theData.innovation) {
+                                    case "0":
+                                        return <span>行业先进</span>;
+                                    case "1":
+                                        return <span>行业领先</span>;
+                                    case "2":
+                                        return <span>国内先进</span>;
+                                    case "3":
+                                        return <span>国内领先</span>;
+                                    case "4":
+                                        return <span>国际先进</span>;
+                                    case "5":
+                                        return <span>国际领先</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="成熟度证明材料(图片)" >
+                        <Upload className="demandDetailShow-upload"
+                            listType="picture-card"
+                            fileList={this.state.maturityPictureUrl}
+                            onPreview={(file) => {
+                                this.setState({
+                                    previewImage: file.url || file.thumbUrl,
+                                    previewVisible: true,
+                                });
+                            }} >
+                        </Upload>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 6 }}
+                        label="成熟度证明材料(文本)" >
+                        <p>{theData.maturityTextFileUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="成熟度证明材料(视频地址)" >
+                        <span>{theData.maturityVideoUrl}</span>
+                    </FormItem>
+                    <div className="clearfix" >
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="成果所有人名称" >
+                            <span>{theData.ownerName}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人证件号" >
+                            <span>{theData.ownerIdNumber}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人联系电话" >
+                            <span>{theData.ownerMobile}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人电子邮箱" >
+                            <span>{theData.ownerEmail}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人通信地址" >
+                            <span>{theData.ownerPostalAddress}</span>
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所有人类型" >
+                            {(() => {
+                                switch (theData.ownerType) {
+                                    case "0":
+                                        return <span>个人</span>;
+                                    case "1":
+                                        return <span>组织</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    {theData.ownerType == "1" ? <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织名称" >
+                            {getFieldDecorator('orgName', {
+                                initialValue: theData.orgName
+                            })(
+                                <Input />
+                                )}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织地址" >
+                            {getFieldDecorator('orgAddress', {
+                                initialValue: theData.orgAddress
+                            })(
+                                <Input />
+                                )}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织邮箱" >
+                            {getFieldDecorator('orgEmail', {
+                                initialValue: theData.orgEmail
+                            })(
+                                <Input />
+                                )}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织联系人名称" >
+                            {getFieldDecorator('orgContacts', {
+                                initialValue: theData.orgContacts
+                            })(
+                                <Input />
+                                )}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="所属组织联系人电话" >
+                            {getFieldDecorator('orgContactsMobile', {
+                                initialValue: theData.orgContactsMobile
+                            })(
+                                <Input />
+                                )}
+                        </FormItem>
+                    </div> : <div></div>}
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="合作方式" >
+                            {(() => {
+                                switch (theData.cooperationMode) {
+                                    case "0":
+                                        return <span>技术转让</span>;
+                                    case "1":
+                                        return <span>授权生产</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="转让方式" >
+                            {(() => {
+                                switch (theData.transferMode) {
+                                    case "0":
+                                        return <span>完全转让</span>;
+                                    case "1":
+                                        return <span>许可转让</span>;
+                                    case "2":
+                                        return <span>技术入股</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="议价方式" >
+                            {(() => {
+                                switch (theData.bargainingMode) {
+                                    case "0":
+                                        return <span>面议</span>;
+                                    case "1":
+                                        return <span>定价</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="转让价格" >
+                            <span>{theData.transferPrice} 万元</span>
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术场景" >
+                        <span>{theData.technicalScene}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术突破" >
+                        <span>{theData.breakthrough}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="专利情况" >
+                        <span>{theData.patentCase}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="获奖情况" >
+                        <span>{theData.awards}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术团队情况" >
+                        <span>{theData.teamDes}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术参数" >
+                        <span>{theData.parameter}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 6 }}
+                        label="技术方案" >
+                        <p>{theData.techPlanUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 6 }}
+                        label="商业计划书" >
+                        <p>{theData.businessPlanUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    </FormItem>
+                    {window.showAuditStatus && theData.auditStatus == 2 ? <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="审核状态" >
+                            {getFieldDecorator('auditStatus')(
+                                <Radio.Group>
+                                    <Radio value={3}>审核通过</Radio>
+                                    <Radio value={4}>审核未通过</Radio>
+                                </Radio.Group>
+                            )}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="技术经纪人" >
+                            {getFieldDecorator('techBroderId', {
+                                initialValue: theData.techBroderId
+                            })(
+                                <Select style={{ width: 260 }}>
+                                    {this.props.techBrodersOption}
+                                </Select>
+                                )}
+                        </FormItem>
+                    </div> : <div></div>}
+                    <FormItem wrapperCol={{ span: 12, offset: 4 }}>
+                        {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
+                        <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
+                    </FormItem>
+                    <Modal maskClosable={false} title="确认"
+                        visible={this.state.formSubmitVisible}
+                        width='360px'
+                        footer={null}
+                        onCancel={() => { this.setState({ formSubmitVisible: false }) }} >
+                        <span>确认该需求审核未通过?</span>
+                        <Button className="modal-submit" type="primary" onClick={this.formSubmit}>确认</Button>
+                        <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ formSubmitVisible: false }) }}>取消</Button>
+                    </Modal>
+                </Spin>
+            </Form >
+        )
+    }
+}));
+
+const AchievementDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            auditStatus: 0,
+            textFileList: [],
+            techPlanFileList: [],
+            businessPlanFileList: [],
+            maturityPictureUrl: [],
+            technicalPictureUrl: [],
+            tags: []
+        };
+    },
+    loadData(id) {
         this.setState({
             loading: true
         });
@@ -190,22 +737,24 @@ const AchievementDetailForm = Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/salesman",
+            url: globalConfig.context + "/api/admin/achievement/detail",
+            data: {
+                id: id
+            },
             success: function (data) {
-                if (!data.data) {
+                let thisData = data.data;
+                if (!thisData) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
-                    }
-                    return;
-                };
-                let _me = this, theArr = [];
-                for (var item in data.data) {
-                    theArr.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
-                    )
+                    };
+                    thisData = {};
                 };
                 this.setState({
-                    salesmanOption: theArr
+                    data: thisData,
+                    orgDisplay: thisData.ownerType,
+                    tags: thisData.keyword ? thisData.keyword.split(",") : [],
+                    technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                    maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
                 });
             }.bind(this),
         }).always(function () {
@@ -298,9 +847,11 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         orgContactsMobile: values.orgContactsMobile,
                         releaseStatus: values.releaseStatus,
                         techPlanUrl: this.state.techPlanUrl,
-                        businessPlanUrl: this.state.businessPlanUrl
+                        businessPlanUrl: this.state.businessPlanUrl,
+                        auditStatus: this.state.auditStatus
                     }
                 }).done(function (data) {
+                    this.state.auditStatus = 0;
                     if (!data.error.length) {
                         message.success('保存成功!');
                         this.setState({
@@ -315,9 +866,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
         });
     },
     componentWillMount() {
-        this.getSalesmanList();
         if (this.props.data.id) {
-            this.loadData(this.props.data.id, this.props.detailApiUrl);
+            this.loadData(this.props.data.id);
         } else {
             this.state.data = {};
         };
@@ -390,23 +940,44 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             </Select>
                             )}
                     </FormItem>
-                    <FormItem className="half-item"
-                        {...formItemLayout}
-                        label="是否发布" >
-                        {getFieldDecorator('releaseStatus', {
-                            initialValue: theData.releaseStatus
-                        })(
-                            <Radio.Group>
-                                <Radio value="0">未发布</Radio>
-                                <Radio value="1">发布</Radio>
-                            </Radio.Group>
-                            )}
-                    </FormItem>
-                    <FormItem className="half-item"
-                        {...formItemLayout}
-                        label="发布时间" >
-                        <span>{theData.releaseDateFormattedDate}</span>
-                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                            {(() => {
+                                switch (theData.releaseStatus) {
+                                    case "0":
+                                        return <span>未发布</span>;
+                                    case "1":
+                                        return <span>已发布</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="发布时间" >
+                            <span>{theData.releaseDateFormattedDate}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="审核状态" >
+                            {(() => {
+                                switch (theData.auditStatus) {
+                                    case "0":
+                                        return <span>未提交审核(草稿)</span>;
+                                    case "1":
+                                        return <span>提交审核</span>;
+                                    case "2":
+                                        return <span>审核中</span>;
+                                    case "3":
+                                        return <span>审核通过</span>;
+                                    case "4":
+                                        return <span>审核未通过</span>;
+                                }
+                            })()}
+                        </FormItem>
+
+                    </div>
                 </div>
                 <FormItem
                     labelCol={{ span: 4 }}
@@ -841,8 +1412,9 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         </span>
                         : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </FormItem>
-                <FormItem wrapperCol={{ span: 12, offset: 3 }}>
+                <FormItem wrapperCol={{ span: 12, offset: 4 }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                    <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>
                     <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
                 </FormItem>
             </Form >
@@ -856,6 +1428,39 @@ const AchievementDetail = React.createClass({
             visible: false
         };
     },
+    getTechBrodersList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/audit/techBroders",
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    return;
+                };
+                let _me = this, theArr = [];
+                for (var item in data.data) {
+                    theArr.push(
+                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    techBrodersOption: theArr,
+                    techBrodersObj: data.data
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
     showModal() {
         this.setState({
             visible: true,
@@ -873,6 +1478,9 @@ const AchievementDetail = React.createClass({
         });
         this.props.closeDesc(false, true);
     },
+    componentWillMount() {
+        this.getTechBrodersList();
+    },
     componentWillReceiveProps(nextProps) {
         this.state.visible = nextProps.showDesc;
     },
@@ -885,14 +1493,27 @@ const AchievementDetail = React.createClass({
                         width='1000px'
                         footer=''
                         className="admin-desc-content">
-                        <AchievementDetailForm
-                            data={this.props.data}
-                            companyOption={this.props.companyOption}
-                            userOption={this.props.userOption}
-                            achievementCategoryOption={this.props.achievementCategoryOption}
-                            closeDesc={this.handleCancel}
-                            visible={this.state.visible}
-                            handleOk={this.handleOk} />
+                        {(() => {
+                            if (this.props.data.auditStatus && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
+                                return <AchievementDetailShow
+                                    data={this.props.data}
+                                    techBrodersOption={this.state.techBrodersOption}
+                                    techBrodersObj={this.state.techBrodersObj}
+                                    closeDesc={this.handleCancel}
+                                    visible={this.state.visible}
+                                    handleOk={this.handleOk} />
+                            } else {
+                                return <AchievementDetailForm
+                                    data={this.props.data}
+                                    companyOption={this.props.companyOption}
+                                    userOption={this.props.userOption}
+                                    achievementCategoryOption={this.props.achievementCategoryOption}
+                                    techBrodersObj={this.state.techBrodersObj}
+                                    closeDesc={this.handleCancel}
+                                    visible={this.state.visible}
+                                    handleOk={this.handleOk} />
+                            }
+                        })()}
                     </Modal>
                 </div>
             );

+ 53 - 11
js/component/manageCenter/demand/techDemand.jsx

@@ -5,8 +5,8 @@ import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './techDemand.less';
 import TechDemandDesc from './techDemandDesc.jsx';
-import { provinceArr, demandTypeList } from '../../dataDic.js';
-import { companySearch, getDemandType } from '../../tools.js';
+import { demandTypeList } from '../../dataDic.js';
+import { companySearch, getDemandType, getSearchUrl } from '../../tools.js';
 
 const DemandList = React.createClass({
     loadData(pageNo, apiUrl) {
@@ -34,6 +34,7 @@ const DemandList = React.createClass({
                 validityPeriodEndDate: this.state.validityPeriodDate[1],
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
+                auditStatus: this.state.auditStatus
             },
             success: function (data) {
                 let theArr = [];
@@ -63,7 +64,8 @@ const DemandList = React.createClass({
                             releaseDate: thisdata.releaseDate,
                             principalId: thisdata.principalId,
                             validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
-                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            auditStatus: thisdata.auditStatus
                         });
                     };
                 }
@@ -135,16 +137,32 @@ const DemandList = React.createClass({
                     dataIndex: 'username',
                     key: 'username',
                 }, {
+                    title: '审核状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>未提交审核(草稿)</span>;
+                            case "1":
+                                return <span>提交审核</span>;
+                            case "2":
+                                return <span>审核中</span>;
+                            case "3":
+                                return <span>审核通过</span>;
+                            case "4":
+                                return <span>审核未通过</span>;
+                        }
+                    }
+                }, {
                     title: '需求状态',
                     dataIndex: 'status',
                     key: 'status',
                     render: text => {
                         switch (text) {
                             case "0":
-                                return <span>进行中</span>;
-                            case "1":
                                 return <span>未解决</span>;
-                            case "2":
+                            case "1":
                                 return <span>已解决</span>;
                         }
                     }
@@ -160,6 +178,10 @@ const DemandList = React.createClass({
                     title: '管理员',
                     dataIndex: 'principalId',
                     key: 'principalId',
+                }, {
+                    title: '技术经纪人',
+                    dataIndex: 'techBrokerId',
+                    key: 'techBrokerId',
                 }
             ],
             dataSource: [],
@@ -238,6 +260,16 @@ const DemandList = React.createClass({
             )
         });
         this.state.demandTypeOption = theArr;
+        if (window.location.search) {
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.rid) {
+                theObj.id = theObj.rid;
+                theObj.employerId = theObj.uid;
+                if (theObj.rid != 'null') {
+                    this.tableRowClick(theObj);
+                };
+            };
+        };
         this.loadData();
         this.getCompanyList();
         this.getUserList();
@@ -311,6 +343,7 @@ const DemandList = React.createClass({
         this.state.username = undefined;
         this.state.status = undefined;
         this.state.releaseStatus = undefined;
+        this.state.auditStatus = undefined;
         this.state.validityPeriodDate = [];
         this.state.releaseDate = [];
         this.loadData();
@@ -369,11 +402,14 @@ const DemandList = React.createClass({
                         <Select.Option value="1" >未解决</Select.Option>
                         <Select.Option value="2" >已解决</Select.Option>
                     </Select>
-                    <Select placeholder="选择是否发布" style={{ width: 120 }}
-                        value={this.state.releaseStatus}
-                        onChange={(e) => { this.setState({ releaseStatus: e }) }}>
-                        <Select.Option value="0" >未发布</Select.Option>
-                        <Select.Option value="1" >已发布</Select.Option>
+                    <Select placeholder="选择审核状态" style={{ width: 160 }}
+                        value={this.state.auditStatus}
+                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                        <Select.Option value="0" >未提交审核(草稿)</Select.Option>
+                        <Select.Option value="1" >提交审核</Select.Option>
+                        <Select.Option value="2" >审核中</Select.Option>
+                        <Select.Option value="3" >审核通过</Select.Option>
+                        <Select.Option value="4" >审核未通过</Select.Option>
                     </Select>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
@@ -382,6 +418,12 @@ const DemandList = React.createClass({
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <Select placeholder="选择是否发布" style={{ width: 120 }}
+                            value={this.state.releaseStatus}
+                            onChange={(e) => { this.setState({ releaseStatus: e }) }}>
+                            <Select.Option value="0" >未发布</Select.Option>
+                            <Select.Option value="1" >已发布</Select.Option>
+                        </Select>
                         <p>
                             <span>有效期限 :</span>
                             <RangePicker

+ 15 - 0
js/component/manageCenter/demand/techDemand.less

@@ -69,4 +69,19 @@
     .set-submit {
         margin-right: 20px;
     }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete{
+            display: none
+        }
+
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
 }

File diff suppressed because it is too large
+ 806 - 339
js/component/manageCenter/demand/techDemandDesc.jsx


+ 8 - 0
js/component/manageCenter/topTab.jsx

@@ -63,6 +63,14 @@ const MessageModal = React.createClass({
                                 return <a href={globalConfig.context + "/admin/userManage.html?id=" + record.uid + "&type=1" + (window.showOrgList ? "#orgList" : "#customerList")}> {record.noticeTypeName} </a >;
                             case 7:
                                 return <a href={globalConfig.context + "/admin/servicesManage/contract.html?rid=" + record.rid + "&uid=" + record.uid + "#contract"}> {record.noticeTypeName} </a >;
+                            case 8:
+                                return <a href={globalConfig.context + "/admin/demand.html?rid=" + record.rid + "#techDemandUser"}> {record.noticeTypeName} </a >;
+                            case 9:
+                                return <a href={globalConfig.context + "/admin/demand.html?rid=" + record.rid + "&uid=" + record.uid + "#techDemandOrg"}> {record.noticeTypeName} </a >;
+                            case 10:
+                                return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "&uid=" + record.uid + "#techAchievement"}> {record.noticeTypeName} </a >;
+                            case 11:
+                                return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "&uid=" + record.uid + "#techAchievement"}> {record.noticeTypeName} </a >;
                         }
                     }
                 }, {

+ 16 - 2
js/component/tools.js

@@ -22,7 +22,8 @@ import {
     contractTypeList,
     contractStateList,
     demandTypeList,
-    achievementCategoryList
+    achievementCategoryList,
+    techAuditStatusList
 } from './dataDic.js';
 import { provinceList } from './DicProvinceList.js';
 import { techFieldList } from './DicTechFieldList.js'
@@ -262,8 +263,9 @@ module.exports = {
         });
         let fieldKey = "";
         fieldList.map(function (item) {
-            if (field1 == item.value) {
+            if (field1 && Number(field1) == item.value) {
                 fieldKey = item.label;
+                debugger
             };
             if (field2 == item.value) {
                 fieldKey = fieldKey + "/" + item.label;
@@ -675,4 +677,16 @@ module.exports = {
             return theType;
         }
     },
+    //获取需求和成果审核状态
+    getTechAuditStatus: function (e) {
+        if (e) {
+            let theType = '';
+            techAuditStatusList.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    }
 }