function f_transkripakademik_form() {
var nimnya;
var ds_grid = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'e_akademic/c_transkripakademik/grid',
method: 'POST',
success: function(response){
var r = Ext.decode(response.responseText);
if(r.status == false){
Ext.Ajax.request({
url: BASE_URL + 'user/ext_logout',
method: 'POST',
success: function(xhr) {
localStorage.removeItem('access_token');
window.location = BASE_URL + 'user/login';
}
});
}
}
}),
baseParams: {
kdstsemester:KDSTSEMESTER
},
waitMsg:'Loading..',
root: 'data',
totalProperty: 'results',
autoLoad: true,
fields: [
{
name: "tglkrs",
mapping: "tglkrs"
},{
name: "nim",
mapping: "nim"
},{
name: "nmmhs",
mapping: "nmmhs"
},{
name: "kdjnskelamin",
mapping: "kdjnskelamin"
},{
name: "nmprodi",
mapping: "nmprodi"
},{
name: "thnmasuk",
mapping: "thnmasuk"
},{
name: "tgllulus",
mapping: "tgllulus"
},{
name: "ipk",
mapping: "ipk"
}/* ,{
name: "pkelulusan",
mapping: "pkelulusan"
} */]//pkelulusan
,listeners: {
load: function(store, records, options){
//Ext.getCmp('jmlsks2').setValue(store.getAt(0));
// Ext.getCmp('kdthnakademik').setValue(store.getAt(0).data['kdthnakademik']);
// Ext.getCmp('kdthnakademik').setValue(KDTHNAKADEMIK+' '+ NMJNSSEMESTER);
}
}
});
var sm_nya = new Ext.grid.RowSelectionModel({
singleSelect: true
});
var cm = new Ext.grid.ColumnModel({
// specify any defaults for each column
defaults: {
sortable: true // columns are not sortable by default
},
columns: [new Ext.grid.RowNumberer({width: 40}),
{
header: '
NPM',
width: 100,
dataIndex: 'nim'
},
{
header: 'Nama Mahasiswa',
width: 150,
dataIndex: 'nmmhs',
sortable: true
},
{
header: '(L/P)',
width: 40,
dataIndex: 'kdjnskelamin',
sortable: true
},
{
header: 'Program Studi',
width: 200,
dataIndex: 'nmprodi',
sortable: true
},
{
header: 'Tahun
Masuk',
width: 70,
dataIndex: 'thnmasuk',
sortable: true
},
{
header: 'Tahun Kelulusan',
width: 100,
dataIndex: 'tgllulus',
sortable: true
},
{
header: 'IPK',
width: 50,
dataIndex: 'ipk', //kuitansipmb
sortable: true
}/* ,
{
header: 'Predikat
Kelulusan',
width: 100,
dataIndex: 'pkelulusan', //kuitansipmb
sortable: true
} */,
{
//header: 'Pilih',
id: 'col.edit',
width: 30, dataIndex: 'pkelulusan',sortable: false,
renderer:function(){
Ext.QuickTips.init();
return '';
}
}]
});
var vw = new Ext.grid.GridView({emptyText:'< No Data To Display >'});
var cari_data = [new Ext.ux.grid.Search({
iconCls: 'btn_search',
minChars: 1,
autoFocus: true,
autoHeight: true,
position: 'top',
mode: 'remote',
width: 200
})];
var paging = new Ext.PagingToolbar({
pageSize: 50,
store: ds_grid,
displayInfo: true,
displayMsg: 'Data Transkrip Akademik Dari {0} - {1} of {2}',
emptyMsg: 'Transkrip Akademik Belum Dipilih.'
});
var editor = new Ext.ux.grid.RowEditor({
saveText: 'Update'
});
var grid_nya = new Ext.grid.GridPanel({
store: ds_grid,
frame: true,
//width: 1140,
height: 595,
//plugins:[editor],// cari_data,
id: 'grid_det',
// autoWidth:true,
// autoSizeColumns:true,
// enableColumnResize: true,
// enableColumnHide: false,
// enableColumnMove: false,
// enableHdMenu: false,
// columnLines: true,
// loadMask: true,
region:'center',
buttonAlign: 'left',
defaults : {
anchor : '-10'
},
forceFit: true,
tbar: [
{
xtype: 'buttongroup',
title: 'Filter',
columns: 4,
width:500,
defaults: {
scale: 'small'
},
items: [{text:"Tahun Akademik / Semester"},
{
xtype: 'combo',
store: ds_thnakademik2,//ds_fieldpmb,
name: 'thnakademik',
id: 'thnakademik',
triggerAction: 'all',
editable: false,
// disabled :true,
valueField: 'kdthnakademik',
displayField: 'nmthnakademik',
forceSelection: true,
submitValue: true,
hiddenName: 'h_thnakademik',
listeners: {},
typeAhead: true,
mode: 'local',
emptyText:'Pilih...',
selectOnFocus:true
},{
xtype: 'label',
text: ''
},{
xtype: 'label',
text: ''
},{
text:"Cari Berdasarkan"
},{
xtype: 'combo',
store: ['NPM','Nama Mahasiswa','L/P','Program Studi','Tahun Masuk','Tahun Kelulusan','IPK'],//ds_fieldpmb,
name: 'idfield',
id: 'idfield',
triggerAction: 'all',
editable: false,
// disabled :true,
valueField: 'kolom',
displayField: 'kolom',
forceSelection: true,
submitValue: true,
hiddenName: 'h_kolom',
listeners: {},
typeAhead: true,
mode: 'local',
emptyText:'Pilih...',
selectOnFocus:true
},{
xtype: 'textfield',
name: 'fieldnya',
id: 'fieldnya',
width: 400//,
// disabled: true
// fieldLabel:'Dodol'
},{
xtype: 'button',
text: ' Cari ',
iconCls: 'silk-find',
id: 'btn_data',
width: 3,
handler: function() {
ds_grid.setBaseParam('kdthnakademik', Ext.getCmp('thnakademik').getValue());
var checks='';
checks= Ext.getCmp('idfield').getValue();
if (checks == 'NPM'){
ds_grid.setBaseParam('nim', Ext.getCmp('fieldnya').getValue());
}else if (checks == 'Nama Mahasiswa'){
ds_grid.setBaseParam('nmmhs', Ext.getCmp('fieldnya').getValue());
}else if (checks == 'L/P'){
ds_grid.setBaseParam('kdjnskelamin', Ext.getCmp('fieldnya').getValue());
}else if (checks == 'Program Studi'){
ds_grid.setBaseParam('nmprodi', Ext.getCmp('fieldnya').getValue());
}else if (checks == 'Tahun Masuk'){
ds_grid.setBaseParam('thnmasuk', Ext.getCmp('fieldnya').getValue());
}else if (checks == 'Tahun Kelulusan'){
ds_grid.setBaseParam('tgllulus', Ext.getCmp('fieldnya').getValue());
}else if (checks == 'IPK'){
ds_grid.setBaseParam('ipk', Ext.getCmp('fieldnya').getValue());
}
ds_grid.load();
}
}]
}, {
text:'Lihat Detail',
id:'veritbar',
iconCls: 'silk-edit',
disabled:true,
handler:function(){
f_transkripakademik_form(nimnya, 's');
}
}
],
sm:sm_nya,
vw:vw,
autoScroll: true,
cm:cm,
bbar: paging,
//autoExpandColumn: 'common',
clicksToEdit: 1,
listeners: {
rowclick: function rowClick(grid, rowIdx) {
var rec = ds_grid.getAt(rowIdx);
nimnya =rec.data["nim"];
if(nimnya!=''){
Ext.getCmp('veritbar').enable();
}else{
Ext.getCmp('veritbar').disable();
}
},
cellclick: onCellFakultasClick
}
});
var form_bp_general = new Ext.form.FormPanel({
id: 'form_bp_general_id',
title: 'Transkrip Akademik',
region: 'center',
autoScroll: true,
buttonAlign: 'left',
bodyStyle: 'padding: 5px 5px 5px 5px', //atas kanan bawah kiri
border: false,
disabled: true,
waitMsg: 'Waiting...',
maskDisabled: false,
monitorValid: true,
items: [grid_nya]
});
function verifikasi(){
var cannot= cek(sm_nya);
// alert(cannot);
if(cannot==0){
Ext.MessageBox.show({
title: "Konfirmasi",
width: 350,
msg: " Anda Yakin Untuk Mengubah Data ini?",
buttons: Ext.MessageBox.YESNOCANCEL,
fn: function(btn) {
if (btn == 'yes') {
var hasil_akhir = get_detail_item(sm_nya);
Ext.Ajax.request({
url: BASE_URL + 'pendaftaran/c_verifikasipmb/verifikasiidcarabyr',
params:{
details:hasil_akhir
},
success:function(response){
var r = Ext.decode(response.responseText);
if(r.status == false){
Ext.Ajax.request({
url: BASE_URL + 'user/ext_logout',
method: 'POST',
success: function(xhr) {
localStorage.removeItem('access_token');
window.location = BASE_URL + 'user/login';
}
});
}
Ext.MessageBox.alert("Informasi", "Ubah Data Berhasil");
ds_grid.load();
},
failure: function() {
Ext.MessageBox.alert("Informasi", "Ubah Data Gagal");
}
});
}
}
});
}else{
Ext.MessageBox.alert("Perhatian", "Ada data [Cara bayar] yang masih kosong?!");
}
}
function get_detail_item(sm){
var par = '';var c = ';';var i = 0;
var cntrec = sm.getCount();
var arr = sm.getSelections();
for(i=0;i