微回执(4)当处理完一张单后,如何继续处理其余单

微回执3里已经展现了主流程,当用户处理完一张单后,会继续问其余的单服务器

// 是否还有其余回执
function noAndOther(){
   receiptPolicyNum = receiptPolicyNum - 1 ;    //剩余数量
   if(receiptPolicyNum>0){ //还有要处理的
        var tempReceiptPolicy = null;
        tempReceiptPolicy = getNextReceiptPolicy();   //将要处理的下一张微回执拿出来
        tipsWindown("提示信息","text3:<center>您名下还有保单待签收回执,是否须要同时进行签收</center>");
        //text3是一个控件,会触发下一张微回执进行初始化
   }else{
        if(uploadNum!=0){
	        $("#windownbg").remove();
		$("#windown-box").fadeOut("slow",function(){$(this).remove();});
		$("#all_top_select").show();
		$(".td_select_center").show();
		$(".td_select_center_four").show();
		$("#changeType").show();
                toUpload();  //上传服务器
		return false;
        }else{
        	window.location.href='。。。/listIndex.jsp';
		return false;
        }
   }
}


// 是否还有其余回执IsOrNotOther
function yesAndOther(){
   //剩余的数量
   if(receiptPolicyNum > 0){ //还有要处理的
        var tempReceiptPolicy = null;
        tempReceiptPolicy = getNextReceiptPolicy();
        tipsWindown("提示信息","text4:<center>您名下还有保单待签收回执,是否须要同时进行签收</center>");
   }else{
        //提交
        toUpload();
        $("#windownbg").remove();
		$("#windown-box").fadeOut("slow",function(){$(this).remove();});
		$("#all_top_select").show();
		$(".td_select_center").show();
		$(".td_select_center_four").show();
		$("#changeType").show();
		return false;
		//提交
   }
}

//控件会调用这个函数进行初始化页面
function toNewPolicy(){
        //重复拿
	var tempReceiptPolicy2 = getNextReceiptPolicy();
	showReceiptPage(tempReceiptPolicy2);
	//close popup window
	$("#windownbg").remove();
	$("#windown-box").fadeOut("slow",function(){$(this).remove();});
	$("#all_top_select").show();
	$(".td_select_center").show();
	$(".td_select_center_four").show();
	$("#changeType").show();
	//back to top
	this.scrollTo(0,0);
}


// 遍历找出最大的生效日期单
function getNextReceiptPolicy(){
	for (var i = receiptPolicyListArray.length-1; i>=0; i--) {   // 遍历找出最大的生效日期单
		if(receiptPolicyListArray[i].isOrNotSigned==0){
			var tempReceiptPolicy=receiptPolicyListArray[i];
			return tempReceiptPolicy;
}}}
相关文章
相关标签/搜索