/**
 * @author qianpeng
 */

function saveCancelInfo(preNo){
	$.ajax({
		type:"POST",
		url : "savePreTaskCancelOrHangup.do",
		data : {"cause":$('#context').val(),"preNo":preNo,"type":"cancel"},
		error : function(request) {
			alert("保存失败！");
		},
		success : function(data) {
			if(data=="true")
				alert('保存成功！');
			else
				alert(data);
		}
	});
}
function video(preNo){
	var appName = $("#appName").val();
	var appId = $("#appId").val();
	var appPhone = $("#appPhone").val();
	var appIdType=$("#appIdType").val();
	var personId=$("#personId").val();
	if (!$("#context").val()) {
		alert("撤件理由不能为空");
		return;
	}
	if(!confirm("是否确认撤件？"))
		return;
	
	$.ajax({
		type : "POST",
		url : "applyPreTaskCancelOrHangup.do",
		data : {"cause":$('#context').val(),"preNo":preNo,"type":"cancel"},
		async : true,
		error : function(request) {
			alert("处理失败！");
		},
		success : function(data) {
			if(data=="true"){
				alert('该预授权案件已成功撤件！');
				sendApp2Pre(preNo,appName,appId,appPhone,"2",personId);//flag==2代表撤件短信
				window.location.href="examinePoolsQuery.do";
			}else
				alert(data);
		}
	});
	
}