apply.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. @extends('layouts.base')
  2. @section('content')
  3. @section('title', trans('基础设置'))
  4. <script type="text/javascript">
  5. window.optionchanged = false;
  6. require(['bootstrap'], function () {
  7. $('#myTab a').click(function (e) {
  8. e.preventDefault();
  9. $(this).tab('show');
  10. })
  11. });
  12. </script>
  13. <div class="w1200 m0a">
  14. <div class="rightlist">
  15. <!-- 新增加右侧顶部三级菜单 -->
  16. @include('layouts.tabs')
  17. <section>
  18. <form id="setform" action="" method="post" class="form-horizontal form">
  19. <div class="panel panel-default">
  20. <div class="panel-body">
  21. <div class="form-group">
  22. <label class="col-xs-12 col-sm-3 col-md-2 control-label">成为主播方式</label>
  23. <div class="col-sm-9 col-xs-12">
  24. <label class="checkbox-inline">
  25. <input type="radio" name="setdata[apply_condition]" value="0" @if ($set['apply_condition'] == 0) checked @endif />申请
  26. </label>
  27. <label class="checkbox-inline">
  28. <input type="radio" name="setdata[apply_condition]" value="1" @if ($set['apply_condition'] == 1) checked @endif />购买指定商品
  29. </label>
  30. <div id="apply_goods" @if($set['apply_condition'] != 1) style="display: none" @endif>
  31. <div class="input-group" >
  32. <input type='text' style="width: 640px" class='form-control' id="many_good" value="@if(!empty($upgrade_data['many_good']))@foreach($upgrade_data['many_good'] as $good){{$good['title']}};@endforeach
  33. @endif" readonly />
  34. <div class="input-group">
  35. <button type="button" onclick="$('#modal-goods').modal()" class="btn btn-default" >选择商品</button>
  36. </div>
  37. </div>
  38. <span class="help-block">可指定多件商品,只需购买其中一件就可以申请主播</span>
  39. <div class="input-group multi-img-details" id='goods_id'>
  40. @foreach ($set['many_good'] as $good)
  41. <div class="multi-item saler-item" style="height: 220px" openid="{{ $good['id'] }}">
  42. <img class="img-responsive img-thumbnail" src='{{ tomedia($good['thumb']) }}'
  43. onerror="this.src='{{static_url('resource/images/nopic.jpg')}}'; this.title='图片未找到.'">
  44. <div class='img-nickname' style="max-height: 58px;overflow: hidden">{{ $good['title'] }}</div>
  45. <input type="hidden" value="{{ $good['id'] }}"
  46. name="setdata[many_good][]">
  47. <em onclick="remove_member(this)" class="close">×</em>
  48. </div>
  49. @endforeach
  50. </div>
  51. <div class="input-group">
  52. <label class="checkbox-inline">
  53. <input type="radio" name="setdata[goods_apply]" value="0" @if ($set['goods_apply'] == 0) checked @endif />付款后
  54. </label>
  55. <label class="checkbox-inline">
  56. <input type="radio" name="setdata[goods_apply]" value="1" @if ($set['goods_apply'] == 1) checked @endif />完成后
  57. </label>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="form-group" id="apply_goods_apply" @if($set['apply_condition'] != 1) style="display: none" @endif>
  63. <label class="col-xs-12 col-sm-3 col-md-2 control-label">购买商品后是否需要申请主播</label>
  64. <div class="col-sm-9 col-xs-12">
  65. <label class="checkbox-inline">
  66. <input type="radio" name="setdata[goods_buy]" value="1" @if ($set['goods_buy'] == 1) checked @endif />需要
  67. </label>
  68. <label class="checkbox-inline">
  69. <input type="radio" name="setdata[goods_buy]" value="0" @if ($set['goods_buy'] == 0) checked @endif />不需要
  70. </label>
  71. <span class="help-block">如果设置为需要,则会员在前端需要再次申请,同时满足申请限制条件;如果不需要,则直接成为主播,无需在申请!</span>
  72. </div>
  73. </div>
  74. <div class="form-group" >
  75. <label class="col-xs-12 col-sm-3 col-md-2 control-label">申请限制</label>
  76. <div class="col-sm-9 col-xs-12">
  77. <label class="checkbox-inline">
  78. <input type="checkbox" name="setdata[apply_limit][all_member]" value="1" @if ($set['apply_limit']['all_member'] == 1) checked @endif />全部会员
  79. </label>
  80. <label class="checkbox-inline">
  81. <input type="checkbox" name="setdata[apply_limit][agent]" value="1" @if ($set['apply_limit']['agent'] == 1) checked @endif />推广员
  82. </label>
  83. <label class="checkbox-inline">
  84. <input type="checkbox" name="setdata[apply_limit][store]" value="1" @if ($set['apply_limit']['store'] == 1) checked @endif />门店店长/店员
  85. </label>
  86. <label class="checkbox-inline">
  87. <input type="checkbox" name="setdata[apply_limit][supplier]" value="1" @if ($set['apply_limit']['supplier'] == 1) checked @endif />供应商
  88. </label>
  89. <label class="checkbox-inline">
  90. <input type="checkbox" name="setdata[apply_limit][hotel]" value="1" @if ($set['apply_limit']['hotel'] == 1) checked @endif />酒店
  91. </label>
  92. </div>
  93. </div>
  94. <div class="form-group">
  95. <label class="col-xs-12 col-sm-3 col-md-2 control-label">申请页banner</label>
  96. <div class="col-sm-9 col-xs-12">
  97. {!! app\common\helpers\ImageHelper::tplFormFieldImage('setdata[banner]', $set['banner'])!!}
  98. </div>
  99. </div>
  100. <div class="form-group">
  101. <label class="col-xs-12 col-sm-3 col-md-2 control-label">申请协议</label>
  102. <div class="col-sm-9 col-xs-12">
  103. {!! yz_tpl_ueditor('setdata[agreement]', $set['agreement']) !!}
  104. </div>
  105. </div>
  106. <div class="form-group">
  107. <label class="col-xs-12 col-sm-3 col-md-2 control-label">跳转页</label>
  108. <div class="col-sm-6 col-xs-6">
  109. <input type='text' name='setdata[jump_url]' class="form-control discounts_value"
  110. value="{{$set['jump_url']}}"/>
  111. <span class='help-block'>申请成功跳转页</span>
  112. </div>
  113. </div>
  114. <div class="form-group">
  115. <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序跳转页</label>
  116. <div class="col-sm-6 col-xs-6">
  117. <input type='text' name='setdata[jump_min_url]' class="form-control discounts_value"
  118. value="{{$set['jump_min_url']}}"/>
  119. <span class='help-block'>申请成功跳转页</span>
  120. </div>
  121. </div>
  122. <div class="form-group">
  123. <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
  124. <div class="col-xs-12 col-sm-9 col-md-10">
  125. <input type="submit" name="submit" value="提交" class="btn btn-success"
  126. onclick="return formcheck()"/>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </form>
  132. <div id="modal-goods" class="modal fade" tabindex="-1">
  133. <div class="modal-dialog" style='width: 920px;'>
  134. <div class="modal-content">
  135. <div class="modal-header"><button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h3>选择商品</h3></div>
  136. <div class="modal-body" >
  137. <div class="row">
  138. <div class="input-group">
  139. <input type="text" class="form-control" name="keyword" value="" id="search-kwd-goods-commission" placeholder="请输入商品名称" />
  140. <span class='input-group-btn'><button type="button" class="btn btn-default" onclick="search_goods_two();">搜索</button></span>
  141. </div>
  142. </div>
  143. <div id="module-menus-goods-two" style="padding-top:5px;"></div>
  144. </div>
  145. <div class="modal-footer"><a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a></div>
  146. </div>
  147. </div>
  148. </div>
  149. </section>
  150. </div>
  151. </div>
  152. <script>
  153. $(":radio[name='setdata[apply_condition]']").click(function () {
  154. if ($(this).val() == 0) {
  155. $("#apply_goods").hide();
  156. $("#apply_goods_apply").hide();
  157. }
  158. else {
  159. $("#apply_goods").show();
  160. $("#apply_goods_apply").show();
  161. }
  162. });
  163. function remove_member(obj) {
  164. $(obj).parent().remove();
  165. refresh_members();
  166. }
  167. function search_goods_two() {
  168. if( $.trim($('#search-kwd-goods-commission').val())==''){
  169. Tip.focus('#search-kwd-goods-commission','请输入关键词');
  170. return;
  171. }
  172. $("#module-goods").html("正在搜索....")
  173. $.get('{!! yzWebUrl('goods.goods.get-search-goods-by-dividend-level') !!}', {
  174. keyword: $.trim($('#search-kwd-goods-commission').val())
  175. }, function(dat){
  176. $('#module-menus-goods-two').html(dat);
  177. });
  178. }
  179. function select_good_two(o) {
  180. var html = '<div class="multi-item" style="height: 220px" openid="' + o.id + '">';
  181. html += '<img class="img-responsive img-thumbnail" src="' + o.thumb + '" onerror="this.src=\'{{static_url('resource/images/nopic.jpg')}}\'; this.title=\'图片未找到.\'">';
  182. html += '<div class="img-nickname" style="max-height: 58px;overflow: hidden">' + o.title + '</div>';
  183. html += '<input type="hidden" value="' + o.id + '" name="setdata[many_good][]">';
  184. html += '<em onclick="remove_member(this)" class="close">×</em>';
  185. html += '</div>';
  186. $("#goods_id").append(html);
  187. refresh_members();
  188. }
  189. </script>
  190. @endsection