Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js
===================================================================
diff -u -r17965 -r18603
--- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 17965)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationView.js (.../operationReservationView.js) (revision 18603)
@@ -1,7 +1,20 @@
var entityName = "手术预约管理";
var grid;
var operationReservationWindow;
+var lastSelIdArray = [];
+function initQueryValueAndReload() {
+ setQueryValues();
+ grid.getStore().lastOptions.params['start'] = 0;
+ grid.dwrReload();
+}
+function setQueryValues(){
+ $Id('parm_s_committedStatus').value = $Id('query_committedStatus').value;
+ $Id('parm_s_invoiceStatus').value = $Id('query_invoiceStatus').value;
+ $Id('parm_s_operatingRoom').value = $Id('query_operatingRoom').value;
+ $Id('parm_s_operationTime_start').value = $Id('query_operationTime_start').value;
+ $Id('parm_s_operationTime_end').value = $Id('query_operationTime_end').value;
+}
//明细grid删除按钮
function renderDeleteButton(v,p,record,rowIndex){
return "";
@@ -818,6 +831,7 @@
}
function editRecord(id,committedStatus){
+ lastSelIdArray = [id];
editOperationReservation(id,committedStatus);
}
@@ -858,6 +872,156 @@
return "
" + status + "
"; } + var form = new Ext.Panel({ + title : '', + layout : 'table', + frame : true, + region : 'north', + border : false, + bodyBorder : false, + layoutConfig : {columns : 2}, + autoScroll : true, + height : 100, + // height : fontSize == 12 ? 88 : 130, + items : [{ + width : 980, + layout : 'column', + items:[{ + columnWidth : .33, + layout : 'form', + labelWidth : 110, + labelAlign:"right", + items : [{ + xtype : 'combo', + id : 'query_committedStatus', + name : 'query_committedStatus', + valueField : 'value', + displayField : 'value', + anchor : '95%', + fieldLabel : '提交状态', + mode : 'local', + readOnly : true, + value : '未提交', + triggerAction : 'all', + forceSelection : true, + store : new Ext.data.SimpleStore({ + fields : ['value'], + data : [['全部'],['已提交'],['未提交']] + }) + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 110, + labelAlign:"right", + items : [{ + xtype : 'combo', + id : 'query_invoiceStatus', + name : 'query_invoiceStatus', + valueField : 'value', + displayField : 'value', + anchor : '95%', + fieldLabel : '发货状态', + mode : 'local', + readOnly : true, + value : '全部', + triggerAction : 'all', + forceSelection : true, + store : new Ext.data.SimpleStore({ + fields : ['value'], + data : [['全部'],['已发货'],['部分发货'],['未发货']] + }) + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 110, + labelAlign:"right", + items : [{ + xtype : 'textfield', + fieldLabel : '手术间', + name : 'query_operatingRoom', + id : 'query_operatingRoom', + anchor : '95%', + listeners : { + specialkey : function(field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { +// initQueryValueAndReload(); + } + } + } + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 110, + labelAlign:"right", + items : [{ + xtype : 'datefield', + fieldLabel : '手术开始日期', + name : 'query_operationTime_start', + id : 'query_operationTime_start', + readOnly : true, + value: tomorrow, + 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', + editable : false, + format : 'Y-m-d', + anchor : '95%' + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 110, + labelAlign:"right", + items : [{ + xtype : 'datefield', + fieldLabel : '手术结束日期', + name : 'query_operationTime_end', + id : 'query_operationTime_end', + readOnly : true, + value: tomorrow, + 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', + editable : false, + format : 'Y-m-d', + anchor : '95%' + }] + }] + },{ + width : 150, + layout : 'column', + items : [{ + columnWidth : .5, + layout :'form', + items : [{ + xtype : 'button', + text : '查询', + minWidth : 50, + iconCls : 'icon_search', + handler : function() { + lastSelIdArray = []; + initQueryValueAndReload(); + } + }] + },{ + columnWidth : .5, + layout :'form', + items : [{ + xtype : 'button', + text : '重置', + minWidth : 50, + iconCls : 'icon_set', + handler : function() { //查询条件全部重置 + $Id('query_committedStatus').value = "未提交"; + $Id('query_invoiceStatus').value = "全部"; + $Id('query_operatingRoom').value = ""; + $Id('query_operationTime_start').value = ""; + $Id('query_operationTime_end').value = ""; + } + }] + }] + }] + }); + var columns = [ //{header : "流水号",width : 80,dataIndex : 'serialNumber', renderer : modifyRecord}, {header : "手术台次",width : 120,dataIndex : 'consoleName'}, @@ -902,6 +1066,7 @@ {type: 'string', dataIndex: 'serialNumber'}, {type: 'string', dataIndex: 'depart'}, {type: 'string', dataIndex: 'operationName'}, + {type: 'boolean', dataIndex: 'committedStatus'}, {type: 'string', dataIndex: 'applicant'}, {type: 'string', dataIndex: 'doctors'}, {type: 'string', dataIndex: 'operatingRoom'}, @@ -932,6 +1097,7 @@ text : '刷新列表', iconCls : 'btn_ext_refresh1', handler : function() { + lastSelIdArray = []; grid.dwrReload(); } },'-', { @@ -958,6 +1124,10 @@ defaultSortDirection : 'ASC', isCheckboxSelectionModel : true, rememberSelected : false, + showLoadMask:true, + userOnLoad : function(store, records, options){ + selectRowsByIdsArray(store, records,lastSelIdArray); + }, isShowSearchField : true, columns : columns, plugins: filters, @@ -1013,7 +1183,7 @@ var viewport = new Ext.Viewport( { layout : 'border', - items : [{ + items : [form,{ region : 'center', margins : '0 0 0 0', layout : 'fit', Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/operationreservation/dwr/table/OperationReservationTableManager.java =================================================================== diff -u -r17965 -r18603 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/operationreservation/dwr/table/OperationReservationTableManager.java (.../OperationReservationTableManager.java) (revision 17965) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/operationreservation/dwr/table/OperationReservationTableManager.java (.../OperationReservationTableManager.java) (revision 18603) @@ -1,10 +1,15 @@ package com.forgon.disinfectsystem.operationreservation.dwr.table; +import java.util.Date; import java.util.List; import java.util.Map; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DateUtils; + import com.forgon.Constants; import com.forgon.component.grid.GridManager; +import com.forgon.databaseadapter.service.DateQueryAdapter; import com.forgon.directory.acegi.tools.AcegiHelper; import com.forgon.disinfectsystem.entity.basedatamanager.operationRoom.OperationRoom; import com.forgon.disinfectsystem.entity.invoicemanager.InvoicePlan; @@ -22,6 +27,8 @@ private OperationReservationManager operationReservationManager; + private DateQueryAdapter dateQueryAdapter; + public void setOperationReservationManager( OperationReservationManager operationReservationManager) { this.operationReservationManager = operationReservationManager; @@ -31,15 +38,56 @@ this.gridManager = gridManager; } + public void setDateQueryAdapter(DateQueryAdapter dateQueryAdapter) { + this.dateQueryAdapter = dateQueryAdapter; + } + public String findOperationReservationTableList( Map