Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r16218 -r16251 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 16218) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 16251) @@ -2195,8 +2195,13 @@ function printLabelsAfterPacking(){ var packAmount = packedToussesArray.length; // showResult(packAmount + "个" + showName + "装配完成"); + var printGroupType = Ext4.getCmp('printGroupType').getValue(); + var cfg = getDefaultPrintLabelsConfig(); + if(printGroupType == '按科室分组'){ + cfg.groupLabelsByDepart = true; + } if(tousseesToPrint.length > 0){ - doPrintLabels(tousseesToPrint); + doPrintLabels(tousseesToPrint,cfg); } } // 添加要删除的项 @@ -2424,7 +2429,27 @@ }; } } - })], + }),'-', + { + text : '打印分组类型:' + }, + { + xtype : 'combo', + id : 'printGroupType', + name : 'printGroupType', + editable:false, + valueField : 'value', + displayField : 'value', + store : new Ext4.data.ArrayStore( { + fields : [ 'value'], + data : [['默认'],['按科室分组']] + }), + value : '默认', + forceSelection : true, + mode : 'local', + triggerAction : 'all', + anchor : '100%' + }], bbar:[ { id : 'addErrorMaterial', Index: ssts-web/src/main/webapp/disinfectsystem/common/cssdUtils.js =================================================================== diff -u -r16077 -r16251 --- ssts-web/src/main/webapp/disinfectsystem/common/cssdUtils.js (.../cssdUtils.js) (revision 16077) +++ ssts-web/src/main/webapp/disinfectsystem/common/cssdUtils.js (.../cssdUtils.js) (revision 16251) @@ -226,12 +226,24 @@ defaultPrintDisinfection(tousseObj); }; +function getDefaultPrintLabelsConfig(){ + var cfg = { + groupLabelsByDepart: false + }; + return cfg; +} /** * 打印物品的标签 */ -function doPrintLabels(tousses){ +function doPrintLabels(tousses,cfg){ + cfg = cfg || getDefaultPrintLabelsConfig(); tousses = createMultipleLabels(tousses);// 生成多份标签 - tousses = groupLabels(tousses);// 标签分组 + if(cfg.groupLabelsByDepart){ + tousses = groupLabelsByDepart(tousses);// 标签分组 + }else{ + tousses = groupLabels(tousses);// 标签分组 + } + // for (var i=0;i