Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.jsp
===================================================================
diff -u -r12797 -r13039
--- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.jsp (.../godownEntryView.jsp) (revision 12797)
+++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.jsp (.../godownEntryView.jsp) (revision 13039)
@@ -1,3 +1,4 @@
+<%@page import="com.forgon.disinfectsystem.entity.assestmanagement.GodownEntryItem"%>
<%@page import="com.forgon.disinfectsystem.entity.basedatamanager.supplier.Supplier,com.forgon.disinfectsystem.entity.assestmanagement.GodownEntry "%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
@@ -13,6 +14,8 @@
入库单信息
Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js
===================================================================
diff -u -r12988 -r13039
--- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 12988)
+++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 13039)
@@ -119,7 +119,10 @@
]
})
});
-
+var hasTypeStore = new Ext.data.SimpleStore({
+ fields : ['hasType'],
+ data : [[HAS_TYPE_NO],[HAS_TYPE_YES]]
+ });
var GodownEntryItemRecord = Ext.data.Record.create([
{name : 'localID'},
{name : 'id'},
@@ -139,7 +142,9 @@
{name : 'expDate' ,type : 'date'},
{name : 'supplierName'},
{name : 'identification'},
- {name : 'producingArea'}
+ {name : 'producingArea'},
+ {name : 'hasBiologicalTestReport'},
+ {name : 'hasInvoice'}
]);
/**
@@ -199,6 +204,12 @@
return false;
}
}
+ var hasBiologicalTestReport = top.Ext.getCmp("hasBiologicalTestReport").getValue();
+ var hasInvoice = top.Ext.getCmp("hasInvoice").getValue();
+ if(hasInvoice == null || hasInvoice == ''){
+ showResult("请选择是否有发票");
+ return false;
+ }
//添加操作
var godownEntryItem = new GodownEntryItemRecord({
@@ -218,7 +229,9 @@
totalPrice:Ext.num(parseFloat(amount),0)*Ext.num(parseFloat(cost),0),
supplierName : supplierName,
identification : identification,
- producingArea: producingArea
+ producingArea: producingArea,
+ hasBiologicalTestReport : hasBiologicalTestReport,
+ hasInvoice : hasInvoice
});
//top.Ext.getCmp('godownEntryItemGrid').getStore().add(godownEntryItem);
top.Ext.getCmp('godownEntryItemGrid').getStore().insert(0 , godownEntryItem);
@@ -510,14 +523,16 @@
{name : 'manufacturer'},
{name : 'certification'},
{name : 'totalPrice'},
- {name : 'deleteButton'}
+ {name : 'deleteButton'},
+ {name : 'hasBiologicalTestReport'},
+ {name : 'hasInvoice'}
]
})
}),
cm : new top.Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), selectModel,
{header : "id",dataIndex : 'id',hidden : true},
{header : "disposableGoodsID",dataIndex : 'disposableGoodsID',hidden : true},
- {header : "名称",dataIndex : 'name',width : 160,menuDisabled : true},
+ {header : "名称",dataIndex : 'name',width : 250,menuDisabled : true},
{header : "数量",dataIndex : 'amount',width : 40,menuDisabled : true,
editor : new top.Ext.form.TextField({
regex: /^\d+$/,
@@ -553,7 +568,7 @@
}
})
},
- {id : 'expandColumn',header : "供应商",width : 100,dataIndex : 'supplierName',menuDisabled : true,
+ {id : 'expandColumn',header : "供应商",width : 180,dataIndex : 'supplierName',menuDisabled : true,
editor : new top.Ext.form.ComboBox({
queryParam : 'supplierName',
minChars : 0,
@@ -592,16 +607,56 @@
allowBlank : true
})
},
- {header : "注册证号",width : 80,dataIndex : 'certification',menuDisabled : true,
+ {header : "注册证号",width : 230,dataIndex : 'certification',menuDisabled : true,
editor : new top.Ext.form.TextField({
maxLength : 30,
allowBlank : true
})
},
{header : "总价",width : 70,menuDisabled : true,dataIndex : 'totalPrice', renderer:renderTotalPrice},
+ {header : "生物检测",width : 70,menuDisabled : true,dataIndex : 'hasBiologicalTestReport',
+ editor : new top.Ext.form.ComboBox({
+ minChars : 0,
+ store : hasTypeStore,
+ forceSelection : true,
+ lazyInit : false,
+ valueField : 'hasType',
+ displayField : 'hasType',
+ mode : 'local',
+ triggerAction : 'all',
+ hideTrigger : true,
+ typeAhead : false,
+ allowBlank : false,
+ width : 100,
+ listeners : {
+ select : function(combo, record, index) {
+ combo.setValue(record.data.hasType);
+ }
+ }
+ })},
+ {header : "有无发票",width : 70,menuDisabled : true,dataIndex : 'hasInvoice',
+ editor : new top.Ext.form.ComboBox({
+ minChars : 0,
+ store : hasTypeStore,
+ forceSelection : true,
+ lazyInit : false,
+ valueField : 'hasType',
+ displayField : 'hasType',
+ mode : 'local',
+ triggerAction : 'all',
+ hideTrigger : true,
+ typeAhead : false,
+ allowBlank : false,
+ width : 100,
+ listeners : {
+ select : function(combo, record, index) {
+ combo.setValue(record.data.hasType);
+ }
+ }
+ })},
{header : "删除",width : 50,menuDisabled : true,dataIndex : 'deleteButton', renderer:renderDeleteButton}
]),
- width :980,
+ width :1380,
autoExpandColumn : 'expandColumn',
selModel : new top.Ext.grid.RowSelectionModel({
singleSelect : false
@@ -726,8 +781,8 @@
},
specialkey : function(field, ee) {
if (ee.getKey() == Ext.EventObject.ENTER) {
- top.Ext.getCmp('expDate1').focus();
- top.Ext.getCmp('expDate1').selectText();
+ top.Ext.getCmp('producingArea').focus();
+ top.Ext.getCmp('producingArea').selectText();
}
}
}
@@ -738,9 +793,48 @@
id : 'producingArea',
name : 'producingArea',
width : 80,
- tabIndex : 8,
+ tabIndex : 4,
anchor : '95%',
- allowBlank:true
+ allowBlank:true,
+ listeners:{
+ specialkey : function(field, ee) {
+ if (ee.getKey() == Ext.EventObject.ENTER) {
+ top.Ext.getCmp('hasBiologicalTestReport').focus();
+ top.Ext.getCmp('hasBiologicalTestReport').selectText();
+ }
+ }
+ }
+ },{
+ text:'生物检测:'
+ },{
+ xtype : 'combo',
+ id : 'hasBiologicalTestReport',
+ name : 'hasBiologicalTestReport',
+ minChars : 0,
+ valueField : 'hasType',
+ displayField : 'hasType',
+ mode : 'local',
+ store : hasTypeStore,
+ forceSelection : true,
+ lazyInit : false,
+ triggerAction : 'all',
+ hideTrigger : true,
+ typeAhead : false,
+ selectOnFocus :true,
+ allowBlank : true,
+ width : 80,
+ tabIndex : 5,
+ listeners : {
+ select : function(field, r) {
+ top.Ext.getCmp('expDate1').focus();
+ },
+ specialKey:function(f,e){
+ if (e.getKey() == Ext.EventObject.ENTER) {
+ top.Ext.getCmp('expDate1').focus();
+ top.Ext.getCmp('expDate1').selectText();
+ }
+ }
+ }
}],
listeners: {
render : function() {
@@ -753,7 +847,7 @@
name : 'expDate1',
width : 270,
minWidth : 190,
- tabIndex : 4,
+ tabIndex : 6,
anchor : '95%',
allowBlank:true,
invalidText :'日期输入不正确',
@@ -783,7 +877,7 @@
id : 'cost1',
name : 'cost1',
width : 80,
- tabIndex : 5,
+ tabIndex : 7,
regex: /^(([1-9]+[0-9]*.{1}[0-9]+)|([0].{1}[1-9]+[0-9]*)|([1-9][0-9]*)|([0][.][0-9]+[1-9]*))$/,
regexText:'只能输入正数',
anchor : '95%',
@@ -816,9 +910,40 @@
selectOnFocus :true,
allowBlank : true,
width : 250,
- tabIndex : 6,
+ tabIndex : 8,
listeners : {
select : function(field, r) {
+ top.Ext.getCmp('invoice1').focus();
+ },
+ specialKey:function(f,e){
+ if (e.getKey() == Ext.EventObject.ENTER) {
+ top.Ext.getCmp('invoice1').focus();
+ top.Ext.getCmp('invoice1').selectText();
+ }
+ }
+ }
+ },{
+ text:'有无发票:'
+ },{
+ xtype : 'combo',
+ id : 'hasInvoice',
+ name : 'hasInvoice',
+ minChars : 0,
+ valueField : 'hasType',
+ displayField : 'hasType',
+ mode : 'local',
+ store : hasTypeStore,
+ forceSelection : true,
+ lazyInit : false,
+ triggerAction : 'all',
+ hideTrigger : true,
+ typeAhead : false,
+ selectOnFocus :true,
+ allowBlank : true,
+ width : 80,
+ tabIndex : 9,
+ listeners : {
+ select : function(field, r) {
top.Ext.getCmp('manufacturer').focus();
},
specialKey:function(f,e){
@@ -854,7 +979,7 @@
selectOnFocus :true,
editable:true,
width : 270,
- tabIndex : 7,
+ tabIndex : 10,
listeners : {
select : function(field, r) {
top.Ext.getCmp('sterileBatchNumber').focus();
@@ -877,7 +1002,7 @@
id : 'sterileBatchNumber',
name : 'sterileBatchNumber',
width : 80,
- tabIndex : 8,
+ tabIndex : 11,
anchor : '95%',
allowBlank:true,
listeners : {
@@ -895,7 +1020,7 @@
id : 'certification',
name : 'certification',
width : 190,
- tabIndex : 9,
+ tabIndex : 12,
allowBlank:true,
anchor : '100%',
listeners : {
@@ -1418,7 +1543,9 @@
supplierName : action.result.data.itemsList[i].supplierName,
identification : action.result.data.itemsList[i].identification,
totalPrice:parseFloat(Ext.util.Format.usMoney(amount*cost)),
- producingArea: action.result.data.itemsList[i].producingArea
+ producingArea: action.result.data.itemsList[i].producingArea,
+ hasBiologicalTestReport : action.result.data.itemsList[i].hasBiologicalTestReport,
+ hasInvoice : action.result.data.itemsList[i].hasInvoice
});
top.Ext.getCmp('godownEntryItemGrid').getStore().add(godownEntryItem);
Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java
===================================================================
diff -u -r12943 -r13039
--- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java (.../GodownEntryItemManagerImpl.java) (revision 12943)
+++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java (.../GodownEntryItemManagerImpl.java) (revision 13039)
@@ -18,6 +18,7 @@
import com.forgon.disinfectsystem.entity.basedatamanager.warehouse.WareHouse;
import com.forgon.tools.hibernate.ObjectDao;
import com.forgon.tools.json.JSONUtil;
+import com.forgon.tools.string.StringTools;
public class GodownEntryItemManagerImpl implements GodownEntryItemManager {
private ObjectDao objectDao;
@@ -120,6 +121,14 @@
String sterileBatchNumber = itemObject.optString("sterileBatchNumber");// 灭菌批次
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;
+ }
GodownEntryItem godownEntryItem = new GodownEntryItem();
godownEntryItem.setId(itemId);
@@ -141,6 +150,8 @@
godownEntryItem.setSterileBatchNumber(sterileBatchNumber);
godownEntryItem.setManufacturer(manufacturer);
godownEntryItem.setProducingArea(producingArea);
+ godownEntryItem.setHasBiologicalTestReport(hasBiologicalTestReport);
+ godownEntryItem.setHasInvoice(hasInvoice);
return godownEntryItem;
}
@@ -174,6 +185,8 @@
newItem.setSupplierName(source.getSupplierName());
newItem.setWarehouseID(source.getWarehouseID());
newItem.setWarehouseName(source.getWarehouseName());
+ newItem.setHasBiologicalTestReport(source.getHasBiologicalTestReport());
+ newItem.setHasInvoice(source.getHasInvoice());
return newItem;
}