📄 cgreportforms.jsp
字号:
<%@ page language="java" import="java.util.*,java.text.*" pageEncoding="GB18030"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<base href="<%=basePath%>">
<title>月度报表</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link href="css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="dwr/interface/PomainDAO.js"></script>
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/util.js"></script>
<script language="javascript" src="<%=basePath %>script/common.js"></script>
<script language="javascript" type="text/javascript">
function selectMonth()
{
var month = "<%=new SimpleDateFormat("yyyy").format(new Date())%>-"+$("month").options[$("month").selectedIndex].text;
PomainDAO.selectMonth(month,selectMonthCallBack);
}
function selectMonthCallBack(data)
{
DWRUtil.removeAllRows("headTbody");
var no = 0;
for(var i = 0; i<data.length ; i++ ){
var row = $("headTbody").insertRow();
var noPay = 0;
if(data[i].payType==1&&(data[i].status==1||data[i].status==2)){
noPay = data[i].poTotal;
}else if(data[i].payType==2&&data[i].status==1){
noPay = data[i].poTotal;
}else if(data[i].payType==3&&data[i].status==1){
noPay = data[i].poTotal;
}else if(data[i].payType==3&&(data[i].status==2||data[i].status==5)){
noPay = data[i].poTotal-data[i].prePayFee;
}else{
noPay = 0;
}
no+=noPay;
row.insertCell(0).innerHTML = data[i].poid;
row.insertCell(1).innerHTML = data[i].venderCode;
row.insertCell(2).innerHTML = data[i].venderName;
row.insertCell(3).innerHTML = data[i].createTime;
row.insertCell(4).innerHTML = data[i].account;
row.insertCell(5).innerHTML = data[i].poTotal;
row.insertCell(6).innerHTML = noPay;
row.insertCell(7).innerHTML = getStatusById(data[i].status);
}
var end = 0;
var all = 0;
for(var i = 0;i<data.length;i++){
if(data[i].status==4){
end++;
}
all+=data[i].poTotal;
}
$("allAmount").value = data.length;
$("endAmount").value = end;
$("allPrice").value = all;
$("price").value = all - no;
}
function getStatusById(id){
switch (id){
case 1: return "新单据"; break;
case 2: return "已收货"; break;
case 3: return "已付款"; break;
case 4: return "已了结"; break;
case 5: return "已预付"; break;
}
}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap class="title1">您的位置:统计报表--月度采购报表</td>
</tr>
</table>
请选择月度报表的月份:<select id="month" size="1">
<option value="1" selected>01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<input type = "button" value="查询" onclick = "selectMonth()">
<table id="myTable" width="100%" border="0" align="center" cellspacing="1">
<tr>
<th class="title1">采购单编号</th>
<th class="title1">供应商编号</th>
<th class="title1">供应商名称</th>
<th class="title1">采购日期</th>
<th class="title1">经手人</th>
<th class="title1">采购单总金额</th>
<th class="title1">未付款金额</th>
<th class="title1">采购单状态</th>
</tr>
<tbody id="headTbody" align="center">
</tbody>
</table>
<div align="right">
<label>采购单总数:</label><input type = "text" id="allAmount"/>
<br>
<label>已了结单数:</label><input type = "text" id = "endAmount"/>
<br>
<label>采购单总金额:</label><input type = "text" id = "allPrice"/>
<br>
<label>已收款金额:</label><input type = "text" id = "price"/>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -