From b201d34ee3c98602f71c6dd35cf42e5524f4f898 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 14:59:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=80=80=E6=AC=BE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=80=BB=E6=95=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/order/StoreOrderRefundDao.php | 18 ++++++++++++++++++ .../order/StoreOrderRefundServices.php | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/crmeb/app/dao/order/StoreOrderRefundDao.php b/crmeb/app/dao/order/StoreOrderRefundDao.php index 110d98890..875ffc51c 100644 --- a/crmeb/app/dao/order/StoreOrderRefundDao.php +++ b/crmeb/app/dao/order/StoreOrderRefundDao.php @@ -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 = "") diff --git a/crmeb/app/services/order/StoreOrderRefundServices.php b/crmeb/app/services/order/StoreOrderRefundServices.php index 860fb9b69..cc394c4af 100644 --- a/crmeb/app/services/order/StoreOrderRefundServices.php +++ b/crmeb/app/services/order/StoreOrderRefundServices.php @@ -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'); } From 23a96541ffe171d18584779f992c813351c24f66 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 15:00:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/user/UserExtractServices.php | 2 +- template/admin/src/pages/finance/userExtract/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crmeb/app/services/user/UserExtractServices.php b/crmeb/app/services/user/UserExtractServices.php index 8e847b24c..72a9fd09b 100644 --- a/crmeb/app/services/user/UserExtractServices.php +++ b/crmeb/app/services/user/UserExtractServices.php @@ -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'); diff --git a/template/admin/src/pages/finance/userExtract/index.vue b/template/admin/src/pages/finance/userExtract/index.vue index e22038c87..58c332a9c 100644 --- a/template/admin/src/pages/finance/userExtract/index.vue +++ b/template/admin/src/pages/finance/userExtract/index.vue @@ -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' }, ]; From 75a8e75e650f0ba6ea173d892fa04a8e179a022a Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 15:00:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/pages/order/orderList/components/tableFrom.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/admin/src/pages/order/orderList/components/tableFrom.vue b/template/admin/src/pages/order/orderList/components/tableFrom.vue index 08b1d8a1d..2e1c1e98c 100644 --- a/template/admin/src/pages/order/orderList/components/tableFrom.vue +++ b/template/admin/src/pages/order/orderList/components/tableFrom.vue @@ -65,8 +65,8 @@ - - + +