⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 noreturn.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>
<script>


</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());
 $WHERE_STR.=" where (a.TRANS_FLAG='2' or a.TRANS_FLAG='3')";

 if($PRO_ID!=" " and $PRO_ID!="")
		 $WHERE_STR.=" and a.PRO_ID='$PRO_ID '";

if($PRO_NAME!=" " and $PRO_NAME!="")
     $WHERE_STR.=" and b.PRO_NAME like '%".$PRO_NAME."%'";


 if($FROM_DATE!=" " and $FROM_DATE!="")
		 $WHERE_STR.=" and a.TRANS_DATE>='$FROM_DATE'";

 if($TO_DATE!=" " and $TO_DATE!="")
		 $WHERE_STR.=" and a.TRANS_DATE<='$TO_DATE'";
		 
 if($BORROWER!=" " and $BORROWER!="")
		 $WHERE_STR.=" and a.BORROWER='$BORROWER'";		 		 

?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/notify_open.gif" align="absmiddle"><span class="big3">&nbsp;&nbsp;未归还的办公用品</span><br>
    </td>
  </tr>
</table>
<br>

<div align="center">
<?
 //============================ 显示未归还=======================================
 $query="SELECT a.PRO_ID as PROID, b.PRO_NAME as PRONAME,sum(TRANS_QTY) as TOTALQTY ,b.PRO_UNIT as PROUNIT FROM `OFFICE_TRANSHISTORY` a LEFT OUTER JOIN OFFICE_PRODUCTS b ON a.PRO_ID = b.PRO_ID".$WHERE_STR." GROUP BY a.PRO_ID, b.PRO_NAME HAVING TOTALQTY <0";
 //echo $query;
 $cursor= exequery($connection,$query);
 $VOTE_COUNT=0;
 while($ROW=mysql_fetch_array($cursor))
 {
    $VOTE_COUNT++;
    $PROID=$ROW["PROID"];
    $PRONAME=$ROW["PRONAME"];
    $TOTALQTY=$ROW["TOTALQTY"]*(-1);
    $PROUNIT=$ROW["PROUNIT"];
    if($VOTE_COUNT==1)
   {
    ?>
     <table border="0" cellspacing="1" width="60%" class="small" bgcolor="#000000" cellpadding="3">
    <?
    }

    if($VOTE_COUNT%2==1)
       $TableLine="TableLine1";
    else
       $TableLine="TableLine2";
?>
    <tr class="<?=$TableLine?>"  style="cursor:hand" onclick="td_detail('<?=$PROID?>');" title="单击查看借用,归还明细">
      <td align="center"><?=$PRONAME?></td>
      <td nowrap align="center"><?=$TOTALQTY?><?=$PROUNIT?></td>
    </tr>
    <tr class="TableData" id=<?=$PROID?> style="display:none" onDblClick="td_close('<?=$PROID?>');" title="双击关闭子窗口">
      <td nowrap align="left"  colspan=2>
      <br>
        借用明细:
        <table border="0" cellspacing="1"  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>
           </tr>

<?
            //============================显示借用明细查询=======================================
             $WHERE_STR1="";
             $WHERE_STR1.="  where a.TRANS_FLAG='2' and a.PRO_ID='$PROID'";
             if($FROM_DATE!=" " and $FROM_DATE!="")
		            $WHERE_STR1.=" and a.TRANS_DATE>='$FROM_DATE'";

             if($TO_DATE!=" " and $TO_DATE!="")
		            $WHERE_STR1.=" and a.TRANS_DATE<='$TO_DATE'";
            $query1="SELECT a.PRO_ID, b.PRO_NAME ,a.TRANS_QTY ,b.PRO_UNIT,a.TRANS_DATE,a.OPERATOR,a.BORROWER  FROM `OFFICE_TRANSHISTORY` a LEFT OUTER JOIN OFFICE_PRODUCTS b ON a.PRO_ID = b.PRO_ID".$WHERE_STR1."  order by a.TRANS_DATE desc";
            $cursor1= exequery($connection,$query1);
            $DETAIL_COUNT=0;
            while($ROW=mysql_fetch_array($cursor1))
            {
             $DETAIL_COUNT++;
             $DETAIL_PROID=$ROW["PRO_ID"];
             $DETAIL_PRONAME=$ROW["PRO_NAME"];
             $DETAIL_TRANSQTY=$ROW["TRANS_QTY"]*(-1);
             $DETAIL_PROUNIT=$ROW["PRO_UNIT"];
             $DETAIL_PRICE=$ROW["PRICE"];
             $DETAIL_USER=$ROW["OPERATOR"];

             $DETAIL_BORROWER=$ROW["BORROWER"];

             $DETAIL_DATE=$ROW["TRANS_DATE"];
             $TOK=strtok($DETAIL_USER,",");
             $query1="select USER_NAME from USER where USER_ID='$TOK'";
             $cursor2= exequery($connection,$query1);
             if($ROW=mysql_fetch_array($cursor2))
             $DETAIL_USERNAME=$ROW["USER_NAME"];
             $TOK=strtok($DETAIL_BORROWER,",");
             $query1="SELECT `USER_ID` , `USER_NAME` , PRIV_NAME, DEPT_NAME,a.DEPT_ID as DEPT_ID FROM `USER` a LEFT OUTER JOIN DEPARTMENT b ON a.DEPT_ID = b.DEPT_ID LEFT OUTER JOIN USER_PRIV c ON a.USER_PRIV = c.USER_PRIV where a.USER_ID='$TOK'";
             $cursor2= exequery($connection,$query1);
             if($ROW=mysql_fetch_array($cursor2))
             {
             	$DETAIL_BORROWERNAME=$ROW["USER_NAME"];
             	$DETAIL_BORROWERDEPT=$ROW["DEPT_NAME"];
             	$DETAIL_BORROWERDEPTID=$ROW["DEPT_ID"];
             }

             if($DETAIL_COUNT%2==1)
             $TableLine="TableLine1";
              else
             $TableLine="TableLine2";
?>
           <tr class="TableData" onclick="show('<?=$DETAIL_PROID?>','<?=$DETAIL_DATE?>','<?=$DETAIL_BORROWERDEPTID?>');" title="单击查看归还">


           <td nowrap align="center"><?=$DETAIL_PRONAME?></td>
           <td nowrap align="center"><?=$DETAIL_BORROWERNAME?></td>

           <td nowrap align="center"><?=$DETAIL_BORROWERDEPT?></td>
           <td nowrap align="center"><?=$DETAIL_TRANSQTY?><?=$DETAIL_PROUNIT?></td>
           <td nowrap align="center"><?=$DETAIL_USERNAME?></td>
           <td nowrap align="center"><?=$DETAIL_DATE?></td>

           </tr>
<?
           }
?>
       </table>
       <br>
        归还明细:
       <table border="0" cellspacing="1"  width="30%" 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>
           </tr>

<?
            //============================显示归还明细查询=======================================
             $WHERE_STR1="";
             $WHERE_STR1.="  where a.TRANS_FLAG='3' and a.PRO_ID='$PROID'";
             if($FROM_DATE!=" " and $FROM_DATE!="")
		            $WHERE_STR1.=" and a.TRANS_DATE>='$FROM_DATE'";

             if($TO_DATE!=" " and $TO_DATE!="")
		            $WHERE_STR1.=" and a.TRANS_DATE<='$TO_DATE'";
            $query1="SELECT a.PRO_ID, b.PRO_NAME ,a.TRANS_QTY ,b.PRO_UNIT,a.TRANS_DATE,a.OPERATOR,a.BORROWER  FROM `OFFICE_TRANSHISTORY` a LEFT OUTER JOIN OFFICE_PRODUCTS b ON a.PRO_ID = b.PRO_ID".$WHERE_STR1."  order by a.TRANS_DATE desc";
            $cursor1= exequery($connection,$query1);
            $DETAIL_COUNT=0;
            while($ROW=mysql_fetch_array($cursor1))
            {
             $DETAIL_COUNT++;
             $DETAIL_PROID=$ROW["PRO_ID"];
             $DETAIL_PRONAME=$ROW["PRO_NAME"];
             $DETAIL_TRANSQTY=$ROW["TRANS_QTY"];
             $DETAIL_PROUNIT=$ROW["PRO_UNIT"];
             $DETAIL_PRICE=$ROW["PRICE"];
             $DETAIL_USER=$ROW["OPERATOR"];

             $DETAIL_BORROWER=$ROW["BORROWER"];

             $DETAIL_DATE=$ROW["TRANS_DATE"];
             $TOK=strtok($DETAIL_USER,",");
             $query1="select USER_NAME from USER where USER_ID='$TOK'";
             $cursor2= exequery($connection,$query1);
             if($ROW=mysql_fetch_array($cursor2))
             $DETAIL_USERNAME=$ROW["USER_NAME"];
             $TOK=strtok($DETAIL_BORROWER,",");
             $query1="SELECT `USER_ID` , `USER_NAME` , PRIV_NAME, DEPT_NAME,a.DEPT_ID as DEPT_ID FROM `USER` a LEFT OUTER JOIN DEPARTMENT b ON a.DEPT_ID = b.DEPT_ID LEFT OUTER JOIN USER_PRIV c ON a.USER_PRIV = c.USER_PRIV where a.USER_ID='$TOK'";
             $cursor2= exequery($connection,$query1);
             if($ROW=mysql_fetch_array($cursor2))
             {
             	$DETAIL_BORROWERNAME=$ROW["USER_NAME"];
             	$DETAIL_BORROWERDEPT=$ROW["DEPT_NAME"];
             	$DETAIL_BORROWERDEPTID=$ROW["DEPT_ID"];
             }
             if($DETAIL_COUNT%2==1)
             $TableLine="TableLine1";
              else
             $TableLine="TableLine2";
?>
           <tr class="TableData">
           <td nowrap align="center"><?=$DETAIL_PRONAME?></td>
           <td nowrap align="center"><?=$DETAIL_BORROWERNAME?></td>
           <td nowrap align="center"><?=$DETAIL_BORROWERDEPT?></td>
           <td nowrap align="center"><?=$DETAIL_TRANSQTY?><?=$DETAIL_PROUNIT?></td>
           <td nowrap align="center"><?=$DETAIL_USERNAME?></td>
           <td nowrap align="center"><?=$DETAIL_DATE?></td>

           </tr>
<?
           }
?>
       </table>
      </td>
    </tr>
<?
 }
  if($VOTE_COUNT>0)
 {
?>
   <thead class="TableHeader">
  	  <td nowrap align="center">办公用品名称</td>
      <td nowrap align="center">未归还数量</td>
    </thead>
</table>
</div>
<?
 }
 else
    Message("","尚未定义");
?>
<br>
<div align="center">
 <input type="button"  value="关闭" class="BigButton" onclick="window.close();">
</div>
</body>

</html>
<script Language="JavaScript">

 function td_detail(I)
{
   if(document.all(I).style.display=="none")
      {document.all(I).style.display="";
       document.all(I).style.cursor="hand";
      	}
   else
   	document.all(I).style.display="none";

}

 function td_close(I)
{

   	document.all(I).style.display="none";

}

function show(PRO_ID,DATE,DEP_ID)
{
 URL="show_return.php?PRO_ID="+PRO_ID+"&DATE="+DATE+"&DEP_ID="+DEP_ID;
 myleft=(screen.availWidth-500)/2;
 window.open(URL,"read_vote","height=500,width=700,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -