Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

This commit is contained in:
From-wh 2023-02-18 16:30:10 +08:00
commit 030ea55206
8 changed files with 26 additions and 23 deletions

View File

@ -43,7 +43,7 @@ class StoreIntegralOrderStatusDao extends BaseDao
*/
public function getStatusList(array $where, int $page, int $limit)
{
return $this->search($where)->page($page, $limit)->select()->toArray();
return $this->search($where)->page($page, $limit)->order('change_time desc')->select()->toArray();
}
}

View File

@ -90,6 +90,9 @@ class AgentLevelServices extends BaseServices
$this->checkUserLevelFinish($uid);
$list = $this->dao->getList(['is_del' => 0, 'status' => 1]);
foreach ($list as &$item) {
$item['image'] = set_file_url($item['image']);
}
$agent_level = $user['agent_level'] ?? 0;
//没等级默认最低等级
if (!$agent_level) {

View File

@ -430,17 +430,23 @@ class StoreOrderRefundServices extends BaseServices
*/
public function integralAndCouponBack($order)
{
/** @var StoreOrderStatusServices $statusService */
$statusService = app()->make(StoreOrderStatusServices::class);
$res = true;
//回退优惠卷 拆分子订单不退优惠券
if (!$order['pid'] && $order['coupon_id'] && $order['coupon_price']) {
/** @var StoreCouponUserServices $coumonUserServices */
$coumonUserServices = app()->make(StoreCouponUserServices::class);
$res = $res && $coumonUserServices->recoverCoupon((int)$order['coupon_id']);
$statusService->save([
'oid' => $order['id'],
'change_type' => 'coupon_back',
'change_message' => '商品退优惠券',
'change_time' => time()
]);
}
//回退积分
$order = $this->regressionIntegral($order);
/** @var StoreOrderStatusServices $statusService */
$statusService = app()->make(StoreOrderStatusServices::class);
$statusService->save([
'oid' => $order['id'],
'change_type' => 'integral_back',

View File

@ -65,15 +65,7 @@ class StoreOrderTakeServices extends BaseServices
throw new ApiException(410266);
}
$order->status = 2;
/** @var StoreOrderStatusServices $statusService */
$statusService = app()->make(StoreOrderStatusServices::class);
$res = $order->save() && $statusService->save([
'oid' => $order['id'],
'change_type' => 'user_take_delivery',
'change_message' => '用户已收货',
'change_time' => time()
]);
$res = $res && $this->storeProductOrderUserTakeDelivery($order);
$res = $order->save() && $this->storeProductOrderUserTakeDelivery($order);
if (!$res) {
throw new ApiException(410205);
}

View File

@ -2017,13 +2017,15 @@ class StoreProductServices extends BaseServices
break;
case 2:
foreach ($ids as $product_id) {
$batchData[] = [
'id' => $product_id,
'logistics' => implode(',', $data['logistics']),
'freight' => $data['freight'],
'postage' => $data['freight'] == 2 ? $data['postage'] : 0,
'temp_id' => $data['freight'] == 3 ? $data['temp_id'] : 0
];
if ($this->dao->value(['id' => $product_id], 'virtual_type') == 0) {
$batchData[] = [
'id' => $product_id,
'logistics' => implode(',', $data['logistics']),
'freight' => $data['freight'],
'postage' => $data['freight'] == 2 ? $data['postage'] : 0,
'temp_id' => $data['freight'] == 3 ? $data['temp_id'] : 0
];
}
}
if (count($batchData)) $this->dao->saveAll($batchData);
break;

View File

@ -1461,7 +1461,7 @@ class UserServices extends BaseServices
$user['vip'] = (bool)$userLevel;
if ($user['vip']) {
$user['vip_id'] = $userLevel['id'] ?? 0;
$user['vip_icon'] = $userLevel['icon'] ?? '';
$user['vip_icon'] = set_file_url($userLevel['icon']) ?? '';
$user['vip_name'] = $userLevel['name'] ?? '';
}
}

View File

@ -78,8 +78,8 @@
<div class="search">
<div>
<span>是否显示:</span>
<Select v-model="taskData.status" style="width: 200px">
<Option value="">全部</Option>
<Select v-model="taskData.status" style="width: 200px" clearable>
<!-- <Option :value="''">全部</Option> -->
<Option :value="1">显示</Option>
<Option :value="0">不显示</Option>
</Select>

View File

@ -107,7 +107,7 @@
<view class='conter'>{{$t(`¥`)}}{{orderInfo.pay_postage}}</view>
</view>
<view class="actualPay acea-row row-right">
{{$t(`real_payment`)}}:<span class="money">{{$t(`¥`)}}{{ orderInfo.pay_price }}</span>
{{$t(`实际支付`)}}:<span class="money">{{$t(`¥`)}}{{ orderInfo.pay_price }}</span>
</view>
</view>
<view class="wrapper" v-if="