Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js =================================================================== diff -u -r30605 -r30700 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js (.../invoiceView.js) (revision 30605) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js (.../invoiceView.js) (revision 30700) @@ -2489,7 +2489,8 @@ {name : 'personInCharge'}, {name : 'warehouseName'}, {name : 'applicant'}, - {name : 'personInChargeCode'} + {name : 'personInChargeCode'}, + {name : 'itemArray'} //将鼠标移入时悬浮的信息内容设置到该属性里,用于显示,不再实时请求后台进行查询了 ]; var filters = new Ext.grid.GridFilters({ @@ -2913,13 +2914,22 @@ grid.on('mouseover',function(e) {// 添加mouseover事件 var index = grid.getView().findRowIndex( e.getTarget());// 根据mouse所在的target可以取到列的位置 + //console.log("index=" + index); if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false) var record = this.getStore().getAt(index); var recordID = record.get('id'); var isDiposableApplicationForm = (record.data['recyclingApplicationType'] == diposableGoodsApplicationForm); var tableContent = record.data['htmlContent']; if (!tableContent) { - var content = ""; + var itemArray = record.get('itemArray'); + tableContent = getTableContent(itemArray); + var curRecord = findRecordByNameAndValueFromStore(grid.getStore(),'id',recordID); + if(!isUndefinedOrNull(curRecord)){ + curRecord.set( + "htmlContent", + tableContent); + } + /*var content = ""; Ext.Ajax.request({ url : WWWROOT + '/disinfectSystem/invoiceAction!getInvoiceItemsByInvoiceId.do', @@ -2977,7 +2987,7 @@ failure : function( response, options) { } - }); + });*/ } else { if(isIE()){ var rowEl = Ext4.fly(e.getTarget()); @@ -2993,6 +3003,39 @@ } } }); + + function getTableContent(invoiceItems){ + if (invoiceItems != null) { + var content = ""; + for ( var i = 0; i < invoiceItems.length; i++) { + content += "
物品名称 | 数量 | ");
+ tableContent += "