function f_perwalian(NIDUX) {
var nimnya;
var hiddencari, hiddenopt, isautoload, disablesmt;
if (!NIDUX){
hiddencari = false;
hiddenopt = true;
isautoload = false;
disablesmt = true;
}else{
hiddencari = true;
hiddenopt = false;
isautoload = true;
disablesmt = false;
}
var ds_thnakademik2 = store_thnakademik2();
var ds_grid = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'e_akademic/c_perwalian/grid',
method: 'POST'
}),
baseParams: {
kdstsemester:KDSTSEMESTER,
niduwali:NIDUX
},
waitMsg:'Loading..',
root: 'data',
totalProperty: 'results',
autoLoad: isautoload,
fields: [
{
name: "kdstsemester",
mapping: "kdstsemester"
},{
name: "tglkrs",
mapping: "tglkrs"
},{
name: "nim",
mapping: "nim"
},{
name: "nmmhs",
mapping: "nmmhs"
},{
name: "kdjnskelamin",
mapping: "kdjnskelamin"
},{
name: "nmprodi",
mapping: "nmprodi"
},{
name: "nmklsmhs",
mapping: "nmklsmhs"
},{
name: "tahunmsk",
mapping: "tahunmsk"
},{
name: "kdstmskmhs",
mapping: "kdstmskmhs"
},{
name: "nmstkrs",
mapping: "nmstkrs"
},{
name: "nmkodtbkod",
mapping: "nmkodtbkod"
},{
name: "bayardpp",
mapping: "bayardpp"
},{
name: "diskondpp",
mapping: "diskondpp"
},{
name: "persendpp",
mapping: "persendpp"
},{
name: "tagihandpk",
mapping: "tagihandpk"
},{
name: "bayardpk",
mapping: "bayardpk"
},{
name: "stlunasdpk",
mapping: "stlunasdpk"
}]//kdthnakademik
,listeners: {
load: function(store, records, options){
//Ext.getCmp('jmlsks2').setValue(store.getAt(0));
// Ext.getCmp('kdthnakademik').setValue(store.getAt(0).data['kdthnakademik']);
if (!Ext.getCmp('kdthnakademik').getValue()) {
Ext.getCmp('kdthnakademik').setValue(KDSTSEMESTER);
}
}
}
});
var sm_nya = new Ext.grid.CheckboxSelectionModel({
listeners: {
}
});
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:30 }),
{
header: '
Tgl.KRS',
width: 100,
dataIndex: 'tglkrs',
sortable: true
},{
header: 'NPM',
width: 100,
dataIndex: 'nim'
},
{
header: 'Nama Mahasiswa',
width: 250,
dataIndex: 'nmmhs',
sortable: true
},
{
header: '(L/P)',
width: 40, align: 'center',
dataIndex: 'kdjnskelamin',
sortable: true
},
{
header: 'Program Studi',
width: 250,
dataIndex: 'nmprodi',
sortable: true
},
{
header: 'Kelas Mahasiswa',
width: 150,
dataIndex: 'nmklsmhs',
align: 'left',
sortable: true
},
{
header: 'Tahun Masuk',
width: 100,
dataIndex: 'tahunmsk',
align: 'center',
sortable: true
},
{
header: 'Status Pendaftar',
width: 100,
dataIndex: 'nmkodtbkod',
sortable: true
},
{
header: 'Status KRS',
width: 100,
hidden: false,
dataIndex: 'nmstkrs', //kuitansipmb
sortable: true
},
{
header: 'Bayar DPP',
width: 120,
align: 'center',
dataIndex: 'bayardpp', //kuitansipmb
sortable: true,
xtype: 'numbercolumn', format:'0,000', align:'right'
},
{
header: 'Diskon DPP',
width: 120,
align: 'center',
dataIndex: 'diskondpp', //kuitansipmb
sortable: true,
xtype: 'numbercolumn', format:'0,000', align:'right'
},
{
header: 'Persen Bayar DPP',
width: 120,
align: 'center',
dataIndex: 'persendpp', //kuitansipmb
sortable: true,
xtype: 'numbercolumn', format:'0.%', align:'right'
},
{
header: 'Tagihan DPK',
width: 120,
align: 'center',
dataIndex: 'tagihandpk', //kuitansipmb
sortable: true,
xtype: 'numbercolumn', format:'0,000', align:'right'
},
{
header: 'Bayar DPK',
width: 120,
align: 'center',
dataIndex: 'bayardpk', //kuitansipmb
sortable: true,
xtype: 'numbercolumn', format:'0,000', align:'right'
},
{
header: 'Keterangan DPK',
width: 100,
hidden: false,
dataIndex: 'stlunasdpk', //kuitansipmb
sortable: true
}]
});
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: 'local',
width: 150
})];
var paging = new Ext.PagingToolbar({
pageSize: 50,
store: ds_grid,
displayInfo: true,
displayMsg: 'Data Perwalian Dari {0} - {1} of {2}',
emptyMsg: 'Perwalian Belum Dipilih.'
});
var editor = new Ext.ux.grid.RowEditor({
saveText: 'Update'
});
var grid_nya = new Ext.grid.EditorGridPanel({
store: ds_grid,
frame: true,
//width: 1140,
height: 500,
loadMask:true,
plugins:cari_data,
id: 'grid_det',
region:'center',
buttonAlign: 'left',
defaults : {
anchor : '-10'
},
forceFit: true,
tbar: [{
text: 'Cari Dosen Wali',
id: 'tb.find-doswal',
iconCls: 'silk-find',
hidden:hiddencari,
handler: function() {
wGridDosenWali(ds_thnakademik2, Ext.getCmp('kdthnakademik').getValue())
}
},'-',{
text:"NIDU :", hidden:hiddencari,
},{
xtype: 'textfield',
id: 'tfnidu',
hidden:hiddencari,
width:80, readOnly: true,
},{
text:"Nama Dosen :", hidden:hiddencari,
},{
xtype: 'textfield',
id: 'tfdoswal',
hidden:hiddencari,
width:250, readOnly: true,
},{
text:'Periksa',
id:'veritbar',
iconCls: 'silk-edit',
hidden:hiddenopt,
disabled:true,
handler:function(){
f_karturencanastudi(nimnya, 's', Ext.getCmp('kdthnakademik').getValue());
}
},
{
text:'Cetak',
id:'idcetak',
iconCls: 'silk-printer',
hidden:hiddenopt,
handler:function(){
f_printMhsPerwalian();
}
},
{
xtype: 'button',
id: 'btn_excel_perwalian',
iconCls: 'silk-save',
text: ' Export To Excel',
handler: function() {
export_excel();
}
},'->',
{
text:"Tahun Akademik / Semester :"
},
{
xtype: 'combo',
id: 'kdthnakademik',
name: 'kdthnakademik',
width:150, disabled: disablesmt,
store: ds_thnakademik2,
triggerAction: 'all',
editable: false,
valueField: 'kdstsemester',
displayField: 'nmthnakademik',
forceSelection: true,
submitValue: true,
emptyText: 'Pilih...',
hiddenName: 'h_thakademik',
listeners: {
select: function(c, r, i) {
cariPerwalian();
}
},
typeAhead: true,
mode: 'local',
emptyText: 'Belum Dipilih...',
selectOnFocus: true
}
],
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();
}
},
afterrender:function(){
}
}
});
var form_bp_general = new Ext.form.FormPanel({
id: 'form_bp_general_id',
title: 'Perwalian',
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(){
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' });
//GRID PANEL
var gp_doswal = new Ext.grid.GridPanel({
ds: ds_doswal,
cm: cm_doswal,
sm: sm_doswal,
view: gv_doswal,
forceFit: true,
autoSizeColumns: true,
enableColumnResize: true,
enableColumnHide: false,
enableColumnMove: false,
enableHdaccess: false,
columnLines: true,
loadMask: true,
clicksToEdit: 1,
layout: 'anchor',
tbar:[{
text:"Tahun Akademik / Semester :"
},
{
xtype: 'combo',
id: 'kdthnakademikdoswal',
name: 'kdthnakademikdoswal',
width:150, value: stsemester,
store: ds_stsemester,
triggerAction: 'all',
editable: false,
valueField: 'kdstsemester',
displayField: 'nmthnakademik',
forceSelection: true,
submitValue: true,
emptyText: 'Pilih...',
hiddenName: 'h_thakademikdoswal',
listeners: {
select: function(c, r, i) {
cariDoswal();
}
},
typeAhead: true,
mode: 'local',
emptyText: 'Belum Dipilih...',
selectOnFocus: true
},'->',RH.searchBar()],
bbar: new Ext.PagingToolbar({
store: ds_doswal, pageSize: 20,
displayInfo: true,
displayMsg: 'Data {0} - {1} dari {2}',
emptyMsg: "Belum ada data",
}),
listeners: {
rowdblclick: dblclk_doswal
}
});
var win_doswal = new Ext.Window({
title: 'Daftar Dosen Wali',
modal: true,
layout: 'fit',
width: 970, height: 400,
items: [gp_doswal]
}).show();
Ext.getCmp('cb.srcwali').disable();
Ext.getCmp('tf.srcwali').disable();
Ext.getCmp('bt.srcwali').disable();
function cariDoswal(){
Ext.getCmp('cb.srcwali').enable();
Ext.getCmp('tf.srcwali').enable();
Ext.getCmp('bt.srcwali').enable();
ds_doswal.setBaseParam('kdstsemester', Ext.getCmp('kdthnakademikdoswal').getValue());
ds_doswal.load();
}
function dblclk_doswal(grid, rowIdx) {
var rec = ds_doswal.getAt(rowIdx);
var nidu = rec.data['nidu'];
var nmdosdgngelar = rec.data['nmdosdgngelar'];
RH.setCompValue('tfnidu',nidu);
RH.setCompValue('tfdoswal',nmdosdgngelar);
Ext.getCmp('kdthnakademik').enable();
Ext.getCmp('kdthnakademik').setValue(Ext.getCmp('kdthnakademikdoswal').getValue());
ds_grid.setBaseParam('kdstsemester', Ext.getCmp('kdthnakademikdoswal').getValue());
ds_grid.setBaseParam('niduwali', nidu);
ds_grid.load();
win_doswal.close();
}
};
get_content(form_bp_general);
}