| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2035 人关注过本帖
标题:求助,关于 jqury easyui detailview 点击+没反应
取消只看楼主 加入收藏
z060831
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2013-8-3
结帖率:50%
收藏
 问题点数:0 回复次数:0 
求助,关于 jqury easyui detailview 点击+没反应
导入的js文件.zip (174.55 KB)

导入如了:jquery.easyui.min.1.3.2.js,datagrid-detailview.js,jquery-1.8.3.js
页面的代码如下:
程序代码:
<table id="purchaseStateList" url="PurchaseStateController.do?datagrid"></table>
<script type="text/javascript">
$(function(){
    $('#purchaseStateList').datagrid({
        title: '',
        fit:true,
        loadMsg: '数据加载中...',
        pageSize: 2,
        pagination:true,
        pageList:[20,40,60],
        sortName:'create_date',
        sortOrder:'desc',
        //fitColumns:true, 
        singleSelect:true,
        nowrap:false,
        columns:[[{field:'pur_type',title:'采购单别',sortable:true,width:120,align:"center"},
                  {field:'pur_no',title:'采购单号',sortable:true,width:120,align:"center"},
                  {field:'item_num',title:'采购项次',sortable:true,width:120,align:"center"},
                  {field:'buyer_name',title:'采购员',sortable:true,width:120,align:"center"},
                  {field:'supplier_name',title:'供应商',sortable:true,width:120,align:"center"},
                  {field:'taxes',title:'税种',sortable:true,width:120,align:"center",
                       formatter:function(value){
                            if(value==null || value==undefined){
                                return '';
                            }
                            //1.应税内含、2.应税外加、3.零税率、4.免税、9.不计税
                            if(value=='1') return '1.应税内含';
                            if(value=='2') return '2.应税外加';
                            if(value=='3') return '3.零税率';
                            if(value=='4') return '4.免税';
                            if(value=='9') return '9.不计税';
                            return '';
                        }},
                  {field:'create_date',title:'单据日期',sortable:true,width:120,align:"center"},
                  {field:'pur_date',title:'采购日期',sortable:true,width:120,align:"center"},
                  {field:'pur_money',title:'采购金额',sortable:true,width:120,align:"center"},
                  {field:'verification',title:'审核码',sortable:true,width:120,align:"center",
                   formatter:function(value){
                        if(value==null || value==undefined){
                            return '未审核';
                        }else{
                            if(value=='Y') return '已审核';
                            else return '未审核';
                        }
                    }}
                  ]],
                 onLoadSuccess:function(data){
                     
                     $("#purchaseStateList").datagrid("clearSelections");
                     $("#purchaseStateList").datagrid({
                         view: detailview,
                         detailFormatter:function(index,row){
                             return '<div style="padding:2px"><table class="ddv"></table></div>';
                         },
                         onExpandRow: function(index,row){
                             var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
                                     console.log("222222222222");
                             ddv.datagrid({
                                 url:'PurchaseStateController.do?purchaseDetail&pur_type='+row.pur_type+'&pur_no='+row.pur_no,
                                 fitColumns:true,
                                 singleSelect:true,
                                 rownumbers:true,
                                 loadMsg:'',
                                 height:'auto',
                                 columns:[[
                                     {field:'pro_no',title:'品号',width:200},
                                     {field:'pro_name',title:'品名',width:100,align:'right'},
                                     {field:'pro_size',title:'pro_size',width:100,align:'right'}
                                 ]],
                                 onResize:function(){
                                     $('#purchaseStateList').datagrid('fixDetailRowHeight',index);
                                 },
                                 onLoadSuccess:function(){
                                     console.log("111111111");
                                     setTimeout(function(){
                                         $('#purchaseStateList').datagrid('fixDetailRowHeight',index);
                                     },0);
                                 }
                             });
                             $('#purchaseStateList').datagrid('fixDetailRowHeight',index);
                             
                         }
                     });
                 }

     });
});
</script>

搜索更多相关主题的帖子: javascript title 
2014-11-10 15:16
快速回复:求助,关于 jqury easyui detailview 点击+没反应
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037507 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved