From fecb58efddeb8ff64de9c97cd585b75bfc774eaa Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 4 Jan 2021 21:23:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editSpecialPuPool.html | 74 ++++++++++++------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html index 02709bf51..6952a47c4 100644 --- a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html @@ -168,19 +168,19 @@ {$com['statement_info'][0]['game_list'][0]['pay_amount']} - + {$com['statement_info'][0]['game_list'][0]['ratio']}% - % + % {$com['statement_info'][0]['game_list'][0]['sum_money']} - - + + {$com['reward']} {$com['fine']} - - + + {$com['statement_info'][0]['week_amount']} {$com['statement_money']} @@ -213,7 +213,7 @@ - + @@ -233,10 +233,11 @@ {$game['game_type_name']} {$game['pay_amount']} - + {$game['ratio']}% - % - {$game['sum_money']} + % + {$game['sum_money']} + @@ -263,14 +264,23 @@ {$account['game_list'][0]['pay_amount']} - + {$account['game_list'][0]['ratio']}% - % - {$account['game_list'][0]['sum_money']} + % + + {$account['game_list'][0]['sum_money']} + + + + + + {$account['reward']|default=0} + {$account['fine']|default=0} + + - - + {$account['week_amount']} @@ -299,10 +309,13 @@ {$game['pay_amount']} - + {$game['ratio']}% - % - {$game['sum_money']} + % + + {$game['sum_money']} + + @@ -494,6 +507,15 @@ var week_amount_find = $(_this).parent().parent(); var old_amount = week_amount_find.find(".sum_money_span").text(); + //扣款 + pay_money = parseFloat(pay_money) - parseFloat(refund); + var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100)); + + $(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2)); + $(_this).parent().parent().find(".sum_money").val(value.toFixed(2)); + + var this_amount = week_amount_find.find(".sum_money_span").text(); + var week_amount = 0; var i = 0; for (;;) { @@ -510,14 +532,14 @@ } //扣款 - pay_money = parseFloat(pay_money) - parseFloat(refund); - - var value = (parseFloat(pay_money)*(parseFloat(increment_ratio)/100)); - - $(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2)); - $(_this).parent().parent().find(".sum_money").val(value.toFixed(2)); - - var this_amount = week_amount_find.find(".sum_money_span").text(); + // pay_money = parseFloat(pay_money) - parseFloat(refund); + // + // var value = (parseFloat(pay_money)*(parseFloat(increment_ratio)/100)); + // + // $(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2)); + // $(_this).parent().parent().find(".sum_money").val(value.toFixed(2)); + // + // var this_amount = week_amount_find.find(".sum_money_span").text(); var D_value = parseFloat(old_amount)-parseFloat(this_amount) + parseFloat(withhold-oldwithhold) ; From b073f3e8cda65ee489b7ef520279a9c3a7533793 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 4 Jan 2021 21:38:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editSpecialPuPool.html | 67 ++++++++++++++----- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html index 6952a47c4..63feb87f7 100644 --- a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html @@ -375,27 +375,58 @@ }); $(".no_statement").on("click",function(){ - var id = $(this).data('id'); - $.ajax({ - type: "POST", - url: "{:U('cancelStatement')}", - dataType: 'json', - async: false, - data: {id:id}, - success:function(data){ + var id = $(this).data('id'); + saveForm(id); + }); + var return_data = ""; + + function saveForm(id) { + var options = { + url:"{:U('editCompanyStatementPool')}", //同action + type:'post', + beforeSend:function(xhr){ + }, + success:function(data) + { + return_data = data; + }, + + complete:function(data){ + if(return_data.status==1){ + + $.ajax({ + type: "POST", + url: "{:U('cancelStatement')}", + dataType: 'json', + async: false, + data: {id:id}, + success:function(data){ if(data.status==1){ - layer.msg("" + data.info + ""); - setTimeout(function(){ - window.location.reload(); - },1500); + layer.msg("" + data.info + ""); + setTimeout(function(){ + window.location.reload(); + },1500); }else{ - layer.msg("" + data.info + ""); - return false; + layer.msg("" + data.info + ""); + return false; } - } - }); - }); - var return_data = ""; + } + }); + return; + }else{ + layer.msg("" + 保存数据失败 + ""); + return false; + } + }, + error: function(xhr,status,msg){ + //alert("状态码"+status+"; "+msg) + layer.msg('玩命加载中..'); + + } + }; + $("#form").ajaxSubmit(options); + } + $("#submit").click(function(){ var options = { url:"{:U('editCompanyStatementPool')}", //同action