| | |
| | | SysCouponRecord.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | if(language==1){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | }else if(language==2){ |
| | | Feng.info("Please select a record in the table first!"); |
| | | }else { |
| | | Feng.info("Pilih catatan di tabel terlebih dahulu!"); |
| | | } |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | SysCouponRecord.seItem = selected[0]; |
| | |
| | | SysCouponRecord.audit = function () { |
| | | if (this.check()) { |
| | | if(SysCouponRecord.seItem.status!=1){ |
| | | if(language==1){ |
| | | Feng.info("请在待审核状态下操作") |
| | | }else if(language==2){ |
| | | Feng.info("Please operate in the pending state") |
| | | }else { |
| | | Feng.info("Silakan beroperasi dalam keadaan menunggu") |
| | | } |
| | | Feng.info("请在待审核状态下操作") |
| | | return; |
| | | } |
| | | var index = layer.open({ |
| | |
| | | SysCouponRecord.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/sysCouponRecord/delete", function (data) { |
| | | if(language==1){ |
| | | Feng.success("删除成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Delete succeeded!"); |
| | | }else { |
| | | Feng.success("Hapus berhasil!"); |
| | | } |
| | | Feng.success("删除成功!"); |
| | | SysCouponRecord.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }else if(language==2){ |
| | | Feng.error("Delete failed!" + data.responseJSON.message + "!"); |
| | | }else { |
| | | Feng.error("Hapus gagal!" + data.responseJSON.message + "!"); |
| | | } |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("sysCouponRecordId",this.seItem.id); |
| | | ajax.start(); |