liting2017 7 years ago
parent
commit
a602b4427f

+ 22 - 0
js/component/manageCenter/achievement/content.jsx

@@ -91,6 +91,28 @@ class Content extends Component {
                     });
                 });
                 break;
+            //审核
+            case 'techAchievementAudit':
+                require.ensure([], () => {
+                    const AchievementList = require('./techAchievementAudit/techAchievementAudit').default;
+                    this.setState({
+                        component: AchievementList,
+                        listApiUrl: '/api/admin/portal/order/orgAchievementOrderList',
+                        detailApiUrl: '/api/admin/achievement/orgDetail'
+                    });
+                });
+                break;  
+             //发布
+            case 'techAchievementPublish':
+                require.ensure([], () => {
+                    const AchievementList = require('./techAchievementRelease/techAchievementAudit').default;
+                    this.setState({
+                        component: AchievementList,
+                        listApiUrl: '/api/admin/achievement/userList',
+                        detailApiUrl: '/api/admin/achievement/userDetail'
+                    });
+                });
+                break;    
             default:
             require.ensure([], () => {
                 const Module = require('../module').default;

+ 979 - 0
js/component/manageCenter/achievement/techAchievementAudit/auditDesc.jsx

@@ -0,0 +1,979 @@
+import React from 'react';
+import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, Upload, Input, InputNumber, Select, Button, Radio, Form, Cascader, Tag, Switch } from 'antd';
+import '../techAchievement.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { maturityList, innovationList, transferModeList } from '../../../dataDic';
+import { IndustryObject, getIndustryCategory } from '../../../DicIndustryList.js';
+import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation,beforeUpload, getBase64,getboutique } from '../../../tools.js';
+import throttle from '../../../throttle.js';
+
+const KeyWordTagGroup = React.createClass({
+    getInitialState() {
+        return {
+            tags: [],
+            inputVisible: false,
+            inputValue: ''
+        };
+    },
+    handleClose(removedTag) {
+        const tags = this.state.tags.filter(tag => tag !== removedTag);
+        this.props.tagsArr(tags);
+        this.setState({ tags });
+    },
+    showInput() {
+        this.setState({ inputVisible: true }, () => this.input.focus());
+    },
+    handleInputChange(e) {
+        this.setState({ inputValue: e.target.value });
+    },
+    handleInputConfirm() {
+        const state = this.state;
+        const inputValue = state.inputValue;
+        let tags = state.tags;
+        if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
+            tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
+        };
+        this.props.tagsArr(tags);
+        this.setState({
+            tags,
+            inputVisible: false,
+            inputValue: '',
+        });
+    },
+    componentWillMount() {
+        this.state.tags = this.props.keyWordArr;
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.keyWordArr != nextProps.keyWordArr) {
+            this.state.tags = nextProps.keyWordArr;
+        };
+    },
+    render() {
+        const { tags, inputVisible, inputValue } = this.state;
+        return (
+            <div className="keyWord-tips">
+                {tags.map((tag, index) => {
+                    const isLongTag = tag.length > 10;
+                    const tagElem = (
+                        <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
+                            {isLongTag ? `${tag.slice(0, 10)}...` : tag}
+                        </Tag>
+                    );
+                    return isLongTag ? <Tooltip key={tag} title={tag}>{tagElem}</Tooltip> : tagElem;
+                })}
+                {inputVisible && (
+                    <Input
+                        ref={input => this.input = input}
+                        type="text"
+                        style={{ width: 78 }}
+                        value={inputValue}
+                        onChange={this.handleInputChange}
+                        onBlur={this.handleInputConfirm}
+                        onPressEnter={this.handleInputConfirm}
+                    />
+                )}
+                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
+            </div>
+        );
+    }
+});
+
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: [],
+        }
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl;
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
+                    data={{ 'sign': this.props.pictureSign }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 5 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const AchievementDetailShow = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            loading: false,
+            buttonLoading: false,
+            contactsObj: {},
+            data: {},
+            tags: [],
+            technicalPictureUrl: [],
+            coverImg: [],
+            maturityPictureUrl: [],           
+            textFileList: [],
+            techPlanFileList: [],
+            businessPlanFileList: []
+        };
+    },
+    loadData(id, detailApiUrl,ownerType) {
+        this.setState({
+            loading: true
+        });
+      
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + detailApiUrl,
+            data: {
+                id: id,
+                ownerType:ownerType?ownerType:this.props.data.ownerType
+            },
+            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,
+                    orgDisplay: thisData.ownerType,
+                    switchValue: Boolean(!thisData.ownerId),
+                    radios:thisData.hot==='1'?true:false,
+                    tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
+                    technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                    coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
+                    maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],                  
+                });
+                if (thisData.ownerId) {
+                    this.getContactsList(thisData.ownerId);
+                };
+            }.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/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));
+    },
+    modifyBroker() {
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/modifyAchievementTechBroker',
+                    data: {
+                        id: this.props.data.id,
+                        techBrokerId: values.modifyTechBrokerId
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    } else {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                        
+                    };
+                }.bind(this));
+            }
+        });
+    },
+    formSubmit() {
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 3 && !values.techBrokerId) {
+                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.techBrokerId,
+                        auditStatus: values.auditStatus,
+                        releaseStatus:0
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.setState({
+                            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();
+            };
+        });
+    },
+    buildMatchList() {
+        this.setState({
+            buttonLoading: true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/achievement/matchDemand',
+            data: {
+                id: this.props.data.id,
+            }
+        }).done(function (data) {
+            this.setState({
+                buttonLoading: false
+            });
+            if (!data.error.length) {
+                message.success('匹配完成!匹配到' + data.data + '条记录');
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid
+            },
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                } else {
+                    this.setState({
+                        contactsObj: data.data || {}
+                    });
+                };
+            }.bind(this),
+        });
+    },
+    componentWillMount() {
+    	this.loadData(this.props.data.id, this.props.detailApiUrl,this.props.data.ownerType);
+    },
+    componentWillReceiveProps(nextProps) {
+    	console.log(nextProps)
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.data.id, nextProps.detailApiUrl,nextProps.data.ownerType);
+            this.state.textFileList = [];
+            this.state.techPlanFileList = [];
+            this.state.businessPlanFileList = [];
+            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>                       
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="精品成果" >
+                            {(() => {
+                                switch (theData.boutique) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="首页展示" >
+                            {(() => {
+                                switch (theData.hot) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div> 
+                    {this.state.radios==true ?<FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="首页展示图片:" >
+                        <div className="clearfix">
+                            <Upload className="demandDetailShow-upload"
+                                listType="picture-card"
+                                fileList={this.state.coverImg}                               
+                                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>:<div></div>}
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                            <span>未发布</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="发布时间" >
+                            <span>{theData.releaseDateFormattedDate}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="审核状态" >
+                            <span>{getTechAuditStatus(theData.auditStatus)}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否国际" >
+                            <span>{getboutique(theData.internationalFlag)}</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="备注" >
+                        <span>{theData.remark}</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="成熟度" >
+                            <span>{getMaturity(theData.maturity)}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="创新度" >
+                            <span>{getInnovation(theData.innovation)}</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>
+                    {this.state.switchValue ?
+                        <div className="clearfix" >
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="成果所有人名称" >
+                                <span>{theData.ownerName}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系电话" >
+                                <span>{theData.ownerMobile}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="证件号" >
+                                <span>{theData.ownerIdNumber}</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="成果所有人名称" >
+                                <span>{theData.iOwnerName}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系电话" >
+                                {theData.ownerType == "1" ? <span>{this.state.contactsObj[theData.contacts]}</span> : <span>{theData.iOwnerMobile}</span>}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="证件号" >
+                                <span>{theData.iOwnerIdNumber}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="电子邮箱" >
+                                <span>{theData.iOwnerEmail}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="通讯地址" >
+                                <span>{theData.iOwnerPostalAddress}</span>
+                            </FormItem>
+                        </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="转让方式" >
+                            <span>{getTransferMode(theData.transferMode)}</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>
+                        {theData.bargainingMode == 0 ? <div></div> : <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>
+                    <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('techBrokerId', {
+                                initialValue: theData.techBrokerId
+                            })(
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择技术经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
+                                    {this.props.techBrodersOption}
+                                </Select>
+                                )}
+                        </FormItem>
+                    </div>
+                    {window.showAuditStatus && theData.auditStatus == 3 ? <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="指派新经纪人" >
+                            {getFieldDecorator('modifyTechBrokerId', {
+                                initialValue: theData.techBrokerId
+                            })(
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择要指派的新经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
+                                    {this.props.techBrodersOption}
+                                </Select>
+                                )}
+                        </FormItem>
+                    </div> : <div></div>}
+                    <FormItem wrapperCol={{ span: 12, offset: 4 }}>
+                        <Button className="set-submit" type="primary" htmlType="submit">提交审核</Button>
+                        <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
+                        {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList} style={{"display":"none"}}>生成匹配列表</Button> : <span></span>}
+                    </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 AchievementDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            tabsKey: 1,
+            loading: false,
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '数据类型',
+                    dataIndex: 'dataCategory',
+                    key: 'dataCategory',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>成果</span>;
+                            case "1":
+                                return <span>技术</span>;
+                            case "2":
+                                return <span>项目</span>;
+                        }
+                    }
+                }, {
+                    title: '名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '类型',
+                    dataIndex: 'demandType',
+                    key: 'demandType',
+                    render: text => { return getDemandType(text); }
+                }, {
+                    title: '所有人名称',
+                    dataIndex: 'theName',
+                    key: 'theName',
+                }, {
+                    title: '发布时间',
+                    dataIndex: 'releaseDateFormattedDate',
+                    key: 'releaseDateFormattedDate',
+                }, {
+                    title: '有效期限',
+                    dataIndex: 'validityPeriodFormattedDate',
+                    key: 'validityPeriodFormattedDate',
+                },
+            ],
+            dataSource: [],
+        };
+    },
+    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 key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    techBrodersOption: theArr,
+                    techBrodersObj: data.data
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getTableList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/achievement/achievementDemand",
+            data: { id: this.props.data.id },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else if (data.data.length) {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            demandType: thisdata.demandType,
+                            theName: thisdata.username || thisdata.unitName,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
+                            coverImg: thisdata.coverImg,
+                            hot: thisdata.hot,
+                            internationalFlag:thisdata.internationalFlag,
+                        });
+                    };
+                };
+                this.setState({
+                    dataSource: theArr,
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    tableRowClick(record, index) {
+        window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    componentWillMount() {
+        this.getTechBrodersList();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.state.visible && nextProps.showDesc) {
+            this.state.tabsKey = "1";
+        };
+        this.state.visible = nextProps.showDesc;
+    },
+    render() {
+        if (this.props.data) {
+            return (
+                <div className="patent-desc">
+                    <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='1000px'
+                        footer=''
+                        className="admin-desc-content">
+                        <Spin spinning={this.state.loading}>
+                            <Tabs activeKey={this.state.tabsKey}
+                                onChange={(e) => {
+                                    this.setState({ tabsKey: e });
+                                    if (e == "2") {
+                                        this.getTableList();
+                                    };
+                                }} >
+                                <Tabs.TabPane tab="成果详情" key="1">
+                                    <AchievementDetailShow
+                                        data={this.props.data}
+                                        detailApiUrl={this.props.detailApiUrl}
+                                        techBrodersOption={this.state.techBrodersOption}
+                                        techBrodersObj={this.state.techBrodersObj}
+                                        closeDesc={this.handleCancel}
+                                        visible={this.state.visible}
+                                        handleOk={this.handleOk} />
+                                </Tabs.TabPane>
+                                <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
+                                    <Table columns={this.state.columns}
+                                        dataSource={this.state.dataSource}
+                                        pagination={false}
+                                        onRowClick={this.tableRowClick} />
+                                </Tabs.TabPane>
+                            </Tabs>
+                        </Spin>
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+export default AchievementDetail;

+ 448 - 0
js/component/manageCenter/achievement/techAchievementAudit/techAchievementAudit.jsx

@@ -0,0 +1,448 @@
+import React from 'react';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../techAchievement.less';
+import TechAchievementDesc from './auditDesc.jsx';
+import { achievementCategoryList, techAuditStatusList } from '../../../dataDic.js';
+import { beforeUploadFile, companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus ,getboutique,gethot} from '../../../tools.js';
+
+const AchievementList = React.createClass({
+    loadData(pageNo, apiUrl) {
+        this.state.data = [];
+      if(this.state.serialNumber&&isNaN(this.state.serialNumber)){
+     	message.warning('请输入正确的编号格式');
+      	return false;
+      }
+         this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/achievement/orgList',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                auditStatus:2,
+                serialNumber: this.state.serialNumber, //编号
+                name: this.state.name, //名称
+//              ownerName: this.state.searchType == 1 ? this.state.searchName : undefined,
+//              username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
+//              unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
+                keyword: this.state.keyword, // 关键词
+                category: this.state.category, //类型(0--专利, 2--软著, 3--项目, 4--版权, 5--工业设计, 6--配方, 7--非标)
+                releaseDateStartDate: this.state.releaseDate[0],
+                releaseDateEndDate: this.state.releaseDate[1],
+                releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined, //是否发布(0--未发布,1--已发布)
+                boutique:this.state.boutique,
+                hot:this.state.hot,
+                createDateStartDate: this.state.releaseDateS[0],
+                createDateEndDate: this.state.releaseDateS[1],
+                ownerType:this.state.ownerType,
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            theName: thisdata.username || thisdata.ownerName,
+                            category: thisdata.category,
+                            ownerName: thisdata.username ? thisdata.username : thisdata.ownerName,
+                            ownerType: thisdata.ownerType,
+                            ownerMobile: thisdata.ownerMobile,
+                            status: thisdata.status,
+                            releaseDate: thisdata.releaseDate,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique,
+                            hot: thisdata.hot,
+                            techBrokerId:thisdata.techBrokerId,
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                            remark:thisdata.remark,
+                            techBrokerIdd:thisdata.techBrokerIdd
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            searchType: 0,
+            validityPeriodDate: [],
+            releaseDate: [],
+            releaseDateS: [],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '类型',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render: text => { return getAchievementCategory(text); }
+                }, {
+                    title: '录入人',
+                    dataIndex: 'techBrokerId',
+                    key: 'techBrokerId',
+                },{
+                    title: '审核状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => { return getTechAuditStatus(text) }
+                }, 
+                {
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                  {  title: '录入时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
+                },
+                
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    componentWillMount() {
+        let theArr = [];
+        achievementCategoryList.map(function (item) {
+            theArr.push(
+                <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') {
+                    this.tableRowClick(theObj);
+                };
+            };
+        };
+        this.loadData();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
+            this.state.selectedRowKeys = [];
+            this.state.selectedRows = [];
+            this.state.serialNumber = undefined;
+            this.state.name = undefined;
+            this.state.keyword = undefined;
+            this.state.category = undefined;
+            this.state.ownerType = undefined;
+            this.state.releaseStatus = undefined;
+            this.state.auditStatus = undefined;
+            this.state.searchName = undefined;
+            this.state.searchType = 0;
+            this.state.releaseDate = [];
+            this.state.releaseDateS = [];
+            this.loadData(null, nextProps['data-listApiUrl']);
+        };
+    },
+    tableRowClick(record, index) {
+        if(index!=undefined){
+        	this.setState({
+        		RowData:record,
+            	showDesc: true
+        	});
+        }
+    },
+    delectRow() {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/achievement/delete",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    //审核不通过
+    examineCancel(){
+    	let nub=4;
+    	this.examine(nub)
+    },
+    examineOK(){
+    	let nub=3;
+    	this.examine(nub)
+    },
+    examine(nub) {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id,rowItem.techBrokerIdd)
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/audit/achievement',
+            data: {
+                id: deletedIds[0],
+                auditStatus:nub,
+                techBroderId:deletedIds[1],
+                releaseStatus:0
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    addClick() {
+        this.state.RowData = {};
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.serialNumber = undefined;
+        this.state.name = undefined;
+        this.state.keyword = undefined;
+        this.state.category = undefined;
+        this.state.ownerType = undefined;
+        this.state.releaseStatus = undefined;
+        this.state.auditStatus = undefined;
+        this.state.searchName = undefined;
+        this.state.releaseDate = [];
+        this.state.releaseDateS = [];
+        this.state.boutique = '';
+        this.state.hot='' ;
+        this.loadData();       
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>成果审核管理</span>
+                    <div className="patent-addNew clearfix">
+                        <Upload
+                            action={globalConfig.context + "/api/admin/achievement/uploadTemplate"}
+                            data={{ 'sign': 'achievement_template' }}
+                            beforeUpload={beforeUploadFile}
+                            showUploadList={false}
+                            onChange={(info) => {
+                                if (info.file.status !== 'uploading') {
+                                    
+                                }
+                                if (info.file.status === 'done') {
+                                    if (!info.file.response.error.length) {
+                                        message.success(`${info.file.name} 文件上传成功!`);
+                                    } else {
+                                        message.warning(info.file.response.error[0].message);
+                                        return;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button style={{"display":"none"}}>上传批量导入模板</Button>
+                        </Upload>
+                        <Button onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }} style={{"display":"none"}}>下载批量导入模板</Button>
+                        <Button type="primary" className="addButton" onClick={this.addClick} style={{"display":"none"}}>发布成果<Icon type="plus" /></Button>
+                        
+                    </div>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="编号"
+                        value={this.state.serialNumber}
+                        onChange={(e) => { this.setState({ serialNumber: e.target.value }); }} />
+                    <Input placeholder="名称"
+                        value={this.state.name}
+                        onChange={(e) => { this.setState({ name: e.target.value }); }} />
+                    <Input placeholder="关键字"
+                        value={this.state.keyword}
+                        onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
+                    <Radio.Group value={this.state.searchType} onChange={(e) => {
+                        this.setState({ searchType: e.target.value })
+                    }}>
+                        <Radio value={0}>认证用户</Radio>
+                        <Radio value={1}>非认证用户</Radio>
+                    </Radio.Group>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <Button type='primary' onClick={this.examineOK} disabled={!hasSelected}>审核通过</Button>
+                    <Button type='primary' onClick={this.examineCancel} disabled={!hasSelected}>审核不通过</Button>
+                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        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' } : {}}>
+                    	<Radio.Group value={this.state.boutique} onChange={(e) => {
+		                    this.setState({ boutique: e.target.value })
+		                    }}>
+		                        <Radio value={1}>精品</Radio>
+		                        <Radio value={0}>非精品</Radio>
+		                </Radio.Group>
+		                <Radio.Group value={this.state.hot} onChange={(e) => {
+		                    this.setState({ hot: e.target.value })
+		                    }}>
+		                        <Radio value={1}>首页展示</Radio>
+		                        <Radio value={0}>首页不展示</Radio>
+		                </Radio.Group>
+                        <Select placeholder="选择类型" style={{ width: 160 }}
+                            value={this.state.category}
+                            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>
+                        <div style={{marginTop:'10px'}}>
+                        <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 }); }} />
+                         <span style={{marginLeft:'5px'}}>录入时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDateS[0] ? moment(this.state.releaseDateS[0]) : null,
+                            this.state.releaseDateS[1] ? moment(this.state.releaseDateS[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDateS: dataString }); }} />
+                    	</div>
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <TechAchievementDesc
+                    data={this.state.RowData}
+                    detailApiUrl={this.props['data-detailApiUrl']}
+                    achievementCategoryOption={this.state.achievementCategoryOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default AchievementList;

+ 964 - 0
js/component/manageCenter/achievement/techAchievementRelease/auditDesc.jsx

@@ -0,0 +1,964 @@
+import React from 'react';
+import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, Upload, Input, InputNumber, Select, Button, Radio, Form, Cascader, Tag, Switch } from 'antd';
+import '../techAchievement.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { maturityList, innovationList, transferModeList } from '../../../dataDic';
+import { IndustryObject, getIndustryCategory } from '../../../DicIndustryList.js';
+import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation,beforeUpload, getBase64,getboutique } from '../../../tools.js';
+import throttle from '../../../throttle.js';
+
+const KeyWordTagGroup = React.createClass({
+    getInitialState() {
+        return {
+            tags: [],
+            inputVisible: false,
+            inputValue: ''
+        };
+    },
+    handleClose(removedTag) {
+        const tags = this.state.tags.filter(tag => tag !== removedTag);
+        this.props.tagsArr(tags);
+        this.setState({ tags });
+    },
+    showInput() {
+        this.setState({ inputVisible: true }, () => this.input.focus());
+    },
+    handleInputChange(e) {
+        this.setState({ inputValue: e.target.value });
+    },
+    handleInputConfirm() {
+        const state = this.state;
+        const inputValue = state.inputValue;
+        let tags = state.tags;
+        if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
+            tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
+        };
+        this.props.tagsArr(tags);
+        this.setState({
+            tags,
+            inputVisible: false,
+            inputValue: '',
+        });
+    },
+    componentWillMount() {
+        this.state.tags = this.props.keyWordArr;
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.keyWordArr != nextProps.keyWordArr) {
+            this.state.tags = nextProps.keyWordArr;
+        };
+    },
+    render() {
+        const { tags, inputVisible, inputValue } = this.state;
+        return (
+            <div className="keyWord-tips">
+                {tags.map((tag, index) => {
+                    const isLongTag = tag.length > 10;
+                    const tagElem = (
+                        <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
+                            {isLongTag ? `${tag.slice(0, 10)}...` : tag}
+                        </Tag>
+                    );
+                    return isLongTag ? <Tooltip key={tag} title={tag}>{tagElem}</Tooltip> : tagElem;
+                })}
+                {inputVisible && (
+                    <Input
+                        ref={input => this.input = input}
+                        type="text"
+                        style={{ width: 78 }}
+                        value={inputValue}
+                        onChange={this.handleInputChange}
+                        onBlur={this.handleInputConfirm}
+                        onPressEnter={this.handleInputConfirm}
+                    />
+                )}
+                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
+            </div>
+        );
+    }
+});
+
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: [],
+        }
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl;
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
+                    data={{ 'sign': this.props.pictureSign }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 5 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const AchievementDetailShow = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            loading: false,
+            buttonLoading: false,
+            contactsObj: {},
+            data: {},
+            tags: [],
+            technicalPictureUrl: [],
+            coverImg: [],
+            maturityPictureUrl: [],           
+            textFileList: [],
+            techPlanFileList: [],
+            businessPlanFileList: []
+        };
+    },
+    loadData(id, detailApiUrl,ownerType) {
+        this.setState({
+            loading: true
+        });
+      
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + detailApiUrl,
+            data: {
+                id: id,
+                ownerType:ownerType?ownerType:this.props.data.ownerType
+            },
+            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,
+                    orgDisplay: thisData.ownerType,
+                    switchValue: Boolean(!thisData.ownerId),
+                    radios:thisData.hot==='1'?true:false,
+                    tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
+                    technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                    coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
+                    maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],                  
+                });
+                if (thisData.ownerId) {
+                    this.getContactsList(thisData.ownerId);
+                };
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    ShelfCancel(){
+    	let api=0;
+    	this.offShelf(api);
+    },
+    ShelfOk(){
+    	let api=1;
+    	this.offShelf(api);
+    },
+    offShelf(nub) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/achievement/offShelf",
+            data: { 
+            	"id": this.props.data.id,
+            	releaseStatus:nub,
+            	auditStatus:3,
+            }
+        }).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));
+    },
+    modifyBroker() {
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/modifyAchievementTechBroker',
+                    data: {
+                        id: this.props.data.id,
+                        techBrokerId: values.modifyTechBrokerId
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    } else {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                        
+                    };
+                }.bind(this));
+            }
+        });
+    },
+    formSubmit() {
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 3 && !values.techBrokerId) {
+                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.techBrokerId,
+                        auditStatus: values.auditStatus
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.setState({
+                            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();
+            };
+        });
+    },
+    buildMatchList() {
+        this.setState({
+            buttonLoading: true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/achievement/matchDemand',
+            data: {
+                id: this.props.data.id,
+            }
+        }).done(function (data) {
+            this.setState({
+                buttonLoading: false
+            });
+            if (!data.error.length) {
+                message.success('匹配完成!匹配到' + data.data + '条记录');
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid
+            },
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                } else {
+                    this.setState({
+                        contactsObj: data.data || {}
+                    });
+                };
+            }.bind(this),
+        });
+    },
+    componentWillMount() {
+    	this.loadData(this.props.data.id, this.props.detailApiUrl,this.props.data.ownerType);
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.data.id, nextProps.detailApiUrl,nextProps.data.ownerType);
+            this.state.textFileList = [];
+            this.state.techPlanFileList = [];
+            this.state.businessPlanFileList = [];
+            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>                       
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="精品成果" >
+                            {(() => {
+                                switch (theData.boutique) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="首页展示" >
+                            {(() => {
+                                switch (theData.hot) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div> 
+                    {this.state.radios==true ?<FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
+                        label="首页展示图片:" >
+                        <div className="clearfix">
+                            <Upload className="demandDetailShow-upload"
+                                listType="picture-card"
+                                fileList={this.state.coverImg}                               
+                                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>:<div></div>}
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                            {(() => {
+                                switch (theData.releaseStatus) {
+                                    case "0":
+                                        return <div><span>未发布</span>
+                                        <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>发布</Button>
+                                            <Modal maskClosable={false} title="确认"
+                                                visible={this.state.releaseSubmitVisible}
+                                                width='400px'
+                                                footer={null}
+                                                onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
+                                                <span>确认要发布吗?</span>
+                                                <Button className="modal-submit" type="primary" onClick={this.ShelfOk} >确认</Button>
+                                                <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
+                                        </Modal></div>
+                                        ;
+                                    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='400px'
+                                                footer={null}
+                                                onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
+                                                <span>确认要撤销发布吗?</span>
+                                                <Button className="modal-submit" type="primary" onClick={this.ShelfCancel} >确认</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="审核状态" >
+                            <span>{getTechAuditStatus(theData.auditStatus)}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否国际" >
+                            <span>{getboutique(theData.internationalFlag)}</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="备注" >
+                        <span>{theData.remark}</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="成熟度" >
+                            <span>{getMaturity(theData.maturity)}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="创新度" >
+                            <span>{getInnovation(theData.innovation)}</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>
+                    {this.state.switchValue ?
+                        <div className="clearfix" >
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="成果所有人名称" >
+                                <span>{theData.ownerName}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系电话" >
+                                <span>{theData.ownerMobile}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="证件号" >
+                                <span>{theData.ownerIdNumber}</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="成果所有人名称" >
+                                <span>{theData.iOwnerName}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系电话" >
+                                {theData.ownerType == "1" ? <span>{this.state.contactsObj[theData.contacts]}</span> : <span>{theData.iOwnerMobile}</span>}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="证件号" >
+                                <span>{theData.iOwnerIdNumber}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="电子邮箱" >
+                                <span>{theData.iOwnerEmail}</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="通讯地址" >
+                                <span>{theData.iOwnerPostalAddress}</span>
+                            </FormItem>
+                        </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="转让方式" >
+                            <span>{getTransferMode(theData.transferMode)}</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>
+                        {theData.bargainingMode == 0 ? <div></div> : <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>
+                    <FormItem wrapperCol={{ span: 12, offset: 4 }}>
+                        {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList} style={{"display":"none"}}>生成匹配列表</Button> : <span></span>}
+                    </FormItem>
+                </Spin>
+            </Form >
+        )
+    }
+}));
+
+const AchievementDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            tabsKey: 1,
+            loading: false,
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '数据类型',
+                    dataIndex: 'dataCategory',
+                    key: 'dataCategory',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>成果</span>;
+                            case "1":
+                                return <span>技术</span>;
+                            case "2":
+                                return <span>项目</span>;
+                        }
+                    }
+                }, {
+                    title: '名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '类型',
+                    dataIndex: 'demandType',
+                    key: 'demandType',
+                    render: text => { return getDemandType(text); }
+                }, {
+                    title: '所有人名称',
+                    dataIndex: 'theName',
+                    key: 'theName',
+                }, {
+                    title: '发布时间',
+                    dataIndex: 'releaseDateFormattedDate',
+                    key: 'releaseDateFormattedDate',
+                }, {
+                    title: '有效期限',
+                    dataIndex: 'validityPeriodFormattedDate',
+                    key: 'validityPeriodFormattedDate',
+                },
+            ],
+            dataSource: [],
+        };
+    },
+    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 key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    techBrodersOption: theArr,
+                    techBrodersObj: data.data
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getTableList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/achievement/achievementDemand",
+            data: { id: this.props.data.id },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else if (data.data.length) {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            demandType: thisdata.demandType,
+                            theName: thisdata.username || thisdata.unitName,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
+                            coverImg: thisdata.coverImg,
+                            hot: thisdata.hot,
+                            internationalFlag:thisdata.internationalFlag,
+                        });
+                    };
+                };
+                this.setState({
+                    dataSource: theArr,
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    tableRowClick(record, index) {
+        window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    componentWillMount() {
+        this.getTechBrodersList();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.state.visible && nextProps.showDesc) {
+            this.state.tabsKey = "1";
+        };
+        this.state.visible = nextProps.showDesc;
+    },
+    render() {
+        if (this.props.data) {
+            return (
+                <div className="patent-desc">
+                    <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='1000px'
+                        footer=''
+                        className="admin-desc-content">
+                        <Spin spinning={this.state.loading}>
+                            <Tabs activeKey={this.state.tabsKey}
+                                onChange={(e) => {
+                                    this.setState({ tabsKey: e });
+                                    if (e == "2") {
+                                        this.getTableList();
+                                    };
+                                }} >
+                                <Tabs.TabPane tab="成果详情" key="1">
+                                    <AchievementDetailShow
+                                        data={this.props.data}
+                                        detailApiUrl={this.props.detailApiUrl}
+                                        techBrodersOption={this.state.techBrodersOption}
+                                        techBrodersObj={this.state.techBrodersObj}
+                                        closeDesc={this.handleCancel}
+                                        visible={this.state.visible}
+                                        handleOk={this.handleOk} />
+                                </Tabs.TabPane>
+                                <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
+                                    <Table columns={this.state.columns}
+                                        dataSource={this.state.dataSource}
+                                        pagination={false}
+                                        onRowClick={this.tableRowClick} />
+                                </Tabs.TabPane>
+                            </Tabs>
+                        </Spin>
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+export default AchievementDetail;

+ 461 - 0
js/component/manageCenter/achievement/techAchievementRelease/techAchievementAudit.jsx

@@ -0,0 +1,461 @@
+import React from 'react';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload ,Popconfirm} from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../techAchievement.less';
+import TechAchievementDesc from './auditDesc.jsx';
+import { achievementCategoryList, techAuditStatusList } from '../../../dataDic.js';
+import { beforeUploadFile, companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus ,getboutique,gethot} from '../../../tools.js';
+
+const AchievementList = React.createClass({
+    loadData(pageNo, apiUrl) {
+        this.state.data = [];
+      if(this.state.serialNumber&&isNaN(this.state.serialNumber)){
+     	message.warning('请输入正确的编号格式');
+      	return false;
+      }
+         this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/achievement/orgList',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                serialNumber: this.state.serialNumber, //编号
+                name: this.state.name,
+                auditStatus:3,//名称
+//              ownerName: this.state.searchType == 1 ? this.state.searchName : undefined,
+//              username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
+//              unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
+                keyword: this.state.keyword, // 关键词
+                category: this.state.category, //类型(0--专利, 2--软著, 3--项目, 4--版权, 5--工业设计, 6--配方, 7--非标)
+                releaseDateStartDate: this.state.releaseDate[0],
+                releaseDateEndDate: this.state.releaseDate[1],
+                releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined, //是否发布(0--未发布,1--已发布)
+                boutique:this.state.boutique,
+                hot:this.state.hot,
+                createDateStartDate: this.state.releaseDateS[0],
+                createDateEndDate: this.state.releaseDateS[1],
+                ownerType:this.state.ownerType,
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            theName: thisdata.username || thisdata.ownerName,
+                            category: thisdata.category,
+                            ownerName: thisdata.username ? thisdata.username : thisdata.ownerName,
+                            ownerType: thisdata.ownerType,
+                            ownerMobile: thisdata.ownerMobile,
+                            status: thisdata.status,
+                            releaseDate: thisdata.releaseDate,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique,
+                            hot: thisdata.hot,
+                            techBrokerId:thisdata.techBrokerId,
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                            remark:thisdata.remark
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            searchType: 0,
+            validityPeriodDate: [],
+            releaseDate: [],
+            releaseDateS: [],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '类型',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render: text => { return getAchievementCategory(text); }
+                }, {
+                    title: '录入人',
+                    dataIndex: 'techBrokerId',
+                    key: 'techBrokerId',
+                },{
+                    title: '审核状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => { return getTechAuditStatus(text) }
+                },{
+                    title: '发布状态',
+                    dataIndex: 'releaseStatus',
+                    key: 'releaseStatus',
+                    render: text => { return (text)?'已发布':'未发布' }
+                },
+                {
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                 {
+                    title: '首页展示',
+                    dataIndex: 'hot',
+                    key: 'hot',
+                    render: text => { return gethot(text) }
+                },
+                {
+                    title: '发布时间',
+                    dataIndex: 'releaseDateFormattedDate',
+                    key: 'releaseDateFormattedDate',
+                },{
+                    title: '录入时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
+                }, {
+                    title: '发布操作',
+                    dataIndex: 'ee',
+                    key: 'ee',
+                    render: (text, record, index) => {
+						return <div>
+							{!record.releaseStatus?<Popconfirm title={'请确认发布成果【'+record.name+'】'} onConfirm={(e)=>{this.examineOK(record)}} okText="确认" cancelText="取消">
+							    <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="primary">发布</Button>                 
+							</Popconfirm>:
+							<Popconfirm title={'请确认撤销发布成果【'+record.name+'】'} onConfirm={(e)=>{this.examineCancel(record)}} okText="确认" cancelText="取消">
+							    <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">撤销发布</Button>                 
+							</Popconfirm>}
+                        </div>
+					}
+                },
+                
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    componentWillMount() {
+        let theArr = [];
+        achievementCategoryList.map(function (item) {
+            theArr.push(
+                <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') {
+                    this.tableRowClick(theObj);
+                };
+            };
+        };
+        this.loadData();
+    },
+    tableRowClick(record, index) {
+        if(index!=undefined){
+        	this.setState({
+            	showDesc: true
+        	});
+        	this.state.RowData=record;
+        }
+    },
+     //撤销发布
+    examineCancel(record){
+    	let api=0;
+    	this.examine(api,record);
+    },
+    //发布
+    examineOK(record){
+    	let api=1;
+    	this.examine(api,record);
+    },
+    examine(api,record) {
+        this.setState({
+            selectedRowKeys: [],
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/achievement/offShelf',
+            data: {
+                id:record.id,
+                releaseStatus:api,
+                auditStatus:3
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    delectRow() {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/achievement/delete",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    addClick() {
+        this.state.RowData = {};
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.serialNumber = undefined;
+        this.state.name = undefined;
+        this.state.keyword = undefined;
+        this.state.category = undefined;
+        this.state.ownerType = undefined;
+        this.state.releaseStatus = undefined;
+        this.state.auditStatus = undefined;
+        this.state.searchName = undefined;
+        this.state.releaseDate = [];
+        this.state.releaseDateS = [];
+        this.state.boutique = '';
+        this.state.hot='' ;
+        this.loadData();       
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                   <span>成果发布管理</span>
+                    <div className="patent-addNew clearfix">
+                        <Upload
+                            action={globalConfig.context + "/api/admin/achievement/uploadTemplate"}
+                            data={{ 'sign': 'achievement_template' }}
+                            beforeUpload={beforeUploadFile}
+                            showUploadList={false}
+                            onChange={(info) => {
+                                if (info.file.status !== 'uploading') {
+                                    
+                                }
+                                if (info.file.status === 'done') {
+                                    if (!info.file.response.error.length) {
+                                        message.success(`${info.file.name} 文件上传成功!`);
+                                    } else {
+                                        message.warning(info.file.response.error[0].message);
+                                        return;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button style={{"display":"none"}}>上传批量导入模板</Button>
+                        </Upload>
+                        <Button onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/downloadTemplate?sign=achievement_template') }} style={{"display":"none"}}>下载批量导入模板</Button>
+                        <Button type="primary" className="addButton" onClick={this.addClick} style={{"display":"none"}}>发布成果<Icon type="plus" /></Button>
+                        
+                    </div>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="编号"
+                        value={this.state.serialNumber}
+                        onChange={(e) => { this.setState({ serialNumber: e.target.value }); }} />
+                    <Input placeholder="名称"
+                        value={this.state.name}
+                        onChange={(e) => { this.setState({ name: e.target.value }); }} />
+                    <Input placeholder="关键字"
+                        value={this.state.keyword}
+                        onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
+                    <Radio.Group value={this.state.searchType} onChange={(e) => {
+                        this.setState({ searchType: e.target.value })
+                    }}>
+                        <Radio value={0}>认证用户</Radio>
+                        <Radio value={1}>非认证用户</Radio>
+                    </Radio.Group>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        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' } : {}}>
+                    	<Radio.Group value={this.state.boutique} onChange={(e) => {
+		                    this.setState({ boutique: e.target.value })
+		                    }}>
+		                        <Radio value={1}>精品</Radio>
+		                        <Radio value={0}>非精品</Radio>
+		                </Radio.Group>
+		                <Radio.Group value={this.state.hot} onChange={(e) => {
+		                    this.setState({ hot: e.target.value })
+		                    }}>
+		                        <Radio value={1}>首页展示</Radio>
+		                        <Radio value={0}>首页不展示</Radio>
+		                </Radio.Group>
+                        <Select placeholder="选择类型" style={{ width: 160 }}
+                            value={this.state.category}
+                            onChange={(e) => { this.setState({ category: e }) }}>
+                            {this.state.achievementCategoryOption}
+                        </Select>
+                        <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}
+                            onChange={(e) => { this.setState({ releaseStatus: e }) }}>
+                            <Select.Option value="0" >未发布</Select.Option>
+                            <Select.Option value="1" >已发布</Select.Option>
+                        </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>
+                        <div style={{marginTop:'10px'}}>
+                        <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 }); }} />
+                         <span style={{marginLeft:'5px'}}>录入时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDateS[0] ? moment(this.state.releaseDateS[0]) : null,
+                            this.state.releaseDateS[1] ? moment(this.state.releaseDateS[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDateS: dataString }); }} />
+                    	</div>
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <TechAchievementDesc
+                    data={this.state.RowData}
+                    detailApiUrl={this.props['data-detailApiUrl']}
+                    achievementCategoryOption={this.state.achievementCategoryOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default AchievementList;

+ 22 - 0
js/component/manageCenter/demand/content.jsx

@@ -91,6 +91,28 @@ class Content extends Component {
                     });
                 });
                 break;
+            //需求审核  
+            case 'techDemandAudit':
+                require.ensure([], () => {
+                    const TechDemandPublish = require('./demandAudit/techDemandAudit.jsx').default;
+                    this.setState({
+                        component: TechDemandPublish,
+                        listApiUrl: '/api/admin/portal/order/userDemandOrderList',
+                        detailApiUrl: '/api/admin/demand/userDemandDetail'
+                    });
+                });
+                break;
+            //需求发布  
+            case 'techDemandPublish':
+                require.ensure([], () => {
+                    const TechDemandPublish = require('./demandRelease/techDemandRelease.jsx').default;
+                    this.setState({
+                        component: TechDemandPublish,
+                        listApiUrl: '/api/admin/portal/order/userDemandOrderList',
+                        detailApiUrl: '/api/admin/demand/userDemandDetail'
+                    });
+                });
+                break;    
             default:
             require.ensure([], () => {
                 const Module = require('../module').default;

+ 904 - 0
js/component/manageCenter/demand/demandAudit/demandAuditDesc.jsx

@@ -0,0 +1,904 @@
+import React from 'react';
+import { AutoComplete, Switch, Tabs, Table, Icon, Tooltip, Modal, Popover, message, Spin, Upload, Input, InputNumber, Select, DatePicker, Button, Radio, Form, Cascader, Tag } from 'antd';
+import moment from 'moment';
+import '../techDemand.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { IndustryObject, getIndustryCategory } from '../../../DicIndustryList.js';
+import { getTechField } from '../../../DicTechFieldList.js';
+import { beforeUploadFile, getTechAuditStatus, splitUrl, companySearch, getDemandType, getAchievementCategory,beforeUpload, getBase64 } from '../../../tools.js';
+import throttle from '../../../throttle.js';
+
+const KeyWordTagGroup = React.createClass({
+    getInitialState() {
+        return {
+            tags: [],
+            inputVisible: false,
+            inputValue: ''
+        };
+    },
+    handleClose(removedTag) {
+        const tags = this.state.tags.filter(tag => tag !== removedTag);
+        this.props.tagsArr(tags);
+        this.setState({ tags });
+    },
+    showInput() {
+        this.setState({ inputVisible: true }, () => this.input.focus());
+    },
+    handleInputChange(e) {
+        this.setState({ inputValue: e.target.value });
+    },
+    handleInputConfirm() {
+        const state = this.state;
+        const inputValue = state.inputValue;
+        let tags = state.tags;
+        if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
+            tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
+        }
+        this.props.tagsArr(tags);
+        this.setState({
+            tags,
+            inputVisible: false,
+            inputValue: '',
+        });
+    },
+    componentWillMount() {
+        this.state.tags = this.props.keyWordArr;
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.keyWordArr != nextProps.keyWordArr) {
+            this.state.tags = nextProps.keyWordArr;
+        };
+    },
+    render() {
+        const { tags, inputVisible, inputValue } = this.state;
+        return (
+            <div className="keyWord-tips">
+                {tags.map((tag, index) => {
+                    const isLongTag = tag.length > 10;
+                    const tagElem = (
+                        <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
+                            {isLongTag ? `${tag.slice(0, 10)}...` : tag}
+                        </Tag>
+                    );
+                    return isLongTag ? <Tooltip title={tag}>{tagElem}</Tooltip> : tagElem;
+                })}
+                {inputVisible && (
+                    <Input
+                        ref={input => this.input = input}
+                        type="text"
+                        style={{ width: 78 }}
+                        value={inputValue}
+                        onChange={this.handleInputChange}
+                        onBlur={this.handleInputConfirm}
+                        onPressEnter={this.handleInputConfirm}
+                    />
+                )}
+                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
+            </div>
+        );
+    }
+});
+
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: [],
+        }
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl;
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/admin/demand/uploadPicture"}                                      
+                    data={{ 'sign': this.props.pictureSign, 'uid': this.props.uid}}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 5 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const DemandDetailShow = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            contactsObj: {},
+            salesmanObj: {},
+            data: {},
+            tags: [],
+            pictureUrl: [],
+            coverImg: []           
+        };
+    },
+    loadData(id, detailApiUrl,dataCategory) {
+    	console.log(dataCategory);
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + detailApiUrl,
+            data: {
+                id: id,
+                dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
+            },
+            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,
+                    switchValue: Boolean(!thisData.employerId),
+                    radios: thisData.hot == '1' ? true : false,
+                    tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
+                    pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                    coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : []
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid
+            },
+            success: function (data) {
+                let theOption = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    this.setState({
+                        contactsObj: data.data
+                    });
+                };
+            }.bind(this),
+        });
+    },
+    offShelf() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/offShelf",
+            data: { "id": this.props.data.id }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('撤销成功!');
+                this.props.handleOk();
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading: false,
+                releaseSubmitVisible: false
+            });
+        }.bind(this));
+    },
+    modifyBroker() {
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/modifyDemandTechBroker',
+                    data: {
+                        id: this.props.data.id,
+                        techBrokerId: values.modifyTechBrokerId
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    } else {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                    };
+                }.bind(this));
+            }
+        });
+    },
+    formSubmit() {
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 3 && !values.techBrokerId) {
+                message.warning('必须选择一个技术经纪人!');
+                return
+            };
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/demand',
+                    data: {
+                        id: this.props.data.id,
+                        techBroderId: values.techBrokerId,
+                        auditStatus: values.auditStatus,
+                        releaseStatus:0
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    if (!data.error.length) {
+                        message.success('操作成功!');
+                        this.setState({ formSubmitVisible: false });
+                        this.props.handleOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                        this.setState({
+                            loading: false,
+                        });
+                    }
+                }.bind(this));
+            }
+        });
+    },
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 4) {
+                this.setState({
+                    formSubmitVisible: true
+                });
+            } else {
+                this.formSubmit();
+            };
+        });
+    },
+    buildMatchList() {
+        this.setState({
+            buttonLoading: true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/demand/matchAchievement',
+            data: {
+                id: this.props.data.id,
+            }
+        }).done(function (data) {
+            this.setState({
+                buttonLoading: false
+            });
+            if (!data.error.length) {
+                message.success('匹配完成!匹配到' + data.data + '条记录');
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    componentWillMount() {
+        this.loadData(this.props.data.id, this.props.detailApiUrl);
+        if (this.props.data.employerId && this.props.data.dataCategory) {
+            this.getContactsList(this.props.data.employerId);
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.data.id, nextProps.detailApiUrl,nextProps.data.dataCategory);
+            if (nextProps.data.employerId && nextProps.data.dataCategory) {
+                this.getContactsList(nextProps.data.employerId);
+            };
+            this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+        };
+        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>                       
+                    </div>
+                    <div>
+                    <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="精品需求" >
+                            {(() => {
+                                switch (theData.boutique) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                         <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="首页展示" >
+                            {(() => {
+                                switch (theData.hot) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>                        
+                     </div>                    
+                     {this.state.radios==true ? <div>
+                    	<FormItem
+	                        labelCol={{ span: 3 }}
+	                        wrapperCol={{ span: 18 }}
+	                        label="首页展示图片:" >
+	                        <div className="clearfix">
+	                            <Upload className="demandDetailShow-upload"
+	                                listType="picture-card"
+	                                fileList={this.state.coverImg}
+	                                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>
+                    </div> :<div></div>}                
+                    {this.state.switchValue ? <div>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="雇主名称" >
+                            <span>{theData.employerName}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="联系电话" >
+                            <span>{theData.employerContactsMobile}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="电子邮箱" >
+                            <span>{theData.employerContactsMailbox}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="通讯地址" >
+                            <span>{theData.employerAddress}</span>
+                        </FormItem>
+                    </div> : <div className="clearfix">
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="雇主名称" >
+                                <span>{theData.username}</span>
+                            </FormItem>
+                            {this.props.data.dataCategory ? <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系人" >
+                                <span>{this.state.contactsObj[theData.contacts]}</span>
+                            </FormItem> : <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系人" >
+                                    <span>{theData.contactsName}</span>
+                                </FormItem>}
+                        </div>}
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="负责人" >
+                            <span>{this.props.techBrodersObj[theData.techBrokerId]}</span>
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                           <span>未发布</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="发布时间" >
+                            <span>{theData.releaseDateFormattedDate}</span>
+                        </FormItem>
+                    </div>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="加急天数" >
+                        <span>{theData.urgentDays}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="加急报酬" >
+                        <span>{theData.urgentMoney}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="需求状态" >
+                            {(() => {
+                                switch (theData.status) {
+                                    case "0":
+                                        return <span>未解决</span>;
+                                    case "1":
+                                        return <span>已解决</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 className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="信息来源" >
+                            {(() => {
+                                switch (theData.infoSources) {
+                                    case "0":
+                                        return <span>平台采集</span>;
+                                    case "1":
+                                        return <span>客户发布</span>;
+                                    case "2":
+                                        return <span>批量导入</span>;
+                                    case "3":
+                                        return <span>三方对接</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 20 }}
+                        label="关键词" >
+                        {this.state.tags.map((tag) => {
+                            return <Tooltip key={tag} title={tag}>
+                                <Tag key={tag}>{tag}</Tag>
+                            </Tooltip>;
+                        })}
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="行业类别" >
+                        <span>{getIndustryCategory(theData.industryCategoryA, theData.industryCategoryB)}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="需求类型" >
+                            <span>{getDemandType(theData.demandType)}</span>
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="问题说明" >
+                        <span>{theData.problemDes}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="备注" >
+                        <span>{theData.remark}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术指标要求" >
+                        <span>{theData.technicalRequirements}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="需求文件(图片)" >
+                        <div className="clearfix">
+                            <Upload className="demandDetailShow-upload"
+                                listType="picture-card"
+                                fileList={this.state.pictureUrl}
+                                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: 3 }}
+                        wrapperCol={{ span: 6 }}
+                        label="需求文件(文本)" >
+                        <div>{theData.textFileUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>需求文件(文本文件)</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</div>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="需求文件(视频地址)" >
+                        <span>{theData.videoUrl}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="固定周期" >
+                            <span>{theData.fixedCycle}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="固定人数" >
+                            <span>{theData.peopleNumber || 0} 人</span>
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="固定方案" >
+                        <span>{theData.fixedScheme}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="预算费用" >
+                            <span>{theData.budgetCost || 0} 万元</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="费用托管" >
+                            {(() => {
+                                switch (theData.costEscrow) {
+                                    case 0:
+                                        return <span>否</span>;
+                                    case 1:
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                       
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="有效期限" >
+                            <span>{theData.validityPeriodFormattedDate}</span>
+                        </FormItem>
+                    </div>
+                    <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('techBrokerId', {
+                                initialValue: theData.techBrokerId
+                            })(
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择技术经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
+                                    {this.props.techBrodersOption}
+                                </Select>
+                                )}
+                        </FormItem>
+                    </div>
+                    <FormItem wrapperCol={{ span: 12, offset: 3 }}>
+                        <Button className="set-submit" type="primary" htmlType="submit">提交审核</Button>
+                        <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
+                        {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList} style={{"display":"none"}}>生成匹配列表</Button> : <span></span>}
+                    </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 DemandDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            techBrodersObj: {},
+            tabsKey: "1",
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '类型',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render: text => { return getAchievementCategory(text); }
+                }, {
+                    title: '所有人名称',
+                    dataIndex: 'theName',
+                    key: 'theName',
+                }, {
+                    title: '所有人类型',
+                    dataIndex: 'ownerType',
+                    key: 'ownerType',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>个人</span>;
+                            case "1":
+                                return <span>组织</span>
+                        }
+                    }
+                }, {
+                    title: '发布时间',
+                    dataIndex: 'releaseDateFormattedDate',
+                    key: 'releaseDateFormattedDate',
+                }
+            ],
+            dataSource: [],
+        };
+    },
+    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 key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    techBrodersOption: theArr,
+                    techBrodersObj: data.data
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getTableList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/achievementDemand",
+            data: { id: this.props.data.id },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else if (data.data.length) {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            category: thisdata.category,
+                            ownerType: thisdata.ownerType,
+                            theName: thisdata.username || thisdata.unitName,
+                            releaseDate: thisdata.releaseDate,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate
+                        });
+                    };
+                };
+                this.setState({
+                    dataSource: theArr,
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    tableRowClick(record, index) {
+    	
+        window.open(globalConfig.context + '/portal/detail/achievementDetail.html?id=' + record.id + '&type=' + record.ownerType);
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    componentWillMount() {
+        this.getTechBrodersList();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.state.visible && nextProps.showDesc) {
+            this.state.tabsKey = "1";
+        };
+        this.state.visible = nextProps.showDesc;
+    },
+    render() {
+        if (this.props.data) {
+            return (
+                <div className="patent-desc">
+                    <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='1000px'
+                        footer=''
+                        className="admin-desc-content">
+                        <Spin spinning={this.state.loading}>
+                            <Tabs activeKey={this.state.tabsKey}
+                                onChange={(e) => {
+                                    this.setState({ tabsKey: e });
+                                    if (e == "2") {
+                                        this.getTableList();
+                                    };
+                                }} >
+                                <Tabs.TabPane tab="需求详情" key="1">
+                                    <DemandDetailShow
+                                        data={this.props.data}
+                                        detailApiUrl={this.props.detailApiUrl}
+                                        techBrodersOption={this.state.techBrodersOption}
+                                        techBrodersObj={this.state.techBrodersObj}
+                                        demandTypeOption={this.props.demandTypeOption}
+                                        closeDesc={this.handleCancel}
+                                        visible={this.state.visible}
+                                        handleOk={this.handleOk} />
+                                </Tabs.TabPane>
+                                <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
+                                    <Table columns={this.state.columns}
+                                        dataSource={this.state.dataSource}
+                                        pagination={false}
+                                        onRowClick={this.tableRowClick} />
+                                </Tabs.TabPane>
+                            </Tabs>
+                        </Spin>
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+export default DemandDetail;

+ 621 - 0
js/component/manageCenter/demand/demandAudit/techDemandAudit.jsx

@@ -0,0 +1,621 @@
+import React from 'react';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../techDemand.less';
+import TechDemandDesc from './demandAuditDesc.jsx';
+import { demandTypeList } from '../../../dataDic.js';
+import { companySearch, getDemandType, getSearchUrl, beforeUploadFile ,getboutique,gethot} from '../../../tools.js';
+
+const TechDemandPublish = React.createClass({
+    loadData(pageNo, apiUrl) {
+        this.state.data = [];
+        if(this.state.serialNumber&&isNaN(this.state.serialNumber)){
+        	message.warning('请输入正确的编号格式');
+        	return false;
+        }
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +'/api/admin/demand/orgList',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                serialNumber: this.state.serialNumber,
+                name: this.state.name,
+                auditStatus:2,
+                keyword: this.state.keyword,
+                infoSources: this.state.infoSources ? Number(this.state.infoSources) : undefined,
+                demandType: this.state.demandType ? Number(this.state.demandType) : undefined,
+                //username: this.state.username,
+                status: this.state.status ? Number(this.state.status) : undefined,
+                releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined,
+                validityPeriodStartDate: this.state.validityPeriodDate[0],
+                validityPeriodEndDate: this.state.validityPeriodDate[1],
+                releaseDateStartDate: this.state.releaseDate[0],
+                releaseDateEndDate: this.state.releaseDate[1],
+                createDateStartDate: this.state.releaseDateS[0],
+                createDateEndDate: this.state.releaseDateS[1],
+                boutique:this.state.boutique,
+                hot:this.state.hot,
+                dataCategory:this.state.dataCategory,
+                employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
+                username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
+                unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            infoSources: thisdata.infoSources,
+                            username: thisdata.username,
+                            theName: thisdata.username || thisdata.employerName,
+                            demandType: thisdata.demandType,
+                            validityPeriod: thisdata.validityPeriod,
+                            employerName: thisdata.employerName,
+                            employerId: thisdata.employerId,
+                            province: thisdata.province,
+                            status: thisdata.status,
+                            releaseStatus: thisdata.releaseStatus,
+                            releaseDate: thisdata.releaseDate,
+                            principalId: thisdata.principalId,
+                            validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique,
+                            urgentMoney:thisdata.urgentMoney,
+                            urgentDays:thisdata.urgentDays,
+                            hot: thisdata.hot,
+                            techBrokerId:thisdata.techBrokerId,
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            searchType: 0,               
+            validityPeriodDate: [],
+            releaseDate: [],
+            releaseDateS: [],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '需求名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                },
+                 {
+                    title: '录入人',
+                    dataIndex: 'techBrokerId',
+                    key: 'techBrokerId',
+                },
+              	{
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                {
+                    title: '首页展示',
+                    dataIndex: 'hot',
+                    key: 'hot',
+                    render: text => { return gethot(text) }
+                },
+                {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '需求类型',
+                    dataIndex: 'demandType',
+                    key: 'demandType',
+                    render: text => { return getDemandType(text); }
+                }, {
+                    title: '信息来源',
+                    dataIndex: 'infoSources',
+                    key: 'infoSources',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>平台采集</span>;
+                            case "1":
+                                return <span>客户发布</span>;
+                            case "2":
+                                return <span>批量导入</span>
+                            case "3":
+                                return <span>三方对接</span>
+                        }
+                    }
+                }, {
+                    title: '加急天数',
+                    dataIndex: 'urgentDays',
+                    key: 'urgentDays',
+                }, {
+                    title: '加急报酬(万)',
+                    dataIndex: 'urgentMoney',
+                    key: 'urgentMoney',
+                }, {
+                    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":
+                                return <span>已解决</span>;
+                        }
+                    }
+                }, {
+                    title: '有效期限',
+                    dataIndex: 'validityPeriodFormattedDate',
+                    key: 'validityPeriodFormattedDate',
+                },{
+                    title: '录入时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
+                }
+            ],
+            dataSource: [],
+            searchTime: []
+        };
+    },
+    getCompanyList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/unitNames",
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    data.data.map(function (item) {
+                        theArr.push(
+                            <Select.Option value={item.uid} key={item.uid}>{item.unitName}</Select.Option>
+                        )
+                    });
+                };
+                this.setState({
+                    companyOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getUserList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/userNames",
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    data.data.map(function (item) {
+                        theArr.push(
+                            <Select.Option value={item.uid} key={item.uid}>{item.username}</Select.Option>
+                        )
+                    });
+                };
+                this.setState({
+                    userOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    //审核不通过
+    examineCancel(){
+    	let nub=4;
+    	this.examine(nub)
+    },
+    //审核通过
+    examineOK(){
+    	let nub=3;
+    	this.examine(nub)
+    },
+    examine(nub) {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id,rowItem.techBrokerIdd)
+            };
+        };
+        console.log(deletedIds)
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/audit/achievement',
+            data: {
+                id: deletedIds[0],
+                auditStatus:nub,
+                techBroderId:deletedIds[1],
+                releaseStatus:0
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    componentWillMount() {
+        let theArr = [];
+        demandTypeList.map(function (item) {
+            theArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        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();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
+            this.state.selectedRowKeys = [];
+            this.state.selectedRows = [];
+            this.state.serialNumber = undefined;
+            this.state.name = undefined;
+            this.state.keyword = undefined;
+            this.state.infoSources = undefined;
+            this.state.demandType = undefined;
+            this.state.searchName = undefined;
+            this.state.searchType = 0;            
+            this.state.status = undefined;
+            this.state.releaseStatus = undefined;
+            this.state.auditStatus = undefined;
+            this.state.validityPeriodDate = [];
+            this.state.releaseDate = [];
+            this.state.releaseDateS = [];
+            this.loadData(null, nextProps['data-listApiUrl']);
+        };
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        if(index!=undefined){
+        	this.setState({
+           	 showDesc: true
+        	});
+        }
+    },
+    delectRow() {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/delete",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    addClick() {
+        this.state.RowData = {};
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.serialNumber = undefined;
+        this.state.name = undefined;
+        this.state.keyword = undefined;
+        this.state.infoSources = undefined;
+        this.state.demandType = undefined;
+        this.state.searchName = undefined;
+        this.state.searchType = 0;
+        this.state.boutique = '';
+        this.state.hot='' ;
+        this.state.status = undefined;
+        this.state.releaseStatus = undefined;
+        this.state.auditStatus = undefined;
+        this.state.dataCategory = undefined;
+        this.state.validityPeriodDate = [];
+        this.state.releaseDate = [];
+        this.state.releaseDateS = [];
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>科技需求审核管理</span>
+                    <div className="patent-addNew clearfix">
+                        <Upload
+                            action={globalConfig.context + "/api/admin/demand/uploadTemplate"}
+                            data={{ 'sign': 'demand_template' }}
+                            beforeUpload={beforeUploadFile}
+                            showUploadList={false}
+                            onChange={(info) => {
+                                if (info.file.status !== 'uploading') {
+                                    console.log(info.file, info.fileList);
+                                }
+                                if (info.file.status === 'done') {
+                                    if (!info.file.response.error.length) {
+                                        message.success(`${info.file.name} 文件上传成功!`);
+                                    } else {
+                                        message.warning(info.file.response.error[0].message);
+                                        return;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button style={{"display":"none"}}>上传批量导入模板</Button>
+                        </Upload>
+                        <Button onClick={() => { window.open(globalConfig.context + '/api/admin/demand/downloadTemplate?sign=demand_template') }} style={{"display":"none"}}>下载批量导入模板</Button>
+                        <Button type="primary" className="addButton" onClick={this.addClick} style={{"display":"none"}}>新增需求<Icon type="plus" /></Button>
+                       
+                    </div>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="需求编号"
+                        value={this.state.serialNumber}
+                        onChange={(e) => { this.setState({ serialNumber: e.target.value }); }} />
+                    <Input placeholder="需求名称"
+                        value={this.state.name}
+                        onChange={(e) => { this.setState({ name: e.target.value }); }} />
+                    <Input placeholder="关键字"
+                        value={this.state.keyword}
+                        onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
+                    <Radio.Group value={this.state.searchType} onChange={(e) => {
+                        this.setState({ searchType: e.target.value })
+                    }}>
+                        <Radio value={0}>认证用户</Radio>
+                        <Radio value={1}>非认证用户</Radio>
+                    </Radio.Group>                   
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                     <Button type='primary' onClick={this.examineOK} disabled={!hasSelected}>审核通过</Button>
+                    <Button type='primary' onClick={this.examineCancel} disabled={!hasSelected}>审核不通过</Button>
+                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        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' } : {}}>
+                    	<Radio.Group value={this.state.boutique} onChange={(e) => {
+		                    this.setState({ boutique: e.target.value })
+		                    }}>
+		                        <Radio value={1}>精品</Radio>
+		                        <Radio value={0}>非精品</Radio>
+		                </Radio.Group>
+		                <Radio.Group value={this.state.hot} onChange={(e) => {
+		                    this.setState({ hot: e.target.value })
+		                    }}>
+		                        <Radio value={1}>首页展示</Radio>
+		                        <Radio value={0}>首页不展示</Radio>
+		                </Radio.Group>
+                        <Select placeholder="选择信息来源" style={{ width: 120 }}
+                            value={this.state.infoSources}
+                            onChange={(e) => { this.setState({ infoSources: 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>
+                        <Select placeholder="选择需求类型"
+                            style={{ width: 120 }}
+                            value={this.state.demandType}
+                            onChange={(e) => { this.setState({ demandType: e }) }}>
+                            {this.state.demandTypeOption}
+                        </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>
+                        <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>
+                        <Select placeholder="选择需求类别" style={{ width: 120 }}
+                            value={this.state.dataCategory}
+                            onChange={(e) => { this.setState({ dataCategory: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
+                        <div style={{ marginTop: '10px' }}>
+	                        <span style={{ marginLeft: '10px' }}>有效期限 : </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 style={{ marginLeft: '10px' }}>发布时间 : </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 }); }} />
+	                        <span style={{ marginLeft: '10px' }}>录入时间 : </span>
+	                        <RangePicker
+	                            value={[this.state.releaseDateS[0] ? moment(this.state.releaseDateS[0]) : null,
+	                            this.state.releaseDateS[1] ? moment(this.state.releaseDateS[1]) : null]}
+	                            onChange={(data, dataString) => { this.setState({ releaseDateS: dataString }); }} />
+                        </div>
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <TechDemandDesc
+                    data={this.state.RowData}
+                    detailApiUrl={this.props['data-detailApiUrl']}
+                    companyOption={this.state.companyOption}
+                    userOption={this.state.userOption}
+                    demandTypeOption={this.state.demandTypeOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default TechDemandPublish;

+ 904 - 0
js/component/manageCenter/demand/demandRelease/demandReleaseDesc.jsx

@@ -0,0 +1,904 @@
+import React from 'react';
+import { AutoComplete, Switch, Tabs, Table, Icon, Tooltip, Modal, Popover, message, Spin, Upload, Input, InputNumber, Select, DatePicker, Button, Radio, Form, Cascader, Tag } from 'antd';
+import moment from 'moment';
+import '../techDemand.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { IndustryObject, getIndustryCategory } from '../../../DicIndustryList.js';
+import { getTechField } from '../../../DicTechFieldList.js';
+import { beforeUploadFile, getTechAuditStatus, splitUrl, companySearch, getDemandType, getAchievementCategory,beforeUpload, getBase64 } from '../../../tools.js';
+import throttle from '../../../throttle.js';
+
+const KeyWordTagGroup = React.createClass({
+    getInitialState() {
+        return {
+            tags: [],
+            inputVisible: false,
+            inputValue: ''
+        };
+    },
+    handleClose(removedTag) {
+        const tags = this.state.tags.filter(tag => tag !== removedTag);
+        this.props.tagsArr(tags);
+        this.setState({ tags });
+    },
+    showInput() {
+        this.setState({ inputVisible: true }, () => this.input.focus());
+    },
+    handleInputChange(e) {
+        this.setState({ inputValue: e.target.value });
+    },
+    handleInputConfirm() {
+        const state = this.state;
+        const inputValue = state.inputValue;
+        let tags = state.tags;
+        if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
+            tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
+        }
+        this.props.tagsArr(tags);
+        this.setState({
+            tags,
+            inputVisible: false,
+            inputValue: '',
+        });
+    },
+    componentWillMount() {
+        this.state.tags = this.props.keyWordArr;
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.keyWordArr != nextProps.keyWordArr) {
+            this.state.tags = nextProps.keyWordArr;
+        };
+    },
+    render() {
+        const { tags, inputVisible, inputValue } = this.state;
+        return (
+            <div className="keyWord-tips">
+                {tags.map((tag, index) => {
+                    const isLongTag = tag.length > 10;
+                    const tagElem = (
+                        <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
+                            {isLongTag ? `${tag.slice(0, 10)}...` : tag}
+                        </Tag>
+                    );
+                    return isLongTag ? <Tooltip title={tag}>{tagElem}</Tooltip> : tagElem;
+                })}
+                {inputVisible && (
+                    <Input
+                        ref={input => this.input = input}
+                        type="text"
+                        style={{ width: 78 }}
+                        value={inputValue}
+                        onChange={this.handleInputChange}
+                        onBlur={this.handleInputConfirm}
+                        onPressEnter={this.handleInputConfirm}
+                    />
+                )}
+                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
+            </div>
+        );
+    }
+});
+
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: [],
+        }
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl;
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/admin/demand/uploadPicture"}                                      
+                    data={{ 'sign': this.props.pictureSign, 'uid': this.props.uid}}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 5 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const DemandDetailShow = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            contactsObj: {},
+            salesmanObj: {},
+            data: {},
+            tags: [],
+            pictureUrl: [],
+            coverImg: []           
+        };
+    },
+    loadData(id, detailApiUrl,dataCategory) {
+    	console.log(dataCategory);
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + detailApiUrl,
+            data: {
+                id: id,
+                dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
+            },
+            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,
+                    switchValue: Boolean(!thisData.employerId),
+                    radios: thisData.hot == '1' ? true : false,
+                    tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
+                    pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                    coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : []
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid
+            },
+            success: function (data) {
+                let theOption = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    this.setState({
+                        contactsObj: data.data
+                    });
+                };
+            }.bind(this),
+        });
+    },
+    ShelfCancel(){
+    	let api=0;
+    	this.offShelf(api);
+    },
+    ShelfOk(){
+    	let api=1;
+    	this.offShelf(api);
+    },
+    offShelf(nub) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/offShelf",
+            data: { 
+            	"id": this.props.data.id,
+            	releaseStatus:nub,
+            	auditStatus:3
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功!');
+                this.props.handleOk();
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading: false,
+                releaseSubmitVisible: false
+            });
+        }.bind(this));
+    },
+    modifyBroker() {
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/modifyDemandTechBroker',
+                    data: {
+                        id: this.props.data.id,
+                        techBrokerId: values.modifyTechBrokerId
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    } else {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                    };
+                }.bind(this));
+            }
+        });
+    },
+    formSubmit() {
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 3 && !values.techBrokerId) {
+                message.warning('必须选择一个技术经纪人!');
+                return
+            };
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/demand',
+                    data: {
+                        id: this.props.data.id,
+                        techBroderId: values.techBrokerId,
+                        auditStatus: values.auditStatus
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.setState({ formSubmitVisible: false });
+                        this.props.handleOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                        this.setState({
+                            loading: false,
+                        });
+                    }
+                }.bind(this));
+            }
+        });
+    },
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (values.auditStatus == 4) {
+                this.setState({
+                    formSubmitVisible: true
+                });
+            } else {
+                this.formSubmit();
+            };
+        });
+    },
+    buildMatchList() {
+        this.setState({
+            buttonLoading: true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/demand/matchAchievement',
+            data: {
+                id: this.props.data.id,
+            }
+        }).done(function (data) {
+            this.setState({
+                buttonLoading: false
+            });
+            if (!data.error.length) {
+                message.success('匹配完成!匹配到' + data.data + '条记录');
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    componentWillMount() {
+        this.loadData(this.props.data.id, this.props.detailApiUrl);
+        if (this.props.data.employerId && this.props.data.dataCategory) {
+            this.getContactsList(this.props.data.employerId);
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.data.id, nextProps.detailApiUrl,nextProps.data.dataCategory);
+            if (nextProps.data.employerId && nextProps.data.dataCategory) {
+                this.getContactsList(nextProps.data.employerId);
+            };
+            this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+        };
+        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>                       
+                    </div>
+                    <div>
+                    <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="精品需求" >
+                            {(() => {
+                                switch (theData.boutique) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                         <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="首页展示" >
+                            {(() => {
+                                switch (theData.hot) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>                        
+                     </div>                    
+                     {this.state.radios==true ? <div>
+                    	<FormItem
+	                        labelCol={{ span: 3 }}
+	                        wrapperCol={{ span: 18 }}
+	                        label="首页展示图片:" >
+	                        <div className="clearfix">
+	                            <Upload className="demandDetailShow-upload"
+	                                listType="picture-card"
+	                                fileList={this.state.coverImg}
+	                                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>
+                    </div> :<div></div>}                
+                    {this.state.switchValue ? <div>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="雇主名称" >
+                            <span>{theData.employerName}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="联系电话" >
+                            <span>{theData.employerContactsMobile}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="电子邮箱" >
+                            <span>{theData.employerContactsMailbox}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="通讯地址" >
+                            <span>{theData.employerAddress}</span>
+                        </FormItem>
+                    </div> : <div className="clearfix">
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="雇主名称" >
+                                <span>{theData.username}</span>
+                            </FormItem>
+                            {this.props.data.dataCategory ? <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系人" >
+                                <span>{this.state.contactsObj[theData.contacts]}</span>
+                            </FormItem> : <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系人" >
+                                    <span>{theData.contactsName}</span>
+                                </FormItem>}
+                        </div>}
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="负责人" >
+                            <span>{this.props.techBrodersObj[theData.techBrokerId]}</span>
+                        </FormItem>
+                    </div>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="是否发布" >
+                           {(() => {
+                                switch (theData.releaseStatus) {
+                                    case "0":
+                                        return <div><span>未发布</span>
+                                        <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>发布</Button>
+                                            <Modal maskClosable={false} title="确认"
+                                                visible={this.state.releaseSubmitVisible}
+                                                width='400px'
+                                                footer={null}
+                                                onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
+                                                <span>确认要发布吗?</span>
+                                                <Button className="modal-submit" type="primary" onClick={this.ShelfOk} >确认</Button>
+                                                <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
+                                        </Modal></div>
+                                        ;
+                                    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='400px'
+                                                footer={null}
+                                                onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
+                                                <span>确认要撤销发布吗?</span>
+                                                <Button className="modal-submit" type="primary" onClick={this.ShelfCancel} >确认</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>
+                    </div>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="加急天数" >
+                        <span>{theData.urgentDays}</span>
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="加急报酬" >
+                        <span>{theData.urgentMoney}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="需求状态" >
+                            {(() => {
+                                switch (theData.status) {
+                                    case "0":
+                                        return <span>未解决</span>;
+                                    case "1":
+                                        return <span>已解决</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 className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="信息来源" >
+                            {(() => {
+                                switch (theData.infoSources) {
+                                    case "0":
+                                        return <span>平台采集</span>;
+                                    case "1":
+                                        return <span>客户发布</span>;
+                                    case "2":
+                                        return <span>批量导入</span>;
+                                    case "3":
+                                        return <span>三方对接</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 20 }}
+                        label="关键词" >
+                        {this.state.tags.map((tag) => {
+                            return <Tooltip key={tag} title={tag}>
+                                <Tag key={tag}>{tag}</Tag>
+                            </Tooltip>;
+                        })}
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="行业类别" >
+                        <span>{getIndustryCategory(theData.industryCategoryA, theData.industryCategoryB)}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="需求类型" >
+                            <span>{getDemandType(theData.demandType)}</span>
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="问题说明" >
+                        <span>{theData.problemDes}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="备注" >
+                        <span>{theData.remark}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="技术指标要求" >
+                        <span>{theData.technicalRequirements}</span>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="需求文件(图片)" >
+                        <div className="clearfix">
+                            <Upload className="demandDetailShow-upload"
+                                listType="picture-card"
+                                fileList={this.state.pictureUrl}
+                                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: 3 }}
+                        wrapperCol={{ span: 6 }}
+                        label="需求文件(文本)" >
+                        <div>{theData.textFileUrl ?
+                            <span className="download-file">
+                                <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>需求文件(文本文件)</a>
+                            </span>
+                            : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</div>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="需求文件(视频地址)" >
+                        <span>{theData.videoUrl}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="固定周期" >
+                            <span>{theData.fixedCycle}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="固定人数" >
+                            <span>{theData.peopleNumber || 0} 人</span>
+                        </FormItem>
+                    </div>
+                    <FormItem
+                        labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 18 }}
+                        label="固定方案" >
+                        <span>{theData.fixedScheme}</span>
+                    </FormItem>
+                    <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="预算费用" >
+                            <span>{theData.budgetCost || 0} 万元</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="费用托管" >
+                            {(() => {
+                                switch (theData.costEscrow) {
+                                    case 0:
+                                        return <span>否</span>;
+                                    case 1:
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                       
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="有效期限" >
+                            <span>{theData.validityPeriodFormattedDate}</span>
+                        </FormItem>
+                    </div>
+                </Spin>
+            </Form >
+        )
+    }
+}));
+
+
+const DemandDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            techBrodersObj: {},
+            tabsKey: "1",
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '类型',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render: text => { return getAchievementCategory(text); }
+                }, {
+                    title: '所有人名称',
+                    dataIndex: 'theName',
+                    key: 'theName',
+                }, {
+                    title: '所有人类型',
+                    dataIndex: 'ownerType',
+                    key: 'ownerType',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>个人</span>;
+                            case "1":
+                                return <span>组织</span>
+                        }
+                    }
+                }, {
+                    title: '发布时间',
+                    dataIndex: 'releaseDateFormattedDate',
+                    key: 'releaseDateFormattedDate',
+                }
+            ],
+            dataSource: [],
+        };
+    },
+    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 key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    techBrodersOption: theArr,
+                    techBrodersObj: data.data
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getTableList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/achievementDemand",
+            data: { id: this.props.data.id },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else if (data.data.length) {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            category: thisdata.category,
+                            ownerType: thisdata.ownerType,
+                            theName: thisdata.username || thisdata.unitName,
+                            releaseDate: thisdata.releaseDate,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate
+                        });
+                    };
+                };
+                this.setState({
+                    dataSource: theArr,
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    tableRowClick(record, index) {
+    	
+        window.open(globalConfig.context + '/portal/detail/achievementDetail.html?id=' + record.id + '&type=' + record.ownerType);
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    componentWillMount() {
+        this.getTechBrodersList();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.state.visible && nextProps.showDesc) {
+            this.state.tabsKey = "1";
+        };
+        this.state.visible = nextProps.showDesc;
+    },
+    render() {
+        if (this.props.data) {
+            return (
+                <div className="patent-desc">
+                    <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='1000px'
+                        footer=''
+                        className="admin-desc-content">
+                        <Spin spinning={this.state.loading}>
+                            <Tabs activeKey={this.state.tabsKey}
+                                onChange={(e) => {
+                                    this.setState({ tabsKey: e });
+                                    if (e == "2") {
+                                        this.getTableList();
+                                    };
+                                }} >
+                                <Tabs.TabPane tab="需求详情" key="1">
+                                    <DemandDetailShow
+                                        data={this.props.data}
+                                        detailApiUrl={this.props.detailApiUrl}
+                                        techBrodersOption={this.state.techBrodersOption}
+                                        techBrodersObj={this.state.techBrodersObj}
+                                        demandTypeOption={this.props.demandTypeOption}
+                                        closeDesc={this.handleCancel}
+                                        visible={this.state.visible}
+                                        handleOk={this.handleOk} />
+                                </Tabs.TabPane>
+                                <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
+                                    <Table columns={this.state.columns}
+                                        dataSource={this.state.dataSource}
+                                        pagination={false}
+                                        onRowClick={this.tableRowClick} />
+                                </Tabs.TabPane>
+                            </Tabs>
+                        </Spin>
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+export default DemandDetail;

+ 631 - 0
js/component/manageCenter/demand/demandRelease/techDemandRelease.jsx

@@ -0,0 +1,631 @@
+import React from 'react';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../techDemand.less';
+import DemandDetail from './demandReleaseDesc.jsx';
+import { demandTypeList } from '../../../dataDic.js';
+import { companySearch, getDemandType, getSearchUrl, beforeUploadFile ,getboutique,gethot} from '../../../tools.js';
+
+const TechDemandPublish = React.createClass({
+    loadData(pageNo, apiUrl) {
+        this.state.data = [];
+        if(this.state.serialNumber&&isNaN(this.state.serialNumber)){
+        	message.warning('请输入正确的编号格式');
+        	return false;
+        }
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + (apiUrl || this.props['data-listApiUrl']),
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                serialNumber: this.state.serialNumber,
+                name: this.state.name,
+                keyword: this.state.keyword,
+                infoSources: this.state.infoSources ? Number(this.state.infoSources) : undefined,
+                demandType: this.state.demandType ? Number(this.state.demandType) : undefined,
+                //username: this.state.username,
+                status: this.state.status ? Number(this.state.status) : undefined,
+                releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined,
+                validityPeriodStartDate: this.state.validityPeriodDate[0],
+                validityPeriodEndDate: this.state.validityPeriodDate[1],
+                releaseDateStartDate: this.state.releaseDate[0],
+                releaseDateEndDate: this.state.releaseDate[1],
+                createDateStartDate: this.state.releaseDateS[0],
+                createDateEndDate: this.state.releaseDateS[1],
+                auditStatus:3,
+                boutique:this.state.boutique,
+                hot:this.state.hot,
+                dataCategory:this.state.dataCategory,
+                employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
+                username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
+                unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            dataCategory: thisdata.dataCategory,
+                            name: thisdata.name,
+                            keyword: thisdata.keyword,
+                            infoSources: thisdata.infoSources,
+                            username: thisdata.username,
+                            theName: thisdata.username || thisdata.employerName,
+                            demandType: thisdata.demandType,
+                            validityPeriod: thisdata.validityPeriod,
+                            employerName: thisdata.employerName,
+                            employerId: thisdata.employerId,
+                            province: thisdata.province,
+                            status: thisdata.status,
+                            releaseStatus: thisdata.releaseStatus,
+                            releaseDate: thisdata.releaseDate,
+                            principalId: thisdata.principalId,
+                            validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique,
+                            urgentMoney:thisdata.urgentMoney,
+                            urgentDays:thisdata.urgentDays,
+                            hot: thisdata.hot,
+                            techBrokerId:thisdata.techBrokerId,
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            searchType: 0,               
+            validityPeriodDate: [],
+            releaseDate: [],
+            releaseDateS: [],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '需求名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                },
+                 {
+                    title: '录入人',
+                    dataIndex: 'techBrokerId',
+                    key: 'techBrokerId',
+                },
+              	{
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                {
+                    title: '首页展示',
+                    dataIndex: 'hot',
+                    key: 'hot',
+                    render: text => { return gethot(text) }
+                },
+                {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '需求类型',
+                    dataIndex: 'demandType',
+                    key: 'demandType',
+                    render: text => { return getDemandType(text); }
+                }, {
+                    title: '信息来源',
+                    dataIndex: 'infoSources',
+                    key: 'infoSources',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>平台采集</span>;
+                            case "1":
+                                return <span>客户发布</span>;
+                            case "2":
+                                return <span>批量导入</span>
+                            case "3":
+                                return <span>三方对接</span>
+                        }
+                    }
+                }, {
+                    title: '加急天数',
+                    dataIndex: 'urgentDays',
+                    key: 'urgentDays',
+                }, {
+                    title: '加急报酬(万)',
+                    dataIndex: 'urgentMoney',
+                    key: 'urgentMoney',
+                }, {
+                    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: 'releaseStatus',
+                    key: 'releaseStatus',
+                    render: text => { return (text)?'已发布':'未发布' }
+                },
+                {
+                    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: 'validityPeriodFormattedDate',
+                    key: 'validityPeriodFormattedDate',
+                },{
+                    title: '录入时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
+                },{
+                    title: '发布操作',
+                    dataIndex: 'ee',
+                    key: 'ee',
+                    render: (text, record, index) => {
+						return <div>
+							{!record.releaseStatus?<Popconfirm title={'请确认发布需求【'+record.name+'】'} onConfirm={(e)=>{this.examineOK(record)}} okText="确认" cancelText="取消">
+							    <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="primary">发布</Button>                 
+							</Popconfirm>:
+							<Popconfirm title={'请确认撤销发布需求【'+record.name+'】'} onConfirm={(e)=>{this.examineCancel(record)}} okText="确认" cancelText="取消">
+							    <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">撤销发布</Button>                 
+							</Popconfirm>}
+                        </div>
+					}
+                }
+            ],
+            dataSource: [],
+            searchTime: []
+        };
+    },
+    getCompanyList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/unitNames",
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    data.data.map(function (item) {
+                        theArr.push(
+                            <Select.Option value={item.uid} key={item.uid}>{item.unitName}</Select.Option>
+                        )
+                    });
+                };
+                this.setState({
+                    companyOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getUserList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/userNames",
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    data.data.map(function (item) {
+                        theArr.push(
+                            <Select.Option value={item.uid} key={item.uid}>{item.username}</Select.Option>
+                        )
+                    });
+                };
+                this.setState({
+                    userOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+     //撤销发布
+    examineCancel(record){
+    	let api=0;
+    	this.examine(api,record);
+    },
+    //发布
+    examineOK(record){
+    	let api=1;
+    	this.examine(api,record);
+    },
+    examine(nub,record) {
+        this.setState({
+            selectedRowKeys: [],
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/demand/offShelf',
+            data: {
+                id: record.id,
+                releaseStatus:nub,
+                auditStatus:3
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    componentWillMount() {
+        let theArr = [];
+        demandTypeList.map(function (item) {
+            theArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        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();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
+            this.state.selectedRowKeys = [];
+            this.state.selectedRows = [];
+            this.state.serialNumber = undefined;
+            this.state.name = undefined;
+            this.state.keyword = undefined;
+            this.state.infoSources = undefined;
+            this.state.demandType = undefined;
+            this.state.searchName = undefined;
+            this.state.searchType = 0;            
+            this.state.status = undefined;
+            this.state.releaseStatus = undefined;
+            this.state.auditStatus = undefined;
+            this.state.validityPeriodDate = [];
+            this.state.releaseDate = [];
+            this.state.releaseDateS = [];
+            this.loadData(null, nextProps['data-listApiUrl']);
+        };
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        if(index!=undefined){
+        	this.setState({
+           	 showDesc: true
+        	});
+        }
+    },
+    delectRow() {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/delete",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    addClick() {
+        this.state.RowData = {};
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.serialNumber = undefined;
+        this.state.name = undefined;
+        this.state.keyword = undefined;
+        this.state.infoSources = undefined;
+        this.state.demandType = undefined;
+        this.state.searchName = undefined;
+        this.state.searchType = 0;
+        this.state.boutique = '';
+        this.state.hot='' ;
+        this.state.status = undefined;
+        this.state.releaseStatus = undefined;
+        this.state.auditStatus = undefined;
+        this.state.dataCategory = undefined;
+        this.state.validityPeriodDate = [];
+        this.state.releaseDate = [];
+        this.state.releaseDateS = [];
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>科技需求发布管理</span>
+                    <div className="patent-addNew clearfix">
+                        <Upload
+                            action={globalConfig.context + "/api/admin/demand/uploadTemplate"}
+                            data={{ 'sign': 'demand_template' }}
+                            beforeUpload={beforeUploadFile}
+                            showUploadList={false}
+                            onChange={(info) => {
+                                if (info.file.status !== 'uploading') {
+                                    console.log(info.file, info.fileList);
+                                }
+                                if (info.file.status === 'done') {
+                                    if (!info.file.response.error.length) {
+                                        message.success(`${info.file.name} 文件上传成功!`);
+                                    } else {
+                                        message.warning(info.file.response.error[0].message);
+                                        return;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button style={{"display":"none"}}>上传批量导入模板</Button>
+                        </Upload>
+                        <Button onClick={() => { window.open(globalConfig.context + '/api/admin/demand/downloadTemplate?sign=demand_template') }} style={{"display":"none"}}>下载批量导入模板</Button>
+                        <Button type="primary" className="addButton" onClick={this.addClick} style={{"display":"none"}}>新增需求<Icon type="plus" /></Button>
+                       
+                    </div>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="需求编号"
+                        value={this.state.serialNumber}
+                        onChange={(e) => { this.setState({ serialNumber: e.target.value }); }} />
+                    <Input placeholder="需求名称"
+                        value={this.state.name}
+                        onChange={(e) => { this.setState({ name: e.target.value }); }} />
+                    <Input placeholder="关键字"
+                        value={this.state.keyword}
+                        onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
+                    <Radio.Group value={this.state.searchType} onChange={(e) => {
+                        this.setState({ searchType: e.target.value })
+                    }}>
+                        <Radio value={0}>认证用户</Radio>
+                        <Radio value={1}>非认证用户</Radio>
+                    </Radio.Group>                   
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                     <Button type='primary' onClick={this.examineOK} disabled={!hasSelected}>发布</Button>
+                    <Button type='primary' onClick={this.examineCancel} disabled={!hasSelected}>撤销发布</Button>
+                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        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' } : {}}>
+                    	<Radio.Group value={this.state.boutique} onChange={(e) => {
+		                    this.setState({ boutique: e.target.value })
+		                    }}>
+		                        <Radio value={1}>精品</Radio>
+		                        <Radio value={0}>非精品</Radio>
+		                </Radio.Group>
+		                <Radio.Group value={this.state.hot} onChange={(e) => {
+		                    this.setState({ hot: e.target.value })
+		                    }}>
+		                        <Radio value={1}>首页展示</Radio>
+		                        <Radio value={0}>首页不展示</Radio>
+		                </Radio.Group>
+                        <Select placeholder="选择信息来源" style={{ width: 120 }}
+                            value={this.state.infoSources}
+                            onChange={(e) => { this.setState({ infoSources: 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>
+                        <Select placeholder="选择需求类型"
+                            style={{ width: 120 }}
+                            value={this.state.demandType}
+                            onChange={(e) => { this.setState({ demandType: e }) }}>
+                            {this.state.demandTypeOption}
+                        </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>
+                        <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>
+                        <Select placeholder="选择需求类别" style={{ width: 120 }}
+                            value={this.state.dataCategory}
+                            onChange={(e) => { this.setState({ dataCategory: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
+                        <div style={{ marginTop: '10px' }}>
+	                        <span style={{ marginLeft: '10px' }}>有效期限 : </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 style={{ marginLeft: '10px' }}>发布时间 : </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 }); }} />
+	                        <span style={{ marginLeft: '10px' }}>录入时间 : </span>
+	                        <RangePicker
+	                            value={[this.state.releaseDateS[0] ? moment(this.state.releaseDateS[0]) : null,
+	                            this.state.releaseDateS[1] ? moment(this.state.releaseDateS[1]) : null]}
+	                            onChange={(data, dataString) => { this.setState({ releaseDateS: dataString }); }} />
+                        </div>
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <DemandDetail
+                    data={this.state.RowData}
+                    detailApiUrl={this.props['data-detailApiUrl']}
+                    companyOption={this.state.companyOption}
+                    userOption={this.state.userOption}
+                    demandTypeOption={this.state.demandTypeOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default TechDemandPublish;

+ 0 - 1
js/component/manageCenter/leftTab.jsx

@@ -28,7 +28,6 @@ const LeftTab = React.createClass({
         if(rid.length>1){
         	for(var h=0;h<menu.length;h++){
         		if(menu[h].subMenus.length){
-        			console.log(menu[h].subMenus)
         			menu[h].subMenus.map(function(atem){
         				let urls=atem.url.split('#')
         				if(rid[1]==urls[1]){

+ 4 - 2
js/component/manageCenter/set/userManagementS/newUser.jsx

@@ -111,7 +111,7 @@ const Newuser = Form.create()(React.createClass({
         let api = this.props.userDetaile?"/api/admin/superviser/updateAdmin":'/api/admin/superviser/insertAdmin'
         this.setState({
             loading: true
-        });  
+        });
         let roleArrT=[];
 		roleArrT.push((this.state.role).toString())
         $.ajax({
@@ -191,8 +191,9 @@ const Newuser = Form.create()(React.createClass({
                     theType = item.id;
                 }
            });     
-   	    }
+   	   }
 		this.setState({
+			theName:e,
 			theTypes:theType
 		})
 	},
@@ -242,6 +243,7 @@ const Newuser = Form.create()(React.createClass({
                     userNo:thisdata.userNo,
                 	orgCodeUrl: thisdata.headPortraitUrl? splitUrl(thisdata.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [],
                 	role:roleArr,
+                	theTypes:''
                 });
             }.bind(this),
        }).always(function () {