Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/commonExpensiveGoodsEntry.js =================================================================== diff -u -r21190 -r21895 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/commonExpensiveGoodsEntry.js (.../commonExpensiveGoodsEntry.js) (revision 21190) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/commonExpensiveGoodsEntry.js (.../commonExpensiveGoodsEntry.js) (revision 21895) @@ -52,6 +52,15 @@ }); } + + this.onPrintReceivingReport = function(id){ + top.Ext.MessageBox.confirm("请确认", "要打印本入库的验收单吗?", + function(btn) { + if (btn == 'yes') { + printGodownEntryReceivingReport(id,0); + } + }); + } // 打印,目前只支持单个打印 function batchPrintGodownEntrys(ids, printType,entryType){ if(ids == null) @@ -216,4 +225,49 @@ showResult("打印内容为空!"); } } + + //打印入库的验收单 + function printGodownEntryReceivingReport(id,printType){ + if(id == null) + return; + top.Ext.MessageBox.show({ + title:'请等待', + msg:'打印中……', + width:350, + progress:true, + closable:false + }); + Ext.Ajax.timeout=300*000; + Ext.Ajax.request({ + timeout: 300*000, + url : WWWROOT + '/disinfectSystem/expensiveGoodsGodownEntryAction!printReceivingReport.do', + params : {id : id}, + success : function(response){ + var result = Ext.decode(response.responseText); + // console.log(result); + result.printUser = userName; + result.printTime = Ext.util.Format.date(new Date(), 'Y-m-d H:i'); + // 发料人默认改为当前用户 + if (isUndefinedOrNullOrEmpty(result.sender)) { + result.sender = userName; + } + printReceivingReport(result,printType); + hideMessageBox(true); + }, + failure: function(response){ + showResult("打印失败!"); + hideMessageBox(true); + } + }); + } + function printReceivingReport(ReceivingReportInfo,printType) { + var unitName = ""; + ReceivingReportInfo.unitName = unitName; + printReceivingReport_local(ReceivingReportInfo,printType); + } + function printReceivingReport_local(ReceivingReportInfo,printType){ + setGoodsInfos(ReceivingReportInfo); +// godownEntrysInfo.category = '共'+godownEntrysInfo.totalRows+'种'; + printReceivingReportInfo(ReceivingReportInfo, printType); + } } \ No newline at end of file