dengzhiguo 7 роки тому
батько
коміт
6e86271683

+ 8 - 5
js/component/manageCenter/achievement/techAchievement.jsx

@@ -42,6 +42,7 @@ const AchievementList = React.createClass({
                 hot:this.state.hot,
                 createDateStartDate: this.state.releaseDateS[0],
                 createDateEndDate: this.state.releaseDateS[1],
+                ownerType:this.state.ownerType,
             },
             success: function (data) {
                 let theArr = [];
@@ -130,10 +131,6 @@ const AchievementList = React.createClass({
                     key: 'category',
                     render: text => { return getAchievementCategory(text); }
                 }, {
-                    title: '所有人名称',
-                    dataIndex: 'theName',
-                    key: 'theName',
-                }, {
                     title: '录入人',
                     dataIndex: 'techBrokerId',
                     key: 'techBrokerId',
@@ -313,7 +310,7 @@ const AchievementList = React.createClass({
                             showUploadList={false}
                             onChange={(info) => {
                                 if (info.file.status !== 'uploading') {
-                                    console.log(info.file, info.fileList);
+                                    
                                 }
                                 if (info.file.status === 'done') {
                                     if (!info.file.response.error.length) {
@@ -388,6 +385,12 @@ const AchievementList = React.createClass({
                             <Select.Option value="0" >未发布</Select.Option>
                             <Select.Option value="1" >已发布</Select.Option>
                         </Select>
+                        <Select placeholder="选择所有人类型" style={{ width: 120 }}
+                            value={this.state.ownerType}
+                            onChange={(e) => { this.setState({ ownerType: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
                         <div style={{marginTop:'10px'}}>
                         <span>发布时间 :</span>
                         <RangePicker

+ 20 - 7
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -151,13 +151,15 @@ const AchievementDetailShow = Form.create()(React.createClass({
         this.setState({
             loading: true
         });
+      
         $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + detailApiUrl,
             data: {
-                id: id
+                id: id,
+                ownerType:this.props.data.ownerType
             },
             success: function (data) {
                 let thisData = data.data;
@@ -169,7 +171,6 @@ const AchievementDetailShow = Form.create()(React.createClass({
                 };
                 this.setState({
                     data: thisData,
-                    
                     orgDisplay: thisData.ownerType,
                     switchValue: Boolean(!thisData.ownerId),
                     radios:thisData.hot==='1'?true:false,
@@ -338,6 +339,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
         });
     },
     componentWillMount() {
+    	
         this.loadData(this.props.data.id, this.props.detailApiUrl);
     },
     componentWillReceiveProps(nextProps) {
@@ -951,7 +953,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
 
         this.props.form.validateFields((err, values) => {
             //keyword长度判断
-            console.log(typeof values.field[0])
+           
             if ((this.state.tags ? this.state.tags.length : this.props.tags.length) < 3) {
                 message.warning('关键词数量不能小于3个!');
                 return;
@@ -1029,7 +1031,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         //
                         ownerId: !this.state.switchValue ? (this.state.dataSourceObj ? this.state.dataSourceObj[values.iOwnerName] : this.state.data.ownerId) : undefined,
                         contacts: !this.state.switchValue ? values.contacts : undefined,
-                        ownerType: this.props.detailApiUrl.indexOf('org') != -1 ? 1 : 0,
+                        ownerType: this.state.ownerType,//this.props.detailApiUrl.indexOf('org') != -1 ? 1 : 0,
                         //自定义
                         ownerName: this.state.switchValue ? values.ownerName : undefined,
                         ownerIdNumber: this.state.switchValue ? values.ownerIdNumber : undefined,
@@ -1233,6 +1235,17 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     <FormItem
                         labelCol={{ span: 4 }}
                         wrapperCol={{ span: 18 }}
+                        label="成果类别" >
+                        <Select placeholder="选择成果类别" style={{ width: 120 }}
+                            value={this.state.ownerType}
+                            onChange={(e) => { this.setState({ ownerType: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 4 }}
+                        wrapperCol={{ span: 18 }}
                         label="摘要" >
                         {getFieldDecorator('summary', {
                             initialValue: theData.summary
@@ -1334,7 +1347,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             fileList={this.state.textFileList}
                             onChange={(info) => {
                                 if (info.file.status !== 'uploading') {
-                                    console.log(info.file, info.fileList);
+                                   
                                 }
                                 if (info.file.status === 'done') {
                                     if (!info.file.response.error.length) {
@@ -1582,7 +1595,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             fileList={this.state.techPlanFileList}
                             onChange={(info) => {
                                 if (info.file.status !== 'uploading') {
-                                    console.log(info.file, info.fileList);
+                                   
                                 }
                                 if (info.file.status === 'done') {
                                     if (!info.file.response.error.length) {
@@ -1617,7 +1630,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             fileList={this.state.businessPlanFileList}
                             onChange={(info) => {
                                 if (info.file.status !== 'uploading') {
-                                    console.log(info.file, info.fileList);
+                                   
                                 }
                                 if (info.file.status === 'done') {
                                     if (!info.file.response.error.length) {

+ 8 - 4
js/component/manageCenter/demand/techDemand.jsx

@@ -44,6 +44,7 @@ const DemandList = React.createClass({
                 auditStatus: this.state.auditStatus,
                 boutique:this.state.boutique,
                 hot:this.state.hot,
+                dataCategory:this.state.dataCategory,
                 employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
                 username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
                 unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
@@ -176,10 +177,6 @@ const DemandList = React.createClass({
                         }
                     }
                 }, {
-                    title: '雇主名称',
-                    dataIndex: 'theName',
-                    key: 'theName',
-                }, {
                     title: '加急天数',
                     dataIndex: 'urgentDays',
                     key: 'urgentDays',
@@ -411,6 +408,7 @@ const DemandList = React.createClass({
         this.state.status = undefined;
         this.state.releaseStatus = undefined;
         this.state.auditStatus = undefined;
+        this.state.dataCategory = undefined;
         this.state.validityPeriodDate = [];
         this.state.releaseDate = [];
         this.state.releaseDateS = [];
@@ -539,6 +537,12 @@ const DemandList = React.createClass({
                             <Select.Option value="0" >未发布</Select.Option>
                             <Select.Option value="1" >已发布</Select.Option>
                         </Select>
+                        <Select placeholder="选择需求类别" style={{ width: 120 }}
+                            value={this.state.dataCategory}
+                            onChange={(e) => { this.setState({ dataCategory: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
                         <div style={{ marginTop: '10px' }}>
 	                        <span style={{ marginLeft: '10px' }}>有效期限 : </span>
 	                        <RangePicker

+ 14 - 3
js/component/manageCenter/demand/techDemandDesc.jsx

@@ -419,7 +419,7 @@ const DemandDetailShow = Form.create()(React.createClass({
                     {this.state.switchValue ? <div>
                         <FormItem className="half-item"
                             {...formItemLayout}
-                            label="雇主名称333" >
+                            label="雇主名称" >
                             <span>{theData.employerName}</span>
                         </FormItem>
                         <FormItem className="half-item"
@@ -872,7 +872,7 @@ const DemandDetailForm = Form.create()(React.createClass({
                     url: this.props.data.id ? globalConfig.context + '/api/admin/demand/update' : globalConfig.context + '/api/admin/demand/apply',
                     data: {
                         id: this.props.data.id,
-                        dataCategory: this.props.detailApiUrl.indexOf('org') >= 0 ? 1 : 0,
+                        dataCategory: this.state.dataCategory,//this.props.detailApiUrl.indexOf('org') >= 0 ? 1 : 0
                         serialNumber: this.props.data.serialNumber,
                         name: values.name,
                         keyword: this.state.tags ? this.state.tags.join(",") : this.props.tags.join(","),
@@ -1029,7 +1029,7 @@ const DemandDetailForm = Form.create()(React.createClass({
                         </FormItem>
                         <FormItem className="half-item"
                             {...formItemLayout}
-                            label="需求名称" >
+                            label="需求名称111" >
                             {getFieldDecorator('name', {
                                 rules: [{ required: true, message: '此项为必填项!' }],
                                 initialValue: theData.name
@@ -1210,6 +1210,17 @@ const DemandDetailForm = Form.create()(React.createClass({
                     </FormItem>
                     <FormItem
                         labelCol={{ span: 3 }}
+                        wrapperCol={{ span: 20 }}
+                        label="需求类别" >
+                        <Select placeholder="选择需求类别" style={{ width: 120 }}
+                            value={this.state.dataCategory}
+                            onChange={(e) => { this.setState({ dataCategory: e }) }}>
+                            <Select.Option value="0" >个人</Select.Option>
+                            <Select.Option value="1" >组织</Select.Option>
+                        </Select>
+                    </FormItem>
+                    <FormItem
+                        labelCol={{ span: 3 }}
                         wrapperCol={{ span: 18 }}
                         label="行业类别" >
                         {getFieldDecorator('industryCategory', {