Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/dwr/table/DiposableGoodsTableManager.java =================================================================== diff -u -r12789 -r12790 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/dwr/table/DiposableGoodsTableManager.java (.../DiposableGoodsTableManager.java) (revision 12789) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/dwr/table/DiposableGoodsTableManager.java (.../DiposableGoodsTableManager.java) (revision 12790) @@ -25,6 +25,7 @@ import com.forgon.tools.SpringBeanManger; import com.forgon.tools.hibernate.ObjectDao; import com.forgon.tools.json.JSONUtil; +import com.forgon.tools.util.SqlUtils; public class DiposableGoodsTableManager { @@ -71,13 +72,15 @@ String type = sqlWhereParamMap.get("type"); String sql = "where 1=1"; + if (StringUtils.isNotBlank(type)) { - sql += " and po.type = '" + type + "'"; + sql = String.format(" where po.disposableGoodsID in (select d.id from %s d where %s)", DisposableGoods.class.getSimpleName(), + SqlUtils.getStringFieldPredicate("d.type", type)); } else { sql += " and 1=1"; } return gridManager.renderGrid(parameterMap, - DisposableGoods.class.getSimpleName(), sql, + DisposableGoodsStock.class.getSimpleName(), sql, new String[] { "goodsBatchs" }); } Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r12766 -r12790 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 12766) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 12790) @@ -252,6 +252,7 @@ hidden:SSTS_Warehouse_Menu, children:[ {hidden :SSTS_DiposableGoodsNode_Menu,text:"一次性物品管理",href:WWWROOT+'/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.jsp',hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_DiposableGoodsNode_Menu,text:"一次性物品库存",href:WWWROOT+'/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_godownEntryNode_Menu,text:"入库单管理",href:WWWROOT+'/disinfectsystem/assestManagement/godownEntry/godownEntryView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_WarehouseEntryOut_Menu,text:"退库单管理",href:WWWROOT+'/disinfectsystem/assestManagement/godownEntry/godownOutView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_WarehouseEntryOut_Menu,text:"调拨单管理",href:WWWROOT+'/disinfectsystem/assestManagement/godownEntry/appropriationView.jsp',hrefTarget:linkTarget,leaf:true}, Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.js (revision 12790) @@ -0,0 +1,948 @@ +var entityName = "一次性物品"; +var grid; +var root; +var formObj; +var formWindow; + +function addDiposableGoods(id) { + var dType = document.getElementById("parm_s_type").value; + var diposableGooodsStore = new Ext.data.SimpleStore({ + fields : [ 'typeName' ], + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!getDiposableGoodsType.do' + }); + + //能否作为器械包材料 + var isPartOfTousseMaterialStore = new Ext.data.SimpleStore( { + fields : [ 'value'], + data : [[CONSTANT_YES],[CONSTANT_NO]] + }); + + //能否被科室申请 + var isApplicationMaterialStore = new Ext.data.SimpleStore( { + fields : [ 'value'], + data : [[CONSTANT_YES],[CONSTANT_NO]] + }); + + //是否供应室物品 + var isSupplyRoomStore = new Ext.data.SimpleStore( { + fields : [ 'value'], + data : [[SUPPLYROOMGOODS_YES],[SUPPLYROOMGOODS_NO]] + }); + + var godownEntryItemStore = new top.Ext.data.Store({ + proxy : new top.Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!loadGodownEntryItemByid.do?id=' + id, + method : 'POST' + }), + reader : new top.Ext.data.JsonReader({ + fields : [ + {name : 'id'}, + {name : 'barcode'}, + {name : 'storage'}, + {name : 'batchNumber'}, + {name : 'cost'}, + {name : 'expDate'}, + {name : 'supplierName'} + ] + }) + }); + + + var selectModel = new top.Ext.grid.CheckboxSelectionModel(); + formObj = new top.Ext.FormPanel( { + id : 'diposableGoodsForm', + frame : true, + labelAlign:'right', + labelSeparator : ':', + bodyStyle : 'padding:5px 5px 0px 5px', + autoHeight : true, + autoScroll : true, + items:[{ + layout : 'column', + items : [{ + columnWidth : 0.4, + layout : 'form', + labelWidth : 70, + items : [{ + xtype : 'hidden', + name : 'id', + id : 'id' + },{ + xtype : 'hidden', + name : 'originalFormParams', + id : 'originalFormParams' + },{ + xtype : 'hidden', + name : 'orginalName', + id : 'orginalName' + },{ + xtype : 'hidden', + name : 'orginalSpecification', + id : 'orginalSpecification' + },{ + xtype : 'hidden', + name : 'items', + id : 'items' + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '名称', + maxLength : '41', + id : 'name', + name : 'name', + allowBlank : false, + anchor : '95%', + listeners:{ + change:function(field,nV,oV){ + var value = nV.trim(); + field.setValue(value); + } + } + }] + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '规格', + maxLength : '41', + id : 'specification', + name : 'specification', + allowBlank : true, + anchor : '95%' + }] + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '单位转换调整系数', + maxLength : '41', + id : 'unitConvertCoefficient', + name : 'unitConvertCoefficient', + allowBlank : true, + anchor : '95%' + }] + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '包装规格', + maxLength : '41', + id : 'packageSpec', + name : 'packageSpec', + allowBlank : true, + anchor : '95%' + }] + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'combo', + fieldLabel : "类别", + valueField : 'typeName', + displayField : 'typeName', + store : diposableGooodsStore, + forceSelection : true, + editable : false, + triggerAction : 'all', + name : "type", + id : "type", + value : dType, + anchor : '95%' + }] + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'combo', + fieldLabel : "能否配包", + valueField : 'value', + displayField : 'value', + store : isPartOfTousseMaterialStore, + forceSelection : true, + allowBlank : false, + mode : 'local', + triggerAction : 'all', + name : "isPartOfTousseMaterial", + id : "isPartOfTousseMaterial", + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'combo', + fieldLabel : '能否申请', + valueField : 'value', + displayField : 'value', + store : isApplicationMaterialStore, + forceSelection : true, + allowBlank : false, + mode : 'local', + triggerAction : 'all', + name : "isApplicationMaterial", + id : "isApplicationMaterial", + anchor : '95%' + }] + },{ + + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'combo', + fieldLabel : '消毒供应中心物品', + valueField : 'value', + displayField : 'value', + store : isSupplyRoomStore, + forceSelection : true, + allowBlank : false, + mode : 'local', + triggerAction : 'all', + name : "isSupplyRoomGoods", + id : "isSupplyRoomGoods", + anchor : '95%' + }] + + },{ + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'numberfield', + fieldLabel : '最小库存', + allowDecimals : false, + maxLength : '16', + id : 'minStorage', + name : 'minStorage', + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'numberfield', + fieldLabel : '最大库存', + allowDecimals : false, + maxLength : '16', + id : 'maxStorage', + name : 'maxStorage', + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '拼音码', + id : 'spelling', + name : 'spelling', + readOnly : true, + allowBlank : true, + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '五笔码', + id : 'wbCode', + name : 'wbCode', + readOnly : true, + allowBlank : true, + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '外部编码', + maxLength : '16', + id : 'externalCode', + name : 'externalCode', + allowBlank : true, + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'numberfield', + fieldLabel : '参考价', + maxLength : '16', + id : 'referencePrice', + name : 'referencePrice', + allowBlank : false, + allowNegative : false, + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'numberfield', + fieldLabel : '最小申请数量', + maxLength : '16', + id : 'minApplyAmount', + name : 'minApplyAmount', + allowBlank : true, + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'textfield', + fieldLabel : '单位', + maxLength : '16', + id : 'unit', + name : 'unit', + allowBlank : true, + anchor : '95%' + }] + }, { + columnWidth : 1, + layout : 'form', + labelWidth : 110, + items : [{ + xtype : 'numberfield', + fieldLabel : '总数', + maxLength : '16', + id : 'amount', + name : 'amount', + readOnly : true, + cls : 'fieldReadOnlyNoRemove', + allowBlank : false, + value : 0, + anchor : '95%' + }] + } + ] + },{ + columnWidth : 0.6, + layout : 'form', + items : [ + new top.Ext.grid.GridPanel({ + id :'batchNumberGrid', + store : godownEntryItemStore , + height : 390, + width : 485, + bodyStyle : 'border:1px solid #afd7af', + sm : selectModel, + cm : new top.Ext.grid.ColumnModel([selectModel, + {header : "id",dataIndex : 'id',hidden : true}, + {header : "条码",width : 90,dataIndex : 'barcode',menuDisabled:true}, + {header : "批次",width : 90,dataIndex : 'batchNumber',menuDisabled:true}, + {header : "价格",width : 50,dataIndex : 'cost',menuDisabled:true}, + {header : "库存",width : 50,dataIndex : 'storage',menuDisabled:true}, + {header : "失效期",width : 90,dataIndex : 'expDate',renderer:myDateFormat,menuDisabled:true}, + {id:'supplierName',header : "供应商",width : 130,dataIndex : 'supplierName',menuDisabled:true} + ]), + autoExpandColumn : 'supplierName', + frame : false, + viewConfig: {forceFit:true}, + title : '批次列表' + }) + ] + }] + }], + buttons : [{ + id : 'saveBtn', + text : '保存', + handler : save + },{ + id : 'cancleBtn', + text : '取消', + handler : function() { + formWindow.close(); + } + },{ + id : 'print', + text : '打印批次', + handler : function() { + var items = null; + var records = top.Ext.getCmp('batchNumberGrid').getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择要打印的批次!"); + return false; + } + var goodsName = top.Ext.getCmp('name').getValue(); + + for ( var i = 0, len = records.length; i < len; i++) { + if(items == null){ + items = goodsName + + ',' + records[i].data.barcode + + ',' + myDateFormat(records[i].data.expDate) + + ',' + records[i].data.supplierName + + ',' + records[i].data.batchNumber; + }else { + items += ';' + goodsName + + ',' + records[i].data.barcode + + ',' + myDateFormat(records[i].data.expDate) + + ',' + records[i].data.supplierName + + ',' + records[i].data.batchNumber; + } + } + top.Ext.getCmp("items").setValue(items); + formObj.form.submit({ + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!printDiposableGoods.do', + method : 'POST', + waitMsg : '正在保存数据,请稍候', + waitTitle : '提交表单', + success : function(form, action) { + window.close(); + grid.dwrReload(); + //打印条码 + printBarcode(action.result.barcode); + + }, + failure : function(form, action) { + showResult(action.result.message); + } + }); + } + }] + }); + + if($Id("parm_s_type").value != ""){ + top.Ext.getCmp("type").setValue($Id("parm_s_type").value); + } + + formWindow = new top.Ext.Window( { + id : 'diposableGoodsWin', + layout : 'fit', + title : '一次性物品信息', + width : 850, + modal : true, + autoHeight : true, + border : false, + plain : true, + items : [ formObj ] + }); + formWindow.show(); + diposableGooodsStore.load(); + if(id != 0){ + godownEntryItemStore.load(); + } +} + +function printAmount() { + top.Ext.MessageBox.prompt("输入框", "打印数量:", function(bu, txt) { + return txt; + }); +} + +function printBarcode(barcodeStr){ + if(barcodeStr!=null && barcodeStr.length > 0){ + top.Ext.Msg.show({ + title: '输入框', + msg: '打印数量:', + width: 100, + buttons: Ext.MessageBox.OKCANCEL, + prompt : true, + fn: function(bu, txt) { + if(bu == 'ok'){ + if(isNaN(txt) == false){ + var godownEntryItem = barcodeStr.split(";"); + var specification = top.Ext.getCmp('specification').getValue(); + for(var j = 0 ; j< Number(txt) ; j++){ + for ( var i = 0; i < godownEntryItem.length; i++) { + var resultItem = godownEntryItem[i].split("#&"); + var name =resultItem[0]; + var barcode = resultItem[1]; + var expDate = resultItem[2]; + var supplierName = resultItem[3]; + var batchNumber = resultItem[4]; + printDiposableGoodsInfo(barcode,name,expDate,supplierName,batchNumber,0,specification); + } + } + }else{ + showResult("打印数量必须是数字,请重新输入!"); + } + } + }, + animEl: 'addAddressBtn', + value:'1' + }); + } +} + +function submitForSaveDisposableGoods(){ + formObj.form.submit( { + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!saveDiposableGoods.do', + method : 'POST', + waitMsg : '正在保存数据,请稍候', + waitTitle : '提交表单', + success : function(form, action) { + formWindow.close(); + showResult('保存成功'); + grid.dwrReload(); + }, + failure : function(form, action) { + showResult('failure = ' + action.result.message,'error'); + top.Ext.getCmp('saveBtn').enable(); + } + }); +} +function validateAndSubmit(){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!validate.do', + params : { + validateId : top.Ext.getCmp('id').getValue(), + valifateName:top.Ext.getCmp('name').getValue(), + specification:top.Ext.getCmp('specification').getValue() + }, + success : function(response, options) { + var result = Ext.decode(response.responseText); + if(result.stauts==1){ + var orginalName = top.Ext.getCmp("orginalName").getValue(); + var orginalSpecification = top.Ext.getCmp("orginalSpecification").getValue(); + var name = top.Ext.getCmp("name").getValue(); + var specification = top.Ext.getCmp("specification").getValue(); + var msg = ''; + if(!stringLooksEquals(orginalName,name) && !stringLooksEquals(orginalSpecification,specification)){ + msg = "是否确定修改一次性物品名称和规格?" + }else if(!stringLooksEquals(orginalName,name)){ + msg = "是否确定修改一次性物品名称?" + }else if(!stringLooksEquals(orginalSpecification,specification)){ + msg = "是否确定修改一次性物品规格?" + }else{ + submitForSaveDisposableGoods(); + return; + } + top.Ext.MessageBox.confirm("请确认",msg, + function(button, text) { + if ("yes" == button){ + submitForSaveDisposableGoods(); + }else{ + top.Ext.getCmp('saveBtn').enable(); + } + }); + }else{ + showResult(result.message); + top.Ext.getCmp('saveBtn').enable(); + } + }, + failure : function(response, options) { + var result = Ext.decode(response.responseText); + showResult(result.cause); + } + }); +} + +function save(){ + //if(!form.getForm().isValid()){ + if(!formObj.getForm().isValid()){ + showResult('请正确填写表单各值'); + return false; + } + var unitConvertCoefficient = top.Ext.getCmp('unitConvertCoefficient').getValue(); + if(unitConvertCoefficient != null && unitConvertCoefficient != ""){ + if(unitConvertCoefficient <= 0){ + showResult("单位转换调整系数必须大于0!"); + top.Ext.getCmp('unitConvertCoefficient').setValue(""); + top.Ext.getCmp('unitConvertCoefficient').focus(); + return false; + } + } + + var max = top.Ext.getCmp('maxStorage').getValue(); + var min = top.Ext.getCmp('minStorage').getValue(); + if(typeof max == 'number' && typeof min == 'number'){ + if(min>max){ + showResult('最小库存不能大于最大库存'); + top.Ext.getCmp('minStorage').focus(); + return false; + } + } + this.disable(); + validateAndSubmit(); +} + +function printBatchNum(barcodeStr){ + if(barcodeStr!=null && barcodeStr.length > 0){ + Ext.Msg.show({ + title: '输入框', + msg: '打印数量:', + width: 100, + buttons: Ext.MessageBox.OKCANCEL, + prompt : true, + fn: function(bu, txt) { + if(bu == 'ok'){ + if(isNaN(txt) == false){ + var godownEntryItem = barcodeStr.split(";"); + for(var j = 0 ; j< Number(txt) ; j++){ + for ( var i = 0; i < godownEntryItem.length; i++) { + var resultItem = godownEntryItem[i].split("#&"); + var name =resultItem[0]; + var barcode = resultItem[1]; + var expDate = resultItem[2]; + var supplierName = resultItem[3]; + var batchNumber = resultItem[4]; + var specification = resultItem[5]; + printDiposableGoodsInfo(barcode,name,expDate,supplierName,batchNumber,0,specification); + } + } + }else{ + showResult("打印数量必须是数字,请重新输入!"); + } + } + }, + animEl: 'addAddressBtn', + value:'1' + }); + } +} + +//打印批次条码 +function printBatchStockBarcode(grid){ + var records = grid.getSelectionModel().getSelections(); + if(records.length == 0){ + showResult("请选择要打印批次条码的物品"); + }else{ + var ids = ""; + for(var i = 0,len=records.length;i 1) { + showResult("一次只能修改一个一次性物品!"); + return false; + } + id = records[0].data['id']; + addDiposableGoods(id); + top.Ext.getCmp('diposableGoodsForm').form.load({ + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!loadDiposableGoods.do', + method : 'GET', + waitMsg : '正在加载数据,请稍候', + params : {id : id}, + success : function(form, action) { + var disposableGoods = action.result.data; + top.Ext.getCmp("orginalName").setValue(disposableGoods.name); + top.Ext.getCmp("orginalSpecification").setValue(disposableGoods.specification); + }, + failure : function(form, action) { + } + }); +}; + +function reloadGrid(type){ + $Id("parm_s_type").value = type; + grid.dwrReload(); +} + +function modify(){ + loadFormData(grid); +} + +function rendeColor(v, p, record){ + var data = record.data; + var amount = data.amount; + if(typeof amount=='number'){ + if((typeof data.minStorage=='number' && data.minStorage>amount) || (typeof data.maxStorage=='number' && data.maxStorage" + v + "

"; + } + } + return "" + v + ""; +} + +Ext.onReady(function() { + Ext.QuickTips.init(); + + //********* 1、Tree *********** + root = new Ext.tree.AsyncTreeNode({ + text:'一次性物品类型', + id:'0', + draggable:false, + listeners:{ + click:function(node,event){ + reloadGrid(""); + } + } + }); + + var myLoader = new Ext.tree.TreeLoader({dataUrl:WWWROOT + '/disinfectSystem/diposableGoodsAction!treeLoad.do'}); + + //********* 2、ForgonGrid *********** + var columns = [ + {header : "名称",width : 150,dataIndex : 'name', renderer : rendeColor}, + {header : "规格",width : 100,dataIndex : 'specification'}, + {header : "库存",width : 80,dataIndex : 'amount'}, + {header : "仓库",width : 80,dataIndex : 'warehouseName'}, + {header : "包装规格",width : 80,dataIndex : 'packageSpec'}, + {header : "编号",width : 50,dataIndex : 'externalCode'}, + {header : "参考价",width : 60,dataIndex : 'referencePrice'}, + {header : "总数",width : 50,dataIndex : 'amount',hidden:true}, + {header : "最小申请数量",width : 80,dataIndex : 'minApplyAmount'}, + {header : "单位",width : 50,dataIndex : 'unit'}, +// {header : "拼音码",width : 90,dataIndex : 'spelling'}, +// {header : "五笔码",width : 90,dataIndex : 'wbCode'}, +// {header : "能否作为器械包材料",width : 120,dataIndex : 'isPartOfTousseMaterial'}, +// {header : "能否被科室申请",width : 100,dataIndex : 'isApplicationMaterial'}, +// {header : "是否消毒供应中心领用物品",width : 100,dataIndex : 'isSupplyRoomGoods'}, + {header : "最小库存",width : 60,dataIndex : 'minStorage'}, + {id : 'operationRemark',header : "最大库存",width : 60,dataIndex : 'maxStorage'} + + ]; + + var readerDetail = [ + {name : 'id'}, + {name : 'name'}, + {name : 'externalCode'}, + {name : 'specification'}, + {name : 'packageSpec'}, + {name : 'amount'}, + {name : 'warehouseName'}, + {name : 'minApplyAmount'}, + {name : 'unit'}, + {name : 'minStorage'}, + {name : 'maxStorage'}, + {name : 'spelling'}, + {name : 'wbCode'}, + {name : 'isPartOfTousseMaterial'}, + {name : 'referencePrice'}, + {name : 'isApplicationMaterial'}, + {name : 'isSupplyRoomGoods'} + ]; + + var filters = new Ext.grid.GridFilters({ + filters:[ + {type: 'string', dataIndex: 'name'}, + {type: 'string', dataIndex: 'externalCode'}, + {type: 'numeric', dataIndex: 'amount'}, + {type: 'numeric', dataIndex: 'minApplyAmount'}, + {type: 'string', dataIndex: 'unit'}, + {type: 'numeric', dataIndex: 'minStorage'}, + {type: 'numeric', dataIndex: 'maxStorage'}, + {type: 'string', dataIndex: 'spelling'}, + {type: 'string', dataIndex: 'wbCode'}, + {type: 'string', dataIndex: 'isPartOfTousseMaterial'}, + {type: 'string', dataIndex: 'isApplicationMaterial'}, + {type: 'string', dataIndex: 'isSupplyRoomGoods'}, + {type: 'numeric', dataIndex: 'referencePrice'} + ]} + ); + + var tbar = [ { + text : '添加', + hidden : SSTS_DiposableGoods_Create, + iconCls : 'btn_ext_application_add', + handler : function() { + addDiposableGoods(0); + } + }, '-', { + text : '修改', + hidden : SSTS_DiposableGoods_Update, + iconCls : 'btn_ext_application_edit', + id : 'editTbar', + handler : function() { + loadFormData(grid); + } + }, '-', { + text : '删除', + hidden : SSTS_DiposableGoods_Delete, + iconCls : 'btn_ext_application_del', + handler : function() { + deleteDiposableGoods(grid); + } + }, '-' , { + text : '打印批次', + hidden : false, + iconCls : 'icon_print', + handler : function(){ + printBatchStockBarcode(grid); + } + }/* + , '-' , { + //用于程序员调试 + text : '更新旧数据', + hidden : false, + handler : function() { + DiposableGoodsTableManager.updateOldData(function(msg){showResult(msg);}); + } + }, '-' , { + //将属于供应室领用的一次性物品进行分类 + text : '分类供应室领用类型', + hadden : false, + handler : function() { + DiposableGoodsTableManager.updateSupplyRoomDiposableGoodsType(function(msg){showResult('更新成功,请刷新页面')}); + } + } + , '-' , { + text : '导出一次性物品库存', + handler : function() { + window.location.href = WWWROOT+"/disinfectsystem/reportforms/diposableGoodsStorageReportExportForm.jsp"; + } + }, '-' , { + text : '导出物资收发存汇总', + handler : function() { + window.location.href = WWWROOT+"/disinfectsystem/reportforms/diposableGoodsPriceStatisticsReportExportForm.jsp"; + } + }, '-' , { + //用于程序员调试 + text : '更新旧数据', + hidden : false, + handler : function() { + DiposableGoodsTableManager.updateOldData(function(msg){showResult(msg);}); + } + }, '-', { + text : '导入一次性物品库存EXCEL', + hidden : false, + handler : function() { + location.href = WWWROOT + + "/disinfectsystem/basedatamanager/importbasedata/amendDiposableGoodsStorage.mhtml"; + } + } + */ + ]; + + grid = new Ext.ux.ForgonPageGrid( { + tbar : tbar, + pageSize : 20, + defaultSortField : 'id', + title : '一次性物品列表', + defaultSortDirection : 'ASC', + isCheckboxSelectionModel : true, + rememberSelected : false, + isShowSearchField : true, + plugins: filters, + columns : columns, + autoExpandColumn : 'operationRemark', + renderTo : 'gridDiv', + frame : false + }, readerDetail, + DiposableGoodsTableManager.findDiposableGoodsTableList, + null + ); + + var viewport = new Ext.Viewport({ + layout:'border', + items:[{ + region:'west', + id:'west-panel', + lines : false, + margins : '0 0 5 5', + cmargins : '0 0 0 0', + layout : 'accordion', + layoutConfig : {animate : true}, + collapsible: true, //允许折叠 + animCollapse:true, //折叠时是否有动画效果 + split: true, //是否允许拖动大小,与下面的折叠形式配合 + collapseMode:'mini', //折叠形式 + width: 200, + minSize : 130, + maxSize : 400, + xtype: 'treepanel', + loader: myLoader, //数据加载 + autoScroll: true, + root: root, + tbar:[ + new Ext.Action({ + text: '展开所有', + handler: function(){ + var treePanel = viewport.findById('west-panel'); + treePanel.expandAll(); + } + }), + new Ext.Action({ + text: '折叠所有', + handler: function(){ + var treePanel = viewport.findById('west-panel'); + treePanel.collapseAll(); + } + }) + ] + },{ + region:'center', + margins:'0 5 5 0', + xtype : 'panel', + autoScroll:true, + layout: 'fit', + items:grid + }] + }); + + root.expand(false, /*no anim*/ false); +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.jsp (revision 12790) @@ -0,0 +1,61 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<%@page import="com.forgon.disinfectsystem.entity.assestmanagement.DisposableGoods"%> + + + + +一次性物品信息 + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ + \ No newline at end of file