Commit 53aaa2c7 by 孙龙

订单列表

parent 405e695c
......@@ -3,6 +3,8 @@
namespace App\Admin\Controllers;
use App\Admin\Actions\OrderAuditAction;
use App\Admin\Actions\OrderCancelAction;
use App\Admin\Actions\OrderReverseAuditAction;
use App\Models\Cms\CmsUser;
use App\Models\Order;
use Dcat\Admin\Form;
......@@ -10,12 +12,14 @@ use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Widgets\Dropdown;
class OrderController extends AdminController
{
protected $tian = ['甲', '乙', '丙', '丁', '戊', '己'];
/**
* Index interface.
*
......@@ -80,7 +84,6 @@ class OrderController extends AdminController
$grid->showFilter();
$grid->disableActions();
$grid->filter(function (Grid\Filter $filter) {
$filter->expand(true);
......@@ -106,14 +109,40 @@ class OrderController extends AdminController
$grid->tools([
new OrderAuditAction(),
new OrderReverseAuditAction(),
]);
$grid->setActionClass(Grid\Displayers\Actions::class);
$grid->actions(function (Grid\Displayers\Actions $actions) {
$actions->disableDelete();
$actions->disableEdit();
$actions->disableQuickEdit();
$actions->disableView();
// 当前行的数据数组
$rowArray = $actions->row->toArray();
// 获取当前行主键值
$id = $actions->getKey();
$actions->append(new OrderCancelAction());
// $actions->prepend('<a href="">取消</a>');
// $actions->prepend(
// Dropdown::make()
// ->button('下载') ->buttonClass('btn btn-primary') // 设置按钮样式
// ->options([
// 'PI',
// 'CI',
// ]));
});
});
}
/**
......
......@@ -6,17 +6,20 @@ return [
],
'fields' => [
'order_sn' => '订单编号号',
'status' => '订单状态',
'order_remark' => '订单备注',
'company_name' => '公司名称',
'order_type' => '订单类型1网站 2ERP 3JD 4开放平台',
'order_type' => '订单类型',
'order_source' => '订单来源',
'order_pay_type' => '订单付款方式:1-全款支付,2-预付款支付,3-账期支付,4-预收自定义,5-预收50%',
'order_pay_type' => '付款类型',
'user_id' => '用户ID',
'order_amount' => '订单金额',
'advance_amount' => '预付款金额,预付款时默认订单金额30%',
'currency' => '币种1CNY 2USD',
'create_time' => '订单创建时间',
'create_time' => '下单时间',
'update_time' => '更新时间',
'sale_id' => '业务员id',
'sale_name' => '业务员',
],
'options' => [
"status"=>[
......@@ -30,5 +33,12 @@ return [
"8"=>"待收货",
"10"=>" 交易成功",
],
"order_pay_type"=>[
"1"=>"全款支付",
"2"=>"预付款支付",
"3"=>"账期支付",
"4"=>"预收自定义",
"5"=>"预收50%",
],
],
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment