Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r33353 -r33418 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 33353) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 33418) @@ -4855,4 +4855,88 @@ } }; }; +} + +//打印待接收外来器械包 +function printForeignTousseForReceived(printObj, printType) { + var data = printObj.data; + var configObj = printConfig.printForeignTousseForReceived; + if (isUndefinedOrNullOrEmpty(configObj)) { + var msg = '未找到(printForeignTousseForReceived)的打印配置'; + showResult(msg); + return; + } + doGetLodop(); + LODOP.PRINT_INIT(""); + setPrinterByConfig(); + LODOP.SET_PRINT_STYLE("ItemType", 4); + LODOP.SET_PRINT_PAGESIZE(1, '297mm', '210mm', ""); + if (!isObjEmpty(configObj.headerFooter)) { + var label = configObj.headerFooter[0].label; + var fontSize = configObj.headerFooter[0].fontSize; + var position = configObj.headerFooter[0].position; + var headHtml = "

" + label + "

"; + LODOP.ADD_PRINT_HTM(position[0], position[1], position[2], position[3], headHtml); + var headHtml1 = "

" + printObj.startDate + " - " + printObj.endDate + "

"; + LODOP.ADD_PRINT_HTM(50, 20, "95%", 50, headHtml1); + } + if (!isObjEmpty(configObj.goodsTable)) { + var tableHtml = ""; + var rowHeight = configObj.goodsTable.rowHeight; + var fontSize = configObj.goodsTable.fontSize; + tableHtml += ""; + tableHtml += ""; + for (var i = 0; i < configObj.goodsTable.columns.length; i++) { + var width = configObj.goodsTable.columns[i].width; + var header = configObj.goodsTable.columns[i].header; + tableHtml += ""; + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + var sum = 0; + for (var i = 0; i < data.length; i++) { + var applicationItems = data[i].applicationItems; + for (var k = 0; k < applicationItems.length; k++) { + tableHtml += ""; + for (var j = 0; j < configObj.goodsTable.columns.length; j++) { + var width = configObj.goodsTable.columns[j].width; + var header = configObj.goodsTable.columns[j].header; + var dataIndex = configObj.goodsTable.columns[j].dataIndex; + var align = configObj.goodsTable.columns[j].align; + var name = ''; + if (header == '序号') { + name = (i + 1); + if (k == 0) { + tableHtml += ""; + sum++; + } + } else if (dataIndex == 'tousseName' || dataIndex == 'supplier') { + name = applicationItems[k][dataIndex] || ''; + tableHtml += ""; + } else { + name = data[i][dataIndex] || ''; + if (k == 0) { + tableHtml += ""; + } + } + } + tableHtml += ""; + } + } + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + } + tableHtml += "
" + header + "
" + name + "" + name + "" + name + "
总单数" + sum + "
"; + LODOP.ADD_PRINT_TABLE(configObj.goodsTable.position[0], configObj.goodsTable.position[1], configObj.goodsTable.position[2], configObj.goodsTable.position[3], tableHtml); + if (printType == 0) {//直接打印 + LODOP.PRINT(); + } else {//打印预览 + LODOP.SET_SHOW_MODE("HIDE_PAPER_BOARD", 1); + LODOP.PREVIEW(); + } } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js =================================================================== diff -u -r33259 -r33418 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 33259) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 33418) @@ -494,6 +494,14 @@ modifyPatientInfo(records[0].data.id); } }, '-', { + text : '启用打印待接收外来器械包功能', + iconCls : 'icon_print', + id : 'printTbar', + hidden : !sstsConfig.enableTheFunctionOfPrintingOfForeignTousseToBeReceived, + handler : function() { + openPrintForeignTousseWindow(); + } + }, '-', { text : '收费设置', iconCls : 'btn_ext_chargeSetting', id : 'chargeSetting', Index: ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/print/printConfig.js =================================================================== diff -u -r32834 -r33418 --- ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/print/printConfig.js (.../printConfig.js) (revision 32834) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/print/printConfig.js (.../printConfig.js) (revision 33418) @@ -654,6 +654,29 @@ } } +var printForeignTousseForReceivedConfig = { + headerFooter : [ + {label : "待接收外来器械包统计表", dataIndex : '', fontSize : 22, position : [20,20,"95%",50]} + ], + goodsTable :{ + rowHeight : 22, + fontSize:15, + position : [80,"2.5%","95%","5.5cm"], + columns : [ + {header : "序号", dataIndex : '', width : '35', align : 'center'}, + {header : "申请时间", dataIndex : 'applicationTime', width : '70', align : 'center'}, + {header : "申请科室", dataIndex : 'depart', width : '70', align : 'center'}, + {header : "床位", dataIndex : 'bedNumber', width : '35', align : 'center'}, + {header : "病人姓名", dataIndex : 'patient', width : '50', align : 'center'}, + {header : "住院号", dataIndex : 'hospitalNumber', width : '40', align : 'center'}, + {header : "手术名称", dataIndex : 'surgery', width : '60', align : 'center'}, + {header : "物品名称", dataIndex : 'tousseName', width : '60', align : 'center'}, + {header : "供应商", dataIndex : 'supplier', width : '80', align : 'center'}, + {header : "手术医生", dataIndex : 'doctor', width : '50', align : 'center'} + ] + } +} + var godownOutEntryConfig = { headerFooter : [ // 标题 @@ -1430,6 +1453,8 @@ }, //打印一次性物品汇总单 printDisposableGoodsInvoicePlanSummary:printDisposableGoodsInvoicePlanSummary_gdszyy, + //打印待接收外来器械包 + printForeignTousseForReceived:printForeignTousseForReceivedConfig, //定制打印一次性物品汇总单的物资编码(必填) inventorySerialNumber:['31012600010','31012600009','31011600010','31011600001','31012600034','31012600040','31012600033','31012600032','31012600031','31012600038','31012600039','31012600030','31012600037','31012600036','31012600035','31010900002','31010100039','31010100040'] }; Index: ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js =================================================================== diff -u -r32339 -r33418 --- ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js (.../config.js) (revision 32339) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js (.../config.js) (revision 33418) @@ -225,6 +225,8 @@ showRecyclingPeopleColumnInPackingTasksList:true, //开启在历史装配记录生成代理灭菌单功能 generateProxySterilizationFormFunctionInHistoricalAssemblyRecords:true, + //启用打印待接收外来器械包功能 + enableTheFunctionOfPrintingOfForeignTousseToBeReceived:true, //用户登录成功后如果检查密码到不符合复杂度要求,则强制用户修改密码 forceUserChangePwdWhenNotMeetPwdComplexityReq:true } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/modifyPatientOfForeignTousseInfoForm.js =================================================================== diff -u -r31278 -r33418 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/modifyPatientOfForeignTousseInfoForm.js (.../modifyPatientOfForeignTousseInfoForm.js) (revision 31278) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/modifyPatientOfForeignTousseInfoForm.js (.../modifyPatientOfForeignTousseInfoForm.js) (revision 33418) @@ -468,4 +468,185 @@ } else { showResult("外来器械申请单id参数不能为空"); } +} +var printForeignTousseForReceivedWindow; +//打开打印待接收外来器械包的界面 +function openPrintForeignTousseWindow() { + var orgUnitGroupStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!findOrgUnitGroupList.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }) + orgUnitGroupStore.load(); + var form = new top.Ext4.form.Panel({ + id: 'configForm', + region: 'north', + buttonAlign: 'center', + border: 0, + frame: true, + bodyStyle: 'padding:0px auto;margin:0px', + height: 100, + fieldDefaults: { + labelAlign: 'right', + labelWidth: 70 + }, + items: [{ + layout: 'column', + autoHeight: true, + items: [{ + layout: 'form', + columnWidth: 0.48, + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'datefield', + fieldLabel: '开始时间', + labelAlign: 'right', + id: 'startTime', + name: 'startTime', + editable: false, + format: 'Y-m-d H:i', + altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + allowBlank: false, + anchor: '95%' + }] + }, { + layout: 'form', + columnWidth: 0.48, + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'datefield', + fieldLabel: '结束时间', + labelAlign: 'right', + id: 'endTime', + name: 'endTime', + editable: false, + format: 'Y-m-d H:i', + altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + allowBlank: false, + anchor: '95%' + }] + }, { + layout: 'form', + columnWidth: 0.96, + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'combo', + fieldLabel: "科室分组", + valueField: 'id', + displayField: 'name', + store: orgUnitGroupStore, + allowBlank: false, + editable: false, + triggerAction: 'all', + queryParam: 'spell', + name: "orgUnitGroupID", + id: "orgUnitGroupID", + anchor: '95%' + }] + }] + }], + buttons: [{ + xtype: 'button', + text: '打印预览', + handler: function () { + getForeignTousseForReceivedData(1); + } + }, { + xtype: 'button', + text: '打印', + handler: function () { + getForeignTousseForReceivedData(0); + } + }, { + xtype: 'button', + text: '取消', + handler: function () { + printForeignTousseForReceivedWindow.close(); + } + }] + }); + + printForeignTousseForReceivedWindow = new top.Ext4.window.Window({ + id: 'printForeignTousseForReceivedWindow', + title: '打印待接收外来器械包', + height: 150, + width: 600, + resizable: false, + modal: true, + border: false, + plain: true, + layout: 'fit', + items: [form] + }); + + printForeignTousseForReceivedWindow.show(); + + Ext4.Ajax.request({ + url: WWWROOT + '/system/serverTimeAction!getCurrentTime.do', + params: { dateformat: 'yyyy-MM-dd' }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + var startDateTime = result.data.startDateTime; + var startTime = new Date(startDateTime) + startTime.setTime(startTime.getTime() - 24 * 60 * 60 * 1000); + var start = new Date(startTime).toCommonStr(); + var end = result.data.startDateTime; + top.Ext4.getCmp('startTime').setRawValue(start + ' 12:00'); + top.Ext4.getCmp('endTime').setRawValue(end + ' 12:00'); + } else { + showResult(result.message); + } + }, + failure: function (response, options) { + showResult('获取服务器时间失败!'); + } + }); +} + +//获取待接收外来器械包数据 +function getForeignTousseForReceivedData(printType) { + top.Ext4.MessageBox.show({ + title: '请等待', + msg: '打印中……', + width: 350, + progress: false, + closable: false + }); + var startDate = top.Ext4.getCmp('startTime').getRawValue(); + var endDate = top.Ext4.getCmp('endTime').getRawValue(); + var orgUnitGroupID = top.Ext4.getCmp('orgUnitGroupID').getValue(); + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!printWaitReceiveForeignTousse.do', + params: { + startDate: startDate + ':00', + endDate: endDate + ':00', + orgUnitGroupID: orgUnitGroupID + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + result.startDate = startDate; + result.endDate = endDate; + printForeignTousseForReceived(result, printType) + } else { + showResult(result.message); + } + hideMessageBox4(true); + }, + failure: function (response, options) { + showResult('获取服务器时间失败!'); + } + }); } \ No newline at end of file