Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r16259 -r16316 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 16259) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 16316) @@ -213,6 +213,14 @@ } return openModalWindow(url, "选择回收员", "1000", "750"); } +/** + * 选择器械包分组,根据分组进行发货计划的打印 + * @returns + */ +function showSelectTousseGroup(){ + var url = WWWROOT+"/disinfectsystem/recyclingApplication/selectTousseGroup.jsp?allowNull=false&resultType=code"; + return openModalWindow(url, "选择器械包分组", "1000", "750"); +} function sumTotal(store){ if(store.getCount()!=0){ var sum =0; @@ -3696,8 +3704,7 @@ }); } } - }, - {text: '打印全部物品', handler: function(){ + },{text: '打印全部物品', handler: function(){ var ids = getSelectedIds(); if (ids != null && ids != false){ top.Ext.MessageBox.confirm("请确认", "要打印所选申请单的全部物品吗?", @@ -3718,8 +3725,42 @@ }); } } - } - ] + },{ + text: '器械包分组打印', hidden:!sstsConfig.enableInvoicePlanTousseGroupPrint, handler: function(){ + var ids = getSelectedIds(); + if(ids == false){ + return; + } + var selectResult = showSelectTousseGroup(); + if(selectResult == null && selectResult == undefined){ + return; + } + var tousseGroupIds = selectResult; + if(tousseGroupIds == '' || tousseGroupIds == null){ + showResult('请选择器械包分组!'); + return; + } + if (ids != null && ids != false){ + top.Ext.MessageBox.confirm("请确认", "要打印所选申请单的全部物品吗?", + function(btn) { + if (btn == 'yes') { + //通过json stringify和parse克隆js对象 + var config = JSON.parse(JSON.stringify(printConfig.invoicePlan)); + config.isPrintTousse = true; + config.isPrintDisinfectGoods = true; + config.isPrintDressing = true; + config.isPrintDisposableGoods = false; + config.printApplyInfo = false; + config.tousseGroupIds = tousseGroupIds; + + var printParams = getPrintJsonParams("tousseGroupPrint", ids , config); + formTypeOfPrinted = "invoicePlan"; + printApplyGoods(printParams,0,SSTS_PrintApplicationGoods,null); + } + }); + } + } + }] }) },{ text : '设为已打印',