<form action="../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=convert_del" id="form_del" name="form_del" method="post" style="padding-bottom:20px;">
<table class="from_table2_one">
	<thead>
		<tr class="area_ajax_list_title">
			<th class="pd-left"><tpl> $langSysCADelShort </tpl></th>
			<th><tpl> $langSysCAGoodsName </tpl></th>
			<th><tpl> $langSysCAApplyMember </tpl></th>
			<th><tpl> $langSysCAApplyTime </tpl></th>
			<th><tpl> $langSysCAState </tpl></th>
			<th><tpl> $langSysCAOperate </tpl></th>
		</tr>
	</thead>
	<tpl> section name=loop loop=$apply_list </tpl>
	<tr>
		<td class="pd-left"><input name="caa_id[]" type="checkbox" value="<tpl> $apply_list[loop].caa_id </tpl>"/></td>
		<td><tpl> $apply_list[loop].cag_name </tpl></td>
		<td><tpl> $apply_list[loop].login_name </tpl></td>
		<td><tpl> $apply_list[loop].caa_time </tpl></td>
		<td><tpl> $apply_list[loop].state </tpl></td>
		<td>
			<tpl> if $apply_list[loop].caa_state eq '0' </tpl>
			<a href="javascript:;" onclick="ajax_audit('<tpl> $apply_list[loop].caa_id </tpl>');"><tpl> $langSysCAApplySet </tpl></a>
			<tpl> else </tpl>
			<a href="javascript:;" onclick="ajax_audit('<tpl> $apply_list[loop].caa_id </tpl>');"><tpl> $apply_list[loop].state </tpl></a>
			<tpl> /if </tpl>
		</td>
	</tr>
	<tpl> /section </tpl>
	
</table>
<div class="table-5-bottom">
<div class="p-left">
				<span class="btn_left"><input id="selectall" name="selectall" value="<tpl> $langSysCASelAll </tpl>" class="btn_submit" type="button"/></span>
				<span class="btn_left"><input id="delbutton" name="delbutton" value="<tpl> $langSysCADel </tpl>" class="btn_submit" type="button"/></span>
				<span class="btn_left"><input type="button" name="return_button" id="return_button" class="btn_submit" value="<tpl> $langSysCAReturnList </tpl>" /></span>
			</div>
			<div style="float:right; padding-right:20px"><tpl> $page_list </tpl></div>
</div>
</form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langSysCADelConfirm </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
</div> 
<script>
$(document).ready(function() {
	hideLoading();
	
	$('#selectall').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
	
	$('#return_button').click(
		function(){
			ShowDiv	= 'result_content';
			getPageContent("../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=ajax_list&curpage=<tpl>$curpage</tpl>");
		}
	);
	
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
			if(msg.type == '1'){
				ShowDiv = "result_content";
				getPageContent("../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=apply_list&id=<tpl> $ca_id </tpl><tpl>if $apply_list|@count neq 1</tpl>&curpage=<tpl>$curpage</tpl><tpl>/if</tpl>");
			}
		},
		type:      'get',
		dataType:  'json'
	};
	
	var question = $('#question')[0];
	$("#delbutton").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			$.unblockUI();
			$('#form_del').ajaxSubmit(options);	
			return false;
		});
	$('#no').click($.unblockUI);
});
//申请管理
function ajax_audit(id){
	ShowDiv	= 'result_content';
	getPageContent("../app/<tpl> $app_module.app_module_sign </tpl>/system.php?action=apply_audit&id="+id);
}
</script>
</html>