Refactor member and product scripts to use concise method definitions

- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
This commit is contained in:
2026-11-01 14:57:54 +07:00
parent be2091eddd
commit aaaf0a9215
92 changed files with 749 additions and 749 deletions
+9 -9
View File
@@ -14,7 +14,7 @@ var MemberJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#butPrint').click(() => this.print_show());
$('#Cari_Member').keydown((e) => {
@@ -29,7 +29,7 @@ var MemberJS = {
FoniaJS.setFocus('#Cari_Member');
},
print_show: function(){
print_show() {
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
@@ -42,7 +42,7 @@ var MemberJS = {
}).send();
},
print_member: function(prt){
print_member(prt) {
var cetak = new Printer(this.PHP + '/print_member');
cetak.add_param("Grup_MemberID");
cetak.add_param("Aktif");
@@ -51,7 +51,7 @@ var MemberJS = {
FoniaJS.closeWindow(this.winDPrint);
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_member',
sendParam: ['mode_detail='+mode,'MemberID='+ID],
@@ -61,15 +61,15 @@ var MemberJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -79,7 +79,7 @@ var MemberJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
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'],
@@ -90,7 +90,7 @@ var MemberJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var MemberGrupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Member').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var MemberGrupJS = {
FoniaJS.setFocus('#Cari_Member');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
@@ -40,15 +40,15 @@ var MemberGrupJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var MemberGrupJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
@@ -71,7 +71,7 @@ var MemberGrupJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var PointBarangJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Barang').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointBarangJS = {
FoniaJS.setFocus('#Cari_Barang');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_barang',
sendParam: ['mode_detail='+mode,'InvPID='+ID],
@@ -40,15 +40,15 @@ var PointBarangJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var PointBarangJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
@@ -71,7 +71,7 @@ var PointBarangJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+14 -14
View File
@@ -14,7 +14,7 @@ var PointSkemaJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Skema').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointSkemaJS = {
FoniaJS.setFocus('#Cari_Skema');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_skema',
sendParam: ['mode_detail='+mode,'PointID='+ID],
@@ -43,15 +43,15 @@ var PointSkemaJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -61,7 +61,7 @@ var PointSkemaJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
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'],
@@ -72,7 +72,7 @@ var PointSkemaJS = {
}).send();
},
grup_form: function(){
grup_form() {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['Grup_Barang'],
@@ -87,15 +87,15 @@ var PointSkemaJS = {
}).send();
},
grup_semua: function(){
grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
},
grup_clear: function(){
grup_clear() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
},
grup_save: function(){
grup_save() {
var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val());
@@ -104,7 +104,7 @@ var PointSkemaJS = {
FoniaJS.closeWindow(this.winGrup);
},
barang_form: function(){
barang_form() {
new Request({
url: this.PHP + '/form_barang',
sendParam: ['Kode_Barang'],
@@ -117,7 +117,7 @@ var PointSkemaJS = {
}).send();
},
barang_hapus: function(acell){
barang_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_barang',
@@ -127,7 +127,7 @@ var PointSkemaJS = {
}, 'danger');
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -142,7 +142,7 @@ var PointSkemaJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
new Request_JSF({
url: PointSkemaJS.PHP + '/table_barang',
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
+7 -7
View File
@@ -14,7 +14,7 @@ var PointTipeJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Tipe').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointTipeJS = {
FoniaJS.setFocus('#Cari_Tipe');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_tipe',
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
@@ -40,15 +40,15 @@ var PointTipeJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var PointTipeJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
@@ -71,7 +71,7 @@ var PointTipeJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',