first commit
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Member/MemberController
|
||||
Description : Master Member
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : September 3rd, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var MemberJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('detail');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#Cari_Member').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click(() => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Member').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Member');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
this.winDPrint = FoniaJS.showWindow('DPrint', 'Cetak Daftar Member', ajson.html, 'lg', [{},{"i":"butWCetak","v":"Cetak","c":"info"},{"i":"butWPreview","v":"Pratinjau","c":"secondary"}], () => {
|
||||
$('#winDPrint')
|
||||
.find('#butWCetak').click(() => this.print_member(true)).end()
|
||||
.find('#butWPreview').click(() => this.print_member());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_member: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print_member');
|
||||
cetak.add_param("Grup_MemberID");
|
||||
cetak.add_param("Aktif");
|
||||
cetak.add_param("Tgl_Cetak");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_member',
|
||||
sendParam: ['mode_detail='+mode,'MemberID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Member', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => $('#winDetail').find('#butWSimpan').click(() => this.detail_save()));
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','MemberID='+acell[0],'Cari_Member'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar','IM','Aktif','Cari_Member'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Member']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Member/MembergrupController
|
||||
Description : Master Grup Member
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : September 3rd, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var MemberGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Member').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click((e) => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Member').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Member');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Grup Member', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','Grup_MemberID='+acell[0],'Cari_Member'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Member']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Member/PointbarangController
|
||||
Description : Master Point Penukanan Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : September 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PointBarangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Barang').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click((e) => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Barang').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Barang');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_barang',
|
||||
sendParam: ['mode_detail='+mode,'InvPID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Point Penukaran Barang', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','InvPID='+acell[0],'Cari_Barang'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Barang']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,153 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Member/PointskemaController
|
||||
Description : Master Skema Point Member
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : September 28th, 2014.
|
||||
Last Modified : September 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PointSkemaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Skema').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click(() => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Skema').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Skema');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_skema',
|
||||
sendParam: ['mode_detail='+mode,'PointID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Skema Point Member', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDetail')
|
||||
.find('#butWSimpan').click(() => this.detail_save()).end()
|
||||
.find('#butBrow1').click(() => this.grup_form()).end()
|
||||
.find('#butBrow2').click(() => this.barang_form());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_form: function(){
|
||||
new Request({
|
||||
url: this.PHP + '/form_grup',
|
||||
sendParam: ['Grup_Barang'],
|
||||
onSuccess: (ajson) => {
|
||||
this.winGrup = FoniaJS.showWindow('Grup', 'Daftar Grup Barang', ajson.html, 'lg', [{i:'butWSAll',v:'Cek Semua',c:'info'},{i:'butWCAll',v:'Hapus Semua',c:'info'},{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winGrup')
|
||||
.find('#butWSAll').click(() => this.grup_semua()).end()
|
||||
.find('#butWCAll').click(() => this.grup_clear()).end()
|
||||
.find('#butWSimpan').click(() => this.grup_save());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_semua: function(){
|
||||
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
|
||||
},
|
||||
|
||||
grup_clear: function(){
|
||||
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
|
||||
},
|
||||
|
||||
grup_save: function(){
|
||||
var alist = [];
|
||||
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
|
||||
alist.push($(b).val());
|
||||
});
|
||||
$('#Grup_Barang').val(alist.join());
|
||||
FoniaJS.closeWindow(this.winGrup);
|
||||
},
|
||||
|
||||
barang_form: function(){
|
||||
new Request({
|
||||
url: this.PHP + '/form_barang',
|
||||
sendParam: ['Kode_Barang'],
|
||||
onSuccess: (ajson) => {
|
||||
this.winBarang = FoniaJS.showWindow('Barang', 'Daftar Barang', ajson.html, 'lg', null, () => {
|
||||
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['Kode_Barang'], {'selectFunc': this.Produk_Comp});
|
||||
this.data_query("tabel-barang");
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
barang_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'],
|
||||
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Skema']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-barang"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_barang',
|
||||
sendParam: ['Kode_Barang'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
new Request.JSONF({
|
||||
url: PointSkemaJS.PHP + '/table_barang',
|
||||
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
|
||||
}).send();
|
||||
$('#Nama_Produk').val('').focus();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Member/PointtipeController
|
||||
Description : Master Tipe Point Member
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : September 4th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PointTipeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Tipe').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click((e) => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Tipe').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Tipe');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_tipe',
|
||||
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Tipe Point Member', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','Point_TipeID='+acell[0],'Cari_Tipe'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
|
||||
onSuccess: () => {
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Tipe']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user