user_update.blade.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="row">
  7. <div class="col-12 grid-margin stretch-card">
  8. <div class="card">
  9. <div class="card-body">
  10. <h4 class="card-title">{{ __('auto.请修改配置信息') }}</h4>
  11. {{--<p class="card-description">--}}
  12. {{--Basic form elements--}}
  13. {{--</p>--}}
  14. <form class="forms-sample" id="form">
  15. <div class="form-group">
  16. <label for="exampleInputName1">{{ __('auto.会员') }}ID</label>
  17. <input type="text" value="{{$list->ai_GameID}}" class="form-control required" name="UserID" disabled>
  18. <input type="hidden" value="{{$list->UserID}}" class="form-control required" id="UserID" name="UserID" >
  19. </div>
  20. <div class="form-group">
  21. <label for="exampleInputName1">{{ __('auto.账户状态') }}</label>
  22. <input type="text" class="form-control required" value="@if($list->Nullity==0) {{ __('auto.正常') }} @else {{ __('auto.封号中') }} @endif" disabled>
  23. <br>
  24. <label for="Nullity">{{ __('auto.选择用户状态修改') }}</label>
  25. <select class="custom-select" name="Nullity" value="Nullity" id="Nullity">
  26. <option value="">{{ __('auto.选择类别') }}</option>
  27. <option value="0" @if($list->Nullity==0) selected @endif>{{ __('auto.正常') }}</option>
  28. <option value="1" @if($list->Nullity==1) selected @endif>{{ __('auto.封号') }}</option>
  29. </select>
  30. </div>
  31. <div class="form-group">
  32. <label >{{ __('auto.游戏昵称') }}</label>
  33. <input type="text" class="form-control required" value="{{$list->NickName}}" name="NickName" disabled>
  34. </div>
  35. {{-- <div class="form-group">--}}
  36. {{-- <label >{{ __('auto.姓名') }}</label>--}}
  37. {{-- <input type="text" class="form-control" id="Compellation" value="{{$list->Compellation}}" name="Compellation" disabled>--}}
  38. {{-- <a href="#" id="1" class="xgname" onclick="xgname(this)">{{ __('auto.确定修改姓名') }}</a>--}}
  39. {{-- </div>--}}
  40. <div class="form-group">
  41. <label >{{ __('auto.上级') }}ID</label>
  42. @empty($list->SpreaderID)
  43. <input type="text" class="form-control" id="SpreaderID" value="" name="SpreaderID" disabled>
  44. <a href="#" id="1" style="float: left;width: 16%" class="xgsj" onclick="xgsj(this)" >{{ __('auto.确定修改上级') }}</a>
  45. {{-- <button type="button" class="btn btn-default btn-lg" active disabled="disabled">{{ __('auto.确定修改上级') }}</button>--}}
  46. @else
  47. <input type="text" class="form-control" id="SpreaderID" value="{{$list->GameID}}" name="SpreaderID" disabled >
  48. {{-- <button style="float: left;width: 16%" class="xgsj" disabled>{{ __('auto.确定修改上级') }}</button>--}}
  49. @endempty
  50. </div>
  51. <div class="form-group">
  52. <label for="Nullity">{{ __('auto.选择修改为官方账号') }} <span style="color: red">*(备注:改为官方账号后无法再改回普通账号)</span></label>
  53. <select class="custom-select" name="official" value="official" id="official">
  54. @if (!empty($IDWhiteUser))
  55. <option value="1" @if (!empty($IDWhiteUser))
  56. selected @endif>{{ __('auto.官方账号') }}</option>
  57. @else
  58. <option value="">{{ __('auto.选择类别') }}</option>
  59. <option value="1" @if (!empty($IDWhiteUser))
  60. selected @endif>{{ __('auto.官方账号') }}</option>
  61. <option value="0" @if (empty($IDWhiteUser))
  62. selected @endif>{{ __('auto.普通账号') }}</option>
  63. @endif
  64. </select>
  65. </div>
  66. <br><br>
  67. <button type="button" onclick="commit()" class="btn btn-sm btn-gradient-primary btn-icon-text">
  68. <i class="mdi mdi-file-check btn-icon-prepend"></i>
  69. {{ __('auto.提交') }}
  70. </button>
  71. <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text">
  72. <i class="mdi mdi-reload btn-icon-prepend"></i>
  73. {{ __('auto.取消') }}
  74. </button>
  75. </form>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <script>
  83. function commit(id){
  84. if(!checkForm()){
  85. return false;
  86. }
  87. var UserID=$('#UserID').val();
  88. var xg=$(".xgname").attr("id")
  89. var sj=$('.xgsj').attr('id');
  90. if(xg==1 && sj==1){
  91. alert('{{ __('auto.请确定修改按钮') }}');
  92. return false;
  93. }
  94. // var Compellation=$("#Compellation").val();
  95. var Nullity=$("#Nullity").val();
  96. var SpreaderID="";
  97. var official = $('#official').val();
  98. // if(xg==2){
  99. // var Compellation=$('#Compellation').val();
  100. // }
  101. if(sj==2){
  102. var SpreaderID=$('#SpreaderID').val();
  103. }
  104. // var data = $("#form").serializeObject();
  105. myRequest("/admin/global/user_update","post", {UserID,SpreaderID,Nullity,official},function(res){
  106. layer.msg(res.msg)
  107. setTimeout(function(){
  108. parent.location.reload();
  109. },1500)
  110. });
  111. }
  112. function cancel() {
  113. parent.location.reload();
  114. }
  115. function xgname(obj) {
  116. // obj.removeAttribute("id");
  117. // obj.setAttribute('id','2');
  118. $("#Compellation").removeAttr("disabled")
  119. }
  120. function xgsj(obj) {
  121. obj.removeAttribute("id");
  122. obj.setAttribute('id','2');
  123. $("#SpreaderID").removeAttr("disabled")
  124. // let val = $("#SpreaderID").val();
  125. // if (val != ""){
  126. //
  127. // }
  128. }
  129. </script>
  130. @endsection