自营店铺才显示结账状态
This commit is contained in:
parent
d86e0be316
commit
f33cfa821d
@ -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
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -240,8 +240,10 @@
|
||||
lay-event="allow">允许售后</a>
|
||||
{{# } }}
|
||||
|
||||
{if condition="$shop_type eq 1"}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm operation-btn"
|
||||
lay-event="end-bills">结账</a>
|
||||
{/if}
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@ -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: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user