Browse Source

1、科研资源业务流程问题
2、将公共的部分提取到common.js中

luyanan 8 years ago
parent
commit
8ca3fad18d

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

91
			<div class="content-title">个人信息</div>
91
			<div class="content-title">个人信息</div>
92
			<div class="note">此信息用于站内沟通、社区等功能</div>
92
			<div class="note">此信息用于站内沟通、社区等功能</div>
93
			<div class="acountinfor">
93
			<div class="acountinfor">
94
				<div class="account-photo"><img src="images/pic1.jpg"></div>
94
				<div class="account-photo"><img id="headimg" src=""></div>
95
				<div class="account-name">
95
				<div class="account-name">
96
					<div class="text">
96
					<div class="text">
97
						<span class="text-txt floatL">程学群</span>
97
						<span class="text-txt floatL">程学群</span>

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

58
.content{ width:100%; height:auto; background:#f8f8f8; padding:60px 0 2px 0; }
58
.content{ width:100%; height:auto; background:#f8f8f8; padding:60px 0 2px 0; }
59
.content-in{ width:1170px;/*min-height:300px;*/ margin:auto;padding-bottom:20px;}
59
.content-in{ width:1170px;/*min-height:300px;*/ margin:auto;padding-bottom:20px;}
60
.sear-search{ width:100%; height:56px;margin-top:20px;}
60
.sear-search{ width:100%; height:56px;margin-top:20px;}
61
.sear-search .lookwho{ height:42px; width:100px; border:1px solid #d6d6d6;border-radius:10px 0 0 10px; background:url(../images/downselect.png) no-repeat 70px center #fff; padding-left:16px; font-size:14px;line-height:38px; color:#888;}
61
.sear-search .lookwho{ height:40px; width:100px; border:1px solid #d6d6d6;border-radius:10px 0 0 10px; background:url(../images/downselect.png) no-repeat 70px center #fff; padding-left:16px; font-size:14px;line-height:38px; color:#888;}
62
.sear-search .lookwho:focus{ border:none;}
62
.sear-search .lookwho:focus{ border:none;}
63
.sear-search .sear-txt{ width:530px; height:40px; background:#fff; border:none; border-radius:0; float:left;font-size:16px;line-height:40px;box-shadow: 0px 0px 5px #ccc inset; padding-left:20px; color:#a3a3a3;}
63
.sear-search .sear-txt{ width:530px; height:40px; background:#fff; border:none; border-radius:0; float:left;font-size:16px;line-height:40px;box-shadow: 0px 0px 5px #ccc inset; padding-left:20px; color:#a3a3a3;}
64
.sear-search .sear-btn{ width:140px; height:42px; background:#ff8400; border-radius:0 10px 10px 0; float:left; cursor:pointer;font-size:18px;line-height:40px; color:#fff; text-align:center; }
64
.sear-search .sear-btn{ width:140px; height:40px; background:#ff8400; border-radius:0 10px 10px 0; float:left; cursor:pointer;font-size:18px;line-height:40px; color:#fff; text-align:center; }
65

65

66
/*搜索分类*/
66
/*搜索分类*/
67
.classify{ width:100%; /*min-height:200px; border:1px #e2e2e2 solid;*/ margin-top:10px;border-radius: 10px;background: #fff; padding:10px 0; }
67
.classify{ width:100%; /*min-height:200px; border:1px #e2e2e2 solid;*/ margin-top:10px;border-radius: 10px;background: #fff; padding:10px 0; }
195
.head-left{ float:left;width:200px; height:200px; border-radius:50%;position:relative;overflow:hidden;}
195
.head-left{ float:left;width:200px; height:200px; border-radius:50%;position:relative;overflow:hidden;}
196
.replace-photo{ display:block; width:100%; height:50px; position:absolute; bottom:-50px;background:url(../images/take-photo.png) no-repeat center center; background-color:rgba(0,0,0,0.4);font-size:16px;line-height:44px; color:#fff; text-align:center;}
196
.replace-photo{ display:block; width:100%; height:50px; position:absolute; bottom:-50px;background:url(../images/take-photo.png) no-repeat center center; background-color:rgba(0,0,0,0.4);font-size:16px;line-height:44px; color:#fff; text-align:center;}
197
/*.take-photo{ display:block; width:20px; height:20px; position:absolute; top:50%; margin-top:-10px; left:50%; margin-left:-10px;background:url(../images/take-photo.png) no-repeat center center; }*/
197
/*.take-photo{ display:block; width:20px; height:20px; position:absolute; top:50%; margin-top:-10px; left:50%; margin-left:-10px;background:url(../images/take-photo.png) no-repeat center center; }*/
198
.head-center{ float:left; width:500px; min-height:150px; margin-top:20px; margin-left:100px;}
198
.head-center{ float:left; width:500px; min-height:150px; margin-top:20px; margin-left:64px;}
199
.input-txt{ width:175px; height:26px; border-radius:5px; border:1px #f99550 solid; box-shadow:0 0 1px #f99550 inset; float:left; padding-left:10px;}
199
.input-txt{ width:175px; height:26px; border-radius:5px; border:1px #f99550 solid; box-shadow:0 0 1px #f99550 inset; float:left; padding-left:10px;}
200
.infor{clear:both; width:100%; height:26px; margin-bottom:10px; }
200
.infor{clear:both; width:100%; height:26px; margin-bottom:10px; }
201
.infor span{ display:block; width:60px; height:26px; float:left;font-size:14px;line-height:26px; color:#000; margin-left:10px;}
201
.infor span{ display:block; width:60px; height:26px; float:left;font-size:14px;line-height:26px; color:#000; margin-left:10px;}
225
.reedit{ clear:both; width:665px; min-height:210px; padding:10px;margin-left:35px; border:1px #f99550 solid; box-shadow:0 0 1px #f99550 inset; font-size:14px;line-height:20px; color:#3e3e3e;resize:none;
225
.reedit{ clear:both; width:665px; min-height:210px; padding:10px;margin-left:35px; border:1px #f99550 solid; box-shadow:0 0 1px #f99550 inset; font-size:14px;line-height:20px; color:#3e3e3e;resize:none;
226
}
226
}
227
.edit{ display:block; float:left; width:22px; height:22px; background:url(../images/edit.png) no-repeat right center;margin: 15px 6px;cursor:pointer;}
227
.edit{ display:block; float:left; width:22px; height:22px; background:url(../images/edit.png) no-repeat right center;margin: 15px 6px;cursor:pointer;}
228
.edit:hover{background:url(../images/edit.png) no-repeat left center;}
228
.modifybox{ display:none;}
229
.modifybox{ display:none;}
229
.infor-browse{ clear:both; margin-bottom:20px;}
230
.infor-browse{ clear:both; margin-bottom:20px;}
230
.btn-marL{ margin-left:35px;cursor:pointer; }
231
.btn-marL{ margin-left:35px;cursor:pointer; }

+ 2 - 2
src/main/webapp/css/login.css

10
.inputtxtbtn{text-indent:0em;}
10
.inputtxtbtn{text-indent:0em;}
11
.inputtxt:focus{ border:1px solid #ff8400;}
11
.inputtxt:focus{ border:1px solid #ff8400;}
12
.input_warning{ border:1px solid red; }
12
.input_warning{ border:1px solid red; }
13
.submitBtn {display: block; font-size:16px;width: 100%;cursor:pointer;height: 44px;text-indent:0;line-height: 44px;background: #ff8400;text-align: center;margin: 15px 0px;color: #fff;border:1px solid #ff8400;}
13
.submitBtn {display: block;padding: 0; font-size:16px;width: 100%;cursor:pointer;height: 44px;text-indent:0;line-height: 44px;background: #ff8400;text-align: center;margin: 15px 0px;color: #fff;border:1px solid #ff8400;}
14
/*登录邀请码*/
14
/*登录邀请码*/
15
.loginbox{ /*width:620px; height:600px;*/ background:#fff; margin:auto; padding:20px; margin-bottom:40px;  position:absolute;  z-index:999; border-radius:10px; border:1px #9f9d9d solid; box-shadow:1px 1px 8px #9f9d9d; }
15
.loginbox{ /*width:620px; height:600px;*/ background:#fff; margin:auto; padding:20px; margin-bottom:40px;  position:absolute;  z-index:999; border-radius:10px; border:1px #9f9d9d solid; box-shadow:1px 1px 8px #9f9d9d; }
16

16

63
.ecode p{ font-size:14px;}
63
.ecode p{ font-size:14px;}
64
.downcode{ margin:10px auto; width:120px; height:120px;}
64
.downcode{ margin:10px auto; width:120px; height:120px;}
65
/*首次登录*/
65
/*首次登录*/
66
.login-first{ /*width:466px; height:596px;*/ background:#fff; margin:auto; margin-top:35px; padding:0 30px; padding-bottom:40px; position:absolute;  z-index:999; border-radius:10px; border:1px #9f9d9d solid; box-shadow:1px 1px 8px #9f9d9d;margin-bottom:40px;}
66
.login-first{ /*width:466px; height:596px;*/ background:#fff; margin:auto; margin-top:35px; padding:30px; padding-bottom:40px; position:absolute;  z-index:999; border-radius:10px; border:1px #9f9d9d solid; box-shadow:1px 1px 8px #9f9d9d;margin-bottom:40px;}
67
.logos{ clear:both;width:145px; height:100px; margin:auto; padding-top:-40px;}
67
.logos{ clear:both;width:145px; height:100px; margin:auto; padding-top:-40px;}
68
.logos img{ width:100%;}
68
.logos img{ width:100%;}
69
.welcome{font-size:16px;line-height:32px;color:#747474; text-align:center;padding:10px 0;}
69
.welcome{font-size:16px;line-height:32px;color:#747474; text-align:center;padding:10px 0;}

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

131
					</div>
131
					</div>
132
					<div class="modifybox">
132
					<div class="modifybox">
133
					<div class="select-sele">
133
					<div class="select-sele">
134
					<div class="select btn-marL" >
134
					<div class="btn-marL" >
135
					  	<input type="text" class="input-txt" id="subject"/>
135
					  	<input type="text" class="input-txt" id="subject"/>
136
					</div>
136
					</div>
137
					
137
					

+ 15 - 12
src/main/webapp/js/account-set.js

1
$(function(){
1
$(function(){
2
	
2
	
3
			//loginStatus();
3
	loginStatus();//读取用户头像	
4
		var userid = $.cookie("userid");
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
			});
14
		}
5

15
		valUser();
6
		valUser();
16
		$("#hsearch").on("click",function (){
7
		$("#hsearch").on("click",function (){
17
	   		var searchContent = $("#hsearchContent").val();
8
	   		var searchContent = $("#hsearchContent").val();
18
	   		location.href = "search.html?searchContent="+searchContent;
9
	   		location.href = "search.html?searchContent="+searchContent;
19
	   })
10
	   		//个人信息头像获取
11
	   		$("#headimg").attr("src", "/images/head/" + userid + "_l.jpg");
12
			$("#headimg").load(function() {})
13
				.error(function() {
14
					$("#headimg").attr("src",  "/images/default-photo.jpg");
15
				});
16
})
20
		/*专家信息左导航背景点击切换*/
17
		/*专家信息左导航背景点击切换*/
21
		$(".leftsidebar").click(function(){
18
		$(".leftsidebar").click(function(){
22
			var index = $(this).index()-1;
19
			var index = $(this).index()-1;
299
			/*alert("请输入验证码是否正确");*/
296
			/*alert("请输入验证码是否正确");*/
300
		}
297
		}
301
	}
298
	}
299
	
300
	//个人信息设置读取
301
	
302
	
303
	
304
	

+ 10 - 4
src/main/webapp/js/common.js

1

2
var userid;	
1
function exit(){
3
function exit(){
2
	
4
	
3
	$.cookie('userid', null); 
5
	$.cookie('userid', null); 
39
		r = null; 
41
		r = null; 
40
		return context == null || context == "" || context == "undefined" ? "" : context; 
42
		return context == null || context == "" || context == "undefined" ? "" : context; 
41
	}*/
43
	}*/
42
var userid;	
44

43
function loginStatus(){
45
function loginStatus(){
44
	userid = $.cookie('userid');
46
	userid = $.cookie('userid');
45
	if(userid){
46
		$(".head-portrait").show();
47
	if(userid && userid != "null" && userid!=null){
48
		$(".onlogin").show();
47
		$(".unlogin").hide();
49
		$(".unlogin").hide();
48
 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
50
 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
49
		$(".portrait-p").load(function(){									
51
		$(".portrait-p").load(function(){//判断图片是否加载,加载不成功默认有默认的图像									
50
		})
52
		})
51
		.error(function(){
53
		.error(function(){
52
			$(".portrait-p").attr("src","/images/default-photo.jpg");
54
			$(".portrait-p").attr("src","/images/default-photo.jpg");
53
		});
55
		});
56
	}else{
57
		$(".onlogin").hide();
58
		$(".unlogin").show();
54
	}
59
	}
55
	
60
	
56
	
61
	
66
//转换格式
71
//转换格式
67
function changeTime(dealtime){
72
function changeTime(dealtime){
68
	   var s = dealtime;
73
	   var s = dealtime;
74
	   //console.log(s);
69
	   if(dealtime.length==8){
75
	   if(dealtime.length==8){
70
	   	var y = s.substr(0,4);
76
	   	var y = s.substr(0,4);
71
	   var m = s.substr(4,2);
77
	   var m = s.substr(4,2);

+ 2 - 9
src/main/webapp/js/index.js

47
	
47
	
48
});
48
});
49
//加载页面时,判断是否登陆
49
//加载页面时,判断是否登陆
50
//loginStatus();
50
//
51

51

52
var userid = $.cookie("userid");
52
var userid = $.cookie("userid");
53
if (userid && userid != "null" && userid != null) {
53
if (userid && userid != "null" && userid != null) {
54
	$(".myWorkspace").attr("href","workspaces.html?"+userid);
54
	$(".myWorkspace").attr("href","workspaces.html?"+userid);
55
	$(".onlogin").show();
56
	$(".unlogin").hide();
57
	$(".portrait-p").attr("src", "/images/head/" + userid + "_m.jpg");
58
	//判断图片是否加载,加载不成功默认有默认的图像
59
	$(".portrait-p").load(function() {})
60
		.error(function() {
61
			$(".portrait-p").attr("src", "/images/default-photo.jpg");
62
		});
55
	loginStatus();
63
}
56
}
64

57

65
//登陆个人信息下拉菜单
58
//登陆个人信息下拉菜单

+ 43 - 44
src/main/webapp/js/information.brow.js

1
$(function(){
1
$(function(){
2
//loginStatus();
2
loginStatus();//读取用户头像
3
	 	var userid = $.cookie("userid");
3
	 	var userid = $.cookie("userid");
4
	 	var professorId = GetQueryString("professorId");
4
	 	var professorId = GetQueryString("professorId");
5
	 	var name;
5
	 	var name;
6
	 	if(professorId){
6
	 	if(professorId){
7
	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
8
			$(".portrait-p").load(function(){									
9
			})
10
			.error(function(){
11
				$(".portrait-p").attr("src","/images/default-photo.jpg");
12
			});
13
         
7

14
	 		var subjectShow = function (data){
8
	 		var subjectShow = function (data){
15
				if(data != undefined &&  data.length != 0 ){
9
				if(data != undefined &&  data.length != 0 ){
16
					var subs = new Array();
10
					var subs = new Array();
455
	}
449
	}
456
//资源申请入口
450
//资源申请入口
457
	$('.introduction').on("click",'.applicant',function(){
451
	$('.introduction').on("click",'.applicant',function(){
458
		ResourceApply();//调用资源申请HTML创建函数
459
		//获取当前时间并且格式化时间
460
		var myDate = new Date();
461
		var nowYear = myDate.getFullYear();
462
		var nowMonth = myDate.getMonth()+1;
463
		var nowDate = myDate.getDate();
464
		if(nowMonth<10){
465
			nowMonth="0"+nowMonth.toString();
466
		}
467
		if(nowDate<10){
468
			nowDate="0"+nowDate.toString();
469
		}
470
		var now = nowYear + "-" + nowMonth + "-" + nowDate;
471
		$( "#datepicker").val(now);
472

473
		//console.log(now);
474
		
475
		$( "#datepicker" ).datepicker({ "dateFormat":" yy-mm-dd"});
476
		//console.log(name);
477
		$(".timelo").css("display","none");
478
		$(".namecon").text(name);
479
		$(".applysure").hide();
480
		$(".btnboxup").hide();
481
		var index1=$(this).parent().parent().parent().index();
482
		var resName=$('.presou').eq(index1).text();
483
		//console.log(index1);
484
		var m=console.log();
485
		var resourceID=$(this).attr("resourceId");
486
		//console.log(resourceID);
487
		//
488
		$(".log").text(resName);
489
		
490
		getIdentity(userid);
491
		
492
		$("#deliver").on("click",function()
493
				{	
452
		if(userid && userid != null && userid != "null"){
453
			ResourceApply();//调用资源申请HTML创建函数
454
			//获取当前时间并且格式化时间
455
			var myDate = new Date();
456
			var nowYear = myDate.getFullYear();
457
			var nowMonth = myDate.getMonth()+1;
458
			var nowDate = myDate.getDate();
459
			if(nowMonth<10){
460
				nowMonth="0"+nowMonth.toString();
461
			}
462
			if(nowDate<10){
463
				nowDate="0"+nowDate.toString();
464
			}
465
			var now = nowYear + "-" + nowMonth + "-" + nowDate;
466
			$( "#datepicker").val(now);
467
	
468
			//console.log(now);
469
			
470
			$( "#datepicker" ).datepicker({ "dateFormat":" yy-mm-dd"});
471
			//console.log(name);
472
			$(".timelo").css("display","none");
473
			$(".namecon").text(name);
474
			$(".applysure").hide();
475
			$(".btnboxup").hide();
476
			var index1=$(this).parent().parent().parent().index();
477
			var resName=$('.presou').eq(index1).text();
478
			//console.log(index1);
479
			var m=console.log();
480
			var resourceID=$(this).attr("resourceId");
481
			//console.log(resourceID);
482
			//
483
			$(".log").text(resName);
484
			
485
			getIdentity(userid);
486
			
487
			$("#deliver").on("click",function()
488
					{	
489
				
494
					var $data = {};
490
					var $data = {};
495
					$data.demandId = userid;
491
					$data.demandId = userid;
496
					$data.resourceId=resourceID;
492
					$data.resourceId=resourceID;
524
						dataType : "json"
520
						dataType : "json"
525
					});
521
					});
526
			});
522
			});
523
		}else{
524
			$.MsgBox.Alert("消息","您还未登录,请登录之后进行资源申请");
525
		}	
527
	});
526
	});
528
	
527
	
529
	
528
	

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

2
	//1获取数据
2
	//1获取数据
3
	loginStatus();
3
	loginStatus();
4
	 	var userid = $.cookie("userid");
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){
14
			//填充学术领域
6
			//填充学术领域
15
	 		var subjectShow = function (data){
7
	 		var subjectShow = function (data){
16
				if(data != undefined &&  data.length != 0 ){
8
				if(data != undefined &&  data.length != 0 ){
252
		}
244
		}
253
	}
245
	}
254
});
246
});
255
//}
256
//else {
257
//	location.href = "login.html";
258
//	return;
259
//}
247
}
248
else {
249
	location.href = "login.html";
250
	return;
251
}
260

252

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

+ 14 - 15
src/main/webapp/js/jquery.similar.msgbox.js

15
    var GenerateHtml = function (type, title, msg) {
15
    var GenerateHtml = function (type, title, msg) {
16
        var _html = "";
16
        var _html = "";
17
        _html += '<div id="mb_box"></div><div id="mb_con"><span id="mb_tit">' + title + '</span>';
17
        _html += '<div id="mb_box"></div><div id="mb_con"><span id="mb_tit">' + title + '</span>';
18
        _html += '<a id="mb_ico">x</a><div id="mb_msg">' + msg + '</div><div id="mb_btnbox">';
18
        _html += '<a id="mb_ico"></a><div id="mb_msg">' + msg + '</div><div id="mb_btnbox">';
19
        if (type == "alert") {
19
        if (type == "alert") {
20
            _html += '<input id="mb_btn_ok" type="button" value="确定" />';
20
            _html += '<input id="mb_btn_ok" type="button" value="确定" />';
21
        }
21
        }
33
            filter: 'Alpha(opacity=60)', backgroundColor: 'black', top: '0', left: '0', opacity: '0.3'
33
            filter: 'Alpha(opacity=60)', backgroundColor: 'black', top: '0', left: '0', opacity: '0.3'
34
        });
34
        });
35
        $("#mb_con").css({ zIndex: '999999', width: '400px', position: 'fixed',
35
        $("#mb_con").css({ zIndex: '999999', width: '400px', position: 'fixed',
36
            backgroundColor: 'White', borderRadius: '6px',boxShadow:'1px 4px 10px #999'
36
            backgroundColor: 'White', borderRadius: '10px',boxShadow:'1px 4px 10px #999'
37
        });
37
        });
38
        $("#mb_tit").css({ display: 'block', fontSize: '14px', color: '#444', padding: '10px 15px',
38
        $("#mb_tit").css({ display: 'block', fontSize: '14px', color: '#444', padding: '10px 15px',
39
            backgroundColor: '#DDD', borderRadius: '6px 6px 0 0',
39
            backgroundColor: '#DDD', borderRadius: '10px 10px 0 0',
40
            borderBottom: '3px solid #ff8400', fontWeight: 'bold',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif'
40
            borderBottom: '3px solid #ff8400', fontWeight: 'bold',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif'
41
        });
41
        });
42
        $("#mb_msg").css({ padding: '20px', lineHeight: '20px',
42
        $("#mb_msg").css({ padding: '20px', lineHeight: '20px',
43
            borderBottom: '1px dashed #DDD', fontSize: '14px',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif'
43
            borderBottom: '1px dashed #DDD',wordBreak:'break-all', textAlign:'justify', fontSize: '14px',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif'
44
        });
44
        });
45
        $("#mb_ico").css({ display: 'block', position: 'absolute', right: '10px', top: '9px',
46
            border: '1px solid #666', width: '20px', height: '20px', textAlign: 'center',
47
            lineHeight: '16px', cursor: 'pointer', borderRadius: '12px',color:'#666', fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif',fontSize: '16px'
45
        $("#mb_ico").css({ display: 'block', position: 'absolute', right: '10px', top: '8px',
46
        	background:'url(../images/workclose.png) center center no-repeat', width: '24px', height: '24px',cursor: 'pointer'
48
        });
47
        });
49
        $("#mb_btnbox").css({ margin: '15px 0 10px 0', textAlign: 'center' });
48
        $("#mb_btnbox").css({ margin: '15px 0 10px 0', textAlign: 'center' });
50
        $("#mb_btn_ok,#mb_btn_no").css({ width: '85px', height: '30px', color: 'white', border: 'none' });
51
        $("#mb_btn_ok").css({backgroundImage:'none', padding:'0',margin:'0', backgroundColor: '#ff8400',borderRadius: '6px',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif'});
52
        $("#mb_btn_no").css({backgroundImage:'none', padding:'0',margin:'0', backgroundColor: 'gray', marginLeft: '20px',borderRadius: '6px',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif' });
49
        $("#mb_btn_ok,#mb_btn_no").css({ width: '84px', fontSize: '14px', height: '30px', color: 'white', border: 'none' });
50
        $("#mb_btn_ok").css({backgroundImage:'none', padding:'0',margin:'0', backgroundColor: '#ff8400',borderRadius: '10px',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif'});
51
        $("#mb_btn_no").css({backgroundImage:'none', padding:'0',margin:'0', backgroundColor: 'gray', marginLeft: '20px',borderRadius: '10px',fontFamily: 'Microsoft Yahei,Hiragino Sans GB, PingFang SC,Helvetica Neue,WenQuanYi Micro Hei,sans-serif' });
53
        //右上角关闭按钮hover样式
52
        //右上角关闭按钮hover样式
54
        $("#mb_ico").hover(function () {
55
            $(this).css({ backgroundColor: '#ff8400', color: 'White',border:'1px solid #ff8400'  });
56
        }, function () {
57
            $(this).css({ backgroundColor: '#DDD', color: '#666',border:'1px solid #666' });
58
        });
53
//        $("#mb_ico").hover(function () {
54
//            $(this).css({ backgroundColor: '#ff8400', color: 'White',border:'1px solid #ff8400'  });
55
//        }, function () {
56
//            $(this).css({ backgroundColor: '#DDD', color: '#666',border:'1px solid #666' });
57
//        });
59
        var _widht = document.documentElement.clientWidth;  //屏幕宽
58
        var _widht = document.documentElement.clientWidth;  //屏幕宽
60
        var _height = document.documentElement.clientHeight; //屏幕高
59
        var _height = document.documentElement.clientHeight; //屏幕高
61
        var boxWidth = $("#mb_con").width();
60
        var boxWidth = $("#mb_con").width();

+ 19 - 7
src/main/webapp/js/login.js

74
					success:function(data){  
74
					success:function(data){  
75

75

76
						if(data.success){
76
						if(data.success){
77
							if(data.data != "null" && data.data != null){
78
								if(data.data.auth){
77
								
78
							var professorId = $.cookie('userid');
79
							console.log(professorId);
80
							$.ajax({	
81
							"url":"ajax/professor/"+professorId,
82
							"type":"get",
83
							"async": false,
84
							"success":function(data){
85
								if(data.data!=null)
86
								{	
79
									location.href="index.html";
87
									location.href="index.html";
80
								}else{
81
									location.href="login-first.html";
88
									//console.log(data);
82
								}
89
								}
83
							}else{
84
								$(".msg5").text("登录账号和密码不匹配!");
85
							}
90
								else
91
								{
92
									//console.log(data);
93
									location.href="information-add.html?id="+ professorId;
94
								}
95
							},
96
							"error":function(){$.MsgBox.Alert('message','failddd')}
97
							})
86
						}else{
98
						}else{
87
							$(".msg5").text("系统异常!");
99
							$(".msg5").text("系统异常!");
88
							// alert("系统异常!");
100
							// alert("系统异常!");

+ 228 - 208
src/main/webapp/js/sciresource.js

228
								$.ajax({		
228
								$.ajax({		
229
										"url":"/ajax/operation/pqres",
229
										"url":"/ajax/operation/pqres",
230
										"type":"get",
230
										"type":"get",
231
										"async": true,
231
										"async": false,
232
										"data":{"resourceId":$('.resoumag').eq(e+1).attr("resourceId"),"pageSize":pageSize,"pageNo":pageNo},						
232
										"data":{"resourceId":$('.resoumag').eq(e+1).attr("resourceId"),"pageSize":pageSize,"pageNo":pageNo},						
233
										"success":function(data){			
233
										"success":function(data){			
234
											if(data.success)
234
											if(data.success)
317
																		var string='<span>合作进行中</span><br/>'
317
																		var string='<span>合作进行中</span><br/>'
318
																		string+='<a class="operatebtn">'
318
																		string+='<a class="operatebtn">'
319
																			string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>查看详情</span><br />'
319
																			string+='<span class="detailmess"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+' dealPrice='+data.data.data[j].dealPrice+'>查看详情</span><br />'
320
																		string+='<span class="acknowledgement"resourceId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>确认完成</span><br />'
320
																		//string+='<span class="acknowledgement"resourceId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>确认完成</span><br />'
321
																		string+='<span class="complain"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>投诉</span>'
321
																		string+='<span class="complain"resourId='+data.data.data[j].resource.resourceId+' operationStatus='+data.data.data[j].operationStatus+' operationId='+data.data.data[j].operationId+'>投诉</span>'
322
																		string+='</a>'
322
																		string+='</a>'
323
																			$(".modification"+e+"").eq(j).html(string);
323
																			$(".modification"+e+"").eq(j).html(string);
365
	$(".stateinfor span").text("回复申请");
365
	$(".stateinfor span").text("回复申请");
366
	var operationId=$(this).attr("operationId");
366
	var operationId=$(this).attr("operationId");
367
	var operationStatus=$(this).attr("operationStatus");
367
	var operationStatus=$(this).attr("operationStatus");
368
	var priceDifference=$(this).attr("dealPrice");
369
	//console.log(priceDifference);
368
	var priceDifference=$(this).attr("dealPrice");	
369
	opo=operationId;
370
	flag=0;
370
	flag=0;
371
	
371
	
372
	if(flag==0&&operationStatus==1)
372
	if(flag==0&&operationStatus==1)
376
		$(".detail").replaceWith("<span class='detail'></span>");
376
		$(".detail").replaceWith("<span class='detail'></span>");
377
		$("select").replaceWith("<span class='sname'></span>")
377
		$("select").replaceWith("<span class='sname'></span>")
378
		$(".btnboxdown").css({"display":"none"});
378
		$(".btnboxdown").css({"display":"none"});
379
		$(".applysure").css({"display":"none"});
380
		//$(".resouinfotype2").text("");
379
		$(".applysure").css({"display":"none"});		
381
		$("#nextStep").click(function(){
380
		$("#nextStep").click(function(){
382
			$(".stateinfor span").text("报价中");
381
			$(".stateinfor span").text("报价中");
383
			$(".btnboxup").css({"display":"none"});
382
			$(".btnboxup").css({"display":"none"});
387
			
386
			
388
			$(".frm").click(function(){
387
			$(".frm").click(function(){
389
				var $date = {};	
388
				var $date = {};	
390
				$date.detailDemand=$(".detail").val();
391
				$date.deliverTime=replaceStr($.trim($(".dealTime").val()));
392
				$date.dealPrice = $("#dealPrice").val();
389
				$date.detailDemand=$(".detail").text();
390
				$date.deliverTime=replaceStr($.trim($(".dealTime").text()));
391
				$date.dealPrice =$("#dealPrice").val();
393
				$date.payMethod = $("#payMethod").val();
392
				$date.payMethod = $("#payMethod").val();
394
				$date.replyNotes = $("#consultContent").val();
393
				$date.replyNotes = $("#consultContent").val();
395
				$date.applysquare = $(".sname").text();
394
				$date.applysquare = $(".sname").text();
402
					"contentType" :"application/json",
401
					"contentType" :"application/json",
403
					"success" : function(data) {
402
					"success" : function(data) {
404
						if (data.success) {					
403
						if (data.success) {					
405
							location.reload(true);
404
							$(".blackcover").remove();
405
							$("body").css("overflow-y","auto");
406
							getDataResource();
407
							$.MsgBox.Alert('message',"报价成功");
406
						} else {
408
						} else {
407
							$.MsgBox.Alert('message',data.msg);
409
							$.MsgBox.Alert('message',data.msg);
408
						}
410
						}
417
		$("#refuses").click(function(){
419
		$("#refuses").click(function(){
418
			ResourceApply();
420
			ResourceApply();
419
			ajaxGet(operationId);
421
			ajaxGet(operationId);
420
			upStatus(operationId,5);
422
			n=5;
423
			$(".blackcover").remove();
424
			$("body").css("overflow-y","auto");
425
			$.MsgBox.Confirm("消息", "确定拒绝吗?",upStatus1);
421
		});
426
		});
422
	}
427
	}
423
	if(flag==0&&operationStatus==2){
428
	if(flag==0&&operationStatus==2){
427
		$(".detail").replaceWith("<span class='detail'></span>");
432
		$(".detail").replaceWith("<span class='detail'></span>");
428
		$("select").replaceWith("<span class='sname'></span>")
433
		$("select").replaceWith("<span class='sname'></span>")
429
		$(".btnboxdown").css({"display":"none"});
434
		$(".btnboxdown").css({"display":"none"});
430
		$(".applysure").css({"display":"none"});
431
		//$(".resouinfotype2").text("");		
432
			$(".stateinfor span").text("修改报价中");
433
			$(".btnboxup").css({"display":"none"});
434
			$(".btnboxdown").css({"display":"block"});
435
			$(".applysure").css({"display":"block"});
436
			$(".bag").css("display","none");
437
			
435
		$(".applysure").css({"display":"none"});		
436
		$(".stateinfor span").text("修改报价中");
437
		$(".btnboxup").css({"display":"none"});
438
		$(".btnboxdown").css({"display":"block"});
439
		$(".applysure").css({"display":"block"});
440
		$(".bag").css("display","none");			
438
			$(".frm").click(function(){
441
			$(".frm").click(function(){
439
				var $date = {};	
442
				var $date = {};	
440
				$date.detailDemand=$(".detail").val();
441
				$date.deliverTime=replaceStr($.trim($(".dealTime").val()));
443
				$date.detailDemand=$(".detail").text();
444
				$date.deliverTime=replaceStr($.trim($(".dealTime").text()));
442
				$date.dealPrice = $("#dealPrice").val();
445
				$date.dealPrice = $("#dealPrice").val();
443
				$date.payMethod = $("#payMethod").val();
446
				$date.payMethod = $("#payMethod").val();
444
				$date.replyNotes = $("#consultContent").val();
447
				$date.replyNotes = $("#consultContent").val();
452
					"contentType" :"application/json",
455
					"contentType" :"application/json",
453
					"success" : function(data) {
456
					"success" : function(data) {
454
						if (data.success) {					
457
						if (data.success) {					
455
							location.reload(true);
458
							$(".blackcover").remove();
459
							$("body").css("overflow-y","auto");
460
							getDataResource();
461
							$.MsgBox.Alert('message',"报价成功");
456
						} else {
462
						} else {
457
							$.MsgBox.Alert('message',data.msg);
463
							$.MsgBox.Alert('message',data.msg);
458
						}
464
						}
483
		$("select").replaceWith("<span class='sname'></span>")
489
		$("select").replaceWith("<span class='sname'></span>")
484
		$(".btnboxdown").css({"display":"none"});
490
		$(".btnboxdown").css({"display":"none"});
485
		$(".applysure").css({"display":"none"});
491
		$(".applysure").css({"display":"none"});
486
		//$(".resouinfotype2").text("");
487
		$(".addrebtn").css("display","none");
492
		$(".addrebtn").css("display","none");
488
	}
493
	}
489
	if(flag==0&&operationStatus==4){
494
	if(flag==0&&operationStatus==4){
493
		$(".detail").replaceWith("<span class='detail'></span>");
498
		$(".detail").replaceWith("<span class='detail'></span>");
494
		$("select").replaceWith("<span class='sname'></span>")
499
		$("select").replaceWith("<span class='sname'></span>")
495
		$(".btnboxdown").css({"display":"none"});
500
		$(".btnboxdown").css({"display":"none"});
496
		$(".applysure").css({"display":"none"});
497
		//$(".resouinfotype2").text("");		
498
			$(".stateinfor span").text("详情");
499
			$(".btnboxup").css({"display":"none"});
500
			$(".btnboxdown").css({"display":"block"});
501
			$(".applysure").css({"display":"block"});
502
			$(".bag").css("display","none");
503
			$(".addrebtn").css("display","none");
504
			$("#payMethod").replaceWith("<span id='payMethod'><span>");
505
			$("#dealPrice").replaceWith("<span id='dealPrice'><span>");
506
			$("#consultContent").replaceWith("<span id='consultContent'><span>");
501
		$(".applysure").css({"display":"none"});	
502
		$(".stateinfor span").text("详情");
503
		$(".btnboxup").css({"display":"none"});
504
		$(".btnboxdown").css({"display":"block"});
505
		$(".applysure").css({"display":"block"});
506
		$(".bag").css("display","none");
507
		$(".addrebtn").css("display","none");
508
		$("#payMethod").replaceWith("<span id='payMethod'><span>");
509
		$("#dealPrice").replaceWith("<span id='dealPrice'><span>");
510
		$("#consultContent").replaceWith("<span id='consultContent'><span>");
507
			}	
511
			}	
508
if(flag==0&&operationStatus==6){
512
if(flag==0&&operationStatus==6){
509
		
513
		
631
							case 6:
635
							case 6:
632
								var string='<span>本人中止合作</span><br/>'
636
								var string='<span>本人中止合作</span><br/>'
633
								string+='<a class="opbtn">'
637
								string+='<a class="opbtn">'
634
								string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>查看详情</span><br />'
638
								string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>查看详情</span><br />'
635
								//string+='<span class=" discuss"dataStatus="0"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>评价</span><br />'
639
								//string+='<span class=" discuss"dataStatus="0"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>评价</span><br />'
636
								string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>'
640
								string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>'
637
								string+='</a>'
641
								string+='</a>'
640
							case 7:
644
							case 7:
641
								var string='<span>合作进行中</span><br/>'
645
								var string='<span>合作进行中</span><br/>'
642
								string+='<a class="opbtn">'
646
								string+='<a class="opbtn">'
643
								string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>查看详情</span><br />'
647
								string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>查看详情</span><br />'
644
								string+='<span class="acknowledgement"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>确认完成</span><br />'
648
								string+='<span class="acknowledgement"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>确认完成</span><br />'
645
								string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>'
649
								string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>'
646
								string+='</a>'
650
								string+='</a>'
649
							case 8:
653
							case 8:
650
								var string='<span>完成</span><br/>'
654
								var string='<span>完成</span><br/>'
651
								string+='<a class="opbtn">'
655
								string+='<a class="opbtn">'
652
								string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>查看详情</span><br />'
656
								string+='<span class="detailm"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+' dealPrice='+data.data.data[i].dealPrice+'>查看详情</span><br />'
653
								//string+='<span class="discuss"dataStatus="0"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>评价</span><br />'
657
								//string+='<span class="discuss"dataStatus="0"resourceId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>评价</span><br />'
654
								string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>'
658
								string+='<span class="complain"resourId='+data.data.data[i].resource.resourceId+' operationStatus='+data.data.data[i].operationStatus+' operationId='+data.data.data[i].operationId+'>投诉</span>'
655
								string+='</a>'
659
								string+='</a>'
658
							default:							  
662
							default:							  
659
							}	
663
							}	
660
					}
664
					}
661
				if(isbind == true)
662
								{
663
									$(".tcdPageCode1").createPage({
664
								        pageCount:Math.ceil(data.data.total/pageSize),
665
								        current:data.data.pageNo,
666
								        backFn:function(p){								        	
667
								        	getPageData(pageSize,p,false);
668
								        },								      
669
								    });
670
								 }
665
				if(data.data.total == 0){	
666
					
667
				}else{
668
					if(isbind == true)
669
					{
670
						$(".tcdPageCode1").createPage({
671
					        pageCount:Math.ceil(data.data.total/pageSize),
672
					        current:data.data.pageNo,
673
					        backFn:function(p){								        	
674
					        	getPageData(pageSize,p,false);
675
					        },								      
676
					    });
677
					 }
678
				}
679
				
671
			}
680
			}
672
			else
681
			else
673
			{
682
			{
679
}
688
}
680
getPageData(6,1,true);
689
getPageData(6,1,true);
681
//确认完成
690
//确认完成
682
$(".workmysrc").on("click",".acknowledgement",function(){
683
	//finish();
684
	//$.MsgBox.Alert('消息',"确认合作完成!");
685
	 var op=$(this).attr("operationId");
686
	 $.MsgBox.Confirm("消息", "确认合作完成!",finished);
687
	 
688
	 function finished(){
689
		 upStatus(op,8);
690
	 }
691
	 
692
	 
691
$("#workmysrc2").on("click",".acknowledgement",function(){	
692
	  opo=$(this).attr("operationId");
693
	  n=8;
694
	 $.MsgBox.Confirm("消息", "确认合作完成?",upStatus);	 	 	 	 
693
})
695
})
694
//退款
696
//退款
695
$(".workmysrc").on("click",".drawback",function(){
697
$(".workmysrc").on("click",".drawback",function(){
697
	 $(".resoubox").css("display","none");
699
	 $(".resoubox").css("display","none");
698
	 $(".liuyaninfo").css("display","none");
700
	 $(".liuyaninfo").css("display","none");
699
	 $(".pingjiainfo").css("display","none");
701
	 $(".pingjiainfo").css("display","none");
700
	 var op=$(this).attr("operationId");	
702
	 var op=$(this).attr("operationId");
703
	 opo=op;
701
	 var $price=$(this).attr("dealPrice");
704
	 var $price=$(this).attr("dealPrice");
702
	 $("#totalPrice").text($price);
703
	 //console.log($price);
704
	 discussGetPaidMoney(op,$price);
705
	
706
	 
705
	 $("#totalPrice").text($price);	
706
	 discussGetPaidMoney(opo,$price);
707
		 $(".panbtn").click(function(){	
707
		 $(".panbtn").click(function(){	
708
			 var c=$("#realCharge").text();
709
				var d= $("#payMoney").val();
710
			if(d<c){
711
			 $.ajax({"url" : "/ajax/payhistory",
712
					"type" : "POST",
713
					"success" : function(rdata) 
714
					{
715
						if (rdata.success) 
716
						{
717
								location.reload(true);
718
						}
719
						else 
720
						{
721
							alert("jjj");
722
						}
723
					},
724
					"data" :{"operationId":op,"returnMoney":$("#payMoney").val(),
725
							"remark":$("#payRemark").val(),"payStatus":$("#payStatus").val(),"professorId":userid,
726
							"isonline":$("#isOnline").find("option:selected").val()},			
727
					"contentType" :"application/x-www-form-urlencoded",
728
					dataType : "json"
729
				});
730
			 }
708
			 var payed=$("#realCharge").text();//已经收到的付款
709
			 var paying= $("#payMoney").val();//此次正在付飞入金额
710
			 //alert(payed+","+paying);
711
			 
712
			if(paying <= payed)
713
				{
714
					$.MsgBox.Confirm("消息", "确定退款吗?",getPay1)
715
				 }
716
			if(paying > payed){
717
					 $.MsgBox.Alert('消息',"您所退的款项有误,请核对您已经收到的款项");
718
				}
731
			 });
719
			 });
732
	
720
	
733
});
721
});
734
//付款
722
//付款
723
function getPay(){
724
	$.ajax({"url" : "/ajax/payhistory",
725
		"type" : "POST",
726
		"success" : function(rdata) 
727
		{
728
			if (rdata.success) 
729
			{
730
			$(".blackcover").remove();
731
			$("body").css("overflow-y","auto");			
732
				getPageData(6,1,false);																	
733
			}
734
			else 
735
			{
736
				$.MsgBox.Alert('消息',"付款失败!");							
737
			}
738
		},
739
		"data" :{"operationId":opo,"paidMoney":$("#payMoney").val(),
740
				"remark":$("#payRemark").val(),"payStatus":$("#payStatus").val(),"professorId":userid,
741
				"isonline":$("#isOnline").find("option:selected").val()},			
742
		"contentType" :"application/x-www-form-urlencoded",
743
		"beforeSend":function(){},
744
		dataType : "json"
745
	});
746
}
747
//退款
748
function getPay1(){
749
	$.ajax({"url" : "/ajax/payhistory",
750
		"type" : "POST",
751
		"success" : function(rdata) 
752
		{
753
			if (rdata.success) 
754
			{
755
			$(".blackcover").remove();
756
			$("body").css("overflow-y","auto");
757
				getDataResource();						
758
			}
759
			else 
760
			{
761
				$.MsgBox.Alert('消息',"付款失败!");							
762
			}
763
		},
764
		"data" :{"operationId":opo,"returnMoney":$("#payMoney").val(),
765
				"remark":$("#payRemark").val(),"payStatus":$("#payStatus").val(),"professorId":userid,
766
				"isonline":$("#isOnline").find("option:selected").val()},			
767
		"contentType" :"application/x-www-form-urlencoded",
768
		"beforeSend":function(){},
769
		dataType : "json"
770
	});
771
}
735
$(".workmysrc").on("click",".payMonety",function(){
772
$(".workmysrc").on("click",".payMonety",function(){
736
	 DetailInfo();
773
	 DetailInfo();
737
	 $(".resoubox").css("display","none");
774
	 $(".resoubox").css("display","none");
738
	 $(".liuyaninfo").css("display","none");
775
	 $(".liuyaninfo").css("display","none");
739
	 $(".pingjiainfo").css("display","none");
776
	 $(".pingjiainfo").css("display","none");
740
	 var op=$(this).attr("operationId");
777
	  opo=$(this).attr("operationId");
741
	 var $price=$(this).attr("dealPrice");
778
	 var $price=$(this).attr("dealPrice");
742
	 $("#totalPrice").text($price);	
779
	 $("#totalPrice").text($price);	
743
	 discussGetPaidMoney(op,$price);
744

745
		 $("#panaddbtn").click(function(){	
746
			
780
	 discussGetPaidMoney(opo,$price);
781
		 $("#panaddbtn").click(function(){				
747
			 var aa= $("#payMoney").val();	
782
			 var aa= $("#payMoney").val();	
748
			var bb=$("#balance").text();			
783
			var bb=$("#balance").text();			
749
			 if(aa<bb){
750
			 $.ajax({"url" : "/ajax/payhistory",
751
					"type" : "POST",
752
					"success" : function(rdata) 
753
				isonline":$("#isOnline").find("option:selected").val()},			{
754
						if (rdata.success) 
755
						{  
756
							//alert($("#isOnline").find("option:selected").val());
757
							
758
						 $.MsgBox.Alert('消息',"此次付款成功!");
759
								//location.reload(true);
760
						}
761
						else 
762
						{
763
							$.MsgBox.Alert('消息',"付款失败!");
764
							//alert("jjj");
765
						}
766
					},
767
					"data" :{"operationId":op,"paidMoney":$("#payMoney").val(),
768
							"remark":$("#payRemark").val(),"payStatus":$("#payStatus").val(),"professorId":userid,
769
							"isonline":$("#isOnline").find("option:selected").val()},			
770
					"contentType" :"application/x-www-form-urlencoded",
771
					dataType : "json"
772
				});
784
			 if(aa<bb){	
785
				 
786
					$.MsgBox.Confirm("消息", "确定支付吗?",getPay);
787
					 $.MsgBox.Alert('消息',"此次付款成功!");	
788
					
773
			 }
789
			 }
774
			 if(aa>bb){
790
			 if(aa>bb){
775
				 $.MsgBox.Alert('消息',"所付款项已经超出预计款项!");
791
				 $.MsgBox.Alert('消息',"所付款项已经超出预计款项!");
776
			 }
792
			 }
777
			 if(aa==bb){
793
			 if(aa==bb){
778
				 //console.log("jjjj");				
779
					 $.ajax({"url" : "/ajax/payhistory",
780
							"type" : "POST",
781
							"async":"false",
782
							"success" : function(rdata) 
783
							{
784
								if (rdata.success) 
785
								{
786
									// location.reload(true);
787
									 $.MsgBox.Alert('消息',"款项已经全部付清!");
788
									
789
								}
790
								else 
791
								{
792
									alert("jjj");
793
								}
794
							},
795
							"data" :{"operationId":op,"paidMoney":$("#payMoney").val(),
796
									"remark":$("#payRemark").val(),"payStatus":$("#payStatus").val(),"professorId":userid,
797
									"isonline":$("#isOnline").find("option:selected").val()},			
798
							"contentType" :"application/x-www-form-urlencoded",
799
							dataType : "json"
800
						});
801
					 upStatus(op,7);														
794
				
795
				 $.MsgBox.Confirm("消息", "确定支付吗?",getPay);	
796
					n=7;
797
					 upStatus();
798
					 $.MsgBox.Alert('消息',"款项已经全部付清!");
802
			 }
799
			 }
803
			 });
800
			 });
804
	
801
	
901
}
898
}
902
//中止合作
899
//中止合作
903
$(".workmysrc").on("click",".stopcoo",function(){
900
$(".workmysrc").on("click",".stopcoo",function(){
904
	 var op=$(this).attr("operationId");
905
	 upStatus(op,6);
901
	opo=$(this).attr("operationId");
902
	n=6;
903
	$.MsgBox.Confirm("消息", "你确定要中止吗?",upStatus); 
906
});
904
});
907
//评论
905
//评论
908
var start;
906
var start;
1105
});
1103
});
1106
}
1104
}
1107
//我的需求中修改申请,对方已经回复(合作),我拒绝合作或者约对方合作
1105
//我的需求中修改申请,对方已经回复(合作),我拒绝合作或者约对方合作
1106
function getIdentity(professorId){		
1107
	$.ajax({	
1108
	"url":"ajax/professor/"+professorId,
1109
	"type":"get",
1110
	"async": false,
1111
	"success":function(data){
1112
		if(data.success)
1113
		{																				
1114
			$("option")[0].value=data.data.name;
1115
			$("option")[1].value=data.data.organization.name;			
1116
		}
1117
		else
1118
		{
1119
			$.MsgBox.Alert("消息","系统异常!");
1120
		}
1121
	},
1122
	"error":function(){$.MsgBox.Alert('message','failddd')}
1123
	})	
1124
}
1108
$(".workmysrc").on("click",".detailm",function(){
1125
$(".workmysrc").on("click",".detailm",function(){
1109
//	$(".blackcover").show();
1110
//	$(".resouapply").show();
1111
	
1112
	//DetailInfo()
1113
	var resourceId=$(this).attr("resourId");
1126
	var resourceId=$(this).attr("resourId");
1114
	var operationStatus=$(this).attr("operationStatus");
1127
	var operationStatus=$(this).attr("operationStatus");
1115
	var operationId=$(this).attr("operationId");
1128
	var operationId=$(this).attr("operationId");
1116
	var priceDifference=$(this).attr("dealPrice");
1129
	var priceDifference=$(this).attr("dealPrice");
1117
	
1130
	
1118
	flag=1;
1131
	flag=1;
1132
	opo=operationId;
1119
	if(flag==1&&operationStatus==1)
1133
	if(flag==1&&operationStatus==1)
1120
	{ 
1134
	{ 
1121
		ResourceApply();
1135
		ResourceApply();
1126
		$(".btnboxup").css({"display":"none"});
1140
		$(".btnboxup").css({"display":"none"});
1127
		$(".applysure").css({"display":"none"});
1141
		$(".applysure").css({"display":"none"});
1128
		ajaxGet(operationId,1,1);
1142
		ajaxGet(operationId,1,1);
1143
		getIdentity(userid);
1129
		//if($(".dealTime").val()!=""&&$(".detail").val()!="")
1144
		//if($(".dealTime").val()!=""&&$(".detail").val()!="")
1130
		//{
1145
		//{
1131
			$("#deliver").on("click",function()
1146
			$("#deliver").on("click",function()
1134
						$data.demandId = userid;
1149
						$data.demandId = userid;
1135
						$data.resourceId = resourceId;
1150
						$data.resourceId = resourceId;
1136
						$data.operationId=operationId;
1151
						$data.operationId=operationId;
1137
						$data.detailDemand=$(".detail").val();
1138
						//$data.dealTime=$(".dealTime").val();
1152
						$data.detailDemand=$(".detail").val();						
1139
						$data.deliverTime=replaceStr($.trim($("#datepicker").val()));
1153
						$data.deliverTime=replaceStr($.trim($("#datepicker").val()));
1140
						$data.operationStatus=1;
1141
						
1154
						$data.applysquare=$("select option:selected").val();
1155
						$data.operationStatus=1;						
1142
						$.ajax({
1156
						$.ajax({
1143
							"url" : "/ajax/operation",
1157
							"url" : "/ajax/operation",
1144
							"type" : "put",
1158
							"type" : "put",
1145
							"success" : function(rdata) {
1159
							"success" : function(rdata) {
1146
								if (rdata.success) {
1147
									$.MsgBox.Alert('消息',"资源申请信息修改成功");
1148
									//location.reload(true);
1160
								if (rdata.success){
1161
									getPageData(6,1,false);
1162
									$(".blackcover").remove();
1163
									$("body").css("overflow-y","auto");
1164
									$.MsgBox.Alert('消息',"资源申请信息修改成功");									
1149
								} else {
1165
								} else {
1150
									$.MsgBox.Alert('消息',"资源申请信息修改失败");
1166
									$.MsgBox.Alert('消息',"资源申请信息修改失败");
1151
								}
1167
								}
1152
							},
1168
							},
1153
							"data" : JSON.stringify($data) ,
1169
							"data" : JSON.stringify($data) ,
1154
							"contentType" :"application/json",
1155
							"beforeSend":function(){console.log(this.data)},
1170
							"contentType" :"application/json",							
1156
							dataType : "json"
1171
							dataType : "json"
1157
						});
1172
						});
1158
				});
1173
				});
1160
		
1175
		
1161
	}
1176
	}
1162
	if(flag==1&&operationStatus==2)
1177
	if(flag==1&&operationStatus==2)
1163
	{
1164
		//ResourceApply();
1165
		//$(".btnboxup").css({"display":"none"});
1166
		//$(".btnboxdown1").css({"display":"none"});
1178
	{		
1167
		ResourceApply();
1179
		ResourceApply();
1168
		ajaxGet1(operationId);
1180
		ajaxGet1(operationId);
1169
		$(".dealTime").replaceWith("<span class='dealTime'></span>");
1181
		$(".dealTime").replaceWith("<span class='dealTime'></span>");
1170
		$(".detail").replaceWith("<span class='detail'></span>");
1182
		$(".detail").replaceWith("<span class='detail'></span>");
1171
		$("select").replaceWith("<span class='sname'></span>")
1183
		$("select").replaceWith("<span class='sname'></span>")
1172
		$(".btnboxdown").css({"display":"none"});
1184
		$(".btnboxdown").css({"display":"none"});
1173
		$(".applysure").css({"display":"none"});
1174
		//$(".resouinfotype2").text("");		
1175
			$(".stateinfor span").text("详情");
1176
			$(".btnboxup").css({"display":"none"});
1177
			$(".btnboxdown").css({"display":"block"});
1178
			$(".applysure").css({"display":"block"});
1179
			$(".bag").css("display","none");
1180
			//$(".addrebtn").css("display","none");
1181
			$("#payMethod").replaceWith("<span id='payMethod'><span>");
1182
			$("#dealPrice").replaceWith("<span id='dealPrice'><span>");
1183
			$("#consultContent").replaceWith("<span id='consultContent'><span>");
1185
		$(".applysure").css({"display":"none"});			
1186
		$(".stateinfor span").text("回复报价中");
1187
		$(".btnboxup").css({"display":"none"});
1188
		$(".btnboxdown").css({"display":"block"});
1189
		$(".applysure").css({"display":"block"});
1190
		$(".bag").css("display","none");	
1191
		$(".sendpri").text("");
1192
		$("#payMethod").replaceWith("<span id='payMethod'><span>");
1193
		$("#dealPrice").replaceWith("<span id='dealPrice'><span>");
1194
		$("#consultContent").replaceWith("<span id='consultContent'><span>");
1184
		$(".frm")[0].value="直接拒绝";
1195
		$(".frm")[0].value="直接拒绝";
1185
		$("#cooperation")[0].value="合作";
1186
		//ajaxGet(operationId);
1196
		$("#cooperation")[0].value="合作";		
1187
		$(".frm").click(function(){
1197
		$(".frm").click(function(){
1188
			$.ajax({"url" : "../ajax/operation/operationStatus",
1189
				"type" : "POST",
1190
				"success" : function(rdata) 
1191
				{
1192
					if (rdata.success) 
1193
					{
1194
							location.reload(true);
1195
					}
1196
					else 
1197
					{
1198
						alert("jjj");
1199
					}
1200
				},
1201
				"data" :{"operationId":operationId,"operationStatus":4},
1202
				"contentType" :"application/x-www-form-urlencoded",
1203
				dataType : "json"
1204
			});
1198
			n=4;
1199
			$(".blackcover").remove();
1200
			$("body").css("overflow-y","auto");
1201
			$.MsgBox.Confirm("消息", "确定继续吗?",upStatus);
1205
		})
1202
		})
1206
		$("#cooperation").click(function(){
1203
		$("#cooperation").click(function(){
1207
			upStatus(operationId,3);
1204
			 n=3;
1205
			 $(".blackcover").remove();
1206
			$("body").css("overflow-y","auto");
1207
			upStatus();
1208
		})
1208
		})
1209
	}
1209
	}
1210
	if(flag==1&&operationStatus==3){
1210
	if(flag==1&&operationStatus==3){
1218
		discussGetPaidMoney(operationId,priceDifference);
1218
		discussGetPaidMoney(operationId,priceDifference);
1219
	}
1219
	}
1220
	if(flag==1&&operationStatus==4){
1220
	if(flag==1&&operationStatus==4){
1221
		ResourceApply();
1222
		ajaxGet(operationId);
1223
		$(".stateinfor").find("span").text("合作结束");
1224
		$(".dealTime").replaceWith("<span class='dealTime'></span>");
1225
		$(".detail").replaceWith("<span class='detail'></span>");
1226
		$("select").replaceWith("<span class='sname'></span>")
1227
		$(".btnboxdown").css({"display":"none"});
1228
		$(".applysure").css({"display":"none"});
1229
		//$(".resouinfotype2").text("");
1230
		$(".addrebtn").css("display","none");
1231
	}
1232
	if(flag==1&&operationStatus==5){
1233
		ResourceApply();
1221
		ResourceApply();
1234
		ajaxGet1(operationId);
1222
		ajaxGet1(operationId);
1235
		$(".dealTime").replaceWith("<span class='dealTime'></span>");
1223
		$(".dealTime").replaceWith("<span class='dealTime'></span>");
1237
		$("select").replaceWith("<span class='sname'></span>")
1225
		$("select").replaceWith("<span class='sname'></span>")
1238
		$(".btnboxdown").css({"display":"none"});
1226
		$(".btnboxdown").css({"display":"none"});
1239
		$(".applysure").css({"display":"none"});
1227
		$(".applysure").css({"display":"none"});
1240
		//$(".resouinfotype2").text("");		
1228
		$(".sendpri").text("");		
1241
			$(".stateinfor span").text("详情");
1229
			$(".stateinfor span").text("详情");
1230
			$(".resde").text("详情页面");
1242
			$(".btnboxup").css({"display":"none"});
1231
			$(".btnboxup").css({"display":"none"});
1243
			$(".btnboxdown").css({"display":"block"});
1232
			$(".btnboxdown").css({"display":"block"});
1244
			$(".applysure").css({"display":"block"});
1233
			$(".applysure").css({"display":"block"});
1246
			$(".addrebtn").css("display","none");
1235
			$(".addrebtn").css("display","none");
1247
			$("#payMethod").replaceWith("<span id='payMethod'><span>");
1236
			$("#payMethod").replaceWith("<span id='payMethod'><span>");
1248
			$("#dealPrice").replaceWith("<span id='dealPrice'><span>");
1237
			$("#dealPrice").replaceWith("<span id='dealPrice'><span>");
1249
			$("#consultContent").replaceWith("<span id='consultContent'><span>");
1238
			$("#consultContent").replaceWith("<span id='consultContent'><span>");		
1239
	}
1240
	if(flag==1&&operationStatus==5){
1241
		ResourceApply();
1242
		ajaxGet(operationId);
1243
		$(".stateinfor").find("span").text("合作结束");
1244
		$(".dealTime").replaceWith("<span class='dealTime'></span>");
1245
		$(".detail").replaceWith("<span class='detail'></span>");
1246
		$("select").replaceWith("<span class='sname'></span>")
1247
		$(".btnboxdown").css({"display":"none"});
1248
		$(".applysure").css({"display":"none"});
1249
		//$(".resouinfotype2").text("");
1250
		$(".addrebtn").css("display","none");
1250
	}
1251
	}
1251
	if(flag==1&&operationStatus==6){
1252
	if(flag==1&&operationStatus==6){
1252
		DetailInfo();	
1253
		DetailInfo();	
1300
	});
1301
	});
1301
}
1302
}
1302
//更新状态
1303
//更新状态
1303
function upStatus(operationId,n){
1304
function upStatus(){
1304
	$.ajax({"url" : "/ajax/operation/operationStatus",
1305
	$.ajax({"url" : "/ajax/operation/operationStatus",
1305
		"type" : "POST",
1306
		"type" : "POST",
1306
		"success" : function(rdata) 
1307
		"success" : function(rdata) 
1307
		{
1308
		{
1308
			if (rdata.success) 
1309
			if (rdata.success) 
1310
			{		
1311
			getPageData(6,1,false);
1312
			}					
1313
			else 
1309
			{
1314
			{
1310
				
1311
				//location.reload(true);
1315
				$.MsgBox.Alert('message','状态更新失败');
1316
			}
1317
		},
1318
		"data" :{"operationId":opo,"operationStatus":n},
1319
		"beforeSend":function(){/*console.log(this.data)*/},
1320
		"contentType" :"application/x-www-form-urlencoded",
1321
		dataType : "json"
1322
	});
1323
}
1324
function upStatus1(){
1325
	$.ajax({"url" : "/ajax/operation/operationStatus",
1326
		"type" : "POST",
1327
		"success" : function(rdata) 
1328
		{
1329
			if (rdata.success) 
1330
			{	
1331
				getDataResource();			
1312
			}
1332
			}
1313
			else 
1333
			else 
1314
			{
1334
			{
1315
				$.MsgBox.Alert('message','状态更新失败');
1335
				$.MsgBox.Alert('message','状态更新失败');
1316
			}
1336
			}
1317
		},
1337
		},
1318
		"data" :{"operationId":operationId,"operationStatus":n},
1338
		"data" :{"operationId":opo,"operationStatus":n},
1319
		"beforeSend":function(){/*console.log(this.data)*/},
1339
		"beforeSend":function(){/*console.log(this.data)*/},
1320
		"contentType" :"application/x-www-form-urlencoded",
1340
		"contentType" :"application/x-www-form-urlencoded",
1321
		dataType : "json"
1341
		dataType : "json"

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

1
$(function(){
1
$(function(){
2
	loginStatus();
2
	
3
		var userid = $.cookie("userid");
3
		var userid = $.cookie("userid");
4
		var c=0;
4
		var c=0;
5
		var  subject;
5
		var  subject;
6
		var key;
6
		var key;
7
		var industry;
7
		var industry;
8
		var pageSize;
8
		var pageSize;
9
	 	if(userid){
10
			$(".head-portrait").show();
11
			$(".unlogin").hide();
12
	 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
13
			$(".portrait-p").load(function(){									
14
			})
15
			.error(function(){
16
				$(".portrait-p").attr("src","/images/default-photo.jpg");
17
			});
18
		}
9
	 	
19
		$("#searchContent").val(GetQueryString("searchContent")); 
10
		$("#searchContent").val(GetQueryString("searchContent")); 
20
		$("#hsearchContent").val(GetQueryString("searchContent")); 
11
		$("#hsearchContent").val(GetQueryString("searchContent")); 
21
		
12
		

+ 3 - 9
src/main/webapp/js/workspace.js

125
 	
125
 	
126
 	
126
 	
127
$(function(){
127
$(function(){
128

128
	loginStatus();//读取用户头像
129
	var userid = $.cookie("userid");
129
	var userid = $.cookie("userid");
130
	var name = $.cookie("userName");
130
	var name = $.cookie("userName");
131

131
	var flag;
132
	var flag;
132
 	if(userid){
133
 	if(userid){
133
 		$(".myWorkspace").attr("href","workspaces.html?"+userid);
134
 		$(".myWorkspace").attr("href","workspaces.html?"+userid);
134
		$(".head-portrait").show();
135
		$(".unlogin").hide();
136
 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
137
		$(".portrait-p").load(function(){									
138
		})
139
		.error(function(){
140
			$(".portrait-p").attr("src","/images/default-photo.jpg");
141
		});
135
		
142
 	}
136
 	}
143
 	//快速回复
137
 	//快速回复
144
 	//$(".writeback").click(function(){
138
 	//$(".writeback").click(function(){

+ 1 - 1
src/main/webapp/sciresource.html

12
        <!--我的资源 //-->
12
        <!--我的资源 //-->
13
        
13
        
14
        <!--// 我的需求-->
14
        <!--// 我的需求-->
15
        <div class="workmysrc workmysrc1">
15
        <div class="workmysrc workmysrc1" id="workmysrc2">
16
            <div class="workmysrctit"></div>
16
            <div class="workmysrctit"></div>
17
            <table width="100%" height="60" class="worktab worktabb">
17
            <table width="100%" height="60" class="worktab worktabb">
18

18