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

📄 addorderssuc.jsp

📁 一个汽车售后服务站的典型的进销管理系统,B/S模式的
💻 JSP
📖 第 1 页 / 共 2 页
字号:
    calendar.head.innerText = calendar.today[0]+"-"+calendar.formatTime(calendar.today[1])+"-"+calendar.formatTime(calendar.today[2]);

    calendar.bottom.innerText = calendar.formatTime(calendar.today[3])+":"+calendar.formatTime(calendar.today[4]);

	

    theDate[0]=calendar.today[0]; theDate[1]=calendar.today[1]; theDate[2]=calendar.today[2];

	theDate[3]=calendar.today[3]; theDate[4]=calendar.today[4];

   }

   else{

    var Datereg=/^\d{4}-\d{1,2}-\d{2}$/

    var DateTimereg=/^(\d{1,4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/

    if((!defaultDate.match(Datereg)) && (!defaultDate.match(DateTimereg))){

     alert("默认日期(时间)的格式不正确!\t\n\n默认可接受格式为:\n1、yyyy-mm-dd \n2、yyyy-mm-dd hh:mm\n3、(空)");

	 calendar.setDefaultDate();

     return;

    }

	

	if(defaultDate.match(Datereg)) defaultDate=defaultDate+" "+calendar.today[3]+":"+calendar.today[4];

	var strDateTime=defaultDate.match(DateTimereg);

	var theDate=new Array(4)

	theDate[0]=strDateTime[1];

	theDate[1]=strDateTime[2];

	theDate[2]=strDateTime[3];

	theDate[3]=strDateTime[4];

	theDate[4]=strDateTime[5];

    calendar.head.innerText = theDate[0]+"-"+calendar.formatTime(theDate[1])+"-"+calendar.formatTime(theDate[2]);

    calendar.bottom.innerText = calendar.formatTime(theDate[3])+":"+calendar.formatTime(theDate[4]);

	}

   calendar.currentDate[0]=theDate[0];

   calendar.currentDate[1]=theDate[1];

   calendar.currentDate[2]=theDate[2];

   calendar.currentDate[3]=theDate[3];

   calendar.currentDate[4]=theDate[4];

   

   theFirstDay=calendar.getFirstDay(theDate[0],theDate[1]);

   theMonthLen=theFirstDay+calendar.getMonthLen(theDate[0],theDate[1]);

   //calendar.setEventKey();



   calendar.calendarPad.style.display="";

   var theRows = Math.ceil((theMonthLen)/7);

   //清除旧的日历;

   while (calendar.body.rows.length > 0) {

    calendar.body.deleteRow(0)

   }

   //建立新的日历;

   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>
</head>

<body onLoad="time()">
	<table width="760" height="471" border="0" cellpadding="0"
		cellspacing="0">
		<tr bgcolor="#F4F7FE">
			<td height="18">
				<table width="760" height="17" border="0" cellpadding="0"
					cellspacing="0">
					<tr>
						<td>
							<span class="STYLE4">当前位置:<A
								href="/CarFitManageSystem/carIndex.jsp">主页</A> &gt; <a
								href="ordersManage.jsp">订单管理</a> &gt; <a href="addOrder.jsp">新建订货单</a>
								&gt; 添加成功 </span>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td height="441" valign="top">
				<html:form action="/continueAddOrder.do" onsubmit="return check()">
					<table width="760" height="116" border="0" cellpadding="0"
						cellspacing="0">
						<tr>
							<td height="96">&nbsp;
								
						  </td>
							<td height="96">
								<span class="STYLE4"><a href="ordersManage.jsp">返回</a> </span>
							</td>
							<td height="96" colspan="3">
								<div align="left">
									<span class="STYLE1">&nbsp;&nbsp;&nbsp;添加成功 <span
										class="STYLE4">(根据客户的需求,添加订单 ) </span> </span>
								</div>
							</td>
						</tr>
						<tr>
							<td width="65" height="21" valign="middle">
								<span class="STYLE4">客户名称:</span>
							</td>
							<td width="163" valign="middle">
								<span class="STYLE4">${order.customerNo}</span>
							</td>
							<td width="333" valign="middle">
								<span class="STYLE4"></span>
							</td>
							<td width="31" valign="middle">
								<span class="STYLE4">日期:</span>
							</td>
							<td width="168" valign="bottom">
								<span class="STYLE4"> <input name="txt111" type="text"
										border="0" align="middle" height="2" class="aaa" disabled>
								</span>
							</td>
						</tr>
					</table>
				  <table width="750" border="1" align="left" cellpadding="1"
						cellspacing="0" bordercolor="#DCE7E4">
						<tr>
							<td width="253" height="22">
								<div align="center" class="STYLE4">
									<strong>订购编号</strong>
								</div>
							</td>
							<td width="126">
								<div align="center" class="STYLE4">
									<strong>零件名称</strong>
								</div>
							</td>
							<td width="57">
								<div align="center" class="STYLE4">
									<strong>订购数量</strong>
								</div>
							</td>
							<td width="56">
								<div align="center" class="STYLE4">
									<strong>单&nbsp;&nbsp;&nbsp;价</strong>
								</div>
							</td>
							<td width="112">
								<div align="center" class="STYLE4">
									<strong>要货日期</strong>
								</div>
							</td>
							<td width="120">
								<div align="center" class="STYLE4">
									<strong>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</strong>
								</div>
							</td>
						</tr>
						<tr>
							<td height="76">
								<div align="center" class="STYLE4">
									<span class="STYLE4"><html:text property="accNo"
											value="${order.indexNo}" readonly="true" size="10" /> </span>
								</div>
							</td>
							<td>
								<div align="center" class="STYLE4">
									<span class="STYLE4">
										<html:select property="accNo">
											<html:option value="0">---请选择---</html:option>
											<logic:iterate id="acc" name="accName" scope="session">
												<html:option value="${accessory.accNo}">
													<bean:write name="acc" property="accName" />
												</html:option>
											</logic:iterate>
										</html:select>
									 </span>
								</div>
							</td>
							<td>
								<div align="center" class="STYLE4"></div>
								<span class="STYLE4 STYLE4"> <html:text
										property="orderNum" size="12"></html:text> </span>
							</td>
							<td>
								<div align="center" class="STYLE4">
									<span class="STYLE4"><html:text property="price"
											size="12"></html:text> </span>
								</div>
							</td>
							<td>
								<div align="center" class="STYLE4">
									<span class="STYLE4"> <input type="text"
											name="textfield"
											onFocus="CalendarWebControl.show(this,true,this.value);"
											size="16"> </span>
								</div>
							</td>
							<td>
								<div align="center" class="STYLE4">
									<span class="STYLE4"> <html:text property="remark"
											size="20"></html:text> </span>
								</div>
							</td>
						</tr>
						<tr>
							<td height="71" colspan="3">
								<div align="left" class="STYLE4 STYLE4">
									注: (要货时间,就是客户需要货时间)
								</div>
								<div align="center" class="STYLE4"></div>
								<div align="center">
									<span class="STYLE4"></span>
								</div>
							</td>
							<td colspan="3">
								<div align="center" class="STYLE4 STYLE4">
									<html:submit styleClass="input">继续添加</html:submit>
								</div>
								<div align="center" class="STYLE4"></div>
							</td>
						</tr>
				  </table>
				</html:form>
		  </td>
		</tr>

		<tr>
			<td height="12">
				<p>
					<STRONG><span class="STYLE4"><A
							href="http://www.ccd.com.cn/friendship_link/index.asp">友情链接:
						</A><A href="http://webunion.ccd.com.cn/" target="_blank">中国建筑装饰网站联盟</A>
					</span> </STRONG>
				</p>
		  </td>
		</tr>
  </table>

	<logic:present name="magger" scope="request">
		${magger} 
	</logic:present>
</body>
</html:html>

⌨️ 快捷键说明

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