Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r22333 -r22337 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 22333) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 22337) @@ -337,8 +337,8 @@ {hidden :SSTS_ExpensiveGoods_Hidden_Menu || SSTS_ExpensiveGoodsStockEntry_Hidden_Manager,text:"高值耗材库存",href:WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsStockView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_ExpensiveGoods_Hidden_Menu,text:"高值耗材申请单",href:WWWROOT+'/disinfectsystem/recyclingApplication/expensiveGoodsApplication/expensiveGoodsApplicationView.jsp',hrefTarget:linkTarget,leaf:true}, //{hidden :SSTS_ExpensiveGoods_Hidden_Menu,text:"高值耗材出入库记录",href:WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/storageRecordView.jsp',hrefTarget:linkTarget,leaf:true}, - {hidden :SSTS_ExpensiveGoods_Hidden_Menu || SSTS_ExpensiveGoodsPurchaseGodownEntry_Hidden_Manager,text:"高值耗材自购入库单管理",href:WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryView.jsp?entryType=' + entryTypePurchase,hrefTarget:linkTarget,leaf:true}, - {hidden :SSTS_ExpensiveGoods_Hidden_Menu || SSTS_ExpensiveGoodsPrepareGodownEntry_Hidden_Manager,text:"高值耗材预入库单管理",href:WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryView.jsp?entryType=' + entryTypePrepareIn,hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_ExpensiveGoods_Hidden_Menu || SSTS_ExpensiveGoodsPurchaseGodownEntry_Hidden_Manager,text:"高值耗材自购入库单管理",href:encodeURI(WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryView.jsp?entryType=' + entryTypePurchase),hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_ExpensiveGoods_Hidden_Menu || SSTS_ExpensiveGoodsPrepareGodownEntry_Hidden_Manager,text:"高值耗材预入库单管理",href:encodeURI(WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryView.jsp?entryType=' + entryTypePrepareIn),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_ExpensiveGoodsGodownOutEntryManagement_Hidden_Menu,text:"高值耗材退库单管理",href:WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownOutEntryView.jsp',hrefTarget:linkTarget,leaf:true}, //{hidden :SSTS_ExpensiveGoods_Hidden_Menu,text:"高值耗材调拨单管理",href:WWWROOT+'/disinfectsystem/assestManagement/godownEntry/appropriationView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_ExpensiveGoods_Hidden_Menu,text:"高值耗材盘盈盘亏管理",href:WWWROOT+'/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownStockTakeView.jsp',hrefTarget:linkTarget,leaf:true}, Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryView.js =================================================================== diff -u -r22291 -r22337 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryView.js (.../expensiveGoodsGodownEntryView.js) (revision 22291) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryView.js (.../expensiveGoodsGodownEntryView.js) (revision 22337) @@ -377,6 +377,7 @@ } //top.Ext.getCmp('expensiveGoodsGodownEntryItemGrid').getStore().insert(0 , expensiveGoodsGodownEntryItem); clearAddedElementValue(); + top.Ext.getCmp('name1').focus(); } /** Index: ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/service/ExpensiveGoodsBillManagerImpl.java =================================================================== diff -u -r22309 -r22337 --- ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/service/ExpensiveGoodsBillManagerImpl.java (.../ExpensiveGoodsBillManagerImpl.java) (revision 22309) +++ ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/service/ExpensiveGoodsBillManagerImpl.java (.../ExpensiveGoodsBillManagerImpl.java) (revision 22337) @@ -505,6 +505,8 @@ Long itemId = JSONUtil.optLong(itemObject,"id",null); Long expensiveGoodsId = JSONUtil.optLong(itemObject,"expensiveGoodsId",null);//高值耗材定义id Long amount = JSONUtil.optLong(itemObject,"amount",null);//数量 + Long manufacturerId = JSONUtil.optLong(itemObject,"manufacturerId",null);//生产厂家id + String manufacturerName = JSONUtil.optString(itemObject,"manufacturerName",null);//生产厂家名字 double price = Double.valueOf(itemObject.optString("price"));// 价格 ExpensiveGoods expensiveGoods = expensiveGoodsManager.get(expensiveGoodsId); //拼接物品名字[规格] @@ -544,6 +546,8 @@ expensiveGoodsBillItem.setExpensiveGoodsId(expensiveGoodsId); expensiveGoodsBillItem.setAmount(amount); expensiveGoodsBillItem.setPrice(price); + expensiveGoodsBillItem.setManufacturerId(manufacturerId); + expensiveGoodsBillItem.setManufacturerName(manufacturerName); return expensiveGoodsBillItem; } Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/ExpensiveGoodsBillItem.java =================================================================== diff -u -r22136 -r22337 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/ExpensiveGoodsBillItem.java (.../ExpensiveGoodsBillItem.java) (revision 22136) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/ExpensiveGoodsBillItem.java (.../ExpensiveGoodsBillItem.java) (revision 22337) @@ -68,6 +68,16 @@ private Long amount ; /** + * 生产厂家id + */ + private Long manufacturerId; + + /** + * 生产厂家名称 + */ + private String manufacturerName; + + /** * 高值耗材(非一次性物品高值耗材)实例集合 * 不持久化,仅用于前后端数据传递与交互 */ @@ -152,6 +162,22 @@ this.expensiveGoodsInstanceList = expensiveGoodsInstanceList; } + public Long getManufacturerId() { + return manufacturerId; + } + + public void setManufacturerId(Long manufacturerId) { + this.manufacturerId = manufacturerId; + } + + public String getManufacturerName() { + return manufacturerName; + } + + public void setManufacturerName(String manufacturerName) { + this.manufacturerName = manufacturerName; + } + /** * 查询该发票明细的所有的高值耗材实例 * @param dao Index: ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/dwr/table/ExpensiveGoodsGodownEntryTableManager.java =================================================================== diff -u -r21069 -r22337 --- ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/dwr/table/ExpensiveGoodsGodownEntryTableManager.java (.../ExpensiveGoodsGodownEntryTableManager.java) (revision 21069) +++ ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/dwr/table/ExpensiveGoodsGodownEntryTableManager.java (.../ExpensiveGoodsGodownEntryTableManager.java) (revision 22337) @@ -1,5 +1,7 @@ package com.forgon.disinfectsystem.expensiveGoods.dwr.table; +import java.text.SimpleDateFormat; +import java.util.Calendar; import java.util.List; import java.util.Map; @@ -18,8 +20,10 @@ import com.forgon.disinfectsystem.expensiveGoods.service.ExpensiveGoodsGodownEntryItemManager; import com.forgon.disinfectsystem.expensiveGoods.service.ExpensiveGoodsGodownEntryManager; import com.forgon.disinfectsystem.expensiveGoods.service.ExpensiveGoodsManager; +import com.forgon.tools.date.DateTools; import com.forgon.tools.db.DatabaseUtil; import com.forgon.tools.hibernate.ObjectDao; +import com.forgon.tools.util.ForgonDateUtils; public class ExpensiveGoodsGodownEntryTableManager { @@ -110,7 +114,17 @@ sqlCondition += " and time >= "+ dateQueryAdapter.dateAdapter(sqlWhereParamMap.get("startDate")); } if(sqlWhereParamMap.containsKey("endDate") && StringUtils.isNotBlank(sqlWhereParamMap.get("endDate"))){ - sqlCondition += " and time <= "+ dateQueryAdapter.dateAdapter(sqlWhereParamMap.get("endDate")); + String endTimeStr = sqlWhereParamMap.get("endDate"); + Calendar endTime = Calendar.getInstance(); + endTime.setTime(ForgonDateUtils.safelyParseDate(endTimeStr)); + + endTime.set(Calendar.HOUR_OF_DAY, 23); + endTime.set(Calendar.MINUTE, 59); + endTime.set(Calendar.SECOND, 59); + SimpleDateFormat sdf=new SimpleDateFormat(DateTools.COMMON_DATE_HMS); + endTimeStr = sdf.format(endTime.getTime()); + + sqlCondition += " and time <= "+ dateQueryAdapter.dateAdapter(endTimeStr); } if(sqlWhereParamMap.containsKey("expensiveGoodsId") && DatabaseUtil.isPoIdValid(sqlWhereParamMap.get("expensiveGoodsId"))){ sqlCondition += " and id in (select ei.expensiveGoodsGodownEntry.id from "+ ExpensiveGoodsGodownEntryItem.class.getSimpleName() +" ei where ei.expensiveGoodsId = "+ sqlWhereParamMap.get("expensiveGoodsId") + ")"; Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsBill/expensiveGoodsBillForm.js =================================================================== diff -u -r22295 -r22337 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsBill/expensiveGoodsBillForm.js (.../expensiveGoodsBillForm.js) (revision 22295) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsBill/expensiveGoodsBillForm.js (.../expensiveGoodsBillForm.js) (revision 22337) @@ -32,6 +32,66 @@ } }); + //第二工具栏 + var tbar2 = new top.Ext.Toolbar({ + items:[ + { + text:'单    价:' + },{ + xtype : 'textfield', + maxLength : '18', + id : 'price', + name : 'price', + width : 150, + 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%', + allowBlank:true, + listeners : { + specialkey : function(field, e) { + if (e.getKey() == Ext.EventObject.ENTER) { + focusTo('amount1'); + } + } + } + },{ + text : '数    量:' + },{ + xtype : 'textfield', + maxLength : '16', + id : 'amount1', + name : 'amount1', + allowBlank:true, + width : 110, + regex: /^\d+$/, + regexText:'只能输入整数', + anchor : '95%', + tabIndex : 2, + listeners : { + specialkey : function(field, e) { + if (e.getKey() == Ext.EventObject.ENTER) { + if(!committedStatus){ + if(addExpensiveGoodsBill() == true){ + focusTo('name1'); + } + } + } + } + } + },{ + text : '添加', + hidden : committedStatus, + iconCls : 'btn_ext_add', + id:'addBtn', + handler : function() { + if(addExpensiveGoodsBill() == true){ + focusTo('name1'); + } + } + } + ] + }); if(id==undefined || id == "" || id < 0){ disableShowImageButton = true; }else{ @@ -279,14 +339,17 @@ {name : 'totalPrice'}, {name : 'supplierName'}, {name : 'deleteButton'}, - {name : 'expensiveGoodsId'} + {name : 'expensiveGoodsId'}, + {name : 'manufacturerId'}, + {name : 'manufacturerName'} ] }) }), cm : new top.Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), {header : "id",dataIndex : 'id',hidden : true}, - {header : "名称",dataIndex : 'name',width : 100,menuDisabled : true}, - {header : "供应商",dataIndex : 'supplierName',width : 120,menuDisabled : true}, + {header : "名称",dataIndex : 'name',width : 120,menuDisabled : true}, +// {header : "供应商",dataIndex : 'supplierName',width : 120,menuDisabled : true}, + {header : "生产厂家",dataIndex : 'manufacturerName',width : 100,menuDisabled : true}, {header : "单价",dataIndex : 'price',width : 50,menuDisabled : true}, {header : "数量",dataIndex : 'amount',width : 50,menuDisabled : true // ,editor : new top.Ext.form.TextField({ @@ -327,7 +390,7 @@ queryParam : 'spell', minChars : 0, valueField : 'id', - displayField : 'displayName', + displayField : 'showName', pageSize : 100, // listConfig: {width: 300}, listWidth : 250, @@ -347,55 +410,41 @@ top.Ext.getCmp('name1').setValue(record.data.displayName); top.Ext.getCmp('name1').selectText(); top.Ext.getCmp('expensiveGoodsId').setValue(record.data.id); + top.Ext.getCmp('manufacturer1').setValue(record.data.madeCompanyName); + top.Ext.getCmp('manufacturerId1').setValue(record.data.madeCompanyId); top.Ext.getCmp('price').setValue(record.data.referencePrice); //console.log(record.data); - } - } - },{ - text : '数量:' - },{ - xtype : 'textfield', - maxLength : '16', - id : 'amount1', - name : 'amount1', - allowBlank:true, - width : 50, - regex: /^\d+$/, - regexText:'只能输入整数', - anchor : '95%', - tabIndex : 2, - listeners : { + }, specialkey : function(field, e) { if (e.getKey() == Ext.EventObject.ENTER) { focusTo('price'); } } } },{ - text:'单价:' + text : '生产厂家:' },{ - xtype : 'textfield', - maxLength : '16', - id : 'price', - name : 'price', - width : 50, - 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%', - allowBlank:true + xtype :'hidden', + name : 'manufacturerId1', + id : 'manufacturerId1' },{ - text : '添加', - hidden : committedStatus, - //hidden: (id == ""?false:true), - iconCls : 'btn_ext_add', - id:'addBtn', - handler : function() { - if(addExpensiveGoodsBill() == true){ - focusTo('name1'); - } + xtype : 'textfield', + id : 'manufacturer1', + name : 'manufacturer1', + valueField : 'id', + displayField : 'name', + width : 140 , + tabIndex : 12, + allowBlank:true, + editable:false, + anchor : '100%', + readOnly:true + }], + listeners: { + render : function() { + tbar2.render(this.tbar); } - }] + } })] } ,{ Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/ExpensiveGodownEntryReceivingReportItemVO.java =================================================================== diff -u -r22280 -r22337 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/ExpensiveGodownEntryReceivingReportItemVO.java (.../ExpensiveGodownEntryReceivingReportItemVO.java) (revision 22280) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/ExpensiveGodownEntryReceivingReportItemVO.java (.../ExpensiveGodownEntryReceivingReportItemVO.java) (revision 22337) @@ -315,12 +315,18 @@ if(this.getExpensiveGoodsId() !=null && arg0.getExpensiveGoodsId() !=null){ int i = this.getExpensiveGoodsId().intValue() - arg0.getExpensiveGoodsId().intValue();//先高值耗材id排序 if(i==0){ - return this.getModel().compareTo(arg0.getModel());//型号排序 + if(this.getModel() !=null && arg0.getModel() !=null){ + return this.getModel().compareTo(arg0.getModel());//型号排序 + } } return i; - }//若高值耗材id为空则只按型号排序 + } else { - return this.getModel().compareTo(arg0.getModel());//型号排序 + if(this.getModel() !=null && arg0.getModel() !=null){ + return this.getModel().compareTo(arg0.getModel());//型号排序 + }else{ + return 0; + } } } } Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryForm.js =================================================================== diff -u -r22309 -r22337 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryForm.js (.../expensiveGoodsGodownEntryForm.js) (revision 22309) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsGodownEntryForm.js (.../expensiveGoodsGodownEntryForm.js) (revision 22337) @@ -82,17 +82,7 @@ tabIndex : 12, allowBlank:true, anchor : '100%', - readOnly:true, - listeners : { - specialkey : function(field, e) { - var key = e.getKey(); - if (key == Ext.EventObject.ENTER) { -// addGodown(); - top.Ext.getCmp('name1').focus(); - top.Ext.getCmp('name1').selectText(); - } - } - } + readOnly:true },{ text : '批次号:' },{ @@ -144,15 +134,12 @@ // 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('amount1').focus(); - top.Ext.getCmp('amount1').selectText(); - } - + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + var value = field.getValue(); + field.setValue(value); + top.Ext.getCmp('amount1').focus(); + top.Ext.getCmp('amount1').selectText(); } } } @@ -171,7 +158,8 @@ tabIndex : 2, listeners : { specialkey : function(field, e) { - if (e.getKey() == Ext.EventObject.ENTER) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { top.Ext.getCmp('firstBodyCode1').focus(); } } @@ -211,12 +199,11 @@ anchor : '95%', allowBlank:true, listeners : { - render : function(c) { - c.getEl().on('keypress',function(e) { - if (e.getKey() == 13) {//回车键 - onScanBodyCode('firstBodyCode1'); - } - }); + specialkey : function(field, e) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + onScanBodyCode('firstBodyCode1'); + } } } },{ @@ -228,12 +215,11 @@ width : 150, anchor : '95%', listeners : { - render : function(c) { - c.getEl().on('keypress',function(e) { - if (e.getKey() == 13) {//回车键 - onScanBodyCode('secondBodyCode1'); - } - }); + specialkey : function(field, e) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + onScanBodyCode('secondBodyCode1'); + } } } },{ @@ -246,12 +232,11 @@ anchor : '95%', allowBlank:true, listeners : { - render : function(c) { - c.getEl().on('keypress',function(e) { - if (e.getKey() == 13) {//回车键 - onScanBodyCode('thirdBodyCode1'); - } - }); + specialkey : function(field, e) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + onScanBodyCode('thirdBodyCode1'); + } } } },{ @@ -533,10 +518,10 @@ {header : "生产厂家id",dataIndex : 'manufacturerId',hidden : true}, {header : "expensiveGoodsId",dataIndex : 'expensiveGoodsId',hidden : true}, {header : "expensiveGoodsName",dataIndex : 'expensiveGoodsName',hidden : true}, - {header : "生产厂家",dataIndex : 'manufacturerName',width : 70,menuDisabled : true}, - {header : "物品名称",dataIndex : 'expensiveGoodsdisplayName',width : 70,menuDisabled : true}, - {header : "型号",dataIndex : 'model',width : 50,menuDisabled : true}, - {header : "注册证号",width : 50,dataIndex : 'certification',menuDisabled : true}, + {header : "生产厂家",dataIndex : 'manufacturerName',width : 100,menuDisabled : true}, + {header : "物品名称",dataIndex : 'expensiveGoodsdisplayName',width : 100,menuDisabled : true}, + {header : "型号",dataIndex : 'model',width : 70,menuDisabled : true}, + {header : "注册证号",width : 70,dataIndex : 'certification',menuDisabled : true}, {header : "单价",dataIndex : 'cost',width : 35,menuDisabled : true}, {header : "失效日期",width : 50,dataIndex : 'expDate',menuDisabled : true, renderer:top.Ext.util.Format.dateRenderer('Y-m-d')}, {header : "批次号",dataIndex : 'batchNumber',width : 70,menuDisabled : true}, @@ -617,7 +602,7 @@ top.Ext.getCmp('cost1').setValue(record.data.referencePrice); top.Ext.getCmp('certification1').setValue(record.data.certification); top.Ext.getCmp('manufacturer1').setValue(record.data.madeCompanyName); - top.Ext.getCmp('manufacturer1Id').setValue(record.data.madeCompanyId); + top.Ext.getCmp('manufacturerId').setValue(record.data.madeCompanyId); top.Ext.getCmp('model1').setValue(""); top.Ext.getCmp('expDate1').setValue(""); top.Ext.getCmp('batchNumber1').setValue(""); @@ -662,16 +647,7 @@ allowBlank:true, editable:false, anchor : '100%', - readOnly:true, - listeners : { - specialkey : function(field, e) { - var key = e.getKey(); - if (key == Ext.EventObject.ENTER) { - top.Ext.getCmp('model1').focus(); -// top.Ext.getCmp('model1').selectText(); - } - } - } + readOnly:true },{ text : '型号:' },{ @@ -705,7 +681,6 @@ var key = e.getKey(); if (key == Ext.EventObject.ENTER) { top.Ext.getCmp('batchNumber1').focus(); - top.Ext.getCmp('batchNumber1').selectText(); } } } @@ -1329,6 +1304,7 @@ var expensiveGoodsId = parseInt(item.expensiveGoodsId); var amount = item.amount; var displayName = item.expensiveGoodsdisplayName; + var manufacturerName = item.manufacturerName; for(var i = 0;i < itemsAmountArray.length; i++){ if(expensiveGoodsId == itemsAmountArray[i].expensiveGoodsId){ var amount = itemsAmountArray[i].amount+1; @@ -1339,7 +1315,8 @@ var object = { expensiveGoodsId:expensiveGoodsId, amount: 1, - displayName : displayName + displayName : displayName, + manufacturerName : manufacturerName } itemsAmountArray.push(object); } @@ -1348,6 +1325,7 @@ var expensiveGoodsId = iPDetailData.expensiveGoodsId; var amount = iPDetailData.amount; var name = iPDetailData.name; + var manufacturerName = iPDetailData.manufacturerName; for(var i = 0;i < iPAmountArray.length; i++){ if(expensiveGoodsId == iPAmountArray[i].expensiveGoodsId){ return; @@ -1356,7 +1334,8 @@ var object = { expensiveGoodsId:expensiveGoodsId, amount: amount, - name : name + name : name, + manufacturerName : manufacturerName } iPAmountArray.push(object); } @@ -1365,12 +1344,13 @@ var expensiveGoodsId = item.expensiveGoodsId; var amount = item.amount; var displayName = item.displayName; + var manufacturerName = item.manufacturerName; for (var i = 0; i < iPAmountArray.length; i++) { if(expensiveGoodsId == iPAmountArray[i].expensiveGoodsId){ if(amount >= iPAmountArray[i].amount){ return true; }else{ - showResult('物品'+displayName+"的入库数量:"+amount+"小于"+"绑定申请的申请单数量:"+iPAmountArray[i].amount); + showResult('('+manufacturerName+')'+displayName+"的入库数量:"+amount+"小于"+"绑定申请的申请单数量:"+iPAmountArray[i].amount); return false; } } Index: ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/action/ExpensiveGoodsBillAction.java =================================================================== diff -u -r22280 -r22337 --- ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/action/ExpensiveGoodsBillAction.java (.../ExpensiveGoodsBillAction.java) (revision 22280) +++ ssts-expensivegoods/src/main/java/com/forgon/disinfectsystem/expensiveGoods/action/ExpensiveGoodsBillAction.java (.../ExpensiveGoodsBillAction.java) (revision 22337) @@ -223,6 +223,8 @@ obj.put("totalPrice", item.getAmount()*item.getPrice()); obj.put("supplierName", expensiveGoodsBill.getSupplierName()); obj.put("supplierId", expensiveGoodsBill.getSupplierId()); + obj.put("manufacturerId", item.getManufacturerId()); + obj.put("manufacturerName", item.getManufacturerName()); jsonArray.add(obj); } Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsBill/expensiveGoodsBillView.js =================================================================== diff -u -r22295 -r22337 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsBill/expensiveGoodsBillView.js (.../expensiveGoodsBillView.js) (revision 22295) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/expensiveGoods/expensiveGoodsBill/expensiveGoodsBillView.js (.../expensiveGoodsBillView.js) (revision 22337) @@ -86,6 +86,8 @@ {name : 'supplierName'}, {name : 'expensiveGoodsId'}, {name : 'supplierId'}, + {name : 'manufacturerId'}, + {name : 'manufacturerName'}, ]); //高值耗材实例明细对象 @@ -194,18 +196,21 @@ top.Ext.getCmp('name1').setValue(''); top.Ext.getCmp('amount1').setValue(''); top.Ext.getCmp('expensiveGoodsId').setValue(''); + top.Ext.getCmp('manufacturerId1').setValue(''); + top.Ext.getCmp('manufacturer1').setValue(''); top.Ext.getCmp('price').setValue(''); } //添加发票 -function addItems(name,amount,price,supplierName,expensiveGoodsId,supplierId){ +function addItems(name,amount,price,supplierName,expensiveGoodsId,supplierId,manufacturerId,manufacturerName){ for(var i = 0;i < top.Ext.getCmp('goodBillItemGrid').getStore().getCount();i++){ + var r_grid = top.Ext.getCmp('goodBillItemGrid').getStore().getAt(i).data; //console.log(top.Ext.getCmp('goodBillItemGrid').getStore().getAt(i).data); - if(top.Ext.getCmp('goodBillItemGrid').getStore().getAt(i).data.name == name){ + if(r_grid.expensiveGoodsId == expensiveGoodsId && r_grid.manufacturerId == manufacturerId){ showResult("该物品已经存在,不能重复添加!"); return false; } - if(top.Ext.getCmp('goodBillItemGrid').getStore().getAt(i).data.supplierId != supplierId){ + if(r_grid.supplierId != supplierId){ showResult("一张发票只能有一个供应商!"); return false; } @@ -236,7 +241,9 @@ totalPrice:totalPrice, supplierName : supplierName, expensiveGoodsId : expensiveGoodsId, - supplierId : supplierId + supplierId : supplierId, + manufacturerId : manufacturerId, + manufacturerName : manufacturerName }); //显示高值耗材实例 addExpensiveGoodsInstanceItem(expensiveGoodsBillItem); @@ -359,9 +366,11 @@ var price = top.Ext.getCmp('price').getValue(); var supplierName = top.Ext.getCmp('supplierName').getValue(); var supplierId = top.Ext.getCmp('supplierId').getValue(); + var manufacturerId = top.Ext.getCmp('manufacturerId1').getValue(); + var manufacturerName = top.Ext.getCmp('manufacturer1').getValue(); // console.log(amount1); // console.log(price); - return addItems(name,amount1,price,supplierName,expensiveGoodsId,supplierId); + return addItems(name,amount1,price,supplierName,expensiveGoodsId,supplierId,manufacturerId,manufacturerName); } // 删除 @@ -460,7 +469,9 @@ totalPrice:parseFloat(Ext.util.Format.usMoney(amount*price)), supplierName : data.itemsList[i].supplierName, expensiveGoodsId : expensiveGoodsId, - supplierId : supplierId + supplierId : supplierId, + manufacturerId : data.itemsList[i].manufacturerId, + manufacturerName : data.itemsList[i].manufacturerName }); //若未提交则添加可结算的实例 if(committedStatus==false){ @@ -699,7 +710,6 @@ frame : false }, readerDetail, ExpensiveGoodsBillTableManager.findExpensiveGoodBillTableList, - // ExpensiveGoodsPurchaseTableManager.findExpensiveGoodPurchaseTableList, null );