diff --git a/app/common/dao/store/order/StoreOrderDao.php b/app/common/dao/store/order/StoreOrderDao.php index cd28326..950d384 100644 --- a/app/common/dao/store/order/StoreOrderDao.php +++ b/app/common/dao/store/order/StoreOrderDao.php @@ -124,6 +124,9 @@ class StoreOrderDao extends BaseDao ->when(isset($where['pay_type']) && $where['pay_type'] !== '', function ($query) use ($where) { $query->where('StoreOrder.pay_type', $where['pay_type']); }) + ->when(isset($where['pay_select']) && $where['pay_select'] !== '', function ($query) use ($where) { + $query->where('StoreOrder.pay_select', $where['pay_select']); + }) ->when(isset($where['order_ids']) && $where['order_ids'] !== '', function ($query) use ($where) { $query->whereIn('order_id', $where['order_ids']); }) diff --git a/app/common/model/store/order/StoreOrder.php b/app/common/model/store/order/StoreOrder.php index 77ab945..db7f3f4 100644 --- a/app/common/model/store/order/StoreOrder.php +++ b/app/common/model/store/order/StoreOrder.php @@ -147,6 +147,12 @@ class StoreOrder extends BaseModel return ($this->verify_time ? strtotime($this->verify_time) > strtotime('-' . $day . ' day') : true); } + public function getPaySelectAttr($val) + { + $status = [0=>'其它',1=>'微信',2=>'福利积分',3=>'新人优惠券',4=>'组合支付']; + return $status[$val]; + } + public function getOrderExtendAttr($val) { return $val ? json_decode($val, true) : null; diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index 19da6ea..39a12f6 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -1280,6 +1280,24 @@ class StoreOrderCreateRepository extends StoreOrderRepository unset($order['cartInfo']); //创建子订单 $order['district_id'] = $address['district_id'] ?? 0; + + $payCount = 0; + if($order['pay_price'] > 0){ + $order['pay_select'] = 1; + $payCount++; + } + if($order['integral_price'] > 0){ + $order['pay_select'] = 2; + $payCount++; + } + if($order['platform_coupon_price'] > 0){ + $order['pay_select'] = 3; + $payCount++; + } + if($payCount >= 2){ + $order['pay_select'] = 4; + } + $_order = $this->dao->create($order); if ($order['integral'] > 0) { diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 3fb8ad7..fab1cc8 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -798,11 +798,11 @@ class StoreOrderRepository extends BaseRepository 'title' => '核销订单', 'order_type' => 1, ], - [ - 'count' => $this->dao->search($where)->where('is_virtual', 1)->count(), - 'title' => '虚拟商品订单', - 'order_type' => 2, - ], +// [ +// 'count' => $this->dao->search($where)->where('is_virtual', 1)->count(), +// 'title' => '虚拟商品订单', +// 'order_type' => 2, +// ], ]; } diff --git a/app/controller/merchant/store/order/Order.php b/app/controller/merchant/store/order/Order.php index c4e6ecf..5ce31a1 100644 --- a/app/controller/merchant/store/order/Order.php +++ b/app/controller/merchant/store/order/Order.php @@ -52,7 +52,7 @@ class Order extends BaseController public function lst() { [$page, $limit] = $this->getPage(); - $where = $this->request->params(['status', 'date', 'order_sn', 'username', 'order_type', 'keywords', 'order_id', 'activity_type', 'group_order_sn', 'store_name']); + $where = $this->request->params(['status', 'date', 'order_sn', 'username', 'order_type', 'keywords', 'order_id', 'activity_type', 'group_order_sn', 'store_name', 'pay_select']); $where['mer_id'] = $this->request->merId(); return app('json')->success($this->repository->merchantGetList($where, $page, $limit)); } diff --git a/app/controller/merchant/system/Merchant.php b/app/controller/merchant/system/Merchant.php index 008451c..563d504 100644 --- a/app/controller/merchant/system/Merchant.php +++ b/app/controller/merchant/system/Merchant.php @@ -91,6 +91,7 @@ class Merchant extends BaseController 'mer_pics', 'long', 'lat', + 'district_id', ['delivery_way',[2]], ]); $validate->check($data); @@ -104,6 +105,8 @@ class Merchant extends BaseController unset($data['mer_certificate']); $data['mer_pics'] = implode(',', $data['mer_pics']); + $data['district_id'] = implode(',',$data['district_id']); + foreach ($data['delivery_way'] as $datum) { if ($datum == 1) { $takeData = $this->request->params(['mer_take_status', 'mer_take_name', 'mer_take_phone', 'mer_take_address', 'mer_take_location', 'mer_take_day', 'mer_take_time']); @@ -159,6 +162,12 @@ class Merchant extends BaseController $data['mer_pics'] = []; } + if($data['district_id']) { + $data['district_id'] = explode(',', $data['district_id']); + }else{ + $data['district_id'] = []; + } + $data['assets'] = \app(FinancialRecordRepository::class)->getMerchantStatistics(array('is_mer' => $this->request->merId())); // $user = \app(UserRepository::class)->getUserByMerId($this->request->merId()); // if($user){ diff --git a/public/mer.html b/public/mer.html index 595062b..1ddcdaa 100644 --- a/public/mer.html +++ b/public/mer.html @@ -1 +1 @@ -加载中...
\ No newline at end of file +加载中...
\ No newline at end of file diff --git a/public/system.html b/public/system.html index 66fca90..a46684e 100644 --- a/public/system.html +++ b/public/system.html @@ -1,3 +1,3 @@ -加载中...
\ No newline at end of file diff --git a/view/admin/src/views/order/list/index.vue b/view/admin/src/views/order/list/index.vue index d1404c1..807ce7b 100644 --- a/view/admin/src/views/order/list/index.vue +++ b/view/admin/src/views/order/list/index.vue @@ -56,23 +56,20 @@ @change="onchangeTime" /> - - - - - - - - - - - - - - - - - + + + + + + + + + - + + + - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + - - - + + + + + + + + +
@@ -232,6 +238,15 @@ export default { this.getList(1) }, methods: { + // 订单详情 + onOrderDetail(order_sn) { + this.$router.push({ + name: 'OrderList', + query: { + order_sn: order_sn + } + }) + }, // 导出 exportOrder() { exportOrderApi({ diff --git a/view/mer/src/views/order/orderDetails.vue b/view/mer/src/views/order/orderDetails.vue index 6835239..b760dcd 100644 --- a/view/mer/src/views/order/orderDetails.vue +++ b/view/mer/src/views/order/orderDetails.vue @@ -26,25 +26,25 @@ >订单核销 发送货 - 小票打印 - + + + + + + + + 订单备注 - 修改发货信息 + 修改发货信息
@@ -68,7 +68,7 @@
  • 支付方式
    -
    {{ orderDetailList.pay_type | payTypeFilter }}
    +
    {{ orderDetailList.pay_select }}
  • 支付时间
    @@ -157,9 +157,9 @@
    订单总价:
    {{ orderDetailList.total_price ? orderDetailList.total_price : '-' }}
  • -
  • -
    会员商品优惠:
    -
    {{ orderDetailList.svip_discount }}
    +
  • +
    支付福利积分:
    +
    {{ orderDetailList.integral_price }}
  • 支付运费:
    @@ -169,20 +169,20 @@
    推广人:
    {{ orderDetailList.TopSpread.nickname }}
  • -
  • -
    一级佣金:
    -
    - {{ parseFloat(orderDetailList.extension_one) + parseFloat(orderDetailList.refund_extension_one) }} - (-{{ orderDetailList.refund_extension_one }}) -
    -
  • -
  • -
    二级佣金:
    -
    - {{ parseFloat(orderDetailList.extension_two) + parseFloat(orderDetailList.refund_extension_two) }} - (-{{ orderDetailList.refund_extension_two }}) -
    -
  • + + + + + + + + + + + + + +
    @@ -215,7 +215,7 @@
    - + @@ -239,7 +239,7 @@
    - + - +