美文网首页UI
treegrid-树展开前请求参数拦截onBeforeLoad

treegrid-树展开前请求参数拦截onBeforeLoad

作者: 明明德撩码 | 来源:发表于2018-10-23 23:16 被阅读1次
    写个js:getZkParam 方法
    <table id="cidp_pbom_pbomreview_tree" data-roles="mui-treegrid" 
        data-options="url:$m('cidp/bomapp/bomretrospect').treeReviewPath,idField:'ID', treeField:'CODE_V', 
        fit: true, border: false, rownumbers:true, fitColumns:false,onBeforeLoad:$m('cidp/bomapp/bomretrospect').getZkParam">  
        <thead>  
            <#if childFields?exists>
                <tr>
                    <#list childFields as field>
                        <!--除数量外的系统属性-->
                        <#if '${field.ATTRID}' != ''>
                            <th data-options="field:'${field.ATTRCODE}_V',width:200">${field.ATTRNAME}</th>
                        </#if>
                        <#if '${field.ATTRCODE}' == 'QUANTITY'>
                            <th data-options="field:'${field.ATTRCODE}',width:100">${field.ATTRNAME}</th>
                        </#if>
                    </#list>
                    <th data-options="field:'bomversion',width:100">BOMVERSION</th>
                </tr>  
           </#if>   
        </thead>  
    </table>  
    
    
    修改param查询参数,把row中的数据放入到param中
        this.getZkParam = function(row, param){
            debugger;
            var row = row;
            var param=param;
            if(row != null&&row.bomversion!=null&&row.bomversion!=undefined&&row.bomversion!=""){
                param.bomversion=row.bomversion;
            }
            return true;
        }
    
    
    image.png

    相关文章

      网友评论

        本文标题:treegrid-树展开前请求参数拦截onBeforeLoad

        本文链接:https://www.haomeiwen.com/subject/degazftx.html