pull/5/head
wanghousheng 4 months ago
parent f1bf660a75
commit 7c520b7831
  1. 18
      app/common/model/dealer/Order.php

@ -12,12 +12,12 @@ declare (strict_types=1);
namespace app\common\model\dealer; namespace app\common\model\dealer;
use cores\BaseModel; use app\common\enum\order\refund\AuditStatus as AuditStatusEnum;
use app\common\enum\order\refund\RefundType as RefundTypeEnum;
use app\common\library\helper; use app\common\library\helper;
use app\common\model\Order as OrderModel; use app\common\model\Order as OrderModel;
use app\common\model\OrderGoods as OrderGoodsModel; use app\common\model\OrderGoods as OrderGoodsModel;
use app\common\enum\order\refund\RefundType as RefundTypeEnum; use cores\BaseModel;
use app\common\enum\order\refund\AuditStatus as AuditStatusEnum;
use think\model\relation\BelongsTo; use think\model\relation\BelongsTo;
/** /**
@ -156,18 +156,18 @@ class Order extends BaseModel
if (!$goods['is_ind_dealer']) { if (!$goods['is_ind_dealer']) {
// 全局分销比例 // 全局分销比例
return [ return [
'first_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['first_money'], 100)), 'first_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['first_money'], 1000)),
'second_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['second_money'], 100)), 'second_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['second_money'], 1000)),
'third_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['third_money'], 100)) 'third_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['third_money'], 1000))
]; ];
} }
// 商品单独分销 // 商品单独分销
if ($goods['dealer_money_type'] == 10) { if ($goods['dealer_money_type'] == 10) {
// 分销佣金类型:百分比 // 分销佣金类型:百分比
return [ return [
'first_money' => $goodsPrice * helper::bcdiv($goods['first_money'], 100), 'first_money' => $goodsPrice * helper::bcdiv($goods['first_money'], 1000),
'second_money' => $goodsPrice * helper::bcdiv($goods['second_money'], 100), 'second_money' => $goodsPrice * helper::bcdiv($goods['second_money'], 1000),
'third_money' => $goodsPrice * helper::bcdiv($goods['third_money'], 100) 'third_money' => $goodsPrice * helper::bcdiv($goods['third_money'], 1000)
]; ];
} else { } else {
// 分销佣金类型:固定金额 // 分销佣金类型:固定金额

Loading…
Cancel
Save