From c2c2b3eb922167ad573605250ffbc94c630b169f Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 16 Aug 2023 17:39:43 +0800
Subject: [PATCH] 后台修改
---
src/main/resources/templates/febs/views/goods/orderList.html | 77 ++++++++++++++++++++++++++------------
1 files changed, 52 insertions(+), 25 deletions(-)
diff --git a/src/main/resources/templates/febs/views/goods/orderList.html b/src/main/resources/templates/febs/views/goods/orderList.html
index 2dc8975..5198ed8 100644
--- a/src/main/resources/templates/febs/views/goods/orderList.html
+++ b/src/main/resources/templates/febs/views/goods/orderList.html
@@ -72,32 +72,23 @@
</div>
</form>
<table lay-filter="orderTable" lay-data="{id: 'orderTable'}"></table>
- <style type="text/css">
- .layui-table-cell{
- text-align:center;
- height: auto;
- white-space: nowrap; /*文本不会换行,在同一行显示*/
- overflow: hidden; /*超出隐藏*/
- text-overflow: ellipsis; /*省略号显示*/
- }
- .layui-table img{
- max-width:100px
- }
- </style>
+<!-- <style type="text/css">-->
+<!-- .layui-table-cell{-->
+<!-- text-align:center;-->
+<!-- height: auto;-->
+<!-- white-space: nowrap; /*文本不会换行,在同一行显示*/-->
+<!-- overflow: hidden; /*超出隐藏*/-->
+<!-- text-overflow: ellipsis; /*省略号显示*/-->
+<!-- }-->
+<!-- .layui-table img{-->
+<!-- max-width:100px-->
+<!-- }-->
+<!-- </style>-->
</div>
</div>
</div>
</div>
</div>
-<!-- 表格操作栏 start -->
-<script type="text/html" id="mall-order-option">
- {{# if(d.status === 2) { }}
- <button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="orderMoneyFlow">资金流水</button>
- {{# } else if(d.status === 3) { }}
- <button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="delOrder">删除</button>
- {{# } else { }}
- {{# } }}
-</script>
<script type="text/html" id="user-option">
<span shiro:lacksPermission="user:view,user:update,user:delete">
<span class="layui-badge-dot febs-bg-orange"></span> 无权限
@@ -151,14 +142,25 @@
});
}
if (layEvent === 'orderMoneyFlow') {
- febs.modal.open( '订单流水', 'modules/goods/orderMoneyFlow/' + data.id, {
+ febs.modal.open( '订单流水', 'goodsView/orderMoneyFlow/' + data.id, {
maxmin: true,
+ });
+ }
+ if (layEvent === 'deliverGoods') {
+ febs.modal.open('发货', 'goodsView/deliverGoods/' + data.id, {
+ btn: ['确认', '取消'],
+ yes: function (index, layero) {
+ $('#deliver-update').find('#submit').trigger('click');
+ },
+ btn2: function () {
+ layer.closeAll();
+ }
});
}
});
function delOrder(id) {
- febs.get(ctx + 'admin/order/delOrder/' + id, null, function () {
+ febs.get(ctx + 'admin/goods/delOrder/' + id, null, function () {
febs.alert.success('操作成功');
$query.click();
});
@@ -202,12 +204,37 @@
return ''
}
}, minWidth: 80,align:'center'},
+ {field: 'deliverState', title: '发货状态',
+ templet: function (d) {
+ if (d.deliverState === 1) {
+ return '<span style="color:blue;">待发货</span>'
+ } else if (d.deliverState === 2) {
+ return '<span style="color:green;">已发货</span>'
+ }else if (d.deliverState === 3) {
+ return '<span style="color:red;">已收货</span>'
+ }else{
+ return ''
+ }
+ }, minWidth: 80,align:'center'},
{field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'},
{field: 'payMethod', title: '支付方式', minWidth: 120,align:'left'},
{field: 'payTime', title: '支付时间', minWidth: 200,align:'left'},
{field: 'payOrderNo', title: '支付订单号', minWidth: 200,align:'left'},
-
- {title: '操作', minWidth: 200 ,toolbar: '#mall-order-option',hide:mallOrderOption,align:'left', fixed:'right'},
+ {title: '操作',
+ templet: function (d) {
+ if (d.status === 2) {
+ if(d.deliverState === 1){
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="deliverGoods">发货</button>'
+ +'<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="orderMoneyFlow">资金流水</button>'
+ }else{
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="orderMoneyFlow">资金流水</button>'
+ }
+ }else if(d.status === 3){
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="delOrder">删除</button>'
+ }else{
+ return '<button class="layui-btn layui-btn-warm layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="delOrder">删除</button>'
+ }
+ },minWidth: 200,align:'center', fixed:'right'}
]]
});
}
--
Gitblit v1.9.1