Index: ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.js =================================================================== diff -u -r13277 -r13520 --- ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.js (.../materialEntryView.js) (revision 13277) +++ ssts-web/src/main/webapp/disinfectsystem/materialmanager/materialEntryView.js (.../materialEntryView.js) (revision 13520) @@ -28,6 +28,9 @@ }, { name : 'referencePrice', mapping : 'referencePrice' + }, { + name : 'goodsType', + mapping : 'goodsType' }]) }); @@ -51,6 +54,12 @@ fields : ['hasType'], data : [[HAS_TYPE_NO],[HAS_TYPE_YES]] }); + +var goodsTypeStore = new Ext.data.SimpleStore({ + fields : [ 'value' ], + data : [ [goodsType_materialGoods], [goodsType_expensiveGoods]] +}); + var GodownEntryItemRecord = Ext.data.Record.create([ {name : 'id'}, {name : 'materialId'}, @@ -59,7 +68,8 @@ {name : 'cost'}, {name : 'supplierName'}, {name : 'certification'}, - {name : 'hasInvoice'} + {name : 'hasInvoice'}, + {name : 'goodsType'} ]); function addItems(materialId,name,count,cost,supplierName){ @@ -100,6 +110,7 @@ } } var certification = top.Ext.getCmp('certification').getValue(); + var goodsType = top.Ext.getCmp("goodsType").getValue(); for(var i = 0;i < top.Ext.getCmp('materialEntryItemGrid').getStore().getCount();i++){ if(top.Ext.getCmp('materialEntryItemGrid').getStore().getAt(i).data.materialId == materialId){ @@ -116,7 +127,8 @@ cost : cost, supplierName : supplierName, certification : certification, - hasInvoice : hasInvoice + hasInvoice : hasInvoice, + goodsType : goodsType }); top.Ext.getCmp('materialEntryItemGrid').getStore().add(godownEntryItem); @@ -125,6 +137,7 @@ top.Ext.getCmp('cost1').setValue(''); top.Ext.getCmp('materialId').setValue(''); top.Ext.getCmp('supplier1').setValue(''); + top.Ext.getCmp('goodsType').setValue(''); top.Ext.getCmp('hasInvoice').setValue(''); top.Ext.getCmp('certification').setValue(''); top.Ext.getCmp('name1').focus(); @@ -390,6 +403,23 @@ } } }),hidden:!sstsConfig.godownEntryShowInvoice + },{ + header : "是否高值耗材",width : 100,menuDisabled : true,dataIndex : 'goodsType', + editor : new top.Ext.form.ComboBox({ + minChars : 0, + store : goodsTypeStore, + forceSelection : true, + lazyInit : false, + valueField : 'value', + displayField : 'value', + mode : 'local', + triggerAction : 'all', + hideTrigger : false, + editable: false, + typeAhead : false, + allowBlank : false, + width : 100 + }),hidden:!sstsConfig.godownEntryShowInvoice },{header : "删除",width : 100,menuDisabled : true,dataIndex : 'deleteButton', renderer:renderDeleteButton} ]), width :735, @@ -426,6 +456,7 @@ top.Ext.getCmp('name1').setValue(record.data.name); top.Ext.getCmp('materialId').setValue(record.data.id); top.Ext.getCmp('cost1').setValue(record.data.cost); + top.Ext.getCmp('goodsType').setValue(record.data.goodsType); }, specialkey : function(field, ee) { if (ee.getKey() == Ext.EventObject.ENTER) { @@ -507,6 +538,27 @@ render : function() { var tbar = new top.Ext.Toolbar ({ items:[{ + text:'是否高值耗材:' + },{ + xtype : 'combo', + id : 'goodsType', + name : 'goodsType', + minChars : 0, + valueField : 'value', + displayField : 'value', + mode : 'local', + store : goodsTypeStore, + forceSelection : true, + lazyInit : false, + editable:false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + selectOnFocus :true, + allowBlank : true, + width : 100, + tabIndex : 9 + },{ text:'有无发票:', hidden:!sstsConfig.godownEntryShowInvoice },{ @@ -520,8 +572,9 @@ store : hasTypeStore, forceSelection : true, lazyInit : false, + editable:false, triggerAction : 'all', - hideTrigger : true, + hideTrigger : false, typeAhead : false, selectOnFocus :true, allowBlank : true, @@ -568,7 +621,7 @@ var count = top.Ext.getCmp('amount1').getValue(); var cost = top.Ext.getCmp('cost1').getValue(); var supplierName = top.Ext.getCmp('supplier1').getValue(); - addItems(materialId,name,count,cost,supplierName); + addItems(materialId,name,count,cost,supplierName); } }] }); @@ -600,6 +653,7 @@ jsonArray[len].supplierName = record.data.supplierName; jsonArray[len].certification = record.data.certification; jsonArray[len].hasInvoice = record.data.hasInvoice; + jsonArray[len].goodsType = record.data.goodsType; } top.Ext.getCmp("items").setValue(Ext.encode(jsonArray)); @@ -725,7 +779,8 @@ cost : action.result.data.itemsList[i].cost, supplierName : action.result.data.itemsList[i].supplierName, certification : action.result.data.itemsList[i].certification, - hasInvoice : action.result.data.itemsList[i].hasInvoice + hasInvoice : action.result.data.itemsList[i].hasInvoice, + goodsType : action.result.data.itemsList[i].goodsType }); top.Ext.getCmp('materialEntryItemGrid').getStore().add(godownEntryItem);