在SP中点击OK按钮可以自定义一个必须执行的脚步函数
function PreSaveItem()
{
var select = document.getElementById('ctl00_PlaceHolderMain_g_bd8d0ff5_0d1f_40ec_8057_d037295bcd8a_DropDownList1ID0EAAA');
var value = select.value;
if (value == "Destroyed")
{
if(getField('textarea','DestroyedCause').value=='')
{
alert("请输入销毁原因!");
return false;
}
else if(getField('input','DestroyedDate').value=='')
{
alert("请输入销毁日期!");
return false;
}
else
{
return true;
}
}
else
{
if(getField('input','ReInDate').value=='')
{
alert("请输入重入仓日期!");
return false;
}
else
{
return true;
}
}
}
{
var select = document.getElementById('ctl00_PlaceHolderMain_g_bd8d0ff5_0d1f_40ec_8057_d037295bcd8a_DropDownList1ID0EAAA');
var value = select.value;
if (value == "Destroyed")
{
if(getField('textarea','DestroyedCause').value=='')
{
alert("请输入销毁原因!");
return false;
}
else if(getField('input','DestroyedDate').value=='')
{
alert("请输入销毁日期!");
return false;
}
else
{
return true;
}
}
else
{
if(getField('input','ReInDate').value=='')
{
alert("请输入重入仓日期!");
return false;
}
else
{
return true;
}
}
}