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

This commit is contained in:
From-wh 2023-04-01 18:44:33 +08:00
commit ec355b3be9
9 changed files with 18 additions and 8 deletions

View File

@ -477,6 +477,7 @@ class StoreOrderController
foreach ($order['cart_info'] as $k => $cart) {
$cartNew['cart_num'] = $cart['cart_num'];
$cartNew['truePrice'] = $cart['truePrice'];
$cartNew['postage_price'] = $cart['postage_price'];
$cartNew['productInfo']['image'] = $cart['productInfo']['image'];
$cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
$cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';
@ -500,6 +501,7 @@ class StoreOrderController
$cart = json_decode($cart, true);
$cartNew['cart_num'] = $cart['cart_num'];
$cartNew['truePrice'] = $cart['truePrice'];
$cartNew['postage_price'] = $cart['postage_price'];
$cartNew['productInfo']['image'] = $cart['productInfo']['image'];
$cartNew['productInfo']['store_name'] = $cart['productInfo']['store_name'];
$cartNew['productInfo']['unit_name'] = $cart['productInfo']['unit_name'] ?? '';

View File

@ -104,8 +104,11 @@ class StoreBargainUserDao extends BaseDao
*/
public function bargainUserList($where, $page = 0, $limit = 0)
{
return $this->search($where)->with(['getBargain', 'getUser'])->when($page != 0, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->order('add_time desc')->select()->toArray();
return $this->search($where)->with(['getBargain', 'getUser'])
->when(isset($where['real_name']) && $where['real_name'] != '', function ($query) use ($where) {
$query->where('uid|nickname', 'like', '%' . $where['keyword'] . '%');
})->when($page != 0, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->order('add_time desc')->select()->toArray();
}
}

View File

@ -952,7 +952,7 @@ class StoreOrderDao extends BaseDao
return $this->search($where)->where('bargain_id', $id)
->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray();
})->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray();
}
/**
@ -968,7 +968,7 @@ class StoreOrderDao extends BaseDao
*/
public function combinationStatisticsOrder($id, $where, $page = 0, $limit = 0)
{
return $this->search($where)->where('combination_id', $id)->where('paid', 1)->whereIn('refund_type', [0, 3])->where('is_del', 0)
return $this->search($where)->where('combination_id', $id)
->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();

View File

@ -1027,6 +1027,7 @@ class StoreBargainServices extends BaseServices
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
[$page, $limit] = $this->getPageValue();
$where = $where + ['paid' => 1, 'refund_status' => 0, 'is_del' => 0];
$list = $orderServices->bargainStatisticsOrder($id, $where, $page, $limit);
$where['bargain_id'] = $id;
$count = $orderServices->count($where);

View File

@ -234,6 +234,9 @@ class StoreBargainUserServices extends BaseServices
* 砍价列表
* @param $where
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function bargainUserList($where)
{

View File

@ -660,6 +660,7 @@ class StoreCombinationServices extends BaseServices
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
[$page, $limit] = $this->getPageValue();
$where = $where + ['paid' => 1, 'refund_status' => 0, 'is_del' => 0];
$list = $orderServices->combinationStatisticsOrder($id, $where, $page, $limit);
$where['combination_id'] = $id;
$count = $orderServices->count($where);

View File

@ -775,7 +775,7 @@ class StoreSeckillServices extends BaseServices
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
[$page, $limit] = $this->getPageValue();
$where['is_del'] = 0;
$where = $where + ['paid' => 1, 'refund_status' => 0, 'is_del' => 0];
$list = $orderServices->seckillOrder($id, $where, $page, $limit);
$where['seckill_id'] = $id;
$count = $orderServices->count($where);

View File

@ -42,7 +42,7 @@
search
enter-button
v-model="pagination.real_name"
placeholder="请输入用户姓名|手机号|UID"
:placeholder="type == 1 ? '请输入用户姓名|订单号|UID' : '请输入用户UID'"
@on-search="searchList"
/>
</FormItem>

View File

@ -8,7 +8,7 @@
<view class='text acea-row row-between'>
<view class='name line2'>{{item.productInfo.store_name}}</view>
<view class='money'>
<view>{{$t(`¥`)}}{{item.truePrice}}</view>
<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price/item.cart_num)).toFixed(2)}}</view>
<view>x{{item.cart_num}}</view>
</view>
</view>