control_config_info_update.blade.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. <form class="forms-sample" id="form">
  12. <div class="form-group">
  13. <h4>{{ __('auto.认定新手税收参数') }}</h4>
  14. <input type="text" class="form-control required" name="NewManFee"
  15. placeholder="{{ __('auto.认定新手税收参数') }}" value="{{ $info->NewManFee }}">
  16. </div>
  17. <div class="form-group">
  18. <h4>{{ __('auto.新手计算参数') }}</h4>
  19. <input type="text" class="form-control required" name="NewManParam"
  20. placeholder="{{ __('auto.新手计算参数') }}" value="{{ $info->NewManParam }}">
  21. </div>
  22. <div class="form-group">
  23. <h4>{{ __('auto.初始赠送金币数参数') }}</h4>
  24. <input type="text" class="form-control required" name="GrountGold"
  25. placeholder="{{ __('auto.初始赠送金币数参数') }}" value="{{ $info->GrountGold }}">
  26. </div>
  27. <div class="form-group">
  28. <h4>{{ __('auto.新手赠送增量上限参数') }}</h4>
  29. <input type="text" class="form-control required" name="GrountGoldMax"
  30. placeholder="{{ __('auto.新手赠送增量上限参数') }}" value="{{ $info->GrountGoldMax }}">
  31. </div>
  32. <div class="form-group">
  33. <h4>{{ __('auto.等份值') }}</h4>
  34. <input type="text" class="form-control required" name="ControlParam"
  35. placeholder="{{ __('auto.等份值') }}" value="{{ $info->ControlParam }}">
  36. </div>
  37. <div class="form-group">
  38. <h4>{{ __('auto.充值下限') }}</h4>
  39. <input type="text" class="form-control required" name="RechargeMin"
  40. placeholder="{{ __('auto.充值下限') }}" value="{{ $info->RechargeMin }}">
  41. </div>
  42. <div class="form-group">
  43. <h4>{{ __('auto.充值上限') }}</h4>
  44. <input type="text" class="form-control required" name="RechargeMax"
  45. placeholder="{{ __('auto.充值上限') }}" value="{{ $info->RechargeMax }}">
  46. </div>
  47. <div class="form-group">
  48. <h4>{{ __('auto.用户控制上限参数百分比') }}</h4>
  49. <input type="text" class="form-control required" name="UserControlWin"
  50. placeholder="{{ __('auto.用户控制上限参数百分比') }}" value="{{ $info->UserControlWin }}">
  51. </div>
  52. <div class="form-group">
  53. <h4>{{ __('auto.用户控制下限参数百分比') }}</h4>
  54. <input type="text" class="form-control required" name="UserControlLost"
  55. placeholder="{{ __('auto.用户控制下限参数百分比') }}" value="{{ $info->UserControlLost }}">
  56. </div>
  57. <div class="form-group">
  58. <h4>{{ __('auto.咖啡基准系数参数百分比') }}</h4>
  59. <input type="text" class="form-control required" name="PayCalPercent"
  60. placeholder="{{ __('auto.咖啡基准系数参数百分比') }}" value="{{ $info->PayCalPercent }}">
  61. </div>
  62. <div class="form-group">
  63. <h4>{{ __('auto.茶叶基准系数参数百分比') }}</h4>
  64. <input type="text" class="form-control required" name="DrawCalPercent"
  65. placeholder="{{ __('auto.茶叶基准系数参数百分比') }}" value="{{ $info->DrawCalPercent }}">
  66. </div>
  67. <div>
  68. <label for="Status">{{ __('auto.是否生效') }}</label>
  69. <input type="radio" id="Status" name="Status" value="1" @if ($info->Status == 1)
  70. checked
  71. @endif>{{ __('auto.生效') }}
  72. <input type="radio" id="Status" name="Status" value="0" @if ($info->Status == 0)
  73. checked
  74. @endif>{{ __('auto.无效') }}
  75. </div>
  76. <button type="button" onclick="commit({{ $info->ID }})"
  77. class="btn btn-sm btn-gradient-primary btn-icon-text">
  78. <i class="mdi mdi-file-check btn-icon-prepend"></i>
  79. {{ __('auto.提交') }}
  80. </button>
  81. <button type="button" onclick="cancel()"
  82. class="btn btn-sm btn-gradient-warning btn-icon-text">
  83. <i class="mdi mdi-reload btn-icon-prepend"></i>
  84. {{ __('auto.取消') }}
  85. </button>
  86. </form>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <script>
  94. function commit(ID) {
  95. if (!checkForm()) {
  96. return false;
  97. }
  98. var data = $("#form").serializeObject();
  99. for (var i in data) {
  100. if (parseInt(data[i]) < 0) {
  101. layer.msg('{{ __('auto.配置不能小于') }}O')
  102. return false;
  103. }
  104. }
  105. myRequest("/admin/Control/control_config_info_update/"+ID, "post", data, function (res) {
  106. layer.msg(res.msg)
  107. if (res.code == '200') {
  108. setTimeout(function () {
  109. parent.location.reload();
  110. }, 1500)
  111. }
  112. });
  113. }
  114. function cancel() {
  115. parent.location.reload();
  116. }
  117. </script>
  118. @endsection