Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r18100 -r18209 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 18100) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 18209) @@ -36,6 +36,8 @@ 'printMask' : null, 'loadMask' : null } +//弹窗提示管理器 +var tipManager = {}; // 打开表单的对象 var openFormObj = { @@ -1767,7 +1769,8 @@ header : "物品", xtype : 'treecolumn', dataIndex : 'name', - flex : 1, + // flex : 1, + width : 310, sortable: false },{ header : "最小单位数量", @@ -1819,7 +1822,7 @@ },{ header : "单位", dataIndex : 'unit', - width : 45 * fontSizeScale, + width : 42 * fontSizeScale, hidden:type=='器械包申请单'?true:false, menuDisabled : true },{ @@ -1833,7 +1836,7 @@ },{ id:'rowTotalPrice2', header : "小计", - width : 62 * fontSizeScale, + width : 56 * fontSizeScale, hidden : sstsConfig.hideDisposablePriceColumn, align:'right', dataIndex : 'totalPrice', @@ -2652,6 +2655,13 @@ flex : 1, height : configWinHeight - 200, store : rightTemplateStore, + listeners : { + itemmouseenter: function (_this, record, item, index, e, eOpts) { + var tousseDefinitionID = record.get('tousseDefinitionID'); + var tousseType = record.get('tousseType'); + popGoodTips(tousseDefinitionID + tousseType, item, record); + } + }, tbar : [{ text:"数量:" },{ @@ -3804,6 +3814,55 @@ }; } +/** + * 构建物品的提示框html + * @param name 物品的名字 + * @param nameWidth 物品的宽度 + * @returns {string} + */ +function buildTBodyContent(name, nameWidth) { + var tBodyContent = ""; + tBodyContent += + "" + + "" + name + "" + + ""; + return tBodyContent; +} + +/** + * 弹出物品的名称提示窗 + * @param cacheId 这个窗口的缓存标识 + * @param target 要渲染的地方 + * @param record 要显示的内容 + */ +function popGoodTips(cacheId, target, record) { + var title = "申请物品情况:

"; + var nameWidth = '100px'; + var tHeadConfig = { + '名称': nameWidth + } + //获得提示框的对象 + var tableTips = ext2CompUtil.getTableTips(); + var winConfig = { + title: title, + tipManagerCache: tipManager, + tipManagerCacheId: cacheId, + target: target, + minWidth: 480, + minHeight: 130, + extObj: top.Ext4 + } + tableTips.popTipWinWithLocalRecord(winConfig, function () { + var tBodyContent = buildTBodyContent(record.get('name'), nameWidth); + var tipTable = tableTips.buildTaleTipsWithSetting(tHeadConfig, tBodyContent, winConfig); + if (!tipManager[cacheId]) { + //将生成的html用对应的id缓存到页面,减少请求服务器次数 + tipManager[cacheId] = tipTable; + } + }); +} + + Ext.onReady(function() { Ext.QuickTips.init();