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

📄 quotationlist.jsp

📁 关于网上汽车销售系统的详细编程项目实战实例
💻 JSP
📖 第 1 页 / 共 3 页
字号:
            {
                WebCalendar.thisYear   = new Date().getFullYear();
                WebCalendar.thisMonth  = new Date().getMonth()+ 1;
                WebCalendar.thisDay    = new Date().getDate();
                alert("原文本框里的日期有错误!\n可能与你定义的显示时分秒有冲突!");
                writeCalendar(); return false;
            }
            else
            {
                WebCalendar.thisYear   = parseInt(WebCalendar.dateStyle[1], 10);
                WebCalendar.thisMonth  = parseInt(WebCalendar.dateStyle[3], 10);
                WebCalendar.thisDay    = parseInt(WebCalendar.dateStyle[4], 10);
                WebCalendar.inputDate  = parseInt(WebCalendar.thisDay, 10) +"/"+ parseInt(WebCalendar.thisMonth, 10) +"/"+ 
                parseInt(WebCalendar.thisYear, 10); writeCalendar();
            }
        }  else writeCalendar();
    }  catch(e){writeCalendar();}
}
function funMonthSelect() //月份的下拉框
{
    var m = isNaN(parseInt(WebCalendar.thisMonth, 10)) ? new Date().getMonth() + 1 : parseInt(WebCalendar.thisMonth);
    var e = WebCalendar.iframe.document.forms[0].tmpMonthSelect;
    for (var i=1; i<13; i++) e.options.add(new Option(i +"月", i));
    e.style.display = ""; e.value = m; e.focus(); window.status = e.style.top;
}
function funYearSelect() //年份的下拉框
{
    var n = WebCalendar.yearFall;
    var e = WebCalendar.iframe.document.forms[0].tmpYearSelect;

    var y = isNaN(parseInt(WebCalendar.thisYear, 10)) ? new Date().getFullYear() : parseInt(WebCalendar.thisYear);
        y = (y <= 1000)? 1000 : ((y >= 9999)? 9999 : y);
    var min = (y - n >= 1000) ? y - n : 1000;
    var max = (y + n <= 9999) ? y + n : 9999;
        min = (max == 9999) ? max-n*2 : min;
        max = (min == 1000) ? min+n*2 : max;
    for (var i=min; i<=max; i++) e.options.add(new Option(i +"年", i));
    e.style.display = ""; e.value = y; e.focus();
}
function prevM()  //往前翻月份
{
    WebCalendar.thisDay = 1;
    if (WebCalendar.thisMonth==1)
    {
        WebCalendar.thisYear--;
        WebCalendar.thisMonth=13;
    }
    WebCalendar.thisMonth--; writeCalendar();
}
function nextM()  //往后翻月份
{
    WebCalendar.thisDay = 1;
    if (WebCalendar.thisMonth==12)
    {
        WebCalendar.thisYear++;
        WebCalendar.thisMonth=0;
    }
    WebCalendar.thisMonth++; writeCalendar();
}
function prevY(){WebCalendar.thisDay = 1; WebCalendar.thisYear--; writeCalendar();}//往前翻 Year
function nextY(){WebCalendar.thisDay = 1; WebCalendar.thisYear++; writeCalendar();}//往后翻 Year
function hiddenSelect(e){for(var i=e.options.length; i>-1; i--)e.options.remove(i); e.style.display="none";}
function getObjectById(id){ if(document.all) return(eval("document.all."+ id)); return(eval(id)); }
function hiddenCalendar(){getObjectById("meizzCalendarLayer").style.display = "none";};
function appendZero(n){return(("00"+ n).substr(("00"+ n).length-2));}//日期自动补零程序
function String.prototype.trim(){return this.replace(/(^\s*)|(\s*$)/g,"");}
function dayMouseOver()
{
    this.className = "over";
    this.style.backgroundColor = WebCalendar.darkColor;
    if(WebCalendar.day[this.id.substr(8)].split("/")[1] == WebCalendar.thisMonth)
    this.style.color = WebCalendar.lightColor;
}
function dayMouseOut()
{
    this.className = "out"; var d = WebCalendar.day[this.id.substr(8)], a = d.split("/");
    this.style.removeAttribute('backgroundColor');
    if(a[1] == WebCalendar.thisMonth && d != WebCalendar.today)
    {
        if(WebCalendar.dateStyle && a[0] == parseInt(WebCalendar.dateStyle[4], 10))
        this.style.color = WebCalendar.lightColor;
        this.style.color = WebCalendar.wordColor;
    }
}
function writeCalendar() //对日历显示的数据的处理程序
{
    var y = WebCalendar.thisYear;
    var m = WebCalendar.thisMonth; 
    var d = WebCalendar.thisDay;
    WebCalendar.daysMonth[1] = (0==y%4 && (y%100!=0 || y%400==0)) ? 29 : 28;
    if (!(y<=9999 && y >= 1000 && parseInt(m, 10)>0 && parseInt(m, 10)<13 && parseInt(d, 10)>0)){
        alert("对不起,你输入了错误的日期!");
        WebCalendar.thisYear   = new Date().getFullYear();
        WebCalendar.thisMonth  = new Date().getMonth()+ 1;
        WebCalendar.thisDay    = new Date().getDate(); }
    y = WebCalendar.thisYear;
    m = WebCalendar.thisMonth;
    d = WebCalendar.thisDay;
    WebCalendar.iframe.meizzYearHead.innerText  = y +" 年";
    WebCalendar.iframe.meizzYearMonth.innerText = parseInt(m, 10) +" 月";
    WebCalendar.daysMonth[1] = (0==y%4 && (y%100!=0 || y%400==0)) ? 29 : 28; //闰年二月为29天
    var w = new Date(y, m-1, 1).getDay();
    var prevDays = m==1  ? WebCalendar.daysMonth[11] : WebCalendar.daysMonth[m-2];
    for(var i=(w-1); i>=0; i--) //这三个 for 循环为日历赋数据源(数组 WebCalendar.day)格式是 d/m/yyyy
    {
        WebCalendar.day[i] = prevDays +"/"+ (parseInt(m, 10)-1) +"/"+ y;
        if(m==1) WebCalendar.day[i] = prevDays +"/"+ 12 +"/"+ (parseInt(y, 10)-1);
        prevDays--;
    }
    for(var i=1; i<=WebCalendar.daysMonth[m-1]; i++) WebCalendar.day[i+w-1] = i +"/"+ m +"/"+ y;
    for(var i=1; i<39-w-WebCalendar.daysMonth[m-1]+1; i++)
    {
        WebCalendar.day[WebCalendar.daysMonth[m-1]+w-1+i] = i +"/"+ (parseInt(m, 10)+1) +"/"+ y;
        if(m==12) WebCalendar.day[WebCalendar.daysMonth[m-1]+w-1+i] = i +"/"+ 1 +"/"+ (parseInt(y, 10)+1);
    }
    for(var i=0; i<39; i++)    //这个循环是根据源数组写到日历里显示
    {
        var a = WebCalendar.day[i].split("/");
        WebCalendar.dayObj[i].innerText    = a[0];
        WebCalendar.dayObj[i].title        = a[2] +"-"+ appendZero(a[1]) +"-"+ appendZero(a[0]);
        WebCalendar.dayObj[i].bgColor      = WebCalendar.dayBgColor;
        WebCalendar.dayObj[i].style.color  = WebCalendar.wordColor;
        if ((i<10 && parseInt(WebCalendar.day[i], 10)>20) || (i>27 && parseInt(WebCalendar.day[i], 10)<12))
            WebCalendar.dayObj[i].style.color = WebCalendar.wordDark;
        if (WebCalendar.inputDate==WebCalendar.day[i])    //设置输入框里的日期在日历上的颜色
        {WebCalendar.dayObj[i].bgColor = WebCalendar.darkColor; WebCalendar.dayObj[i].style.color = WebCalendar.lightColor;}
        if (WebCalendar.day[i] == WebCalendar.today)      //设置今天在日历上反应出来的颜色
        {WebCalendar.dayObj[i].bgColor = WebCalendar.todayColor; WebCalendar.dayObj[i].style.color = WebCalendar.lightColor;}
    }
}
function returnDate() //根据日期格式等返回用户选定的日期
{
    if(WebCalendar.objExport)
    {
        var returnValue;
        var a = (arguments.length==0) ? WebCalendar.day[this.id.substr(8)].split("/") : arguments[0].split("/");
        var d = WebCalendar.format.match(/^(\w{4})(-|\/|.|)(\w{1,2})\2(\w{1,2})$/);
        if(d==null){alert("你设定的日期输出格式不对!\r\n\r\n请重新定义 WebCalendar.format !"); return false;}
        var flag = d[3].length==2 || d[4].length==2; //判断返回的日期格式是否要补零
        returnValue = flag ? a[2] +d[2]+ appendZero(a[1]) +d[2]+ appendZero(a[0]) : a[2] +d[2]+ a[1] +d[2]+ a[0];
        if(WebCalendar.timeShow)
        {
            var h = new Date().getHours(), m = new Date().getMinutes(), s = new Date().getSeconds();
            returnValue += flag ? " "+ appendZero(h) +":"+ appendZero(m) +":"+ appendZero(s) : " "+  h  +":"+ m +":"+ s;
        }
        WebCalendar.objExport.value = returnValue;
        hiddenCalendar();
    }
}
function document.onclick()
{
    if(WebCalendar.eventSrc != window.event.srcElement) hiddenCalendar();
}
</script>
  
<body>
 
<table width=100% border=1 cellSpacing=0 cellPadding=2 >

<tr bgColor=#E0F5FE>
    <td> 
         报价日期(起):</td><td><input type="text" name="startTime"  value=""  onfocus="return calendar()"/>
    </td>
    <td> 
         报价日期(止):</td><td><input  type="text" name="endTime"  value=""  onfocus="return calendar()"/>
    </td>
    <td> 
    	客户名称:</td><td><select name="customerName">
    				<option value="">--请选择--</option>
    				<logic:iterate id="k" name="kehu">
    					<option value="${k.cusName }">
    						${k.cusName }
    					</option>
    				</logic:iterate>
    			</select>
    </td>    
    <td>   
          报价单号:</td><td><select name="quotationMainId">
    				<option value="">--请选择--</option>
    				<logic:iterate id="q" name="quotationlist">
    					<option value="${q.quotationCode }">
    						${q.quotationCode }
    					</option>
    				</logic:iterate>
    			</select>
       </td>
</tr>
<tr>  
   <td>   
        货物编码:</td><td><select name="orderCode">
    				<option value="">--请选择--</option>
    				<logic:iterate id="g" name="huowu">
    					<option value="${g.wareCode }">
    						${g.wareCode  }
    					</option>
    				</logic:iterate>
    			</select>
   </td>
   <td>
         销售员:</td><td><select name="personCode">
    				<option value="">--请选择--</option>
    				<logic:iterate id="z" name="persons">
    					<option value="${z.personName }">
    						${z.personName }
    					</option>
    				</logic:iterate>
    			</select>
   </td>
   <td >
        销售类型:</td><td colspan="3">
         <select name="sellType">
          
          <option value="">--请选择--</option>
    			<logic:iterate id="s" name="type">
    		    <option value="${s.state }">
    		    ${s.state }
    		    </option>
    		</logic:iterate>
           	
	    	
	    	
         </select>
      
   </td>
</tr>
<tr>
     <td> 
     		<input type="checkbox"  name="channe1" value="转订单">转订单
     </td>
     <td>
     	 	<input type="checkbox"  name="channe1" value="转合同">转合同
     </td>
     <td>
      		<input type="checkbox"  name="channe1" value="转订单、合同">转订单、合同
     </td>
     <td colspan="5"> 
     		<input type="checkbox"  name="channe1" value="作废">作废
     </td>
</tr>
<tr>
	<td >
			<input type="checkbox"  name="channe1" value="全部">全部
    </td>
    <td> 
    	    <input type="checkbox"  name="channe2" value="已审核">已审核
    </td>
    <td>  
            <input type="checkbox"  name="channe2" value="未审核">未审核
    </td>
    <td colspan="5">
    		<input type="checkbox"  name="channe2" value="全部">全部
    </td>
</tr>
<tr>
	<td>  
			<html:submit value="提交"></html:submit>
	</td>
    
    <td colspan="7"> 
    		<html:reset value="取消"></html:reset>
    </td>
</tr>
</table>



       <br><hr size="2"><br>
       
<table width=100% border=1 cellSpacing=0 cellPadding=2 id="PowerTable" >
    		<tr align="center"  bgColor=#E0F5FE>
    			
    			<td width="10" align="center">报价单号</td>
    			<td width="10" align="center">报价日期</td>
    			<td width="10" align="center">客户名称</td>
    			<td width="10" align="center">部门名称</td>
    			<td width="10" align="center">销售员</td>
    			<td width="10" align="center">销售类型</td>
    			<td width="10" align="center">货物名称</td>
    			<td width="10" align="center">数量</td>
    			<td width="10" align="center">参考售价</td>

    			<td width="10" align="center">价税金额</td>
    			<td width="10" align="center">税额</td>
    			<td width="10" align="center">预发货日期</td>
    			<td width="10" align="center">联系人</td>
    			<td width="10" align="center">联系方式</td>
    			
    		</tr>
    		<logic:iterate id="q" name="quotation">
    		
    		      <tr>
    		        <td >${q.quotationCode }</td>
	    			<td ></td>
	    			
	    			<td> ${k.cusName }</td>

	    			<td >${bm.deptName }</td>
	    			<td >${z.personName }</td>
	    			<td >${s.state }</td>
	    			<td >${g.wareName }</td>
	    			<td >${q.quantity }</td>
	    			<td >${q.consultCost }</td>
	    			
	    			<td >${q.taxMoney }</td>
	    			<td >${q.taxMoney }</td>
	    			<td ></td>
	    			<td></td>
	    			<td ></td>
	    			
    		       
	    			</tr>

	    	</logic:iterate>
	    	
</table>
   		<br>
   		    ${page.pagestr}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			Move: 
			<input type=button id=move value=Up    onclick=Move_up(Main_Tab)>
			<input type=button id=move value=Down  onclick=Move_down(Main_Tab)>
			<input type=button id=move value=Left  onclick=Move_left(Main_Tab)>
			<input type=button id=move value=Right onclick=Move_right(Main_Tab)>

</body>
 
</html:html>

⌨️ 快捷键说明

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