Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js
===================================================================
diff -u -r27739 -r27884
--- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js (.../supplyRoomTypeForm.js) (revision 27739)
+++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeForm.js (.../supplyRoomTypeForm.js) (revision 27884)
@@ -193,8 +193,15 @@
for ( var i = 0; i < sourceStore.getCount(); i++) {
var record = sourceStore.getAt(i);
var tempName = record.get('name');
- if(departmentName == tempName){
- isExist = true;
+ var tempDepartId = record.get('departId');
+ if(departmentName == tempName && departId == tempDepartId){
+ if(record.json){
+ if(parseInt(record.json.status) == 1){
+ isExist = true;
+ }
+ }else {
+ isExist = true;
+ }
break;
}
}
@@ -2243,251 +2250,271 @@
})
]
});
+
+ var supplyRoomStoreApplyGrid = new Ext.grid.EditorGridPanel({
+ id : 'supplyRoomApply',
+ store : supplyRoomStoreApply,
+ cm : cmApply,
+ autoScroll:true,
+ frame : false,
+ viewConfig: {
+ forceFit:true,
+ getRowClass: function(record, rowIndex){
+ return record.get("isFind") ? "resultList" : "";
+ }
+ },
+ width:document.body.offsetWidth-12,
+ height:document.body.offsetHeight-94,
+ bodyStyle : 'border:1px solid #9cbaef',
+ clicksToEdit : 1,
+ selModel : new Ext.grid.RowSelectionModel({
+ singleSelect : false
+ }),
+ tbar : [{
+ text : '选择科室 :'
+ },{
+ xtype : 'combo',
+ fieldLabel : '申请科室',
+ id : 'departNameApply',
+ name : 'departNameApply',
+ queryParam : 'spell',
+ minChars : 0,
+ valueField : 'id',
+ displayField : 'name',
+ // width : 100,
+ store : departJsonStore,
+ listWidth : 300,
+ // matchFieldWidth: false,
+ forceSelection : true,
+ lazyInit : true,
+ triggerAction : 'all',
+ hideTrigger : true,
+ typeAhead : false,
+ allowBlank : true,
+ anchor : '97%'
+ },{
+ text : '添加',
+ iconCls : 'btn_ext_add',
+ handler : function() {
+ var name =Ext.getCmp('departNameApply').getRawValue();
+ var departId =Ext.getCmp('departNameApply').getValue();
+ addGridItem(supplyRoomStoreApply,name,departId,"departNameApply");
+ }
+ },{
+ text : '添加全部',
+ iconCls : 'icon_systemset',
+ handler : function() {
+ Ext.Ajax.request({
+ url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do',
+ success : function(response, options) {
+ var result = Ext.decode(response.responseText);
+ var lenth = result.data.length;
+ for(var index = 0;index < lenth;index++){
+ var name = result.data[index].name;
+ var departId = result.data[index].id;
+ addGridItem(supplyRoomStoreApply,name,departId,"");
+ }
+ },
+ failure : function(response, options) {
+ }
+ });
+ }
+ },{
+ text : '删除',
+ iconCls : 'btn_ext_application_del',
+ handler : function() {
+
+ removeGridItem('supplyRoomApply');
+ }
+ },{
+
+ text : '删除全部',
+ iconCls : 'btn_ext_application_del',
+ handler : function() {
+
+ top.Ext.MessageBox.confirm("请确认","确定要删除所有申领科室吗?",function(btn){
+ if(btn == "yes"){
+ supplyRoomStoreApply.removeAll();
+ }
+ });
+ }
+ },{
+ text : '复制到结算科室',
+ iconCls : 'icon_systemset',
+ handler : function() {
+ var count = supplyRoomStoreApply.getCount();
+ for(var i = 0;i < count;i++){
+ var record = supplyRoomStoreApply.getAt(i);
+ var name = record.data['name'];
+ var departId = record.data['departId'];
+ addGridItem(supplyRoomStoreSettleAccount, name, departId, "");
+ }
+ }
+ },
+ // {
+ // text : '上移到顶部',
+ // handler : function() {
+ // moveTopGridItem3();
+ // }
+ // },{
+ // text : '上移',
+ // handler : function() {
+ // moveUpGridItem3();
+ // }
+ // },{
+ // text : '下移',
+ // handler : function() {
+ // moveDownGridItem3();
+ // }
+ // },{
+ // text : '下移到底部',
+ // handler : function() {
+ // moveBottomGridItem3();
+ // }
+ // },
+ {
+ text : '搜索科室名称:'
+ },{
+ xtype : 'textfield',
+ id : 'keyWordApply',
+ anchor : '100%',
+ allowBlank : true,
+ listeners : {
+ specialkey : function(field, ee) {
+ if (ee.getKey() == Ext.EventObject.ENTER) {
+ searchSupplyRoomStore(supplyRoomStoreApply, 'keyWordApply', 'queryResultApply');
+ }
+ }
+ }
+ },{
+ xtype: 'button',
+ text: '查询',
+ iconCls: 'icon_search',
+ handler: function () {
+ searchSupplyRoomStore(supplyRoomStoreApply, 'keyWordApply', 'queryResultApply');
+ }
+ },'->',{
+ text : '',
+ id : 'queryResultApply'
+ }]
+ })
+
+ supplyRoomStoreApplyGrid.getStore().on('load',function(items,records){
+ items.each(function(item,key){
+ if(parseInt(item.json.status) == 0){
+ supplyRoomStoreApplyGrid.getView().getRow(key).style.display='none';
+ }
+ })
+ })
+
tabsItemArr.push({
title: '科室申领配置',
layout:'fit',
items:[
- new Ext.grid.EditorGridPanel({
- id : 'supplyRoomApply',
- store : supplyRoomStoreApply,
- cm : cmApply,
- autoScroll:true,
- frame : false,
- viewConfig: {
- forceFit:true,
- getRowClass: function(record, rowIndex){
- return record.get("isFind") ? "resultList" : "";
- }
- },
- width:document.body.offsetWidth-12,
- height:document.body.offsetHeight-94,
- bodyStyle : 'border:1px solid #9cbaef',
- clicksToEdit : 1,
- selModel : new Ext.grid.RowSelectionModel({
- singleSelect : false
- }),
- tbar : [{
- text : '选择科室 :'
- },{
- xtype : 'combo',
- fieldLabel : '申请科室',
- id : 'departNameApply',
- name : 'departNameApply',
- queryParam : 'spell',
- minChars : 0,
- valueField : 'id',
- displayField : 'name',
- // width : 100,
- store : departJsonStore,
- listWidth : 300,
- // matchFieldWidth: false,
- forceSelection : true,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : true,
- typeAhead : false,
- allowBlank : true,
- anchor : '97%'
- },{
- text : '添加',
- iconCls : 'btn_ext_add',
- handler : function() {
- var name =Ext.getCmp('departNameApply').getRawValue();
- var departId =Ext.getCmp('departNameApply').getValue();
- addGridItem(supplyRoomStoreApply,name,departId,"departNameApply");
- }
- },{
- text : '添加全部',
- iconCls : 'icon_systemset',
- handler : function() {
- Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do',
- success : function(response, options) {
- var result = Ext.decode(response.responseText);
- var lenth = result.data.length;
- for(var index = 0;index < lenth;index++){
- var name = result.data[index].name;
- var departId = result.data[index].id;
- addGridItem(supplyRoomStoreApply,name,departId,"");
- }
- },
- failure : function(response, options) {
- }
- });
- }
- },{
-
- text : '删除',
- iconCls : 'btn_ext_application_del',
- handler : function() {
-
- removeGridItem('supplyRoomApply');
- }
- },{
-
- text : '删除全部',
- iconCls : 'btn_ext_application_del',
- handler : function() {
-
- top.Ext.MessageBox.confirm("请确认","确定要删除所有申领科室吗?",function(btn){
- if(btn == "yes"){
- supplyRoomStoreApply.removeAll();
- }
- });
- }
- },{
- text : '复制到结算科室',
- iconCls : 'icon_systemset',
- handler : function() {
- var count = supplyRoomStoreApply.getCount();
- for(var i = 0;i < count;i++){
- var record = supplyRoomStoreApply.getAt(i);
- var name = record.data['name'];
- var departId = record.data['departId'];
- addGridItem(supplyRoomStoreSettleAccount, name, departId, "");
- }
- }
- },
- // {
- // text : '上移到顶部',
- // handler : function() {
- // moveTopGridItem3();
- // }
- // },{
- // text : '上移',
- // handler : function() {
- // moveUpGridItem3();
- // }
- // },{
- // text : '下移',
- // handler : function() {
- // moveDownGridItem3();
- // }
- // },{
- // text : '下移到底部',
- // handler : function() {
- // moveBottomGridItem3();
- // }
- // },
- {
- text : '搜索科室名称:'
- },{
- xtype : 'textfield',
- id : 'keyWordApply',
- anchor : '100%',
- allowBlank : true,
- listeners : {
- specialkey : function(field, ee) {
- if (ee.getKey() == Ext.EventObject.ENTER) {
- searchSupplyRoomStore(supplyRoomStoreApply, 'keyWordApply', 'queryResultApply');
- }
- }
- }
- },{
- xtype: 'button',
- text: '查询',
- iconCls: 'icon_search',
- handler: function () {
- searchSupplyRoomStore(supplyRoomStoreApply, 'keyWordApply', 'queryResultApply');
- }
- },'->',{
- text : '',
- id : 'queryResultApply'
- }]
- })
+ supplyRoomStoreApplyGrid
]
});
+
+ var supplyRoomStoreSettleAccountGrid = new Ext.grid.EditorGridPanel({
+ id : 'supplyRoomSettleAccount',
+ store : supplyRoomStoreSettleAccount,
+ cm : cmSettleAccount,
+ autoExpandColumn : 'deleteItem',
+ enableHdMenu : false,
+ frame : false,
+ viewConfig: {
+ forceFit:true,
+ getRowClass: function(record, rowIndex){
+ return record.get("isFind") ? "resultList" : "";
+ }
+ },
+ width:document.body.offsetWidth-12,
+ height:document.body.offsetHeight-94,
+ bodyStyle : 'border:1px solid #9cbaef',
+ clicksToEdit : 1,
+ selModel : new Ext.grid.RowSelectionModel({
+ singleSelect : false
+ }),
+ tbar : [{
+ text : '选择科室 :'
+ },{
+ xtype : 'combo',
+ id : 'departNameSettleAccount',
+ name : 'departNameSettleAccount',
+ queryParam : 'spell',
+ minChars : 0,
+ valueField : 'id',
+ displayField : 'name',
+ store : departJsonStore,
+ forceSelection : true,
+ listWidth : 300,
+ lazyInit : true,
+ triggerAction : 'all',
+ hideTrigger : true,
+ typeAhead : false,
+ allowBlank : true,
+ anchor : '97%'
+ },{
+ text : '添加',
+ iconCls : 'btn_ext_add',
+ handler : function() {
+ var name =Ext.getCmp('departNameSettleAccount').getRawValue();
+ var departId =Ext.getCmp('departNameSettleAccount').getValue();
+ addGridItem(supplyRoomStoreSettleAccount,name,departId,"departNameSettleAccount");
+ }
+ },
+ {
+ text : '删除全部',
+ iconCls : 'btn_ext_application_del',
+ handler : function() {
+
+ top.Ext.MessageBox.confirm("请确认","确定要删除所有结算科室吗?",function(btn){
+ if(btn == "yes"){
+ supplyRoomStoreSettleAccount.removeAll();
+ }
+ });
+ }
+ },{
+ text : '搜索科室名称:'
+ },{
+ xtype : 'textfield',
+ id : 'keyWordSettleAccount',
+ anchor : '100%',
+ allowBlank : true,
+ listeners : {
+ specialkey : function(field, ee) {
+ if (ee.getKey() == Ext.EventObject.ENTER) {
+ searchSupplyRoomStore(supplyRoomStoreSettleAccount, 'keyWordSettleAccount', 'queryResultSettleAccount');
+ }
+ }
+ }
+ },{
+ xtype: 'button',
+ text: '查询',
+ iconCls: 'icon_search',
+ handler: function () {
+ searchSupplyRoomStore(supplyRoomStoreSettleAccount, 'keyWordSettleAccount', 'queryResultSettleAccount');
+ }
+ },'->',{
+ text : '',
+ id : 'queryResultSettleAccount'
+ }]
+ })
+
+ supplyRoomStoreSettleAccountGrid.getStore().on('load',function(items,records){
+ items.each(function(item,key){
+ if(parseInt(item.json.status) == 0){
+ supplyRoomStoreSettleAccountGrid.getView().getRow(key).style.display='none';
+ }
+ })
+ })
tabsItemArr.push({
title: '结算科室配置',
layout:'fit',
items:[
- new Ext.grid.EditorGridPanel({
- id : 'supplyRoomSettleAccount',
- store : supplyRoomStoreSettleAccount,
- cm : cmSettleAccount,
- autoExpandColumn : 'deleteItem',
- enableHdMenu : false,
- frame : false,
- viewConfig: {
- forceFit:true,
- getRowClass: function(record, rowIndex){
- return record.get("isFind") ? "resultList" : "";
- }
- },
- width:document.body.offsetWidth-12,
- height:document.body.offsetHeight-94,
- bodyStyle : 'border:1px solid #9cbaef',
- clicksToEdit : 1,
- selModel : new Ext.grid.RowSelectionModel({
- singleSelect : false
- }),
- tbar : [{
- text : '选择科室 :'
- },{
- xtype : 'combo',
- id : 'departNameSettleAccount',
- name : 'departNameSettleAccount',
- queryParam : 'spell',
- minChars : 0,
- valueField : 'id',
- displayField : 'name',
- store : departJsonStore,
- forceSelection : true,
- listWidth : 300,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : true,
- typeAhead : false,
- allowBlank : true,
- anchor : '97%'
- },{
- text : '添加',
- iconCls : 'btn_ext_add',
- handler : function() {
- var name =Ext.getCmp('departNameSettleAccount').getRawValue();
- var departId =Ext.getCmp('departNameSettleAccount').getValue();
- addGridItem(supplyRoomStoreSettleAccount,name,departId,"departNameSettleAccount");
- }
- },
- {
- text : '删除全部',
- iconCls : 'btn_ext_application_del',
- handler : function() {
-
- top.Ext.MessageBox.confirm("请确认","确定要删除所有结算科室吗?",function(btn){
- if(btn == "yes"){
- supplyRoomStoreSettleAccount.removeAll();
- }
- });
- }
- },{
- text : '搜索科室名称:'
- },{
- xtype : 'textfield',
- id : 'keyWordSettleAccount',
- anchor : '100%',
- allowBlank : true,
- listeners : {
- specialkey : function(field, ee) {
- if (ee.getKey() == Ext.EventObject.ENTER) {
- searchSupplyRoomStore(supplyRoomStoreSettleAccount, 'keyWordSettleAccount', 'queryResultSettleAccount');
- }
- }
- }
- },{
- xtype: 'button',
- text: '查询',
- iconCls: 'icon_search',
- handler: function () {
- searchSupplyRoomStore(supplyRoomStoreSettleAccount, 'keyWordSettleAccount', 'queryResultSettleAccount');
- }
- },'->',{
- text : '',
- id : 'queryResultSettleAccount'
- }]
- })
+ supplyRoomStoreSettleAccountGrid
]
});
@@ -3508,9 +3535,9 @@
count++;
hideMask(count,myMask);
}
- });
- supplyRoomStoreApply.load({
- callback: function(records, options, success){
+ });
+ supplyRoomStoreApply.load({
+ callback: function(records, options, success){
count++;
hideMask(count,myMask);
}