easyui detailview拿到自表格的行

在这里插入图片描述
//查询
function searchData() {
var invoiceCode = $(’#invoiceCode’).textbox(‘getValue’);
$(’#center_dg’).datagrid({
view: detailview,
method : ‘get’,
queryParams: {
invoiceCode: invoiceCode
},
url:’/mtPaybackBilling/getMtBillingInfoListOfInvoiceCode’,

	 	    detailFormatter:function(index,row){
	          //  return '<div style="padding:2px;position:relative;"><table class="ddv"></table></div>';
	 	    	return '<table id="ddv-' + index + '"></table>';
	 	    },
	        onExpandRow: function(index,row){
	            //var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
	            $('#ddv-'+index).datagrid({
	            	method : 'get',
	                url:'/mtPaybackBilling/getMtPaybackBillingList?billingCode='+row.billingCode,
	                //fitColumns:true,
	                singleSelect:true,
	                rownumbers:true,
	                loadMsg:'',
	                height:'auto',
	                columns:[[
		                   // {field:'sewid',width:100 ,sortable:true,title:'预警主键'},
		                    {field:'paybackCode',width:186,sortable:true,title:"回款单号"},
		                    {field:'legalBy',width:80,sortable:true,title:'所有人'},
		                    {field:'endCustomer',width:170,sortable:true,title:'终端客户'},
		                    {field:'invoiceDate',width:100,sortable:true,title:'开票日期',formatter:common.formatDate},
		                    {field:'endInvoiceAmount',width:100,sortable:true,align:'right',title:'开票金额'},
		                    {field:'invoiceCode',width:100,sortable:true,title:'发票编码'},
		                    
							{field:'paybackDate',width:150,sortable:true,title:'回款日期',formatter:common.formatDate},
							{field:'actualAmount',width:100,align:'right',sortable:true,title:'实际回款金额'},
							{field:'purchaseInvoiceAmount',width:100,sortable:true,align:'right',title:'采购金额'},
							{field:'sumAddTaxAndSurcharge',width:110,align:'right',sortable:true,title:'增值税及附加税'},
							{field:'handlingFee',width:100,align:'right',sortable:true,title:'企业所得税'}, 
							
							{field:'sumTaxAndSurcharge',width:160,align:'right',sortable:true,title:'服务中心增值税及附加'},
							{field:'netProfit',width:100,align:'right',sortable:true,title:'净利润'},
							{field:'firmInvoiceAmount',width:130,align:'right',sortable:true,title:'服务中心利润100%'},
							{field:'firmAmountYesInvoice',width:130,align:'right',sortable:true,title:'服务中心利润20%'},
							{field:'firmAmountNoInvoice',width:130,align:'right',sortable:true,title:'服务中心利润80%'},
							{field:'mtInvoiceAmount',width:130,align:'right',sortable:true,title:'有限退服务中心利润'},
							{field:'factoryInvoiceAmount',width:100,align:'right',sortable:true,title:'慕添付企乘'},
							{field:'serviceCenterName',width:200,sortable:true,title:'服务公司名称'}
		                    
		                ]],
	                    onResize:function(){
	                        $('#center_dg').datagrid('fixDetailRowHeight',index);
	                    },
	                    onLoadSuccess:function(){
	                        setTimeout(function(){
	                            $('#center_dg').datagrid('fixDetailRowHeight',index);
	                        },0);
	                    }
	            });
	            $('#center_dg').datagrid('fixDetailRowHeight',index);
	            
	        }
 		});
	}

拿到自表格的行:

<button  class="easyui-linkbutton"   plain=false  iconCls="icon-search"   		onclick="test()" > 测试</button>

function test(){
    	var parentRow = $("#center_dg").datagrid('getSelected');
		var parentSelIndex = $("#center_dg").datagrid('getRowIndex',parentRow);
		var sonRow = $('#ddv-'+parentSelIndex).datagrid('getSelected');
		
    }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值