Index: ssts-web/src/main/webapp/disinfectsystem/interfere/packing/historyPackingView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/interfere/packing/historyPackingView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/packing/historyPackingView.js (revision 20709) @@ -0,0 +1,428 @@ +var recordGrid; + +//申请科室Store +var appDepartJsonStoreExt2 = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getApplicationDepartJson.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + root : 'data' + },[ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ] + ) +}); +//结算科室Store +var departJsonStoreExt2 = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + root : 'data' + },[ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ] + ) +}); + +//灭菌炉 +var sterilizerJsonStore = new Ext.data.SimpleStore({ + fields : [ 'sterilizerName' ], + url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getAllSterilizer.do?includeNone=yes' +}); + +var sterilizerTypeStore = new Ext.data.SimpleStore({ + fields : [ 'id','typeName' ], + url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getSterilizerType.do' +}); + +var packageTypeStore = new Ext.data.SimpleStore({ + fields : [ 'typeName' ], + url : WWWROOT + '/disinfectSystem/baseData/expirationDateInfoAction!getPackageType.do' +}); + +function loadPeopleByStaffNum(staffNumField){ + var staffNum = staffNumField.getValue(); + if(staffNum){ + UserTableManager.getUserObjByName(staffNum,function(user){ + if(user){ + var fullName = user.split(",")[0]; + Ext.getCmp('packer').setValue(fullName); + }else{ + showResult('找不到该员工号所对应的人员信息'); + } + }); + } +} +function modifyPackingTime(grid) { + var records = recordGrid.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择要修改的记录!"); + return false; + } + if (records.length > 1) { + showResult("一次只能修改一个记录!"); + return false; + } + var id = records[0].data['id']; + var packingTime = records[0].data['packTime']; + if(modifyPackingTime_tousseInstanceWindow){ + return; + } + showModifyPackingTimeWindow(id,packingTime); +}; +Ext.onReady(function() { + Ext.QuickTips.init(); + Ext.apply(Ext.QuickTips.getQuickTip(), { + showDelay: 0, + trackMouse: true, + hideDelay: true, + closable: false, + autoHide: false, + draggable: true, + dismissDelay: 0 + }); + + top.Ext4.tip.QuickTipManager.init(); + top.Ext4.apply(top.Ext4.tip.QuickTipManager.getQuickTip(), { + dismissDelay: 0, + showDelay: 0 + }); + + Ext.BLANK_IMAGE_URL = WWWROOT + '/ext/resources/images/default/s.gif'; + + var tousseStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchInsideTousseData.do', + method : 'GET' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'spelling',mapping : 'spelling'}, + {name : 'name',mapping : 'name'}, + {name : 'externalCode',mapping : 'externalCode'}, + {name : 'displayName',mapping : 'displayName'}, + {name : 'minApplyAmount',mapping : 'minApplyAmount'}, + {name : 'unit',mapping : 'unit'}, + {name : 'amount',mapping : 'amount'} + ]) + }); + + var recordColumns = [ + {header : "科室",width : 200,dataIndex : 'depart'}, + {header : "装配记录时间",width : 150,dataIndex : 'packTime',renderer:myDateFormatBySecond}, + {header : "器械包",width : 250,dataIndex : 'tousseName',renderer:filterUnderScoreName}, + {header : "数量",width : 80,dataIndex : 'amount'}, + {id:'operationRemark',header : "配包者",width : 100,dataIndex : 'packer'} + ]; + + var recordReaderDetail = [ + {name : 'id'}, + {name : 'orgUnitName'}, + {name : 'depart'}, + {name : 'packTime'}, + {name : 'packer'}, + {name : 'tousseName'}, + {name : 'isTraceable'}, + {name : 'amount'} + ]; + + var recordFilters = new Ext.grid.GridFilters({ + filters:[ + {type: 'numeric', dataIndex: 'id'}, + {type: 'date', dataIndex: 'packTime'}, + {type: 'string', dataIndex: 'packer'}, + {type: 'string', dataIndex: 'depart'}, + {type: 'string', dataIndex: 'tousseName'}, + {type: 'numeric', dataIndex: 'amount'} + ] + }); + + var tbar = [{ + text : '修改装配时间', + iconCls : 'btn_ext_application_edit', + id : 'editTbar', + handler : function() { + modifyPackingTime(); + } + }]; + + recordGrid = new Ext.ux.ForgonPageGrid({ + pageSize : 20, + defaultSortField : 'packTime', + defaultSortDirection : 'DESC', + isCheckboxSelectionModel : true, + rememberSelected : false, + isShowSearchField : false, + columns : recordColumns, + plugins: recordFilters, + autoExpandColumn : 'operationRemark', + frame : false, + tbar: tbar, + border : false + }, + recordReaderDetail, + PackingTableManager.findHistoryPackingRecordTableList, + null + ); + + var forPanelWidth = document.body.offsetWidth; + + var dt = new Date(); + var startDayofMonth = dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/01"; + + var form = new Ext.form.FormPanel({ + title : '历史装配记录', + region : 'north', + labelAlign : 'right', + buttonAlign : 'center', + collapsible : true, + collapseMode : 'mini', + split : true, + border : 0, + frame : true, + bodyStyle : 'padding:0px auto;margin:0px', + height : 90, + items : [{ + layout : 'column', + height : 48, + labelWidth : 70, + items : [{ + width : 220, + layout : 'form', + labelWidth : 80, + items : [{ + xtype : 'datefield', + id : 'startDateSearch', + name : 'startDateSearch', + fieldLabel : '开始时间', + 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', + readOnly : false, + width : 130, + format : 'Y-m-d', + value : new Date(startDayofMonth) + }] + }, { + width : 220, + layout : 'form', + labelWidth : 80, + items : [{ + xtype : 'datefield', + id : 'endDateSearch', + name : 'endDateSearch', + fieldLabel : '结束时间', + 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', + readOnly : false, + width : 130, + value : new Date(), + format : 'Y-m-d' + }] + }, { + width : 250, + layout : 'form', + labelWidth : 80, + items : [{ + xtype : 'textfield', + id : 'packer', + name : 'packer', + fieldLabel : '配包者', + width : 150 + }] + }, { + width : 250, + layout : 'form', + labelWidth : 80, + items : [{ + xtype : 'textfield', + id : 'packerNumber', + name : 'packerNumber', + fieldLabel : '工号', + width : 150 + }] + },{ + width : 300, + layout : 'form', + labelWidth : 120, + items : [{ + xtype : 'textfield', + fieldLabel : '灭菌篮筐条码', + allowBlank : true, + name : "inputBarcode", + id : "inputBarcode", + width : 150, +// anchor : '100%', + listeners : { + render : function(p) { + p.getEl().on('keypress',function(e) {//可输入或扫描的类型有灭菌架、灭菌筐、灭菌炉、灭菌程序、器械包;20151102新增加虚拟篮筐 + if (e.getKey() == 13) {//回车键 + var barcode = Ext.getCmp('inputBarcode').getValue(); + Ext.getCmp('inputBarcode').setValue(""); + if(!isUndefinedOrNullOrEmpty(barcode)){ +// sterilizationColumnTree.getEl().mask("数据重新加载中,请稍等!"); + Ext.Ajax.request( { + url : WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!getTousseInstanceIdsByBarcode.do', + params : { + barcode : barcode + }, + success : function(response, options) { +// sterilizationColumnTree.getEl().unmask(); + var result = Ext.decode(response.responseText); + if(result.error){ + showResult(result.message); + return; + } + var ids = result.ids; + rePrintBarcodeWinForScanBasket(ids,SSTS_HistoryPacking_Update,SSTS_HistoryPacking_Change_Patient); + }, + failure : function(response, options) { + showResult("请求超时,请稍后重试!"); + } + }); + } + } + }); + p.getEl().on('focus',function(e) { + Ext.getCmp('inputBarcode').setValue(""); + }); + } + } + }] + },{ + width : 300, + layout : 'form', + labelWidth : 70, + items : [{ + xtype : 'combo', + id : 'tousseName', + name : 'tousseName', + fieldLabel : '器械包名称', + queryParam : 'spell', + minChars : 0, + valueField : 'name', + displayField : 'displayName', + store : new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getAllTousseDefinitionData.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'spelling',mapping : 'spelling'}, + {name : 'name',mapping : 'name'}, + {name : 'displayName',mapping : 'displayName'}, + {name : 'amount',mapping : 'amount'}] + ) + }), + forceSelection : false, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + anchor : '95%', + listeners : { + select : function(combo, record, index) { + combo.setValue(record.data.name); + } + } + }] + },{ + width : 300, + layout : 'form', + labelWidth : 35, + items : [{ + xtype : 'combo', + id : 'orgUnit', + name : 'orgUnit', + fieldLabel : '科室', + queryParam : 'spell', + minChars : 0, + valueField : 'name', + displayField : 'name', + store : appDepartJsonStoreExt2, + forceSelection : false, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + anchor : '95%' + }] + }, { + width : 80, + layout : 'form', + items : [{ + xtype : 'button', + text : '查询', + minWidth : 70, + iconCls : 'icon_search', + handler : function() { + initQueryValueAndReload(); + } + }] + }, { + width : 80, + layout : 'form', + items : [{ + xtype : 'button', + text : '重置', + minWidth : 70, + iconCls : 'icon_set', + handler : function() { + $Id('startDateSearch').value = ""; + $Id('endDateSearch').value = ""; + $Id('packer').value = ""; + $Id('tousseName').value = ""; + $Id('orgUnit').value = ""; + } + }] + }] + }] + }); + + var viewport = new Ext.Viewport({ + layout : 'border', + items : [form,{ + region : 'center', + margins : '0 0 0 0', + layout : 'fit', + items : recordGrid + }] + }); + + function initQueryValueAndReload() { + var startDate = $Id('startDateSearch').value; + var endDate = $Id('endDateSearch').value; + var packer = Ext.getCmp('packer').getValue(); + var packerNumber = Ext.getCmp('packerNumber').getValue(); + var tousseName = $Id('tousseName').value; + if(startDate || endDate){ + if(!startDate){ + showResult("请录入开始时间"); + return; + }else if(!endDate){ + showResult("请录入结束时间"); + return; + }else if(!compareDate(startDate,endDate)){ + showResult("开始时间不能大于结束时间"); + return; + } + } + + $Id('parm_s_startDateSearch').value = startDate; + $Id('parm_s_endDateSearch').value = endDate; + $Id('parm_s_packer').value = packer; + $Id('parm_s_packerNumber').value = packerNumber; + $Id('parm_s_tousseName').value = tousseName; + $Id('parm_s_orgUnit').value = $Id('orgUnit').value;; + recordGrid.dwrReload(); + } +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/interfere/packing/historyPackingView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/interfere/packing/historyPackingView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/packing/historyPackingView.jsp (revision 20709) @@ -0,0 +1,101 @@ +<%@page import="com.forgon.disinfectsystem.entity.basedatamanager.supplier.Supplier,com.forgon.disinfectsystem.entity.basedatamanager.supplyroomconfig.SupplyRoomConfig"%> +<%@page import="com.forgon.disinfectsystem.basedatamanager.supplyroomconfig.service.SupplyRoomConfigManager"%> +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> +<% + Calendar calendar = Calendar.getInstance(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + String today = sdf.format(calendar.getTime()); + calendar.set(Calendar.DAY_OF_MONTH, 1); + String firstDayOfMonth = sdf.format(calendar.getTime()); +%> + +<%@page import="java.util.Date"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@page import="java.util.Calendar"%> + + +装配管理 + + + + + + + + + + + + + + + + +<% + SupplyRoomConfigManager supplyRoomConfigManager = (SupplyRoomConfigManager)SpringBeanManger.getBean("supplyRoomConfigManager"); + LoginUserData loginUser = AcegiHelper.getLoginUser(); + SupplyRoomConfig syscfg = supplyRoomConfigManager.getSystemParamsObj(); + + request.setAttribute("hospitalName", loginUser.getHospitalName()); + request.setAttribute("foreignDefaultLabelpaper", syscfg.getBarcodePaperType()); +%> + + + + + + + + + + + + + +<%@ include file="/disinfectsystem/print/print.jsp"%> + + + + + + + + + +
+ + + + + + + +
+ + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/interfere/packing/modifyPackingTime.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/interfere/packing/modifyPackingTime.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/packing/modifyPackingTime.js (revision 20709) @@ -0,0 +1,93 @@ +var modifyPackingTime_tousseInstanceWindow = null; + +function showModifyPackingTimeWindow(id,packingTime){ + + function closeWin(){ + modifyPackingTime_tousseInstanceWindow.close(); + modifyPackingTime_tousseInstanceWindow = null; + } + var formObj = new top.Ext.FormPanel({ + id:'formObj', + frame : true, + bodyStyle : 'padding:5px 5px 0px 5px', + labelSeparator : ':', + height:250, + labelAlign : 'right', + items : [{ + layout : 'column', + items : [{ + xtype:'hidden', + id : 'id', + name : 'id' + },{ + xtype:'hidden', + id : 'sterilizationRecordFinishConfirm', + name : 'sterilizationRecordFinishConfirm' + },{ + layout : 'form', + columnWidth : .5, + cls:'edit-part2-labelwidth', + items : [{ + id : 'packingTime1', + name : 'packingTime1', + xtype : 'datefieldWithMin', + format : 'Y-m-d H:i:s', + fieldLabel : '装配时间', + anchor : '100%', + allowBlank : false + }] + }] + }], + buttons : [ + { + text : '保存', + handler : function() { + var formObj = top.Ext.getCmp('formObj'); + if (!formObj.form.isValid()) { + showResult('请正确填写表单各值'); + return false; + } + + formObj.form.submit({ + url: WWWROOT + '/disinfectSystem/packingAction!modifyPackingTime.do', + method:'POST', + waitMsg:'正在保存数据,请稍候', + waitTitle:'提交表单', + success:function(form,action){ + var result = Ext.decode(action.response.responseText); + if(result.success){ + showResult(result.message); + } + recordGrid.dwrReload(); + closeWin(); + }, + failure:function(form, action){ + var result = Ext.decode(action.response.responseText); + if(!result.success){ + showResult(result.message); + } + } + }); + } + },{ + text : '取消', + handler : function() { + closeWin(); + } + } + ] + }); + + modifyPackingTime_tousseInstanceWindow = new top.Ext.Window( { + id : 'tousseInstanceWin', + layout : 'fit', + title : '装配记录信息', + width : 580, + border : false, + items : formObj + }); + // 初始化灭菌记录表单信息 + top.Ext.getCmp('id').setValue(id); + top.Ext.getCmp('packingTime1').setValue(packingTime); + modifyPackingTime_tousseInstanceWindow.show(); +} \ No newline at end of file