From f33cfa821ddf55b8a2832d7984338ff17b5d25d3 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sun, 8 Sep 2024 12:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E8=90=A5=E5=BA=97=E9=93=BA=E6=89=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=BB=93=E8=B4=A6=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/shop/controller/order/Order.php | 3 ++- app/shop/logic/LoginLogic.php | 2 +- app/shop/view/order/order/lists.html | 30 +++++++++++++++++++++++----- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/app/shop/controller/order/Order.php b/app/shop/controller/order/Order.php index c4705e5f..02cc65ea 100755 --- a/app/shop/controller/order/Order.php +++ b/app/shop/controller/order/Order.php @@ -71,7 +71,8 @@ class Order extends ShopBase 'order_type' => $order_type, 'order_source' => $order_source, 'pay_way' => $pay_way, - 'delivery_type' => $delivery_type + 'delivery_type' => $delivery_type, + 'shop_type' => session('shop_info')['type'] ?? 2 ]); } diff --git a/app/shop/logic/LoginLogic.php b/app/shop/logic/LoginLogic.php index f7669b79..a06a86c6 100755 --- a/app/shop/logic/LoginLogic.php +++ b/app/shop/logic/LoginLogic.php @@ -45,7 +45,7 @@ class LoginLogic extends Logic $adminModel = new ShopAdmin(); $admin_info = $adminModel->alias('a') ->join('shop s', 's.id = a.shop_id') - ->field(['a.id', 'a.account', 'a.name', 'role_id', 'shop_id', 's.name' => 'shop_name']) + ->field(['a.id', 'a.account', 'a.name', 'role_id', 'shop_id', 's.name' => 'shop_name', 's.type']) ->where(['a.account' => $post['account'], 'a.del' => 0]) ->findOrEmpty()->toArray(); diff --git a/app/shop/view/order/order/lists.html b/app/shop/view/order/order/lists.html index 02e598c5..bbf28896 100755 --- a/app/shop/view/order/order/lists.html +++ b/app/shop/view/order/order/lists.html @@ -240,8 +240,10 @@ lay-event="allow">允许售后 {{# } }} + {if condition="$shop_type eq 1"} 结账 + {/if} @@ -452,10 +454,9 @@ }); function getList(type) { - table.render({ - elem: '#order-lists' - , url: '{:url("order.order/lists")}?type=' + type - , cols: [[ + var shop_type = '{$shop_type}' + if (shop_type == 1) { + var cols = [ {field: 'id', title: 'id', width: 60, align: 'center'} , {field: 'order', title: '订单信息', align: 'center', templet: '#order', width: 230} , {field: 'user', title: '会员信息', templet: '#user', width: 300} @@ -467,7 +468,26 @@ , {field: 'pay_status_text', title: '支付状态', align: 'center', width: 100} , {field: 'order_status_text', title: '订单状态', align: 'center', width: 100} , {fixed: 'right', title: '操作', width: 300, align: 'center', toolbar: '#order-operation'} - ]] + ] + } else { + var cols = [ + {field: 'id', title: 'id', width: 60, align: 'center'} + , {field: 'order', title: '订单信息', align: 'center', templet: '#order', width: 230} + , {field: 'user', title: '会员信息', templet: '#user', width: 300} + , {field: 'order_goods', title: '商品信息', align: 'center', templet: '#goods', width: 300} + , {field: 'total_num', title: '商品数量', align: 'center', templet: '#goods_num', width: 70} + , {field: 'total_amount', title: '订单金额', align: 'center', templet: '#amount', width: 150} + , {field: 'delivery', title: '收货信息', align: 'center', templet: '#delivery', width: 200} + , {field: 'pay_status_text', title: '支付状态', align: 'center', width: 100} + , {field: 'order_status_text', title: '订单状态', align: 'center', width: 100} + , {fixed: 'right', title: '操作', width: 300, align: 'center', toolbar: '#order-operation'} + ] + } + console.log(cols) + table.render({ + elem: '#order-lists' + , url: '{:url("order.order/lists")}?type=' + type + , cols: [cols] , page: true , text: {none: '暂无数据!'} , response: {