dengzhiguo 7 years ago
parent
commit
760d1b59d5

+ 3 - 1
js/component/manageCenter/achievement/techAchievementRelease/techAchievementAudit.jsx

@@ -70,6 +70,7 @@ const AchievementList = React.createClass({
                             auditStatus: thisdata.auditStatus,
                             boutique: thisdata.boutique,
                             hot: thisdata.hot,
+                            releaseStatus: thisdata.releaseStatus,
                             techBrokerId:thisdata.techBrokerId,
                             createTimeFormattedDate: thisdata.createTimeFormattedDate,
                             remark:thisdata.remark
@@ -169,8 +170,9 @@ const AchievementList = React.createClass({
                     dataIndex: 'ee',
                     key: 'ee',
                     render: (text, record, index) => {
+                    	console.log(record);
 						return <div>
-							{!record.releaseStatus?<Popconfirm title={'请确认发布成果【'+record.name+'】'} onConfirm={(e)=>{this.examineOK(record)}} okText="确认" cancelText="取消">
+							{(!record.releaseStatus)?<Popconfirm title={'请确认发布成果【'+record.name+'】'} onConfirm={(e)=>{this.examineOK(record)}} okText="确认" cancelText="取消">
 							    <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="primary">发布</Button>                 
 							</Popconfirm>:
 							<Popconfirm title={'请确认撤销发布成果【'+record.name+'】'} onConfirm={(e)=>{this.examineCancel(record)}} okText="确认" cancelText="取消">

+ 3 - 2
js/component/manageCenter/demand/demandAudit/techDemandAudit.jsx

@@ -85,6 +85,7 @@ const TechDemandPublish = React.createClass({
                             hot: thisdata.hot,
                             techBrokerId:thisdata.techBrokerId,
                             createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                            techBrokerIdd:thisdata.techBrokerIdd,
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -311,7 +312,7 @@ const TechDemandPublish = React.createClass({
                 deletedIds.push(rowItem.id,rowItem.techBrokerIdd)
             };
         };
-        console.log(deletedIds)
+        console.log(deletedIds);
         this.setState({
             selectedRowKeys: [],
             loading: deletedIds.length > 0
@@ -320,7 +321,7 @@ const TechDemandPublish = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + '/api/admin/audit/achievement',
+            url: globalConfig.context + '/api/admin/audit/demand',
             data: {
                 id: deletedIds[0],
                 auditStatus:nub,

+ 2 - 2
js/component/manageCenter/demand/demandRelease/demandReleaseDesc.jsx

@@ -154,7 +154,7 @@ const DemandDetailShow = Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + detailApiUrl,
+            url: globalConfig.context + "/api/admin/demand/orgDemandDetail",
             data: {
                 id: id,
                 dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
@@ -832,7 +832,7 @@ const DemandDetail = React.createClass({
         }.bind(this));
     },
     tableRowClick(record, index) {
-    	
+    	console.log(111);
         window.open(globalConfig.context + '/portal/detail/achievementDetail.html?id=' + record.id + '&type=' + record.ownerType);
     },
     handleCancel(e) {

+ 3 - 5
js/component/manageCenter/demand/demandRelease/techDemandRelease.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload ,Popconfirm} from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -22,7 +22,7 @@ const TechDemandPublish = React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + (apiUrl || this.props['data-listApiUrl']),
+            url: globalConfig.context +'/api/admin/demand/orgList',
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
@@ -235,7 +235,7 @@ const TechDemandPublish = React.createClass({
                     key: 'ee',
                     render: (text, record, index) => {
 						return <div>
-							{!record.releaseStatus?<Popconfirm title={'请确认发布需求【'+record.name+'】'} onConfirm={(e)=>{this.examineOK(record)}} okText="确认" cancelText="取消">
+							{(record.releaseStatus=="0")?<Popconfirm title={'请确认发布需求【'+record.name+'】'} onConfirm={(e)=>{this.examineOK(record)}} okText="确认" cancelText="取消">
 							    <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="primary">发布</Button>                 
 							</Popconfirm>:
 							<Popconfirm title={'请确认撤销发布需求【'+record.name+'】'} onConfirm={(e)=>{this.examineCancel(record)}} okText="确认" cancelText="取消">
@@ -532,8 +532,6 @@ const TechDemandPublish = React.createClass({
                     </Radio.Group>                   
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
-                     <Button type='primary' onClick={this.examineOK} disabled={!hasSelected}>发布</Button>
-                    <Button type='primary' onClick={this.examineCancel} disabled={!hasSelected}>撤销发布</Button>
                     <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                         disabled={!hasSelected}
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>

+ 10 - 8
js/component/manageCenter/demand/techDemandQueryDesc.jsx

@@ -145,10 +145,11 @@ const DemandDetailShow = Form.create()(React.createClass({
             coverImg: []           
         };
     },
-    loadData(id, detailApiUrl,dataCategory) {
+    loadData(id, detailApiUrl) {
         this.setState({
             loading: true
         });
+        console.log(this.props.data);
         $.ajax({
             method: "get",
             dataType: "json",
@@ -156,7 +157,7 @@ const DemandDetailShow = Form.create()(React.createClass({
             url: globalConfig.context + detailApiUrl,
             data: {
                 id: id,
-                dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
+                dataCategory:this.props.data.dataCategory
             },
             success: function (data) {
             	
@@ -330,14 +331,14 @@ const DemandDetailShow = Form.create()(React.createClass({
         }.bind(this));
     },
     componentWillMount() {
-        this.loadData(this.props.data.id, this.props.detailApiUrl,nextProps.data.dataCategory);
+        this.loadData(this.props.data.id, this.props.detailApiUrl);
         if (this.props.data.employerId && this.props.data.dataCategory) {
             this.getContactsList(this.props.data.employerId);
         };
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
-            this.loadData(nextProps.data.id, nextProps.detailApiUrl);
+        	this.loadData(nextProps.data.id, nextProps.detailApiUrl);
             if (nextProps.data.employerId && nextProps.data.dataCategory) {
                 this.getContactsList(nextProps.data.employerId);
             };
@@ -767,10 +768,11 @@ const DemandDetailForm = Form.create()(React.createClass({
             }.bind(this),
         });
     },
-    loadData(id, detailApiUrl,dataCategory) {
+    loadData(id, detailApiUrl) {
         this.setState({
             loading: true
         });
+        console.log(this.props.data);
         $.ajax({
             method: "get",
             dataType: "json",
@@ -778,7 +780,7 @@ const DemandDetailForm = Form.create()(React.createClass({
             url: globalConfig.context + detailApiUrl,
             data: {
                 id: id,
-                dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
+                dataCategory:this.props.data.dataCategory
             },
             success: function (data) {
                 let thisData = data.data;
@@ -977,9 +979,9 @@ const DemandDetailForm = Form.create()(React.createClass({
         };
     },
     componentWillReceiveProps(nextProps) {
-        if (!this.props.visible && nextProps.visible) {
+    	if (!this.props.visible && nextProps.visible) {
             if (nextProps.data && nextProps.data.id) {
-                this.loadData(nextProps.data.id, nextProps.detailApiUrl,nextProps.data.dataCategory);
+            	this.loadData(nextProps.data.id, nextProps.detailApiUrl);
             };
             this.state.contactsOption = [];
             this.state.data = {};