📄 emk_shop.js
字号:
/**
* ??????????????????????
*/
function ifChange(obj, hidobj, button) {
var hid_value = document.all(hidobj).value;
alert(hid_value);
if(document.all(button).disabled == true){
if(obj != hid_value){
document.all(button).disabled=false;
}else{
document.all(button).disabled=true;
}
//document.all(hidobj).value = obj;
}
}
/**
* 先对到账金额进行判断是否小于订单金额,再进行其他处理
*/
function disablOrderSub(){
var orderChkNo = document.all.orderChkNo.value;
var hidorderChkNo=document.all.hidorderChkNo.value;
var orderSAmtStr=document.all.orderSAmtStr.value;
var hidorderSAmtStr=document.all.hidorderSAmtStr.value;
var orderSDate=document.all.orderSDate.value;
var hidorderSDate=document.all.hidorderSDate.value;
var settlementID=document.all.settlementID.value;
var hidsettlementID=document.all.hidsettlementID.value;
var orderState0=document.all.orderState0.checked;
var hidorderState0=document.all.hidorderState0.value;
var orderState1=document.all.orderState1.checked ;
var hidorderState1=document.all.hidorderState1.value;
var orderState2=document.all.orderState2.checked ;
var hidorderState2=document.all.hidorderState2.value;
var orderDesc=document.all.orderDesc.value;
var hidorderDesc=document.all.hidorderDesc.value;
var amt=document.all.orderAmt.innerHTML;
var changed = false;
if(orderState0){
if(hidorderState0) {changed=false;}
else {changed=true; }
}else{
if(hidorderState0) {changed=true; }
else{changed=false; }
}
if(!changed){
if(orderState1){
if(hidorderState1) {changed=false;}
else {changed=true;}
}else{
if(hidorderState1==true) {changed=true;}
else{changed=false;}
}
}
if(!changed){
if(orderState2){
if(hidorderState2) {changed=false;}
else{changed=true; }
}else{
if(hidorderState2==false) {changed=true;}
else{changed=false; }
}
}
if(orderChkNo != hidorderChkNo){
document.all.submit1.disabled=false;
}else if(orderSAmtStr != hidorderSAmtStr){
document.all.submit1.disabled=false;
}else if(orderSDate != hidorderSDate){
document.all.submit1.disabled=false;
}else if(settlementID != hidsettlementID){
document.all.submit1.disabled=false;
}else if(changed){
document.all.submit1.disabled=false;
}else if(orderDesc != hidorderDesc){
document.all.submit1.disabled=false;
}else{
//if(orderSAmtStr < amt){
// alert("到账金额不能小于订单金额!");
// document.all.submit1.disabled=true;
// return;
//}
//if(isNaN(orderSAmtStr)==true){
// alert("到账金额必须输入数字!");
// document.all.submit1.disabled=true;
// return;
//}else{
document.all.submit1.disabled=true;
//}
}
}
/**
* 发票管理
*/
function disablInvoiceSub(){
var invoiceNo=document.all.invoiceNo.value;
var hidinvoiceNo=document.all.hidinvoiceNo.value
var orderDesc=document.all.orderDesc.value;
var hidorderDesc=document.all.hidorderDesc.value;
var invoiceType=document.all.invoiceType.value;
var hidinvoiceType=document.all.hidinvoiceType.value;
if(invoiceNo != hidinvoiceNo){
document.all.submit1.disabled=false;
}else if(orderDesc != hidorderDesc){
document.all.submit1.disabled=false;
} else if(invoiceType != hidinvoiceType){
document.all.submit1.disabled=false;
}else{
document.all.submit1.disabled=true;
}
}
function disablSub(type){
if(type == "order"){
disablOrderSub();
}
if(type=="invoice"){
disablInvoiceSub();
}
}
function isDateString(sDate)
{
var iaMonthDays = [31,28,31,30,31,30,31,31,30,31,30,31]
var iaDate = new Array(3)
var year, month, day
if (arguments.length != 1) return false
iaDate = sDate.toString().split("-")
if (iaDate.length != 3) return false
if (iaDate[1].length > 2 || iaDate[2].length > 2) return false
year = parseFloat(iaDate[0])
month = parseFloat(iaDate[1])
day=parseFloat(iaDate[2])
if (year < 1900 || year > 2100) return false
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) iaMonthDays[1]=29;
if (month < 1 || month > 12) return false
if (day < 1 || day > iaMonthDays[month - 1]) return false
return true
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -