📄 dc2203.jsp
字号:
}
//建立新的日历;
var n=0;day=0;
for(i=0;i<theRows;i++){
theRow=calendar.body.insertRow(i);
for(j=0;j<7;j++){
n++;
if(n>theFirstDay && n<=theMonthLen){
day=n-theFirstDay;
calendar.insertBodyCell(theRow,j,day);
}
else{
var theCell=theRow.insertCell(j);
theCell.style.cssText="background-color:#F0F0F0;cursor:default;";
}
}
}
//****************调整日历位置**************//
var offsetPos=calendar.getAbsolutePos(calendar.source);//计算对象的位置;
if((document.body.offsetHeight-(offsetPos.y+calendar.source.offsetHeight-document.body.scrollTop))<calendar.calendarPad.style.pixelHeight){
var calTop=offsetPos.y-calendar.calendarPad.style.pixelHeight;
}
else{
var calTop=offsetPos.y+calendar.source.offsetHeight;
}
if((document.body.offsetWidth-(offsetPos.x+calendar.source.offsetWidth-document.body.scrollLeft))>calendar.calendarPad.style.pixelWidth){
var calLeft=offsetPos.x;
}
else{
var calLeft=calendar.source.offsetLeft+calendar.source.offsetWidth;
}
//alert(offsetPos.x);
calendar.calendarPad.style.pixelLeft=calLeft;
calendar.calendarPad.style.pixelTop=calTop;
}
/****************** 计算对象的位置 *************************/
this.getAbsolutePos = function(el) {
var r = { x: el.offsetLeft, y: el.offsetTop };
if (el.offsetParent) {
var tmp = calendar.getAbsolutePos(el.offsetParent);
r.x += tmp.x;
r.y += tmp.y;
}
return r;
};
//************* 插入日期单元格 **************/
this.insertBodyCell=function(theRow,j,day,targetObject){
var theCell=theRow.insertCell(j);
if(j==0) var theBgColor="#FF9999";
else var theBgColor="#FFFFFF";
if(day==calendar.currentDate[2]) var theBgColor="#CCCCCC";
if(day==calendar.today[2]) var theBgColor="#99FFCC";
theCell.bgColor=theBgColor;
theCell.innerText=day;
theCell.align="center";
theCell.width=35;
theCell.style.cssText="border:1 solid #CCCCCC;cursor:hand;";
theCell.onmouseover=function(){
theCell.bgColor="#FFFFCC";
theCell.style.cssText="border:1 outset;cursor:hand;";
}
theCell.onmouseout=function(){
theCell.bgColor=theBgColor;
theCell.style.cssText="border:1 solid #CCCCCC;cursor:hand;";
}
theCell.onmousedown=function(){
theCell.bgColor="#FFFFCC";
theCell.style.cssText="border:1 inset;cursor:hand;";
}
theCell.onclick=function(){
if(calendar.returnTime)
calendar.sltDate=calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(day)+" "+calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4])
else
calendar.sltDate=calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(day);
calendar.target.value=calendar.sltDate;
calendar.hide();
}
}
/************** 取得月份的第一天为星期几 *********************/
this.getFirstDay=function(theYear, theMonth){
var firstDate = new Date(theYear,theMonth-1,1);
return firstDate.getDay();
}
/************** 取得月份共有几天 *********************/
this.getMonthLen=function(theYear, theMonth) {
theMonth--;
var oneDay = 1000 * 60 * 60 * 24;
var thisMonth = new Date(theYear, theMonth, 1);
var nextMonth = new Date(theYear, theMonth + 1, 1);
var len = Math.ceil((nextMonth.getTime() - thisMonth.getTime())/oneDay);
return len;
}
/************** 隐藏日历 *********************/
this.hide=function(){
//calendar.clearEventKey();
calendar.calendarPad.style.display="none";
}
/************** 从这里开始 *********************/
this.setup=function(defaultDate){
calendar.addCalendarPad();
calendar.addCalendarBoard();
calendar.setDefaultDate();
}
/************** 格式化时间 *********************/
this.formatTime = function(str) {
str = ("00"+str);
return str.substr(str.length-2);
}
/************** 关于AgetimeCalendar *********************/
this.about=function(){
var strAbout = "\nWeb 日历选择输入控件操作说明:\n\n";
strAbout+="-\t: 关于\n";
strAbout+="x\t: 隐藏\n";
strAbout+="<<\t: 上一年\n";
strAbout+="<\t: 上一月\n";
strAbout+="今日\t: 返回当天日期\n";
strAbout+=">\t: 下一月\n";
strAbout+="<<\t: 下一年\n";
strAbout+="\nWeb日历选择输入控件\tVer:v1.0\t\nDesigned By:wxb \t\t2004.11.22\t\n";
alert(strAbout);
}
document.onkeydown=function(){
if(calendar.calendarPad.style.display=="none"){
window.event.returnValue= true;
return true ;
}
switch(window.event.keyCode){
case 27 : calendar.hide(); break; //ESC
case 37 : calendar.prevMonth.onmousedown(); break;//←
case 38 : calendar.prevYear.onmousedown();break; //↑
case 39 : calendar.nextMonth.onmousedown(); break;//→
case 40 : calendar.nextYear.onmousedown(); break;//↓
case 84 : calendar.goToday.onclick(); break;//T
case 88 : calendar.hide(); break; //X
case 72 : calendar.about(); break; //H
case 36 : calendar.prevHours.onmousedown(); break;//Home
case 35 : calendar.nextHours.onmousedown(); break;//End
case 33 : calendar.prevMinutes.onmousedown();break; //PageUp
case 34 : calendar.nextMinutes.onmousedown(); break;//PageDown
}
window.event.keyCode = 0;
window.event.returnValue= false;
}
calendar.setup();
}
var CalendarWebControl = new atCalendarControl();
</script>
<body style="margin:0px;">
<form action="/Cost/DC2203E1S.do" method="POST">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="tr_title4" > </td>
</tr>
<tr>
<td colspan="2">
<table width="70%" height="410" border="0" align="center" cellpadding="4" cellspacing="1" class="title_box_line">
<tr>
<td height="37" colspan="6" align="right" class="title_tr"><div align="center" class="word_blue2 STYLE1">填写订舱委托</div></td>
</tr>
<tr>
<td width="17%" align="right" class="title_tr">编号:</td>
<td width="19%" align="right" class="content_tr"><div align="left"><input type="hidden" name="id" value="<bean:write name="book" property="id"></bean:write>"><bean:write name="book" property="id"></bean:write></div></td>
<td width="30%" height="25" align="right" class="title_tr"> </td>
<td width="34%" colspan="3" class="content_tr"> </td>
</tr>
<tr>
<td align="right" class="title_tr">发货人:</td>
<td align="right" class="content_tr"><div align="left"><span class="content_tr"><bean:write name="book" property="sendperon"></bean:write></span></div></td>
<td height="24" align="right" class="title_tr">收货人:</td>
<td colspan="3" class="content_tr"><label for="textfield"><bean:write name="book" property="receperson"></bean:write></label></td>
</tr>
<tr>
<td align="right" class="title_tr">通知人: </td>
<td align="right" class="content_tr"><div align="left"><span class="content1"><bean:write name="book" property="notifyperson"></bean:write></span></div></td>
<td align="right" class="title_tr">货物种类:</td>
<td class="content_tr"><label for="label"><bean:write name="book" property="type"></bean:write></label></td>
</tr>
<tr>
<td align="right" class="title_tr">尺 码:</td>
<td align="right" class="content_tr"><div align="left"><bean:write name="book" property="size"></bean:write></div></td>
<td align="right" class="title_tr">运货量:</td>
<td class="content_tr"><label for="label2"><bean:write name="book" property="weight"></bean:write></label></td>
</tr>
<tr>
<td align="right" class="title_tr">收货地点:</td>
<td align="right" class="content_tr"><div align="left"><bean:write name="book" property="receplace"></bean:write></div></td>
<td align="right" class="title_tr">交货地点:</td>
<td colspan="3" class="content_tr"><label for="label3"><bean:write name="book" property="deliplace"></bean:write></label></td>
</tr>
<tr>
<td height="21" colspan="2" align="right" class="title_tr">船代公司编号:</td>
<td colspan="4" align="right" class="content_tr"><label for="textfield"></label>
<label for="label7">
<div align="left">
<bean:write name="book" property="shipcno"></bean:write>
</div>
</label> </td>
</tr>
<tr>
<td height="24" colspan="2" align="right" class="title_tr"><span class="title_tr">船公司:</span></td>
<td colspan="4" align="right" class="content_tr"><label for="label8">
<div align="left">
<bean:write name="book" property="shipcname"></bean:write>
</div>
</label> </td>
</tr>
<tr>
<td colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">船名:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><label for="label9">
<div align="left">
<bean:write name="book" property="shipname"></bean:write>
</div>
</label></td>
</tr>
<tr>
<td colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">船次:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><label for="textfield">
<div align="left">
<bean:write name="book" property="voyno"></bean:write>
</div>
</label></td>
</tr>
<tr>
<td colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">船期:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><div align="left">
<bean:write name="book" property="voytime"></bean:write>
</div></td>
</tr>
<tr>
<td colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">集装箱号:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><label for="label">
<div align="left">
<input type="text" name="boxid">
</div>
</label></td>
</tr>
<tr>
<td colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">集装箱量:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><label for="label2"></label>
<div align="left">
<input type="text" name="boxweight">
</div></td>
</tr>
<tr>
<td height="21" colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">起运港:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><label for="label3">
<div align="left">
<input type="text" name="startport">
</div>
</label></td>
</tr>
<tr>
<td height="25" colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">目的港:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><label for="label4">
<div align="left">
<input type="text" name="aimport">
</div>
</label></td>
</tr>
<tr>
<td height="25" colspan="2" align="right" valign="top" class="title_tr"><span class="title_tr">应付费用:</span></td>
<td colspan="4" align="right" valign="top" class="content_tr"><label for="label5"></label>
<label for="label10">
<div align="left">
<input type="text" name="payrate">
</div>
</label></td>
</tr>
</table>
</td>
<tr>
<td colspan="2" class="content_tr">
<div align="center">
<input name="Submit12" type="button" class="title_tr" id="Submit1" title="SAVE" value="返回" onClick="history.back();">
<input name="Submit1" type="submit" class="title_tr" id="Submit16" title="SAVE" value="保存">
<input name="reset1" type="reset" class="title_tr" id="reset15" title="Reset" value="重置">
</div></td>
</tr>
<tr>
<td colspan="2" class="tr_title4"> </td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -