cashier_channel_update.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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">修改提现渠道</h4>
  11. <form class="forms-sample" id="form">
  12. <div class="form-group">
  13. <label>* 渠道名称(name)</label>
  14. <input type="text" class="form-control required" name="name"
  15. value="{{ $info->name }}"
  16. placeholder="请输入渠道名称">
  17. </div>
  18. <div class="form-group">
  19. <label>配置键名(config_key)</label>
  20. <input type="text" class="form-control" name="config_key"
  21. value="{{ $info->config_key }}"
  22. placeholder="可选,留空将使用渠道名称">
  23. </div>
  24. <div class="form-group">
  25. <label>* 渠道值(config_value)</label>
  26. <input type="text" class="form-control required" name="config_value"
  27. value="{{ $info->config_value }}"
  28. placeholder="请输入渠道值">
  29. <small class="form-text text-muted">用于程序中识别渠道的唯一值</small>
  30. </div>
  31. <div class="form-group">
  32. <label>权重比例(sort) (%)</label>
  33. <input type="number" class="form-control" name="sort"
  34. value="{{ $info->sort }}" min="0" max="100">
  35. <small class="form-text text-muted">可在列表页统一配置所有渠道权重</small>
  36. </div>
  37. <div class="form-group">
  38. <label>备注(remarks)</label>
  39. <textarea class="form-control" name="remarks" rows="3"
  40. placeholder="可选填写备注信息">{{ $info->remarks }}</textarea>
  41. </div>
  42. <div class="form-group">
  43. <label><h4>状态设置(status)</h4></label> <br>
  44. <label>
  45. <input type="radio" name="status" value="1"
  46. @if($info->status == 1) checked @endif>
  47. 开启
  48. </label>
  49. <label style="margin-left: 20px;">
  50. <input type="radio" name="status" value="-1"
  51. @if($info->status == -1) checked @endif>
  52. 关闭
  53. </label>
  54. </div>
  55. <div class="alert alert-warning" role="alert">
  56. <i class="mdi mdi-alert"></i>
  57. <strong>注意:</strong>
  58. 修改渠道值可能会影响正在使用该渠道的提现订单,请谨慎操作
  59. </div>
  60. <button type="button" onclick="commit({{ $info->id }})"
  61. class="btn btn-gradient-primary btn-icon-text">
  62. <i class="mdi mdi-file-check btn-icon-prepend"></i>
  63. 提交
  64. </button>
  65. <button type="button" onclick="cancel()"
  66. class="btn btn-gradient-warning btn-icon-text">
  67. <i class="mdi mdi-reload btn-icon-prepend"></i>
  68. 取消
  69. </button>
  70. </form>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <script>
  78. function commit(id) {
  79. if (!checkForm()) {
  80. return false;
  81. }
  82. var data = $("#form").serializeObject();
  83. myRequest("/admin/withdrawal/cashier_channel_update/" + id, "post", data, function (res) {
  84. layer.msg(res.msg);
  85. setTimeout(function () {
  86. window.parent.location.reload();
  87. }, 1500);
  88. });
  89. }
  90. function cancel() {
  91. var index = parent.layer.getFrameIndex(window.name);
  92. parent.layer.close(index);
  93. }
  94. </script>
  95. @endsection