瀏覽代碼

添加了资源发布和需求状态

luyanan 8 年之前
父節點
當前提交
5053ff2c63

+ 21 - 5
src/main/webapp/css/workspace.css

47
.resoutab{ margin:20px; min-width:500px;}
47
.resoutab{ margin:20px; min-width:500px;}
48
.resoutab tr td{ min-width:200px; max-width:500px; padding:4px; }
48
.resoutab tr td{ min-width:200px; max-width:500px; padding:4px; }
49
.resouinfotype{ font-weight:normal; text-align:right;}
49
.resouinfotype{ font-weight:normal; text-align:right;}
50
.resouimg{width:100%; height:200px; position:relative; overflow:hidden;  }
51
.resouup{display: block;width: 100%;height: 50px;position: absolute;bottom: -50px;background-color: rgba(0,0,0,0.4);font: 14px/44px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";color: #fff; text-align:center;}
50
.resouimg{width:200px; height:200px; position:relative; overflow:hidden;  }
51
.resouup{display: block;width: 100%;height: 50px;position: absolute;/*bottom: -50px;*/background-color: rgba(0,0,0,0.4);font: 14px/44px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei";color: #fff; text-align:center;}
52
#resouup{ width: 100%;height:50px;box-shadow: none;opacity:0; position: absolute;left:0;top:0px;cursor: pointer;}
52
#resouup{ width: 100%;height:50px;box-shadow: none;opacity:0; position: absolute;left:0;top:0px;cursor: pointer;}
53
.workclose{ position:absolute; top:16px; right:0px; background:#ff8400; color:#fff;font: 14px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; padding-left:8px; display:block; width:46px; border-radius:10px 0px 0px 10px; height:30px; cursor:pointer; z-index:999;}
53
.workclose{ position:absolute; top:16px; right:0px; background:#ff8400; color:#fff;font: 14px/30px \5FAE\8F6F\96C5\9ED1,"Microsoft YaHei"; padding-left:8px; display:block; width:46px; border-radius:10px 0px 0px 10px; height:30px; cursor:pointer; z-index:999;}
54

54

60
.tcdPageCode a:hover{text-decoration: none;}
60
.tcdPageCode a:hover{text-decoration: none;}
61
.tcdPageCode span.current{display: inline-block;height:30px;line-height: 30px;padding: 0 6px;margin: 0 8px;color: #fff;background-color: #ff8400;	border: 1px solid #a5a5a5;;vertical-align: middle;border-radius:5px;}
61
.tcdPageCode span.current{display: inline-block;height:30px;line-height: 30px;padding: 0 6px;margin: 0 8px;color: #fff;background-color: #ff8400;	border: 1px solid #a5a5a5;;vertical-align: middle;border-radius:5px;}
62
.tcdPageCode span.disabled{	display: inline-block;height: 30px;line-height:30px;padding: 0 6px;margin: 0 8px;	color: #000;background: #fff;border: 1px solid #a5a5a5;vertical-align: middle; border-radius:5px;}
62
.tcdPageCode span.disabled{	display: inline-block;height: 30px;line-height:30px;padding: 0 6px;margin: 0 8px;	color: #000;background: #fff;border: 1px solid #a5a5a5;vertical-align: middle; border-radius:5px;}
63
.tcdPageCode li {
64
    display: inline;
65
}
63
.tcdPageCode li { display: inline;}
64
/*资源图片上传*/
65
/*.wrap{ height:200px;}
66
.jy-up-ch{ position: relative; width: 200px;}
67
.jy-up-ch .bch{ display: block; position: absolute; background-repeat: no-repeat; background-image: url(../images/bch.jpg); }
68
.jy-up-ch .bch1{ width: 15px; height: 20px; background-position: 0 0; left: 0; top: 10px; }
69
.jy-up-ch .bch2{ width: 39px; height: 24px; background-position: -15px 0px; left: 50%; margin-left: -39px; top: 7px; }
70
.jy-up-ch .bch3{ width: 37px; height: 24px; background-position: -54px 0px; left: 50%; top: 7px; }
71
.jy-up-ch .bch4{ width: 15px; height: 20px; background-position: -91px 0px; right: 0; top: 10px; }
72
.jy-up-ch .bch1:hover{ background-position: 0 -27px; }
73
.jy-up-ch .bch2:hover{ background-position: -15px -24px;}
74
.jy-up-ch .bch3:hover{ background-position: -54px -24px;}
75
.jy-up-ch .bch4:hover{ background-position: -91px -27px;}
76
.jc-demo-box{position: relative; background-color: #f8f8f8; width: 100%; height: 100%; overflow: hidden; }
77
.jcrop_w{ overflow: hidden; }
78
.jcrop_w img{ position: absolute; }*/
79

80

81


+ 2 - 3
src/main/webapp/js/account-set.js

1
$(function(){
1
$(function(){
2
			//loginStatus();
2
			//loginStatus();
3
		var servPath = "http://121.42.53.174:81";
4
		var userid = $.cookie("userid");
3
		var userid = $.cookie("userid");
5
	 	if(userid){
4
	 	if(userid){
6
			$(".head-portrait").show();
5
			$(".head-portrait").show();
7
			$(".unlogin").hide();
6
			$(".unlogin").hide();
8
	 		$(".portrait-p").attr("src",servPath+"/images/head/"+userid+"_m.jpg");
7
	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
9
			$(".portrait-p").load(function(){									
8
			$(".portrait-p").load(function(){									
10
			})
9
			})
11
			.error(function(){
10
			.error(function(){
12
				$(".portrait-p").attr("src",servPath+"/images/default-photo.jpg");
11
				$(".portrait-p").attr("src","/images/default-photo.jpg");
13
			});
12
			});
14
		}
13
		}
15
		valUser();
14
		valUser();

+ 3 - 3
src/main/webapp/js/index.js

41
});
41
});
42
//加载页面时,判断是否登陆
42
//加载页面时,判断是否登陆
43
//loginStatus();
43
//loginStatus();
44
var servPath = "http://121.42.53.174:81";
44

45
var userid = $.cookie("userid");
45
var userid = $.cookie("userid");
46
if (userid && userid != "null" && userid != null) {
46
if (userid && userid != "null" && userid != null) {
47
	$(".myWorkspace").attr("href","resources.html?"+userid);
47
	$(".myWorkspace").attr("href","resources.html?"+userid);
48
	$(".onlogin").show();
48
	$(".onlogin").show();
49
	$(".unlogin").hide();
49
	$(".unlogin").hide();
50
	$(".portrait-p").attr("src", servPath + "/images/head/" + userid + "_m.jpg");
50
	$(".portrait-p").attr("src", "/images/head/" + userid + "_m.jpg");
51
	//判断图片是否加载,加载不成功默认有默认的图像
51
	//判断图片是否加载,加载不成功默认有默认的图像
52
	$(".portrait-p").load(function() {})
52
	$(".portrait-p").load(function() {})
53
		.error(function() {
53
		.error(function() {
54
			$(".portrait-p").attr("src", servPath + "/images/default-photo.jpg");
54
			$(".portrait-p").attr("src", "/images/default-photo.jpg");
55
		});
55
		});
56
}
56
}
57

57


+ 3 - 4
src/main/webapp/js/information.brow.js

1
$(function(){
1
$(function(){
2
//loginStatus();
2
//loginStatus();
3
		var servPath = "http://121.42.53.174:81";
4
	 	var userid = $.cookie("userid");
3
	 	var userid = $.cookie("userid");
5
	 	var professorId = GetQueryString("professorId");	 
4
	 	var professorId = GetQueryString("professorId");	 
6
	 	if(professorId){
5
	 	if(professorId){
7
	 		$(".portrait-p").attr("src",servPath+"/images/head/"+userid+"_m.jpg");
6
	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
8
			$(".portrait-p").load(function(){									
7
			$(".portrait-p").load(function(){									
9
			})
8
			})
10
			.error(function(){
9
			.error(function(){
11
				$(".portrait-p").attr("src",servPath+"/images/default-photo.jpg");
10
				$(".portrait-p").attr("src","/images/default-photo.jpg");
12
			});
11
			});
13
         
12
         
14
	 		var subjectShow = function (data){
13
	 		var subjectShow = function (data){
368
		"success":function(data){
367
		"success":function(data){
369
			var add="";
368
			var add="";
370
			if(data.success)
369
			if(data.success)
371
				{console.log(data);
370
				{
372
				for(var i=0;i<data.data.length;i++){
371
				for(var i=0;i<data.data.length;i++){
373
					add='<div class="sharesrc">'
372
					add='<div class="sharesrc">'
374
					add+='<div class="shareshow">'
373
					add+='<div class="shareshow">'

+ 2 - 3
src/main/webapp/js/information.js

1
$(function(){
1
$(function(){
2
	//1获取数据
2
	//1获取数据
3
	loginStatus();
3
	loginStatus();
4
		var servPath = "http://121.42.53.174:81";
5
	 	var userid = $.cookie("userid");
4
	 	var userid = $.cookie("userid");
6
	 	if(userid){
5
	 	if(userid){
7
			$(".head-portrait").show();
6
			$(".head-portrait").show();
8
			$(".unlogin").hide();
7
			$(".unlogin").hide();
9
	 		$(".portrait-p").attr("src",servPath+"/images/head/"+userid+"_m.jpg");
8
	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
10
			$(".portrait-p").load(function(){									
9
			$(".portrait-p").load(function(){									
11
			})
10
			})
12
			.error(function(){
11
			.error(function(){
13
				$(".portrait-p").attr("src",servPath+"/images/default-photo.jpg");
12
				$(".portrait-p").attr("src","/images/default-photo.jpg");
14
			});
13
			});
15
			//填充学术领域
14
			//填充学术领域
16
	 		var subjectShow = function (data){
15
	 		var subjectShow = function (data){

+ 24 - 4
src/main/webapp/js/popup.js

10
		PopHtml += '<table class="resoutab"><tr>';
10
		PopHtml += '<table class="resoutab"><tr>';
11
		PopHtml += '<th class="resouinfotype" id="resourceName" scope="row">资源名称</th>';
11
		PopHtml += '<th class="resouinfotype" id="resourceName" scope="row">资源名称</th>';
12
		PopHtml += '<td><input type="text" class="frmtype"></td>';
12
		PopHtml += '<td><input type="text" class="frmtype"></td>';
13
		
14
//		PopHtml += '<td rowspan="9">';
15
//		PopHtml += '<div class="resouimg" >';
16
//		PopHtml += '<span class="resouup"><input type="file" id="resouup">上传资源图片</span>';
17
//		PopHtml += '<div class="wrap" id="jcropdiv"><div class="jc-demo-box" data="0">';//选择图片尺寸
18
//		PopHtml += '<div id="target" class="jcrop_w" ><img src="" width="100%" height="100%" id="resouimg" /></div></div>';
19
//		PopHtml += '<div class="jy-up-ch">';//放大缩小旋转操作图片
20
//		PopHtml += '<a id="idLeft" href="" class="bch bch1"></a>';
21
//		PopHtml += '<a id="idSmall" href="" class="bch bch2"></a>';
22
//		PopHtml += '<a id="idBig" href="" class="bch bch3"></a>';
23
//		PopHtml += '<a id="idRight" href="" class="bch bch4"></a>';
24
//		PopHtml += '</div></div>';
25
//		PopHtml += '<input id="x" type="hidden"/>';
26
//		PopHtml += '<input id="y" type="hidden"/>';
27
//		PopHtml += '<input id="w" type="hidden"/>';
28
//		PopHtml += '<input id="h" type="hidden"/>';
29
//		PopHtml += '</div></td></tr>';
13
		PopHtml += '<td rowspan="9"><div class="resouimg" ><img src="" width="100%" height="100%"><span class="resouup"><input type="file" id="resouup" >上传资源图片</span></div></td>';
30
		PopHtml += '<td rowspan="9"><div class="resouimg" ><img src="" width="100%" height="100%"><span class="resouup"><input type="file" id="resouup" >上传资源图片</span></div></td>';
14
		PopHtml += '</tr>';
31
		PopHtml += '</tr>';
32
		
15
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="workmsg workmsg1"></div></td></tr>';
33
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="workmsg workmsg1"></div></td></tr>';
16
		PopHtml += '<tr><th class="resouinfotype"  scope="row">资源发布者</th><td><input type="text" class="frmtype" id="professor" >  </td></tr>';
34
		PopHtml += '<tr><th class="resouinfotype"  scope="row">资源发布者</th><td><input type="text" class="frmtype" id="professor" >  </td></tr>';
17
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="workmsg workmsg2"></div></td></tr>';
35
		PopHtml += '<tr class="workmsgbox"><th></th><td><div class="workmsg workmsg2"></div></td></tr>';
52
		$(".workclose").click(function(){
70
		$(".workclose").click(function(){
53
			$(".blackcover").remove();
71
			$(".blackcover").remove();
54
			$(".resouinfo").remove();
72
			$(".resouinfo").remove();
73
			location.reload(true);
55
		})
74
		})
56
}
75
}
57
//资源信息 //
76
//资源信息 //
75
		PopHtml += '<tr><th class="resouinfotype"  scope="row">需求方</th><td>';
94
		PopHtml += '<tr><th class="resouinfotype"  scope="row">需求方</th><td>';
76
        PopHtml += '<select class="frmtype"><option>本人</option><option>所属机构</option></select>';
95
        PopHtml += '<select class="frmtype"><option>本人</option><option>所属机构</option></select>';
77
		PopHtml += '</td></tr>';
96
		PopHtml += '</td></tr>';
78
		PopHtml += '<tr><th class="resouinfotype"  scope="row">具体需求</th><td colspan="2"><textarea class="frmtype"></textarea></td></tr>';
97
		PopHtml += '<tr><th class="resouinfotype"  scope="row">具体需求</th><td colspan="2"><textarea class="frmtype detail"></textarea></td></tr>';
79
		PopHtml += ' <tr><th class="resouinfotype"  scope="row">相关文件</th><td colspan="2" ><a href="" class="updownbtn" >点击下载</a></td></tr>';
98
		PopHtml += ' <tr><th class="resouinfotype"  scope="row">相关文件</th><td colspan="2" ><a href="" class="updownbtn" >点击下载</a></td></tr>';
80
		PopHtml += '<tr><th class="resouinfotype" scope="row">交付时间</th><td colspan="2">2016-09-01</td></tr></table>';
99
		PopHtml += '<tr><th class="resouinfotype " scope="row">交付时间:</th><td colspan="2"class="dealTime">2016-09-01</td></tr></table>';
81
		PopHtml += '<table class="resoutab btnboxup"><tr><td colspan="3"><div class="addrebtn" style="text-align:center;">';
100
		PopHtml += '<table class="resoutab btnboxup"><tr><td colspan="3"><div class="addrebtn" style="text-align:center;">';
82
        PopHtml += '<input type="submit" value="确认,下一步" class="frmtype frmbtn"><input type="button" value="联系ta" class="frmtype frmbtn"><input type="button" value="直接拒绝" class="frmtype frmbtn frmrbtn"></div></td></tr></table>';
101
        PopHtml += '<input type="button" value="确认,下一步" class="frmtype frmbtn"id="nextStep"><input type="button" value="联系ta" class="frmtype frmbtn"><input type="button" value="直接拒绝" class="frmtype frmbtn frmrbtn"id="refuses"></div></td></tr></table>';
83
		
102
		
84
		PopHtml += '<table class="resoutab applysure"><tr><th class="resouinfotype"  scope="row">付款方式</th><td colspan="2" ><input type="text" class="frmtype" id="payMethod"></td></tr>';
103
		PopHtml += '<table class="resoutab applysure"><tr><th class="resouinfotype"  scope="row">付款方式</th><td colspan="2" ><input type="text" class="frmtype" id="payMethod"></td></tr>';
85
		PopHtml += '<tr><th class="resouinfotype" scope="row">费用</th><td colspan="2"><input type="text" class="frmtype" id="dealPrice"  ></td></tr>';
104
		PopHtml += '<tr><th class="resouinfotype" scope="row">费用</th><td colspan="2"><input type="text" class="frmtype" id="dealPrice"  ></td></tr>';
86
		PopHtml += '<tr><th class="resouinfotype" scope="row">合作协议</th><td colspan="2"><a class="updownbtn" href="">点击上传</a></td></tr>';
105
		PopHtml += '<tr><th class="resouinfotype" scope="row">合作协议</th><td colspan="2"><a class="updownbtn" href="">点击上传</a></td></tr>';
87
		PopHtml += '<tr><th class="resouinfotype" scope="row">备注</th><td colspan="2"><textarea class="frmtype" id="consultContent"></textarea></td></tr></table>';
106
		PopHtml += '<tr><th class="resouinfotype" scope="row">备注</th><td colspan="2"><textarea class="frmtype" id="consultContent"></textarea></td></tr></table>';
88
		PopHtml += '<table class="resoutab btnboxdown"> <tr><td colspan="3"><div class="addrebtn" style="text-align:center;"><input type="button" value="发送" id="del" class="frmtype frmbtn"><input type="button" value="返回" class="frmtype frmbtn frmrbtn"></div></td></tr>';
107
		PopHtml += '<table class="resoutab btnboxdown"> <tr><td colspan="3"><div class="addrebtn" style="text-align:center;"><input type="button" value="发送" id="del" class="frmtype frmbtn"><input type="button" value="返回" class="frmtype frmbtn frmrbtn "id="cooperation"></div></td></tr>';
89
		PopHtml += '</table></form><span class="workclose">关闭</span></div>';
108
		PopHtml += '</table></form><span class="workclose">关闭</span></div>';
90
		
109
		
91
		
110
		
105
		$(".workclose").click(function(){
124
		$(".workclose").click(function(){
106
			$(".blackcover").remove();
125
			$(".blackcover").remove();
107
			$(".resouapply").remove();
126
			$(".resouapply").remove();
127
			location.reload(true);
108
		})
128
		})
109
                 	  
129
                 	  
110
}
130
}

+ 2 - 3
src/main/webapp/js/search.js

1
$(function(){
1
$(function(){
2
	loginStatus();
2
	loginStatus();
3
		var servPath = "http://121.42.53.174:81";
4
		var userid = $.cookie("userid");
3
		var userid = $.cookie("userid");
5
	 	if(userid){
4
	 	if(userid){
6
//			$(".head-portrait").show();
5
//			$(".head-portrait").show();
7
//			$(".unlogin").hide();
6
//			$(".unlogin").hide();
8
	 		$(".portrait-p").attr("src",servPath+"/images/head/"+userid+"_m.jpg");
7
	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
9
			$(".portrait-p").load(function(){									
8
			$(".portrait-p").load(function(){									
10
			})
9
			})
11
			.error(function(){
10
			.error(function(){
12
				$(".portrait-p").attr("src",servPath+"/images/default-photo.jpg");
11
				$(".portrait-p").attr("src","/images/default-photo.jpg");
13
			});
12
			});
14
		}
13
		}
15
		$("#searchContent").val(GetQueryString("searchContent")); 
14
		$("#searchContent").val(GetQueryString("searchContent")); 

+ 257 - 50
src/main/webapp/js/workspace.js

1
// JavaScript Document
1
// JavaScript Document
2
$(function(){
2
$(function(){
3
	
3
	var userid = $.cookie("userid");
4
	var userid = $.cookie("userid");
4
	var servPath = "http://121.42.53.174:81/";
5
	var flag;
5
 	if(userid){
6
 	if(userid){
6
 		$(".myWorkspace").attr("href","resources.html?"+userid);
7
 		$(".myWorkspace").attr("href","resources.html?"+userid);
7
		$(".head-portrait").show();
8
		$(".head-portrait").show();
8
		$(".unlogin").hide();
9
		$(".unlogin").hide();
9
 		$(".portrait-p").attr("src",servPath+"/images/head/"+userid+"_m.jpg");
10
 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
10
		$(".portrait-p").load(function(){									
11
		$(".portrait-p").load(function(){									
11
		})
12
		})
12
		.error(function(){
13
		.error(function(){
13
			$(".portrait-p").attr("src",servPath+"/images/default-photo.jpg");
14
			$(".portrait-p").attr("src","/images/default-photo.jpg");
14
		});
15
		});
15
 	}
16
 	}
16

17

123
//				}
124
//				}
124
//			});
125
//			});
125
//});
126
//});
126

127
//我的资源的删除,修改
127
	$("#workmysrc").on("click",".resoumag",function()
128
	$("#workmysrc").on("click",".resoumag",function()
128
			{
129
			{
129
				var resourceID=$(this).attr("resourceId");
130
				var resourceID=$(this).attr("resourceId");
206
							}
207
							}
207
						});
208
						});
208
			});
209
			});
209
	
210
//查询我的资源	
210
$.ajax({		
211
$.ajax({		
211
	"url":"/ajax/resource/qapro",
212
	"url":"/ajax/resource/qapro",
212
	"type":"get",
213
	"type":"get",
246
					
247
					
247
					$('.resoumag').eq(i+1).attr("resourceId",data.data[i].resourceId);
248
					$('.resoumag').eq(i+1).attr("resourceId",data.data[i].resourceId);
248
					console.log($('.resoumag').eq(i+1).attr("resourceId"));
249
					console.log($('.resoumag').eq(i+1).attr("resourceId"));
250
					//资源所对应的记录
249
					(function(i){
251
					(function(i){
250
						$.ajax({		
252
						$.ajax({		
251
							"url":"/ajax/operation/qares",
253
							"url":"/ajax/operation/qares",
266
							                       addString+='<td>'+data.data[j].dealPrice+'</td>'
268
							                       addString+='<td>'+data.data[j].dealPrice+'</td>'
267
							                        addString+='<td>'+data.data[j].payMethod+'</td>'
269
							                        addString+='<td>'+data.data[j].payMethod+'</td>'
268
							                       addString+='<td>2000<br></td>'
270
							                       addString+='<td>2000<br></td>'
269
							                        addString+='<td><a class="operatebtn modification" onclick="ResourceApply();">修改申请</a></td> </tr>'						                      		
271
							                        addString+='<td><a class="operatebtn modification">修改申请</a></td> </tr>'						                      		
270
							                        	$(".tablecon").eq(i).append(addString);
272
							                        	$(".tablecon").eq(i).append(addString);
271
														$(".modification").eq(k).attr("operationId",data.data[j].operationId)
273
														$(".modification").eq(k).attr("operationId",data.data[j].operationId);
274
														$(".modification").eq(k).attr("operationStatus",data.data[j].operationStatus);
275
														switch(data.data[j].operationStatus)
276
														{
277
														case 1:
278
															$(".modification").eq(k).text("待回复")
279
														  break;
280
														case 2:
281
															$(".modification").eq(k).text("已回复");
282
														  break;
283
														case 3:
284
															$(".modification").eq(k).text("合作");
285
														  break;
286
														case 4:
287
															$(".modification").eq(k).text("对方拒绝合作");
288
														  break;
289
														case 5:
290
															$(".modification").eq(k).text("本人拒绝合作");
291
														  break;
292
														default:
293
														  
294
														}	
272
														k++;
295
														k++;
273
											addString="";
296
											addString="";
274
										}
297
										}
294
	},
317
	},
295
	"error":function(){$.MsgBox.Alert('message','failed')}
318
	"error":function(){$.MsgBox.Alert('message','failed')}
296
});
319
});
320
//我的资源状态的回复
297
$("#consd").on("click",".modification",function(){
321
$("#consd").on("click",".modification",function(){
298
//	$(".blackcover").show();
299
//	$(".resouapply").show();
322
	ResourceApply();
300
	var operationId=$(this).attr("operationId");
323
	var operationId=$(this).attr("operationId");
301
	console.log(operationId);
324
	console.log(operationId);
302
	$.ajax({	
303
		"url":"/ajax/operation/"+operationId,
304
		"type":"get",
305
		"async": true,
306
		"data":{"operationId":operationId},
307
		"success":function(data){
308
			if(data.success)
309
				{	
310
					console.log(data);
311
				}
312
				else
313
				{
314
					console.log("系统异常!");
315
			ar $date = {};		}
316
		},
317
		"error":function(){$.MsgBox.Alert('message','failddd')}
318
	});
319
	$("#del").click(function(){
320
		var $date = {};		
321
		$date.dealPrice = $("#dealPrice").val();
322
		$date.payMethod = $("#payMethod").val();
323
		$date.consultContent = $("#consultContent").val();
324
		$date.operationId=operationId;
325
		$.ajax({
326
			"url" : "/ajax/operation",
327
			"type" : "put",
328
			"data" :JSON.stringify($date),
329
			"contentType" :"application/x-www-form-urlencoded",
330
			"success" : function(data) {
331
				if (data.success) {					
332
					//location.reload(true);
333
					console.log(data);
334
				} else {
335
					alert(data.msg);
336
				}
325
	var operationStatus=$(this).attr("operationStatus");
326
	console.log(operationStatus);
327
	flag=0;
328
	ajaxGet(operationId);
329
	if(flag==0&&operationStatus==1)
330
	{
331
		$(".btnboxdown").css({"display":"none"});
332
		$(".applysure").css({"display":"none"});
333
		$("#nextStep").click(function(){
334
		$(".btnboxup").css({"display":"none"});
335
		$(".btnboxdown").css({"display":"block"});
336
		$(".applysure").css({"display":"block"});
337
		$("#del").click(function(){
338
			var $date = {};	ar $date = {};		
339
			$date.dealPrice = $("#dealPrice").val();
340
			$date.payMethod = $("#payMethod").val();
341
			$date.consultContent = $("#consultContent").val();
342
			$date.operationId=operationId;
343
			$date.operationStatus=2;
344
			$.ajax({
345
				"url" : "/ajax/operation",
346
				"type" : "put",
347
				"data" :JSON.stringify($date),
348
				"contentType" :"application/x-www-form-urlencoded",
349
				"success" : function(data) {
350
					if (data.success) {					
351
						//location.reload(true);
352
						alert("jjjjjjjjjjjjjj");
353
						console.log(data);
354
					} else {
355
						alert(data.msg);
356
					}
357
				},
358
			"beforeSend":function(){
359
				console.log(this.data);
337
			},
360
			},
338
		"beforeSend":function(){
339
			console.log(this.data);
340
		},
361
			});
362
		})
363
		
364
		})
365
		$("#refuses").click(function(){
366
			upStatus(operationId,5);
341
		});
367
		});
342
	})
368
	}
369
	if(flag==0&&operationStatus==2){
370
		$(".btnboxup").css({"display":"none"});
371
		$(".btnboxdown").css({"display":"none"});
372
		ajaxGet(operationId);	
373
	}
374
	if(flag==0&&operationStatus==3){
375
		$(".btnboxup").css({"display":"none"});
376
		$(".btnboxdown").css({"display":"none"});
377
		ajaxGet(operationId);
378
	}
379
	if(flag==0&&operationStatus==5){
380
		$(".btnboxup").css({"display":"none"});
381
		$(".btnboxdown").css({"display":"none"});
382
		$(".applysure").css({"display":"none"});
383
		ajaxGet(operationId);
384
	}
385
	if(flag==0&&operationStatus==4){
386
		$(".btnboxup").css({"display":"none"});
387
		$(".btnboxdown").css({"display":"none"});
388
		ajaxGet(operationId);
389
	}
343
})
390
})
391

392

393

394
//我的需求查询
344
$.ajax({		
395
$.ajax({		
345
	"url":"/ajax/operation/qapro",
396
	"url":"/ajax/operation/qapro",
346
	"type":"get",
397
	"type":"get",
361
	                    stringContent +='<td>'+data.data[i].dealPrice+'</td>'     
412
	                    stringContent +='<td>'+data.data[i].dealPrice+'</td>'     
362
	                    stringContent +='<td> - </td>'       
413
	                    stringContent +='<td> - </td>'       
363
	                    stringContent +='<td> - </td>'        
414
	                    stringContent +='<td> - </td>'        
364
	                    stringContent +='<td>修改申请</td></tr>'
365
	                   $(".worktabb").eq(i).append( stringContent) 	
415
	                    stringContent +='<td class="loginStatus">修改申请</td></tr>'
416
	                   $(".worktabb").append( stringContent);
417
						$(".loginStatus").eq(i).attr("resourId",data.data[i].resourceId);
418
						$(".loginStatus").eq(i).attr("operationStatus",data.data[i].operationStatus);
419
						$(".loginStatus").eq(i).attr("operationId",data.data[i].operationId);
420
						console.log($(".loginStatus").eq(i).attr("operationId"));
421
							switch(data.data[i].operationStatus)
422
							{
423
							case 1:
424
								$(".loginStatus").eq(i).text("修改申请")
425
							  break;
426
							case 2:
427
								$(".loginStatus").eq(i).text("对方已回复");
428
							  break;
429
							case 3:
430
								$(".loginStatus").eq(i).text("合作");
431
							  break;
432
							case 4:
433
								$(".loginStatus").eq(i).text("本人拒绝合作");
434
							  break;
435
							case 5:
436
								$(".loginStatus").eq(i).text("对方拒绝合作");
437
							  break;
438
							default:							  
439
							}	
366
					}
440
					}
367
			}
441
			}
368
			else
442
			else
372
	},
446
	},
373
	"error":function(){$.MsgBox.Alert('message','failddd')}
447
	"error":function(){$.MsgBox.Alert('message','failddd')}
374
});
448
});
449

450

451

452

453
//我的需求中修改申请,对方已经回复(合作),我拒绝合作或者约对方合作
454
$(".workmysrc").on("click",".loginStatus",function(){
455
//	$(".blackcover").show();
456
//	$(".resouapply").show();
457
	ResourceApply();
458
	var resourceId=$(this).attr("resourId");
459
	var operationStatus=$(this).attr("operationStatus");
460
	var operationId=$(this).attr("operationId");
461
	flag=1;
462
	if(flag==1&&operationStatus==1)
463
	{
464
		$(".btnboxup").css({"display":"none"});
465
		$(".applysure").css({"display":"none"});
466
		$(".dealTime").replaceWith("<input type='text'colspan='2'class='dealTime'>");
467
		ajaxGet(operationId);
468
		//if($(".dealTime").val()!=""&&$(".detail").val()!="")
469
		//{
470
			$("#del").on("click",function()
471
					{	alert("2");
472
						var $data = {};
473
						$data.demandId = userid;
474
						$data.resourceId=resourceId;
475
						$data.consuitContent=$(".detail").val();
476
						$data.deliverTime=$('.dealTime').val();
477
						$data.operationStatus=operationStatus;
478
						$.ajax({
479
							"url" : "../ajax/operation",
480
							"type" : "put",
481
							"success" : function(rdata) {
482
								if (rdata.success) {
483
									console.log(rdata);
484
								} else {
485
									alert("jjj");
486
								}
487
							},
488
							"data" :  JSON.stringify($data) ,
489
							"contentType" :  "application/json",
490
							dataType : "json"
491
						});
492
				});
493
		//}
494
		
495
	}
496
	if(flag==1&&operationStatus==2)
497
	{
498
		$(".btnboxup").css({"display":"none"});
499
		$("#del")[0].value="直接拒绝";
500
		$("#cooperation")[0].value="合作";
501
		ajaxGet(operationId);
502
		$("#del").click(function(){
503
			$.ajax({"url" : "../ajax/operation/operationStatus",
504
				"type" : "POST",
505
				"success" : function(rdata) 
506
				{
507
					if (rdata.success) 
508
					{
509
							location.reload(true);
510
					}
511
					else 
512
					{
513
						alert("jjj");
514
					}
515
				},
516
				"data" :{"operationId":operationId,"operationStatus":4},
517
				"contentType" :"application/x-www-form-urlencoded",
518
				dataType : "json"
519
			});
520
		})
521
		$("#cooperation").click(function(){
522
			upStatus(operationId,4);
523
		})
524
	}
525
	if(flag==1&&operationStatus==3){
526
		$(".btnboxup").css({"display":"none"});
527
		$(".btnboxdown").css({"display":"none"});
528
		ajaxGet(operationId);
529
	}
530
	if(flag==1&&operationStatus==4){
531
		$(".btnboxup").css({"display":"none"});
532
		$(".btnboxdown").css({"display":"none"});
533
		ajaxGet(operationId);
534
	}
535
	if(flag==1&&operationStatus==5){
536
		$(".btnboxup").css({"display":"none"});
537
		$(".btnboxdown").css({"display":"none"});
538
		$(".applysure").css({"display":"none"});
539
		ajaxGet(operationId);
540
	}
541
})
542
//更新状态
543
function upStatus(operationId,n){
544
	$.ajax({"url" : "../ajax/operation/operationStatus",
545
		"type" : "POST",
546
		"success" : function(rdata) 
547
		{
548
			if (rdata.success) 
549
			{
550
					location.reload(true);
551
			}
552
			else 
553
			{
554
				alert("jjj");
555
			}
556
		},
557
		"data" :{"operationId":operationId,"operationStatus":n},
558
		"contentType" :"application/x-www-form-urlencoded",
559
		dataType : "json"
560
	});
561
}
562
//我的需求,获取每条记录的数据根据合作id
563
function ajaxGet(operationId){
564
	$.ajax({	
565
		"url":"/ajax/operation/"+operationId,
566
		"type":"get",
567
		"async": true,
568
		"data":{"operationId":operationId},
569
		"success":function(data){
570
			if(data.success)
571
				{	
572
					console.log(data);
573
				}
574
				else
575
				{
576
					console.log("系统异常!");
577
				}
578
		},
579
		"error":function(){$.MsgBox.Alert('message','failddd')}
580
	});
581
}
375
});
582
});

+ 10 - 11
src/main/webapp/photo-set.html

93
<script type="text/javascript" src="js/basic.js"> </script>
93
<script type="text/javascript" src="js/basic.js"> </script>
94
<script type="text/javascript" src="/js/ajaxfileupload.js"></script>
94
<script type="text/javascript" src="/js/ajaxfileupload.js"></script>
95
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>	
95
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>	
96

96
<script type="text/javascript"src="js/jquery.cookie.js"></script>
97
<script type="text/javascript">
97
<script type="text/javascript">
98
$(function (){
98
$(function (){
99
	var id = '358FE958561241DA8A8DFC996388893C';
99
	var id = $.cookie('userid');
100
	var cacheImageKey=null;
100
	var cacheImageKey=null;
101
	var servPath = "http://121.42.53.174:81";
102
	if(id){
101
	if(id){
103
		$("#headImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
104
		$("#smallImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
105
		$("#middleImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
106
		$("#largeImage").attr("src",servPath+"/images/head/"+id+"_l.jpg");
102
		$("#headImage").attr("src","/images/head/"+id+"_l.jpg");
103
		$("#smallImage").attr("src","/images/head/"+id+"_l.jpg");
104
		$("#middleImage").attr("src","/images/head/"+id+"_l.jpg");
105
		$("#largeImage").attr("src","/images/head/"+id+"_l.jpg");
107
		$('#uploadInput').live('change',function(){ 
106
		$('#uploadInput').live('change',function(){ 
108
			$("#jcropdiv").show();
107
			$("#jcropdiv").show();
109
			$(".load").hide();
108
			$(".load").hide();
115
				success:function($data){
114
				success:function($data){
116
					if($data.success){
115
					if($data.success){
117
						cacheImageKey =$data.data[0].cacheKey
116
						cacheImageKey =$data.data[0].cacheKey
118
						$("#headImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
119
						$("#smallImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
120
						$("#middleImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
121
						$("#largeImage").attr("src",servPath+"/images/tmp/"+cacheImageKey);
117
						$("#headImage").attr("src","/images/tmp/"+cacheImageKey);
118
						$("#smallImage").attr("src","/images/tmp/"+cacheImageKey);
119
						$("#middleImage").attr("src","/images/tmp/"+cacheImageKey);
120
						$("#largeImage").attr("src","/images/tmp/"+cacheImageKey);
122
					}else{
121
					}else{
123
						alert($data.msg);
122
						alert($data.msg);
124
					}
123
					}

+ 64 - 2
src/main/webapp/resources.html

9
<link href="css/reset.css" rel="stylesheet" />
9
<link href="css/reset.css" rel="stylesheet" />
10
<link type="text/css" href="css/common.css" rel="stylesheet">
10
<link type="text/css" href="css/common.css" rel="stylesheet">
11
<link type="text/css" href="css/workspace.css" rel="stylesheet">
11
<link type="text/css" href="css/workspace.css" rel="stylesheet">
12
<link href="css/jquery.Jcrop.css" rel="stylesheet" type="text/css" />
13

12
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
14
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
13
<script type="text/javascript" src="js/common.js"></script>
15

16
<script type="text/javascript" src="js/jquery.HeadP.js"> </script>
17
<script type="text/javascript" src="js/jquery.Jcrop.js"> </script>
18
<script type="text/javascript" src="js/basic.js"> </script>
19
<script type="text/javascript" src="/js/ajaxfileupload.js"></script>
20

14
<script type="text/javascript"src="js/jquery.cookie.js"></script>
21
<script type="text/javascript"src="js/jquery.cookie.js"></script>
22
<script type="text/javascript" src="js/common.js"></script>
15
<script type="text/javascript"src="js/jquery.similar.msgbox.js"></script>
23
<script type="text/javascript"src="js/jquery.similar.msgbox.js"></script>
16
<script type="text/javascript" src="js/index.js"></script>
24
<script type="text/javascript" src="js/index.js"></script>
17
<script type="text/javascript" src="js/popup.js"></script>
25
<script type="text/javascript" src="js/popup.js"></script>
18
<script type="text/javascript" src="js/workspace.js"></script>
26
<script type="text/javascript" src="js/workspace.js"></script>
27
<script type="text/javascript">
28
$(function (){
29
	var userid = $.cookie("userid");
30
	var cacheImageKey=null;
31
	if(userid){
32
		$("#resouimg").attr("src","/images/resource/"+userid+".jpg");
33
		$('#uploadInput').live('change',function(){ 
34
			$("#jcropdiv").show();
35
			$.ajaxFileUpload({
36
				url:"../ajax/cachedFileUpload",
37
				secureuri:false,
38
				fileElementId:"resouup",
39
				dataType:"json",
40
				success:function($data){
41
					if($data.success){
42
						cacheImageKey =$data.data[0].cacheKey
43
						$("#resouimg").attr("src","/images/tmp/"+cacheImageKey);
44
					}else{
45
						alert($data.msg);
46
					}
47
				},
48
				error:function(){
49
					$.MsgBox.Alert("message","upload error");
50
				}    					
51
			});
52
		});
53
		
54
	}
55
	$("#inputb").on("click",function(){
56
		var x = parseInt($("#x").val()/395*100);
57
		var y = parseInt($("#y").val()/340*100);
58
		var w = parseInt($("#w").val()/395*100);
59
		var h = parseInt($("#h").val()/340*100);
60
		if(cacheImageKey){
61
			$.ajax({
62
				url:"../ajax/image/head",
63
				type:"POST",
64
				data:{"id":id,"fn":cacheImageKey,"x":x,"y":y,"w":w,"h":h},
65
				dataType:"json",
66
				success:function($data){
67
					if($data.success){
68
						alert("上传成功");
69
						location.reload(true);
70
					}else{
71
						alert($data.msg);
72
					}
73
				}
74
			});
75
		}
76
	});
77

78

79
})
80
</script>
19
</head>
81
</head>
20

82

21
<body>
83
<body>
120
	<div class="footer-btm">本站由 阿里云 提供计算与安全服务 Copyright © 2016~2017 科袖 | 京ICP备12345678号 | 京ICP证123456号 | 京公网安备11010800011111号 | 网站联盟安全认证</div>
182
	<div class="footer-btm">本站由 阿里云 提供计算与安全服务 Copyright © 2016~2017 科袖 | 京ICP备12345678号 | 京ICP证123456号 | 京公网安备11010800011111号 | 网站联盟安全认证</div>
121
</div>
183
</div>
122
</body>
184
</body>
123
</html>
185
 </html>