Form :
<div id="dlgadz" class="easyui-dialog" style="width:700px;height:400px;padding:10px 20px"
closed="true" buttons="#dlgadz-buttons">
<form id="fmadz" method="post" action="<?=site_url() ?>/masterp/editocustomerr/type/"+row.Cust_ID novalidate>
<table id="resultz" style="width:650px;height:260px"></table>
</form>
<div id="dlgadz-buttons">
<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlgadz').dialog('close')">Close</a>
</div>
Action
function EDITDataGrid(){
var row = $('#result').datagrid('getSelected');
if (row){
$('#dlgadz').dialog('open').dialog('setTitle','History Log Customer');
row.menumm="<?=$menunameid;?>";
// $('#resultz').table('load',row);
$(function() {
var datanya = <?php echo json_encode($_POST); ?>;
var type = row.Cust_ID;
$("#resultz").datagrid({
//url : $.post('<?= site_url() ?>/tiket/searchresultwarhos/',datanya,'success'),
url : '<?= site_url() ?>/masterp/searchresultloggb/type/'+type,
method : 'POST',
queryParams: datanya,
columns:[[
{field:'Waktu',title:'Waktu',sortable:true},
{field:'UsrLgn',title:'User Login',sortable:true},
{field:'KD_Action',title:'Action',sortable:true},
{field:'Reff_ID',title:'Reff ID',sortable:true},
{field:'KD_MenuName',title:'Kode',sortable:true},
{field:'Ket',title:'Keterangan',sortable:true}
]],
showHeader:"true",
toolbar:"#toolbarwarhos",
pagination:"true",
nowrap: "false",
pageSize: 10,
fitcolumns: "true",
rownumbers: "false",
singleSelect: "true"
})
});
//var result = eval('('+result+')');
//var result = eval('('+result+')');
//fungsi console.log(row) untuk debug log row jeasyui
// console.log(row);
//print_r(json_decode(row));
//url = '<?=site_url() ?>/masterp/editocustomerr/ID/'+row.Cust_ID;
}
}
Tidak ada komentar:
Posting Komentar