mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev
This commit is contained in:
commit
eec601ecff
@ -605,6 +605,7 @@ class StoreOrderController
|
||||
* 订单统计数据
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function data(Request $request)
|
||||
{
|
||||
|
||||
@ -50,17 +50,19 @@ class StoreOrderDao extends BaseDao
|
||||
$realName = $where['real_name'] ?? '';
|
||||
$fieldKey = $where['field_key'] ?? '';
|
||||
$fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
|
||||
$status = $where['status'] ?? '';
|
||||
unset($where['status']);
|
||||
return parent::search($where, $search)->when($isDel, function ($query) use ($where) {
|
||||
$query->where('is_del', $where['is_del']);
|
||||
})->when(isset($where['is_system_del']), function ($query) {
|
||||
$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://未支付
|
||||
$query->where('paid', 0)->where('status', 0)->where('refund_status', 0)->where('is_del', 0);
|
||||
break;
|
||||
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);
|
||||
})->where('is_del', 0);
|
||||
break;
|
||||
@ -95,7 +97,7 @@ class StoreOrderDao extends BaseDao
|
||||
$query->where('is_del', 1);
|
||||
break;
|
||||
case 9://全部用户未删除的订单
|
||||
$query->where('is_del', 0);
|
||||
$query->whereIn('refund_status', [0, 3])->where('is_del', 0);
|
||||
break;
|
||||
}
|
||||
})->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
|
||||
|
||||
@ -363,6 +363,9 @@ class StoreCouponIssueServices extends BaseServices
|
||||
public function issueUserCoupon($id, $user, bool $is_receive = false)
|
||||
{
|
||||
$issueCouponInfo = $this->dao->getInfo((int)$id);
|
||||
if ($user->is_money_level <= 0 && $issueCouponInfo['receive_type'] == 4) {
|
||||
throw new ApiException(400097);
|
||||
}
|
||||
$uid = $user->uid;
|
||||
if (!$issueCouponInfo) throw new ApiException(400516);
|
||||
/** @var StoreCouponIssueUserServices $issueUserService */
|
||||
|
||||
@ -93,7 +93,7 @@ class StoreOrderServices extends BaseServices
|
||||
{
|
||||
[$page, $limit] = $this->getPageValue();
|
||||
$data = $this->dao->getOrderList($where, $field, $page, $limit, $with);
|
||||
$count = $this->dao->count($where);
|
||||
$count = $this->dao->count($where, false);
|
||||
$data = $this->tidyOrderList($data);
|
||||
foreach ($data as &$item) {
|
||||
$refund_num = array_sum(array_column($item['refund'], 'refund_num'));
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<Col span="12" class="fontColor1"
|
||||
>订单状态:{{ 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
|
||||
? '退款中'
|
||||
: '部分退款中'
|
||||
|
||||
@ -338,7 +338,8 @@
|
||||
}
|
||||
|
||||
],
|
||||
virtual_type: 0,
|
||||
virtual_type: 0,
|
||||
allPrice: 0,
|
||||
formContent: '',
|
||||
payType: '', //支付方式
|
||||
openType: 1, //优惠券打开方式 1=使用
|
||||
@ -1830,4 +1831,4 @@
|
||||
.fontC {
|
||||
color: grey;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user