index.blade.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="page-header">
  7. <h3 class="page-title">
  8. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  9. <i class="mdi mdi-wrench"></i>
  10. </span>
  11. {{ __('auto.短信通道切换开关') }}
  12. </h3>
  13. <nav aria-label="breadcrumb">
  14. <ol class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="#">{{ __('auto.短信通道切换开关') }}</a></li>
  16. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.短信通道切换开关') }}</li>
  17. </ol>
  18. </nav>
  19. </div>
  20. <div class="row">
  21. <div class="col-lg-12 grid-margin stretch-card">
  22. <div class="card">
  23. <div class="card-body">
  24. <h4 class="card-title">{{ __('auto.短信通道切换开关') }}</h4>
  25. <table class="table table-bordered">
  26. <thead>
  27. <tr>
  28. <th>{{ __('auto.短信通道名称') }}</th>
  29. <th>{{ __('auto.最新操作人') }}</th>
  30. <th>{{ __('auto.日期') }}</th>
  31. <th>{{ __('auto.当前状态') }}</th>
  32. <th>{{ __('auto.备注') }}</th>
  33. <th>{{ __('auto.操作') }}</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. @foreach($list as $val)
  38. <tr>
  39. <td style="width: 15%">
  40. {{$val->Name}}
  41. </td>
  42. <td>{{$val->account}}</td>
  43. <td>{{$val->LastTime}}</td>
  44. <td style="width: 15%">
  45. @if ($val->Status == 1)
  46. {{ __('auto.已开启') }}
  47. <button class="btn btn-sm btn-gradient-dark"
  48. onclick="updateStatusFunc({{$val->ID}},2)">
  49. {{ __('auto.关闭') }}
  50. </button>
  51. @else
  52. {{ __('auto.已关闭') }}
  53. <button class="btn btn-sm btn-gradient-dark"
  54. onclick="updateStatusFunc({{$val->ID}},1)">
  55. {{ __('auto.开启') }}
  56. </button>
  57. @endif
  58. </td>
  59. <td contentEditable="true"
  60. onblur="remarks(this,{{$val->ID}})" style="vertical-align: top">{{$val->Remarks}}</td>
  61. <td>
  62. <button class="btn-sm btn-gradient-dark" onclick="updateFunc({{$val->ID}})">{{ __('auto.修改') }}</button>
  63. </td>
  64. </tr>
  65. @endforeach
  66. </tbody>
  67. </table>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <script>
  75. function updateStatusFunc(id, statusVal) {
  76. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  77. myRequest('/admin/sys_sms_config/update_status/'+id, 'post', {statusVal}, function (response) {
  78. layer.msg(response.msg)
  79. setTimeout(function () {
  80. window.location.reload();
  81. }, 1500)
  82. })
  83. })
  84. }
  85. function remarks(obj,id) {
  86. remark = $(obj).html();
  87. myRequest("/admin/sys_sms_config/remarks/" + id, "post", {remark}, function (res) {
  88. layer.msg(res.msg)
  89. setTimeout(function () {
  90. window.location.reload();
  91. }, 1500)
  92. });
  93. }
  94. function updateFunc(id) {
  95. var page = layer.open({
  96. type: 2,
  97. title: '{{ __('auto.修改') }}',
  98. shadeClose: true,
  99. shade: 0.8,
  100. area: ['60%', '70%'],
  101. content: '/admin/sys_sms_config/update/' + id
  102. });
  103. }
  104. </script>
  105. @endsection