📄 index.php
字号:
<?
include_once("inc/auth.php");
?>
<script Language="JavaScript">
function chk(input)
{
for(var i=0;i<document.form1.c1.length;i++)
{
document.form1.c1[i].checked = false;
}
input.checked = true;
return true;
}
function query()
{
for(var i=0;i<document.form1.c1.length;i++)
{
if (document.form1.c1[0].checked==true)
location="detail.php?TRANS_FLAG="+document.form1.TRANS_FLAG.value+" &PRO_ID="+document.form1.PRO_ID.value+" &FROM_DATE="+document.form1.FROM_DATE.value+" &TO_DATE="+document.form1.TO_DATE.value+" &TYPE="+document.form1.c1[i].value+" &PRO_NAME="+document.form1.PRO_NAME.value+" &BORROWER="+document.form1.TO_ID.value;
if (document.form1.c1[1].checked==true)
location="Sum_Query.php?TRANS_FLAG="+document.form1.TRANS_FLAG.value+" &PRO_ID="+document.form1.PRO_ID.value+" &FROM_DATE="+document.form1.FROM_DATE.value+" &TO_DATE="+document.form1.TO_DATE.value+" &TYPE="+document.form1.c1[i].value+" &PRO_NAME="+document.form1.PRO_NAME.value+" &BORROWER="+document.form1.TO_ID.value;
}
}
function LoadWindow2()
{
URL="product_select";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:245px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function LoadWindow1()
{
URL="/module/user_select_single?MANAGE_FLAG=1";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:265px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function clear_dept1()
{
document.form1.TO_ID.value="";
document.form1.TO_NAME.value="";
}
</script>
<html>
<head>
<title>办公用品登记查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function td_calendar(fieldname)
{
myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
window.showModalDialog("/inc/calendar.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
}
function sel_change()
{
document.form1.TO_ID.value="";
document.form1.TO_NAME.value="";
if(form1.TRANS_FLAG.value=="-1")
{
if(document.all("BORROWER").style.display=="")
document.all("BORROWER").style.display="none";
}
if(form1.TRANS_FLAG.value=="0")
{
if(document.all("BORROWER").style.display=="")
document.all("BORROWER").style.display="none";
}
if(form1.TRANS_FLAG.value=="1")
{
document.all("BORROWER").style.display="";
document.all.t1.style.display='';
document.all.t2.style.display='none';
document.all.t3.style.display='none';
}
if(form1.TRANS_FLAG.value=="2")
{
document.all("BORROWER").style.display="";
document.all.t2.style.display='';
document.all.t1.style.display='none';
document.all.t3.style.display='none';
}
if(form1.TRANS_FLAG.value=="3")
{
document.all("BORROWER").style.display="";
document.all.t3.style.display='';
document.all.t1.style.display='none';
document.all.t2.style.display='none';
}
if(form1.TRANS_FLAG.value=="4")
{
if(document.all("BORROWER").style.display=="")
document.all("BORROWER").style.display="none";
document.all.t3.style.display='none';
document.all.t1.style.display='none';
document.all.t2.style.display='none';
}
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<?
$CUR_DATE=date("Y-m-d",time());
$query = "SELECT count(*) from SCORE_FLOW where END_DATE<='$CUR_DATE' and END_DATE <> '0000-00-00' order by SEND_TIME desc";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
$HISTORY_COUNT=$ROW[0];
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/infofind.gif" WIDTH="25" HEIGHT="25" align="absmiddle"><span class="big3"> 办公用品登记查询</span>
</td>
</tr>
</table>
<br>
<div align="center">
<table border="0" cellspacing="1" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form method="post" name="form1" >
<tr>
<td nowrap class="TableContent">登记标示:</td>
<td class="TableData">
<select name="TRANS_FLAG" class="BigSelect" onchange="sel_change()">
<option value="-1"></option>
<option value="0">采购入库</option>
<option value="1">领用</option>
<option value="2">借用</option>
<option value="3">归还</option>
<option value="4">报废</option>
</select>
</td>
</tr>
<tr id="BORROWER" style=display:none>
<td nowrap id="t1" class="TableContent" style=display:none>领用人:</td>
<td nowrap id="t2" class="TableContent" style=display:none>借用人:</td>
<td nowrap id="t3" class="TableContent" style=display:none>归还人:</td>
<td class="TableData">
<input type="hidden" name="TO_ID" value="">
<input type="text" name="TO_NAME" size="20" class="BigStatic" maxlength="20" value="" readonly>
<input type="button" value="选 择" class="SmallButton" onClick="LoadWindow1()" title="选择" name="button">
<input type="button" value="清 空" class="SmallButton" onClick="clear_dept1()" title="清空" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableContent">办公用品:</td>
<td class="TableData">
<select name="PRO_ID" class="BigSelect">
<option value=""></option>
<?
$query = "SELECT * from OFFICE_PRODUCTS";
$connection=OpenConnection();
$cursor= exequery($connection,$query);
$VOTE_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$VOTE_COUNT++;
$PROID=$ROW["PRO_ID"];
$PRONAME=$ROW["PRO_NAME"];
$PROSTOCK=$ROW["PRO_STOCK"];
?>
<option value="<?=$PROID?>"><?=$PRONAME?>/库存<?=$PROSTOCK?></option>
<?
}
?>
</select>
<input type="button" value="选 择" class="SmallButton" onClick="LoadWindow2()" title="选择办公用品" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableContent">办公用品名称(模糊):</td>
<td nowrap class="TableData">
<input type="text" name="PRO_NAME" class="BigInput" size="15" maxlength="10">
</td>
</tr>
<tr>
<td nowrap class="TableContent">日期: </td>
<td nowrap class="TableData">
<input type="text" name="FROM_DATE" class="BigInput" size="15" maxlength="10" value="<?=$DATE?>">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.FROM_DATE');">
至
<input type="text" name="TO_DATE" class="BigInput" size="15" maxlength="10" value="<?=$DATE?>">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.TO_DATE');">
</td>
</tr>
<tr>
<td nowrap class="TableContent"> 查询类型:</td>
<td class="TableData">
<input type="checkbox" name="c1" id="c1" value="1" onclick="return chk(this);"><label for="c1">明细</label>
<input type="checkbox" name="c1" value="2" id="c2" onclick="return chk(this);" checked><label for="c2">汇总/明细</label>
</td>
</tr>
<tr>
<td nowrap class="TableControl" colspan="2" align="center">
<input value="查询" class="BigButton" title="模糊查询" type="button" onclick="query();">
</td>
</tr>
</form>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -