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

📄 myjs.js

📁 某公司的进销存软件的设计与开发
💻 JS
📖 第 1 页 / 共 2 页
字号:
//<script>
var MainMenu;
var ItemMenu;
var j;
var OutlookLikeBar;

OB_Top=31;//顶边距
OB_Left=3;//左边距
OB_Margin=10;//上下边距
OB_Width=108;//菜单宽
OB_Height=document.body.offsetHeight-67;//菜单高
OB_SlideSpeed=1.75;//移动速度
OB_BackgroundColor="#D6D3CE";//菜单背景
OB_ItemsSpacing=20;//菜单图标与文字距离
OB_BorderWidth=1;//边框宽
OB_BorderStyle="jungle";//边框样式
OB_BorderColor="#DDDDDD";//边框颜色
OB_IconsWidth=32;//图标宽
OB_IconsHeight=32;//图标高
OB_ButtonFontFamily="tahoma";//按钮字体
OB_ButtonFontSize=8;//字体大小  
OB_ButtonFontColor="#000066";//字体颜色     
OB_ButtonHeight=20;//按钮高
OB_LabelFontFamily="tahoma";//菜单字体
OB_LabelFontSize=8;//大小 
OB_LabelFontColor="black";//颜色 
OB_LabelMargin=3;//标签图标商距离 
OB_UpArrow="Images/up.gif";//向上图标	
OB_DownArrow="Images/down.gif";//向下图标	
OB_ArrowWidth=16;//图标宽
OB_ArrowHeight=16;//图标高
OB_ArrowSlideSpeed=8;//菜单图标移动速度

OutBarFolder1=new Array("入库管理","Images/Ico/ico01.gif","产品入库","produit/produit_add.asp","OfficeMain","Images/Ico/ico02.gif","入库记录查询","produit/buy.asp","OfficeMain","Images/Ico/ico32.gif","退回公司","produit/produit_tui.asp","OfficeMain","Images/Ico/ico12.gif","退货记录查询","produit/tui.asp","OfficeMain");

OutBarFolder2=new Array("库存管理","Images/Ico/ico35.gif","库存查询","produit/produit.asp","OfficeMain","Images/Ico/ico45.gif","库存调拨","produit/produit_move.asp","OfficeMain","Images/Ico/ico54.gif","库存报警","baojin.asp","OfficeMain");

OutBarFolder3=new Array("出库管理","Images/Ico/ico09.gif","产品销售","produit/produit_sell.asp","OfficeMain","Images/Ico/ico03.gif","销售记录查询","produit/sell.asp","OfficeMain","Images/Ico/ico46.gif","顾客退货","produit/produit_back.asp","OfficeMain","Images/Ico/ico14.gif","退货记录查询","produit/back.asp","OfficeMain","Images/Ico/ico11.gif","产品报废","produit/produit_fei.asp","OfficeMain","Images/Ico/ico13.gif","报废记录查询","produit/fei.asp","OfficeMain");

OutBarFolder4=new Array("员工管理","Images/Ico/ico39.gif","添加员工","system/user_add.asp","OfficeMain","Images/Ico/ico38.gif","修改/删除员工","system/user.asp","OfficeMain");

OutBarFolder5=new Array("系统设置","Images/Ico/ico00.gif","基本信息设置","system/config.asp","OfficeMain");		

OutBarFolder6=new Array("关于系统","Images/help.gif","关于系统","About/About1.htm","OfficeMain");

OutBarFolder7=new Array("办公助手","Images/Ico/ico40.gif","区号/邮编查询","Other/City.asp","OfficeMain","Images/Ico/ico42.gif","航班查询","Other/SelectCity.asp","OfficeMain");

OutBarFolder8=new Array("会员管理","Images/Ico/ico29.gif","添加会员","huiyuan/huiyuan_add.asp","OfficeMain","Images/Ico/ico08.gif","会员管理","huiyuan/huiyuan.asp","OfficeMain","Images/Ico/ico54.gif","会员生日报警","baojin2.asp","OfficeMain");

OutBarFolder9=new Array("仓库管理","Images/Ico/ico50.gif","添加仓库","system/ku_add.asp","OfficeMain","Images/Ico/ico49.gif","修改删除仓库","system/ku.asp","OfficeMain");

OutBarFolder10=new Array("类别管理","Images/Ico/ico53.gif","添加产品大类","system/bigclass_add.asp","OfficeMain","Images/Ico/ico53.gif","管理产品大类","system/bigclass.asp","OfficeMain","Images/Ico/ico52.gif","添加产品小类","system/smallclass_add.asp","OfficeMain","Images/Ico/ico52.gif","管理产品小类","system/smallclass.asp","OfficeMain");

OutBarFolder11=new Array("计量单位管理","Images/Ico/ico10.gif","添加产品单位","system/danwei_add.asp","OfficeMain","Images/Ico/ico06.gif","管理产品单位","system/danwei.asp","OfficeMain");
	
OutBarFolder12=new Array("统计报表","Images/Ico/ico07.gif","总体统计","count/count_all.asp","OfficeMain","Images/Ico/ico57.gif","进货统计","count/count_buy.asp","OfficeMain","Images/Ico/ico04.gif","公司退货统计","count/count_tui.asp","OfficeMain","Images/Ico/ico20.gif","顾客退货统计","count/count_back.asp","OfficeMain","Images/Ico/ico40.gif","报废统计","count/count_fei.asp","OfficeMain");	



MainMenu=MainMenu+"<DIV id='OutlookLikeBar' style='position:absolute;top:"+OB_Top+";left:"+OB_Left+";width:"+OB_Width+";height:"+OB_Height+";border:"+OB_BorderWidth+" "+OB_BorderStyle+" "+OB_BorderColor+";background-color:"+OB_BackgroundColor+";z-index:0;visibility:hidden;clip:rect(0,"+OB_Width+","+OB_Height+",0)'>";

MainMenu=MainMenu+"<img onMouseUp='OutlookLikeBar.ArrowSelected(this)' onMouseDown='OutlookLikeBar.ArrowClicked(this)' onMouseOver='OutlookLikeBar.OverArrow(this)' onMouseOut='OutlookLikeBar.OutArrow(this)' id='OB_SlideUp' height='"+OB_ArrowHeight+"' width='"+OB_ArrowWidth+"'  src='"+OB_UpArrow+"'style='position:absolute;top:0;left:0;cursor:hand;visibility:hidden;z-index:500'>";

MainMenu=MainMenu+"<img onMouseUp='OutlookLikeBar.ArrowSelected(this)' onMouseDown='OutlookLikeBar.ArrowClicked(this)' onMouseOver='OutlookLikeBar.OverArrow(this)' onMouseOut='OutlookLikeBar.OutArrow(this)' id='OB_SlideDown' height='"+OB_ArrowHeight+"' width='"+OB_ArrowWidth+"' src='"+OB_DownArrow+"' style='position:absolute;top:0;left:0;cursor:hand;visibility:hidden;z-index:500'>";


function ListMenu(){
ItemMenu="";
var m;

j=arguments.length+1;

i=j-1;

while(i>0)
{
m=arguments[i-1];
	Folder=eval("OutBarFolder"+m)
	//window.status="Outlook-Like Bar is making folder '"+Folder[0]+"'";
	if(i==1)
	{
		ItemMenu=ItemMenu+"<INPUT position='UP' id='OB_Button1' onDblClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' onClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' TYPE='button' value='"+Folder[0]+"' style='position:absolute;top:0;left:0;width:108;height:"+OB_ButtonHeight+";font-family:"+OB_ButtonFontFamily+";font-size:"+OB_ButtonFontSize+"pt;cursor:hand;color:"+OB_ButtonFontColor+";z-index:100' class='Button'>";
		MakeItems(Folder,i,OB_ButtonHeight);		
	}	
	else
	{
		ItemMenu=ItemMenu+"<INPUT position='DOWN' id='OB_Button"+i+"' onDblClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' onClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' TYPE='button' value='"+Folder[0]+"' style='position:absolute;top:"+(OB_Height-(j-i)*OB_ButtonHeight-OB_BorderWidth*2)+";left:0;width:108;height:"+OB_ButtonHeight+";font-family:"+OB_ButtonFontFamily+";font-size:"+OB_ButtonFontSize+"pt;cursor:hand;color:"+OB_ButtonFontColor+";z-index:100' class='Button'>";
		MakeItems(Folder,i,(OB_Height-(j-i)*OB_ButtonHeight-OB_BorderWidth*2)+OB_ButtonHeight);		
	}		
	i--;
}	
ItemMenu=ItemMenu+"</DIV>";
NavMenu.innerHTML=MainMenu+ItemMenu;

OutlookLikeBar=new OutBar(OB_Width,OB_Height,j-1,OB_ButtonHeight,OB_BorderWidth,OB_SlideSpeed,OB_IconsHeight+OB_LabelFontSize+OB_LabelMargin+OB_ItemsSpacing,OB_ArrowSlideSpeed);
document.all["OutlookLikeBar"].style.visibility="visible";

}

						

function MakeItems(Folder,zorder,top)
{
	var items=0;
	var folderWidth=(OB_Width-OB_BorderWidth*2);
	//var folderWidth=114;
	while(Folder[items+1])
		items+=4;
	items/=4;
	ItemMenu=ItemMenu+"<DIV id='OB_Folder"+zorder+"' style='position:absolute;left:0;top:"+top+";width:"+folderWidth+";height:"+(OB_Margin*2+items*(OB_IconsHeight+OB_LabelFontSize+OB_LabelMargin)+(items-1)*OB_ItemsSpacing)+";z-index:"+zorder+";clip:rect(0 0 0 0);'>";
	for(var i=1;i<items*4;i+=4)
	{
		ItemMenu=ItemMenu+"<div targetFrame='"+Folder[i+3]+"' link='"+Folder[i+2]+"' onMouseDown='OutlookLikeBar.ItemClicked(this)' onMouseUp='OutlookLikeBar.ItemSelected(this)' onMouseOver='OutlookLikeBar.OverItems(this)' onMouseOut='OutlookLikeBar.OutItems(this)' style='position:absolute;left:"+(Math.ceil((OB_Width-OB_BorderWidth*2-OB_IconsHeight)/2)-1)+";top:"+(OB_Margin+Math.ceil((i-1)/4)*(OB_ItemsSpacing+OB_LabelFontSize+OB_IconsHeight))+";cursor:hand;clip:rect(0 "+OB_IconsWidth+" "+OB_IconsHeight+" 0;width:"+OB_IconsWidth+";height:"+OB_IconsHeight+"'>";
 		ItemMenu=ItemMenu+"<img src='"+Folder[i]+"'>";
		ItemMenu=ItemMenu+"</div>";
		ItemMenu=ItemMenu+"<div align='center' style='position:absolute; width:104; ;left:0;top:"+(OB_LabelMargin+OB_IconsHeight+OB_Margin+Math.ceil((i-1)/4)*(OB_ItemsSpacing+OB_LabelFontSize+OB_IconsHeight))+";font-family:"+OB_LabelFontFamily+";font-size:"+OB_LabelFontSize+"pt;color:"+OB_LabelFontColor+"'>";
		ItemMenu=ItemMenu+Folder[i+1];
		ItemMenu=ItemMenu+"</div>";
	}	
	ItemMenu=ItemMenu+"</DIV>";
}


//***************************
//* Outlook-Like Bar Object *
//***************************
function OutBar(width,height,items,buttonHeight,borderWidth,slideSpeed,slideArrowValue,ArrowSlideSpeed)
{
	this.currentFolder=1;
	this.currentItem=null;
	this.slideCount=0;
	this.slideStep=1;
	this.slideArrowValue=slideArrowValue;
	this.slideSpeed=slideSpeed;
	this.borderWidth=borderWidth;
	this.width=width;
	this.visibleAreaHeight=height-2*borderWidth-items*buttonHeight;
	this.visibleAreaWidth=width;
	this.FolderClicked=FolderClicked;
	this.SlideFolders=SlideFolders;
	this.ItemClicked=ItemClicked;
	this.ItemSelected=ItemSelected;
	this.OverItems=OverItems;
	this.OutItems=OutItems;
	this.OverArrow=OverArrow;
	this.OutArrow=OutArrow;
	this.ArrowClicked=ArrowClicked;
	this.ArrowSelected=ArrowSelected;
	this.ArrowSlideSpeed=ArrowSlideSpeed;
	this.SlideItems=SlideItems;
	this.SlideItemsAction=SlideItemsAction;
	this.Start=Start;
	this.ClipFolder=ClipFolder;
	this.SetArrows=SetArrows;
	this.HideArrows=HideArrows;
	this.sliding=false;
	this.items=items;
	this.started=false;
	this.Start();
}

function FolderClicked(folder)
{

	if(this.sliding)
		return;
	if(folder==this.currentFolder)
		return;
	this.sliding=true;		
	this.slideCount=this.visibleAreaHeight;
	this.slideStep=1;
	this.countStep=0;
	this.HideArrows();
	this.SlideFolders(folder,document.all["OB_Button"+folder].position=="DOWN");
}

function SlideFolders(folder,down)
{
	var step;	
	if(down)
	{
		this.slideCount-=Math.floor(this.slideStep);
		if(this.slideCount<0)
			this.slideStep+=this.slideCount;
		step=Math.floor(this.slideStep);
		for(var i=2;i<=folder;i++)
			if(document.all["OB_Button"+i].position=="DOWN")
			{
				document.all["OB_Button"+i].style.pixelTop-=step;
				document.all["OB_Folder"+i].style.pixelTop-=step;
			}				

	    filter = /rect\((\d*)px (\d*)px (\d*)px (\d*)px\)/;

		var clipString=document.all["OB_Folder"+folder].style.clip;
		var clip=clipString.match(filter);
		this.ClipFolder(folder,parseInt(clip[1]),this.visibleAreaWidth,(parseInt(clip[3])+step),0);

⌨️ 快捷键说明

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