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

📄 default.asp

📁 进销存软件源代码
💻 ASP
字号:
<!-- #include virtual="/eB3KTransaction.asp" -->
<!-- #include virtual="/Server/ebo.asp" -->
<!-- #include virtual="/Server/cblib.asp" -->
<!-- #include file="../Common.asp" -->
<!-- #include virtual="/Server/SqlReport.asp" -->
<!-- #include virtual="/Server/ReportBD.asp" -->
<!-- #include virtual="/Server/rawdata.asp" -->
<HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script src="/Client/ebComm.js"></script><title></title></HEAD>
<script src="/client/ebo.js"></script>
<script src="/client/Request.js"></script>
<script src="/client/IClient.js"></script>
<script src="/client/grid.js"></script>
<script src="/client/cblib.js"></script>

<script title=User>
function ecbDetail(eo,szEvent,x,y){
	if (szEvent=='MOUSECLICK'){
	}
}

</script>
<%
dim szSQL
szSQL="Select Stock as 仓库,ProductTitle as 产品名称,Code as 产品编码,Color as 色号,Spec as 尺码,Sum(levelone) as 一级,Sum(leveltwo) as 二级,Sum(levelthree) as 三级 From ("& _
		" Select bis.Title as Stock,bi.Title as Producttitle,bi.Code as Code,biColor.Title as Color,biSpec.Title as Spec,1 as levelone,0 as leveltwo,0 as levelthree From biColor,biSpec,biStock as bis,biProduct as bi,biAlertSet as bia "& _
		" Where biColor.ID=bi.Bigint2 and biSpec.ID=bi.Bigint3 and bia.int1=bis.id and bia.int2=bi.ID and "& _
			" (Select sum(quantity) as quantity From ("& _
			" Select Quantity= case IsNull(sum(vl.quantity),0) when 0 then 0.001 else sum(vl.quantity) end From bdOutStock as vt,bdOutStockList as vl Where vt.ID=vl.ID and vt.BillType=1 and vt.AuditID<>0 and vt.Isdeleted=0 and AccountID<>1 and vt.UpdateDate>DateAdd(d,-(bia.Int3),GetDate()) and vt.Stock=bis.ID and vl.ProductID=bi.ID "& _
			" ) as nv)*100/ "& _
			"(Select Quantity= case IsNull(sum(Quantity),0) when 0 then 0.0001 else sum(quantity) end From resProductStock Where AccountID<>1 and Stock=bis.ID and ProductID=bi.ID and CreateDate<DateAdd(d,-(bia.Int3),GetDate()) and (updateDate>DateAdd(d,-(bia.Int3),GetDate()) OR Isdeleted=0)) "& _
			" <bia.currency1 "& _
		" UNION "& _
		" Select bis.Title as Stock,bi.Title as Producttitle,bi.Code as Code,biColor.Title as Color,biSpec.Title as Spec,0 as levelone,1 as leveltwo,0 as levelthree From biColor,biSpec,biStock as bis,biProduct as bi,biAlertSet as bia "& _
		" Where biColor.ID=bi.Bigint2 and biSpec.ID=bi.Bigint3 and bia.int1=bis.id and bia.int2=bi.ID and "& _
			" (Select sum(quantity) as quantity From ("& _
			" Select Quantity= case IsNull(sum(vl.quantity),0) when 0 then 0.001 else sum(vl.quantity) end From bdOutStock as vt,bdOutStockList as vl Where vt.ID=vl.ID and vt.BillType=1 and vt.AuditID<>0 and vt.Isdeleted=0 and AccountID<>1 and vt.UpdateDate>DateAdd(d,-(bia.Int4),GetDate()) and vt.Stock=bis.ID and vl.ProductID=bi.ID "& _
			" ) as nv)*100/ "& _
			"(Select Quantity= case IsNull(sum(Quantity),0) when 0 then 0.0001 else sum(quantity) end From resProductStock Where AccountID<>1 and Stock=bis.ID and ProductID=bi.ID and CreateDate<DateAdd(d,-(bia.Int4),GetDate()) and (updateDate>DateAdd(d,-(bia.Int4),GetDate()) OR Isdeleted=0)) "& _
			" <bia.currency2 "& _
		" UNION "& _
		" Select bis.Title as Stock,bi.Title as Producttitle,bi.Code as Code,biColor.Title as Color,biSpec.Title as Spec,0 as levelone,0 as leveltwo,1 as levelthree From biColor,biSpec,biStock as bis,biProduct as bi,biAlertSet as bia "& _
		" Where biColor.ID=bi.Bigint2 and biSpec.ID=bi.Bigint3 and bia.int1=bis.id and bia.int2=bi.ID and "& _
			" (Select sum(quantity) as quantity From ("& _
			" Select Quantity= case IsNull(sum(vl.quantity),0) when 0 then 0.001 else sum(vl.quantity) end From bdOutStock as vt,bdOutStockList as vl Where vt.ID=vl.ID and vt.BillType=1 and vt.AuditID<>0 and vt.Isdeleted=0 and AccountID<>1 and vt.UpdateDate>DateAdd(d,-(bia.Int5),GetDate()) and vt.Stock=bis.ID and vl.ProductID=bi.ID "& _
			" ) as nv)*100/ "& _
			"(Select Quantity= case IsNull(sum(Quantity),0) when 0 then 0.0001 else sum(quantity) end From resProductStock Where AccountID<>1 and Stock=bis.ID and ProductID=bi.ID and CreateDate<DateAdd(d,-(bia.Int5),GetDate()) and (updateDate>DateAdd(d,-(bia.Int5),GetDate()) OR Isdeleted=0)) "& _
			" <bia.currency3 "& _
		" ) as vv Group By Stock,ProductTitle,Code,Color,Spec"
		
'eboReg

eboReg 1, "gridCols", "iCols", "", "cbLocalVariable"

eboReg 2, "gridTilte_", "szTitle", "", "cbLocalVariable"

dim iCols, szTitle, szValue

dim i,rs
Response.Write "<script>" & VBCrLf
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.open szSQL,Conn,1,1
IData2d 0,1
iCols=rs.Fields.Count
eboGet 1, nothing, nothing
IData2d 1,2
for i=0 to rs.Fields.Count-1
	szTitle=rs.Fields.Item(i).Name
	eboGet 2, nothing, nothing
next
rawGet rs
Set rs = Nothing
Response.Write "</script>" & VBCrLf
%>

<LINK REL=stylesheet HREF="/Client/All.css" TYPE="text/css"><script src="/Client/ebComm.js"></script>
<BODY>
<div align=center>滞销报警</div>
<br>
<div id=SelectArea  align=center></div>
<div id=PageCtrlArea></div>
</BODY>

<script>
function getGridWidth(titleText){
	switch(titleText){		
		case '仓库':
			return 100;
			break;
		case '产品':
			return 160;
			break;
		case '一级报警':
			return 100;
			break;		
		case '二级报警':
			return 100;
			break;	
		case '三级报警':
			return 100;
			break;			
		default:
			return 80;
	}
}

function getGridNumeric(titleText){
	switch(titleText){
		case '一级报警':
			return 0;
			break;
		case '二级报警':
			return 0;
			break;		
		case '三级报警':
			return 0;
			break;
		default:
			return 0;
	}
}

function getGridAlign(titleText){
	switch(titleText){		
		case '一级报警':
			return 'Center';
			break;
		case '二级报警':
			return 'Center';
			break;	
		case '三级报警':
			return 'Center';
			break;			
		default:
			return '';
	}
}


function makeGrid(indata){
	var gridCols=parseInt(indata.item('gridCols'));
	var gDetail = new ZYDGRID(new ZYDGRIDFORIEBUG(),SelectArea,10,gridCols,'100%','',1,testUndefine,IRAWDataEnd(),ecbDetail);
	gDetail.title[0].text='№';
	for (var i=0;i<gridCols;i++){
		gDetail.title[i+1].text=indata.item('gridTilte_'+i);
		gDetail.title[i+1].width=getGridWidth(indata.item('gridTilte_'+i));
		gDetail.title[i+1].isNumeric=getGridNumeric(indata.item('gridTilte_'+i));
		gDetail.title[i+1].formAlign=getGridAlign(indata.item('gridTilte_'+i));

	}
	gDetail.calcTotal();
	gDetail.refreshAll();
	if (gDetail.data.length!=0){
		for (var i=0;i<gDetail.data.length;i++){
			for (var j=0;j<gDetail.data[i].length;j++){
				if (gDetail.title[j+1].text=='一级' && gDetail.data[i][j]==1){
				gDetail.data[i][j]='<span style="background-color:Green">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
				}
				if (gDetail.title[j+1].text=='二级' && gDetail.data[i][j]==1){
				gDetail.data[i][j-1]='<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
				gDetail.data[i][j]='<span style="background-color:Orange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
				}
				if (gDetail.title[j+1].text=='三级' && gDetail.data[i][j]==1){
				gDetail.data[i][j-2]='<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
				gDetail.data[i][j-1]='<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
				gDetail.data[i][j]='<span style="background-color:#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
				}
				if (gDetail.data[i][j]==0){
				gDetail.data[i][j]=''
				}
			gDetail.refreshAll();
			}
		}
	}	
	
	return gDetail
}
var gDetail=makeGrid(IDataEnd());
</script>
</HTML>

⌨️ 快捷键说明

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