|
版本: |
其它(帖子中说明) |
小版本号: |
3.7 |
|
|
数据库: |
MS SQLServer |
服务器操作系统: |
Windows |
应用服务器: |
|
客户端操作系统: |
Windows 7 |
浏览器: |
|
|
|
本帖最后由 xjdlsjy 于 2019-5-20 11:58 编辑
打印之前通过保存按钮保存数据 数据也存进数据库了,通过自定义的Action 写SQL 获取报表数据,每次修改完数据后,打印还是上次保存前的内容。
这是打印按钮事件代码
Model.prototype.btnAllPrintClick = function(event){
var mainData=this.comp('mainData');
var fguid=mainData.val('DES_CONTRACTMANAGE6');
var DetailData=this.comp('DetailData');
var fid=DetailData.val('DES_InvoiceDetail');
var DetailData=this.comp('DetailData');
this.comp('p2').setStringVar("isAllPrint", '1');
this.comp('p2').setStringVar("fid", '');
this.comp('p2').setStringVar("fguid", fguid);
var reportDZReceipt=this.comp('reportDZReceipt')
if (DetailData.isChanged() || mainData.isChanged()){
justep.Util.hint('请保存后打印!', {'position':'middle'});
return;
}
/*
if (DetailData.isChanged()){
DetailData.saveData(
{
"onSuccess" : function(event){
reportDZReceipt.refresh();
reportDZReceipt.print();
}
}
);
return;
}
if (mainData.isChanged()){
mainData.saveData(
{
"onSuccess" : function(event){
reportDZReceipt.refresh();
reportDZReceipt.print();
}
}
);
return;
}
*/
reportDZReceipt.refresh();
reportDZReceipt.print();
};
|
|