Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js =================================================================== diff -u -r26007 -r26023 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 26007) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 26023) @@ -17,6 +17,11 @@ var invoiceFormWindowTwo; var barcodeBtn; var form; +var tousseGroupName = ""; +var tousseGroupIds = null; +//发货单窗口的申请单下拉框的参数 +var tousseGroupIdsForApplyList = null; +var selectedSterilingMethodsForApplyList = null; var wareHouseStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ @@ -1478,8 +1483,7 @@ orgUnitCoding + '&applyDate=' + selectedApplyDate + '&tousseType=' + encodeURI(selectedTousseType)+ '&disposableGoodsType=' + - encodeURI(selectedDisposableGoodsType)+ '&sterilingMethods=' + - encodeURI(selectedSterilingMethods), + encodeURI(selectedDisposableGoodsType)+ selectedSterilingMethodsForApplyList + tousseGroupIdsForApplyList, method : 'POST' }), reader : new Ext.data.JsonReader({fields : [{name : 'id'},{name : 'typeAndserialNumber'},{name : 'remark'}]}), @@ -1546,8 +1550,10 @@ recyclingapplicationStore1.baseParams['applyDate'] = selectedApplyDate; recyclingapplicationStore1.baseParams['tousseType'] = encodeURI(selectedTousseType); recyclingapplicationStore1.baseParams['disposableGoodsType'] = encodeURI(selectedDisposableGoodsType); - recyclingapplicationStore1.baseParams['sterilingMethods'] = encodeURI(selectedSterilingMethods); - + if(selectedSterilingMethods != "" && selectedSterilingMethods != "null" && selectedSterilingMethods != null){ + recyclingapplicationStore1.baseParams['sterilingMethods'] = encodeURI(selectedSterilingMethods); + } + recyclingapplicationStore1.baseParams['tousseGroupIds'] = tousseGroupIds; if(top.Ext.getCmp("sendOutGoodsDetail")){ top.Ext.getCmp("sendOutGoodsDetail").getEl().mask("加载中,请稍候..."); } @@ -1658,8 +1664,12 @@ var invoicePlan_recyclingapplicationStore = new Ext.data.Store({ reader : invoicePlan_rd }); - /////// + //申请物品(新加了一个带1的store,之前应该是受到待发物品的重名影响,会报未定义) + var invoicePlan_recyclingapplicationStore1 = new Ext.data.Store({ + reader : invoicePlan_rd + }); function doSaveAction(printInvoiceCallback){ + //异常物品处理完毕与否 if(sstsConfig.isUseAbnormalGoodsTable && sstsConfig.isUseAbnormalGoodsTable == true){ var AbnormalGoodsNum = top.Ext.getCmp('sendOutAbnormalGoods').getStore().data.keys; if(AbnormalGoodsNum.length > 0){ @@ -1851,6 +1861,10 @@ name : 'warehouseName', id : 'warehouseName' },{ + xtype : 'hidden', + name : 'tousseGroupIds', + id : 'tousseGroupIds' + },{ layout : 'form', labelWidth :70, columnWidth :.33, @@ -2422,12 +2436,20 @@ buttons : [{ text : '保存', id:'saveButton', - handler : function(){ doSaveAction();} + handler : function(){ + //提交时拿到器械包分组id + top.Ext.getCmp('tousseGroupIds').setValue(tousseGroupIds); + doSaveAction(); + } },{ text : '保存并打印', id:'saveAndPrintButton', hidden:!sstsConfig.enableSaveAndPrintWhenInvoice, - handler : function(){ doSaveAction(printInvoiceAfterInvoice);} + handler : function(){ + //提交时拿到器械包分组id + top.Ext.getCmp('tousseGroupIds').setValue(tousseGroupIds); + doSaveAction(printInvoiceAfterInvoice); + } },{ text : '取消', handler : function() { Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js =================================================================== diff -u -r23157 -r26023 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 23157) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 26023) @@ -117,6 +117,21 @@ selectedApplyDate = startDateValue.concat(';').concat(endDateValue); } } +//器械包分组下拉过滤 +var tousseGroupStore = new Ext.data.JsonStore({ + fields: ['id', 'tousseGroupName'], + url: WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', + listeners: { + load: function(store, records, options) { + var nullValue = new store.recordType({ + id: '0', + tousseGroupName: '全部' + }); + store.insert(0, nullValue); + } + } +}); + function refreshList(isSetDateValue,isLoad){ processListParams(isSetDateValue,isLoad); var store = grid.getStore(); @@ -126,6 +141,7 @@ store.baseParams['disposableGoodsType'] = selectedDisposableGoodsType; store.baseParams['sterilingMethods'] = selectedSterilingMethods; store.baseParams['appFormType'] = appFormType; + store.baseParams['tousseGroupIds'] = tousseGroupIds; //刷新列表界面 store.load(); // } @@ -367,6 +383,13 @@ listeners: { selectionchange: function(sm){ onSelChange(sm); + //灭菌方式过滤的参数 + if(selectedSterilingMethods == "" ||selectedSterilingMethods ==null){ + selectedSterilingMethodsForApplyList = ""; + } + else{ + selectedSterilingMethodsForApplyList = '&sterilingMethods=' + encodeURI(selectedSterilingMethods); + } } } }); @@ -447,7 +470,10 @@ view_recyclingapplicationStore.baseParams['applyDate'] = selectedApplyDate; view_recyclingapplicationStore.baseParams['tousseType'] = encodeURI(selectedTousseType); view_recyclingapplicationStore.baseParams['disposableGoodsType'] = encodeURI(selectedDisposableGoodsType); - view_recyclingapplicationStore.baseParams['sterilingMethods'] = encodeURI(selectedSterilingMethods); + if(selectedSterilingMethods != "" && selectedSterilingMethods != "null" && selectedSterilingMethods != null){ + view_recyclingapplicationStore.baseParams['sterilingMethods'] = encodeURI(selectedSterilingMethods); + } + view_recyclingapplicationStore.baseParams['tousseGroupIds'] = tousseGroupIds; }); @@ -598,118 +624,142 @@ }], listeners: { render : function() { - var tbar2 = new Ext.Toolbar ({ - items : [{ - text : '申请单类型:' - }, - createAppFormCombo() - ,{ - text : '申请科室:' - }, - { - xtype : 'combo', - id : 'appDepart', - name : 'appDepart', - queryParam : 'spell', - minChars : 0, - valueField : 'departCode', - displayField : 'name', - store : appDepartJsonStore, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', -// hideTrigger : true, - typeAhead : false, - allowBlank : true, -// anchor : '99%', - listeners:{ - select:function(combo, record, index){ - - refreshList(); - }, - focus : function(thiz){ - thiz.selectText(); - } - } - }, { - text : '一次性物品类型:', - hidden : !sstsConfig.invoicePlanExtractedView_showDisposableGoodsType - },{ - xtype : 'multiSelect', - id : 'disposableGoodsType', - name : 'disposableGoodsType', - hidden : !sstsConfig.invoicePlanExtractedView_showDisposableGoodsType, - valueField : 'typeName', - displayField : 'typeName', - allowBlank : true, - editable : false, - fieldLabel:'类型', - width : 150, - emptyText:'请选择物品类型', - mode:'local', - store : diposableGooodsStore, -// forceSelection : true, - triggerAction : 'all', - listeners : { - select : function(combo, record, index){ - refreshList(); - }, - beforeselect:function(combo, record, index){ - var c = record.get(combo.checkField); - if(combo.getCheckedCount() <= 1 && c){ - return false; + var tbar2 = new Ext.Toolbar ({ + items : [{ + text : '器械包分组:' + }, { + xtype: 'combo', + fieldLabel: '器械包分组', + id: 'tousseGroupName', + name: 'tousseGroupName', + valueField: 'id', + displayField: 'tousseGroupName', + store: tousseGroupStore, + editable: false, + forceSelection: true, + allowBlank: true, + triggerAction: 'all', + anchor: '95%', + listeners: { + select: function(combo, record, index) { + if (record.data.id == "" || record.data.id == "0") { + tousseGroupIds = null; + tousseGroupIdsForApplyList = ""; + } else { + tousseGroupIds = record.data.id; + tousseGroupIdsForApplyList = '&tousseGroupIds=' + encodeURI(record.data.id); + } + refreshList(); + } } - return true; - } - }, - anchor : '95%' - }, { - text : '灭菌程序:', - hidden : !sstsConfig.invoicePlanExtractedView_showSterilingMethods - },{ - xtype : 'multiSelect', - id : 'sterilingMethods', - name : 'sterilingMethods', - hidden : !sstsConfig.invoicePlanExtractedView_showSterilingMethods, - valueField : 'value', - displayField : 'key', - allowBlank : true, - editable : false, - fieldLabel:'类型', - width : 150, - emptyText:'请选择物品类型', - mode:'local', - store : new Ext.data.SimpleStore({ - data: sterilingMethodArray, - fields:['key','value'] - }), -// forceSelection : true, - triggerAction : 'all', - listeners : { - select : function(combo, record, index){ - refreshList(); + },{ + text: '申请单类型:' }, - beforeselect:function(combo, record, index){ - var c = record.get(combo.checkField); - if(combo.getCheckedCount() <= 1 && c){ - return false; + createAppFormCombo(), { + text: '申请科室:' + },{ + xtype: 'combo', + id: 'appDepart', + name: 'appDepart', + queryParam: 'spell', + minChars: 0, + valueField: 'departCode', + displayField: 'name', + store: appDepartJsonStore, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + typeAhead: false, + allowBlank: true, + anchor : '99%', + listeners: { + select: function(combo, record, index) { + + refreshList(); + }, + focus: function(thiz) { + thiz.selectText(); + } } - return true; + }, { + text: '一次性物品类型:', + hidden: !sstsConfig.invoicePlanExtractedView_showDisposableGoodsType + }, { + xtype: 'multiSelect', + id: 'disposableGoodsType', + name: 'disposableGoodsType', + hidden: !sstsConfig.invoicePlanExtractedView_showDisposableGoodsType, + valueField: 'typeName', + displayField: 'typeName', + allowBlank: true, + editable: false, + fieldLabel: '类型', + width: 150, + emptyText: '请选择物品类型', + mode: 'local', + store: diposableGooodsStore, + //forceSelection : true, + triggerAction: 'all', + listeners: { + select: function(combo, record, index) { + refreshList(); + }, + beforeselect: function(combo, record, index) { + var c = record.get(combo.checkField); + if (combo.getCheckedCount() <= 1 && c) { + return false; + } + return true; + } + }, + anchor: '95%' + }, { + text: '灭菌程序:', + hidden: !sstsConfig.invoicePlanExtractedView_showSterilingMethods + }, { + xtype: 'multiSelect', + id: 'sterilingMethods', + name: 'sterilingMethods', + hidden: !sstsConfig.invoicePlanExtractedView_showSterilingMethods, + valueField: 'value', + displayField: 'key', + allowBlank: true, + editable: false, + fieldLabel: '类型', + width: 150, + emptyText: '请选择物品类型', + mode: 'local', + store: new Ext.data.SimpleStore({ + data: sterilingMethodArray, + fields: ['key', 'value'] + }), + //forceSelection : true, + triggerAction: 'all', + listeners: { + select: function(combo, record, index) { + refreshList(); + }, + beforeselect: function(combo, record, index) { + var c = record.get(combo.checkField); + if (combo.getCheckedCount() <= 1 && c) { + return false; + } + return true; + } + }, + anchor: '95%' } - }, - anchor : '95%' - } - ] - }); - var c = Ext.getCmp('container_panel'); - tbar2.render(c.tbar); - // 自动加载列表 - selectTousseTypeOnLoad(); - selectSterilingMethodsOnLoad(); - } - } - }] - }); + ] + }); + var c = Ext.getCmp('container_panel'); + tbar2.render(c.tbar); + // 自动加载列表 + selectTousseTypeOnLoad(); + selectSterilingMethodsOnLoad(); + } + } + }] + }); g_stopDefault = false; //globalOnKeyDown(globalOnKeyDownProcessor); globalOnKeyDown(openInvoicePlanByBarcode);