📄 chaxun.jsp
字号:
<%@ page contentType="text/html; charset=gbk" language="java" %>
<%@ page import="mediastore.web.global.*"%>
<%@ page import="mediastore.web.form.*"%>
<%@ page import="mediastore.rule.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<body onload="document.form1.goodsid.focus()">
<script language="JavaScript">
function Calendar_createtime1()
{
var newWindow;
var urlstring = './html/Calendar_createtime1.htm'
newWindow = window.open(urlstring,'','height=200,width=280,toolbar=no,minimize=no,status=no,memubar=no,location=no,scrollbars=no')
}
function Calendar_createtime2()
{
var newWindow;
var urlstring = './html/Calendar_createtime2.htm'
newWindow = window.open(urlstring,'','height=200,width=280,toolbar=no,minimize=no,status=no,memubar=no,location=no,scrollbars=no')
}
function isLeapYear(year)
{
if((Number(year)%4==0&&Number(year)%100!=0)||(Number(year)%400==0))
{
return true;
}
return false;
}
function Trim(str){
if(str.charAt(0) == " "){
str = str.slice(1);
str = Trim(str);
}
return str;
}
//校验,看输入对象的值是否为有效日期yyyy-mm-dd hh:mm:ss
function isDateChen(checktext){
var datetime;
var year,month,day,hour,mini,senc;
var gone,gtwo,gthree,gfour,gfive;
if(Trim(checktext.value)!=""){
datetime = Trim(checktext.value);
if(datetime.length==19){
year=datetime.substring(0,4);
if(isNaN(year)==true){
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
gone=datetime.substring(4,5);
month=datetime.substring(5,7);
if(isNaN(month)==true){
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
gtwo=datetime.substring(7,8);
day=datetime.substring(8,10);
if(isNaN(day)==true){
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
gthree=datetime.substring(10,11);
firstm = datetime.indexOf(":");//第一个冒号的位置
//alert("firstm:"+firstm);
hour=datetime.substring(11,firstm);
if(isNaN(hour)==true){
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
gfour=datetime.substring(firstm,firstm+1);
//alert(datetime.length);
tempstr = datetime.substring(firstm+1,datetime.length);
secondm = tempstr.indexOf(":");//第二个冒号的位置
mini=tempstr.substring(0,secondm);
if(isNaN(mini)==true){
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
gfive=tempstr.substring(secondm,secondm+1);
senc=tempstr.substring(secondm+1,tempstr.length);
if(isNaN(senc)==true){
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
//alert(year+gone+month+gtwo+day+gthree+hour+gfour+mini+gfive+senc)
if((gone=="-")&&(gtwo=="-")){
if( Number(month)<1 || Number(month)>12 ) {
alert("月份必须在01和12之间!");
checktext.focus();
return false;
}
if(Number(day)<1 || Number(day)>31){
alert("日期必须在01和31之间!");
checktext.focus();
return false;
}else{
if(Number(month)==2){
if(isLeapYear(year)&& Number(day)>29){
alert("2月份日期必须在01到29之间");
checktext.focus();
return false;
}
if(!isLeapYear(year)&& Number(day)>28){
alert("2月份日期必须在01到28之间");
checktext.focus();
return false;
}
}
if((Number(month)==4||Number(month)==6||Number(month)==9||Number(month)==11)&&(Number(day)>30)){
alert("在4、6、9和11月份\n日期必须在01到30之间");
checktext.focus();
return false;
}
}
}else{
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
}else{
alert("时间格式不正确\n形如:yyyy-mm-dd hh:mm:ss\n例:2001-02-23 02:56:12");
checktext.focus();
return false;
}
}else{
return true;
}
return true;
}
function mySubmit1(){
if(!isDateChen(document.form1.createtime1))
{//检查输入的时间是否合法
}
else if(!isDateChen(document.form1.createtime2))
{//检查输入的时间是否合法
}
else
{
document.form1.start_rec_num.value = '1';
document.form1.action="exportItemSearch.do";
document.form1.submit();
}
}
function gotoPage(){
//该值为要条转到的页面的起始记录号
//alert(document.all.gotopagenum.value);
document.form2.start_rec_num.value = document.all.gotopagenum.value;
document.form2.action="exportItemSearch.do";
document.form2.submit();
}
function gotoPageByN(n){
document.form2.start_rec_num.value = n;
document.form2.action="exportItemSearch.do";
document.form2.submit();
}
function deleteAExportItem(currec, billid, goodsid)
{
if(confirm("该操作只删除售货明细信息,不影响售货单和库存信息\r\n确定要删除该售货明细信息吗?"))
{
document.form2.start_rec_num.value = currec;
document.form2.action = "exportItemDelete.do?deletebillid="+billid+"&deletegoodsid="+goodsid+"&";
document.form2.submit();
}
}
function reimportGoodsForItem(currec, billid, goodsid)
{
if(confirm("该操作将删除售货明细信息,并调整售货单和库存信息\r\n确定要取消该售货明细信息吗?"))
{
document.form2.start_rec_num.value = currec;
document.form2.action = "exportItemCancel.do?cancelbillid="+billid+"&cancelgoodsid="+goodsid+"&";
document.form2.submit();
}
}
function submitTempExportBill(currec, billid)
{
if(confirm("该确认操作将确认提交整张临时售货单\r\n确定要提交该单所有售货明细信息吗?"))
{
document.form2.start_rec_num.value = currec;
document.form2.action = "exportItemSubmitTemp.do?submitbillid="+billid;
document.form2.submit();
}
}
</script>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" rowspan="4" class="trtable"></td>
<td width="6" bgcolor="#214984" height="1"></td>
<td rowspan="4" bgcolor="#214984" width="1" height="1"></td>
<td bgcolor="#214984" class="10p" colspan="2" height="1"></td>
<td rowspan="4" width="1" bgcolor="#214984" height="1"></td>
<td bgcolor="#214984" width="5" height="1"></td>
<td width="5" rowspan="4" class="trtable"></td>
</tr>
<tr>
<td width="6"></td>
<td width="379" height="20" class="mainhead">书目查询</td>
<td class="mainhead" width="379" height="20"> </td>
<td width="5"></td>
</tr>
<tr>
<td width="6"></td>
<td valign="top" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="300" align="center" valign="top">
<%////
//---从页面对象中获取数据---
ExportItemSearchConFB eiscfb = (ExportItemSearchConFB)request.getAttribute(Globals.REQUEST_EXPORTITEMSEARCHCON);
List billIdList = eiscfb.getBillIdList();
List salesPersonList = eiscfb.getSalesPersonList();
int curStartRecNum = eiscfb.getStartRecNum(); //当前起始记录号
int curPageRecNum = eiscfb.getPageRecNum(); //页记录数
ExportItemSearchResultInfo eisri = eiscfb.getEisri(); //检索结果可能为空
ExportItemSearchRule eisr = eiscfb.getEisr(); //检索式可能为空
float totalProfit = eiscfb.getTotalProfit();
//-------
//组织与页、记录相关的信息
List exportItemList = new ArrayList();
int totalItemNum = 0;
int totalAmount = 0; //销售总量
if(eisri != null)
{
totalItemNum = eisri.getTotalRecNum(); //总记录数
exportItemList = eisri.getExportItemList();
totalAmount = eisri.getTotalAmount();
}
int curPageIndex = curStartRecNum/curPageRecNum+1; //当前页号
int totalPageNum = 0; //总页数
if(totalItemNum%curPageRecNum==0)
{
totalPageNum = totalItemNum/curPageRecNum;
}else{
totalPageNum = totalItemNum/curPageRecNum+1;
}
int lastPageFirstRecNum = 0; //最后一页的首记录号
if(totalItemNum%curPageRecNum==0)
{
lastPageFirstRecNum = (totalItemNum/curPageRecNum-1)*(curPageRecNum)+1;
}else{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -