Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryForm.js =================================================================== diff -u -r25207 -r26490 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryForm.js (.../godownEntryForm.js) (revision 25207) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryForm.js (.../godownEntryForm.js) (revision 26490) @@ -354,6 +354,7 @@ {name : 'disposableGoodsID'}, {name : 'name'}, {name : 'amount'}, + {name : 'produceDate'}, {name : 'disposableGoodsBatchID'}, {name : 'batchNumber'}, {name : 'cost'}, @@ -399,7 +400,15 @@ } } }) - }, + }, + {header : "生产日期",width : 80,dataIndex : 'produceDate',hidden : !sstsConfig.showProduceDateOfDisposableGoods,menuDisabled : true, renderer:top.Ext.util.Format.dateRenderer('Y-m-d'), + editor : new top.Ext.form.DateExtensiableField({ + minWidth : 177, + format : 'Y-m-d', + altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + allowBlank : false + }) + }, {header : "批次",width : 70,dataIndex : 'batchNumber',menuDisabled : true, editor : new top.Ext.form.TextField({ allowBlank : false, @@ -446,7 +455,7 @@ } }) }, - {id : 'expandColumn',header : "供应商",width : 180,dataIndex : 'supplierName',menuDisabled : true, + {id : 'expandColumn',header : "供应商",width : 150,dataIndex : 'supplierName',menuDisabled : true, editor : sstsConfig.godownEntryNeedVerify == true ? false : new top.Ext.form.ComboBox({ queryParam : 'supplierName', minChars : 0, @@ -600,7 +609,7 @@ name : 'barcode', id : 'barcode' },{ - text : '扫描条码 :' + text : '扫描条码:' },{ xtype : 'textfield', id : 'barcode', @@ -635,7 +644,7 @@ hideTrigger : true, typeAhead : false, allowBlank : true, - width : 270, + width : 170, tabIndex : 1, selectOnFocus : true, disabled:true, @@ -695,12 +704,43 @@ listeners : { specialkey : function(field, e) { if (e.getKey() == Ext.EventObject.ENTER) { - top.Ext.getCmp('batchNumber1').focus(); - top.Ext.getCmp('batchNumber1').selectText(); + top.Ext.getCmp('produceDate').focus(); + top.Ext.getCmp('produceDate').selectText(); } } } },{ + text : '生产日期:', + hidden : !sstsConfig.showProduceDateOfDisposableGoods + },{ + xtype : 'dateextensiablefield',//dateextensiablefield + id : 'produceDate1', + name : 'produceDate1', + hidden : !sstsConfig.showProduceDateOfDisposableGoods, + width : 180, + minWidth : 180, + tabIndex : 6, + anchor : '95%', + allowBlank:sstsConfig.showProduceDateOfDisposableGoods && sstsConfig.produceDateOfDisposableGoodsAllowBlank, + invalidText :'日期输入不正确', + format : 'Y-m-d', + altFormats:'Y-m|Y-n|y-n|y-m|Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ym|Ymd|Yn|Ynj|yn|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', +// readOnly:true, + listeners : { + specialkey : function(field, e) { + if (e.getKey() == Ext.EventObject.ENTER) { + var isOK = field.validate(); + if(isOK){ + var value = field.getValue(); + field.setValue(value); + top.Ext.getCmp('batchNumber1').focus(); + top.Ext.getCmp('batchNumber1').selectText(); + } + + } + } + } + },{ text : '生产批次:' },{ xtype : 'combo', @@ -748,35 +788,12 @@ }, specialkey : function(field, ee) { if (ee.getKey() == Ext.EventObject.ENTER) { - top.Ext.getCmp('producingArea').focus(); - top.Ext.getCmp('producingArea').selectText(); + top.Ext.getCmp('expDate1').focus(); + top.Ext.getCmp('expDate1').selectText(); } } } },{ - text : '产地:' - },{ - xtype : 'textfield', - id : 'producingArea', - name : 'producingArea', - width : 80, - tabIndex : 4, - anchor : '95%', - allowBlank:true, - listeners:{ - specialkey : function(field, ee) { - if (ee.getKey() == Ext.EventObject.ENTER) { - if(sstsConfig.godownEntryShowBiologicalTestReport){ - top.Ext.getCmp('hasBiologicalTestReport').focus(); - top.Ext.getCmp('hasBiologicalTestReport').selectText(); - }else{ - top.Ext.getCmp('expDate1').focus(); - top.Ext.getCmp('expDate1').selectText(); - } - } - } - } - },{ text:'生物检测:', hidden:!sstsConfig.godownEntryShowBiologicalTestReport },{ @@ -815,7 +832,7 @@ render : function() { var tbar = new top.Ext.Toolbar ({ items : [{ - text : '失 效 期:' + text : '失效日期:' },{ xtype : 'dateextensiablefield',//dateextensiablefield id : 'expDate1', @@ -902,8 +919,31 @@ top.Ext.getCmp('hasInvoice').focus(); top.Ext.getCmp('hasInvoice').selectText(); }else{ + top.Ext.getCmp('producingArea').focus(); + top.Ext.getCmp('producingArea').selectText(); + } + } + } + } + },{ + text : '产地:' + },{ + xtype : 'textfield', + id : 'producingArea', + name : 'producingArea', + width : 80, + tabIndex : 4, + anchor : '95%', + allowBlank:true, + listeners:{ + specialkey : function(field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + if(sstsConfig.godownEntryShowBiologicalTestReport){ + top.Ext.getCmp('hasBiologicalTestReport').focus(); + top.Ext.getCmp('hasBiologicalTestReport').selectText(); + }else{ top.Ext.getCmp('manufacturer').focus(); - top.Ext.getCmp('manufacturer').selectText(); + top.Ext.getCmp('manufacturer').selectText(); } } } @@ -1322,6 +1362,7 @@ text : '保存', hidden:saveButton || (commonEntry.isOpen()?true:false), handler : function() { + debugger if(!form.getForm().isValid()){ showResult('请正确填写表单各值'); return false; @@ -1362,6 +1403,7 @@ var items = []; for (var i = 0; i < len; i++) { var record = store.getAt(i); + var produceDate = '' == record.data.produceDate ? '' : record.data.produceDate.format('Y-m-d'); // console.log(record); items.push({ amount : record.data.amount, @@ -1370,6 +1412,7 @@ certification : record.data.certification , cost : record.data.cost, disposableGoodsID : record.data.disposableGoodsID, + produceDate : produceDate, expDate : record.data.expDate.format('Y-m-d'), grade : record.data.grade, hasBiologicalTestReport : record.data.hasBiologicalTestReport, Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/GodownEntryItem.java =================================================================== diff -u -r25609 -r26490 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/GodownEntryItem.java (.../GodownEntryItem.java) (revision 25609) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/GodownEntryItem.java (.../GodownEntryItem.java) (revision 26490) @@ -87,6 +87,11 @@ * 批次id */ private Long disposableGoodsBatchID ; + + /** + * 生产日期 + */ + private Date produceDate; /** * 失效期 @@ -325,6 +330,14 @@ this.disposableGoodsBatchID = disposableGoodsBatchID; } + public Date getProduceDate() { + return produceDate; + } + + public void setProduceDate(Date produceDate) { + this.produceDate = produceDate; + } + public Date getExpDate() { return expDate; } Index: ssts-web/src/main/java/com/forgon/disinfectsystem/inventoryrecord/action/InventoryRecordAction.java =================================================================== diff -u -r23664 -r26490 --- ssts-web/src/main/java/com/forgon/disinfectsystem/inventoryrecord/action/InventoryRecordAction.java (.../InventoryRecordAction.java) (revision 23664) +++ ssts-web/src/main/java/com/forgon/disinfectsystem/inventoryrecord/action/InventoryRecordAction.java (.../InventoryRecordAction.java) (revision 26490) @@ -149,6 +149,7 @@ obj.put("sequence", goods.getSequence()); obj.put("unit", goods.getUnit()); obj.put("type", goods.getType()); + obj.put("produceDate", goods.getProduceDateString()); obj.put("expDate", goods.getExpDateString()); if(DisposableGoods.TYPE_EXPENSIVEDIPOSABLEGOODS.equals(goods.getGoodsType())){ List expensiveGoodsItems = goods.getItems(); Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.js =================================================================== diff -u -r21857 -r26490 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.js (.../disposableGoodsStockView.js) (revision 21857) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/disposableGoods/disposableGoodsStockView.js (.../disposableGoodsStockView.js) (revision 26490) @@ -51,6 +51,7 @@ {name : 'storage'}, {name : 'batchNumber'}, {name : 'cost'}, + {name : 'produceDate'}, {name : 'expDate'}, {name : 'supplierName'} ] @@ -398,7 +399,8 @@ }}, {header : "价格",width : 50,dataIndex : 'cost',menuDisabled:true}, {header : "库存",width : 50,dataIndex : 'storage',menuDisabled:true}, - {header : "失效期",width : 90,dataIndex : 'expDate',renderer:myDateFormat,menuDisabled:true}, + {header : "生产日期",width : 90,dataIndex : 'produceDate',hidden : !sstsConfig.showProduceDateOfDisposableGoods,renderer:myDateFormat,menuDisabled:true}, + {header : "失效日期",width : 90,dataIndex : 'expDate',renderer:myDateFormat,menuDisabled:true}, {id:'supplierName',header : "供应商",width : 130,dataIndex : 'supplierName',menuDisabled:true} ]), autoExpandColumn : 'supplierName', @@ -838,6 +840,7 @@ {name : 'specification'}, {name : 'packageSpec'}, {name : 'amount'}, + {name : 'produceDate'}, {name : 'warehouseName'}, {name : 'minApplyAmount'}, {name : 'unit'}, Index: ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/config.js =================================================================== diff -u -r26418 -r26490 --- ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/config.js (.../config.js) (revision 26418) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/config.js (.../config.js) (revision 26490) @@ -179,5 +179,9 @@ //是否在“科室申请”页面启用“一次性物品退货”、“器械包退货”按钮,没配置或值为false,不启用该功能;值为true,启动该功能。 enableReturnGoodsByInvoicePlan:true, //“科室申请”页面"鼠标悬浮DIV"发货数量,是否减去退货数量,没配置或值为false,不启用该功能;值为true,启动该功能。 - applicationView_sendOutAmounts_subtractReturnedGoodsAmounts:true + applicationView_sendOutAmounts_subtractReturnedGoodsAmounts:true, + //显示一次性物品的生产日期,值为true时,在相关界面会显示生产日期;值为false或者没有配置时,相关界面不显示一次性物品的生产日期 + showProduceDateOfDisposableGoods : true, + //一次性物品的生产日期字段是否允许为空,值为true时,生产日期可以为空;值为false或者没有配置时,生产日期不允许为空。只有当显示一次性物品的生产日期字段时,此配置项才有意义。 + produceDateOfDisposableGoodsAllowBlank : true } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js =================================================================== diff -u -r25660 -r26490 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 25660) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 26490) @@ -321,7 +321,7 @@ top.Ext.getCmp('warehouseName').setValue(name); } -function addItems(disposableGoodsID,batchID,name,amount,cost,batchNumber,expDate,supplierName,sterileBatchNumber,manufacturer,certification,identification,producingArea,grade,manufacturerId,supplierId){ +function addItems(disposableGoodsID,batchID,name,amount,cost,batchNumber,produceDate,expDate,supplierName,sterileBatchNumber,manufacturer,certification,identification,producingArea,grade,manufacturerId,supplierId){ if(top.Ext.getCmp('name1').getValue() == null || top.Ext.getCmp('name1').getValue() == ''){ showResult("请填写物品名称!"); return false; @@ -412,20 +412,20 @@ top.Ext.MessageBox.confirm("请确认",checkMessage+"确定要添加吗?",function(button, text){ if("yes" == button){ //添加明细 - addGodownEntryItem(disposableGoodsID,batchID,name,amount,cost,batchNumber,expDate,supplierName, + addGodownEntryItem(disposableGoodsID,batchID,name,amount,cost,batchNumber,produceDate,expDate,supplierName, sterileBatchNumber,manufacturer,certification,identification,producingArea,grade, manufacturerId,supplierId,hasBiologicalTestReport,hasInvoice,qualifiedCheck,qualifiedLabel); } }); }else{ //添加明细 - addGodownEntryItem(disposableGoodsID,batchID,name,amount,cost,batchNumber,expDate,supplierName, + addGodownEntryItem(disposableGoodsID,batchID,name,amount,cost,batchNumber,produceDate,expDate,supplierName, sterileBatchNumber,manufacturer,certification,identification,producingArea,grade, manufacturerId,supplierId,hasBiologicalTestReport,hasInvoice,qualifiedCheck,qualifiedLabel); } }else{ //添加明细 - addGodownEntryItem(disposableGoodsID,batchID,name,amount,cost,batchNumber,expDate,supplierName, + addGodownEntryItem(disposableGoodsID,batchID,name,amount,cost,batchNumber,produceDate,expDate,supplierName, sterileBatchNumber,manufacturer,certification,identification,producingArea,grade, manufacturerId,supplierId,hasBiologicalTestReport,hasInvoice,qualifiedCheck,qualifiedLabel); } @@ -435,7 +435,7 @@ * 添加明细 */ function addGodownEntryItem(disposableGoodsID,batchID,name,amount,cost,batchNumber, - expDate,supplierName,sterileBatchNumber,manufacturer,certification,identification, + produceDate,expDate,supplierName,sterileBatchNumber,manufacturer,certification,identification, producingArea,grade,manufacturerId,supplierId,hasBiologicalTestReport,hasInvoice,qualifiedCheck,qualifiedLabel){ //添加操作 @@ -450,6 +450,7 @@ amount : Ext.num(parseFloat(amount),0), cost : Ext.num(parseFloat(cost),0), batchNumber : batchNumber, + produceDate : produceDate, expDate : expDate, sterileBatchNumber:sterileBatchNumber, manufacturer:manufacturer, @@ -474,6 +475,7 @@ top.Ext.getCmp('cost1').setValue(''); top.Ext.getCmp('disposableGoodsID').setValue(''); top.Ext.getCmp('batchNumber1').setValue(''); + top.Ext.getCmp('produceDate1').setValue(''); top.Ext.getCmp('expDate1').setValue(''); top.Ext.getCmp('supplier1').setValue(''); top.Ext.getCmp('manufacturerId').setValue(''); @@ -707,6 +709,7 @@ return false; } } + var produceDate = top.Ext.getCmp('produceDate1').getValue(); var expDate = top.Ext.getCmp('expDate1').getValue(); var supplierName = top.Ext.getCmp('supplier1').getRawValue(); var sterileBatchNumber = top.Ext.getCmp('sterileBatchNumber').getRawValue(); @@ -733,14 +736,14 @@ if(dateCompare(expDateStr,nextYearDate) != 1){ top.Ext.MessageBox.confirm("请确认","添加的物品失效日期在一年之内,确定要添加吗?",function(button, text){ if("yes" == button){ - addItems(disposableGoodsID,'',name,count,cost,batchNumber,expDate,supplierName,sterileBatchNumber,manufacturer,certification,'',producingArea,grade,manufacturerId,supplierId); + addItems(disposableGoodsID,'',name,count,cost,batchNumber,produceDate,expDate,supplierName,sterileBatchNumber,manufacturer,certification,'',producingArea,grade,manufacturerId,supplierId); var grid = top.Ext.getCmp('godownEntryItemGrid'); setTotalMoney(grid); top.Ext.getCmp('name1').focus(false,100); } }); }else{ - addItems(disposableGoodsID,'',name,count,cost,batchNumber,expDate,supplierName,sterileBatchNumber,manufacturer,certification,'',producingArea,grade,manufacturerId,supplierId); + addItems(disposableGoodsID,'',name,count,cost,batchNumber,produceDate,expDate,supplierName,sterileBatchNumber,manufacturer,certification,'',producingArea,grade,manufacturerId,supplierId); var grid = top.Ext.getCmp('godownEntryItemGrid'); setTotalMoney(grid); } @@ -961,6 +964,10 @@ var amount =action.result.data.itemsList[i].amount; // var aaa = Ext.util.Format.usMoney(action.result.data.itemsList[i].cost); var cost = parseFloat(action.result.data.itemsList[i].cost); + var produceDate = null; + if (null != action.result.data.itemsList[i].produceDate) { + produceDate = new Date(action.result.data.itemsList[i].produceDate.time); + } var godownEntryItem = new GodownEntryItemRecord({ localID:g_localID++, id : action.result.data.itemsList[i].id, @@ -976,6 +983,7 @@ manufacturer : action.result.data.itemsList[i].manufacturer, certification : action.result.data.itemsList[i].certification, batchNumber : action.result.data.itemsList[i].batchNumber, + produceDate : produceDate, expDate : new Date(action.result.data.itemsList[i].expDate.time), supplierName : action.result.data.itemsList[i].supplierName, identification : action.result.data.itemsList[i].identification, @@ -1426,6 +1434,10 @@ if(specification == null || specification.length <= 0){ b = false; } + var produceDate = " "; + if (null != itemsList[i].produceDate) { + produceDate = new Date(itemsList[i].produceDate.time).Format("yyyy-MM-dd"); + } //预览表格列 content +="" +" " + itemsList[i].diposableGoods.name+ (b == false?"":" ["+specification+"]") @@ -1434,6 +1446,7 @@ +""+ cost +""+ amount*cost +"" + (itemsList[i].supplierName == ""?' ':itemsList[i].supplierName) + +"" + produceDate +"" + new Date(itemsList[i].expDate.time).Format("yyyy-MM-dd"); +""+""; } @@ -1446,6 +1459,7 @@ +"

单价

" +"

总价

" +"

供应商

" + +"

生产日期

" +"

失效时间

"); tableContent +="" + content + "
"; if(grid.getStore().getCount() > index){ Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/stocktakemanager/InventoryItem.java =================================================================== diff -u -r25220 -r26490 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/stocktakemanager/InventoryItem.java (.../InventoryItem.java) (revision 25220) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/stocktakemanager/InventoryItem.java (.../InventoryItem.java) (revision 26490) @@ -123,6 +123,8 @@ */ private String identification; + private Date produceDate;//生产日期 + private Date expDate;//失效期 private String unit;//单位 @@ -391,7 +393,24 @@ public void setSupplierName(String supplierName) { this.supplierName = supplierName; } + + @Transient + public String getProduceDateString(){ + if(produceDate != null){ + String str = Constants.SIMPLEDATEFORMAT_YYYYMMDD.format(produceDate); + return str; + } + return ""; + } + + public Date getProduceDate() { + return produceDate; + } + public void setProduceDate(Date produceDate) { + this.produceDate = produceDate; + } + public Date getExpDate() { return expDate; } Index: ssts-web/src/main/java/com/forgon/disinfectsystem/inventoryrecord/service/InventoryRecordManagerImpl.java =================================================================== diff -u -r25549 -r26490 --- ssts-web/src/main/java/com/forgon/disinfectsystem/inventoryrecord/service/InventoryRecordManagerImpl.java (.../InventoryRecordManagerImpl.java) (revision 25549) +++ ssts-web/src/main/java/com/forgon/disinfectsystem/inventoryrecord/service/InventoryRecordManagerImpl.java (.../InventoryRecordManagerImpl.java) (revision 26490) @@ -839,6 +839,7 @@ expensiveGoodsItem.setBarcode(expensiveGoods.getBarcode()); expensiveGoodsItem.setExpensiveGoodsId(expensiveGoods.getId()); item.getItems().add(expensiveGoodsItem); + item.setProduceDate(disposableGoodsBatchStock.getProduceDate()); } for (List itemsGroupedByPrice : itemsGroupedByPriceMap.values()) { items.addAll(itemsGroupedByPrice); @@ -877,6 +878,7 @@ item.setStorage(identificationAmount); itemsGroupedByPrice.add(item); } + item.setProduceDate(disposableGoodsBatchStock.getProduceDate()); } for (List itemsGroupedByPrice : itemsGroupedByPriceMap.values()) { items.addAll(itemsGroupedByPrice); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoodsBatchStock.java =================================================================== diff -u -r25614 -r26490 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoodsBatchStock.java (.../DisposableGoodsBatchStock.java) (revision 25614) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoodsBatchStock.java (.../DisposableGoodsBatchStock.java) (revision 26490) @@ -68,6 +68,11 @@ * 失效期; */ private Date expDate; + + /** + * 生产日期 + */ + private Date produceDate; /** * 供应商 @@ -221,7 +226,23 @@ public void setExpDate(Date expDate) { this.expDate = expDate; } + + @Transient // 用于页面显示 + public String getProduceDateStr() { + if(produceDate == null){ + return ""; + } + return Constants.FASTDATEFORMAT_YYYYMMDD.format(produceDate); + } + public Date getProduceDate() { + return produceDate; + } + + public void setProduceDate(Date produceDate) { + this.produceDate = produceDate; + } + public String getSupplierName() { return supplierName; } Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoodsBatch.java =================================================================== diff -u -r25609 -r26490 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoodsBatch.java (.../DisposableGoodsBatch.java) (revision 25609) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoodsBatch.java (.../DisposableGoodsBatch.java) (revision 26490) @@ -37,6 +37,8 @@ private Double cost; // 入库价格 + private Date produceDate;// 生产日期 + private Date expDate;// 失效期; private String supplierName;// 供应商 @@ -143,6 +145,22 @@ public void setCost(Double cost) { this.cost = cost; } + + @Transient // 用于页面显示 + public String getProduceDateStr() { + if(produceDate == null){ + return ""; + } + return Constants.FASTDATEFORMAT_YYYYMMDD.format(produceDate); + } + + public Date getProduceDate() { + return produceDate; + } + + public void setProduceDate(Date produceDate) { + this.produceDate = produceDate; + } @Transient // 用于页面显示 public String getExpDateStr() { Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java =================================================================== diff -u -r25722 -r26490 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java (.../GodownEntryManagerImpl.java) (revision 25722) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java (.../GodownEntryManagerImpl.java) (revision 26490) @@ -705,6 +705,7 @@ disposableGoods.setReferencePrice(godownEntryItem.getCost()); // 更新批次定义 disposableGoodsBatch.setCost(godownEntryItem.getCost()); + disposableGoodsBatch.setProduceDate(godownEntryItem.getProduceDate()); disposableGoodsBatch.setExpDate(godownEntryItem.getExpDate()); disposableGoodsBatch.setManufacturer(godownEntryItem.getManufacturer()); disposableGoodsBatch.setSterileBatchNumber(godownEntryItem.getSterileBatchNumber()); @@ -717,6 +718,7 @@ // disposableGoodsBatchStock.setDisposableGoodsBatchID(disposableGoodsBatch.getId()); // disposableGoodsBatchStock.setBatchNumber(godownEntryItem.getBatchNumber()); disposableGoodsBatchStock.setCost(godownEntryItem.getCost()); + disposableGoodsBatchStock.setProduceDate(godownEntryItem.getProduceDate()); disposableGoodsBatchStock.setExpDate(godownEntryItem.getExpDate()); disposableGoodsBatchStock.setManufacturer(godownEntryItem.getManufacturer()); disposableGoodsBatchStock.setSterileBatchNumber(godownEntryItem.getSterileBatchNumber()); Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.js =================================================================== diff -u -r24485 -r26490 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.js (.../appropriationView.js) (revision 24485) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.js (.../appropriationView.js) (revision 26490) @@ -286,6 +286,7 @@ } } // var cost = top.Ext.getCmp('cost').getValue(); + var produceDate = top.Ext.getCmp('produceDate').getValue(); var expDate = top.Ext.getCmp('expDate').getValue(); var supplierName = top.Ext.getCmp('supplierName').getValue(); var sterileBatchNumber = top.Ext.getCmp('sterileBatchNumber').getValue(); @@ -309,6 +310,7 @@ // cost : cost, cost : priceAmount.price, batchNumber : batch.batchNumber, + produceDate : produceDate, expDate : expDate, supplierName : supplierName, sterileBatchNumber : sterileBatchNumber, @@ -458,6 +460,10 @@ id : 'supplierName' },{ xtype : 'hidden', + name : 'produceDate', + id : 'produceDate' + },{ + xtype : 'hidden', name : 'expDate', id : 'expDate' },{ @@ -663,6 +669,7 @@ {name : 'batchNumber'}, {name : 'identification'}, {name : 'cost'}, + {name : 'produceDate'}, {name : 'expDate'}, {name : 'supplierName'}, {name : 'barcode'},//用于记录高值耗材的条码 @@ -681,6 +688,7 @@ {header : "可退库",dataIndex : 'canOutAmount',width : 40,menuDisabled : true}, {header : "批次",width : 100,dataIndex : 'batchNumber',menuDisabled : true}, {header : "标识号",width : 80,dataIndex : 'identification',menuDisabled : true}, + {header : "生产日期",width : 90,dataIndex : 'produceDate',hidden : !sstsConfig.showProduceDateOfDisposableGoods,menuDisabled : true}, {header : "失效日期",width : 90,dataIndex : 'expDate',menuDisabled : true},//, renderer:top.Ext.util.Format.dateRenderer('Y-m-d') {header : "单价",dataIndex : 'cost',width : 40,menuDisabled : true}, {header : "供应商",width : 150,dataIndex : 'supplierName',menuDisabled : true}, @@ -806,6 +814,7 @@ var disposableGoodID = top.Ext.get('disposableGoodsStockID').getValue(); top.Ext.getCmp('cost').setValue(record.data.cost); top.Ext.getCmp('supplierName').setValue(record.data.supplierName); + top.Ext.getCmp('produceDate').setValue(record.data.produceDate); top.Ext.getCmp('expDate').setValue(record.data.expDate); top.Ext.getCmp('sterileBatchNumber').setValue(record.data.sterileBatchNumber); top.Ext.getCmp('manufacturer').setValue(record.data.manufacturer); @@ -1156,6 +1165,10 @@ if(!isUndefinedOrNull(action.result.data.itemsList[i].expDate)){ expDateStr = Ext.util.Format.date(new Date(action.result.data.itemsList[i].expDate.time), 'Y-m-d') } + var produceDateStr = ''; + if(!isUndefinedOrNull(action.result.data.itemsList[i].produceDate)){ + produceDateStr = Ext.util.Format.date(new Date(action.result.data.itemsList[i].produceDate.time), 'Y-m-d') + } var godownEntryItem = new GodownEntryItemRecord({ localID:g_localID++, id : action.result.data.itemsList[i].id, @@ -1170,6 +1183,7 @@ identification : action.result.data.itemsList[i].identification, cost : action.result.data.itemsList[i].cost, batchNumber : action.result.data.itemsList[i].batchNumber, + produceDate : produceDateStr, expDate : expDateStr, supplierName : action.result.data.itemsList[i].supplierName, identification : action.result.data.itemsList[i].identification, Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java =================================================================== diff -u -r23147 -r26490 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java (.../GodownEntryItemManagerImpl.java) (revision 23147) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryItemManagerImpl.java (.../GodownEntryItemManagerImpl.java) (revision 26490) @@ -119,8 +119,12 @@ int amount = Integer.valueOf(itemObject.optString("amount"));// 数量 String barcode = itemObject.optString("barcode");// 条码(一般用于高值耗材),可以为空 Date expDate; + Date produceDate = null; try { expDate = GodownEntryItem.DATE_FORMAT.parse(itemObject.optString("expDate")); + if (StringUtils.isNotBlank(itemObject.optString("produceDate"))) { + produceDate = GodownEntryItem.DATE_FORMAT.parse(itemObject.optString("produceDate")); + } } catch (ParseException e) { e.printStackTrace(); throw new RuntimeException("日期格式错误!"); @@ -161,6 +165,7 @@ godownEntryItem.setAmount(new Long(amount)); godownEntryItem.setCost(cost); godownEntryItem.setBatchNumber(batchNumber); + godownEntryItem.setProduceDate(produceDate); godownEntryItem.setExpDate(expDate); godownEntryItem.setCertification(certification); godownEntryItem.setSupplierName(supplierName); @@ -207,6 +212,7 @@ newItem.setDisposableGoodsBatchStockID(source.getDisposableGoodsBatchStockID()); newItem.setDisposableGoodsID(source.getDisposableGoodsID()); newItem.setDisposableGoodsStockID(source.getDisposableGoodsStockID()); + newItem.setProduceDate(source.getProduceDate()); newItem.setExpDate(source.getExpDate()); newItem.setGodownEntry(source.getGodownEntry()); newItem.setId(source.getId()); Index: ssts-web/src/main/webapp/disinfectsystem/stocktakerecordmanager/inventoryDisposableGoodsForm.js =================================================================== diff -u -r25633 -r26490 --- ssts-web/src/main/webapp/disinfectsystem/stocktakerecordmanager/inventoryDisposableGoodsForm.js (.../inventoryDisposableGoodsForm.js) (revision 25633) +++ ssts-web/src/main/webapp/disinfectsystem/stocktakerecordmanager/inventoryDisposableGoodsForm.js (.../inventoryDisposableGoodsForm.js) (revision 26490) @@ -66,6 +66,7 @@ {name : 'sequence'}, {name : 'unit'}, {name : 'type'}, + {name : 'produceDate'}, {name : 'expDate'} ] ) @@ -199,6 +200,7 @@ {header : "物品类型",dataIndex : 'type',width : 60, sortable:true, menuDisabled : true}, {header : "规格",dataIndex : 'specification',width : 60,menuDisabled : true}, {header : "批次",width : 50,dataIndex : 'batchNumber',menuDisabled : true}, + {header : "生产日期",hidden : !sstsConfig.showProduceDateOfDisposableGoods, width : 80,dataIndex : 'produceDate',menuDisabled : true}, {header : "失效时期",width : 80,dataIndex : 'expDate',menuDisabled : true}, {header : "账面数量",dataIndex : 'amount',width : 40,menuDisabled : true,renderer : isChange}, {header : "盘点数量",dataIndex : 'inventoryAmount',css: 'background: #F0F0F0;',width : 40,menuDisabled : true,