diff --git a/app/admin/controller/purchase_order/PurchaseOrderController.php b/app/admin/controller/purchase_order/PurchaseOrderController.php new file mode 100644 index 000000000..0555831d2 --- /dev/null +++ b/app/admin/controller/purchase_order/PurchaseOrderController.php @@ -0,0 +1,13 @@ +dataLists(new PurchaseOrderLists()); + } + +} \ No newline at end of file diff --git a/app/admin/lists/purchase_order/PurchaseOrderLists.php b/app/admin/lists/purchase_order/PurchaseOrderLists.php new file mode 100644 index 000000000..29fe0f1d9 --- /dev/null +++ b/app/admin/lists/purchase_order/PurchaseOrderLists.php @@ -0,0 +1,62 @@ + ['store_id', 'order_id'], + ]; + } + + + /** + * @notes 获取采购订单列表 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author admin + * @date 2024/05/31 17:09 + */ + public function lists(): array + { + return PurchaseOrder::where($this->searchWhere) + ->limit($this->limitOffset, $this->limitLength) + ->order(['id' => 'desc']) + ->select(); + } + + + /** + * @notes 获取采购订单数量 + * @return int + * @author admin + * @date 2024/05/31 17:09 + */ + public function count(): int + { + return PurchaseOrder::where($this->searchWhere)->count(); + } + +} \ No newline at end of file diff --git a/app/common/model/purchase_order/PurchaseOrder.php b/app/common/model/purchase_order/PurchaseOrder.php new file mode 100644 index 000000000..10cada22f --- /dev/null +++ b/app/common/model/purchase_order/PurchaseOrder.php @@ -0,0 +1,22 @@ +