serving.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('用户头像管理')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <input id="uid" name="uid" th:value="${users.uid}" type="hidden">
  9. <div class="row">
  10. <div class="btn-group-sm" id="toolbar" role="group">
  11. <span style="color: red">卿卿号:</span><span id="erbanNo" th:text="${users.erbanNo}"></span>
  12. <span style="color: red">昵称:</span><span id="nick" th:text="${users.nick}"></span>
  13. </div>
  14. <div class="col-sm-12 select-table table-striped">
  15. <table id="bootstrap-table" data-mobile-responsive="false"></table>
  16. </div>
  17. </div>
  18. </div>
  19. <th:block th:include="include :: footer" />
  20. <script th:inline="javascript">
  21. var servingFlag = [[${@permission.hasPermi('report:trick:treat:serving:confirm')}]];
  22. var types = [[${@dict.getType('item_status')}]];
  23. var prefix = ctx + "report/trick/treat";
  24. $(function() {
  25. var options = {
  26. url: prefix + "/treatGiftList",
  27. modalName: "砸蛋礼物",
  28. height: $(window).height()-120,
  29. columns: [
  30. {
  31. field: 'giftName',
  32. title: '礼物名称',
  33. align : 'center'
  34. },
  35. {
  36. field: 'giftStatus',
  37. title: '礼物状态',
  38. align : 'center',
  39. formatter: function(value, row, index) {
  40. return $.table.selectDictLabel(types, value);
  41. }
  42. },
  43. {
  44. field: 'goldPrice',
  45. title: '礼物金币',
  46. align : 'center'
  47. },
  48. {
  49. title: '操作',
  50. align: 'center',
  51. formatter: function(value, row, index) {
  52. var actions = [];
  53. actions.push('<a class="btn btn-success btn-xs ' + servingFlag + '" href="javascript:void(0)" onclick="confirmSetting(\'' + row.giftId + '\',\'' + row.giftName + '\')"><i class="fa fa-gears"></i> 确认</a> ');
  54. return actions.join('');
  55. }
  56. }]
  57. };
  58. $.table.init(options);
  59. });
  60. /**
  61. * 确认
  62. */
  63. function confirmSetting(giftId,giftName){
  64. var erbanNo = $("#erbanNo").text();
  65. var uid = $("#uid").val();
  66. $.modal.confirm("确认要给卿卿号["+erbanNo+"]指定["+giftName+"]为砸蛋必中礼物吗?", function() {
  67. $.operate.post(prefix + "/serving?giftId=" + giftId + "&uid=" + uid);
  68. });
  69. }
  70. </script>
  71. </body>
  72. </html>