<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../Public/css/common.css" type="text/css" />
<script type="text/javascript" src="../Public/js/lhgcalendar/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../Public/js/menu.js"></script>
<script type="text/javascript" src="http://pscript1.4008000000.com/app_js/paui/1.0.1/build/pa.ui.min.js"></script>
<script type="text/javascript">
$(function(){
$("#exp_batch").click(function()
{
var type_id = $("#type_id").val();
$.post("{:U('order_exp_post')}",{type_id:type_id},function(data,status)
{
if(status=='success')
{
if(data.status==1)
{
alert('批量导出成功!');
window.location.reload();
}
else
{
alert(data.info);
}
}
else
{
alert('批量导出失败!');
}
},'json');
});
});
</script>
<title>订单批量导出</title>
</head>
<body>
<div class="wrapper">
<div class="wide">
<div class="lw">
<include file="Menu:menu-kb" />
</div>
<!--lw end -->
<div class="rw">
<div class="con">
<div class="bodytitle">
<div class="bodytitleleft"></div>
<div class="bodytitletxt">订单批量导出</div>
</div>
<div class="tab_bk1">
<div class="p5 vrh">
<div class="fr">上次导出操作时间:<font color="red"><strong>{$last_time}</strong></font></div>
<div class="fl">
<select name="type_id" id="type_id" class="p-select">
<option value="">请选择空包类型</option>
<foreach name="type_list" item="type">
<option value="{$type['id']}" <if condition="I('type_id')==$type['id']">selected</if> >{$type['name']} 未导出({$type['count']})</option>
</foreach>
</select>
<input type="button" id="exp_batch" value="批量导出" class="p-btn m-btn">
</div>
</div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_list">
<thead>
<tr>
<th width="5%"><div align="center">选择</div></th>
<th width="10%"><div align="center">导出时间</div></th>
<th width="10%"><div align="center">空包类型</div></th>
<th width="25%"><div align="center">导出文件名</div></th>
<th width="10%"><div align="center">订单条数</div></th>
<th width="10%"><div align="center">单价</div></th>
<th width="10%"><div align="center">金额</div></th>
<th width="10%"><div align="center">上次导出时间</div></th>
<th width="10%"><div align="center">操作</div></th>
</tr>
</thead>
<tbody>
<foreach name="log_list" item='log'>
<tr class="exp-tr">
<td><div align="center"><input type="checkbox" name="exp-checkbox" class="exp-checkbox"></div></td>
<td><div align="center">{$log['exp_time']}</div></td>
<td><div align="center">{$log['type_name']}</div></td>
<td><div align="left">{$log['exp_filename']}</div></td>
<td><div align="center">{$log['exp_counts']} </div> </td>
<td><div align="center">1.2</div> </td>
<td><div align="center" class="premium">51.8</div> </td>
<td><div align="center">{$log['last_time']}</div></td>
<td><div align="center"><a href="{:U('downfile',array('id'=>$log['id']))}">下载文件</a></div></td>
</tr>
</foreach>
</tbody>
<tfoot>
<tr>
<td colspan="9"><div class="ptb10 tc pagenavi">{$show}</div></td>
</tr>
<tr>
<td colspan="9">
<div class="ptb10 tc">
共计金额:<span id="actualPremium">0.00</span>
</div>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<!--con end -->
</div>
<!--rw end -->
</div>
<!--wide end -->
</div>
<!--wrapper end -->
<script type="text/javascript">
actualPremium = 0;
$(".exp-checkbox").on("click", function(){
$menoy = Number($(this).parents(".exp-tr").find(".premium").text());
if($(this).is(":checked")){
actualPremium = actualPremium + $menoy;
}else{
actualPremium = actualPremium - $menoy;
}
$("#actualPremium").html((actualPremium).toFixed(2));
});
</script>
</body>
</html>
转载于:https://blog.51cto.com/iicoo/1983829