Преглед изворни кода

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

liaofei пре 2 година
родитељ
комит
eec601ecff

+ 1 - 0
crmeb/app/api/controller/v1/order/StoreOrderController.php

@@ -605,6 +605,7 @@ class StoreOrderController
      * 订单统计数据
      * 订单统计数据
      * @param Request $request
      * @param Request $request
      * @return mixed
      * @return mixed
+     * @throws \ReflectionException
      */
      */
     public function data(Request $request)
     public function data(Request $request)
     {
     {

+ 6 - 4
crmeb/app/dao/order/StoreOrderDao.php

@@ -50,17 +50,19 @@ class StoreOrderDao extends BaseDao
         $realName = $where['real_name'] ?? '';
         $realName = $where['real_name'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
+        $status = $where['status'] ?? '';
+        unset($where['status']);
         return parent::search($where, $search)->when($isDel, function ($query) use ($where) {
         return parent::search($where, $search)->when($isDel, function ($query) use ($where) {
             $query->where('is_del', $where['is_del']);
             $query->where('is_del', $where['is_del']);
         })->when(isset($where['is_system_del']), function ($query) {
         })->when(isset($where['is_system_del']), function ($query) {
             $query->where('is_system_del', 0);
             $query->where('is_system_del', 0);
-        })->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
-            switch ((int)$where['status']) {
+        })->when($status !== '', function ($query) use ($where, $status) {
+            switch ((int)$status) {
                 case 0://未支付
                 case 0://未支付
                     $query->where('paid', 0)->where('status', 0)->where('refund_status', 0)->where('is_del', 0);
                     $query->where('paid', 0)->where('status', 0)->where('refund_status', 0)->where('is_del', 0);
                     break;
                     break;
                 case 1://已支付 未发货
                 case 1://已支付 未发货
-                    $query->where('paid', 1)->whereIn('status', [0, 4])->whereIn('refund_status', [0, 3])->when(isset($where['shipping_type']), function ($query) {
+                    $query->where('paid', 1)->where('status', 0)->whereIn('refund_status', [0, 3])->when(isset($where['shipping_type']), function ($query) {
                         $query->where('shipping_type', 1);
                         $query->where('shipping_type', 1);
                     })->where('is_del', 0);
                     })->where('is_del', 0);
                     break;
                     break;
@@ -95,7 +97,7 @@ class StoreOrderDao extends BaseDao
                     $query->where('is_del', 1);
                     $query->where('is_del', 1);
                     break;
                     break;
                 case 9://全部用户未删除的订单
                 case 9://全部用户未删除的订单
-                    $query->where('is_del', 0);
+                    $query->whereIn('refund_status', [0, 3])->where('is_del', 0);
                     break;
                     break;
             }
             }
         })->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
         })->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {

+ 3 - 0
crmeb/app/services/activity/coupon/StoreCouponIssueServices.php

@@ -363,6 +363,9 @@ class StoreCouponIssueServices extends BaseServices
     public function issueUserCoupon($id, $user, bool $is_receive = false)
     public function issueUserCoupon($id, $user, bool $is_receive = false)
     {
     {
         $issueCouponInfo = $this->dao->getInfo((int)$id);
         $issueCouponInfo = $this->dao->getInfo((int)$id);
+        if ($user->is_money_level <= 0 && $issueCouponInfo['receive_type'] == 4) {
+            throw new ApiException(400097);
+        }
         $uid = $user->uid;
         $uid = $user->uid;
         if (!$issueCouponInfo) throw new ApiException(400516);
         if (!$issueCouponInfo) throw new ApiException(400516);
         /** @var StoreCouponIssueUserServices $issueUserService */
         /** @var StoreCouponIssueUserServices $issueUserService */

+ 1 - 1
crmeb/app/services/order/StoreOrderServices.php

@@ -93,7 +93,7 @@ class StoreOrderServices extends BaseServices
     {
     {
         [$page, $limit] = $this->getPageValue();
         [$page, $limit] = $this->getPageValue();
         $data = $this->dao->getOrderList($where, $field, $page, $limit, $with);
         $data = $this->dao->getOrderList($where, $field, $page, $limit, $with);
-        $count = $this->dao->count($where);
+        $count = $this->dao->count($where, false);
         $data = $this->tidyOrderList($data);
         $data = $this->tidyOrderList($data);
         foreach ($data as &$item) {
         foreach ($data as &$item) {
             $refund_num = array_sum(array_column($item['refund'], 'refund_num'));
             $refund_num = array_sum(array_column($item['refund'], 'refund_num'));

+ 1 - 1
template/admin/src/pages/order/orderList/handle/orderDetails.vue

@@ -18,7 +18,7 @@
           <Col span="12" class="fontColor1"
           <Col span="12" class="fontColor1"
             >订单状态:{{ orderDatalist.orderInfo._status._title }}
             >订单状态:{{ orderDatalist.orderInfo._status._title }}
             {{
             {{
-              orderDatalist.orderInfo.refund && orderDatalist.orderInfo.refund.length
+              orderDatalist.orderInfo.refund && orderDatalist.orderInfo.refund.length && orderDatalist.orderInfo.refund_status < 2
                 ? orderDatalist.orderInfo.is_all_refund
                 ? orderDatalist.orderInfo.is_all_refund
                   ? '退款中'
                   ? '退款中'
                   : '部分退款中'
                   : '部分退款中'

+ 3 - 2
template/uni-app/pages/goods/order_confirm/index.vue

@@ -338,7 +338,8 @@
 					}
 					}
 
 
 				],
 				],
-				virtual_type: 0,
+				virtual_type: 0,
+				allPrice: 0,
 				formContent: '',
 				formContent: '',
 				payType: '', //支付方式
 				payType: '', //支付方式
 				openType: 1, //优惠券打开方式 1=使用
 				openType: 1, //优惠券打开方式 1=使用
@@ -1830,4 +1831,4 @@
 	.fontC {
 	.fontC {
 		color: grey;
 		color: grey;
 	}
 	}
-</style>
+</style>