修复内容
This commit is contained in:
@@ -73,12 +73,19 @@
|
||||
height: 62px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
/* 退款状态标红样式 */
|
||||
.refund-status-row {
|
||||
background-color: #ffebee !important;
|
||||
/* 退款中状态绿色背景 */
|
||||
.refunding-row {
|
||||
background-color: #c8e6c9 !important;
|
||||
}
|
||||
.refund-status-row:hover {
|
||||
background-color: #ffcdd2 !important;
|
||||
.refunding-row:hover {
|
||||
background-color: #a5d6a7 !important;
|
||||
}
|
||||
/* 同意退款后淡绿色背景 */
|
||||
.order-status-4-row {
|
||||
background-color: #e8f5e9 !important;
|
||||
}
|
||||
.order-status-4-row:hover {
|
||||
background-color: #c8e6c9 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -206,6 +213,7 @@
|
||||
<li data-type="1">已支付</li>
|
||||
<li data-type="2">已退款</li>
|
||||
<li data-type="3">拒退款</li>
|
||||
<li data-type="66">已删除</li>
|
||||
</ul>
|
||||
|
||||
<div class="layui-tab-item layui-show">
|
||||
@@ -338,7 +346,11 @@
|
||||
<a class="layui-btn-primary layui-btn-sm" lay-event="channel" style="display: inline-block;">渠道</a>
|
||||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" lay-event="remarks">备注</a>
|
||||
<a class="layui-btn-primary layui-btn-sm" style="display: inline-block;" lay-event="allocation"> 分配</a>
|
||||
{{# if(d.del == 0){ }}
|
||||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" style="display: inline-block;background-color:#fd4634;color:#fff" lay-event="cancel">删除</a>
|
||||
{{# } else { }}
|
||||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" style="display: inline-block;background-color:#1E9FFF;color:#fff" lay-event="recover">恢复</a>
|
||||
{{# } }}
|
||||
{{# if(d.order_status == 1){ }}
|
||||
<a class="layui-btn-primary layui-btn-sm" style="display: inline-block;" lay-event="delivery">发货</a>
|
||||
{{# } }}
|
||||
@@ -637,19 +649,36 @@
|
||||
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
|
||||
// 如果 refund_status > 0,整行标红显示
|
||||
// 如果 order_status == 4(同意退款),整行淡绿色显示
|
||||
// 如果 refund_status > 0 但 order_status != 4(退款中),整行绿色显示
|
||||
if (res && res.data && res.data.length > 0) {
|
||||
res.data.forEach(function(item, index) {
|
||||
if (item.refund_status && parseInt(item.refund_status) > 0) {
|
||||
// 给主表格行添加红色背景
|
||||
var orderStatus = item.order_status ? parseInt(item.order_status) : 0;
|
||||
var refundStatus = item.refund_status ? parseInt(item.refund_status) : 0;
|
||||
|
||||
// 同意退款后,order_status == 4,显示淡绿色
|
||||
if (orderStatus == 4) {
|
||||
// 给主表格行添加淡绿色背景
|
||||
var $mainRow = $(".layui-table-main tbody tr").eq(index);
|
||||
$mainRow.addClass('refund-status-row');
|
||||
$mainRow.addClass('order-status-4-row');
|
||||
|
||||
// 给固定列的行也添加红色背景
|
||||
// 给固定列的行也添加淡绿色背景
|
||||
var $fixedLeftRow = $(".layui-table-fixed-l .layui-table-body tbody tr").eq(index);
|
||||
var $fixedRightRow = $(".layui-table-fixed-r .layui-table-body tbody tr").eq(index);
|
||||
$fixedLeftRow.addClass('refund-status-row');
|
||||
$fixedRightRow.addClass('refund-status-row');
|
||||
$fixedLeftRow.addClass('order-status-4-row');
|
||||
$fixedRightRow.addClass('order-status-4-row');
|
||||
}
|
||||
// 退款中,refund_status > 0 但 order_status != 4,显示绿色
|
||||
else if (refundStatus > 0) {
|
||||
// 给主表格行添加绿色背景
|
||||
var $mainRow = $(".layui-table-main tbody tr").eq(index);
|
||||
$mainRow.addClass('refunding-row');
|
||||
|
||||
// 给固定列的行也添加绿色背景
|
||||
var $fixedLeftRow = $(".layui-table-fixed-l .layui-table-body tbody tr").eq(index);
|
||||
var $fixedRightRow = $(".layui-table-fixed-r .layui-table-body tbody tr").eq(index);
|
||||
$fixedLeftRow.addClass('refunding-row');
|
||||
$fixedRightRow.addClass('refunding-row');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -835,7 +864,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//取消订单
|
||||
// 退款订单
|
||||
if(obj.event === 'cancelss'){
|
||||
layer.confirm('确认订单退款吗?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
@@ -860,7 +889,7 @@
|
||||
}
|
||||
|
||||
|
||||
//取消订单
|
||||
// 删除订单(逻辑删除,del 设置为 1)
|
||||
if(obj.event === 'cancel'){
|
||||
layer.confirm('确定删除订单的数据?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
@@ -882,6 +911,35 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 恢复订单(del 设置为 0)
|
||||
if(obj.event === 'recover'){
|
||||
layer.confirm('确定恢复该订单吗?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order/recover")}?id='+id
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
table.reload('order-lists');
|
||||
});
|
||||
} else {
|
||||
layui.layer.msg(res.msg || '恢复失败', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1500
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//商家备注
|
||||
if(obj.event === 'remarks') {
|
||||
like.ajax({
|
||||
|
||||
Reference in New Issue
Block a user