|
版本: |
X5.2.7 |
小版本号: |
|
|
|
数据库: |
MS SQLServer |
服务器操作系统: |
Windows |
应用服务器: |
|
客户端操作系统: |
Windows 7 |
浏览器: |
手机/平板X5客户端 |
|
|
justep.Request.beginBatch();
try{
}
catch (e) {
justep.Request.cancelBatch();
alert('保存失败');
}
justep.Request.endBatch();
在ui端开发中有上面批处理。
在mobileui中使用这个语句后存储过程就保存不了。
去掉批处理后就可以保存了但是有报错提示:"Uncaught TypeError: Cannot read property 'userdata' of undefined".
后面是我的程序代码:
justep.Request.beginBatch();
try{
for ( var i = 0; i <=justep.xbl("bizData3").getCount() ; i++)
{
var grid =justep.xbl("grid1").getSelectedRowID();
var rowid = justep.xbl("bizData3").getID(i);
var tm=justep.xbl("bizData3").getValue("tm",rowid);
var scdd=justep.xbl("bizData3").getValue("MoCode",rowid);
var scddhh=justep.xbl("bizData3").getValue("ddhh",rowid);
var MoRoutingDId=justep.xbl("bizData3").getValue("MoRoutingDId",rowid);
var djgs=justep.xbl("bizData3").getValue("djgs",rowid);
if (((parseFloat(heges))<=((parseFloat(scsl))*10-parseFloat(ybgs)))&&(grid.indexOf(rowid)>=0))
{
var actionParam = new justep.Request.ActionParam();
actionParam.setString('gongsi','009');
actionParam.setFloat('baofeishuliang',0);
actionParam.setFloat('liaofeishuliang',0);
actionParam.setFloat('gongfeishuliang',0);
actionParam.setString('jianyanyuan',zdr1);
actionParam.setString('tm',tm);
actionParam.setString('lfly','');
actionParam.setString('fpyy','');
actionParam.setFloat('hys',0);
justep.Request
.sendBizRequest2({
dataType : "json",
action : "ambhcxcbg", //修改成查询记录数的acction,该acction在press中引用
parameters : actionParam,
callback:function(result)
{
}
});
}
else
{
alert('请核对录入数量');
continue;
};
}
}
catch (e) {
justep.Request.cancelBatch();
alert('保存失败');
}
justep.Request.endBatch();
|
|