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

📄 borrow_output.asp

📁 物业管理和办公自动化系统
💻 ASP
字号:
<%
'##############################################################################
'#
'#		文 件 名	 : borrow_output.asp
'#
'#
'#		创 建 人	 : yaoxiaohui
'#  	日   期	 : 2002-11-4
'#
'#		修改历史  : ****年**月**日 ******
'#      修改内容  : **************************************************
'#
'#		功能描述	 : 物品借用
'#  	版   本	 : v1.0
'#	
'#	    Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'##############################################################################
'------------------------------------------------------------------------------
'----   服务器端设置
'------------------------------------------------------------------------------
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- include files begin -->

<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/commonpage.inc" -->

<!-- #include file="borrow_output.inc" -->

<!-- include files end -->
<%
'##############################################################################
'----   服务器端代码
'##############################################################################
call CheckSecurity()
'------------------------------------------------------------------------------
'----   用户权限检查
'------------------------------------------------------------------------------
if hasright(ID_STOCK) < RIGHT_WRITE  then
	Response.Clear
	Response.Redirect "../include/error.asp?error=只有仓库管理员才能进行出库操作!"
	Response.end
end if
'******************************************************************************
'----   建立数据库连接
'------------------------------------------------------------------------------
dim conn
set conn = DBConnection

dim pGoodsID, pQuantity, pRemark
dim pNodeID             : pNodeID      = GetParam("node_id")
if IsEmpty(pNodeID)       then pNodeID = -1
dim pReceiver           : pReceiver    = ""
dim pHandover           : pHandover    = "" 
dim pOpdate             : pOpdate      = date 

dim pDueReDate

if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
dim sFormAction
sFormAction = GetParam("FormAction")
select case sFormAction
  case "next" :
    call ItemOutput()
  case "cancel" :
    call Cancel()
end select 
end if

'******************************************************************************
'----   分页相关的变量定义
'------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName			: sFileName			= "borrow_output.asp"
Dim iTotalRecords		: iTotalRecords		= 0			                ' 分页
Dim iRecordsPerPage		: iRecordsPerPage	= 8                        ' 一页10行
Dim iTotalPages			: iTotalPages		= 0
Dim iCols				: iCols				= 8                         ' 8列
Dim iCurrentPage		: iCurrentPage		= GetParam("Page")
Dim sSorting			: sSorting			= GetParam("Sorting")
Dim sSorted				: sSorted			= GetParam("Sorted")
Dim sSortParams			: sSortParams		= ""
Dim sFormParams			: sFormParams		= ""
Dim sDirection			: sDirection		= ""

'******************************************************************************
'----   构造分页的SQL语句
'------------------------------------------------------------------------------
sSQL = " select t1.goods_id as id,t1.goods_name,t1.model,t1.unit,t1.quantity,t2.type_desc ,t1.unit_price,t1.input_method" & _
       " from t_goods t1" & _
	   " left join t_goods_type  t2 on t1.goods_type=t2.type_id"
sWhere = " where  t1.current_status = 7"
sOrderby = " order by t1.goods_name"

'******************************************************************************
'----   分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'------------------------------------------------------------------------------
dim arrayFields(6), sDelimiter
sDelimiter = "*"
arrayFields(0)	=	"goods_name"
arrayFields(1)	=	"model"
arrayFields(2)	=	"unit"
arrayFields(3)	=	"quantity"
arrayFields(4)	=	"type_desc"
arrayFields(5)	=	"input_method"
arrayFields(6)	=	"unit_price"

call PrepareListData(conn,sSQL & sWhere & sOrderby, Join(arrayFields, sDelimiter), sDelimiter)
'******************************************************************************
%>

<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../include/common.css" type="text/css">

<style type="text/css">
.tdlist		{border-width:0px}
.tdHead	    {border-width:0px}
</style>

<!-- 日历 -->
<IFRAME style="display:none;position:absolute;width:148;height:194;z-index=100" ID="CalFrame" MarginHeight=0 MarginWidth=0 noresize frameborder=0 scrolling=no src="../include/cal/calendar.htm"></IFRAME>
<script language="javascript" src="../include/cal/calendar.js"></script>
<script for=document event="onclick()">
<!--
document.all.CalFrame.style.display="none";
//-->
</script>
<!-- 日历 -->

<script language="javascript">

function mover()
{
	var obj = window.event.srcElement;
	obj.style.color = 'blue';
}

function mout()
{
	var obj = window.event.srcElement;
	obj.style.color = 'black';
}

function btnItemadd_OnClick()
{
	var row;
	var quan=0;
	var quan_in=0;
	var a;
	var b;
	var c;
	var d;
	eval("row = frmSheetDetail.row_count.value")
	for(var j=1;j<=row;j++)
	{
		eval("quan = frmSheetDetail.quantity_"+ j +".value")
		eval("quan_in = frmSheetDetail.quantity_in_"+ j +".value")
		a = new Number(quan);
		b = new Number(quan_in);
		c = a.valueOf();
		d = b.valueOf();
		if( c > d ) 
		{
			alert("库存数不足!");
			return;
		}
		if(quan == "")
		{
			alert("借用数未填!");
			return;
		}
	}
	if (frmSheetDetail.node_id.value == "-1")
	{
		alert("请输入部门!");
		frmSheetDetail.node_id.focus();
		return;
	}
	if ( window.confirm("你确定要借用吗?\n\n确认请按“确定”,取消请按“取消”。") == true )
	{
		frmSheetDetail.FormAction.value = "next";
		frmSheetDetail.submit();
	}
}

function btnCancel_OnClick()
{
	frmSheetDetail.FormAction.value = "cancel";
	frmSheetDetail.submit();
}
</script>


</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/bg/bg0.jpg">
<br>

<%
'response.write sSQL & sWhere & sOrderby & "<br>" : response.end
Response.Write OuterTableHeader
Response.Write HeaderWithMenu
Response.Write InnerTableHeader
'******************************************************************************
'----   主体从这里开始
'------------------------------------------------------------------------------
Response.Write TableHeader
Response.Write TableRecords(sSQL & sWhere & sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams )
Response.Write SheetDetail
Response.Write ActionLink
'------------------------------------------------------------------------------
'----   主体到这里结束
'******************************************************************************
Response.Write InnerTableTailer
Response.Write Footer
Response.Write OuterTableTailer
Disconnect(conn)
%>

</body>
</html> 

⌨️ 快捷键说明

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