Browse Source

1、搜索页面的资源数据读取
2、设置里面增加个人信息模块(钱包)

luyanan 8 years ago
parent
commit
2e22c63ad8

+ 4 - 1
src/main/webapp/account-set.html

@ -8,6 +8,8 @@
8 8
<link rel="stylesheet" href="css/reset.css" />
9 9
<link type="text/css" href="css/index.css" rel="stylesheet">
10 10
<link type="text/css" href="css/common.css" rel="stylesheet">
11
<link type="text/css" href="css/workspace.css" rel="stylesheet">
12
<link type="text/css" href="css/popup.css" rel="stylesheet">
11 13
</head>
12 14

13 15
<body>
@ -101,7 +103,7 @@
101 103
						<span class="mywallet">我的钱包</span>
102 104
						<div class="walletbox">
103 105
							<div class="walletbrig floatL">余额 :<span><i class="amount">100</i><i class="fen">.00</i></span>元</div>
104
							<div class="walletrecords floatL"><span class="recordbtn">交易记录</span>|<span>累计收益:<em>15.13 </em> 元</span> </div>
106
							<div class="walletrecords floatL"><span class="recordbtn" onclick="PaymentInfo();">交易记录</span>|<span>累计收益:<em>15.13 </em> 元</span> </div>
105 107
						</div>
106 108
					</div>
107 109
				</div>
@ -177,6 +179,7 @@
177 179
<script type="text/javascript" src="js/index.js"></script>
178 180
<script type="text/javascript" src="js/jquery.cookie.js"></script>
179 181
<script type="text/javascript" src="js/common.js"></script>
182
<script type="text/javascript" src="js/popup.js"></script>
180 183
 <script type="text/javascript" src="js/account-set.js"></script> 
181 184
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
182 185


+ 1 - 1
src/main/webapp/css/common.css

@ -41,7 +41,7 @@ url(../images/index-icon.png) no-repeat; background-position:left; margin:8px;}
41 41
#container{ min-width:1170px; background:#fff;overflow: hidden;}
42 42

43 43
/*分页*/
44
.tcdPageCode{padding: 14px 20px;text-align: left;color: #000;text-align:center;font-size:14px;line-height:24px; }
44
.tcdPageCode{ padding: 20px; margin: 10px 0;text-align: left;color: #000;text-align:center;font-size:14px;line-height:24px; }
45 45
.tcdPageCode a{display: inline-block;color: #428bca;display: inline-block;height: 30px;	line-height: 30px;	padding: 0 10px;border: 1px solid #e5e5e5;	margin: 0 8px;border-radius:5px; color:#000;}
46 46
.tcdPageCode a:hover{text-decoration: none;}
47 47
.tcdPageCode span.current{display: inline-block;height:30px;line-height: 30px;padding: 0 10px;margin: 0 8px;color: #fff;background-color: #ff8400;border-radius:5px;}

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

@ -72,7 +72,7 @@ input{ outline:none;}
72 72
.area-con{ float:left; width:970px;/* border:1px solid red; */overflow:hidden;}
73 73
.class1 a{ padding:0px 5px; float:left;font-size:16px;line-height:30px; color:#000; margin-top:9px; margin-right:15px;}
74 74
.class1 .colorbg{ color:#fff; background:#ff8400;}
75
.andmore{ display:block; width:52px;font-size:16px;line-height:48px; color:#000; padding:0 20px; position:absolute;right:0; cursor:pointer;}
75
.andmore{ display:block; width:100px;font-size:16px;line-height:48px; color:#000; padding:0 20px; position:absolute;right:0; cursor:pointer;}
76 76
.updown{ display:block; width:18px; height:14px; background:url(../images/UpDown.png) 0 center no-repeat;  float:right; margin-top:18px;}
77 77
/*搜索内容*/
78 78
.about{ width:100%; border-top:1px #e2e2e2 solid; padding:5px 0;}
@ -124,11 +124,11 @@ input{ outline:none;}
124 124
.account-name{ height:50px; padding: 0 40px;}
125 125
.text-txt{font-size:18px;line-height:50px;color:#515151;}
126 126

127
.edit2{ display:block;width:22px; height:22px; background:url(../images/edit.png) no-repeat right center;margin: 15px 6px;cursor:pointer;}
127
.edit2{ display:block;width:22px; height:22px; background:url(../images/edit.png) no-repeat left center;margin: 15px 6px;cursor:pointer;}
128 128
.text{ overflow: hidden;width:180px;margin: auto;}
129 129
.text a{ overflow: hidden;font-size:14px;line-height:57px; color:#f5980b; padding-left:5px;}
130 130
 
131
.account-wallet{ width:100%;margin:20px auto;  padding: 20px; background: #E8E8E8; border-radius: 4px;}   
131
.account-wallet{margin:20px auto;  padding: 20px; background: #E8E8E8; border-radius: 4px;}   
132 132
.mywallet{ font-size:16px; line-height:20px; color:grey; font-weight: 500;}
133 133
.walletbox{overflow: hidden; padding:6px 14px;}
134 134
.walletbrig{font-size: 14px; color: #666; margin-left:20px;  }

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

@ -35,10 +35,12 @@
35 35
.maintab{ border-bottom:1px dashed #d7d7d7; margin-top:20px; overflow:hidden;}
36 36
.maintab:last-child{border-bottom:none;}
37 37
.worktab *{ text-align:center; color:#000;}
38
.lefttab{ width:16%;min-width: 162px; overflow:hidden;}
38
.lefttab{ width:16%;min-width: 162px; max-height:400px; overflow:hidden;}
39 39
.resoubrief{width:100%;height:300px; overflow:hidden;}
40
.resoubrief tr td{ /*border-bottom:1px solid #d6d6d6;*/ min-height:200px; padding:16px 0;}
41
.resoubrief tr td ul li{ width:100%; max-width:150px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap;}
40
.resoubrief tr td{ /*border-bottom:1px solid #d6d6d6;*/ min-height:200px; padding:6px 0;}
41
.resoubrief tr td ul{max-height: 260px;overflow: hidden;}
42
.resoubrief tr td ul li{ width:100%; max-width:160px; text-indent:1.5em; word-break: break-all;text-align: justify; /*text-overflow:ellipsis; overflow:hidden; white-space:nowrap;*/}
43
.resoubrief tr td ul li:first-child{text-indent:0;font-size: 15px;color: #ff8400;}
42 44
.resoumag{ display:block; background:#ff8400;font-size:14px;line-height:30px;color:#fff; border-radius:4px; text-align:center; cursor:pointer;}
43 45
.righttab{ width:82%;}
44 46
.worktab a{ color:#333;}

+ 1 - 1
src/main/webapp/information-brow.html

@ -288,11 +288,11 @@
288 288
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
289 289
<script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
290 290
<script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
291
<script type="text/javascript" src="js/common.js"></script>
291 292
<script type="text/javascript" src="js/popup.js"></script>
292 293
<script type="text/javascript" src="js/index.js"></script>
293 294

294 295
<script type="text/javascript" src="js/information.brow.js"></script>
295
<script type="text/javascript" src="js/common.js"></script>
296 296
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
297 297
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
298 298
 <script>

+ 30 - 9
src/main/webapp/js/common.js

@ -42,19 +42,30 @@ function valUser(){
42 42
var userid;	
43 43
function loginStatus(){
44 44
	userid = $.cookie('userid');
45
	if(userid && userid != "null" && userid!=null ){
45
	if(userid){
46 46
		$(".head-portrait").show();
47 47
		$(".unlogin").hide();
48
	}else{
49
		$(".head-portrait").hide();
50
		$(".unlogin").show();
51
	}
48
 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
49
		$(".portrait-p").load(function(){									
50
		})
51
		.error(function(){
52
			$(".portrait-p").attr("src","/images/default-photo.jpg");
53
		});
54
	
55
	
56
//	if(userid && userid != "null" && userid!=null ){
57
//		$(".head-portrait").show();
58
//		$(".unlogin").hide();
59
//	}else{
60
//		$(".head-portrait").hide();
61
//		$(".unlogin").show();
62
//	}
52 63
}
53 64

54 65
//转换格式
55
function changeTime(time){
56
	   var s = time;
57
	   if(time.length==8){
66
function changeTime(dealtime){
67
	   var s = dealtime;
68
	   if(dealtime.length==8){
58 69
	   	var y = s.substr(0,4);
59 70
	   var m = s.substr(4,2);
60 71
	   var d = s.substr(6,2);			  
@ -73,7 +84,17 @@ function changeTime(time){
73 84
	   }
74 85
	   
75 86
	}
76

87
//******过滤特殊字符*******//
88
function replaceStr(s) 
89
{ 
90
	var pattern = new RegExp("-");
91
	var rs = ""; 
92
	for (var i = 0; i < s.length; i++) { 
93
		rs = rs+s.substr(i, 1).replace(pattern, ''); 
94
	} 
95
	return rs; 
96
} 	
97
//**********************//
77 98

78 99

79 100


+ 1 - 11
src/main/webapp/js/information.brow.js

@ -525,17 +525,7 @@ $(".subsidebar").click(function(){
525 525
					});
526 526
			});
527 527
	});
528
//******过滤特殊字符*******//
529
	function replaceStr(s) 
530
	{ 
531
		var pattern = new RegExp("-");
532
		var rs = ""; 
533
		for (var i = 0; i < s.length; i++) { 
534
			rs = rs+s.substr(i, 1).replace(pattern, ''); 
535
		} 
536
		return rs; 
537
	} 	
538
//**********************//	
528
	
539 529
	
540 530
	//=====================================
541 531
	//事件封装

+ 14 - 14
src/main/webapp/js/information.js

@ -2,15 +2,15 @@ $(function(){
2 2
	//1获取数据
3 3
	loginStatus();
4 4
	 	var userid = $.cookie("userid");
5
	 	if(userid){
6
			$(".head-portrait").show();
7
			$(".unlogin").hide();
8
	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
9
			$(".portrait-p").load(function(){									
10
			})
11
			.error(function(){
12
				$(".portrait-p").attr("src","/images/default-photo.jpg");
13
			});
5
//	 	if(userid){
6
//			$(".head-portrait").show();
7
//			$(".unlogin").hide();
8
//	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
9
//			$(".portrait-p").load(function(){									
10
//			})
11
//			.error(function(){
12
//				$(".portrait-p").attr("src","/images/default-photo.jpg");
13
//			});
14 14
			//填充学术领域
15 15
	 		var subjectShow = function (data){
16 16
				if(data != undefined &&  data.length != 0 ){
@ -252,11 +252,11 @@ $(function(){
252 252
		}
253 253
	}
254 254
});
255
}
256
else {
257
	location.href = "login.html";
258
	return;
259
}
255
//}
256
//else {
257
//	location.href = "login.html";
258
//	return;
259
//}
260 260

261 261
	 //搜索框
262 262
 $("#hsearch").on("click", function() {

+ 53 - 53
src/main/webapp/js/popup.js

@ -149,7 +149,7 @@ function ResourceInfo() {
149 149
			supportedServices();
150 150
		});
151 151
	   //资源图像上传
152
		$(function (){
152
		/*$(function (){
153 153
			var id = $.cookie('');
154 154
			var cacheImageKey=null;
155 155
			if(id){
@ -201,7 +201,7 @@ function ResourceInfo() {
201 201
				}
202 202
			});
203 203

204
		})	
204
		})	*/
205 205
}
206 206
//资源信息 //
207 207

@ -395,12 +395,12 @@ function GuestbookInfo() {
395 395
//  留言//	
396 396

397 397
//款项记录 //
398
//function PaymentInfo() {
399
//		var PopHtml="";
400
//
401
//		PopHtml += '<div class="blackcover">';
402
//		PopHtml += '<div class="paymentinfo"><form class="resoufrm">';
403
//		PopHtml += '<div class="resoutit">款项记录<!--<div class="paybtn">发起付/退款</div>--></div>';
398
function PaymentInfo() {
399
		var PopHtml="";
400

401
		PopHtml += '<div class="blackcover">';
402
		PopHtml += '<div class="paymentinfo"><form class="resoufrm">';
403
		PopHtml += '<div class="resoutit">款项记录<!--<div class="paybtn">发起付/退款</div>--></div>';
404 404
//		/*添加款项记录*/
405 405
//		PopHtml += '<div class="payaddbox">';
406 406
//		PopHtml += '<table><tr>';
@ -423,7 +423,7 @@ function GuestbookInfo() {
423 423
//		PopHtml += '<td><div class="resouinforcon"><div class="addrebtn" style="text-align:center;"><input type="button" value="添加" class="frmtype frmbtn " id="addm"/></div></div></td>';
424 424
//		PopHtml += ' </tr></table></div>';
425 425
//		/*款项记录*/
426
//		PopHtml += '<div class="paymentbox"> ';
426
		PopHtml += '<div class="paymentbox"> ';
427 427
//		PopHtml += '<table><tr>';
428 428
//		PopHtml += '<th><div class="resouinforcon">总费用</div></th>';
429 429
//		PopHtml += '<td><div class="resouinforcon" >¥1000</div></td>';
@ -432,49 +432,49 @@ function GuestbookInfo() {
432 432
//		PopHtml += '<th><div class="resouinforcon">剩余费用</div></th>';
433 433
//		PopHtml += '<td><div class="resouinforcon">¥8000</div></td>';
434 434
//		PopHtml += '</tr></table>';
435
//
436
//		PopHtml += '<table>';
437
//		PopHtml += '<tr class="paytit">';
438
//		PopHtml += '<th width="140"><div class="resouinforcon">时间</div></th>';
439
//		PopHtml += '<th width="80"><div class="resouinforcon">付款方</div></th>';
440
//		PopHtml += '<th width="120"><div class="resouinforcon">支付方式</div></th>';
441
//		PopHtml += '<th width="120"><div class="resouinforcon">金额</div></th>';
442
//		PopHtml += '<th width="120"><div class="resouinforcon">状态</div></th>';
443
//		PopHtml += '<th width="200"><div class="resouinforcon">备注</div></th>';
444
//		PopHtml += '</tr>';
445
//
446
//		PopHtml += '<tr class="payitem">';
447
//		PopHtml += '<td><div class="resouinforcon">2016-08-10 08:00</div></td>';
448
//		PopHtml += '<td><div class="resouinforcon">张三</div></td>';
449
//		PopHtml += '<td><div class="resouinforcon">线下</div></td>';
450
//		PopHtml += '<td><div class="resouinforcon">¥1000</div></td>';
451
//		PopHtml += '<td><div class="resouinforcon">确认收款</div></td>';
452
//		PopHtml += '<td><div class="resouinforcon">之后尾款另行支付</div></td>';
453
//		PopHtml += '</tr>';
454
//		PopHtml += '</table></div></form>';
455
//		PopHtml += '<span class="workclose"></span>';
456
//		PopHtml += '</div></div>';
457
//
458
//                    
459
//        //必须先将html添加到body,再设置Css样式
460
//        $("body").before(PopHtml);
461
//		$("body").css("overflow-y","hidden");
462
//      
463
//        var _widht = $(".blackcover").width();
464
//        var _height = $(".blackcover").height();
465
//		var boxWidth = $(".paymentinfo").width();
466
//		var boxHeight = $(".paymentinfo").height();
467
//		
468
//		//让提示框居中
469
//		$(".paymentinfo").css({ top:"40px", left: (_widht - boxWidth) / 2 + "px"  });
470
//
471
//
472
//		//关闭按钮
473
//		$(".workclose").click(function(){
474
//			$(".blackcover").remove();
475
//			$("body").css("overflow","auto");
476
//		});           
477
//}       
435

436
		PopHtml += '<table>';
437
		PopHtml += '<tr class="paytit">';
438
		PopHtml += '<th width="140"><div class="resouinforcon">时间</div></th>';
439
		PopHtml += '<th width="80"><div class="resouinforcon">付款方</div></th>';
440
		PopHtml += '<th width="120"><div class="resouinforcon">支付方式</div></th>';
441
		PopHtml += '<th width="120"><div class="resouinforcon">金额</div></th>';
442
		PopHtml += '<th width="120"><div class="resouinforcon">状态</div></th>';
443
		PopHtml += '<th width="200"><div class="resouinforcon">备注</div></th>';
444
		PopHtml += '</tr>';
445

446
		PopHtml += '<tr class="payitem">';
447
		PopHtml += '<td><div class="resouinforcon">2016-08-10 08:00</div></td>';
448
		PopHtml += '<td><div class="resouinforcon">张三</div></td>';
449
		PopHtml += '<td><div class="resouinforcon">线下</div></td>';
450
		PopHtml += '<td><div class="resouinforcon">¥1000</div></td>';
451
		PopHtml += '<td><div class="resouinforcon">确认收款</div></td>';
452
		PopHtml += '<td><div class="resouinforcon">之后尾款另行支付</div></td>';
453
		PopHtml += '</tr>';
454
		PopHtml += '</table></div></form>';
455
		PopHtml += '<span class="workclose"></span>';
456
		PopHtml += '</div></div>';
457

458
                    
459
        //必须先将html添加到body,再设置Css样式
460
        $("body").before(PopHtml);
461
		$("body").css("overflow-y","hidden");
462
      
463
        var _widht = $(".blackcover").width();
464
        var _height = $(".blackcover").height();
465
		var boxWidth = $(".paymentinfo").width();
466
		var boxHeight = $(".paymentinfo").height();
467
		
468
		//让提示框居中
469
		$(".paymentinfo").css({ top:(_height-boxHeight)/2 + "px", left: (_widht - boxWidth) / 2 + "px"  });
470

471

472
		//关闭按钮
473
		$(".workclose").click(function(){
474
			$(".blackcover").remove();
475
			$("body").css("overflow","auto");
476
		});           
477
}       
478 478
 // 款项记录//
479 479

480 480

@ -774,7 +774,7 @@ function finish() {
774 774
	var PopHtml="";
775 775

776 776
	PopHtml += '<div class="blackcover">';
777
	PopHtml += '<div class="commentinfo">';
777
	PopHtml += '<div class="finishbox commentinfo">';
778 778
	PopHtml += '<div class="com">确定完成??</div>';
779 779
	PopHtml += '<div class="com1">确定</div>';
780 780
	PopHtml += '<span class="workclose"></span>';

+ 96 - 47
src/main/webapp/js/sciresource.js

@ -74,6 +74,8 @@ $(function(){
74 74
				}
75 75
				if(resourceID){
76 76
					$("#deletedResource").on("click",function(){
77
						$(".blackcover").remove();
78
						$("body").css("overflow-y","auto");
77 79
						$.MsgBox.Confirm("消息", "执行删除后资源信息将无法恢复,确定继续吗?",delet)					
78 80
					})
79 81
					$.ajax({		
@ -117,36 +119,57 @@ $(function(){
117 119
								if (resourceID) {
118 120
									$data.resourceId = resourceID;
119 121
								}
122
								function getDataput(){		
123
									$.ajax({"url" : "/ajax/resource",
124
										"type" :  "PUT" ,
125
										"success" : function(rdata) {
126
											if (rdata.success){													
127
													getDataResource();						
128
											} else {
129
												$.MsgBox.Alert("消息","资源发布失败");
130
											}
131
										},
132
										"data" :  JSON.stringify($data) ,
133
										"beforeSend":function(){/*console.log(this.data)*/ },
134
										"contentType" :  "application/json",
135
										dataType : "json"
136
									});
137
								}
120 138
								//console.log($data);
121 139
							resourceName();
122 140
//							professor();
123 141
							supportedServices();
124 142
							if(resourceNamePass && supportedServicesPass)
125 143
							{
126
								$.ajax({"url" : "/ajax/resource",
127
									"type" : resourceID ? "PUT" : "POST",
128
									"success" : function(rdata) {
129
										if (rdata.success) {
130
											if (resourceID) {											
131
												$(".blackcover").remove();
132
												$("body").css("overflow-y","auto");	
133
												$.MsgBox.Confirm("消息", "确定修改吗?",getDataResource);
134
												
135
											} else {
136
												$(".blackcover").remove();
137
												$("body").css("overflow-y","auto");												
138
												getDataResource();
139
												$.MsgBox.Alert("消息","资源发布成功");
144
								if(resourceID){
145
									$(".blackcover").remove();
146
									$("body").css("overflow-y","auto");
147
									$.MsgBox.Confirm("消息", "确定修改资源信息吗?", getDataput)
148
									
149
								}else{
150
									
151
									$.ajax({"url" : "/ajax/resource",
152
										"type" :  "POST",
153
										"success" : function(rdata) {
154
											if (rdata.success) 
155
											{											
156
													$(".blackcover").remove();
157
													$("body").css("overflow-y","auto");												
158
													getDataResource();
159
													$.MsgBox.Alert("消息","资源发布成功");										
160
											} 
161
											else 
162
											{
163
												$.MsgBox.Alert("消息","资源发布失败");
140 164
											}
141
										} else {
142
											$.MsgBox.Alert("消息","资源发布失败");
143
										}
144
									},
145
									"data" : resourceID ? JSON.stringify($data) : $data,
146
									"beforeSend":function(){/*console.log(this.data)*/ },
147
									"contentType" : resourceID ? "application/json": "application/x-www-form-urlencoded",
148
									dataType : "json"
149
								});
165
										},
166
										"data" : $data,
167
										"beforeSend":function(){/*console.log(this.data)*/ },
168
										"contentType" : "application/x-www-form-urlencoded",
169
										dataType : "json"
170
									});
171
								}
172
								
150 173
							}
151 174
						});
152 175
			});
@ -365,7 +388,7 @@ $("#consd").on("click",".detailmess",function(){
365 388
			$(".frm").click(function(){
366 389
				var $date = {};	
367 390
				$date.detailDemand=$(".detail").val();
368
				$date.deliverTime=$(".dealTime").val();
391
				$date.deliverTime=replaceStr($.trim($(".dealTime").val()));
369 392
				$date.dealPrice = $("#dealPrice").val();
370 393
				$date.payMethod = $("#payMethod").val();
371 394
				$date.replyNotes = $("#consultContent").val();
@ -415,7 +438,7 @@ $("#consd").on("click",".detailmess",function(){
415 438
			$(".frm").click(function(){
416 439
				var $date = {};	
417 440
				$date.detailDemand=$(".detail").val();
418
				$date.deliverTime=$(".dealTime").val();
441
				$date.deliverTime=replaceStr($.trim($(".dealTime").val()));
419 442
				$date.dealPrice = $("#dealPrice").val();
420 443
				$date.payMethod = $("#payMethod").val();
421 444
				$date.replyNotes = $("#consultContent").val();
@ -446,6 +469,7 @@ $("#consd").on("click",".detailmess",function(){
446 469
		$("#totalPrice").text(priceDifference);
447 470
		$(".liuyaninfo").css("display","none");		
448 471
		$(".pingjiainfo").css("display","none");
472
		$(".filebox").css("display","none");
449 473
		ajaxGet1(operationId);
450 474
		$(".payaddbox1").css("display","none");
451 475
		
@ -487,6 +511,7 @@ if(flag==0&&operationStatus==6){
487 511
		$("#totalPrice").text(priceDifference);
488 512
		$(".liuyaninfo").css("display","none");		
489 513
		$(".pingjiainfo").css("display","none");
514
		$(".filebox").css("display","none");
490 515
		ajaxGet1(operationId);
491 516
		$(".payaddbox1").css("display","none");
492 517
		discussGetPaidMoney(operationId,priceDifference)
@ -497,6 +522,7 @@ if(flag==0&&operationStatus==7){
497 522
	$("#totalPrice").text(priceDifference);
498 523
	$(".liuyaninfo").css("display","none");		
499 524
	$(".pingjiainfo").css("display","none");
525
	$(".filebox").css("display","none");
500 526
	ajaxGet1(operationId);
501 527
	$(".payaddbox1").css("display","none");
502 528
	discussGetPaidMoney(operationId,priceDifference)
@ -507,6 +533,7 @@ if(flag==0&&operationStatus==8){
507 533
	$("#totalPrice").text(priceDifference);
508 534
	$(".liuyaninfo").css("display","none");		
509 535
	$(".pingjiainfo").css("display","none");
536
	$(".filebox").css("display","none");
510 537
	ajaxGet1(operationId);
511 538
	$(".payaddbox1").css("display","none");
512 539
	discussGetPaidMoney(operationId,priceDifference)
@ -653,13 +680,16 @@ function getPageData(pageSize,pageNo,isbind){
653 680
getPageData(6,1,true);
654 681
//确认完成
655 682
$(".workmysrc").on("click",".acknowledgement",function(){
656
	finish();
657
	 var op=$(this).attr("operationId");	
658
	$(".com1").click(function(){
659
		
683
	//finish();
684
	//$.MsgBox.Alert('消息',"确认合作完成!");
685
	 var op=$(this).attr("operationId");
686
	 $.MsgBox.Confirm("消息", "确认合作完成!",finished);
687
	 
688
	 function finished(){
660 689
		 upStatus(op,8);
661
	})
662
	
690
	 }
691
	 
692
	 
663 693
})
664 694
//退款
665 695
$(".workmysrc").on("click",".drawback",function(){
@ -723,9 +753,9 @@ $(".workmysrc").on("click",".payMonety",function(){
723 753
					{
724 754
						if (rdata.success) 
725 755
						{  
726
							alert($("#isOnline").find("option:selected").val());
756
							//alert($("#isOnline").find("option:selected").val());
727 757
							
728
						$.MsgBox.Alert('消息',"此次付款成功!");
758
						 $.MsgBox.Alert('消息',"此次付款成功!");
729 759
								//location.reload(true);
730 760
						}
731 761
						else 
@ -826,7 +856,7 @@ function discussGetPaidMoney(operationId,priceDifference){
826 856
			for(var i=0;i<$data.length;i++){
827 857
				
828 858
				PopHtml = '<tr class="payitem">';
829
				PopHtml += '<td><div class="resouinforcon">'+$data[i].createTime+'</div></td>';
859
				PopHtml += '<td><div class="resouinforcon">'+changeTime($data[i].createTime)+'</div></td>';
830 860
				PopHtml += '<td><div class="resouinforcon">'+$data[i].professor.name+'</div></td>';
831 861
				PopHtml += '<td><div class="resouinforcon resou"></div></td>';
832 862
				PopHtml += '<td><div class="resouinforcon to"></div></td>';
@ -1084,36 +1114,45 @@ $(".workmysrc").on("click",".detailm",function(){
1084 1114
	var operationStatus=$(this).attr("operationStatus");
1085 1115
	var operationId=$(this).attr("operationId");
1086 1116
	var priceDifference=$(this).attr("dealPrice");
1117
	
1087 1118
	flag=1;
1088 1119
	if(flag==1&&operationStatus==1)
1089 1120
	{ 
1090 1121
		ResourceApply();
1122

1123
		$( "#datepicker" ).datepicker({ "dateFormat":" yy-mm-dd"});
1124

1091 1125
		$(".stateinfor span").text("修改申请中");
1092 1126
		$(".btnboxup").css({"display":"none"});
1093 1127
		$(".applysure").css({"display":"none"});
1094
		ajaxGet(operationId);
1128
		ajaxGet(operationId,1,1);
1095 1129
		//if($(".dealTime").val()!=""&&$(".detail").val()!="")
1096 1130
		//{
1097 1131
			$("#deliver").on("click",function()
1098 1132
					{	
1099 1133
						var $data = {};
1134
						$data.demandId = userid;
1135
						$data.resourceId = resourceId;
1100 1136
						$data.operationId=operationId;
1101 1137
						$data.detailDemand=$(".detail").val();
1102
						$data.dealTime=$(".dealTime").val();
1138
						//$data.dealTime=$(".dealTime").val();
1139
						$data.deliverTime=replaceStr($.trim($("#datepicker").val()));
1103 1140
						$data.operationStatus=1;
1141
						
1104 1142
						$.ajax({
1105 1143
							"url" : "/ajax/operation",
1106 1144
							"type" : "put",
1107 1145
							"success" : function(rdata) {
1108 1146
								if (rdata.success) {
1109
									location.reload(true);
1147
									$.MsgBox.Alert('消息',"资源申请信息修改成功");
1148
									//location.reload(true);
1110 1149
								} else {
1111
									//alert("jjj");
1150
									$.MsgBox.Alert('消息',"资源申请信息修改失败");
1112 1151
								}
1113 1152
							},
1114
							"data" :  JSON.stringify($data) ,
1153
							"data" : JSON.stringify($data) ,
1115 1154
							"contentType" :"application/json",
1116
							"beforeSend":function(){/*console.log(this.data)*/},
1155
							"beforeSend":function(){console.log(this.data)},
1117 1156
							dataType : "json"
1118 1157
						});
1119 1158
				});
@ -1173,6 +1212,7 @@ $(".workmysrc").on("click",".detailm",function(){
1173 1212
		$("#totalPrice").text(priceDifference);
1174 1213
		$(".liuyaninfo").css("display","none");		
1175 1214
		$(".pingjiainfo").css("display","none");
1215
		$(".filebox").css("display","none");
1176 1216
		ajaxGet1(operationId);
1177 1217
		$(".payaddbox1").css("display","none");
1178 1218
		discussGetPaidMoney(operationId,priceDifference);
@ -1214,6 +1254,7 @@ $(".workmysrc").on("click",".detailm",function(){
1214 1254
		$(".filebox").css("display","none");
1215 1255
		$(".liuyaninfo").css("display","none");		
1216 1256
		$(".pingjiainfo").css("display","none");
1257
		$(".filebox").css("display","none");
1217 1258
		ajaxGet1(operationId);
1218 1259
		$(".payaddbox1").css("display","none");
1219 1260
		discussGetPaidMoney(operationId,priceDifference)
@ -1223,6 +1264,7 @@ $(".workmysrc").on("click",".detailm",function(){
1223 1264
		$("#totalPrice").text(priceDifference);
1224 1265
		$(".liuyaninfo").css("display","none");		
1225 1266
		$(".pingjiainfo").css("display","none");
1267
		$(".filebox").css("display","none");
1226 1268
		ajaxGet1(operationId);
1227 1269
		$(".payaddbox1").css("display","none");
1228 1270
		discussGetPaidMoney(operationId,priceDifference)
@ -1232,6 +1274,7 @@ $(".workmysrc").on("click",".detailm",function(){
1232 1274
		$("#totalPrice").text(priceDifference);
1233 1275
		$(".liuyaninfo").css("display","none");		
1234 1276
		$(".pingjiainfo").css("display","none");
1277
		$(".filebox").css("display","none");
1235 1278
		ajaxGet1(operationId);
1236 1279
		$(".payaddbox1").css("display","none");
1237 1280
		discussGetPaidMoney(operationId,priceDifference)
@ -1264,11 +1307,12 @@ function upStatus(operationId,n){
1264 1307
		{
1265 1308
			if (rdata.success) 
1266 1309
			{
1267
					location.reload(true);
1310
				
1311
				//location.reload(true);
1268 1312
			}
1269 1313
			else 
1270 1314
			{
1271
				alert("jjj");
1315
				$.MsgBox.Alert('message','状态更新失败');
1272 1316
			}
1273 1317
		},
1274 1318
		"data" :{"operationId":operationId,"operationStatus":n},
@ -1278,7 +1322,7 @@ function upStatus(operationId,n){
1278 1322
	});
1279 1323
}
1280 1324
//我的需求,获取每条记录的数据根据合作id
1281
function ajaxGet(operationId){
1325
function ajaxGet(operationId,o,p){
1282 1326
	$.ajax({	
1283 1327
		"url":"/ajax/operation/"+operationId,
1284 1328
		"type":"get",
@ -1289,10 +1333,15 @@ function ajaxGet(operationId){
1289 1333
				{
1290 1334
				//console.log(data);
1291 1335
					$(".log").text(data.data.resource.resourceName);
1292
					$(".timelog").text(data.data.deliverTime);
1336
					$(".timelog").text(changeTime(data.data.createTime));
1293 1337
					$(".contration").text(data.data.operationId);
1294 1338
					$(".detail").text(data.data.detailDemand);
1295
					$(".dealTime").text(data.data.dealTime);
1339
					if(o==1&&p==1){
1340
						$(".dealTime").val(changeTime(data.data.deliverTime));
1341
					}else{
1342
						$(".dealTime").text(changeTime(data.data.deliverTime));
1343
					}
1344
					
1296 1345
					$(".sname").text(data.data.applysquare);
1297 1346
					$(".namecon").text(data.data.resource.professor.name);
1298 1347
					
@ -1324,10 +1373,10 @@ function ajaxGet1(operationId){
1324 1373
			if(data.success)
1325 1374
				{console.log(data);
1326 1375
					$(".log").text(data.data.resource.resourceName);
1327
					$(".timelog").text(data.data.deliverTime);
1376
					$(".timelog").text(changeTime(data.data.createTime));
1328 1377
					$(".contration").text(data.data.operationId);
1329 1378
					$(".detail").text(data.data.detailDemand);
1330
					$(".dealTime").text(data.data.dealTime);
1379
					$(".dealTime").text(changeTime(data.data.deliverTime));
1331 1380
					$(".namecon").text(data.data.resource.professor.name);
1332 1381
					$(".sname").text(data.data.applysquare);
1333 1382
					if(data.data.payMethod){

+ 270 - 112
src/main/webapp/js/search.js

@ -1,6 +1,11 @@
1 1
$(function(){
2 2
	loginStatus();
3 3
		var userid = $.cookie("userid");
4
		var c=0;
5
		var  subject;
6
		var key;
7
		var industry;
8
		var pageSize;
4 9
	 	if(userid){
5 10
//			$(".head-portrait").show();
6 11
//			$(".unlogin").hide();
@ -14,104 +19,166 @@ $(function(){
14 19
		$("#searchContent").val(GetQueryString("searchContent")); 
15 20
		$("#hsearchContent").val(GetQueryString("searchContent")); 
16 21
		
17
 		var getData = function (key,subject,industry,pageSize,pageNo,isbind){
18
 			$("#professorList").html("");
19
			$.ajax({"url" : "/ajax/professor/pq",
20
						"type" : "GET",
21
						"data" : {"key":key,"subject":subject,"industry":industry,"pageSize":pageSize,"pageNo":pageNo},
22
						"contentType" : "application/x-www-form-urlencoded",
23
						"success" : function($data) {							
24
							if ($data.success) {
25
								for(var i = 0 ; i < $data.data.data.length ; i++){
26
									//创建HTML标签  
27
									var dataHtml = "<div class='item'>";									
28
									dataHtml += "<a  class='infoi'  href='information-brow.html?professorId="+$data.data.data[i].id+"' ><div class='photo1'><img class='images' style='width:100%;'  src='/images/head/"+$data.data.data[i].id+"_l.jpg'/></div></a>";
29
									dataHtml += "<div class='synopsis'>";
30
									dataHtml += "<a href='information-brow.html?professorId="+$data.data.data[i].id+"' class='named'>";
31
									if(typeof($data.data.data[i].name) !== "undefined"){
32
										dataHtml += $data.data.data[i].name;
33
									}
34
									dataHtml += "</a><a href='information-brow.html?professorId="+$data.data.data[i].id+"' class='modify'></a>";
35
									dataHtml += "<div class='position'>";
36
									if(typeof($data.data.data[i].title) !== "undefined"){
37
										dataHtml += $data.data.data[i].title;
38
									}
39
									dataHtml += ",";
40
									if(typeof($data.data.data[i].department) !== "undefined"){
41
										dataHtml += $data.data.data[i].department;
42
									}
43
									dataHtml += ",";
44
									dataHtml += $data.data.data[i].organization.name;
45
									dataHtml += "</div>";
46
									dataHtml += "<div class='science'>";
47
									if(typeof($data.data.data[i].subject) !== "undefined"){
48
										dataHtml += $data.data.data[i].subject
49
									}
50
									dataHtml += "</div>";
51
									dataHtml += "<div class='industry'>";
52
									if(typeof($data.data.data[i].industry) !== "undefined"){
53
										dataHtml += $data.data.data[i].industry;
54
									}
55
									if(typeof($data.data.data[i].address) !== "undefined"){
56
										dataHtml +=	"<p>"+$data.data.data[i].address+"</p>";
57
									}
58
						
59
									dataHtml += "</div>";
60
									dataHtml += "</div>";	
61
									dataHtml += "<div class='operbox'><span class='operbtn consultbtn'>咨询</span></div>";
62
									
63
									$("#professorList").append(dataHtml);
64
									
65
									
66
									//获取头像		
67
									$(".images").load(function(){								
68
									})
69
									.error(function(){
70
										$(this).attr("src","/images/default-photo.jpg");
71
									});	
72
									
73
									
74
									//点击查看当前信息
75
									(function(i){
76
										$('.photo1').click(function()
77
									{
78
										if(userid==$data.data.data[i].id)
79
										{
80
											$(".infoi").attr("href","information.html");	
81
										}										
82
									})
83
									}
84
										
85
									)(i);
86
									//点击查看当前信息
87
									(function(i){
88
										$('.named').click(function()
89
									{
90
										if(userid==$data.data.data[i].id)
91
										{
92
											$(".named").attr("href","information.html");	
93
										}										
94
									})
95
									}
96
										
97
									)(i);
98

22
 		var getData = function (key,subject,industry,pageSize,pageNo,isbind)
23
 		{
24
 			console.log(c);
25
 			if(c==0)
26
 			{
27
 				$.ajax({"url" : "/ajax/professor/pq",
28
					"type" : "GET",
29
					"data" : {"key":key,"subject":subject,"industry":industry,"pageSize":pageSize,"pageNo":pageNo},
30
					"contentType" : "application/x-www-form-urlencoded",
31
					"success" : function($data) {							
32
						if ($data.success) {
33
							console.log($data);
34
							$("#professorList").html("");
35
							for(var i = 0 ; i < $data.data.data.length ; i++){
36
								//创建HTML标签  
37
								var dataHtml = "<div class='item'>";									
38
								dataHtml += "<a  class='infoi'  href='information-brow.html?professorId="+$data.data.data[i].id+"' ><div class='photo1'><img class='images' style='width:100%;'  src='/images/head/"+$data.data.data[i].id+"_l.jpg'/></div></a>";
39
								dataHtml += "<div class='synopsis'>";
40
								dataHtml += "<a href='information-brow.html?professorId="+$data.data.data[i].id+"' class='named'>";
41
								if(typeof($data.data.data[i].name) !== "undefined"){
42
									dataHtml += $data.data.data[i].name;
43
								}
44
								dataHtml += "</a><a href='information-brow.html?professorId="+$data.data.data[i].id+"' class='modify'></a>";
45
								dataHtml += "<div class='position'>";
46
								if(typeof($data.data.data[i].title) !== "undefined"){
47
									dataHtml += $data.data.data[i].title;
48
								}
49
								dataHtml += ",";
50
								if(typeof($data.data.data[i].department) !== "undefined"){
51
									dataHtml += $data.data.data[i].department;
99 52
								}
100
								if(isbind == true){
101
									$(".tcdPageCode").createPage({
102
								        pageCount:Math.ceil($data.data.total/pageSize),
103
								        current:$data.data.pageNo,
104
								        backFn:function(p){
105
								        	getData(key,subject,industry,pageSize,p,false);
106
								        }
107
								    });
53
								dataHtml += ",";
54
								dataHtml += $data.data.data[i].organization.name;
55
								dataHtml += "</div>";
56
								dataHtml += "<div class='science'>";
57
								if(typeof($data.data.data[i].subject) !== "undefined"){
58
									dataHtml += $data.data.data[i].subject
108 59
								}
60
								dataHtml += "</div>";
61
								dataHtml += "<div class='industry'>";
62
								if(typeof($data.data.data[i].industry) !== "undefined"){
63
									dataHtml += $data.data.data[i].industry;
64
								}
65
								if(typeof($data.data.data[i].address) !== "undefined"){
66
									dataHtml +=	"<p>"+$data.data.data[i].address+"</p>";
67
								}
68
					
69
								dataHtml += "</div>";
70
								dataHtml += "</div>";	
71
								dataHtml += "<div class='operbox'><span class='operbtn consultbtn'>咨询</span></div>";
72
								
73
								$("#professorList").append(dataHtml);
109 74
								
110
							} else {
111
								$.MsgBox.Alert("message",$data.msg);
75
								
76
								//获取头像		
77
								$(".images").load(function(){								
78
								})
79
								.error(function(){
80
									$(this).attr("src","/images/default-photo.jpg");
81
								});	
82
								
83
								
84
								//点击查看当前信息
85
								(function(i){
86
									$('.photo1').click(function()
87
								{
88
									if(userid==$data.data.data[i].id)
89
									{
90
										$(".infoi").attr("href","information.html");	
91
									}										
92
								})
93
								}
94
									
95
								)(i);
96
								//点击查看当前信息
97
								(function(i){
98
									$('.named').click(function()
99
								{
100
									if(userid==$data.data.data[i].id)
101
									{
102
										$(".named").attr("href","information.html");	
103
									}										
104
								})
105
								}
106
									
107
								)(i);
108

109
							}
110
							if(isbind == true){
111
								$(".tcdPageCode").createPage({
112
							        pageCount:Math.ceil($data.data.total/pageSize),
113
							        current:$data.data.pageNo,
114
							        backFn:function(p){
115
							        	getData(key,subject,industry,pageSize,p,false);
116
							        }
117
							    });
112 118
							}
119
							
120
						} else {
121
							$.MsgBox.Alert("message",$data.msg);
113 122
						}
114
					});
123
					}
124
				});
125
 			}
126
 			else
127
 			{
128
 				//查询我的所有资源
129
 				$.ajax({
130
 					"url" :"/ajax/resource/pq",
131
 					"type" : "get",	
132
 					"data" : {"key":key,"subject":subject,"industry":industry,"pageSize":pageSize,"pageNo":pageNo},
133
 					"contentType" : "application/x-www-form-urlencoded",
134
 					"success" : function(data) 
135
 					{console.log(data);
136
 						if (data.success) 
137
 						{
138
 							$("#professorList").html("");	
139
 							var $da=data.data.data;
140
 							for(var i=0;i<$da.length;i++)
141
 							{
142
 								var add='<div class="item">'
143
 			                    add+='<a class="resourcephoto" href=""><img src="images/default-resource.jpg" width="100%" height="100%"></a>'
144
 			                    add+='<div class="synopsis">'
145
 			                    add+='<div><a class="resouname" href="">'+$da[i].resourceName+'</a></div>'
146
 			                    add+='<div class="belongname">'+$da[i].professor.name+'<img class="modicon" src="images/rz.png" width="28"></div>'
147
 			                    add+='<div class="positionbox">职称,职位,新材料技术研究院,北京科技大学 |  北京</div>'
148
 			                    if($da[i].subject)
149
 			                    {
150
 			                    	add+='<div class="sciencebox">'+$da[i].subject+'</div>'
151
 			    				}	
152
 								if($da[i].industry)
153
 								{
154
 									add+='<div class="industrybox">'+$da[i].industry+'</div>'
155
 								}	
156
 								if($da[i].supportedServices)
157
 								{
158
 									 add+='<div class="provideservice">可提供服务:'+$da[i].supportedServices+'</div></div>' 
159
 								}	                                              
160
 			                    add+='<div class="operbox"><span class="operbtn consultbtn">咨询</span><span class="operbtn applybtn appl" resourceId='+$da[i].resourceId+' resourceName='+$da[i].resourceName+' professor='+$da[i].professor.name+'>申请</span></div>'
161
 			                	add+='</div>'
162
 			                	$("#professorList").append(add);					
163
 							}
164
 							if(isbind == true){
165
								$(".tcdPageCode").createPage({
166
							        pageCount:Math.ceil(data.data.total/pageSize),
167
							        current:data.data.pageNo,
168
							        backFn:function(p){
169
							        	getData(key,subject,industry,pageSize,p,false);
170
							        }
171
							    });
172
							}
173
 						}
174
 						 else
175
 						 {
176
 							$.MsgBox.Alert("message","请登录");
177
 						}
178
 					},				
179
 				});	
180
 			}
181
			
115 182
 		}
116 183
		
117 184
 		var subjectList = function (){
@ -139,11 +206,7 @@ $(function(){
139 206
    				$.MsgBox.Alert("message",data.msg);
140 207
    			}
141 208
    		})
142
 		}
143
		var  subject;
144
		var key;
145
		var industry;
146
		var pageSize;
209
 		}		
147 210
		var findProfessor = function (){
148 211
			key = $("#searchContent").val();
149 212
			subject = $("#subject .colorbg")[0].title;
@ -152,7 +215,7 @@ $(function(){
152 215
			getData(key,subject,industry,pageSize,1,true);
153 216
		}
154 217
		$("#search").on("click",function(){
155
			$("#hsearchContent").val($("#searchContent").val());  
218
			$("#hsearchContent").val($("#searchContent").val());			
156 219
			$("#professorList").remove();
157 220
			$(".aboutpro").append('<div class="about-in" id="professorList"></div>')
158 221
			$(".tcdPageCode").remove();
@ -179,6 +242,7 @@ $(function(){
179 242
			$(".tcdPageCode").remove();
180 243
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
181 244
			findProfessor();
245
			
182 246
		});	
183 247
		$(".class1").eq(1).on("click","a",function (){
184 248
			$(this).addClass("colorbg").siblings().removeClass("colorbg");
@ -211,19 +275,113 @@ $(function(){
211 275
	}) 
212 276
	
213 277
	/*专家、资源菜单切换*/
214
	$(".lookwho").change(function(){
215
		//$(this).addClass("tabcurrent").siblings().removeClass("tabcurrent");
216
		//$(".aboutcon").eq($(this).index()).show().siblings().hide();
217
		if($(this).value == "0"){
218
			$(".aboutpro").show();
219
			$(".aboutresou").hide();	
220
		}
221
		else{
222
			$(".aboutresou").show();
223
			$(".aboutpro").hide();
278
//	$(".lookwho").change(function(){
279
//		//$(this).addClass("tabcurrent").siblings().removeClass("tabcurrent");
280
//		//$(".aboutcon").eq($(this).index()).show().siblings().hide();
281
//		if($(this).value == "0"){
282
//			$(".aboutpro").show();
283
//			$(".aboutresou").hide();	
284
//		}
285
//		else{
286
//			$(".aboutresou").show();
287
//			$(".aboutpro").hide();
288
//		}
289
//		
290
//	})
291
	
292
	 //判断是搜寻专家还是资源
293
	 $(".floatL").change(function(){
294
			c=$(".floatL option:selected").val();
295
			
296
			$("#professorList").remove();
297
			$(".aboutpro").append('<div class="about-in" id="professorList"></div>')
298
			$(".tcdPageCode").remove();
299
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
300
			getData(key,subject,industry,pageSize,1,true,c);
301
});
302
	 //资源申请
303
	 function getIdentity(professorId){		
304
			$.ajax({	
305
			"url":"ajax/professor/"+professorId,
306
			"type":"get",
307
			"async": false,
308
			"success":function(data){
309
				if(data.success)
310
				{																						
311
					$(".frmtype option")[0].value=data.data.name;
312
					$(".frmtype option")[1].value=data.data.organization.name;					
313
				}
314
				else
315
				{
316
					$.MsgBox.Alert("消息","系统异常!");
317
				}
318
			},
319
			"error":function(){$.MsgBox.Alert('message','failddd')}
320
			})	
224 321
		}
225
		
226
	})
227
		
322
	 function replaceStr(s) 
323
		{ 
324
			var pattern = new RegExp("-");
325
			var rs = ""; 
326
			for (var i = 0; i < s.length; i++) { 
327
				rs = rs+s.substr(i, 1).replace(pattern, ''); 
328
			} 
329
			return rs; 
330
		} 	
331
	 $('.aboutpro').on("click",'.appl',function(){		
332
			ResourceApply();//调用资源申请HTML创建函数
333
			//获取当前时间并且格式化时间
334
			var myDate = new Date();
335
			var nowYear = myDate.getFullYear();
336
			var nowMonth = myDate.getMonth()+1;
337
			var nowDate = myDate.getDate();
338
			if(nowMonth<10){
339
				nowMonth="0"+nowMonth.toString();
340
			}
341
			if(nowDate<10){
342
				nowDate="0"+nowDate.toString();
343
			}
344
			var now = nowYear + "-" + nowMonth + "-" + nowDate;
345
			$( "#datepicker").val(now);
346
			$( "#datepicker" ).datepicker({ "dateFormat":" yy-mm-dd"});	
347
			$(".timelo").css("display","none");
348
			var resName=$(this).attr("resourcename");
349
			var name=$(this).attr("professor");
350
			var resourceID=$(this).attr("resourceId");	
351
			$(".namecon").text(name);
352
			$(".applysure").hide();
353
			$(".btnboxup").hide();																	
354
			$(".log").text(resName);		
355
			getIdentity(userid);			
356
			$("#deliver").on("click",function()
357
					{	
358
						var $data = {};
359
						$data.demandId = userid;
360
						$data.resourceId=resourceID;
361
						$data.detailDemand=$(".detail").val();
362
						//去除时间里面的-  和字符串前后的空格
363
						$data.deliverTime=replaceStr($.trim($(".dealTime").val()));	
364
						$data.operationStatus=1;
365
						$data.applysquare=$(".frmtype option:selected").val();																			
366
						$.ajax({
367
							"url" : "/ajax/operation",
368
							"type" : "POST",
369
							"success" : function(rdata) {
370
								if (rdata.success) {
371
									$.MsgBox.Alert('message','资源"'+ resName +'"申请发送成功!');
372
									$(".blackcover").remove();
373
									$("body").css("overflow","auto");
374
									//location.reload(true);
375
								} else {
376
									$.MsgBox.Alert('message','资源"'+ resName +'"申请发送失败,请重新申请!');
377
								}
378
							},
379
							"data" :  $data,
380
							"beforeSend":function(){/*console.log(this.data)*/},
381
							"contentType" :  "application/x-www-form-urlencoded",
382
							dataType : "json"
383
						});
384
				});
385
		});
228 386
});
229 387
 

+ 7 - 31
src/main/webapp/search.html

@ -5,9 +5,12 @@
5 5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6 6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7
<title>科袖-搜索页</title>
8
<link href="css/bootstrap.min.css" rel="stylesheet">
8 9
<link rel="stylesheet" href="css/reset.css" />
9 10
<link type="text/css" href="css/index.css" rel="stylesheet">
10 11
<link type="text/css" href="css/common.css" rel="stylesheet">
12
<link type="text/css" href="css/popup.css" rel="stylesheet">
13
<link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
11 14
</head>
12 15
<body>
13 16
<div id="header">
@ -113,36 +116,7 @@
113 116
                    </div>
114 117
                    <div class="tcdPageCode"></div>
115 118
                </div>
116
            	<!--资源信息-->
117
            	<div class="aboutcon aboutresou">
118
                	<div class="about-in" id="resourceList" >
119
                    	<div class="item">
120
                            <a class="resourcephoto" href=""><img src="images/default-resource.jpg" width="100%" height="100%"></a>
121
                            <div class="synopsis">
122
                            	<div><a class="resouname" href="">资源名称</a></div>
123
                                <div class="belongname">程学群<img class="modicon" src="images/rz.png" width="28"></div>
124
                                <div class="positionbox">职称,职位,新材料技术研究院,北京科技大学 |  北京</div>
125
                                <div class="sciencebox">耐蚀钢研发,工业环境腐蚀与防护,金属表面处理技术</div>
126
                                <div class="industrybox">新能源汽车 • LED相关行业 • 煤炭、钢铁、大宗商品、原油</div>
127
                                <div class="provideservice">可提供服务:XXXXXX,XXXXXXXXXX</div>
128
                            </div>
129
                            <div class='operbox'><span class='operbtn consultbtn'>咨询</span><span class='operbtn applybtn'>申请</span></div>
130
                        </div>
131
                        <div class="item">
132
                            <a class="resourcephoto" href=""><img src="images/default-resource.jpg" width="100%" height="100%"></a>
133
                            <div class="synopsis">
134
                            	<div><a class="resouname" href="">资源名称</a></div>
135
                                <div class="belongname">程学群<img class="modicon" src="images/rz.png" width="28"></div>
136
                                <div class="positionbox">职称,职位,新材料技术研究院,北京科技大学 |  北京</div>
137
                                <div class="sciencebox">耐蚀钢研发,工业环境腐蚀与防护,金属表面处理技术</div>
138
                                <div class="industrybox">新能源汽车 • LED相关行业 • 煤炭、钢铁、大宗商品、原油</div>
139
                                <div class="provideservice">可提供服务:XXXXXX,XXXXXXXXXX</div>
140
                            </div>
141
                            <div class='operbox'><span class='operbtn consultbtn'>咨询</span><span class='operbtn applybtn'>申请</span></div>
142
                        </div>
143
                    </div>
144
            		<div class="tcdPageCode"></div>
145
                </div>
119
            	
146 120
            </div>
147 121
        </div>
148 122
	</div>
@ -174,11 +148,13 @@
174 148
	<div class="footer-btm">本站由 阿里云 提供计算与安全服务 Copyright © 2016~2017 科袖 | 京ICP备12345678号 | 京ICP证123456号 | 京公网安备11010800011111号 | 网站联盟安全认证</div>
175 149
</div>
176 150
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
177
<script type="text/javascript" src="js/index.js"></script>
151
<script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
152
<script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
178 153
<script type="text/javascript" src="js/common.js"></script>
179 154
<script type="text/javascript" src="js/jquery.cookie.js"></script>
180 155
<script src="js/jquery.page.js"></script>
181 156
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
157
<script type="text/javascript" src="js/popup.js"></script>
182 158
<script type="text/javascript" src="js/search.js"></script>
183 159

184 160
</body>

+ 8 - 2
src/main/webapp/workspaces.html

@ -14,6 +14,7 @@
14 14
<link type="text/css" href="css/bootstrap.min.css" rel="stylesheet">
15 15
<link type="text/css" href="css/reset.css" rel="stylesheet" />
16 16
<link type="text/css" href="css/common.css" rel="stylesheet">
17
<link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
17 18
<link type="text/css" href="css/workspace.css" rel="stylesheet">
18 19
<link type="text/css" href="css/popup.css" rel="stylesheet">
19 20
</head>
@ -119,12 +120,17 @@
119 120

120 121

121 122
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
123
<script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
124
<script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
125

122 126
<script type="text/javascript" src="js/common.js"></script>
123
<script type="text/javascript" src="js/jquery.HeadP.js"> </script>
127

128
<!-- <script type="text/javascript" src="js/jquery.HeadP.js"> </script>
124 129
<script type="text/javascript" src="js/jquery.Jcrop.js"> </script>
125 130
<script type="text/javascript" src="js/basic.js"> </script>
126 131
<script type="text/javascript" src="/js/ajaxfileupload.js"></script>
127
<script src="js/jquery.page.js"></script>
132
 -->
133
 <script src="js/jquery.page.js"></script>
128 134
<script type="text/javascript"src="js/jquery.cookie.js"></script>
129 135
<script type="text/javascript"src="js/jquery.similar.msgbox.js"></script>
130 136
<script type="text/javascript" src="js/index.js"></script>