From 19cb3bd3a69c38c6bf96a43df7687f05f40e8e5e Mon Sep 17 00:00:00 2001 From: liuyu <33367671@qq.com> Date: Wed, 3 Aug 2022 16:31:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=AF=BC=E8=88=AA=E6=95=B0?= =?UTF-8?q?=E9=87=8F=20=E5=BE=85=E5=8F=91=E8=B4=A7=E5=82=AC=E5=8D=95?= =?UTF-8?q?=E4=BC=98=E5=85=88=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- control/index.php | 2 +- index.php | 9 +++++++++ model/mOrder.php | 9 +++++++++ view/templates/include/admin_leftmenu.html | 4 ++-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/control/index.php b/control/index.php index 7d31a98..240a86c 100644 --- a/control/index.php +++ b/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( diff --git a/index.php b/index.php index d945bce..d3df71e 100644 --- a/index.php +++ b/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() { diff --git a/model/mOrder.php b/model/mOrder.php index a78439b..e74a0a0 100644 --- a/model/mOrder.php +++ b/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))); } diff --git a/view/templates/include/admin_leftmenu.html b/view/templates/include/admin_leftmenu.html index 7a1247c..702e5ae 100644 --- a/view/templates/include/admin_leftmenu.html +++ b/view/templates/include/admin_leftmenu.html @@ -31,7 +31,7 @@ 发货提醒
- 99+ + {$_wait_deliver_count}
@@ -41,7 +41,7 @@ 售后监控
- 99+ + {$_after_sale_count}