日期:2014-05-17 浏览次数:20698 次
function skucheck(){
var customerid = document.getElementById("customerid").value.trim();
var sku = document.getElementById("sku").value.trim();
var descr_c = document.getElementById("descr_c").value.trim();
var descr_e = document.getElementById("descr_e").value.trim();
if(customerid == ""){
alert("请输入客户编号!");
document.forms[0].customerid.focus();
}else if(sku == ""){
alert("请输入产品编号!");
document.forms[0].sku.focus();
}else if(descr_c == ""){
alert("请输入产品中文名称!");
document.forms[0].descr_c.focus();
}else if(descr_e == ""){
alert("请输入产品英文名称!");
document.forms[0].descr_c.focus();
}else{
Action_Do('${actionType}','sku');
}
}
function consigneecheck(){
var c_customerid = document.getElementById("c_customerid").value.trim();
var c_sku = document.getElementById("c_sku").value.trim();
var c_consigneeid = document.getElementById("c_consigneeid").value.trim();
if(c_customerid == ''){
alert("请输入客户编号!");
document.getElementById("c_customerid").focus();
}else if(c_sku == ''){
alert("请选择客户类型!");
document.getElementById("c_sku").focus();
}else if(c_consigneeid == ''){
alert("请输入收货人!");
document.getElementById("c_consigneeid").focus();
}else{
Action_Do('${c_actionType}','consignee');
}
}
function Action_Do(state,id){
alert(document.getElementById("baseSKUConsigneeForm").action);
if(id=='sku'){
if(verifyAll(document.forms[0])){
waiteDivMessage.style.visibility="visible";
document.forms[0].submit();
}
}else if(id=='consignee'){
if(verifyAll(document.forms[1])){
waiteDivMessage.style.visibility="visible";
document.forms[1].submit();
}
}
}
<form name="baseSKUForm" action="${ctx}/base/sku.gims?method=${actionType}" method="post" >
<input type="button" name="savesku1" value="保 存" onClick="skucheck();" class="button" disabled="disabled"/>
</form>
<form id="baseSKUConsigneeForm" name="baseSKUConsigneeForm" action="${ctx}/base/skuconsignee.gims?method=${c_actionType}" method="post" >
<input type="button" name="c_save" value="保 存" onClick="consigneecheck();" class="button"/>
</form>