Index: ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntry.js =================================================================== diff -u -r13257 -r13280 --- ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntry.js (.../materialEntry.js) (revision 13257) +++ ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntry.js (.../materialEntry.js) (revision 13280) @@ -76,6 +76,14 @@ if (isUndefinedOrNullOrEmpty(result.sender)) { result.sender = userName; } + for(var i = 0; i < result.goods.length;++i){ + if(result.goods[i].price != null){ + result.goods[i].price = result.goods[i].price.toFixed(getMoneyDigitCount()); + } + if(result.goods[i].totalPrice != null){ + result.goods[i].totalPrice = result.goods[i].totalPrice.toFixed(getMoneyDigitCount()); + } + } printMaterialEntrys(result, printType,entryType); hideMessageBox(true); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/materialmanager/MaterialEntry.java =================================================================== diff -u -r13257 -r13280 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/materialmanager/MaterialEntry.java (.../MaterialEntry.java) (revision 13257) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/materialmanager/MaterialEntry.java (.../MaterialEntry.java) (revision 13280) @@ -191,6 +191,6 @@ for(MaterialEntryItem item : itemsList){ totalPrice =MathTools.add(totalPrice,MathTools.mul(item.getAmount(), item.getCost())); } - return totalPrice.doubleValue(); + return totalPrice.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue(); } } Index: ssts-web/src/main/webapp/ext/js/common.js =================================================================== diff -u -r12331 -r13280 --- ssts-web/src/main/webapp/ext/js/common.js (.../common.js) (revision 12331) +++ ssts-web/src/main/webapp/ext/js/common.js (.../common.js) (revision 13280) @@ -344,4 +344,11 @@ function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} +} + +function getMoneyDigitCount(){ + if(sstsConfig && sstsConfig.moneyDigitCount){ + return sstsConfig.moneyDigitCount + } + return 2; } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/config.js =================================================================== diff -u -r13058 -r13280 --- ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/config.js (.../config.js) (revision 13058) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/config.js (.../config.js) (revision 13280) @@ -51,5 +51,7 @@ //入库单是否显示发票 godownEntryShowInvoice:true, //入库单是否显示生物检测信息 - godownEntryShowBiologicalTestReport:true + godownEntryShowBiologicalTestReport:true, + //金额的小数位数 + moneyDigitCount:4 } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r13060 -r13280 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 13060) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 13280) @@ -2527,7 +2527,8 @@ } totalAmount += obj.goods[i].amount; } - obj.totalPrice = totalPrice; + + obj.totalPrice = totalPrice.toFixed(getMoneyDigitCount()); obj.totalGoodsAmount = totalAmount; obj.totalRows = obj.goods.length;// 总行数 }