Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r23894 -r24208 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 23894) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 24208) @@ -173,7 +173,7 @@ } function addPrintBarcode(item, text){ - LODOP.ADD_PRINT_BARCODE(item.position[0], item.position[1], item.position[2], item.position[3],item.codeType, text); + LODOP.ADD_PRINT_BARCODE(item.position[0], item.position[1], item.position[2], item.position[3],getBarcodeCodeType(item.codeType), text); var styles = item.styles; if (!isObjEmpty(styles)){ for (var j=0;j"; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += ""; } @@ -699,7 +699,7 @@ if (cell.dataIndex == 'barcode'){ var barcode = printSummaryObj[cell.dataIndex]; tableHtml += ">
"; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; } @@ -733,7 +733,7 @@ if (!isObjEmpty(myObj.barcodes)){ for (var i=0;i"; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += ""; @@ -1133,7 +1133,7 @@ tableHtml += ""; tableHtml += "
"; - tableHtml += tousseObj.packageTypeAbbreviation+""; + tableHtml += tousseObj.packageTypeAbbreviation+""; tableHtml += "
"+printBarcodeStr; tableHtml += "
"; @@ -1249,7 +1249,7 @@ 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 + LODOP.ADD_PRINT_BARCODE("17mm","10mm","30mm","10mm",getBarcodeCodeType(), obj.barcode);// 条码1 } // 外来器械打印 @@ -1367,13 +1367,13 @@ } tableHtml += ""; tableHtml += "
"; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; tableHtml += ""; tableHtml += "
"; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; @@ -1429,7 +1429,7 @@ } tableHtml += ""; tableHtml += "
"; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; @@ -1484,17 +1484,17 @@ tableHtml += ""; tableHtml += sterilizerStr; tableHtml += "
"; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; tableHtml += ""; tableHtml += "
"; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; tableHtml += "
"; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; tableHtml += ""; @@ -1550,7 +1550,7 @@ tableHtml += ""; tableHtml += "
"; - tableHtml += ""; + tableHtml += ""; var printBarcode = true; if(!isUndefinedOrNull(sstsConfig) && !isUndefinedOrNull(sstsConfig.printUserBarcodeStr)){ printBarcode = sstsConfig.printUserBarcodeStr; @@ -2300,7 +2300,7 @@ if(barcode != '' && userName != '' && date != ''){ tableHtml += ""; tableHtml += ""; - tableHtml += ""; + tableHtml += ""; tableHtml += "
"+barcode; tableHtml += "
"; tableHtml += ""; @@ -2357,7 +2357,7 @@ setFontSizeBold(10,1);// 设置字体 setAlignment('center');// 对齐 - LODOP.ADD_PRINT_BARCODE("27mm","10mm","30mm","10mm","128Auto", barcodeInformation.barcode);// 条码1 + LODOP.ADD_PRINT_BARCODE("27mm","10mm","30mm","10mm",getBarcodeCodeType(), barcodeInformation.barcode);// 条码1 LODOP.PRINT(); } /** @@ -2695,7 +2695,7 @@ tableHtml += "批次:"+batchNumber; tableHtml += "
规格:"+specification; tableHtml += "
失效期:"+expDate; - tableHtml += "
"; + tableHtml += "
"; tableHtml += "
"+barcode; tableHtml += ""; tableHtml += ""; @@ -2761,7 +2761,7 @@ tableHtml += ""; tableHtml += "
规格:"+specification; tableHtml += "
失效期:"+expDate; - tableHtml += "
"; + tableHtml += "
"; tableHtml += "
"+barcode; tableHtml += ""; tableHtml += ""; @@ -2786,7 +2786,7 @@ {label : "领料人:", dataIndex : '', fontSize : 11, position : ["10cm","40%","90%",5]}, {label : "发料人:", dataIndex : 'sender', fontSize : 11, position : ["10cm","75%","90%",5]}, {barcodes : [ - {codeType : "128Auto", dataIndex : 'departBarcode', position : ["3mm","74%","40mm","8mm"], + {codeType : getBarcodeCodeType(), dataIndex : 'departBarcode', position : ["3mm","74%","40mm","8mm"], styles : [{itemNameID: 0, styleName: 'ShowBarText', styleValue: true}, {itemNameID: 0, styleName: 'FontSize', styleValue: 6}, {itemNameID: 0, styleName: 'NotOnlyHighPrecision', styleValue: true} @@ -3296,4 +3296,24 @@ var topMargin = cfg.topMargin; var newY = topMargin+y; return newY; +} + +function getPrintBarcodeURL(obj){ + var barcode = obj.barcode; + var url = WWWROOT + "/disinfectSystem/printBarcodeAction!printBarcodeImage.do?barcode=" + barcode+"&codeType="+getBarcodeCodeType(obj.codeType); + return url; +} +function getBarcodeCodeType(codeType){ + if(codeType){ + return codeType; + } + var t = "128Auto"; + if(typeof(sstsConfig) == "undefined"){ + return t; + } + + if(sstsConfig.barcodeCodeType){ + return sstsConfig.barcodeCodeType; + } + return t; } \ No newline at end of file