Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.jsp =================================================================== diff -u -r36082 -r36743 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.jsp (.../useRecordView.jsp) (revision 36082) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.jsp (.../useRecordView.jsp) (revision 36743) @@ -303,6 +303,10 @@ + + + +
Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.js =================================================================== diff -u -r35850 -r36743 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.js (.../useRecordView.js) (revision 35850) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.js (.../useRecordView.js) (revision 36743) @@ -13,6 +13,7 @@ addAndEditUseRecord('', '', ''); setTimeout("top.Ext.getCmp('hospitalNum').focus(true)", 500); } + var departJsonStore = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do?related=false', @@ -22,7 +23,14 @@ totalProperty: 'totalCount', root: 'data' }, - [{ name: 'id', mapping: 'id' }, { name: 'name', mapping: 'name' }]) + [{ name: 'id', mapping: 'id' }, { name: 'name', mapping: 'name' }]), + listeners: { + load: function (thiz, records, options) { + if (records.length > 0) { + departJsonStore.insert(0, new allDepartItems({ 'orgUnitCoding': '', 'name': '全部' })); + } + } + } }); departJsonStore.load(); @@ -49,6 +57,30 @@ } }); +//BJ309YY-5:病人所属科室 +var ascriptionDepartmentItems = Ext.data.Record.create([ + { name: 'id', type: 'string' }, + { name: 'fullName', type: 'string' } +]); +var ascriptionDepartmentStore = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do?related=false', + method: 'POST' + }), + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data' + }, + [{ name: 'id', mapping: 'id' }, { name: 'name', mapping: 'name' }]), + listeners: { + load: function (thiz, records, options) { + if (records.length > 0) { + ascriptionDepartmentStore.insert(0, new ascriptionDepartmentItems({ 'id': '', 'name': '全部' })); + } + } + } +}); + /** * 批量设置状态为已回收 * @param ids @@ -1122,69 +1154,189 @@ location.href = WWWROOT + "/disinfectsystem/useRecord/exportUseRecord.jsp?useRecordIds=" + useRecordIds; } } - }, '-', { - text: '录入科室:' - }, { - xtype: 'multiSelect', - id: 'departCoding', - name: 'departCoding', - labelAlign: 'right', - valueField: 'orgUnitCoding', - displayField: 'name', - minChars: 0, - queryParam: 'spell', - allowBlank: true, - multiSelectIsClear: false, - store: useRecordDepartStore, - mode: 'remote', - triggerAction: 'all', - anchor: '95%', - listeners:{ - select: function (combo, record, index) { - //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 - if (record.get('name') == '全部') { - if (record.get(this.checkField)) { - combo.selectAll() + }, { id: 'formSubmitResult', xtype: 'hidden', value: formSubmitResultInit }]; + var dwrCallParams = null; + + Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function () { + }; + + var oneTbar = new Ext.Toolbar({ + items:[{ + text: '录入时间:' + }, { + xtype: 'datefieldWithMin', + id: 'enteringStartDate', + name: 'enteringStartDate', + 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', + format: 'Y-m-d H:i', + readOnly: true, + width: 150 + }, { + text: '-' + }, { + xtype: 'datefieldWithMin', + id: 'enteringEndDate', + name: 'enteringEndDate', + 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', + format: 'Y-m-d H:i', + readOnly: true, + width: 150 + }, { + text: '查询', + iconCls: 'icon_search', + handler: function () { + var enteringStartDate = Ext.getCmp('enteringStartDate').getRawValue(); + var enteringEndDate = Ext.getCmp('enteringEndDate').getRawValue(); + $Id('parm_s_enteringStartDate').value = enteringStartDate; + $Id('parm_s_enteringEndDate').value = enteringEndDate; + grid.dwrReload(); + } + }, '-', { + text: '录入科室:' + }, { + xtype: 'multiSelect', + id: 'departCoding', + name: 'departCoding', + labelAlign: 'right', + valueField: 'orgUnitCoding', + displayField: 'name', + minChars: 0, + queryParam: 'spell', + allowBlank: true, + multiSelectIsClear: false, + store: useRecordDepartStore, + mode: 'remote', + separator: ';', + triggerAction: 'all', + anchor: '95%', + listWidth: 250, + listeners:{ + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('name') == '全部') { + if (record.get(this.checkField)) { + combo.selectAll() + } else { + combo.deselectAll() + } + } + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('name') != '全部' && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); } else { - combo.deselectAll() + all.set(combo.checkField, false); } + + $Id('parm_s_departCodings').value = combo.getCheckedValue(); + grid.dwrReload(); + }, + blur:function(e){ + setTimeout(function(){ + var departName = Ext.getCmp('departCoding').getRawValue(); + if(departName == ''){ + $Id('parm_s_departCodings').value = ''; + grid.dwrReload(); + } + }, 200); } - - //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 - var selectAll = true; - combo.store.each(function(record) { - if (record.get('name') != '全部' && !record.get(this.checkField)) { - selectAll = false; - return; + } + }, { + text: '患者所在科室:' + }, { + xtype: 'multiSelect', + id: 'ascriptionDepartment', + name: 'ascriptionDepartment', + valueField: 'id', + displayField: 'name', + minChars: 0, + queryParam: 'spell', + allowBlank: true, + multiSelectIsClear: false, + store: ascriptionDepartmentStore, + mode: 'remote', + separator: ';', + triggerAction: 'all', + anchor: '95%', + listWidth: 250, + listeners:{ + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('name') == '全部') { + if (record.get(this.checkField)) { + combo.selectAll() + } else { + combo.deselectAll() + } } - }, combo); - - var all = combo.store.getAt(0); - if (selectAll) { - all.set(combo.checkField, true); - } else { - all.set(combo.checkField, false); - } - - $Id('parm_s_departCodings').value = combo.getCheckedValue(); - grid.dwrReload(); - }, - blur:function(e){ - setTimeout(function(){ - var departName = Ext.getCmp('departCoding').getRawValue(); - if(departName == ''){ - $Id('parm_s_departCodings').value = ''; - grid.dwrReload(); + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('name') != '全部' && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); + } else { + all.set(combo.checkField, false); } - }, 200); + + $Id('parm_s_ascriptionDepartment').value = combo.getCheckedValue(); + grid.dwrReload(); + }, + blur:function(e){ + setTimeout(function(){ + var ascriptionDepartment = Ext.getCmp('ascriptionDepartment').getRawValue(); + if(ascriptionDepartment == ''){ + $Id('parm_s_ascriptionDepartment').value = ''; + grid.dwrReload(); + } + }, 200); + } } - } - }, { id: 'formSubmitResult', xtype: 'hidden', value: formSubmitResultInit }]; - var dwrCallParams = null; + }, { + text: '状态:' + }, { + xtype: 'multiSelect', + id: 'status', + name: 'status', + valueField: 'typeName', + displayField: 'typeName', + mode: 'local', + triggerAction: 'all', + multiSelectIsClear: false, + editable: false, + separator: ';', + store: new Ext.data.SimpleStore({ + fields: ['typeName'], + autoLoad: true, + data: [['全部'],['未审核'],['已审核'],['已申请']] + }), + width:150, + anchor: '90%', + listeners:{ + select: function (combo, record, index) { + $Id('parm_s_status').value = combo.getCheckedValue(); + grid.dwrReload(); + } + } + }] + }) - Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function () { - }; - grid = new Ext.ux.ForgonPageGrid({ tbar: tbar, pageSize: 20, @@ -1199,7 +1351,12 @@ autoExpandColumn: 'autoWidth', searchDisableIndexes: ['departNameOfpatient'], renderTo: 'gridDiv', - frame: false + frame: false, + listeners : { + render : function(){ + oneTbar.render(this.tbar); //add one tbar + } + } }, readerDetail, UseRecordTableManager.findUseRecordTableList, Index: ssts-web/src/main/webapp/ext/js/multiSelectCombo.js =================================================================== diff -u -r35305 -r36743 --- ssts-web/src/main/webapp/ext/js/multiSelectCombo.js (.../multiSelectCombo.js) (revision 35305) +++ ssts-web/src/main/webapp/ext/js/multiSelectCombo.js (.../multiSelectCombo.js) (revision 36743) @@ -77,7 +77,8 @@ getCheckedDisplay: function () { if (this.showRawValue) { var re = new RegExp(this.separator, "g"); - if (this.getCheckedValue(this.displayField).split(',')[0] !== '全部' || this.getCheckedValue(this.displayField).split(',')[0] == -1 || this.getCheckedValue(this.displayField).split(',')[0] == '-1') { + var separator = this.separator; + if (this.getCheckedValue(this.displayField).split(separator)[0] !== '全部' || this.getCheckedValue(this.displayField).split(separator)[0] == -1 || this.getCheckedValue(this.displayField).split(separator)[0] == '-1') { return this.getCheckedValue(this.displayField).replace(re, this.separator + ' '); } else { return '全部'