Index: ssts-web/src/main/webapp/disinfectsystem/config/szszyy/print/printConfig.js =================================================================== diff -u -r25194 -r37905 --- ssts-web/src/main/webapp/disinfectsystem/config/szszyy/print/printConfig.js (.../printConfig.js) (revision 25194) +++ ssts-web/src/main/webapp/disinfectsystem/config/szszyy/print/printConfig.js (.../printConfig.js) (revision 37905) @@ -1416,6 +1416,27 @@ LODOP.PRINT(); } +var printBiologyInfoConfig = { + goodsTable: { + position: ["1%", "1%", "99%", "10cm"], + newPage: true,//是否分页打印 + columns: [ + { header: "器械包名称", dataIndex: 'name', align: 'center', colspan: 2, height: 30 }, + { header: "灭菌设备名称", dataIndex: 'sterilizerName', align: 'left', height: 20 }, + { header: "循环次数", dataIndex: 'cycleCounter', align: 'left', height: 20 }, + { header: "监测员", dataIndex: 'monitorUser', align: 'left', height: 20 }, + { header: "监测核对员", dataIndex: 'monitorChecker', align: 'left', height: 20 }, + { header: "监测开始时间", dataIndex: 'biologicalMonitoringStartDate', align: 'left', height: 20 }, + { header: "监测结束时间", dataIndex: 'biologicalMonitoringEndDate', align: 'left', height: 20 }, + { header: "阅读器名称", dataIndex: 'bioreaderName', align: 'left', height: 20 }, + { header: "监测管批号", dataIndex: 'monitoringBatchNum', align: 'left', height: 20 }, + { header: "监测管孔位", dataIndex: 'cardPosition', align: 'left', height: 20 }, + { header: "对照管孔位", dataIndex: 'cardPositionOfControlTube', align: 'left', height: 20 }, + { header: "合格", dataIndex: '', colspan: 2, align: 'center', height: 30 }, + ] + } +} + var printConfig = { //发货计划单 invoicePlan : invoicePlanPrintConfig, @@ -1477,5 +1498,7 @@ //回收物品明细。在回收界面的保存并打印按钮触发 recyclingGoodsDetail : recyclingGoodsDetailConfig, //发货物品统计 - invoiceItemSummary : invoiceItemSummaryConfig + invoiceItemSummary : invoiceItemSummaryConfig, + //打印生物监测结果 + printBiologyInfo: printBiologyInfoConfig }; \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/config/szszyy/config.js =================================================================== diff -u -r31990 -r37905 --- ssts-web/src/main/webapp/disinfectsystem/config/szszyy/config.js (.../config.js) (revision 31990) +++ ssts-web/src/main/webapp/disinfectsystem/config/szszyy/config.js (.../config.js) (revision 37905) @@ -92,6 +92,10 @@ enableTousseStatusProgressBar:true, //是否使用旧版发货 useOldInvoiceVersion:true, + //是否启用生物监测打印功能 + enablePrintOfBiologicalMonitoringFunction:true, + //启用生物阅读器配置 + enableBioreaderInterface:true, //启用使用记录单推送至第三方系统功能 enableUseRecordTransportToThirdPartySystem:true } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r37385 -r37905 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 37385) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 37905) @@ -591,6 +591,52 @@ LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", tableHtml); } +//SZSZYY-33:【灭菌管理】新增生物监测结果打印功能 +function biologyInfoPrint(printObj) { + var myObj = printConfig['printBiologyInfo']; + if (!isObjEmpty(myObj.goodsTable)) { + var tableHtml = ''; + tableHtml += ""; + tableHtml += ""; + var itemFirst = myObj.goodsTable.columns[0]; + var dataIndex = itemFirst.dataIndex; + var align = itemFirst.align; + var height = itemFirst.height; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + for (var i = 1; i < myObj.goodsTable.columns.length - 1; i = i + 2) { + tableHtml += ""; + var item = myObj.goodsTable.columns[i]; + var nextItem = myObj.goodsTable.columns[i + 1]; + var itemHeader = item.header; + var dataIndex = item.dataIndex; + var align = item.align; + var height = item.height; + if (dataIndex !== '') { + tableHtml += ""; + } else { + tableHtml += ""; + } + if (dataIndex !== '') { + tableHtml += ""; + } else { + tableHtml += ""; + } + tableHtml += ""; + } + var itemLast = myObj.goodsTable.columns[11]; + var header = itemLast.header; + var align = itemLast.align; + var height = itemLast.height; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += "
" + printObj[dataIndex] + "
" + itemHeader + ":" + printObj[dataIndex] + "" + itemHeader + "" + nextItem.header + ":" + printObj[nextItem.dataIndex] + "" + nextItem.header + "
" + header + "
"; + return tableHtml; + } +} //根据配置的表单打印信息,以及从服务器取到的物品信息数据,打印表单 function print2(printSummaryObj) { Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordView.js =================================================================== diff -u -r37897 -r37905 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordView.js (.../sterilizationRecordView.js) (revision 37897) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordView.js (.../sterilizationRecordView.js) (revision 37905) @@ -814,6 +814,78 @@ addQualityMonitoringByResponPart("灭菌管理"); } +//SZSZYY-33:【灭菌管理】新增生物监测结果打印功能 +function getBiologyInfoForPrint(grid){ + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showMultipleResult("请勾选灭菌记录后再进行操作。", null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); + return false; + } + + var sterilizationRecordIds = null; + for (var i = 0; i < records.length; i++) { + var status = records[i].data['status']; + if (status !== '灭菌完成') { + showMultipleResult('只能选择灭菌完成且进行了生物监测的灭菌记录进行打印。', null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); + return false; + } + if (sterilizationRecordIds == null) { + sterilizationRecordIds = records[i].data['id']; + } else { + sterilizationRecordIds += ',' + records[i].data['id']; + } + } + + top.Ext.MessageBox.confirm("请确认", "确定打印已勾选灭菌记录的生物监测结果吗?", function (button, text) { + if ("yes" == button) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!getBiologyInfoForPrint.do', + params: { + sterilizationRecordIds: sterilizationRecordIds + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + if (result.data.length > 0) { + LODOP.PRINT_INIT(""); + doGetLodop(); + var myObj = printConfig['printBiologyInfo']; + if (isUndefinedOrNullOrEmpty(myObj)) { + var msg = '未找到(printBiologyInfo)的打印配置'; + alert(msg); + return; + } + setPrinterByConfig(); + if (myObj.goodsTable.newPage) { + for (var i = 0; i < result.data.length; i++) { + var tableHtml = biologyInfoPrint(result.data[i]); + LODOP.ADD_PRINT_HTM(myObj.goodsTable.position[0], myObj.goodsTable.position[1], myObj.goodsTable.position[2], myObj.goodsTable.position[3], tableHtml); + LODOP.NEWPAGEA(); + } + } else { + var tableHtml = ''; + for (var i = 0; i < result.data.length; i++) { + tableHtml += biologyInfoPrint(result.data[i]); + LODOP.NEWPAGEA(); + } + LODOP.ADD_PRINT_HTM(myObj.goodsTable.position[0], myObj.goodsTable.position[1], myObj.goodsTable.position[2], myObj.goodsTable.position[3], tableHtml); + } + LODOP.PRINT(); + } else { + showMultipleResult(result.message, null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); + return; + } + } else { + showMultipleResult(result.message, null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); + return; + } + } + }); + } + }); +} + //灭菌失败质量监测点击保存后调用该方法提交后台 function submitSterilizationFailure(status) { if (typeof (sterilizationRecordWin) != 'undefined' && sterilizationRecordWin != null) { @@ -1512,6 +1584,14 @@ handler: function () { printSterilizationRecord(grid); } + }, '-', { + text: '打印生物监测结果', + minWidth: 50, + iconCls: 'icon_print', + hidden: !(sstsConfig.enableBioreaderInterface && sstsConfig.enablePrintOfBiologicalMonitoringFunction), + handler: function () { + getBiologyInfoForPrint(grid); + } }, { id: 'formSubmitResult', xtype: 'hidden', value: '0' }, { id: 'continueSubmitResult', xtype: 'hidden', value: '0' }, { id: 'qmSubmitResult', xtype: 'hidden', value: '0' }]; } else { tbar = [{ @@ -1543,6 +1623,14 @@ grid.getStore().reload(); } }, '-', { + text: '打印生物监测结果', + minWidth: 50, + iconCls: 'icon_print', + hidden: !(sstsConfig.enableBioreaderInterface && sstsConfig.enablePrintOfBiologicalMonitoringFunction), + handler: function () { + getBiologyInfoForPrint(grid); + } + }, '-', { text: '打印', iconCls: 'icon-print', hidden: sterilizationRecordDetailHidden, @@ -1861,57 +1949,17 @@ } //SZSZYY-33:【灭菌管理】新增生物监测结果打印功能 - // if(sstsConfig.enableBioreaderInterface && sstsConfig.enablePrintOfBiologicalMonitoringFunction){ - // items = items.concat(['-', { - // text: '打印生物监测结果', - // minWidth: 50, - // iconCls: 'icon_print', - // handler: function () { - // var records = grid.getSelectionModel().getSelections(); + if(sstsConfig.enableBioreaderInterface && sstsConfig.enablePrintOfBiologicalMonitoringFunction){ + items = items.concat(['-', { + text: '打印生物监测结果', + minWidth: 50, + iconCls: 'icon_print', + handler: function () { + getBiologyInfoForPrint(grid); + } + }]); + } - // if (records.length == 0) { - // showMultipleResult("请勾选灭菌记录后再进行操作。", null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); - // return false; - // } - - // var sterilizationRecordIds = null; - // for (var i = 0; i < records.length; i++) { - // var status = records[i].data['status']; - // if (status !== '灭菌完成') { - // showMultipleResult('只能选择灭菌完成且进行了生物监测的灭菌记录进行打印。', null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); - // return false; - // } - // if (sterilizationRecordIds == null) { - // sterilizationRecordIds = records[i].data['id']; - // } else { - // sterilizationRecordIds += ',' + records[i].data['id']; - // } - // } - - // top.Ext.MessageBox.confirm("请确认", "确定打印已勾选灭菌记录的生物监测结果吗?",function (button, text) { - // if ("yes" == button) { - // Ext.Ajax.request({ - // url: WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!getBiologyInfoForPrint.do', - // params: { - // sterilizationRecordIds: sterilizationRecordIds - // }, - // success: function (response, options) { - // var result = Ext.decode(response.responseText); - // console.log(result) - // if (result.success) { - - // } else { - // showMultipleResult(result.message, null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); - // return; - // } - // } - // }); - // } - // }); - // } - // }]); - // } - var requestTbar = new Ext.Toolbar({ items: items });