function skip2OtherPageByClaimNo(url,claimNo){
	var params = new Array();
	params["claimNo"] = claimNo;
	SkipByPost(url, params);
}

function setSortValue(sortValue){
    $("#workbenchForm").attr("action","queryWorkbench.do");
	$("#sortValue").val(sortValue);
	$("#workbenchForm").submit();
}

$(function() {
	// 任务池经过显示信息
	$(".sliding_b_r").each(function(i, it) {
		$(".renwu" + i).hover(function(e) {
			var left = $(this).offset().left;
			var top = $(this).offset().top + $(this).height();
			$("#sliOpen" + i).css({
				"display" : "block",
				"left" : left+130,
				"top" : top-60
			});
			e.stopPropagation();
		}, function() {
			$("#sliOpen" + i).hide();
		});
	});
	$(".p").click(function() {
		$(this).find("span").each(function() {
			if($(this).is(".sliding_icon7")){
			}else if($(this).is(".sliding_icon8")){
			}else if ($(this).is(".sliding_b_cur")){
					$(this).removeClass("sliding_b_cur");
				}else{
					$(this).addClass("sliding_b_cur");
			}
		});

	});

	$("#cusSearch").click(function(){
		var keyWord = $("#keyWord").val();
		if (keyWord != '' && keyWord.length == 15) {
		 $("#workbenchForm").attr("action","cusQueryWorkbench.do");
		 $("#workbenchForm").submit();
		} else {
			alert("赔案号格式错误！");
			return;
		}
	});	
});

function queryClaimTrack(inUrl,claimNo){
	$("#historyTrack").find("p").remove();
	$.ajax({
		type:"POST",
		url:inUrl,
		data:{"claimNo":claimNo},
		error :function(){
			alert("查询赔案操作轨迹失败，请稍后再试！");
			return ;
		},
		success :function(data){
			$("#historyTrackClaim").text(claimNo+" 历史轨迹");
			if(data ==""){
				alert("查询赔案操作轨迹失败，请稍后再试！");
				return ;
			}
			for ( var i= 0; i < data.length; i++) {
				var t=data[i];
				var p=$("<p class=\"sild_open_his\"><span class=\"sild_open_his_icon\" style=\"width:20%;white-space:nowrap;\">" +t.operateType+"</span><span style=\"width:30%;white-space:nowrap;\">"+t.operateDate+
						"	</span><span style=\"width:30%;white-space:nowrap;\">"+t.operator+"</span></p>");
				$("#historyTrack").append(p);
			}
			showDiv('open1');
		}
	});
}


//时间显示工具
function jsonDateFormat(date,length){
    var datetime = new Date();
    datetime.setTime(date);
    var year = datetime.getFullYear();
    var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
    var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
    var hour = datetime.getHours()< 10 ? "0" + datetime.getHours() : datetime.getHours();
    var minute = datetime.getMinutes()< 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
    var second = datetime.getSeconds()< 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
    if(length==10){
    	return year + "-" + month + "-" + date;
    }else{
    	return year + "-" + month + "-" + date+" "+hour+":"+minute+":"+second;
    }
}

