Index: ssts-web/src/main/webapp/disinfectsystem/config/fsszyy/print/printConfig.js =================================================================== diff -u -r28512 -r28539 --- ssts-web/src/main/webapp/disinfectsystem/config/fsszyy/print/printConfig.js (.../printConfig.js) (revision 28512) +++ ssts-web/src/main/webapp/disinfectsystem/config/fsszyy/print/printConfig.js (.../printConfig.js) (revision 28539) @@ -1079,6 +1079,93 @@ } ] } +var recyclingInvoiceTotalConfig_fsszyy = { + customPrint:printRecyclingInvoiceTotalConfig_GroupByTousseGroupName, + name:'printRecyclingInvoiceTotalConfig_GroupByDepart' +} +function printRecyclingInvoiceTotalConfig_GroupByTousseGroupName(time,obj,name,loginUser){ + if(name == 'printRecyclingInvoiceTotalConfig_GroupByDepart'){ + var tableHtml =""; + for(var item in obj.data){ + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + for(var i=0;i"; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + } + tableHtml += "
"+item+"
序号名称数量单价金额
"+obj.data[item][i].tosseName+""+obj.data[item][i].amount+""+obj.data[item][i].price+""+obj.data[item][i].totalPrice+"
"; + var headHtml = "
回收清单
"; + var printUserHtml = "
制单人: "+loginUser+"
"; + var printTimeHtml = "
打印时间: "+time+"
"; + //打印设置 + var LODOP = getLodop(document.getElementById('LODOP'),document.getElementById('LODOP_EM')); + //打印医院名称 + LODOP.ADD_PRINT_HTM(5,"5%","90%","100%",'佛山中医院'); + //打印制单人 + LODOP.ADD_PRINT_HTM(80,"5%","90%","100%",printUserHtml); + //打印日期 + LODOP.ADD_PRINT_HTM(100,"5%","90%","100%",printTimeHtml); + //项目内容 + LODOP.ADD_PRINT_TABLE(120,"5%","90%","100%",tableHtml); + //标题 + LODOP.ADD_PRINT_HTM(20,20,"95%",30,headHtml); + LODOP.PRINT(); + }else { + var headHtml = "
科室申领物品汇总单
"; + var tableHtml =""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + for(var i=0;i < obj.data.length;){ + var num = obj.data[i+1]; + var tosseName; + var amount; + if(num == "" || num == undefined || num == null){ + tosseName = ""; + amount = ""; + }else{ + tosseName = num.tosseName; + amount = num.amount; + } + + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + i = i+2; + } + tableHtml += "
名称数量名称数量
"+obj.data[i].tosseName+""+obj.data[i].amount+""+tosseName+""+amount+"
"; + var printTimeHtml = "
打印日期: "+time+"
"; + //打印设置 + var LODOP = getLodop(document.getElementById('LODOP'),document.getElementById('LODOP_EM')); + //打印日期 + LODOP.ADD_PRINT_HTM(80,"5%","90%","100%",printTimeHtml); + //项目内容 + LODOP.ADD_PRINT_TABLE(106,"5%","90%","100%",tableHtml); + //标题 + LODOP.ADD_PRINT_HTM(20,20,"95%",30,headHtml); + LODOP.PRINT(); + } +} /** * 器械包管理界面的包定义材料清单 */ @@ -1175,7 +1262,7 @@ // 发货单(消毒物品) invoiceDisinfectGoods : invoiceComboPrintConfig, //回收清单 - recyclingInvoiceTotal : invoicePlanPrintConfig, + recyclingInvoiceTotal : recyclingInvoiceTotalConfig_fsszyy, // 申请单 application : applicationPrintConfig, // 消毒物品申请单 Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r28343 -r28539 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 28343) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 28539) @@ -82,40 +82,40 @@ } /* - 可以获取每月第一天的00:00和每月当天的23:59 - dateformat 日期格式 - extObj Ext对象 - fieldId 要设置时间区域的id - */ -function getServerTime2(dateformat,extObj,fieldId){ - Ext.Ajax.request({ - url: WWWROOT + '/system/serverTimeAction!getDateTimeOfFirstDay.do', - params: {dateformat: dateformat}, - success: function(response, options) { - var result = Ext.decode(response.responseText); - if (result.success) { - if(extObj && fieldId && extObj.getCmp(fieldId)){ - if(fieldId == "startDate"){ - extObj.getCmp("startDate").setValue(result.data.startDateTime); - }else if(fieldId == "endDate"){ - extObj.getCmp("endDate").setValue(result.data.endDateTime); - } - } - } else { - showResult(result.message); - } - }, - failure : function(response, options) { - showResult('获取服务器时间失败!'); - } - }); -} + 可以获取每月第一天的00:00和每月当天的23:59 + dateformat 日期格式 + extObj Ext对象 + fieldId 要设置时间区域的id + */ +function getServerTime2(dateformat,extObj,fieldId){ + Ext.Ajax.request({ + url: WWWROOT + '/system/serverTimeAction!getDateTimeOfFirstDay.do', + params: {dateformat: dateformat}, + success: function(response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + if(extObj && fieldId && extObj.getCmp(fieldId)){ + if(fieldId == "startDate"){ + extObj.getCmp("startDate").setValue(result.data.startDateTime); + }else if(fieldId == "endDate"){ + extObj.getCmp("endDate").setValue(result.data.endDateTime); + } + } + } else { + showResult(result.message); + } + }, + failure : function(response, options) { + showResult('获取服务器时间失败!'); + } + }); +} /* - 可以获取当天时间的,可以获取到当天的00:00和23:59 - dateformat 日期格式 - extObj Ext对象 - fieldId 要设置时间区域的id + 可以获取当天时间的,可以获取到当天的00:00和23:59 + dateformat 日期格式 + extObj Ext对象 + fieldId 要设置时间区域的id */ function getServerCurTime(dateformat,extObj,fieldId){ Ext.Ajax.request({ @@ -2498,11 +2498,15 @@ if (!isUndefinedOrNullOrEmpty(myObj.customPrint)) { Ext.Ajax.request({ url : WWWROOT + '/disinfectSystem/recyclingRecordAction!printInvoicePlanSummary.do', - params : {recyclingRecordIds : invoicePlanIds,customPrintName:(myObj.name || '')}, + params : {recyclingRecordIds : invoicePlanIds,customPrintName: (myObj.name || '')}, success : function(response, options) { var obj = Ext.decode(response.responseText); if(obj.success){ - myObj.customPrint(Ext4.Date.format(new Date(),'Y-m-d H:i:s'),obj); + if(JSON.stringify(obj.data) !== "{}"){ + myObj.customPrint(Ext4.Date.format(new Date(),'Y-m-d H:i:s'),obj,(myObj.name || ''),curUserName); + }else { + showResult('打印回收汇总信息为空,请重新选择申请单'); + } }else{ showResult(obj.message); } @@ -2516,7 +2520,6 @@ } } }) - } }