You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

128 lines
4.5 KiB

var showInfo;
var turnPage = new turnPageClass();
var tSQLInfo = new SqlClass();
/**
* 保存
*/
function saveClick() {
if(fm.all('BussNo').value==null || trim(fm.all('BussNo').value)=="")
{
i18nAlert("请输入单证号码!","");
return false;
}
if(fm.all('BussType').value==null || trim(fm.all('BussType').value)=="")
{
i18nAlert("请输入业务类型!","");
return false;
}
if(fm.all('SubType').value==null || trim(fm.all('SubType').value)=="")
{
i18nAlert("请输入单证类型!","");
return false;
}
if(fm.all('IssueDesc').value==null || trim(fm.all('IssueDesc').value)=="")
{
i18nAlert("请输入问题描述内容!","");
return false;
}
var bussno = fm.BussNo.value ;
var SubType = fm.SubType.value;
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_pa");
tSQLInfo.setResourceName("g_pos.EdorScanSql");
tSQLInfo.setSqlId("EdorIssueDoc");
tSQLInfo.addSubPara(bussno);
var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArr!=null ) {
i18nAlert("已存在单证补扫,请去问题件查询处理","");
return false;
}
// fm.Operate.value="INSERT";
// action="../API/grp_pa/g_pos/EdorScanInputSave/INSERT"
// submitForm();
mOperate="SAVE";
fm. action="../API/grp_pa/g_pos/EdorScanInputSave/INSERT";
submitFunc();
}
/**
* 返回
*/
function goBack() {
top.close();
}
/**
* 提交数据
*/
function submitFunc(){
var showStr=i18nMessage("正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04525");
var urlStr="../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(showStr);
//showInfo=window.showModelessDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px");
var name='提示'; //网页名称,可为空;
var iWidth=550; //弹出窗口的宽度;
var iHeight=250; //弹出窗口的高度;
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false);
showInfo.focus();
//fm.submit();
ajaxSubmit2(document.getElementById("fm"));
}
/**
* 提交数据后返回操作
*/
function afterSubmit(FlagStr, content) {
if (typeof(showInfo)=="object" && typeof(showInfo)!="unknown") {
showInfo.close();
}
if (FlagStr=="Fail") {
var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content="+ encodeURIComponent(content);
var name='提示'; //网页名称,可为空;
var iWidth=550; //弹出窗口的宽度;
var iHeight=250; //弹出窗口的高度;
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false);
showInfo.focus();
} else {
var urlStr = "../common/jsp/MessagePage.jsp?picture=S&content="+ encodeURIComponent(content);
var name='提示'; //网页名称,可为空;
var iWidth=550; //弹出窗口的宽度;
var iHeight=250; //弹出窗口的高度;
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false);
showInfo.focus();
}
initForm();
}
/**
* 下拉框选择以后调用
*/
function afterCodeSelect(cCodeName, Field) {
if(cCodeName == 'idtype') {
if (fm.IDType.value == "01") {
if (fm.IDNo.value == null || fm.IDType.value == "") {
return false;
} else {
}
}
}
}