Index: ssts-web/src/main/webapp/debug/print/printDebug.js =================================================================== diff -u -r12599 -r13068 --- ssts-web/src/main/webapp/debug/print/printDebug.js (.../printDebug.js) (revision 12599) +++ ssts-web/src/main/webapp/debug/print/printDebug.js (.../printDebug.js) (revision 13068) @@ -17,6 +17,7 @@ var packageTypeAbbreviation = 'P'; var materialsAmount = 8;// 材料数量 var diposableGoodsAmount = 2;// 一次性物品数量 +var idCardDefinitionUseAmount = 100; // 器械包的使用次数 function buildName(char,charAmount){ var name = ''; @@ -92,6 +93,7 @@ 'materialAmount' : materialsAmount, 'diposableGoodsAmount' : diposableGoodsAmount, 'totalAmount' : totalAmount, + 'idCardDefinitionUseAmount' : idCardDefinitionUseAmount, 'packageTypeAbbreviation': packageTypeAbbreviation }; return obj; @@ -154,6 +156,128 @@ var obj = buildForeignToussePrintObj(formType,materialsAmount + diposableGoodsAmount,materialsAmount,diposableGoodsAmount); defaultPrintForeignToussePackage(obj); } +// 标识牌打印 +function printIDCard(formType){ + var materials = [{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '皮钳', + specification: '160MM', + type: '材料' + }, + count: 4 + },{ + materialDefinition: { + name: '蚊式弯钳', + specification: '', + type: '材料' + }, + count: 4 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + },{ + materialDefinition: { + name: '布巾钳', + specification: '160MM', + type: '材料' + }, + count: 6 + }]; + var toussName = buildName('包', maxToussNameLength); + var idCardInstance = { + idCardPaperType: formType, + barcode: '010023002', + printDate: '2016-03-18', + userName: '唐小凤', + unit: '个', + tousseDefinition: { + name: toussName, + materialInstances:materials + } + } + printIDCardInstance(idCardInstance); +} Ext.onReady(function() { Ext.QuickTips.init(); @@ -338,6 +462,19 @@ height : rowHeight, layout : 'form', items : [ { + id : '器械包_小标签2_6', + xtype : 'button', + text : '器械包_小标签2_6', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printTousse('小标签2', 6); + } + } ] + }, { + height : rowHeight, + layout : 'form', + items : [ { id : '器械包_中标签_8', xtype : 'button', text : '器械包_中标签_8', @@ -685,6 +822,32 @@ printForeignTousse('大标签', 8); } } ] + }, { + height : rowHeight, + layout : 'form', + items : [ { + id : '标识牌_大标签', + xtype : 'button', + text : '标识牌_大标签', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printIDCard('大标签'); + } + } ] + }, { + height : rowHeight, + layout : 'form', + items : [ { + id : '标识牌_小标签', + xtype : 'button', + text : '标识牌_小标签', + cls : 'css_printBtns', + ctcls : 'ctcss_printBtns', + handler : function() { + printIDCard('小标签'); + } + } ] } ] });