Index: ssts-web/src/main/webapp/debug/print/printDebug.js =================================================================== diff -u -r15280 -r15287 --- ssts-web/src/main/webapp/debug/print/printDebug.js (.../printDebug.js) (revision 15280) +++ ssts-web/src/main/webapp/debug/print/printDebug.js (.../printDebug.js) (revision 15287) @@ -1,6 +1,6 @@ var barcode = '010926225'; -var maxToussNameLength = 20; +var maxToussNameLength = 13; var maxMaterialNameLength = 10; var maxMaterialsAmount = 30; var toussName = ''; @@ -12,8 +12,10 @@ var sterilizationDate = '2015-09-30'; var validDate = '2015-10-30'; var hospitalName = '广医二院'; -var sterilizer = ''; +var sterilizer = '1'; +var sterilizerName = '1'; var frequency = '2'; +var sterileFrequency = '2'; var markTousse = 1; var sterilingType = '高压灭菌'; var packageTypeAbbreviation = 'P'; @@ -86,7 +88,10 @@ var materials = buildMaterials(materialsAmount,diposableGoodsAmount); var obj = { 'barcode' : barcode, + barcodes: [barcode], 'name' : toussName, + isPrint: true, + isTraceable: true, 'department':tousseDepartment, 'pageType' : formType, 'materials' : materials, @@ -98,6 +103,8 @@ 'validDate' : validDate, 'hospitalName' : hospitalName, 'sterilizer' : sterilizer, + 'sterilizerName': sterilizerName, + 'sterileFrequency': sterileFrequency, 'frequency' : frequency, 'markTousse' : markTousse, 'sterilingType' : sterilingType, @@ -107,8 +114,8 @@ 'idCardDefinitionUseAmount' : idCardDefinitionUseAmount, 'packageTypeAbbreviation': packageTypeAbbreviation, virtualBasketSeqNum: virtualBasketSeqNum, - weight: weight, - }; + weight: weight + } return obj; } //构造外来器械打印对象 @@ -151,6 +158,8 @@ 'supplierName':supplierName, 'splitPackagesAmount':splitPackagesAmount, 'sterilizer' : sterilizer, + 'sterilizerName': sterilizerName, + 'sterileFrequency': sterileFrequency, 'frequency' : frequency, 'markTousse' : markTousse, 'sterilingType' : sterilingType, @@ -161,7 +170,7 @@ 'bedNumber': bedNumber, 'depart':tousseDepartment, 'packageTypeAbbreviation': packageTypeAbbreviation - }; + } return printSummaryObj; } function printTousse(formType,totalAmount,materialsAmount,diposableGoodsAmount) { @@ -312,6 +321,81 @@ 'maker':maker,'markTousse' : markTousse,'assistant':assistant,pageType:pageType}; defaultForeignPrintPackage(printSummaryObj); } +function printMultiColumnTousse(formType){ + var obj = buildPrintObj(formType,0,0,0); + obj.printAmount = 2; +// defaultPrintPackage(obj); + doPrintLabels([obj]); +} +function printMultiTousse(){ +// var toussName = buildName('包', maxToussNameLength); +// var obj = { +// 'barcode' : barcode, +// 'name' : toussName, +// 'department':tousseDepartment, +// washOperator: washOperator, +// sterilizationUser: sterilizationUser, +// 'operator' : operator, +// 'reviewer' : reviewer, +// 'sterilizationDate' : sterilizationDate, +// 'validDate' : validDate, +// 'hospitalName' : hospitalName, +// 'sterilizer' : sterilizer, +// 'sterilizerName': sterilizerName, +// 'sterileFrequency': sterileFrequency, +// 'frequency' : frequency, +// 'markTousse' : markTousse, +// 'sterilingType' : sterilingType, +// 'packageTypeAbbreviation': packageTypeAbbreviation, +// virtualBasketSeqNum: virtualBasketSeqNum, +// weight: weight +// }; +// +// for(var i=0;i<2;++i){ +// var num = i+1; +// obj.barcode = '01000000'+num; +// printOneSmallLabel(i,obj); +// } +// LODOP.PRINT(); +} +function printOneSmallLabel(index,obj){ +// var top = 0; +// var left = 2; +// left += index*(50+2) +// doGetLodop(); +// LODOP.PRINT_INITA(top+'mm', left+'mm','50mm','30mm', null); +// // 划线 +// if(obj.markTousse){ +// LODOP.ADD_PRINT_LINE('5mm','0mm','5mm','50mm',0,1); +// LODOP.ADD_PRINT_LINE('16mm','0mm','16mm','50mm',0,1); +// } +// // 设置默认字体 +// setDefaultFontNameSizeBold('宋体',12,1); +// // 默认条码属性 +// LODOP.SET_PRINT_STYLE('ShowBarText', true); +// LODOP.SET_PRINT_STYLE('FontSize', 6); +// LODOP.SET_PRINT_STYLE('NotOnlyHighPrecision', true); +// +// var fontSize = getFontSizeByStr(obj.name,[ +// {maxLen:10,fontSize:10}, +// {maxLen:20,fontSize:6}, +// {maxLen:1000,fontSize:4} +// ]); +// LODOP.ADD_PRINT_TEXT("1mm","0mm","RightMargin:0mm","5mm", obj.name); +// setFontSizeBold(fontSize,1);// 设置字体 +// //setAlignment('center');// 对齐 +// +// LODOP.ADD_PRINT_TEXT("6mm","1mm","34mm","6mm", "灭菌:"+obj.sterilizationDate); +// setFontSizeBold(10,0);// 设置字体 +// LODOP.ADD_PRINT_TEXT("6mm","30mm","30mm","6mm", "装配:"+obj.operator); +// setFontSizeBold(10,0);// 设置字体 +// LODOP.ADD_PRINT_TEXT("12mm","1mm","34mm","6mm", "失效:"+obj.validDate); +// setFontSizeBold(10,0);// 设置字体 +// LODOP.ADD_PRINT_TEXT("12mm","30mm","30mm","6mm", "审核:"+obj.reviewer); +// setFontSizeBold(10,0);// 设置字体 +// +// LODOP.ADD_PRINT_BARCODE("17mm","10mm","30mm","10mm","128Auto", obj.barcode);// 条码1 +} Ext.onReady(function() { Ext.QuickTips.init(); Ext.apply(Ext.QuickTips.getQuickTip(), { @@ -348,6 +432,71 @@ printTousse('小标签', 8); } } ] + },{ + height : rowHeight, + layout : 'form', + items : [ { + id : '模板-小标签', + xtype : 'button', + text : '模板-小标签', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printTousse('模板-小标签', 8); + } + } ] + },{ + height : rowHeight, + layout : 'form', + items : [ { + id : '模板-普通小标签', + xtype : 'button', + text : '模板-普通小标签', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printTousse('模板-普通小标签', 8); + } + } ] + },{ + height : rowHeight, + layout : 'form', + items : [ { + id : '模板-普通中标签', + xtype : 'button', + text : '模板-普通中标签', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printTousse('模板-普通中标签', 8); + } + } ] + },{ + height : rowHeight, + layout : 'form', + items : [ { + id : '模板-普通大标签', + xtype : 'button', + text : '模板-普通大标签', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printTousse('模板-普通大标签', 8); + } + } ] + },{ + height : rowHeight, + layout : 'form', + items : [ { + id : '双排小标签', + xtype : 'button', + text : '双排小标签', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printMultiTousse(); + } + } ] }, { height : rowHeight, layout : 'form', @@ -361,6 +510,19 @@ printTousse('小标签2', 8); } } ] + },{ + height : rowHeight, + layout : 'form', + items : [ { + id : '器械包_双排小标签2', + xtype : 'button', + text : '器械包_双排小标签2', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printMultiColumnTousse('小标签2', 8); + } + } ] }, { height : rowHeight, layout : 'form', @@ -378,6 +540,19 @@ height : rowHeight, layout : 'form', items : [ { + id : '器械包_中标签2', + xtype : 'button', + text : '器械包_中标签2', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printTousse('中标签2', 8); + } + } ] + },{ + height : rowHeight, + layout : 'form', + items : [ { id : '器械包_大标签', xtype : 'button', text : '器械包_大标签',