- |
+ |
{$data.pay_order_number}
@@ -718,6 +718,63 @@
});
$("#game_name").change();
+ $("#addStatement,#removeStatement").on("click",function(){
+ var id = $(this).attr("id");
+ if(id == "addStatement"){
+ var opname = "参与结算";
+ var opurl = "{:U('addStatement')}";
+ var opst ="[不参与结算]";
+ var status = [2];
+ }else if(id=="removeStatement"){
+ var opname = "移出结算";
+ var opurl = "{:U('removeStatement')}";
+ var opst ="[参与结算]";
+ var status = [1];
+ }
+ var flag = false;
+ var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
+ const ischeck = $(elem).data("ischeck");
+ if($.inArray(ischeck,status) > -1){
+ return $(elem).val();
+ }
+ }).get();
+ if(text.length < 1){
+ layer.msg("" + '无需要'+opname+'的操作,仅'+opst+'状态可以进行'+opname+"");
+ return;
+ }
+ text = text.join(",");
+ layer.confirm('【提示】'+opname+'操作后,相应的结算单需要进行重算后生效', {
+ btn: ['确认','取消'],
+ title:false
+ }, function(index){
+ layer.close(index);
+ layer.load(2);
+ $.ajax({
+ type: "POST",
+ url: opurl,
+ dataType: 'json',
+ async: true,
+ data: {ids:text},
+ success:function(data){
+ layer.closeAll('loading');
+ if(data.status==1){
+ layer.msg("" + data.info + "");
+ setTimeout(function(){
+ window.location.reload();
+ },1500);
+ }else{
+ layer.msg("" + data.info + "");
+ return false;
+ }
+ }
+ });
+ });
+
+
+
+
+ })
+
/**
* 初始化select2单选,默认带搜索功能。
*/
|