| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- @extends('layouts.base')
- @section('content')
- @section('title', trans('基础设置'))
- <script type="text/javascript">
- window.optionchanged = false;
- require(['bootstrap'], function () {
- $('#myTab a').click(function (e) {
- e.preventDefault();
- $(this).tab('show');
- })
- });
- </script>
- <div class="w1200 m0a">
- <div class="rightlist">
- <!-- 新增加右侧顶部三级菜单 -->
- @include('layouts.tabs')
- <section>
- <form id="setform" action="" method="post" class="form-horizontal form">
- <div class="panel panel-default">
- <div class="panel-body">
- <div class="form-group">
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">成为主播方式</label>
- <div class="col-sm-9 col-xs-12">
- <label class="checkbox-inline">
- <input type="radio" name="setdata[apply_condition]" value="0" @if ($set['apply_condition'] == 0) checked @endif />申请
- </label>
- <label class="checkbox-inline">
- <input type="radio" name="setdata[apply_condition]" value="1" @if ($set['apply_condition'] == 1) checked @endif />购买指定商品
- </label>
- <div id="apply_goods" @if($set['apply_condition'] != 1) style="display: none" @endif>
- <div class="input-group" >
- <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
- @endif" readonly />
- <div class="input-group">
- <button type="button" onclick="$('#modal-goods').modal()" class="btn btn-default" >选择商品</button>
- </div>
- </div>
- <span class="help-block">可指定多件商品,只需购买其中一件就可以申请主播</span>
- <div class="input-group multi-img-details" id='goods_id'>
- @foreach ($set['many_good'] as $good)
- <div class="multi-item saler-item" style="height: 220px" openid="{{ $good['id'] }}">
- <img class="img-responsive img-thumbnail" src='{{ tomedia($good['thumb']) }}'
- onerror="this.src='{{static_url('resource/images/nopic.jpg')}}'; this.title='图片未找到.'">
- <div class='img-nickname' style="max-height: 58px;overflow: hidden">{{ $good['title'] }}</div>
- <input type="hidden" value="{{ $good['id'] }}"
- name="setdata[many_good][]">
- <em onclick="remove_member(this)" class="close">×</em>
- </div>
- @endforeach
- </div>
- <div class="input-group">
- <label class="checkbox-inline">
- <input type="radio" name="setdata[goods_apply]" value="0" @if ($set['goods_apply'] == 0) checked @endif />付款后
- </label>
- <label class="checkbox-inline">
- <input type="radio" name="setdata[goods_apply]" value="1" @if ($set['goods_apply'] == 1) checked @endif />完成后
- </label>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group" id="apply_goods_apply" @if($set['apply_condition'] != 1) style="display: none" @endif>
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">购买商品后是否需要申请主播</label>
- <div class="col-sm-9 col-xs-12">
- <label class="checkbox-inline">
- <input type="radio" name="setdata[goods_buy]" value="1" @if ($set['goods_buy'] == 1) checked @endif />需要
- </label>
- <label class="checkbox-inline">
- <input type="radio" name="setdata[goods_buy]" value="0" @if ($set['goods_buy'] == 0) checked @endif />不需要
- </label>
- <span class="help-block">如果设置为需要,则会员在前端需要再次申请,同时满足申请限制条件;如果不需要,则直接成为主播,无需在申请!</span>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">申请限制</label>
- <div class="col-sm-9 col-xs-12">
- <label class="checkbox-inline">
- <input type="checkbox" name="setdata[apply_limit][all_member]" value="1" @if ($set['apply_limit']['all_member'] == 1) checked @endif />全部会员
- </label>
- <label class="checkbox-inline">
- <input type="checkbox" name="setdata[apply_limit][agent]" value="1" @if ($set['apply_limit']['agent'] == 1) checked @endif />推广员
- </label>
- <label class="checkbox-inline">
- <input type="checkbox" name="setdata[apply_limit][store]" value="1" @if ($set['apply_limit']['store'] == 1) checked @endif />门店店长/店员
- </label>
- <label class="checkbox-inline">
- <input type="checkbox" name="setdata[apply_limit][supplier]" value="1" @if ($set['apply_limit']['supplier'] == 1) checked @endif />供应商
- </label>
- <label class="checkbox-inline">
- <input type="checkbox" name="setdata[apply_limit][hotel]" value="1" @if ($set['apply_limit']['hotel'] == 1) checked @endif />酒店
- </label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">申请页banner</label>
- <div class="col-sm-9 col-xs-12">
- {!! app\common\helpers\ImageHelper::tplFormFieldImage('setdata[banner]', $set['banner'])!!}
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">申请协议</label>
- <div class="col-sm-9 col-xs-12">
- {!! yz_tpl_ueditor('setdata[agreement]', $set['agreement']) !!}
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">跳转页</label>
- <div class="col-sm-6 col-xs-6">
- <input type='text' name='setdata[jump_url]' class="form-control discounts_value"
- value="{{$set['jump_url']}}"/>
- <span class='help-block'>申请成功跳转页</span>
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序跳转页</label>
- <div class="col-sm-6 col-xs-6">
- <input type='text' name='setdata[jump_min_url]' class="form-control discounts_value"
- value="{{$set['jump_min_url']}}"/>
- <span class='help-block'>申请成功跳转页</span>
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
- <div class="col-xs-12 col-sm-9 col-md-10">
- <input type="submit" name="submit" value="提交" class="btn btn-success"
- onclick="return formcheck()"/>
- </div>
- </div>
- </div>
- </div>
- </form>
- <div id="modal-goods" class="modal fade" tabindex="-1">
- <div class="modal-dialog" style='width: 920px;'>
- <div class="modal-content">
- <div class="modal-header"><button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h3>选择商品</h3></div>
- <div class="modal-body" >
- <div class="row">
- <div class="input-group">
- <input type="text" class="form-control" name="keyword" value="" id="search-kwd-goods-commission" placeholder="请输入商品名称" />
- <span class='input-group-btn'><button type="button" class="btn btn-default" onclick="search_goods_two();">搜索</button></span>
- </div>
- </div>
- <div id="module-menus-goods-two" style="padding-top:5px;"></div>
- </div>
- <div class="modal-footer"><a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a></div>
- </div>
- </div>
- </div>
- </section>
- </div>
- </div>
- <script>
- $(":radio[name='setdata[apply_condition]']").click(function () {
- if ($(this).val() == 0) {
- $("#apply_goods").hide();
- $("#apply_goods_apply").hide();
- }
- else {
- $("#apply_goods").show();
- $("#apply_goods_apply").show();
- }
- });
- function remove_member(obj) {
- $(obj).parent().remove();
- refresh_members();
- }
- function search_goods_two() {
- if( $.trim($('#search-kwd-goods-commission').val())==''){
- Tip.focus('#search-kwd-goods-commission','请输入关键词');
- return;
- }
- $("#module-goods").html("正在搜索....")
- $.get('{!! yzWebUrl('goods.goods.get-search-goods-by-dividend-level') !!}', {
- keyword: $.trim($('#search-kwd-goods-commission').val())
- }, function(dat){
- $('#module-menus-goods-two').html(dat);
- });
- }
- function select_good_two(o) {
- var html = '<div class="multi-item" style="height: 220px" openid="' + o.id + '">';
- html += '<img class="img-responsive img-thumbnail" src="' + o.thumb + '" onerror="this.src=\'{{static_url('resource/images/nopic.jpg')}}\'; this.title=\'图片未找到.\'">';
- html += '<div class="img-nickname" style="max-height: 58px;overflow: hidden">' + o.title + '</div>';
- html += '<input type="hidden" value="' + o.id + '" name="setdata[many_good][]">';
- html += '<em onclick="remove_member(this)" class="close">×</em>';
- html += '</div>';
- $("#goods_id").append(html);
- refresh_members();
- }
- </script>
- @endsection
|