Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r27290 -r27370 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 27290) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 27370) @@ -2386,6 +2386,52 @@ } +function printRecyclingInvoiceTotal(){ + var records = grid.getSelectionModel().getSelections(); + var invoicePlanIds = null; + for (var i = 0; i < records.length; i++) { + if (invoicePlanIds == null) { + invoicePlanIds = records[i].data['id']; + } else { + invoicePlanIds = invoicePlanIds + ',' + records[i].data['id']; + } + } + + var recyclingInvoiceTotalPrint = "recyclingInvoiceTotal"; + var myObj = printConfig[recyclingInvoiceTotalPrint]; + if(isUndefinedOrNullOrEmpty(myObj)){ + var msg = '未找到('+recyclingInvoiceTotalPrint+')的打印配置'; + alert(msg); + return; + } + // 自定义打印 + if (!isUndefinedOrNullOrEmpty(myObj.customPrint)) { + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/recyclingRecordAction!printInvoicePlanSummary.do', + params : {recyclingRecordIds : invoicePlanIds}, + success : function(response, options) { + var obj = Ext.decode(response.responseText); + if(obj.success){ + myObj.customPrint(Ext4.Date.format(new Date(),'Y-m-d H:i:s'),obj); + }else{ + showResult(obj.message); + } + }, + failure : function(response, options) { + var result = Ext.decode(response.responseText); + if(result && result.message){ + showResult(result.message); + }else{ + showResult('打印失败'); + } + } + }) + + } +} + + + function printAllGoodsWithToSendGoods(isPrintToSendGood,isAllGoodsOrToSendGoods){ var records = grid.getSelectionModel().getSelections(); var invoicePlanIds = null; @@ -2627,7 +2673,12 @@ } },500); } - } + }else{//北京大学肿瘤医院BJDXZLYY-4 科室申领中打印回收汇总单增加打印格式(此部分打印没有任何限制条件,直接打印勾选的) + var ids = getSelectedIds(); + if (ids != null && ids != false) { + printRecyclingInvoiceTotal(); + } + } } }); }