Merge branch 'v5.1.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.1.0dev

This commit is contained in:
From-wh 2023-06-19 15:00:33 +08:00
commit 5bfa8e8c56
5 changed files with 24 additions and 5 deletions

View File

@ -95,9 +95,27 @@ class StoreOrderRefundDao extends BaseDao
})->order('id DESC')->select()->toArray();
}
/**
* 退款订单数量
* @param array $where
* @param bool $search
* @return int
* @throws \ReflectionException
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/06/19
*/
public function count(array $where = [], bool $search = false)
{
return $this->search($where, $search)->count();
}
/**
* 根据时间获取
* @param array $where
* @param string $sum_field
* @param string $selectType
* @param string $group
* @return float|int
*/
public function getOrderRefundMoneyByWhere(array $where, string $sum_field, string $selectType, string $group = "")

View File

@ -35,6 +35,7 @@ use crmeb\services\CacheService;
use crmeb\services\FormBuilder as Form;
use crmeb\services\pay\Pay;
use crmeb\services\workerman\ChannelService;
use think\facade\Db;
/**
@ -600,7 +601,7 @@ class StoreOrderRefundServices extends BaseServices
$userInfo = $userServices->get($order['uid']);
$order['nickname'] = $userInfo['nickname'];
$order['phone'] = $userInfo['phone'];
if (in_array($orderInfo['pay_type'], ['weixin', 'alipay', 'allinpay', 'offline'])) {
if (in_array($order['pay_type'], ['weixin', 'alipay', 'allinpay', 'offline'])) {
$capitalFlowServices->setFlow($order, 'refund');
}

View File

@ -274,7 +274,7 @@ class UserExtractServices extends BaseServices
/** @var UserBrokerageServices $userBrokerageServices */
$userBrokerageServices = app()->make(UserBrokerageServices::class);
$where['pm'] = 1;
$extract_statistics['brokerage_count'] = $userBrokerageServices->getUsersBokerageSum($where);
$extract_statistics['brokerage_count'] = bcadd((string)$userBrokerageServices->getUsersBokerageSum($where), (string)$extract_statistics['price'], 2);
//未提现金额
$extract_statistics['brokerage_not'] = $extract_statistics['brokerage_count'] > $extract_statistics['priced'] ? bcsub((string)$extract_statistics['brokerage_count'], (string)$extract_statistics['priced'], 2) : 0.00;
return compact('extract_statistics', 'list');

View File

@ -394,8 +394,8 @@ export default {
this.total = data.list.count;
this.extractStatistics = data.extract_statistics;
this.cardLists = [
{ col: 6, count: this.extractStatistics.price, name: '待提现金额', className: 'md-basket' },
{ col: 6, count: this.extractStatistics.brokerage_count, name: '佣金总金额', className: 'md-pricetags' },
{ col: 6, count: this.extractStatistics.price, name: '待提现金额', className: 'md-basket' },
{ col: 6, count: this.extractStatistics.priced, name: '已提现金额', className: 'md-cash' },
{ col: 6, count: this.extractStatistics.brokerage_not, name: '未提现金额', className: 'ios-cash' },
];

View File

@ -65,8 +65,8 @@
<Option value="all">全部</Option>
<Option value="order_id">订单号</Option>
<Option value="uid">UID</Option>
<Option value="real_name">用户姓名</Option>
<Option value="user_phone">用户电话</Option>
<Option value="real_name">收件人姓名</Option>
<Option value="user_phone">收件人电话</Option>
<Option value="title">商品名称(模糊)</Option>
</Select>
</Input>