';
slotHtml += '
玩法类型:' + (reservation.game_type || '无') + '
';
@@ -255,13 +256,90 @@
return '
' + refundText + '';
}
},
- { field: 'remarks', title: '备注', minWidth: 150 }
+ { field: 'remarks', title: '备注', minWidth: 120 },
+ {
+ field: 'operation',
+ title: '操作',
+ width: 140,
+ fixed: 'right',
+ templet: function (d) {
+ if (d.status === 1) {
+ return '
已退出';
+ }
+ var btnText = d.role === 1 ? '请出(解散组局)' : '请出组局';
+ var btnClass = d.role === 1 ? 'layui-btn-danger' : 'layui-btn-warm';
+ return '
';
+ }
+ }
]]
});
});
}
}
}
+ // 绑定解散预约按钮事件
+ $(document).off('click', '.btn-dissolve-reservation').on('click', '.btn-dissolve-reservation', function () {
+ var reservationId = $(this).data('id');
+ var reservationTitle = $(this).data('title');
+
+ layer.confirm('确定要解散组局【' + reservationTitle + '】吗?
所有已支付押金的参与者将发起退款。', {
+ title: '解散预约确认',
+ btn: ['确定解散', '取消'],
+ icon: 3
+ }, function (index) {
+ layer.close(index);
+ var loadIndex = layer.load(2);
+ coreHelper.Post("Api/SQReservations/DissolveReservation", { id: reservationId }, function (res) {
+ layer.close(loadIndex);
+ if (res.code === 0) {
+ layer.msg('解散成功', { icon: 1 });
+ // 关闭弹窗并刷新对应日期
+ layer.closeAll('page');
+ if (typeof window._refreshSingleDay === 'function') {
+ window._refreshSingleDay(dateStr);
+ }
+ } else {
+ layer.msg(res.msg || '解散失败', { icon: 2 });
+ }
+ });
+ });
+ });
+
+ // 绑定请出参与者按钮事件
+ $(document).off('click', '.btn-kick-participant').on('click', '.btn-kick-participant', function () {
+ var participantId = $(this).data('id');
+ var role = $(this).data('role');
+ var userName = $(this).data('name');
+
+ var confirmMsg = '';
+ if (role === 1) {
+ confirmMsg = '该用户【' + userName + '】是
发起者,请出将
解散整个组局,确定继续吗?';
+ } else {
+ confirmMsg = '确定要将用户【' + userName + '】请出组局吗?
如已支付押金将发起退款。';
+ }
+
+ layer.confirm(confirmMsg, {
+ title: '请出组局确认',
+ btn: ['确定请出', '取消'],
+ icon: 3
+ }, function (index) {
+ layer.close(index);
+ var loadIndex = layer.load(2);
+ coreHelper.Post("Api/SQReservations/KickParticipant", { id: participantId }, function (res) {
+ layer.close(loadIndex);
+ if (res.code === 0) {
+ layer.msg(res.msg || '操作成功', { icon: 1 });
+ // 关闭弹窗并刷新对应日期
+ layer.closeAll('page');
+ if (typeof window._refreshSingleDay === 'function') {
+ window._refreshSingleDay(dateStr);
+ }
+ } else {
+ layer.msg(res.msg || '操作失败', { icon: 2 });
+ }
+ });
+ });
+ });
} else {
layer.msg(e.msg || '获取数据失败');
}
diff --git a/server/CoreCms.Net.Web.Admin/wwwroot/views/sq/sqroompricing/holiday-price.html b/server/CoreCms.Net.Web.Admin/wwwroot/views/sq/sqroompricing/holiday-price.html
index 829e2ba..a231636 100644
--- a/server/CoreCms.Net.Web.Admin/wwwroot/views/sq/sqroompricing/holiday-price.html
+++ b/server/CoreCms.Net.Web.Admin/wwwroot/views/sq/sqroompricing/holiday-price.html
@@ -21,106 +21,81 @@
-
-