Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r14627 -r14668 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14627) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 14668) @@ -11,6 +11,7 @@ var allowApplyDisposableGoodsWhenUnderstock = true;// 一次性物品库存不足时,是否允许申领 var windowHeight = top.document.body.clientHeight > 650 ? 650 : top.document.body.clientHeight; var invoicePlanPrintButtonName = '发货计划'; +var recyclingApplicationVersion = sstsConfig.recyclingApplicationVersion; if (sstsConfig.invoicePlanPrintButtonName != undefined){ invoicePlanPrintButtonName = sstsConfig.invoicePlanPrintButtonName; } @@ -3422,27 +3423,105 @@ } }]; + //如果不是用版本2或者是在高级视图的全部申请单打开,则按原来的显示 + if (recyclingApplicationVersion != 2 || listType == 'all'){ + grid = new Ext.ux.ForgonPageGrid({ + title : entityName + '单列表', + tbar : tbar, + pageSize : 20, + defaultSortField : sortFieldStr, + defaultSortDirection : 'DESC', + searchDisableIndexes : ['invoiceStatus'], + isCheckboxSelectionModel : true, + rememberSelected : false, + isShowSearchField : true, + columns : columns, + plugins: filters, + autoExpandColumn : 'operationRemark', + renderTo : 'gridDiv', + frame : false + }, + readerDetail, + RecyclingApplicationTableManager.findRecyclingApplicationTableList, + null + ); + + var tableContent; + grid.on('mouseover', function(e) {// 添加mouseover事件 + var index = grid.getView().findRowIndex(e.getTarget());// 根据mouse所在的target可以取到列的位置 + if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false) + var record = this.getStore().getAt(index); + var BorrowName = ''; + var BorrowAmount = ''; + var isDiposableApplicationForm = (record.data['type']==diposableGoodsApplicationForm); + tableContent = record.data['htmlContent'];// + if(!tableContent){ + var content = ""; + DWREngine.setAsync(false); + InvoicePlanTableManager.findApplicationItemVOListByInvoicePlanId(record.data['id'],function(voItems){ + for(var i=0;i"; + } + var recyclingAmount = voItems[i].recyclingAmount; + content +=" " + tousseName +"" + voItems[i].amount+"" + recyclingAmount+"" + voItems[i].invoiceAmount+""+BorrowAmount; + //一次性物品加编号 + if(isDiposableApplicationForm){ + var code = voItems[i].externalCode; + if(code == null || code.length <= 0){ + code = " "; + } + content +=""+ code +""; + } + content +=""; + //消毒物品加材料 + var material = voItems[i].material; + if(material != null && material.length > 0){ + var materialArray = material.split("@&"); + for ( var j = 0; j < materialArray.length; j++) { + var materialItems = materialArray[j].split("#&"); + content +="   " + materialItems[0] +"" + materialItems[1]+""; + content +="" + (materialItems[2] == "null" ? " " : materialItems[2]) + " "; + } + } + } + }); + DWREngine.setAsync(true); + tableContent = (""+BorrowName); + if(isDiposableApplicationForm){ + tableContent += ""; + } + tableContent += "" + content + "

物品名称

申请数量

回收数量

已发货数量

编码


"; + record.set("htmlContent",tableContent); + } +// var maxWidth = grid.getInnerWidth(); + var maxHeight = grid.getInnerHeight(); + var rowEl = Ext4.fly(e.getTarget());// 把target转换成Ext.Element对象 + //var align = e.xy[1] > maxHeight / 2 ? 'bl-tr' : 'tl-tr'; + rowEl.set({ + 'data-qtip' : tableContent,'data-qwidth':450,'data-qtitle':' 申请物品列表:'},false); +// + /*grid.tip.show(); + grid.tip.body.dom.innerHTML = tableContent;*/ + }else{ + + } + }); + + var viewport = new Ext.Viewport({ + layout : 'border', + items : [{ + region : 'center', + margins : '0 0 0 0', + layout : 'fit', + items : grid + }] + }); + } - grid = new Ext.ux.ForgonPageGrid({ - title : entityName + '单列表', - tbar : tbar, - pageSize : 20, - defaultSortField : sortFieldStr, - defaultSortDirection : 'DESC', - searchDisableIndexes : ['invoiceStatus'], - isCheckboxSelectionModel : true, - rememberSelected : false, - isShowSearchField : true, - columns : columns, - plugins: filters, - autoExpandColumn : 'operationRemark', - renderTo : 'gridDiv', - frame : false - }, - readerDetail, - RecyclingApplicationTableManager.findRecyclingApplicationTableList, - null - ); + /*var view = grid.getView(); // Capture the GridView. grid.tip = new Ext.ToolTip({ @@ -3476,77 +3555,7 @@ } });*/ - var tableContent; - grid.on('mouseover', function(e) {// 添加mouseover事件 - var index = grid.getView().findRowIndex(e.getTarget());// 根据mouse所在的target可以取到列的位置 - if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false) - var record = this.getStore().getAt(index); - var BorrowName = ''; - var BorrowAmount = ''; - var isDiposableApplicationForm = (record.data['type']==diposableGoodsApplicationForm); - tableContent = record.data['htmlContent'];// - if(!tableContent){ - var content = ""; - DWREngine.setAsync(false); - InvoicePlanTableManager.findApplicationItemVOListByInvoicePlanId(record.data['id'],function(voItems){ - for(var i=0;i"; - } - var recyclingAmount = voItems[i].recyclingAmount; - content +=" " + tousseName +"" + voItems[i].amount+"" + recyclingAmount+"" + voItems[i].invoiceAmount+""+BorrowAmount; - //一次性物品加编号 - if(isDiposableApplicationForm){ - var code = voItems[i].externalCode; - if(code == null || code.length <= 0){ - code = " "; - } - content +=""+ code +""; - } - content +=""; - //消毒物品加材料 - var material = voItems[i].material; - if(material != null && material.length > 0){ - var materialArray = material.split("@&"); - for ( var j = 0; j < materialArray.length; j++) { - var materialItems = materialArray[j].split("#&"); - content +="   " + materialItems[0] +"" + materialItems[1]+""; - content +="" + (materialItems[2] == "null" ? " " : materialItems[2]) + " "; - } - } - } - }); - DWREngine.setAsync(true); - tableContent = (""+BorrowName); - if(isDiposableApplicationForm){ - tableContent += ""; - } - tableContent += "" + content + "

物品名称

申请数量

回收数量

已发货数量

编码


"; - record.set("htmlContent",tableContent); - } -// var maxWidth = grid.getInnerWidth(); - var maxHeight = grid.getInnerHeight(); - var rowEl = Ext4.fly(e.getTarget());// 把target转换成Ext.Element对象 - //var align = e.xy[1] > maxHeight / 2 ? 'bl-tr' : 'tl-tr'; - rowEl.set({ - 'data-qtip' : tableContent,'data-qwidth':450,'data-qtitle':' 申请物品列表:'},false); -// - /*grid.tip.show(); - grid.tip.body.dom.innerHTML = tableContent;*/ - }else{ - - } - }); + - var viewport = new Ext.Viewport({ - layout : 'border', - items : [{ - region : 'center', - margins : '0 0 0 0', - layout : 'fit', - items : grid - }] - }); + }); \ No newline at end of file