📄 record.php
字号:
?>
<td class="Big"><img src="/images/edit.gif" align="absmiddle" width="20" height="20"><span class="big3"> 修改办公用品登记</span>
</td>
<?
}
?>
</tr>
</table>
<br>
<table border="0" width="70%" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form enctype="multipart/form-data" action="add.php" method="post" name="form1">
<tr>
<td nowrap class="TableData">登记标示:</td>
<td class="TableData">
<select name="TRANS_FLAG" class="BigSelect" onchange="sel_change()">
<option value="-1">---请选择---</option>
<option value="0" <? if($TRANS_FLAG=="0") echo "selected";?>>采购入库</option>
<option value="1" <? if($TRANS_FLAG=="1") echo "selected";?>>领用</option>
<option value="2" <? if($TRANS_FLAG=="2") echo "selected";?>>借用</option>
<option value="3" <? if($TRANS_FLAG=="3") echo "selected";?>>归还</option>
<option value="4" <? if($TRANS_FLAG=="4") echo "selected";?>>报废</option>
</select>
</td>
</tr>
<tr id="BORROWER" style=<? if($TRANS_FLAG=="1" or $TRANS_FLAG=="2" or $TRANS_FLAG=="3") {echo "";}else {echo "display:none";}?>>
<td nowrap id="t1" class="TableData" style=<? if($TRANS_FLAG=="1") {echo "";}else {echo "display:none";}?>>领用人:</td>
<td nowrap id="t2" class="TableData" style=<? if($TRANS_FLAG=="2") {echo "";}else {echo "display:none";}?>>借用人:</td>
<td nowrap id="t3" class="TableData" style=<? if($TRANS_FLAG=="3") {echo "";}else {echo "display:none";}?>>归还人:</td>
<td class="TableData">
<input type="hidden" name="TO_ID" value="<?=$BORROWER?>">
<input type="text" name="TO_NAME" size="20" class="BigStatic" maxlength="20" value="<?=$BORROWER_NAME?>" 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 id="COST" style=<? if($TRANS_FLAG=="0") {echo "";}else {echo "display:none";}?>>
<td nowrap class="TableData">单价:</td>
<td class="TableData">
<?
if ($PRICE=="")
{
?>
<input type="text" name="PRICE" size="20" maxlength="20" class="BigInput" value="0.0">
<?
}
else
{
?>
<input type="text" name="PRICE" size="20" maxlength="20" class="BigInput" value="<?=$PRICE?>">
<?
}
?>
</td>
</tr>
<tr>
<td nowrap class="TableData">办公用品:</td>
<td class="TableData">
<select name="PRO_ID" class="BigSelect">
<option value="-1">---请选择---</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"];
$PROUNIT=$ROW["PRO_UNIT"];
?>
<option value="<?=$PROID?>" <?if($PROID==$PRO_ID) echo "selected";?>><?=$PRONAME?>/库存<?=$PROSTOCK?><?=$PROUNIT?></option>
<?
}
?>
</select>
<input type="button" value="选 择" class="SmallButton" onClick="LoadWindow2()" title="选择办公用品" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableData">数量:</td>
<td class="TableData">
<input type="text" name="TRANS_QTY" size="20" maxlength="20" class="BigInput" value="<?=$TRANS_QTY?>">
</td>
</tr>
<tr>
<td nowrap class="TableData">备注:</td>
<td class="TableData">
<textarea name="REMARK" cols="45" rows="5" class="BigInput"><?=$REMARK?></textarea>
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="hidden" name="TRANS_ID" value="<?=$TRANS_ID?>">
<input type="button" value="确认" class="BigButton" onclick="CheckForm();">
<?
if($TRANS_ID!="")
{
?>
<input type="button" value="取消" class="BigButton" onclick="location='record.php'">
<?
}
?>
</td>
</tr>
</table>
</form>
<?
//============================显示操作结果=======================================
$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_QTY=$TRANS_QTY*(-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_QTY=$TRANS_QTY*(-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=="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_QTY=$TRANS_QTY*(-1);
$TRANS_NAME="报废";
$BORROWER_NAME="";
}
if($VOTE_COUNT==1)
{
?>
<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<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>
<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
<tr 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>
</tr>
<?
}
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)
{
?>
</table>
<?
}
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -