Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java =================================================================== diff -u -r13292 -r13422 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java (.../GodownEntryManagerImpl.java) (revision 13292) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java (.../GodownEntryManagerImpl.java) (revision 13422) @@ -958,6 +958,24 @@ updateBatchStock = true; } } + // 有无生物检测报告 + String originalHasBiologicalTestReport = originalGodownEntryItem.getHasBiologicalTestReport(); + String hasBiologicalTestReport = godownEntryItem.getHasBiologicalTestReport(); + if(!StringUtils.equals(originalHasBiologicalTestReport, hasBiologicalTestReport)){ + curGodownEntryItem.setHasBiologicalTestReport(hasBiologicalTestReport); + } + // 有无发票 + String originalHasInvoice = originalGodownEntryItem.getHasInvoice(); + String hasInvoice = godownEntryItem.getHasInvoice(); + if(!StringUtils.equals(originalHasInvoice, hasInvoice)){ + curGodownEntryItem.setHasInvoice(hasInvoice); + } + // 类别 + String originalGrade = originalGodownEntryItem.getGrade(); + String grade = godownEntryItem.getGrade(); + if(!StringUtils.equals(originalGrade, grade)){ + curGodownEntryItem.setGrade(grade); + } objectDao.update(identification); objectDao.update(disposableGoodsBatchStock); objectDao.update(disposableGoodsStock); Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js =================================================================== diff -u -r13206 -r13422 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 13206) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 13422) @@ -123,6 +123,10 @@ fields : ['hasType'], data : [[HAS_TYPE_NO],[HAS_TYPE_YES]] }); +var gradeStore = new Ext.data.SimpleStore({ + data:[['一类'],['二类'],['三类']], + fields:['name'] +}); var GodownEntryItemRecord = Ext.data.Record.create([ {name : 'localID'}, {name : 'id'}, @@ -144,7 +148,8 @@ {name : 'identification'}, {name : 'producingArea'}, {name : 'hasBiologicalTestReport'}, - {name : 'hasInvoice'} + {name : 'hasInvoice'}, + {name : 'grade'} ]); /** @@ -632,6 +637,7 @@ hideTrigger : true, typeAhead : false, allowBlank : false, + editable:false, width : 100, listeners : { select : function(combo, record, index) { @@ -652,13 +658,35 @@ hideTrigger : true, typeAhead : false, allowBlank : false, + editable:false, width : 100, listeners : { select : function(combo, record, index) { combo.setValue(record.data.hasType); } } }),hidden:!sstsConfig.godownEntryShowInvoice}, + {header : '类别',width : 50,menuDisabled : true,dataIndex : 'grade', + editor : new top.Ext.form.ComboBox({ + minChars : 0, + store : gradeStore, + forceSelection : true, + lazyInit : false, + valueField : 'name', + displayField : 'name', + mode : 'local', + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + allowBlank : false, + editable:false, + width : 100, + listeners : { + select : function(combo, record, index) { + //combo.setValue(record.data.name); + } + } + })}, {header : "删除",width : 50,menuDisabled : true,dataIndex : 'deleteButton', renderer:renderDeleteButton} ]), width :1380, @@ -830,10 +858,11 @@ forceSelection : true, lazyInit : false, triggerAction : 'all', - hideTrigger : true, + hideTrigger : false, typeAhead : false, selectOnFocus :true, allowBlank : true, + editable:false, width : 80, tabIndex : 5, hidden:!sstsConfig.godownEntryShowBiologicalTestReport, @@ -955,10 +984,11 @@ forceSelection : true, lazyInit : false, triggerAction : 'all', - hideTrigger : true, + hideTrigger : false, typeAhead : false, selectOnFocus :true, allowBlank : true, + editable:false, width : 80, tabIndex : 9, hidden:!sstsConfig.godownEntryShowInvoice, @@ -1064,10 +1094,7 @@ displayField : 'name', mode : 'local', triggerAction : 'all', - store : new Ext.data.SimpleStore({ - data:[['一类'],['二类'],['三类']], - fields:['name'] - }), + store : gradeStore, forceSelection : false, allowBlank : true, editable:false, Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java =================================================================== diff -u -r13206 -r13422 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java (.../GodownEntryItemManagerImpl.java) (revision 13206) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java (.../GodownEntryItemManagerImpl.java) (revision 13422) @@ -126,13 +126,11 @@ String manufacturer = itemObject.optString("manufacturer");// 生产厂家 String producingArea = itemObject.optString("producingArea");// 产地 String hasBiologicalTestReport = itemObject.optString("hasBiologicalTestReport", null);//是否有生物检测报告 - if(StringTools.isBlank(hasBiologicalTestReport)){ - hasBiologicalTestReport = null; - } - String hasInvoice = itemObject.optString("hasInvoice", null);//是否有发货单 - if(StringTools.isBlank(hasInvoice)){ - hasInvoice = null; - } + hasBiologicalTestReport = GodownEntryItem.hasTypeOrDefault(hasBiologicalTestReport); + + String hasInvoice = itemObject.optString("hasInvoice", null);//是否有发票 + hasInvoice = GodownEntryItem.hasTypeOrDefault(hasInvoice); + String grade = itemObject.optString("grade", null);//类别 GodownEntryItem godownEntryItem = new GodownEntryItem();