master
wangxinglong 2022-03-18 11:37:30 +08:00
parent fd8cc84bef
commit 118a111279
9 changed files with 49 additions and 130 deletions

View File

@ -457,7 +457,7 @@ class Coupon extends Base
}
$redpackData['failure_reason'] = json_encode($result,JSON_UNESCAPED_UNICODE);
//否则失败 记录失败原因
Log::info("企业发起付款【分销者红包】失败:" . json_encode($result,JSON_UNESCAPED_UNICODE));
Log::info("企业发起付款【领券分销者红包】失败:" . json_encode($result,JSON_UNESCAPED_UNICODE));
//默认回滚
Db::rollback();
//失败也要写入红包记录
@ -982,7 +982,7 @@ class Coupon extends Base
//if($couponMain["is_distribution"] == CouponMain::COMMON_ON){
if($couponMain['commission_dis_distributed'] < $couponMain['commission_dis_distribution']){
//检测 【分销者】部分是否最少0.3元
//检测 【核销分销者】部分是否最少0.3元
$distributedMoney = ($couponMain['commission_dis_distributed'] / 100) * $couponMain['deduction_money'];
if ($distributedMoney != 0 && $distributedMoney < CouponMain::min_redpack_money) {
return $this->json(4002,
@ -991,7 +991,7 @@ class Coupon extends Base
. "");
}
}else{
//检测 【分销者】部分是否最少0.3元
//检测 【领券分销者】部分是否最少0.3元
$distributionMoney = ($couponMain['commission_dis_distribution'] / 100) * $couponMain['deduction_money'];
if ($distributionMoney != 0 && $distributionMoney < CouponMain::min_redpack_money) {
return $this->json(4002,

View File

@ -220,7 +220,7 @@ class Config extends Base
$validate = $this->validateByApi($data, [
'admin|平台占比' => 'require|number',
'distribution|(领券)分销者占比' => 'require|number',
'distributed|(核销)分销者占比' => 'require|number',
'distributed|(核销)分销者占比' => 'require|number',
]);
if ($validate !== true) {

View File

@ -259,18 +259,18 @@ class Coupon extends Base
$distributionMoney = ($data['commission_dis_distribution'] / 100) * $data['deduction_money'];
if ($distributionMoney != 0 && $distributionMoney < CouponMain::min_redpack_money) {
return $this->json(4002,
"开启分销:【分销者】红包不足"
"开启分销:【领券分销者】红包不足"
. CouponMain::min_redpack_money
. "元,扣除金额最低" .
(CouponMain::min_redpack_money * (100 / ($data['commission_dis_distribution'])))
. "");
}
}else{
//检测【分销者】部分是否最少0.3元
//检测【核销分销者】部分是否最少0.3元
$distributedMoney = ($data['commission_dis_distributed'] / 100) * $data['deduction_money'];
if ($distributedMoney != 0 && $distributedMoney < CouponMain::min_redpack_money) {
return $this->json(4002,
"开启分销:【分销者】红包不足"
"开启分销:【核销分销者】红包不足"
. CouponMain::min_redpack_money
. "元,扣除金额最低" .
(CouponMain::min_redpack_money * (100 / ($data['commission_dis_distributed'])))
@ -423,25 +423,25 @@ class Coupon extends Base
}
}
if($data['commission_dis_distribution'] < $data['commission_dis_distributed']){
//检测【分销者】部分是否最少0.3元
//检测【领券分销者】部分是否最少0.3元
$distributionMoney = ($data['commission_dis_distribution']/100) * $couponMain['deduction_money'];
if ($distributionMoney != 0 && $distributionMoney < CouponMain::min_redpack_money) {
return $this->json(4002,
"开启分销:【分销者】红包不足"
"开启分销:【领券分销者】红包不足"
.CouponMain::min_redpack_money
."元,(领券)分销者占比最低" .
."元,【领券分销者】占比最低" .
(round((CouponMain::min_redpack_money / ($data['deduction_money'])) * 100, 2))
. "%"
);
}
}else{
//检测【分销者】部分是否最少0.3元
//检测【核销分销者】部分是否最少0.3元
$distributedMoney = ($data['commission_dis_distributed']/100) * $couponMain['deduction_money'];
if ($distributedMoney != 0 && $distributedMoney < CouponMain::min_redpack_money) {
return $this->json(4002,
"开启分销:【分销者】红包不足"
"开启分销:【核销分销者】红包不足"
.CouponMain::min_redpack_money
."元,(核销)被分销者占比最低" .
."元,【核销分销者】占比最低" .
(round((CouponMain::min_redpack_money / ($data['deduction_money'])) * 100, 2))
. "%");
}
@ -456,7 +456,7 @@ class Coupon extends Base
return $this->json(4002,
"关闭分销:【消费者】红包不足"
.CouponMain::min_redpack_money
."元,消费者占比最低" .
."元,消费者占比最低" .
(round((CouponMain::min_redpack_money / ($couponMain['deduction_money'])) * 100, 2))
. "%");
}
@ -467,7 +467,7 @@ class Coupon extends Base
return $this->json(4002,
"关闭分销:【渠道商】红包不足"
.CouponMain::min_redpack_money
."元,渠道商占比最低" .
."元,渠道商占比最低" .
(round((CouponMain::min_redpack_money / ($couponMain['deduction_money'])) * 100, 2))
. "%");
}
@ -575,26 +575,26 @@ class Coupon extends Base
}
if($item['commission_dis_distribution'] < $item['commission_dis_distributed'] ){
//检测【分销者】部分是否最少0.3元
//检测【领券分销者】部分是否最少0.3元
$distributionMoney = ($item['commission_dis_distribution'] / 100) * $item['deduction_money'];
if ($distributionMoney != 0 && $distributionMoney < CouponMain::min_redpack_money) {
return $this->json(4002,
"{$item['name']}】开启分销后:【分销者】红包不足"
"{$item['name']}】开启分销后:【领券分销者】红包不足"
. CouponMain::min_redpack_money
. "元,(领券)分销者占比最低" .
. "元,【领券分销者】占比最低" .
(round((CouponMain::min_redpack_money / ($item['deduction_money'])) * 100, 2))
. "%"
);
}
}else{
//检测【分销者】部分是否最少0.3元
//检测【核销分销者】部分是否最少0.3元
$distributedMoney = ($item['commission_dis_distributed'] / 100) * $item['deduction_money'];
if ($distributedMoney != 0 && $distributedMoney < CouponMain::min_redpack_money) {
return $this->json(4002,
"{$item['name']}】开启分销后:【分销者】红包不足"
"{$item['name']}】开启分销后:【核销分销者】红包不足"
. CouponMain::min_redpack_money
. ",(核销)被分销者占比最低" .
. ",【核销分销者】占比最低" .
(round((CouponMain::min_redpack_money / ($item['deduction_money'])) * 100, 2))
. "%");
}
@ -608,7 +608,7 @@ class Coupon extends Base
"{$item['name']}】开启分销后:【渠道商】红包不足"
. CouponMain::min_redpack_money
. "元,渠道商占比最低" .
. "元,渠道商占比最低" .
(round((CouponMain::min_redpack_money / ($item['deduction_money'])) * 100, 2))
. "%"
);
@ -620,7 +620,7 @@ class Coupon extends Base
return $this->json(4002,
"{$item['name']}】开启分销后:【消费者】红包不足"
. CouponMain::min_redpack_money
. ",消费者占比最低" .
. ",消费者占比最低" .
(round((CouponMain::min_redpack_money / ($item['deduction_money'])) * 100, 2))
. "%");
}

View File

@ -5,8 +5,8 @@ namespace app\model;
class Redpack extends Base
{
const userTypeDistribution = "distribution";//分销者
const userTypeDistributed = "distributed";//分销者
const userTypeDistribution = "distribution";//领券分销者
const userTypeDistributed = "distributed";//核销分销者
const userTypeAgency = "agency";// 渠道商
/**
* 获取分销红包记录

View File

@ -69,7 +69,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect',"laydate"]
"金额: " + d.agency_money + ":"
d.admin_money + " :" + d.consumer_money;
} else {
disstr = "分销者:平台:被分销者" +
disstr = "领券分销者:平台:核销分销者" +
" 比例: " + d.commission_dis_distribution + ":" + d.commission_dis_admin + ":" + d.commission_dis_distributed +
"金额: " + d.distribution_money + ":"
d.admin_money + " :" + d.consumer_money;

View File

@ -27,7 +27,7 @@
<div class="layui-form-itemBox2 between-center">
<div class="layui-form-item">
<label class="layui-form-label">(核销)分销者占比(%)</label>
<label class="layui-form-label">(核销)分销者占比(%)</label>
<div class="layui-input-block">
<input class="layui-input" type="number" id="distributed" onblur="jsPrice()" name="distributed" value="{$item.distributed ?? 0}"/>
</div>

View File

@ -278,7 +278,7 @@
<div class="layui-form-itemBox2 between-center">
<div class="layui-form-item">
<label class="layui-form-label">(核销)分销者占比(%)</label>
<label class="layui-form-label">(核销)分销者占比(%)</label>
<div class="layui-input-block">
<input class="layui-input" type="number" name="item[commission_dis_distributed]" lay-verify="required|number" value="{$distributionProportionUser.distributed ?? 0}"/>
</div>

View File

@ -286,7 +286,7 @@
<div class="layui-form-itemBox2 between-center">
<div class="layui-form-item">
<label class="layui-form-label">(核销)分销者占比(%)</label>
<label class="layui-form-label">(核销)分销者占比(%)</label>
<div class="layui-input-block">
<input class="layui-input" type="number" name="item[commission_dis_distributed]" lay-verify="required|number" value="{$item.commission_dis_distributed ?? 0}"/>
</div>

View File

@ -1,82 +1,6 @@
{layout name="manager/layout" /}
<div class="layui-bg-gray" style="padding: 30px;">
<div class="layui-row layui-col-space15 layui-hide">
<div class="layui-col-md3">
<div class="layui-panel" style="border-radius: 8px;">
<div class="layui-row layui-col-space20">
<div class="layui-col-md4" style="text-align: center; padding: 40px 20px">
<div class="layui-anim" data-anim="layui-anim-downbit">
<i class="fa fa-user-circle-o" style="font-size: 500%;"></i>
</div>
</div>
<div class="layui-col-md8" style="padding: 15% 0;">
<h3><strong>新增客户(人)</strong></h3>
<span style="font-size: 36px">{$count['new'] ?? 0}</span>
</div>
</div>
</div>
</div>
<div class="layui-col-md3">
<div class="layui-panel" style="border-radius: 8px;">
<div class="layui-row layui-col-space20">
<div class="layui-col-md4" style="text-align: center; padding: 40px 20px">
<div class="layui-anim" data-anim="layui-anim-downbit">
<i class="fa fa-user-circle" style="font-size: 500%;"></i>
</div>
</div>
<div class="layui-col-md8" style="padding: 15% 0;">
<h3><strong>新增预约(人)</strong></h3>
<span style="font-size: 36px">{$count['appointment'] ?? 0}</span>
</div>
</div>
</div>
</div>
<div class="layui-col-md3">
<div class="layui-panel" style="border-radius: 8px;">
<div class="layui-row layui-col-space20">
<div class="layui-col-md4" style="text-align: center; padding: 40px 20px">
<div class="layui-anim" data-anim="layui-anim-downbit">
<i class="fa fa-user-circle" style="font-size: 500%;"></i>
</div>
</div>
<div class="layui-col-md8" style="padding: 15% 0;">
<a href="javascript:;" layuimini-content-href="manager/appointment" data-title="预约列表">
<h3><strong>待处理预约(人)</strong></h3>
<span style="font-size: 36px">{$count['appointment_waiting'] ?? 0}</span>
</a>
</div>
</div>
</div>
</div>
<div class="layui-col-md3">
<div class="layui-panel" style="border-radius: 8px;">
<div class="layui-row layui-col-space20">
<div class="layui-col-md4" style="text-align: center; padding: 40px 20px">
<div class="layui-anim" data-anim="layui-anim-downbit">
<i class="fa fa-user" style="font-size: 500%;"></i>
</div>
</div>
<div class="layui-col-md8" style="padding: 15% 0;">
<h3><strong>今日在线(人)</strong></h3>
<span style="font-size: 36px">{$count['online'] ?? 0}</span>
</div>
</div>
</div>
</div>
</div>
<div class="layui-hide">
<br>
<blockquote class="layui-elem-quote" style="padding: 5px;">分销排行榜
<a class="pull-right" href="javascript:;" layuimini-content-href="/manager/appointment" data-title="客户分析">查看全部</a>
</blockquote>
<table id="table-container" class="layui-table" data-url="/manager/index/dashboard"
lay-filter="table-container"></table>
</div>
<blockquote class="layui-elem-quote pull-left" style="padding: 5px;margin-top: 20px;">常用功能</blockquote>
<div class="layui-row">
@ -84,40 +8,35 @@
<div class="layui-col-md7">
<div class="layui-row">
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="/manager/consumer/index" data-title="用户管理">
<a href="javascript:;" layuimini-content-href="manager/consumer/index" data-title="用户管理">
<i class="fa fa-user-circle-o" style="font-size: 500%;"></i>
</a>
<div><span>消费者管理</span></div>
</div>
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/coupon/index" data-title="优惠券列表">
<i class="fa fa-list" style="font-size: 500%;"></i>
</a>
<div><span>优惠券列表</span></div>
</div>
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/bill/index" data-title="流水查看">
<i class="fa fa-list-ul" style="font-size: 500%;"></i>
</a>
<div><span>流水查看</span></div>
</div>
<div class="layui-col-md2" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/business/business-wait-list" data-title="商家认证">
<i class="fa fa-user-plus" style="font-size: 500%;"></i>
</a>
<div><span>商家认证</span></div>
</div>
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/channel" data-title="渠道管理">
<i class="fa fa-road" style="font-size: 500%;"></i>
</a>
<div><span>渠道管理</span></div>
</div>
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/appointment" data-title="预约列表">
<i class="fa fa-american-sign-language-interpreting" style="font-size: 500%;"></i>
</a>
<div><span>预约管理</span></div>
</div>
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" data-title="报告管理">
<i class="fa fa-newspaper-o" style="font-size: 500%;"></i>
</a>
<div><span>报告管理</span></div>
</div>
<div class="layui-col-md2 layui-hide" style="text-align: center; padding: 40px 20px">
<a href="javascript:;" layuimini-content-href="manager/overview/customer" data-title="分销排行榜">
<i class="fa fa-bar-chart-o" style="font-size: 500%;"></i>
</a>
<div><span>分销排行榜</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 列 真实姓名 -->