Browse Source

Merge branch '20220729_newtpl' of gitea.intra.yunpaper.com:application/kuaileorder into 20220729_newtpl

pull/9/head
Jason 3 years ago
parent
commit
2418c1924c
  1. 2
      control/index.php
  2. 9
      index.php
  3. 9
      model/mOrder.php
  4. 4
      view/templates/include/admin_leftmenu.html

2
control/index.php

@ -149,7 +149,7 @@ class index extends publicBase {
$pagesize = $this->get('limit')+0;
$obj = new mOrder();
$list = $obj->getOrderList($shopinfo['uid'], $shopinfo['id'], ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES, $page, $pagesize);
$list = $obj->getWaitDeliverOrderList($shopinfo['uid'], $shopinfo['id'], $page, $pagesize);
if (empty($list)) $this->ajax_json(false, 'empty list');
$order_status2class = array(

9
index.php

@ -77,6 +77,15 @@ class run extends publicBase {
}
$this->view['_shopinfo'] = $this->para['_shopinfo'] = $shopinfo;
$obj = new mOrder();
$wait_deliver_count = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'], ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES)+0;
$wait_deliver_count = $wait_deliver_count>99 ? '99+' : $wait_deliver_count;
$this->view['_wait_deliver_count'] = $this->para['_wait_deliver_count'] = $wait_deliver_count;
$after_sale_count = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'], 0, REFUND_STATUS_AFTER_SALE_ING)+0;
$after_sale_count = $after_sale_count>99 ? '99+' : $after_sale_count;
$this->view['_after_sale_count'] = $this->para['_after_sale_count'] = $after_sale_count;
}
private function action() {

9
model/mOrder.php

@ -183,6 +183,15 @@ class mOrder extends mBase {
return $this->obj->selectAll($this->order, $where, 'pay_time desc', array($start, $pagesize));
}
public function getWaitDeliverOrderList($uid, $shop_id, $page=1, $pagesize=100) {
$where = array(
'sql' => '`uid`=? and `shop_id`=? and `order_status`=? and `refund_status`=?',
'vals' => array($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES)
);
$start = ($page - 1) * $pagesize;
return $this->obj->selectAll($this->order, $where, 'urge_shipping_time desc', array($start, $pagesize));
}
public function getNotFinishedOrders() {
return $this->obj->selectAll($this->order, array('sql'=>'`order_status`!=? and `refund_status`!=?', 'vals'=>array(ORDER_STATUS_SIGNED_FOR, REFUND_STATUS_SUCC)));
}

4
view/templates/include/admin_leftmenu.html

@ -31,7 +31,7 @@
<span class="icon-1 admin-select menu-left-icon-img menu-left-icon-img-15"></span>
发货提醒
<div class="admin-tip-order-nums" >
<span>99+</span>
<span>{$_wait_deliver_count}</span>
</div>
</a>
</dd>
@ -41,7 +41,7 @@
<span class="icon--6-2 admin-select menu-left-icon-img menu-left-icon-img-16"></span>
售后监控
<div class="admin-tip-order-nums" >
<span>99+</span>
<span>{$_after_sale_count}</span>
</div>
</a>
</dd>

Loading…
Cancel
Save