Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js =================================================================== diff -u -r13709 -r13902 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js (.../invoiceView.js) (revision 13709) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js (.../invoiceView.js) (revision 13902) @@ -1362,13 +1362,6 @@ batchPrintInvoices_CurrentProject(result, printType); return; } - /** - * 在默认打印之前调用的方法,可以对结果数据进行一些处理,如合并,排序 - */ - var beforeBatchPrintInvoicesFunction = typeof(beforeBatchPrintInvoices) - if(beforeBatchPrintInvoicesFunction != undefined && beforeBatchPrintInvoicesFunction != 'undefined'){ - beforeBatchPrintInvoices(result); - } batchPrintInvoices_result_default(result, printType); } function batchPrintInvoices_result_default(result, printType) { Index: ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/print/printConfig.js =================================================================== diff -u -r13709 -r13902 --- ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/print/printConfig.js (.../printConfig.js) (revision 13709) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/print/printConfig.js (.../printConfig.js) (revision 13902) @@ -251,6 +251,8 @@ }; var batchPrintInvoicesConfig = { + /*在打印之前调用,可用于排序,合并等操作*/ + beforeBatchPrintInvoices:beforeBatchPrintInvoices, headerFooter : [ // 页眉名称 //{label : "广州复大肿瘤医院", dataIndex : '', fontSize : 10, position : ["5","1%","90%",5]}, @@ -1240,35 +1242,6 @@ LODOP.SET_PRINT_STYLEA(0,"Angle",90); LODOP.PRINT(); } -/** - * 在批量打印发货单之前调用。此处的处理是对消毒物品按名称和规格进行合并 - * @param printData - */ -function beforeBatchPrintInvoices(invoicesInfo){ - if(!invoicesInfo){ - return; - } - var oldGoods = invoicesInfo.disinfectGoods; - // 消毒物品 - if(oldGoods && oldGoods.length > 0){ - var newGoods = new Array(); - for(var i = 0; i < oldGoods.length;++i){ - for(var j = 0; j < newGoods.length;++j){ - if(newGoods[j].name == oldGoods[i].name - && newGoods[j].specification == oldGoods[i].specification - && newGoods[j].expireDate == oldGoods[i].expireDate){ - newGoods[j].amount = parseInt(newGoods[j].amount) + parseInt(oldGoods[i].amount); - break; - } - } - //如果没有找到,则插入原来的数据 - if(j == newGoods.length){ - newGoods.push(oldGoods[i]); - } - } - invoicesInfo.disinfectGoods = newGoods; - } -} var printConfig = { //发货计划单 invoicePlan : invoicePlanPrintConfig,