📄 list.php
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>
<script>
function delete_vote(TRANS_ID)
{
msg='确认放弃该操作?放弃该操作库存将回滚到操作前的状态!!';
if(window.confirm(msg))
{
URL="delete.php?TRANS_ID="+TRANS_ID;
window.location=URL;
}
}
</script>
<html>
<head>
<title>操作结果查看</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<?
$CUR_DATE=date("Y-m-d",time());
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_open.gif" WIDTH="22" HEIGHT="22" align="absmiddle"><span class="big3"> 操作结果查看</span>
</td>
</tr>
</table>
<br>
<div align="center">
<?
//============================显示操作结果=======================================
$CUR_DATE=date("Y-m-d",time());
$query = "SELECT * from OFFICE_TRANSHISTORY where OPERATOR='$LOGIN_USER_ID' and TRANS_DATE='$CUR_DATE' order by TRANS_ID desc";
$cursor= exequery($connection,$query);
$VOTE_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$VOTE_COUNT++;
$TRANS_ID=$ROW["TRANS_ID"];
$PRO_ID=$ROW["PRO_ID"];
$BORROWER=$ROW["BORROWER"];
$TRANS_FLAG=$ROW["TRANS_FLAG"];
$TRANS_QTY=$ROW["TRANS_QTY"];
$PRICE =$ROW["PRICE"];
$TRANS_DATE=$ROW["TRANS_DATE"];
$OPERATOR=$ROW["OPERATOR"];
$query1="select PRO_NAME,PRO_STOCK from OFFICE_PRODUCTS where PRO_ID='$PRO_ID'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))
{
$PRO_NAME=$ROW["PRO_NAME"];
$PRO_STOCK=$ROW["PRO_STOCK"];
}
$query1="select USER_NAME from USER where USER_ID='$LOGIN_USER_ID'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))
$OPERATOR_NAME=$ROW["USER_NAME"];
//--------------------
if ($TRANS_FLAG=="0")
{
$TRANS_NAME="采购入库";
$BORROWER_NAME="";
}
if ($TRANS_FLAG=="1")
{
$TRANS_NAME="领用";
//----------------------
$TOK=strtok($BORROWER,",");
$query1="select USER_NAME from USER where USER_ID='$TOK'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))
$BORROWER_NAME=$ROW["USER_NAME"];
//---------------------
}
if ($TRANS_FLAG=="2")
{
$TRANS_NAME="借用";
//----------------------
$TOK=strtok($BORROWER,",");
$query1="select USER_NAME from USER where USER_ID='$TOK'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))
$BORROWER_NAME=$ROW["USER_NAME"];
//---------------------
}
if ($TRANS_FLAG=="3")
{
$TRANS_NAME="归还";
//----------------------
$TOK=strtok($BORROWER,",");
$query1="select USER_NAME from USER where USER_ID='$TOK'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))
$BORROWER_NAME=$ROW["USER_NAME"];
//---------------------
}
if ($TRANS_FLAG=="4")
{
$TRANS_NAME="报废";
$BORROWER_NAME="";
}
//--------------------
if($VOTE_COUNT==1)
{
?>
<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
<?
}
if($VOTE_COUNT%2==1)
$TableLine="TableLine1";
else
$TableLine="TableLine2";
?>
<tr class="<?=$TableLine?>">
<td nowrap align="center"><?=$PRO_NAME?></td>
<td align="center"><?=$TRANS_NAME?></td>
<td align="center"><?=$BORROWER_NAME?></td>
<td nowrap align="center"><?=$TRANS_QTY?></td>
<td nowrap align="center"><?=$PRO_STOCK?></td>
<td nowrap align="center"><?=$PRICE?></td>
<td nowrap align="center"><?=$TRANS_DATE?></td>
<td nowrap align="center"><?=$OPERATOR_NAME?></td>
<td nowrap align="center">
<a href="record.php?TRANS_ID=<?=$TRANS_ID?>">修改</a>
<a href="javascript:delete_vote('<?=$TRANS_ID?>');"> 放弃</a>
</td>
</tr>
<?
}
if($VOTE_COUNT>0)
{
?>
<thead class="TableHeader">
<td nowrap align="center">办公用品名称</td>
<td nowrap align="center">管理标示</td>
<td nowrap align="center">领用/借用/归还人</td>
<td nowrap align="center">数量</td>
<td nowrap align="center">当前库存</td>
<td nowrap align="center">单价</td>
<td nowrap align="center">操作日期</td>
<td nowrap align="center">操作员</td> <td nowrap align="center">操作</td>
</thead>
</table>
<?
}
else
Message("","无操作记录!!");
?>
<br>
<input type="button" value="返回" class="SmallButton" onClick="location='record.php';">
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -