assign([ 'year' => get_month(), 'real_name' => $this->request->get('real_name', ''), 'status' => $this->request->param('status', ''), 'orderCount' => StoreOrderModel::orderCount($this->adminInfo['store_id']), 'payTypeCount' => StoreOrderModel::payTypeCount($this->adminInfo['store_id']), ]); $this->assign('type', $this->adminInfo['type']); if ($this->adminInfo['type'] == 0) { $this->assign('store', SystemStore::where('is_show', 1)->where('is_del', 0)->field('id,name')->select()); } $this->assign('store_id', $this->adminInfo['store_id']); return $this->fetch(); } /** * 获取头部订单金额等信息 * return json */ public function getBadge() { $where = Util::postMore([ ['status', ''], ['real_name', ''], ['is_del', 0], ['data', ''], ['type', ''], ['pay_type', ''], ['order', ''], ]); $where['store_id'] = $this->adminInfo['store_id']; if ($this->request->post('store_id') > 0) $where['store_id'] = $this->request->post('store_id'); return Json::successful(StoreOrderModel::getBadge($where)); } }