新增编辑功能

master
chenzhi 4 years ago
parent cf06897d66
commit 34b30c70f6

@ -1511,6 +1511,26 @@ function getMonth() {
return $range;
}
//开业至今月份
function getOpenCompanyMonthsList()
{
$start_month = "2019-09";
$temp = strtotime(date('Y-m-01 00:00:00',strtotime('-1 month')));
$end_month = date('Y',$temp)."-".date('m',$temp);
$time_arr = [];
$begin = new \DateTime($start_month);
$end = new \DateTime($end_month);
$end = $end->modify('+1 month');
$interval = new \DateInterval('P1M');
$daterange = new \DatePeriod($begin, $interval ,$end);
foreach($daterange as $date){
$time_arr[] = $date->format("Y-m");
}
rsort($time_arr);
return $time_arr;
}
function showMonthRange($start, $end)
{

@ -0,0 +1,162 @@
<?php
// 公司关系绑定
namespace Admin\Controller;
class GameMarginController extends AdminController
{
public $DBModel;
public function _initialize()
{
$this->DBModel = M("game_margin","tab_");
parent::_initialize();
}
public function lists()
{
$params = I('get.');
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
$where = [
"_string"=>"1=1"
];
if(array_key_exists('count_date',$params)){
$m = explode("-",$params['count_date']);
$where['count_year']=$m[0];
$where['count_month']=$m[1];
}
$data = $this->DBModel->where($where)->field("margin_info",true)->page($page,$row)->select();
// dd($data);
$count = $this->DBModel->where($where)->count();
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
$this->assign("data",$data);
$this->display();
}
//查看毛利表
public function marginView(){
if(!isset($_REQUEST['id'])){
$this->error('参数错误');
}
$id = $_REQUEST['id'];
$info = $this->DBModel->where("id = '{$id}'")->find();
$this->marginCount($info);
$this->assign("year", $info['count_year']);
$this->assign("month", $info['count_month']);
$this->assign("id", $id);
$this->display();
}
private function marginCount($info)
{
$marginInfo = json_decode($info['margin_info'],true);
$count = [
"pay_amount"=>$info['pay_amount'],
"margin_ratio"=>$info['margin_ratio'],
"margin_amount"=>$info['margin_amount'],
"cp_statement_amount"=>0,
"cp_ratio"=>0,
"cp_rebate_amount"=>0,
"cp_other_amount"=>0,
"pu_pay_amount"=>0,
"pu_statement_amount"=>0,
"pu_ratio"=>0,
"pu_margin_amount"=>0,
"pu_margin_ratio"=>0,
"pc_pay_amount"=>0,
"pc_statement_amount"=>0,
"pc_ratio"=>0,
"pc_margin_amount"=>0,
"pc_margin_ratio"=>0,
"platform_margin_ratio"=>0,
"jh_pay_amount"=>0,
"jh_statement_amount"=>0,
"jh_ratio"=>0,
"jh_margin_amount"=>0,
"jh_margin_ratio"=>0,
];
foreach ($marginInfo as $v) {
$count['cp_statement_amount'] += $v['cp_statement_amount'];
$count['cp_rebate_amount'] += $v['cp_rebate_amount'];
$count['cp_other_amount'] += $v['cp_other_amount'];
$count['pu_pay_amount'] += $v['pu_pay_amount'];
$count['pu_statement_amount'] += $v['pu_statement_amount'];
$count['pu_margin_amount'] += $v['pu_margin_amount'];
$count['pc_pay_amount'] += $v['pc_pay_amount'];
$count['pc_statement_amount'] += $v['pc_statement_amount'];
$count['pc_margin_amount'] += $v['pc_margin_amount'];
$count['jh_pay_amount'] += $v['jh_pay_amount'];
$count['jh_statement_amount'] += $v['jh_statement_amount'];
$count['jh_margin_amount'] += $v['jh_margin_amount'];
}
$count['cp_ratio'] = round( $count['cp_statement_amount']/$count['pay_amount'] ,4)*100;
$count['pu_ratio'] = round( $count['pu_statement_amount']/$count['pu_pay_amount'] ,4)*100;
$count['pu_margin_ratio'] = round( $count['pu_margin_amount']/$count['pu_pay_amount'] ,4)*100;
$count['pc_ratio'] = round( $count['pc_statement_amount']/$count['pc_pay_amount'] ,4)*100;
$count['pc_margin_ratio'] = round( $count['pc_margin_amount']/$count['pc_pay_amount'] ,4)*100;
$count['platform_margin_ratio'] = round(($count['pay_amount']-$count['jh_pay_amount']-$count['cp_statement_amount']-$count['cp_rebate_amount']-$count['cp_other_amount']-$count['pc_statement_amount']-$count['pu_statement_amount'])/($count['pay_amount']-$count['jh_pay_amount']),4)*100;
$count['jh_ratio'] = round( $count['jh_statement_amount']/$count['jh_pay_amount'] ,4)*100;
$count['jh_margin_ratio'] = round( $count['jh_margin_amount']/$count['jh_pay_amount'] ,4)*100;
// dd($count);
$this->assign("data",$marginInfo);
$this->assign("count",$count);
}
/**
* 编辑
*/
public function marginEdit(){
ini_set('serialize_precision',14);
if(!isset($_REQUEST['id'])){
$this->error('参数错误');
}
$params = I("post.");
$data = $this->DBModel->where("id='{$params['id']}'")->find();
$marginInfo = json_decode($data['margin_info'],true);
$item = &$marginInfo[$params['key']];
$item['cp_rebate_ratio'] = $params['cp_rebate_ratio'];
$item['cp_rebate_amount'] = $params['cp_rebate_amount'];
$item['cp_other_amount'] = $params['cp_other_amount'];
if($item["pc_pay_amount"] > 0){
$item["pc_margin_amount"] = round($item["pc_pay_amount"]*(1-$item['cp_promote_ratio']/100)*(100-$item["cp_ratio"]-$item['cp_rebate_ratio']-$item["pc_ratio"])/100,2);
$item["pc_margin_ratio"] = round($item["pc_margin_amount"]/$item['pc_pay_amount'],4)*100;
}
if ($item["pu_pay_amount"] > 0) {
$item["pu_margin_amount"] = round($item["pu_pay_amount"]-$item["pu_pay_amount"]*(1-$item['cp_promote_ratio']/100)*($item["cp_ratio"]+$item['cp_rebate_ratio'])/100-$item["pu_statement_amount"],2);
$item["pu_margin_ratio"] = round($item["pu_margin_amount"]/$item['pu_pay_amount'],4)*100;
}
$item['platform_margin_ratio'] = round(($item['pay_amount']-$item['jh_pay_amount']-$item['cp_statement_amount']-$item['cp_rebate_amount']-$item['cp_other_amount']-$item['pc_statement_amount']-$item['pu_statement_amount'])/($item['pay_amount']-$item['jh_pay_amount']),4)*100;
if($item['jh_pay_amount'] > 0){
$item["jh_margin_amount"] = round( $item["jh_statement_amount"]-$item["jh_pay_amount"]*(1-$item['cp_promote_ratio']/100)*($item["cp_ratio"]+$item['cp_rebate_ratio'])/100 ,2);
$item["jh_margin_ratio"] = round($item["jh_margin_amount"]/$item['jh_pay_amount'],4)*100;
}
$margin_amount = 0;
//总计
foreach ($marginInfo as &$v) {
$margin_amount += $v['margin_amount'];
}
$margin_ratio = round( $margin_amount/$data['pay_amount'] ,4)*100;
$save = [
"margin_ratio"=>$margin_ratio,
"margin_amount"=>$margin_amount,
"margin_info"=>json_encode($marginInfo,JSON_UNESCAPED_UNICODE)
];
$this->DBModel->where("id='{$params['id']}'")->save($save);
$this->ajaxReturn(['status'=>1,'msg'=>"修改成功,刷新。。。"]);
}
}

@ -0,0 +1,203 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<script src="__STATIC__/jquery.form.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
.layui-layer-title {
text-align: center;
height: 42px;
line-height: 42px;
font-weight: 400;
font-size: 14px;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">毛利分析</h3>
<p class="description_text">不自动生成,请在每月结算完成后手动生成,如该月结算数据有变动,需重算分析表</p>
</div>
<div class="cf top_nav_list" style="height: 38px;">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list" style="margin-bottom: 15px;">
<div class="input-list input-list-promote search_label_rehab">
<select id="count_date" name="count_date" class="select_gallery" style="width:150px;">
<option value="">请选择月份</option>
<volist name=":getOpenCompanyMonthsList()" id="vo">
<option value="{$vo}" <if condition="$vo eq $_GET['count_date']">selected=selected</if>>{$vo}</option>
</volist>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<a class="butn" id="upstream">生成毛利表</a>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>月份</th>
<th>流水</th>
<th>毛利额</th>
<th>毛利率</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<if condition = "empty($data)">
<tr>
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td>{$data.count_year}-{$data.count_month}</td>
<td>{$data.pay_amount}</td>
<td>{$data.margin_amount}</td>
<td>{$data.margin_ratio}%</td>
<td>
<a class="confirm margin_view" data-id="{$data.id}">查看/编辑</a>
<a class="confirm margin_recount" data-id="{$data.id}">重算</a>
</td>
</tr>
</volist>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page|default=''}
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
<script type="text/javascript">
</script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('lists')}");
function reload() {
window.location.reload();
}
$(function(){
$(".margin_view").click(function () {
var id = $(this).data("id");
var url = "{:U('marginView')}"+"&id="+id
layer.open({
type: 2,
title: "毛利分析表",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: url
});
});
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
})
</script>
</block>

@ -0,0 +1,338 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
#statementShow td{
line-height: 1.5;
padding: 8px 0;
}
th {
border-right: solid 1px #b6cad2;
text-align: center;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th rowspan="2">年份</th>
<th rowspan="2">月份</th>
<th rowspan="2">游戏名</th>
<th rowspan="2">流水</th>
<th colspan="3">成本——上游CP</th>
<th colspan="2">上游返点</th>
<th rowspan="2">其他费用</th>
<th colspan="5">成本——下游内团</th>
<th colspan="5">成本——下游外团(含分发)</th>
<th rowspan="2">联运产品毛利率</th>
<th colspan="5">成本——下游聚合</th>
<th colspan="2">毛利</th>
<th rowspan="2" style="min-width:55px;">操作</th>
</tr>
<tr>
<th>渠道费率</th>
<th>分成比例</th>
<th>结算金额</th>
<th>返点比例</th>
<th>返点金额</th>
<th>推广流水</th>
<th>分成比例</th>
<th>结算金额</th>
<th>内团毛利额</th>
<th>内团毛利率</th>
<th>推广流水</th>
<th>分成比例</th>
<th>结算金额</th>
<th>外团毛利额</th>
<th>外团毛利率</th>
<th>推广流水</th>
<th>分成比例</th>
<th>结算收入</th>
<th>聚合毛利额</th>
<th>聚合毛利率</th>
<th>毛利率</th>
<th>毛利额</th>
</tr>
</thead>
<tbody id="statementShow">
<if condition = "empty($data)">
<tr>
<td colspan="50" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<foreach name="data" item="margin">
<tr>
<td>{$year}</td>
<td>{$month}</td>
<td>{$margin["relation_game_name"]}</td>
<td>{$margin["pay_amount"]}</td>
<td>{$margin["cp_promote_ratio"]}%</td>
<td>{$margin["cp_ratio"]}%</td>
<td>{$margin["cp_statement_amount"]}</td>
<td>{$margin["cp_rebate_ratio"]}%</td>
<td>{$margin["cp_rebate_amount"]}</td>
<td>{$margin["cp_other_amount"]}</td>
<td>{$margin["pc_pay_amount"]}</td>
<td>{$margin["pc_ratio"]}%</td>
<td>{$margin["pc_statement_amount"]}</td>
<td>{$margin["pc_margin_amount"]}</td>
<td>{$margin["pc_margin_ratio"]}%</td>
<td>{$margin["pu_pay_amount"]}</td>
<td>{$margin["pu_ratio"]}%</td>
<td>{$margin["pu_statement_amount"]}</td>
<td>{$margin["pu_margin_amount"]}</td>
<td>{$margin["pu_margin_ratio"]}%</td>
<td>{$margin["platform_margin_ratio"]}%</td>
<td>{$margin["jh_pay_amount"]}</td>
<td>{$margin["jh_ratio"]}%</td>
<td>{$margin["jh_statement_amount"]}</td>
<td>{$margin["jh_margin_amount"]}</td>
<td>{$margin["jh_margin_ratio"]}%</td>
<td>{$margin["margin_ratio"]}%</td>
<td>{$margin["margin_amount"]}</td>
<td>
<a class="confirm margin_edit" data-info='{$margin|json_encode="512"}' data-id="{$id}" data-key="{$key}">编辑</a>
</td>
</tr>
</foreach>
<tr style="font-weight: 800;font-size: 14px;">
<td>{$year}</td>
<td>{$month}</td>
<td>小计</td>
<td>{$count["pay_amount"]}</td>
<td></td>
<td>{$count["cp_ratio"]}%</td>
<td>{$count["cp_statement_amount"]}</td>
<td></td>
<td>{$count["cp_rebate_amount"]}</td>
<td>{$count["cp_other_amount"]}</td>
<td>{$count["pc_pay_amount"]}</td>
<td>{$count["pc_ratio"]}%</td>
<td>{$count["pc_statement_amount"]}</td>
<td>{$count["pc_margin_amount"]}</td>
<td>{$count["pc_margin_ratio"]}%</td>
<td>{$count["pu_pay_amount"]}</td>
<td>{$count["pu_ratio"]}%</td>
<td>{$count["pu_statement_amount"]}</td>
<td>{$count["pu_margin_amount"]}</td>
<td>{$count["pu_margin_ratio"]}%</td>
<td>{$count["platform_margin_ratio"]}%</td>
<td>{$count["jh_pay_amount"]}</td>
<td>{$count["jh_ratio"]}%</td>
<td>{$count["jh_statement_amount"]}</td>
<td>{$count["jh_margin_amount"]}</td>
<td>{$count["jh_margin_ratio"]}%</td>
<td>{$count["margin_ratio"]}%</td>
<td>{$count["margin_amount"]}%</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
<script type="text/html" id="changeTpl">
<div style="padding:10px 40px 30px;">
<spend style="font-size:14px;color:#666;">
</spend>
<table border="0" cellspacing="0" cellpadding="0" style="margin:0px;">
<tr style="line-height: 4;">
<td class="l noticeinfo" style="width:80px;">返点比例:</td>
<td class="r table_radio">
<input type="text" id="cp_rebate_ratio" placeholder="返点比例" /> %
</td>
</tr>
<tr style="line-height: 4;">
<td class="l noticeinfo" style="width:80px;">返点金额:</td>
<td class="r table_radio">
<input type="text" id="cp_rebate_amount" placeholder="返点金额" />
</td>
</tr>
<tr style="line-height: 4;">
<td class="l noticeinfo" style="width:80px;">其他扣款:</td>
<td class="r table_radio">
<input type="text" id="cp_other_amount" placeholder="其他扣款" />
</td>
</tr>
</table>
<button class="submit_btn mlspacing" id="changeMargin" type="submit" style="margin-top:30px;">
保存
</button>
</div>
</script>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
$(".margin_edit").on("click",function(){
var data = $(this).data();
layer.open({
type: 1,
title: data.info.relation_game_name + '编辑',
maxWidth:720,
closeBtn: 1,
shadeClose: false,
content: $("#changeTpl").html(),
success:function(){
env(data);
}
});
});
function env(data) {
$("#cp_rebate_ratio").val(data.info.cp_rebate_ratio);
$("#cp_rebate_amount").val(data.info.cp_rebate_amount);
$("#cp_other_amount").val(data.info.cp_other_amount);
$("#changeMargin").off("click");
$("#changeMargin").on("click",function(){
let cp_rebate_ratio = $("#cp_rebate_ratio").val();
let cp_rebate_amount = $("#cp_rebate_amount").val();
let cp_other_amount = $("#cp_other_amount").val();
var reg = /^(\-|\+)?\d+(\.\d*)?$/;
if( !reg.test(cp_rebate_ratio) || cp_rebate_ratio > 100){
layer.msg("返点比例格式错误");
return ;
}
if( !reg.test(cp_rebate_amount)){
layer.msg("返点金额格式错误");
return ;
}
if( !reg.test(cp_other_amount)){
layer.msg("其他金额格式错误");
return ;
}
if(cp_rebate_ratio == data.info.cp_rebate_ratio && cp_rebate_amount == data.info.cp_rebate_amount && cp_other_amount == data.info.cp_other_amount){
layer.msg("无修改请直接关闭窗口");
return ;
}
//成功
let send = {
id:data.id,
key:data.key,
cp_rebate_ratio:cp_rebate_ratio,
cp_rebate_amount:cp_rebate_amount,
cp_other_amount:cp_other_amount
}
$.ajax({
type: "POST",
url: "{:U('marginEdit')}",
dataType: 'json',
data: send,
success: function (data) {
if (data.status == 1) {
layer.msg(data.msg);
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg(data.msg);
return false;
}
}
});
});
}
</script>
</html>
Loading…
Cancel
Save