diff --git a/crmeb/app/adminapi/controller/v1/order/StoreOrderInvoice.php b/crmeb/app/adminapi/controller/v1/order/StoreOrderInvoice.php index 885ca417f..8a7b07b4f 100644 --- a/crmeb/app/adminapi/controller/v1/order/StoreOrderInvoice.php +++ b/crmeb/app/adminapi/controller/v1/order/StoreOrderInvoice.php @@ -45,6 +45,8 @@ class StoreOrderInvoice extends AuthController { $where = $this->request->getMore([ ['data', '', '', 'time'], + ['real_name', ''], + ['field_key', ''], [['type', 'd'], 0], ]); $data = $this->services->chart($where); diff --git a/crmeb/app/services/order/StoreOrderInvoiceServices.php b/crmeb/app/services/order/StoreOrderInvoiceServices.php index 3e76fc10a..475c6606d 100644 --- a/crmeb/app/services/order/StoreOrderInvoiceServices.php +++ b/crmeb/app/services/order/StoreOrderInvoiceServices.php @@ -36,21 +36,28 @@ class StoreOrderInvoiceServices extends BaseServices public function chart(array $where) { + $where['is_pay'] = 1; //全部 - $data['all'] = (string)$this->dao->count(['is_pay' => 1, 'time' => $where['time']]); + $data['all'] = (string)$this->dao->count($where); //待开 - $data['noOpened'] = (string)$this->dao->count(['is_pay' => 1, 'time' => $where['time'], 'type' => 1]); + $where['type'] = 1; + $data['noOpened'] = (string)$this->dao->count($where); //已开 - $data['opened'] = (string)$this->dao->count(['is_pay' => 1, 'time' => $where['time'], 'type' => 2]); + $where['type'] = 2; + $data['opened'] = (string)$this->dao->count($where); //退款 - $data['refund'] = (string)$this->dao->count(['is_pay' => 1, 'time' => $where['time'], 'type' => 3]); + $where['type'] = 3; + $data['refund'] = (string)$this->dao->count($where); return $data; } /** * 后台获取开票列表 - * @param $where + * @param array $where * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function getList(array $where) { diff --git a/template/admin/src/pages/order/invoice/index.vue b/template/admin/src/pages/order/invoice/index.vue index 85e490bee..e322afdab 100644 --- a/template/admin/src/pages/order/invoice/index.vue +++ b/template/admin/src/pages/order/invoice/index.vue @@ -151,7 +151,7 @@