liting2017 6 yıl önce
ebeveyn
işleme
6d8e82ddc4

+ 4 - 0
js/admin/index/content.jsx

@@ -2,6 +2,8 @@
 import DemandLibrary from '@/administration/demand/techDemand';
 import DemandExamine from '@/administration/demand/demandExamine';
 import AdmianIndex from '@/administration/index/index';
+import AchievementExamine from '@/administration/achievement/achievementExamine';
+import AchievementLibrary from '@/administration/achievement/techAchievement';
 
 import {hashHistory,Route,Router,IndexRedirect} from 'react-router';
 import {Layout} from 'antd';
@@ -18,6 +20,8 @@ export default class ContentRouter extends React.Component {
             <Route path="/library" component={DemandLibrary} />
             <Route path="/examine" component={DemandExamine} />
             <Route path="/index" component={AdmianIndex} />
+            <Route path="/achievementLibrary" component={AchievementLibrary} />
+            <Route path="/achievementExamine" component={AchievementExamine} />
         </Router>
       </Content>
     )

+ 9 - 0
js/admin/menu.jsx

@@ -16,6 +16,15 @@ module.exports = {
           { name: '技术需求库', url: 'library' },
           { name: '需求发布审核', url: 'examine' },
         ]
+      },
+      {
+        name: '技术成果管理',
+        url: 'sub3',
+        icon: 'woman',
+        children: [
+          { name: '技术成果库', url: 'achievementLibrary' },
+          { name: '成果发布审核', url: 'achievementExamine' },
+        ]
       }
     ]
 }

+ 71 - 0
js/component/account/achievement/achievementDesc.jsx

@@ -0,0 +1,71 @@
+import React from 'react';
+import { Modal, Spin } from 'antd';
+import DemandForm from '@/account/achievement/achievementForm';
+import DemandDetaiel from '@/account/achievement/achievementDetails';
+
+class DemandDesc extends React.Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+			loading: false,
+			pictureUrl: [],
+			showState:false
+		};
+	}
+	handleCancel() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, false);
+	}
+	handOk() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, true);
+	}
+	componentWillReceiveProps(nextProps) {
+		this.state.visible = nextProps.showDesc;
+	}
+	render() {
+		let data = this.props.data || {auditStatus:0};
+		return (
+			<div className="patent-desc">
+				<Modal
+					maskClosable={false}
+					visible={this.state.visible}
+					onOk={this.handOk.bind(this)}
+					onCancel={this.handleCancel.bind(this)}
+					width="1000px"
+					title={!data.id ? '新建需求' : '修改需求'}
+					footer=""
+					className="admin-desc-content"
+				>
+					<div>
+						<div>
+								{data.auditStatus=='1'||data.auditStatus=='2'?
+									<DemandDetaiel
+									closeDesc={this.handleCancel.bind(this)}
+									data={this.props.data}
+									demandTypeOption={this.props.demandTypeOption}
+									visible={this.state.visible}
+									handOk={this.handOk.bind(this)}
+									/>
+									:
+									<DemandForm 
+										closeDesc={this.handleCancel.bind(this)}
+										data={this.props.data}
+										demandTypeOption={this.props.demandTypeOption}
+										visible={this.state.visible}
+										handOk={this.handOk.bind(this)}
+										/>
+								} 
+						</div>
+					</div>
+				</Modal>
+			</div>
+		);
+	}
+}
+
+export default DemandDesc;

+ 281 - 0
js/component/account/achievement/achievementDetails.jsx

@@ -0,0 +1,281 @@
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import {
+	Icon,
+	Tabs,
+	Table,
+	Tooltip,
+	Modal,
+	Popover,
+	message,
+	Spin,
+	Upload,
+	Input,
+	InputNumber,
+	Select,
+	DatePicker,
+	Button,
+	Radio,
+	Form,
+	Cascader,
+    Tag,
+    Checkbox,
+    Row,
+    Col
+} from 'antd';
+import {  getIndustryCategory } from '@/DicIndustryList.js';
+import {  splitUrl ,getMaturity,getTransaction,getAchievementPosition,getAchievementCategory,getReleaseStateList,getInnovation} from '@/tools.js';
+
+const DemandDetail = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            auditStatus: 0,
+            textFileList: [],
+            videoFileList: [],
+            pictureUrl: [],
+        };
+    },
+    loadData(id) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +  '/api/user/demand/demandDetail' ,
+            data: {
+                id: id
+            },
+            success: function (data) {
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                };
+                let publishPagesArr = [];
+                thisData.publishPages.map(item=>{
+					publishPagesArr.push(item.publishPage)
+                })
+                this.setState({
+                    id:thisData.id,
+                    publishPagesArr:publishPagesArr,
+                    data: thisData,
+                    auditStatus:thisData.auditStatus,
+					isHot:thisData.isHot,
+					isUrgent:thisData.isUrgent,
+					status:thisData.status,
+					isHot:thisData.isHot,
+                    pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getTagsArr(e) {
+        this.setState({ tags: e });
+    },
+    getPictureUrl(e) {
+        this.setState({ pictureUrl: e });
+    },
+	cancelFun(){
+		this.props.closeDesc();
+    },
+    //刷新发布
+    updateFun(inex){
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +'/api/user/demand/refreshPublish',
+            data: {
+                id: this.state.id,
+                auditStatus:this.state.auditStatus
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('刷新成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.props.handOk();
+        }.bind(this));
+    },
+    //撤销发布
+    revokeFun(){
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +  '/api/user/demand/offShelf',
+            data: {
+                id: this.state.id,
+                auditStatus:this.state.auditStatus
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('撤销成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.props.handOk();
+        }.bind(this));
+    },
+    componentWillMount() {
+        if (this.props.data.id) {
+            this.loadData(this.props.data.id);
+        } else {
+            this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.videoFileList = [];
+            if (nextProps.data.id) {
+                this.loadData(nextProps.data.id);
+            } else {
+				this.state.data = {};
+				this.state.isUrgent=undefined;//加急需求
+				this.state.isHot=undefined;//是否悬赏
+				this.state.status=undefined;
+                this.state.pictureUrl = [];
+            };
+            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 (
+			<div className='login'>
+			<Form layout="horizontal" id="demand-form">
+				<Spin spinning={this.state.loading}>
+                   
+                    <div className="clearfix">
+						<FormItem className="half-item" {...formItemLayout} label="标题">
+							<span>{theData.name}</span>
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="发个成果吧">
+							<span>{theData.problemDes}</span>
+						</FormItem>
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="知识产权情况">
+							<span>{theData.problemDes}</span>
+						</FormItem>
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="技术参数">
+							<span>{theData.problemDes}</span>
+						</FormItem>
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="团队情况">
+							<span>{theData.problemDes}</span>
+						</FormItem>
+					</div>
+					<div className="clearfix">
+                        <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="关键字">
+                            <span>{theData.keyword}</span>
+                        </FormItem>
+					</div>
+					<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>{getTransaction(theData.achievementType)}</span>
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="知识产权类型">
+                            <span>{getAchievementCategory(theData.achievementType)}</span>
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="创新度">
+                            <span>{getInnovation(theData.achievementType)}</span>
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="成熟度">
+                            <span>{getMaturity(theData.achievementType)}</span>
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="交易形式">
+                            <span>{getTransaction(theData.achievementType)}</span>
+						</FormItem>
+					</div>
+					<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>
+					<div>
+						<FormItem className="half-item" {...formItemLayout} label="发布状态">
+							<span>{getReleaseStateList(theData.auditStatus)}</span>
+						</FormItem>
+					</div>
+                    <div>
+                        <FormItem className="half-item" labelCol={{ span: 6 }}
+							wrapperCol={{ span: 18 }} label="发布位置">
+                                <span>{getAchievementPosition(this.state.publishPagesArr)}</span>
+						</FormItem>
+                    </div>
+                    <div className="clearfix">
+                            <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="审核信息">
+                                <span>{theData.auditInfo}</span>
+                            </FormItem>
+					</div>
+					<div className="clearfix">
+						{this.props.data.auditStatus=='2'&&<FormItem wrapperCol={{ span: 12, offset: 3 }}>
+							<Button className="set-submit" type="primary"  onClick={(e)=>{this.updateFun()}} >
+								刷新发布
+							</Button>
+							<Button type="danger" style={{marginRight:20}} onClick={(e)=>{this.revokeFun()}}>
+								撤销发布
+							</Button>
+							<Button className="set-submit" type="ghost" onClick={this.cancelFun}>
+								取消
+							</Button>
+						</FormItem>}
+					</div>
+				</Spin>
+			</Form>    
+		</div>
+        )
+    }
+}));
+export default DemandDetail;
+
+
+
+

+ 567 - 0
js/component/account/achievement/achievementForm.jsx

@@ -0,0 +1,567 @@
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import {
+	Icon,
+	Tabs,
+	Table,
+	Tooltip,
+	Modal,
+	Popover,
+	message,
+	Spin,
+	Upload,
+	Input,
+	InputNumber,
+	Select,
+	DatePicker,
+	Button,
+	Radio,
+	Form,
+	Cascader,
+    Tag,
+    Checkbox,
+    Row,
+    Col
+} from 'antd';
+import { getTechField } from '@/DicTechFieldList.js';
+import {areaSelect } from '@/NewDicProvinceList';
+import {achievementType,achievementCategoryList,maturityList,innovationList,transaction} from '@/dataDic';
+import { IndustryObject } from '@/DicIndustryList.js';
+import {  splitUrl} from '@/tools.js';
+const FormItem =Form.Item
+
+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: [],
+			tags: []
+		};
+	},
+	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/user/demand/uploadPicture'}
+					data={{ sign: 'demand_picture'}}
+					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 DemandDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            auditStatus: 0,
+            textFileList: [],
+            videoFileList: [],
+			pictureUrl: [],
+			tags:[]
+        };
+    },
+    loadData(id) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +  '/api/user/demand/demandDetail' ,
+            data: {
+                id: id
+            },
+            success: function (data) {
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+				};
+				let publishPagesArr = [];
+				thisData.publishPages.map(item=>{
+					publishPagesArr.push(item.publishPage)
+				})
+                this.setState({
+					id:thisData.id,
+					tags: thisData.keyword ? thisData.keyword.split(",") : [],
+					data: thisData,
+					auditStatus:thisData.auditStatus,
+					publishPagesArr:publishPagesArr,
+					isHot:thisData.isHot,
+					isUrgent:thisData.isUrgent,
+					status:thisData.status,
+					isHot:thisData.isHot,
+                    pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getTagsArr(e) {
+        this.setState({ tags: e });
+    },
+    getPictureUrl(e) {
+        this.setState({ pictureUrl: e });
+    },
+    handleSubmit(e,index) {
+		e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            //url转化
+            let thePictureUrl = [];
+            if (this.state.pictureUrl.length) {
+                let picArr = [];
+                this.state.pictureUrl.map(function (item) {
+                    if ( item.response && item.response.data && item.response.data.length ){
+                        picArr.push(item.response.data);
+                    }
+                });
+                thePictureUrl = picArr.join(",");
+			};
+			if(!this.state.tags.length){
+				message.warning('请填写关键词.')
+				return false;
+			}
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "post",
+					dataType: "json",
+					async:true,
+                    url: this.props.data.id ? globalConfig.context + '/api/user/demand/updateDemand' : globalConfig.context + '/api/user/demand/apply',
+                    data: {
+                        id: this.props.data.id,
+						name: values.name,
+                        industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
+                        industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
+                        demandType: values.demandType,
+                        problemDes: values.problemDes,
+                        pictureUrl: thePictureUrl,
+						crowdCost:values.crowdCost,
+						keyword: this.state.tags ? this.state.tags.join(",") : [],
+						keywords: this.state.tags,
+						budgetCost:values.budgetCost,
+						urgentDays:values.urgentDays,
+						urgentMoney:values.urgentMoney,
+						auditStatus:index,
+                        status: this.state.status,
+						isUrgent: this.state.isUrgent,
+						isHot:this.state.isHot,
+						publishPages:values.publishPages,
+						researchType:values.researchType
+                    }
+                }).done(function (data) {
+                    this.setState({
+                        loading: false
+                    });
+                    if (!data.error.length) {
+                        message.success('操作成功!');
+                        this.setState({
+                            visible: false
+                        });
+                        this.props.handOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+	},
+	submission(e,index){
+		this.handleSubmit(e,index);
+		$.ajax({
+            method: "POST",
+            dataType: "json",
+			crossDomain: false,
+			async:true,
+            url: globalConfig.context + "/api/user/demand/publishDemand",
+            data: {
+				id: this.state.id,
+				auditStatus:this.state.auditStatus
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+	cancelFun(){
+		this.props.closeDesc();
+	},
+    componentWillMount() {
+        if (this.props.data.id) {
+            this.loadData(this.props.data.id);
+        } else {
+			this.state.data = {};
+			this.state.tags = [];
+			this.setState({
+				publishPagesArr:['app_achievement_list','web_achievement_list']
+			})
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.videoFileList = [];
+            if (nextProps.data.id) {
+                this.loadData(nextProps.data.id);
+            } else {
+				this.state.data = {};
+				this.state.isUrgent=undefined;//加急需求
+				this.state.isHot=undefined;//是否悬赏
+				this.state.status=undefined;
+				this.state.pictureUrl = [];
+				this.state.tags = [];
+				this.setState({
+					publishPagesArr:['app_achievement_list','web_achievement_list']
+				})
+            };
+			this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator,getFieldsValue } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+		};
+        return (
+			<div className='login'>
+			<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
+				<Spin spinning={this.state.loading}>
+				<div className="clearfix">
+						<FormItem className="half-item" {...formItemLayout} label="标题">
+							{getFieldDecorator('name', {
+								rules: [ { required: true, message: '此项为必填项!' } ],
+								initialValue: theData.name
+							})(<Input placeholder="给您的成果配个标题吧." />)}
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="发个成果吧">
+							{getFieldDecorator('problemDes', {
+								rules: [ { required: true, message: '此项为必填项!' } ],
+								initialValue: theData.problemDes
+							})(<Input type="textarea" rows={4} placeholder="请详细介绍您的技术成果情况,包括但不限于:能解决什么问题、重大技术性突破、取得的奖励情况." />)}
+						</FormItem>
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="知识产权情况">
+							{getFieldDecorator('problemDes2', {
+								initialValue: theData.problemDes2
+							})(<Input type="textarea" rows={4} placeholder="请输入您的知识产权情况." />)}
+						</FormItem>
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="技术参数">
+							{getFieldDecorator('problemDes4', {
+								initialValue: theData.problemDes4
+							})(<Input type="textarea" rows={4} placeholder="请输入您的技术成果参数." />)}
+						</FormItem>
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="团队情况">
+							{getFieldDecorator('problemDes3', {
+								initialValue: theData.problemDes3
+							})(<Input type="textarea" rows={4} placeholder="请输入您的团队情况." />)}
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem
+							labelCol={{ span: 3 }}
+							wrapperCol={{ span: 18 }}
+							label={<span><span style={{color:'red'}}> * </span>关键词</span>} >
+							<KeyWordTagGroup
+								keyWordArr={this.state.tags}
+								tagsArr={(e)=>{this.setState({tags:e})}}
+								/>
+						</FormItem>
+					</div>
+					<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="行业领域">
+						{getFieldDecorator('industryCategory', {
+							rules: [ { type: 'array', required: true, message: '此项为必填项!' } ],
+							initialValue: [ theData.industryCategoryA, theData.industryCategoryB ]
+						})(<Cascader style={{ width: 300 }} options={IndustryObject} placeholder="请选择一个行业" />)}
+					</FormItem>
+					<div className="clearfix">
+						<FormItem className="half-item" {...formItemLayout} label="成果类型">
+							{getFieldDecorator('demandType', {
+									rules: [ { required: true, message: '此项为必填项!' } ],
+									initialValue:(theData.demandType||theData.demandType=='0'?theData.demandType.toString():undefined)
+							})(
+								<Select style={{ width: 160 }} placeholder="请选择成果类型"
+									>
+									{ 
+										achievementType.map(function (item) {
+											return	<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+										})
+									}
+								</Select>
+							)}
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="知识产权类型">
+							{getFieldDecorator('demandType1', {
+									initialValue:(theData.demandType2||theData.demandType2=='0'?theData.demandType2.toString():undefined)
+							})(
+								<Select style={{ width: 160 }} placeholder="请选择知识产权类型"
+									>
+									{ 
+										achievementCategoryList.map(function (item) {
+											return	<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+										})
+									}
+								</Select>
+							)}
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="创新度">
+							{getFieldDecorator('demandType1', {
+									initialValue:(theData.demandType4||theData.demandType4=='0'?theData.demandType4.toString():undefined)
+							})(
+								<Select style={{ width: 160 }} placeholder="请选择创新度"
+									>
+									{ 
+										innovationList.map(function (item) {
+											return	<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+										})
+									}
+								</Select>
+							)}
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="成熟度">
+							{getFieldDecorator('demandType1', {
+									initialValue:(theData.demandType5||theData.demandType5=='0'?theData.demandType5.toString():undefined)
+							})(
+								<Select style={{ width: 160 }} placeholder="请选择成熟度"
+									>
+									{ 
+										maturityList.map(function (item) {
+											return	<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+										})
+									}
+								</Select>
+							)}
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="交易形式">
+							{getFieldDecorator('demandType1', {
+									initialValue:(theData.demandType6||theData.demandType6=='0'?theData.demandType6.toString():undefined)
+							})(
+								<Select style={{ width: 160 }} placeholder="请选择交易形式"
+									>
+									{ 
+										transaction.map(function (item) {
+											return	<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+										})
+									}
+								</Select>
+							)}
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="成果文件(图片)">
+							<PicturesWall
+								uid={theData.employerId}
+								fileList={this.getPictureUrl}
+								pictureUrl={this.state.pictureUrl}
+								visible={this.props.visible}
+							/>
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem className="half-item" {...formItemLayout} label="精品成果">
+							{getFieldDecorator('urgentDays', {
+								initialValue: theData.fineQuality 
+							})(
+								<Radio.Group>
+									<Radio value={0}>非精品</Radio>
+									<Radio value={1}>精品</Radio>
+								</Radio.Group>
+								)
+							}
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="热点成果">
+							{getFieldDecorator('isHot', {
+								initialValue: theData.isHot
+							})(
+								<Radio.Group>
+									<Radio value={0}>非热点</Radio>
+									<Radio value={1}>热点</Radio>
+								</Radio.Group>
+								)
+							}
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem className="full-item" 
+							labelCol={{ span: 3 }}
+							wrapperCol={{ span: 18 }} label="发布位置">
+							{getFieldDecorator('publishPages', {
+								rules: [ { required: false } ],
+								initialValue: this.state.publishPagesArr
+							})(
+								<Checkbox.Group>
+									<Row>
+										<Col span={6}><Checkbox value="web_index">网站首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="web_achievement_main">网站成果主页</Checkbox></Col>
+										<Col span={6}><Checkbox value="web_achievement_list" disabled>网站成果搜索页</Checkbox></Col>
+										<Col span={6}><Checkbox value="app_index">APP首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="app_achievement_main">APP成果首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="app_achievement_list" disabled>APP成果搜索页</Checkbox></Col>
+									</Row>
+								</Checkbox.Group>
+							)}
+						</FormItem>
+					</div>
+					{theData.auditInfo&&<div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="审核信息">
+							<span>{theData.auditInfo}</span>
+						</FormItem>
+					</div>}
+					<div className="clearfix">
+						<FormItem wrapperCol={{ span: 12, offset: 3 }}>
+						{this.props.data&&!this.props.data.id&&<Button className="set-submit" type="primary" htmlType="submit">
+								保存草稿
+							</Button>}
+							<Button
+								className="set-submit"
+								type="ghost"
+								onClick={(e) => {
+									if(this.props.data.id){
+										this.submission(e,this.state.auditStatus)
+									}else{
+										this.handleSubmit(e,1)
+									}
+								}}
+							>
+								提交审核
+							</Button>
+							<Button className="set-submit" type="ghost" onClick={this.cancelFun}>
+								取消
+							</Button>
+						</FormItem>
+					</div>
+				</Spin>
+			</Form>    
+		</div>
+        )
+    }
+}));
+export default DemandDetailForm;
+
+
+
+

+ 151 - 110
js/component/account/achievement/techAchievement.jsx

@@ -3,33 +3,29 @@ import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker,
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
-import './techAchievement.less';
-import TechAchievementDesc from './techAchievementDesc.jsx';
-import { achievementCategoryList, techAuditStatusList } from '../../dataDic.js';
-import { getAchievementCategory, getTechAuditStatus } from '../../tools.js';
+import '@/account/demand/techDemand.less';
+import TechDemandDesc from '@/account/achievement/achievementDesc';
+import { demandTypeList } from '@/dataDic.js';
+import { getDemandType,getReleaseStateList,getAchievementType } from '@/tools.js';
 
-const AchievementList = React.createClass({
+const DemandList = React.createClass({
     loadData(pageNo) {
         this.state.data = [];
         this.setState({
+            page:pageNo,
             loading: true
         });
         $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + '/api/user/achievement/list',
+            url: globalConfig.context + "/api/user/demand/list",
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                serialNumber: this.state.serialNumber, //编号
-                name: this.state.name, //名称
-                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--已发布)
-                auditStatus: this.state.auditStatus
+                name: this.state.name, //需求名称
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
             },
             success: function (data) {
                 let theArr = [];
@@ -43,23 +39,22 @@ const AchievementList = React.createClass({
                         theArr.push({
                             key: i,
                             id: thisdata.id,
-                            serialNumber: thisdata.serialNumber,
-                            dataCategory: thisdata.dataCategory,
+                            serialNumber: thisdata.serialNumber, //编号
                             name: thisdata.name,
-                            keyword: thisdata.keyword,
-                            category: thisdata.category,
-                            ownerName: thisdata.ownerName,
-                            ownerType: thisdata.ownerType,
-                            ownerMobile: thisdata.ownerMobile,
-                            status: thisdata.status,
-                            releaseDate: thisdata.releaseDate,
-                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
-                            auditStatus: thisdata.auditStatus
+                            demandType: thisdata.demandType,
+                            auditStatus: thisdata.auditStatus, //审核状态
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            status:thisdata.status, //需求状态
+                            releaseDate:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
                         });
                     };
-                }
+                };
                 this.state.pagination.current = data.data.pageNo;
                 this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				};
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -97,48 +92,131 @@ const AchievementList = React.createClass({
                     dataIndex: 'serialNumber',
                     key: 'serialNumber',
                 }, {
-                    title: '名称',
+                    title: '成果名称',
                     dataIndex: 'name',
                     key: 'name',
-                }, {
-                    title: '关键字',
-                    dataIndex: 'keyword',
-                    key: 'keyword',
-                }, {
-                    title: '类型',
-                    dataIndex: 'category',
-                    key: 'category',
-                    render: text => { return getAchievementCategory(text); }
-                }, {
-                    title: '审核状态',
+                },  {
+                    title: '成果类型',
+                    dataIndex: 'demandType',
+                    key: 'demandType',
+                    render: text => { return getAchievementType(text); }
+                },
+                {
+                    title: '发布状态',
                     dataIndex: 'auditStatus',
                     key: 'auditStatus',
-                    render: text => { return getTechAuditStatus(text) }
-                }, {
+                    render: text => { return getReleaseStateList(text) }
+                },
+                {
                     title: '发布时间',
-                    dataIndex: 'releaseDateFormattedDate',
-                    key: 'releaseDateFormattedDate',
+                    dataIndex: 'releaseDate',
+                    key: 'releaseDate'
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'caozuo',
+                    key: 'caozuo',
+                    render:(text,recard) => {
+                        return  <div className="btnRight">
+                                   {recard.auditStatus!='1'&&recard.auditStatus!='2'&&<Button type="primary" style={{ background: "#3fcf9e", border: "none", color: "#fff" }} onClick={(e)=>{e.stopPropagation(),this.submission(recard)}}>提交审核</Button>}
+                                   {/* {recard.auditStatus!='1'&&recard.auditStatus!='2'&&<Button type="danger"  onClick={(e)=>{e.stopPropagation;this.delectRow(recard)}}>删除</Button>} */}
+                                   {recard.auditStatus!='1'&&recard.auditStatus=='2'&&<Button type="success" onClick={(e)=>{ e.stopPropagation(),this.updateFun(recard)}}>刷新发布</Button>}
+                                   {recard.auditStatus!='1'&&recard.auditStatus=='2'&&<Button type="danger" onClick={(e)=>{e.stopPropagation(),this.revokeFun(recard)}}>撤销发布</Button>}
+                                </div>
+                    }
                 }
             ],
             dataSource: [],
             searchTime: [,]
         };
     },
+    //提交审核
+    submission(record){
+        this.setState({
+            showDesc:false,
+            loading:true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/demand/publishDemand",
+            data: {
+				id:record.id,
+				auditStatus:record.auditStatus
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('提交成功.');
+                this.setState({
+                    loading: false,
+                });
+                this.loadData(this.state.page)
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    //刷新发布
+    updateFun(recard){
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +'/api/user/demand/refreshPublish',
+            data: {
+                id: recard.id,
+                auditStatus:recard.auditStatus
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('刷新成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData(this.state.page);
+        }.bind(this));
+    },
+    //撤销发布
+    revokeFun(recard){
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +  '/api/user/demand/offShelf',
+            data: {
+                id: recard.id,
+                auditStatus:recard.auditStatus 
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('撤销成功!');
+                this.setState({
+                    loading: false,
+                });
+                this.loadData(this.state.page);
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
     componentWillMount() {
         let theArr = [];
-        achievementCategoryList.map(function (item) {
+        demandTypeList.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;
+        this.state.demandTypeOption = theArr;
         this.loadData();
     },
     tableRowClick(record, index) {
@@ -147,36 +225,28 @@ const AchievementList = React.createClass({
             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)
-            };
-        };
+    delectRow(recard) {
         this.setState({
-            selectedRowKeys: [],
-            loading: deletedIds.length > 0
-        });
+            loading:true
+        })
         $.ajax({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/user/achievement/delete",
+            url: globalConfig.context + "/api/user/demand/delete",
             data: {
-                ids: deletedIds
+                ids: recard.id
             }
         }).done(function (data) {
             if (!data.error.length) {
                 message.success('删除成功!');
                 this.setState({
-                    loading: false,
+                    loading: false
                 });
+                this.loadData(this.state.page);
             } else {
                 message.warning(data.error[0].message);
             };
-            this.loadData();
         }.bind(this));
     },
     addClick() {
@@ -188,21 +258,15 @@ const AchievementList = React.createClass({
     closeDesc(e, s) {
         this.state.showDesc = e;
         if (s) {
-            this.loadData();
+            this.loadData(this.state.page);
         };
     },
     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.name = '';
         this.state.releaseDate = [];
-        this.state.auditStatus = undefined;
         this.loadData();
     },
     searchSwitch() {
@@ -210,9 +274,6 @@ const AchievementList = React.createClass({
             searchMore: !this.state.searchMore
         });
     },
-    downLoadFile() {
-        window.open(globalConfig.context + '/api/user/achievement/downloadTemplate?sign=achievement_template')
-    },
     render() {
         const rowSelection = {
             selectedRowKeys: this.state.selectedRowKeys,
@@ -223,49 +284,29 @@ const AchievementList = React.createClass({
                 });
             }
         };
+        this.state.dataSource=[
+            {key:1,auditStatus:0,serialNumber:0},
+            {key:2,auditStatus:1,serialNumber:1},
+            {key:3,auditStatus:2,serialNumber:2},
+            {key:4,auditStatus:3,serialNumber:3},
+            {key:5,auditStatus:4,serialNumber:4}
+        ]
         const hasSelected = this.state.selectedRowKeys.length > 0;
         const { RangePicker } = DatePicker;
         return (
             <div className="user-content" >
                 <div className="content-title">
-                    <span>科技成果管理</span>
+                    <span>我的科技成果</span>
                     <div className="patent-addNew">
-                        <Button onClick={this.downLoadFile}>下载批量导入模板</Button>
-                        <Button className="addButton" type="primary" onClick={this.addClick}>发布成果<Icon type="plus" /></Button>
+                        <Button type="primary" onClick={this.addClick}>发布成果<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="名称"
+                    <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 }); }} />
-                    <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>
                     <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' } : {}}>
                         <span>发布时间 :</span>
@@ -284,9 +325,9 @@ const AchievementList = React.createClass({
                             onRowClick={this.tableRowClick} />
                     </Spin>
                 </div>
-                <TechAchievementDesc
+                <TechDemandDesc
                     data={this.state.RowData}
-                    achievementCategoryOption={this.state.achievementCategoryOption}
+                    demandTypeOption={this.state.demandTypeOption}
                     showDesc={this.state.showDesc}
                     closeDesc={this.closeDesc} />
             </div >
@@ -294,4 +335,4 @@ const AchievementList = React.createClass({
     }
 });
 
-export default AchievementList;
+export default DemandList;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 1420
js/component/account/achievement/techAchievementDesc.jsx


+ 4 - 4
js/component/account/demand/techDemand.jsx

@@ -5,8 +5,8 @@ import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './techDemand.less';
 import TechDemandDesc from './demandDesc.jsx';
-import { demandTypeList } from '../../dataDic.js';
-import { getDemandType,getReleaseStateList } from '../../tools.js';
+import { demandTypeList } from '@/dataDic.js';
+import { getDemandType,getReleaseStateList } from '@/tools.js';
 
 const DemandList = React.createClass({
     loadData(pageNo) {
@@ -102,7 +102,7 @@ const DemandList = React.createClass({
                     render: text => { return getDemandType(text); }
                 },
                 {
-                    title: '审核状态',
+                    title: '发布状态',
                     dataIndex: 'auditStatus',
                     key: 'auditStatus',
                     render: text => { return getReleaseStateList(text) }
@@ -124,7 +124,7 @@ const DemandList = React.createClass({
                         return  <div>
                                     {text=='0'&&<span>进行中</span>}
                                     {text=='1'&&<span>未解决</span>}
-                                    {text=='1'&&<span>已解决</span>}
+                                    {text=='2'&&<span>已解决</span>}
                                 </div>
 
                      }

+ 1 - 0
js/component/account/index/leftMenu.jsx

@@ -132,6 +132,7 @@ const LeftTab = React.createClass({
 			}
 		});
 		menu[1].children = menuList;
+		this.state.type=1;
 		if (this.state.type == '0' || this.state.type == '1') {
 			newMenu = menu.concat(demandList);
 		}else{

+ 62 - 0
js/component/administration/achievement/achievementDesc.jsx

@@ -0,0 +1,62 @@
+import React from 'react';
+import { Modal, Spin } from 'antd';
+import DemandDetaiel from '@/administration/achievement/achievementDetaiel';
+
+class DemandDesc extends React.Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+			loading: false,
+			pictureUrl: [],
+			showState:false
+		};
+	}
+	handleCancel() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, false);
+	}
+	handOk() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, true);
+	}
+	componentWillReceiveProps(nextProps) {
+		this.state.visible = nextProps.showDesc;
+
+	}
+	render() {
+		let data = this.props.data || {releaseStatus:0};
+		return (
+			<div className="patent-desc">
+				<Modal
+					maskClosable={false}
+					visible={this.state.visible}
+					onOk={this.handOk.bind(this)}
+					onCancel={this.handleCancel.bind(this)}
+					width="1000px"
+					title='需求详情'
+					footer=""
+					className="admin-desc-content"
+				>
+					<div>
+						<div>
+							<DemandDetaiel
+							    examineState={this.props.examineState}
+								closeDesc={this.handleCancel.bind(this)}
+								data={this.props.data}
+								demandTypeOption={this.props.demandTypeOption}
+								visible={this.state.visible}
+								handOk={this.handOk.bind(this)}
+							/>
+						</div>
+					</div>
+				</Modal>
+			</div>
+		);
+	}
+}
+
+export default DemandDesc;

+ 312 - 0
js/component/administration/achievement/achievementDetaiel.jsx

@@ -0,0 +1,312 @@
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import {
+	Icon,
+	Tabs,
+	Table,
+	Tooltip,
+	Modal,
+	Popover,
+	message,
+	Spin,
+	Upload,
+	Input,
+	InputNumber,
+	Select,
+	DatePicker,
+	Button,
+	Radio,
+	Form,
+	Cascader,
+    Tag,
+    Checkbox,
+    Row,
+    Col
+} from 'antd';
+import { getTechField } from '@/DicTechFieldList.js';
+import {areaSelect,getProvince } from '@/NewDicProvinceList';
+import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
+import {  splitUrl, companySearch, getDemandType, getAchievementCategory,getReleaseStateList,getReleasePositionList } from '@/tools.js';
+const FormItem = Form.Item;
+
+const DemandDetail = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            auditStatus: 0,
+            textFileList: [],
+            videoFileList: [],
+            pictureUrl: [],
+        };
+    },
+    loadData(id) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context +  '/api/user/demand/demandDetail' ,
+            data: {
+                id: id
+            },
+            success: function (data) {
+                let thisData = data.data;
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                };
+                let publishPagesArr = [];
+                thisData.publishPages.map(item=>{
+					publishPagesArr.push(item.publishPage)
+                })
+				// let ProvinceCityArr = [];
+				// let ProvinceS = thisData.locationProvince; //getprovince
+				// let citys = thisData.locationCity;
+				// let Areas = thisData.locationArea;
+				// ProvinceCityArr.push(ProvinceS, citys, Areas);
+                this.setState({
+					//ProvinceCity:ProvinceCityArr,
+                    id:thisData.id,
+                    publishPagesArr:publishPagesArr,
+					data: thisData,
+					isHot:thisData.isHot,
+					isUrgent:thisData.isUrgent,
+					status:thisData.status,
+					isHot:thisData.isHot,
+                    pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getPictureUrl(e) {
+        this.setState({ pictureUrl: e });
+    },
+	cancelFun(){
+		this.props.closeDesc();
+    },
+    //审核通过/拒绝
+    updateFun(index){
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "get",
+            dataType: "JSON",
+            crossDomain: false,
+            url: globalConfig.context +  '/api/admin/demand/auditDemand',
+            data: {
+                id: this.state.id,
+                auditResult:index,
+                auditInfo:this.state.refuseValue
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功!');
+                this.setState({
+                    loading: false,
+                });
+                this.props.handOk()
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    //审核拒绝
+    refuse(){
+        this.setState({
+            refuseValue:'',
+            refuseVisible:true
+        })
+    },
+    refuseOk(){
+        if(!this.state.refuseValue){
+            message.warning('请填写拒绝原因。')
+            return;
+        }
+        this.setState({
+            refuseVisible:false
+        })
+        this.updateFun(0)
+    },
+    refuseCancel(){
+        this.setState({
+            refuseValue:'',
+            refuseVisible:false
+        })
+    },
+    componentWillMount() {
+        if (this.props.data.id) {
+            this.loadData(this.props.data.id);
+        } else {
+            this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.videoFileList = [];
+            if (nextProps.data.id) {
+                this.loadData(nextProps.data.id);
+            } else {
+				this.state.data = {};
+				this.state.demandType=undefined; //需求类型
+				this.state.urgent=undefined;//加急需求
+				this.state.offer=undefined;//是否悬赏
+				this.state.hotDemand=undefined;
+				this.state.solve=undefined;
+                this.state.pictureUrl = [];
+            };
+            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 (
+			<div className='login'>
+			<Form layout="horizontal" id="demand-form">
+				<Spin spinning={this.state.loading}>
+                <div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="发个需求吧">
+                            <span>{theData.problemDes}</span>
+                        </FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="标题">
+                            <span>{theData.name}</span>
+						</FormItem>
+					</div>
+                    <div className>
+                        <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="关键字">
+                            <span>{theData.keyword}</span>
+                        </FormItem>
+                    </div>
+					<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>
+						{theData.demandType=='5'&&
+							<FormItem className="half-item" {...formItemLayout} label="人才需求酬劳">
+							     <span>{theData.crowdCost} 元/月</span>
+						    </FormItem>}
+						{theData.demandType=='3'&&<div className="clearfix"><FormItem className="half-item" {...formItemLayout} label="资金需求额度">
+                            <span>{theData.budgetCost}万元</span>
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="资金用途">
+							<span>{theData.researchType=='1'&&'扩大再生产'}</span>
+                            <span>{theData.researchType=='0'&&'研发'}</span>
+						</FormItem>
+						</div>
+						}
+					</div>
+					<p style={{marginLeft:40,fontSize:18,marginBottom:15}}>您还可以说明</p>
+					<div className="clearfix">
+						<FormItem className="half-item" {...formItemLayout} label="加急需求">
+                            <span>{theData.isUrgent?'加急':'非加急'}</span>
+						</FormItem>
+						{theData.isUrgent?<div><FormItem className="half-item" {...formItemLayout} label="日期">
+							<span>{theData.urgentDays}</span>
+                        </FormItem>
+                        <FormItem className="half-item" {...formItemLayout} label="悬赏金额">
+							<span style={{ marginLeft: '20px' }}>{theData.urgentMoney}万元</span>
+						</FormItem>
+                        </div>:''}
+					</div>
+					<div className="clearfix">
+						<FormItem className="half-item" {...formItemLayout} label="热点需求">
+                            <span>{theData.isHot?'热点':'非热点'}</span>
+						</FormItem>
+						<FormItem className="half-item" {...formItemLayout} label="解决">
+                            <span>
+                                {theData.status=='0'&&'进行中'}
+                                {theData.status=='1'&&'未解决'}
+                                {theData.status=='2'&&'已解决'}
+                            </span>
+						</FormItem>
+					</div>
+					<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>
+					<div>
+						<FormItem className="half-item" {...formItemLayout} label="发布状态">
+							<span>{getReleaseStateList(theData.auditStatus)}</span>
+						</FormItem>
+					</div>
+                    <div>
+                        <FormItem className="half-item" labelCol={{ span: 6 }}
+							wrapperCol={{ span: 18 }} label="发布位置">
+                                 <span>{getReleasePositionList(this.state.publishPagesArr)}</span>
+						</FormItem>
+                    </div>
+                    <div className="clearfix">
+                            <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="审核信息">
+                                <span>{theData.auditInfo}</span>
+                            </FormItem>
+					</div>
+					<div className="clearfix">
+						{this.props.examineState&&<FormItem wrapperCol={{ span: 12, offset: 3 }}>
+							<Button className="set-submit" type="primary"  onClick={(e)=>{this.updateFun(1)}} >
+								审核通过
+							</Button>
+							<Button type="danger" style={{marginRight:20}} onClick={(e)=>{this.refuse()}}>
+								审核拒绝
+							</Button>
+							<Button className="set-submit" type="ghost" onClick={this.cancelFun}>
+								取消
+							</Button>
+						</FormItem>}
+					</div>
+				</Spin>
+			</Form>   
+            <Modal
+                title="审核拒绝"
+                visible={this.state.refuseVisible}
+                onOk={this.refuseOk}
+                onCancel={this.refuseCancel}
+                >   
+                    <div>
+                        <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="拒绝原因">
+                            <Input type="textarea" rows={4} value={this.state.refuseValue} placeholder="输入拒绝原因" onChange={(e)=>{this.setState({refuseValue:e.target.value})}}/>
+                        </FormItem>
+                    </div>
+                </Modal> 
+		</div>
+        )
+    }
+}));
+export default DemandDetail;
+
+
+
+

+ 282 - 0
js/component/administration/achievement/achievementExamine.jsx

@@ -0,0 +1,282 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './techAchievement.less';
+import TechDemandDesc from './achievementDesc.jsx';
+import { demandTypeList,achievementCategoryList } from '@/dataDic.js';
+import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
+import { getTransaction,getReleaseStateList,getAchievementCategory } from '@/tools.js';
+
+const DemandList = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/list",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                employerName: this.state.employerNameSearch,//客户名称
+                name: this.state.nameSearch,
+                demandType: this.state.demandTypeSearch ? Number(this.state.demandTypeSearch) : undefined,
+                status: this.state.statusSearch ? Number(this.state.statusSearch) : undefined,
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
+                auditStatus: 1
+            },
+            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,
+                            status: thisdata.status,
+                            name: thisdata.name,
+                            demandType: thisdata.demandType,
+                            auditStatus: thisdata.auditStatus,
+                            isHot: thisdata.isHot,
+                            isUrgent: thisdata.isUrgent,
+                            employerName:thisdata.employerName,
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            releaseDate:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            validityPeriodDate: [],
+            releaseDate: [],
+            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: 'demandType',
+                    key: 'demandType',
+                    render: (text) => { return getTransaction(text); }
+                },
+                {
+                    title: '知识产权类型',
+                    dataIndex: 'demandType1',
+                    key: 'demandType1',
+                    render: (text) => { return getAchievementCategory(text); }
+                },
+                {
+                    title: '行业领域',
+                    dataIndex: 'industryCategory',
+                    key: 'industryCategory',
+                    render: (text,recard) => { return getIndustryCategory(recard.industryCategoryA,recard.industryCategoryB) }
+                },
+                {
+                    title: '客户名称',
+                    dataIndex: 'employerName',
+                    key: 'employerName'
+                },
+                {
+                    title: '发布状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => { return getReleaseStateList(text) }
+                },
+                {
+                    title: '审核',
+                    dataIndex: 'caozuo',
+                    key: 'caozuo',
+                    render:(text,recard) => {
+                        return  <div className="btnRight">
+                                   <Button type="primary" onClick={(e)=>{e.stopPropagation();this.tableRowClick(recard)}}>审核</Button>
+                                </div>
+                    }
+                }
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    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;
+        this.loadData();
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true,
+            examineState:true
+        });
+    },
+    delectRow(recard) {
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/demand/delete",
+            data: {
+                ids: recard.id
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData(this.state.page);
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.demandTypeSearch = undefined;
+        this.state.auditStatus = undefined;
+        this.state.statusSearch = undefined;
+        this.state.employerNameSearch='';
+        this.state.releaseDate = [];
+        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>
+                <div className="user-search">
+                    <Input placeholder="成果名称"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                    <Select placeholder="选择成果类型"
+                        style={{ width: 120 }}
+                        value={this.state.demandTypeSearch}
+                        onChange={(e) => { this.setState({ demandTypeSearch: e }) }}>
+                        {this.state.demandTypeOption}
+                    </Select>
+                    <Select placeholder="知识产权类型" style={{ width: 120 }}
+                        value={this.state.auditStatus1}
+                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                        { 
+                            achievementCategoryList.map(function (item) {
+                                return	<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+                            })
+                        }
+                    </Select>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <Input style={{width:140,marginRight:10}} value={this.state.employerNameSearch} onChange={(e)=>{this.setState({employerNameSearch:e.target.value})}} placeholder="客户名称"/>
+                        <span>发布时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                             />
+                    </Spin>
+                </div>
+                <TechDemandDesc
+                    data={this.state.RowData}
+                    demandTypeOption={this.state.demandTypeOption}
+                    examineState={this.state.examineState}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default DemandList;

+ 297 - 0
js/component/administration/achievement/techAchievement.jsx

@@ -0,0 +1,297 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './techAchievement.less';
+import TechDemandDesc from './achievementDesc.jsx';
+import { achievementType,achievementCategoryList } from '@/dataDic.js';
+import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
+import { getTransaction,getReleaseStateList ,getAchievementCategory} from '@/tools.js';
+
+const DemandList = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/demand/list",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                employerName: this.state.employerNameSearch,//客户名称
+                name: this.state.nameSearch,
+                demandType: this.state.demandTypeSearch ? Number(this.state.demandTypeSearch) : undefined,
+                status: this.state.statusSearch ? Number(this.state.statusSearch) : undefined,
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
+            },
+            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,
+                            status: thisdata.status,
+                            name: thisdata.name,
+                            demandType: thisdata.demandType,
+                            auditStatus: thisdata.auditStatus,
+                            isHot: thisdata.isHot,
+                            isUrgent: thisdata.isUrgent,
+                            employerName:thisdata.employerName,
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            releaseDate:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            validityPeriodDate: [],
+            releaseDate: [],
+            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: 'demandType',
+                    key: 'demandType',
+                    render: (text) => { return getTransaction(text); }
+                },
+                {
+                    title: '知识产权类型',
+                    dataIndex: 'demandType1',
+                    key: 'demandType1',
+                    render: (text) => { return getAchievementCategory(text); }
+                },
+                {
+                    title: '行业领域',
+                    dataIndex: 'industryCategory',
+                    key: 'industryCategory',
+                    render: (text,recard) => { return getIndustryCategory(recard.industryCategoryA,recard.industryCategoryB) }
+                },
+                {
+                    title: '热门标识',
+                    dataIndex: 'isHot',
+                    key: 'isHot',
+                    render: text => { return text?'热门':'非热门'; }
+                },
+                {
+                    title: '精品标识',
+                    dataIndex: 'isUrgent',
+                    key: 'isUrgent',
+                    render: text => { return text?'精品':'非精品' }
+                },
+                {
+                    title: '客户名称',
+                    dataIndex: 'employerName',
+                    key: 'employerName'
+                },
+                {
+                    title: '发布状态',
+                    dataIndex: 'auditStatus',
+                    key: 'auditStatus',
+                    render: text => { return getReleaseStateList(text) }
+                },
+                {
+                    title: '发布时间',
+                    dataIndex: 'releaseDate',
+                    key: 'releaseDate'
+                }
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    componentWillMount() {
+        let theArr = [];
+        achievementType.map(function (item) {
+            theArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        this.state.demandTypeOption = theArr;
+        this.loadData();
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true,
+            examineState:false
+        });
+    },
+    delectRow(recard) {
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/demand/delete",
+            data: {
+                ids: recard.id
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.demandTypeSearch = undefined;
+        this.state.auditStatus = undefined;
+        this.state.statusSearch = undefined;
+        this.state.employerNameSearch='';
+        this.state.releaseDate = [];
+        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>
+                <div className="user-search">
+                    <Input placeholder="成果名称"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                    <Select placeholder="选择成果类型"
+                        style={{ width: 120 }}
+                        value={this.state.demandTypeSearch}
+                        onChange={(e) => { this.setState({ demandTypeSearch: e }) }}>
+                        {this.state.demandTypeOption}
+                    </Select>
+                    <Select placeholder="发布状态" style={{ width: 120 }}
+                        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.auditStatus1}
+                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                        { 
+                            achievementCategoryList.map(function (item) {
+                                return	<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+                            })
+                        }
+                    </Select>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <Input style={{width:140,marginRight:10}} value={this.state.employerNameSearch} onChange={(e)=>{this.setState({employerNameSearch:e.target.value})}} placeholder="客户名称"/>
+                        <span>发布时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <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}
+                    examineState={this.state.examineState}
+                    demandTypeOption={this.state.demandTypeOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div>
+        );
+    }
+});
+
+export default DemandList;

+ 13 - 6
js/component/account/achievement/techAchievement.less

@@ -19,27 +19,33 @@
         .ant-switch {
             margin-left: 10px;
         }
+        
         .search-more {
             margin: 10px 0;
-            >span {
+            span {
                 margin-right: 10px
             }
         }
     }
 }
-
+button:focus,button:active{
+    outline: none
+}
+.btnRight button{
+    margin-right: 10px;
+}
 .patent-addNew {
     float: right;
     margin-left: 20px;
-    .addButton {
+    button {
         background: #ea0862;
         color: #fff;
         border: none;
         border-radius: 4px;
-        padding: 4px 10px;
+        padding: 6px 10px;
         margin-left: 20px;
     }
-    .addButton:hover {
+    button:hover {
         background: #ea0862;
     }
 }
@@ -82,9 +88,10 @@
         margin-left: 20px;
     }
 }
+
 .ant-table-thead {
     .ant-table-selection-column {
-        .ant-checkbox-wrapper{
+        .ant-checkbox-wrapper {
             display: none;
         }
     }

+ 2 - 2
js/component/administration/demand/DemandExamine.jsx

@@ -139,7 +139,7 @@ const DemandList = React.createClass({
                         return  <div>
                                     {text=='0'&&<span>进行中</span>}
                                     {text=='1'&&<span>未解决</span>}
-                                    {text=='1'&&<span>已解决</span>}
+                                    {text=='2'&&<span>已解决</span>}
                                 </div>
 
                      }
@@ -213,7 +213,7 @@ const DemandList = React.createClass({
     closeDesc(e, s) {
         this.state.showDesc = e;
         if (s) {
-            this.loadData();
+            this.loadData(this.state.page);
         };
     },
     search() {

+ 3 - 3
js/component/administration/demand/techDemand.jsx

@@ -139,7 +139,7 @@ const DemandList = React.createClass({
                         return  <div>
                                     {text=='0'&&<span>进行中</span>}
                                     {text=='1'&&<span>未解决</span>}
-                                    {text=='1'&&<span>已解决</span>}
+                                    {text=='2'&&<span>已解决</span>}
                                 </div>
 
                      }
@@ -147,7 +147,7 @@ const DemandList = React.createClass({
                 {
                     title: '创建时间',
                     dataIndex: 'createTime',
-                    key: 'createTime'
+                    key: 'createTime',
                 },
                 {
                     title: '发布时间',
@@ -203,7 +203,7 @@ const DemandList = React.createClass({
     closeDesc(e, s) {
         this.state.showDesc = e;
         if (s) {
-            this.loadData();
+            this.loadData(this.state.page);
         };
     },
     search() {

+ 56 - 2
js/component/dataDic.js

@@ -2181,7 +2181,7 @@ module.exports = {
 	        key: "已撤销"
 	    }, 
     ],
-     //发布位置
+     //需求发布位置
      releasePosition:[
         {
 	        value: "web_index",
@@ -2202,5 +2202,59 @@ module.exports = {
 	        value: "app_demand_list",
 	        key: "APP需求搜索页"
 	    }
-    ]
+    ],
+    //成果发布位置
+    achievementPosition:[
+        {
+	        value: "web_index",
+	        key: "网站首页"
+	    },{
+	        value: "web_achievement_main",
+	        key: "网站成果主页"
+	    }, {
+	        value: "web_achievement_list",
+	        key: "网站成果搜索页"
+	    },{
+	        value: "app_index",
+	        key: "APP首页"
+	    },{
+	        value: "app_achievement_main",
+	        key: "APP成果首页"
+	    }, {
+	        value: "app_achievement_list",
+	        key: "APP成果搜索页"
+	    }
+    ],
+    //成果类型
+    achievementType:[
+        {
+	        value: "0",
+	        key: "知识产权"
+	    },{
+	        value: "1",
+	        key: "实用技术"
+	    }, {
+	        value: "2",
+	        key: "科技产品"
+	    } 
+    ],
+    //成果交易形式
+    transaction:[
+        {
+	        value: "0",
+	        key: "产权转让"
+	    },{
+	        value: "1",
+	        key: "授权生产"
+	    }, {
+	        value: "2",
+	        key: "实施许可"
+        }, {
+	        value: "3",
+	        key: "作价入股"
+	    },{
+	        value: "4",
+	        key: "合作开发"
+	    }
+    ],
 };

+ 47 - 4
js/component/tools.js

@@ -75,7 +75,10 @@ import {
     distributeState,
     customerSource,
     releaseStateList,
-    releasePosition
+    releasePosition,
+    achievementPosition,
+    achievementType,
+    transaction
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
@@ -575,7 +578,7 @@ module.exports = {
     },
     //获取成果类型
     getAchievementCategory: function (e) {
-        if (e) {
+        if (e||e=='0') {
             let theType = '';
             achievementCategoryList.map(function (item) {
                 if (item.value == e) {
@@ -636,7 +639,7 @@ module.exports = {
     },
     //获取创新度状态
     getInnovation: function (e) {
-        if (e) {
+        if (e||e=='0') {
             let theType = '';
             innovationList.map(function (item) {
                 if (item.value == e) {
@@ -1387,7 +1390,7 @@ module.exports = {
          return theType;
         }
      },
-     //发布位置;
+     //需求发布位置;
      getReleasePositionList:function(e=[]){
         if (e) {
             let theType = [];
@@ -1400,5 +1403,45 @@ module.exports = {
             })
          return theType.join(' - ');
         }
+     },
+     //成果发布位置;
+     getAchievementPosition:function(e=[]){
+        if (e) {
+            let theType = [];
+            e.map((item)=>{
+                achievementPosition.map(function (atem) {
+                    if (atem.value == item) {
+                        theType.push(atem.key);
+                    };
+                });
+            })
+         return theType.join(' - ');
+        }
+     },
+     //成果类型;
+     getAchievementType:function(e){
+        if (e||e==0) {
+            let str=e.toString();
+            let theType = '';
+            releaseStateList.map(function (item) {
+                if (item.value == str) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+     },
+     //成果交易形式;
+     getTransaction:function(e){
+        if (e||e==0) {
+            let str=e.toString();
+            let theType = '';
+            transaction.map(function (item) {
+                if (item.value == str) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
      }
 }