|
@@ -13,6 +13,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
import_url: 'mobile/import',
|
|
|
batch: 'mobile/batch',
|
|
|
table: 'mobile',
|
|
|
+ cancel_discount: 'mobile/cancelsetdiscount',
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -88,10 +89,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
})
|
|
|
$(document).on('click','.btn-set-discount',function (){
|
|
|
let set=$(this).data('set')
|
|
|
- let select=table.bootstrapTable('getSelections')
|
|
|
+ let select=table.bootstrapTable('getSelections'),
|
|
|
+ a=[]
|
|
|
if(!select.length){
|
|
|
return
|
|
|
}
|
|
|
+ select.forEach(item=>{
|
|
|
+ a.push(item.id)
|
|
|
+ })
|
|
|
+ if(!set){
|
|
|
+ $.post($.fn.bootstrapTable.defaults.extend.cancel_discount,{ids:a},function (){
|
|
|
+ layer.msg('操作成功')
|
|
|
+ $('.btn-refresh').trigger('click')
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
// 为表格绑定事件
|