📄 purchaseorderquery.aspx
字号:
</html>
<script language=javascript type="text/javascript">
<!-- to hide script contents from old browsers
var startDate;
var endDate;
var callbacks = 0;
function resetDates() {
startDate = endDate = null;
}
/*
* Given two dates (in seconds) find out if date1 is bigger, date2 is bigger or
* they're the same, taking only the dates, not the time into account.
* In other words, different times on the same date returns equal.
* returns -1 for date1 bigger, 1 for date2 is bigger 0 for equal
*/
function compareDatesOnly(date1, date2) {
var year1 = date1.getYear();
var year2 = date2.getYear();
var month1 = date1.getMonth();
var month2 = date2.getMonth();
var day1 = date1.getDate();
var day2 = date2.getDate();
if (year1 > year2) {
return -1;
}
if (year2 > year1) {
return 1;
}
//years are equal
if (month1 > month2) {
return -1;
}
if (month2 > month1) {
return 1;
}
//years and months are equal
if (day1 > day2) {
return -1;
}
if (day2 > day1) {
return 1;
}
//days are equal
return 0;
/* Can't do this because of timezone issues
var days1 = Math.floor(date1.getTime()/Date.DAY);
var days2 = Math.floor(date2.getTime()/Date.DAY);
return (days1 - days2);
*/
}
function filterDates1(cal) {
startDate = cal.date;
/* If they haven't chosen an
end date before we'll set it to the same date as the start date This
way if the user scrolls in the start date 5 months forward, they don't
need to do it again for the end date.
*/
if (endDate == null) {
}
}
function filterDates2(cal) {
endDate = cal.date;
}
/*
* Both functions disable and hilight dates.
*/
/*
* Can't choose days after the
* end date if it is choosen, hilights start and end dates with one style and dates between them with another
*/
function dateInRange1(date) {
if (endDate != null) {
// Disable dates after end date
var compareEnd = compareDatesOnly(date, endDate);
//if (compareEnd < 0) {
// return (true);
//}
// Hilight end date with "edges" style
if (compareEnd == 0) {
{return "edges";}
}
// Hilight inner dates with "between" style
if (startDate != null){
var compareStart = compareDatesOnly(date, startDate);
if (compareStart < 0) {
return "between";
}
}
}
//disable days prior to today
var today = new Date();
var compareToday = compareDatesOnly(date, today);
//if (compareToday > 0) {
//return(true);
//}
//all other days are enabled
return false;
//alert(ret + " " + today + ":" + date + ":" + compareToday + ":" + days1 + ":" + days2);
return(ret);
}
/*
* Can't choose days before the
* start date if it is choosen, hilights start and end dates with one style and dates between them with another
*/
function dateInRange2(date) {
if (startDate != null) {
// Disable dates before start date
var compareDays = compareDatesOnly(startDate, date);
//if (compareDays < 0) {
// return (true);
//}
// Hilight end date with "edges" style
if (compareDays == 0) {
{return "edges";}
}
// Hilight inner dates with "between" style
if ((endDate != null) && (date > startDate) && (date < endDate)) {
return "between";
}
}
var now = new Date();
return false;
if (compareDatesOnly(now, date) < 0) {
return (true);
}
//all other days are enabled
return false;
}
// end hiding contents from old browsers -->
</script>
<script type="text/javascript" language=javascript>
var cal = new Zapatec.Calendar.setup({
inputField : "txtPOBeginDate", // id of the input field
button : "Reset3", // What will trigger the popup of the calendar
ifFormat : "%Y-%m-%d ", // of the input field
timeFormat : "24",
showsTime : false, //no time
electric : false,
dateStatusFunc : dateInRange1, //the function to call
onUpdate : filterDates1
});
var cal = new Zapatec.Calendar.setup({
inputField : "txtPOEndDate", // id of the input field
button : "Reset4", // What will trigger the popup of the calendar
ifFormat : "%Y-%m-%d ", // of the input field
timeFormat : "24",
showsTime : false, //no time
electric : false,
dateStatusFunc : dateInRange1, //the function to call
onUpdate : filterDates1
});
var cal = new Zapatec.Calendar.setup({
inputField : "txtExpectDate1", // id of the input field
button : "Reset5", // What will trigger the popup of the calendar
ifFormat : "%Y-%m-%d ", // of the input field
timeFormat : "24",
showsTime : false, //no time
electric : false,
dateStatusFunc : dateInRange1, //the function to call
onUpdate : filterDates1
});
var cal = new Zapatec.Calendar.setup({
inputField : "txtExpectDate2", // id of the input field
button : "Reset6", // What will trigger the popup of the calendar
ifFormat : "%Y-%m-%d ", // of the input field
timeFormat : "24",
showsTime : false, //no time
electric : false,
dateStatusFunc : dateInRange1, //the function to call
onUpdate : filterDates1
});
</script>
<script langauge=javascript>
function showList(objTr)
{
//document.all("divClientList").style.display="none";
//document.all("frmClient").src="PurchaseOrderReport.aspx?poid="+objTr.cells[0].outerText+"&pop=1&supplier="+objTr.cells[2].outerText;
document.all("frmClient").src="NewPOReport.aspx?poid="+objTr.cells[0].outerText+"&pop=1&supplier="+objTr.cells[2].outerText;
showDiv(document.all("divClientList"));
}
// function showSupplierList()
// {
// document.all("divStuffList").style.display="none";
// showDiv(document.all("divClientList"));
// }
</script>
<script language=vbscript>
titleResize
document.all("txtPurchaseDate").value=date()
function CompareDate(b,e)
CompareDate=datevalue(e)<datevalue(b)
end function
'剪切函数
function vbTrim(str)
vbTrim=trim(str)
end function
sub validate(byval retValue,byref isAvailable,byref msg)
tmp=split(retValue,"|")
isAvailable=tmp(0)
msg=tmp(1)
end sub
' VBScript 文件
dim spanLeft,spanTop,moveTD,tdField
spanLeft=0:spantop=0
'dim tableStr
'tablestr="<table STYLE='table-layout: fixed' border=0 height=100% cellpadding=0 cellspacing=0><tr><td class=td2 >title2</td><td class=td2 noWrap style='height:19;width:3' onmouseover=""vbs:me.style.cursor='E-resize'"" onmousedown=""vbs:tz me""><img style='LEFT: 0px; POSITION: relative' height=100% src='a/.gif' width=3 title='调整表格宽度' ></td></tr></table>"
sub tz(objTD)
'msgbox objTD.outerHTML
'exit sub
set objTD=objTD.parentElement.Cells(0)
dim objElement
dim Totaloffset:Totaloffset=0
set objElement=objTD.parentElement
do while objElement.tagName<>"BODY"
Totaloffset=Totaloffset+objElement.offsetLeft
set objElement=objElement.parentElement
Loop
span2.style.pixelLeft= objTD.offsetLeft+Totaloffset-span1.scrollLeft-span1.parentElement.offsetLeft-4
span2.style.pixeltop=objTD.offsetTop+document.all("span1").offsetTop
span2.style.pixelwidth=objTD.parentElement.Cells(1).offsetLeft-objTD.parentElement.Cells(0).offsetLeft+6
span2.style.pixelheight=span1.clientHeight
span2.style.display="inline"
span2.setCapture
set moveTD=objTD
tdField=objTD.parentElement.parentElement.parentElement.parentElement.cellindex
end sub
sub retPosition()
spanleft=1
spantop=2
end sub
sub M_Move()
Dim PixelLeft,tempwidth
PixelLeft=TotalOffsetLeft(moveTD)
tempwidth=window.event.clientX-pixelLeft+span1.scrollLeft+span1.parentElement.offsetLeft
if tempwidth<5 then tempwidth=5
span2.style.pixelwidth=tempwidth
'window.status=window.event.clientX-pixelLeft
end sub
sub M_up
span2.releaseCapture
for dcc_i=0 to tb1.rows.length-1
tb1.rows(dcc_i).cells(tdField).style.pixelwidth=span2.style.pixelwidth
tb1.rows(dcc_i).cells(tdField).style.height="22px"
tb1.rows(dcc_i).cells(tdField).style.whiteSpace="nowrap"
tb1.rows(dcc_i).cells(tdField).style.wordBreak="break-All"
tb1.rows(dcc_i).cells(tdField).style.textOverflow="ellipsis"
tb1.rows(dcc_i).cells(tdField).style.wordWrap="break-word"
next
'msgbox tb1.rows(0).cells(tdField).childNodes(0).outerHTML
'tb1.rows(0).cells(tdField).innerHTML=""
'tb1.rows(0).cells(tdField).innerHTML=tablestr
span2.style.display="none"
titleResize
end sub
Function TotalOffsetLeft(byval obj)
Dim Templeft,tempobj
tempLeft=0
set tempobj=moveTD
do while tempobj.tagName<>"BODY"
TempLeft=TempLeft+tempobj.offsetLeft
set tempobj=tempobj.parentElement
loop
set tempobj=nothing
TotalOffsetLeft=templeft
end function
sub titleResize
span3.innerHTML="<table border=0 cellspacing=0 cellpadding=0 id='tb2' STYLE='table-layout: fixed;border-left:buttonface 1px solid;'>" & tb1.rows(0).outerHTML & "</table>"
HScroll
end sub
sub HScroll
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -