Index: ssts-web/src/main/webapp/disinfectsystem/config/zd5y/print/printConfig.js =================================================================== diff -u -r15955 -r16264 --- ssts-web/src/main/webapp/disinfectsystem/config/zd5y/print/printConfig.js (.../printConfig.js) (revision 15955) +++ ssts-web/src/main/webapp/disinfectsystem/config/zd5y/print/printConfig.js (.../printConfig.js) (revision 16264) @@ -155,7 +155,213 @@ } } +/** + * 中大五院发货计划自定义打印函数.在页脚,需要签名的地方只在最后一页打印 + * @param printSummaryObj + */ +function printInvoicePlan_zdwy(printSummaryObj){ + var myObj = printConfig[formTypeOfPrinted]; + + // 根据配置过滤掉材料列表里面的一次性物品(后台会返回所有材料和一次性物品) + if(!isUndefinedOrNull(printSummaryObj.materials)){ + if(isUndefinedOrNull(myObj.printDiposableGoods) || !myObj.printDiposableGoods){ + // 过滤掉一次性物品 + var materials = printSummaryObj.materials; + var newMaterials = []; + for(var i=0;i" + item.header + ""; + } + tableHtml += ""; + + // 打印物品内容行 + var columnCount = myObj.goodsTable.content.length; + var page = printSummaryObj.pages[printSummaryObj.pageIndex]; + var rows = page.rows; + if(rows != null && rows.length > 0){ + for ( var k = 0; k < rows.length; k++) { + var row = rows[k]; + + tableHtml = appendTableRowString(tableHtml, myObj.goodsTable.rowHeight , myObj.goodsTable.fontSize); + + for (var i=0;i" + value + " "; + } + + tableHtml += ""; + } + } + + if(page.pageNumber == printSummaryObj.pageAmount){ + // 打印合计信息 + tableHtml = appendTableRowString(tableHtml, myObj.goodsTable.rowHeight , myObj.goodsTable.fontSize); + + tableHtml += "合计"; + + for (var i=2;i= 0 ){ + value = printSummaryObj.totalGoodsAmount; + } + else if (indexName == "applyAmount"){ + value = printSummaryObj.totalApplyAmount; + } + else if (indexName == "recyclingAmount"){ + value = printSummaryObj.totalRecyclingAmount; + if(value == 0){ + value = ""; + } + } + else if(indexName == "rowPrice" || indexName == "totalPrice"){ + value = formatMoney(printSummaryObj.totalPrice); + } + + + tableHtml += "" + value + " "; + } + + tableHtml += ""; + } + + // 打印页脚信息 + tableHtml = appendTableRowString(tableHtml, myObj.footer.rowHeight , myObj.footer.fontSize) + + tableHtml += ""; + var text = ""; + + //以下只有最后一页打印 + if(page.pageNumber == printSummaryObj.pageAmount){ + text += "制单人:"; + var temp = printSummaryObj['printUser']; + if (temp != null && temp != '' && typeof temp != 'undefined'){ + text += temp; + } + + text += " 发放人:"; + text += " 复核人:"; + text += " 领用人:"; + }else{ + //打印同样多的空格 + text += " "; + } + text += " 打印时间:"; + var temp = printSummaryObj['printTime']; + if (temp != null && temp != '' && typeof temp != 'undefined'){ + text += temp; + } + tableHtml += "
" + text;
+		tableHtml += "   第"+page.pageNumber+"页/共"+printSummaryObj.pageAmount+"页";
+		tableHtml += "
"; + + tableHtml += ""; + + LODOP.ADD_PRINT_TABLE(myObj.goodsTable.position[0], myObj.goodsTable.position[1], myObj.goodsTable.position[2], myObj.goodsTable.position[3],tableHtml); + } +} + var invoicePlanPrintConfig = { + customPrint:printInvoicePlan_zdwy, isPrintTousse : true, isPrintDisinfectGoods : true, isPrintDisposableGoods : true, // 打印申请单是否打印一次性物品