Index: ssts-web/src/main/webapp/disinfectsystem/config/zsly/print/printConfig.js =================================================================== diff -u -r30375 -r35457 --- ssts-web/src/main/webapp/disinfectsystem/config/zsly/print/printConfig.js (.../printConfig.js) (revision 30375) +++ ssts-web/src/main/webapp/disinfectsystem/config/zsly/print/printConfig.js (.../printConfig.js) (revision 35457) @@ -1694,6 +1694,77 @@ ] } +var sterilizationDetailsConfig = { + title: { label: "高温灭菌记录表", fontSize: 18 }, + table: { + rowHeight: 30, + fontSize: 12, + rowspan: 2,//2层表头 + columns: [ + { header: "日期", dataIndex: 'yyyyMMdd', align: 'center' }, + { header: "锅次", dataIndex: 'cycles', align: 'center' }, + { header: "炉号", dataIndex: 'sterilizerName', align: 'center' }, + { header: "炉次", dataIndex: 'frequency', align: 'center' }, + { header: "启动程序", dataIndex: 'sterilizationType', align: 'center' }, + { header: "启动时间", dataIndex: 'startDateHm', align: 'center' }, + { + header: "灭菌参数", align: 'center', children: [{ + header: "温度(°C)", dataIndex: 'sterilizingStartTemp', align: 'center' + }, { + header: "时间(min)", dataIndex: 'sterilizingMin', align: 'center' + }, { + header: "压力(bar)", dataIndex: 'sterilizingBar', align: 'center' + }] + }, + { header: "干燥时间
(min)", dataIndex: 'dryingMin', align: 'center' }, + { header: "结束时间", dataIndex: 'endDateHm', align: 'center' } + ] + }, + barAndTempTr: { + rowHeight: 30, + fontSize: 12, + columns: [ + { + header: "压力值范围", align: 'center', colspan: '6', children: [{ + header: "最高压力", dataIndex: 'maxP1Mbar', align: 'center', colspan: '2' + }, { + header: "最低压力", dataIndex: 'minP1Mbar', align: 'center', colspan: '2' + }] + }, + { + header: "灭菌炉最高最低温度", align: 'center', colspan: '5', children: [{ + header: "最高温度", dataIndex: 'maxTemp', align: 'center', colspan: '1' + }, { + header: "最低温度", dataIndex: 'minTemp', align: 'center', colspan: '1' + }] + } + ] + }, + goodsInfo: { + title: '器械包相关情况', + rowHeight: 30, + fontSize: 12, + columns: [{ + header: "总数", dataIndex: 'tousseAmount', align: 'center', colspan: '2' + }, { + header: "包装质量", align: 'center', colspan: '2' + }, { + header: "装载情况", align: 'center', colspan: '1' + }] + }, + goodsTable: { + title: '灭菌物品明细', + cols: 2,//默认显示2列,最多3列 + fontSize: 12, + rowHeight: 30, + columns: [{ + header: "器械包名称", dataIndex: 'tousseName', align: 'center' + }, { + header: "数量", dataIndex: 'amount', align: 'center' + }] + } +} + var printConfig = { //发货计划单 invoicePlan : invoicePlanPrintConfig, @@ -1749,5 +1820,7 @@ //调拨入库单 appropriationInList : appropriationInListConfig, //调拨出库单 - appropriationOutList : appropriationOutListConfig + appropriationOutList : appropriationOutListConfig, + //灭菌明细报表 + sterilizationDetails: sterilizationDetailsConfig }; \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordView.js =================================================================== diff -u -r35444 -r35457 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordView.js (.../sterilizationRecordView.js) (revision 35444) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordView.js (.../sterilizationRecordView.js) (revision 35457) @@ -369,6 +369,49 @@ } } } +//打印灭菌明细表 +function printSterilizationDetailsObj(){ + var records = grid.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择要打印的灭菌记录!", null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); + return false; + } + var isReturn = false; + var arr = []; + for(var i=0;i 0){ + formTypeOfPrinted = "sterilizationRecordDetail"; + setPrinterByConfig(); + for(var i=0;i= 0){ + showButton = true; + } if (isQueryToday) { tbar = [{ text: '添加', @@ -1398,6 +1445,13 @@ addQualityMonitoring1(); } }, '-', { + text: '打印灭菌明细', + iconCls: 'icon_print', + hidden: !showButton, + handler: function () { + printSterilizationDetailsObj(grid) + } + }, '-', { text: '刷新', iconCls: 'btn_ext_refresh1', handler: function () { Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r34930 -r35457 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 34930) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 35457) @@ -212,7 +212,386 @@ return style; } +//打印灭菌明细 +function printSterilizationDetails(data) { + doGetLodop(); + LODOP.PRINT_INIT(""); + setPrinterByConfig(); + LODOP.SET_PRINT_STYLE("ItemType", 4); + LODOP.SET_PRINT_PAGESIZE(0, "297mm", "210mm", ""); + var title; + var table; + var barAndTempTr; + var goodsInfo; + var goodsTable; + if (printConfig.sterilizationDetails) { + title = printConfig.sterilizationDetails.title; + table = printConfig.sterilizationDetails.table; + barAndTempTr = printConfig.sterilizationDetails.barAndTempTr; + goodsInfo = printConfig.sterilizationDetails.goodsInfo; + goodsTable = printConfig.sterilizationDetails.goodsTable; + } + var tableHtml = "
" + if (title) { + tableHtml += "

" + title.label + "

"; + } else { + tableHtml += "

高温灭菌记录表

"; + } + tableHtml += ""; + tableHtml += ""; + if (table) { + tableHtml += ""; + for (var i = 0; i < table.columns.length; i++) { + if (table.columns[i].children) { + tableHtml += ""; + } else { + tableHtml += ""; + } + } + tableHtml += ""; + tableHtml += ""; + for (var i = 0; i < table.columns.length; i++) { + if (table.columns[i].children) { + for (var j = 0; j < table.columns[i].children.length; j++) { + tableHtml += ""; + } + } + } + tableHtml += ""; + tableHtml += ""; + for (var i = 0; i < table.columns.length; i++) { + if (table.columns[i].children) { + for (var j = 0; j < table.columns[i].children.length; j++) { + var value = data[table.columns[i].children[j].dataIndex] || ''; + if (table.columns[i].children[j].sterilizingBar) { + if (data.sterilizingMaxP1Mbar && data.sterilizingMinP1Mbar) { + value = data.sterilizingMaxP1Mbar + '/' + data.sterilizingMinP1Mbar; + } else { + value = ''; + } + } + tableHtml += ""; + } + } else { + tableHtml += ""; + } + } + tableHtml += ""; + } else { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + if (data.sterilizingMaxP1Mbar && data.sterilizingMinP1Mbar) { + tableHtml += ""; + } else { + tableHtml += ""; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + if (barAndTempTr) { + tableHtml += ""; + for (var i = 0; i < barAndTempTr.columns.length; i++) { + tableHtml += ""; + } + tableHtml += ""; + tableHtml += ""; + for (var i = 0; i < barAndTempTr.columns.length; i++) { + if (barAndTempTr.columns[i].children) { + for (var j = 0; j < barAndTempTr.columns[i].children.length; j++) { + var value = data[barAndTempTr.columns[i].children[j].dataIndex] || ''; + tableHtml += ""; + if (barAndTempTr.columns[i].children[j].dataIndex == "maxTemp") { + tableHtml += ""; + } else { + tableHtml += ""; + } + } + } + } + tableHtml += ""; + } else { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + if (goodsInfo) { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + for (var i = 0; i < goodsInfo.columns.length; i++) { + tableHtml += ""; + if (goodsInfo.columns[i].dataIndex) { + tableHtml += ""; + } else { + tableHtml += ""; + } + } + tableHtml += ""; + } else { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + if (goodsTable) { + var cols = goodsTable.cols > 3 ? 3 : goodsTable.cols; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + if (cols == 1) { + tableHtml += ""; + tableHtml += ""; + } else if (cols == 2) { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } else { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + tableHtml += ""; + if (data.tousseAmountArr.length > 6 * cols) { + for (var j = 0; j < data.tousseAmountArr.length; j += cols) { + var tousseName1 = ''; + var amount1 = ''; + var tousseName2 = ''; + var amount2 = ''; + var tousseName3 = ''; + var amount3 = ''; + if(cols == 1){ + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + }else if(cols == 2){ + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + if (data.tousseAmountArr[j + 1]) { + tousseName2 = data.tousseAmountArr[j + 1].tousseName; + amount2 = data.tousseAmountArr[j + 1].amount; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + }else { + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + if (data.tousseAmountArr[j + 1]) { + tousseName2 = data.tousseAmountArr[j + 1].tousseName; + amount2 = data.tousseAmountArr[j + 1].amount; + } + if (data.tousseAmountArr[j + 2]) { + tousseName3 = data.tousseAmountArr[j + 2].tousseName; + amount3 = data.tousseAmountArr[j + 2].amount; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + } + } else { + for (var j = 0; j < 6 * cols; j += cols) { + var tousseName1 = ''; + var amount1 = ''; + var tousseName2 = ''; + var amount2 = ''; + var tousseName3 = ''; + var amount3 = ''; + tableHtml += ""; + if (cols == 1) { + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + tableHtml += ""; + tableHtml += ""; + } else if (cols == 2) { + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + if (data.tousseAmountArr[j + 1]) { + tousseName2 = data.tousseAmountArr[j + 1].tousseName; + amount2 = data.tousseAmountArr[j + 1].amount; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } else { + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + if (data.tousseAmountArr[j + 1]) { + tousseName2 = data.tousseAmountArr[j + 1].tousseName; + amount2 = data.tousseAmountArr[j + 1].amount; + } + if (data.tousseAmountArr[j + 2]) { + tousseName3 = data.tousseAmountArr[j + 2].tousseName; + amount3 = data.tousseAmountArr[j + 2].amount; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + tableHtml += ""; + } + } + } else { + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + if (data.tousseAmountArr.length > 12) { + for (var j = 0; j < data.tousseAmountArr.length; j += 2) { + var tousseName1 = ''; + var amount1 = ''; + var tousseName2 = ''; + var amount2 = ''; + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + if (data.tousseAmountArr[j + 1]) { + tousseName2 = data.tousseAmountArr[j + 1].tousseName; + amount2 = data.tousseAmountArr[j + 1].amount; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + } else { + for (var j = 0; j < 12; j += 2) { + var tousseName1 = ''; + var amount1 = ''; + var tousseName2 = ''; + var amount2 = ''; + if (data.tousseAmountArr[j]) { + tousseName1 = data.tousseAmountArr[j].tousseName; + amount1 = data.tousseAmountArr[j].amount; + } + if (data.tousseAmountArr[j + 1]) { + tousseName2 = data.tousseAmountArr[j + 1].tousseName; + amount2 = data.tousseAmountArr[j + 1].amount; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + } + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += "
" + table.columns[i].header + "" + table.columns[i].header + "
" + table.columns[i].children[j].header + "
" + value + "" + data[table.columns[i].dataIndex] + "
日期锅次炉号炉次启动程序启动时间灭菌参数干燥时间
(min)
结束时间
温度(°C)时间(min)压力(bar)
" + (data.yyyyMMdd || '') + "" + (data.cycles || '') + "" + (data.sterilizerName || '') + "" + (data.frequency || '') + "" + (data.sterilizationType || '') + "" + (data.startDateHm || '') + "" + (data.sterilizingStartTemp || '') + "" + (data.sterilizingMin || '') + "" + (data.sterilizingMaxP1Mbar + '/' + data.sterilizingMinP1Mbar) + "" + (data.dryingMin || '') + "" + (data.endDateHm || '') + "
" + barAndTempTr.columns[i].header + "
" + barAndTempTr.columns[i].children[j].header + "" + value + "" + value + "
压力值范围灭菌炉最高最低温度
最高压力" + (data.maxP1Mbar || '') + "最低压力" + (data.minP1Mbar || '') + "最高温度" + (data.maxTemp || '') + "最低温度" + (data.minTemp || '') + "
" + goodsInfo.title + "
" + goodsInfo.columns[i].header + "" + data[goodsInfo.columns[i].dataIndex] + "
器械包相关情况
总数" + (data.tousseAmount || '') + "包装质量装载情况
" + goodsTable.title + "
"+goodsTable.columns[0].header+""+goodsTable.columns[1].header+""+goodsTable.columns[0].header+""+goodsTable.columns[1].header+""+goodsTable.columns[0].header+""+goodsTable.columns[1].header+""+goodsTable.columns[0].header+""+goodsTable.columns[1].header+""+goodsTable.columns[0].header+""+goodsTable.columns[1].header+""+goodsTable.columns[0].header+""+goodsTable.columns[1].header+"
" + tousseName1 + "" + amount1 + "
" + tousseName1 + "" + amount1 + "" + tousseName2 + "" + amount2 + "
" + tousseName1 + "" + amount1 + "" + tousseName2 + "" + amount2 + "" + tousseName3 + "" + amount3 + "
"+tousseName1+""+amount1+""+tousseName1+""+amount1+""+tousseName2+""+amount2+""+tousseName1+""+amount1+""+tousseName2+""+amount2+""+tousseName3+""+amount3+"
灭菌物品明细
器械包名称数量器械包名称数量
" + tousseName1 + "" + amount1 + "" + tousseName2 + "" + amount2 + "
" + tousseName1 + "" + amount1 + "" + tousseName2 + "" + amount2 + "
灭菌化学监测备注
包内化学指示物包外化学指示物PCD生产批号
PCD指示卡粘贴处
物理监测结果化学监测结果灭菌员签名质控员签名
"; + tableHtml += "
"; + LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", tableHtml); +} + //根据配置的表单打印信息,以及从服务器取到的物品信息数据,打印表单 function print2(printSummaryObj) { doGetLodop();