dlh_test_server/app/admin/controller/finance/Income.php
2024-10-31 17:21:21 +08:00

83 lines
2.2 KiB
PHP

<?php
namespace app\admin\controller\finance;
use app\admin\logic\order\OrderLogic;
use app\common\basics\AdminBase;
use app\common\enum\PayEnum;
use app\common\model\Client_;
use app\common\model\order\Order as OrderModel;
use app\common\server\JsonServer;
use app\admin\logic\finance\IncomeLogic;
class Income extends AdminBase
{
/**
* @notes 订单列表
* @return \think\response\Json|\think\response\View
* @author Yaozt
* @date 2021/7/13 7:07 下午
*/
public function OrderLists()
{
if ($this->request->isAjax()) {
$get = $this->request->get();
return JsonServer::success('', IncomeLogic::Orderlists($get));
}
$data = IncomeLogic::Orderlists();
// 订单状态
$order_status = OrderModel::getOrderStatus(true);
$order_status = IncomeLogic::getStat($order_status); //拼装数量统计
// 订单类型
$order_type = OrderModel::getOrderType(true);
// 订单来源
$order_source = Client_::getClient(true);
// 支付方式
$pay_way = PayEnum::getPayWay(true);
// 配送方式
$delivery_type = OrderModel::getDeliveryType(true);
$all = IncomeLogic::getAll();
return view('', [
'all' => $all,
'statistics' => $data,
'order_status' => $order_status,
'order_type' => $order_type,
'order_source' => $order_source,
'pay_way' => $pay_way,
'delivery_type' => $delivery_type
]);
}
public function LocalOrderLists(){
if ($this->request->isAjax()) {
$get = $this->request->get();
return JsonServer::success('', IncomeLogic::LocalOrderLists($get));
}
$all = IncomeLogic::getAll();
return view('',[
'all' => $all,
]);
}
public function RechargeOrderLists(){
if ($this->request->isAjax()) {
$get = $this->request->get();
return JsonServer::success('', IncomeLogic::RechargeOrderLists($get));
}
$all = IncomeLogic::getAll();
return view('',[
'all' => $all,
]);
}
}