其余文件
This commit is contained in:
89
app/admin/controller/order/Invoice.php
Normal file
89
app/admin/controller/order/Invoice.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\admin\controller\order;
|
||||
|
||||
use app\common\basics\AdminBase;
|
||||
use app\common\model\order\Order;
|
||||
use app\common\server\JsonServer;
|
||||
use app\admin\logic\order\InvoiceLogic;
|
||||
|
||||
|
||||
/**
|
||||
* 发票管理
|
||||
* Class Invoice
|
||||
* @package app\shop\controller\order
|
||||
*/
|
||||
class Invoice extends AdminBase
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 发票列表
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @author 段誉
|
||||
* @date 2022/4/12 17:34
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
return JsonServer::success('', InvoiceLogic::getInvoiceLists($get));
|
||||
}
|
||||
return view('', [
|
||||
'order_status' => order::getOrderStatus(true)
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 开票
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @author 段誉
|
||||
* @date 2022/4/12 19:00
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id/d');
|
||||
return view('detail', [
|
||||
'detail' => InvoiceLogic::detail($id)
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function export()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = InvoiceLogic::getInvoiceLists($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(InvoiceLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
}
|
||||
130
app/admin/controller/order/Order.php
Normal file
130
app/admin/controller/order/Order.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\admin\controller\order;
|
||||
|
||||
use app\common\basics\AdminBase;
|
||||
use app\common\model\order\order as OrderModel;
|
||||
use app\common\server\JsonServer;
|
||||
use app\admin\logic\order\OrderLogic;
|
||||
use app\common\model\Client_;
|
||||
use app\common\enum\PayEnum;
|
||||
use app\common\model\order\OrderLog;
|
||||
|
||||
|
||||
/**
|
||||
* Class order
|
||||
* @package app\admin\controller\order
|
||||
*/
|
||||
class Order extends AdminBase
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 订单列表
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:07 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$data = OrderLogic::statistics(input());
|
||||
|
||||
// 订单状态
|
||||
$order_status = OrderModel::getOrderStatus();
|
||||
// 拼装数量统计
|
||||
$order_status = OrderLogic::getStat($order_status);
|
||||
$all = OrderLogic::getAll();
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$data['statistics'] = [
|
||||
'all' => $all,
|
||||
'order_status' => $order_status,
|
||||
];
|
||||
return JsonServer::success('', $data);
|
||||
}
|
||||
|
||||
return view('', [
|
||||
'all' => $all,
|
||||
'statistics' => $data,
|
||||
'order_status' => $order_status,
|
||||
'order_type' => OrderModel::getOrderType(true),
|
||||
'order_source' => Client_::getClient(),
|
||||
'pay_way' => PayEnum::getPayWay(),
|
||||
'delivery_type' => OrderModel::getDeliveryType(true),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 订单详情
|
||||
* @return \think\response\View
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:07 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
|
||||
$id = $this->request->get('id');
|
||||
$detail = OrderLogic::getDetail($id);
|
||||
$order_log = OrderLog::getOrderLog($id);
|
||||
return view('', [
|
||||
'detail' => $detail,
|
||||
'logs' => $order_log
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 物流信息
|
||||
* @return \think\response\View
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:07 下午
|
||||
*/
|
||||
public function express()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$detail = OrderLogic::getDetail($id);
|
||||
$detail['shipping'] = OrderLogic::shippingInfo($detail['id']);
|
||||
return view('', [
|
||||
'detail' => $detail
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function export()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = OrderLogic::statistics($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(OrderLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user