bztang-admin/plugins/area-dividend/views/admin/tpl/upgrade_condition.blade.php

166 lines
8.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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="radio-inline">
<input type="radio" name="setdata[upgrade][is_open]" value="1"
@if($upgrade['is_open'] == 1) checked="checked" @endif /> 开启</label>
<label class="radio-inline">
<input type="radio" name="setdata[upgrade][is_open]" value="0"
@if($upgrade['is_open'] == 0) checked="checked" @endif /> 关闭</label>
<span style="" 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">
<div style="width: 100%;display: -webkit-box">
<div class="control-label" style="margin-right: 5px;">直推</div>
<input type="text" style="width: 10%" class="form-control" name="setdata[upgrade][push_num]"
value="{{$upgrade['push_num']}}">
<div class="control-label" style="margin-left: 5px;margin-right: 5px;"></div>
<select class="form-control" style="width: 10%" name="setdata[upgrade][push_level]">
<option value="0">请选择</option>
@foreach($team_dividend_level_list as $level)
<option
@if($upgrade['push_level'] == $level->id)
selected="selected"
@endif
value="{{$level->id}}">{{$level->level_name}}</option>
@endforeach
</select>
<div style="padding-left: 7px">
<label class="radio-inline"><input type="radio" name="setdata[upgrade][level_type]"
@if($upgrade['level_type'] == 1) checked="checked" @endif
value="1"> 本级</label>
</div>
<div style="padding-left: 7px">
<label class="radio-inline">
<input type="radio" name="setdata[upgrade][level_type]" value="2"
@if($upgrade['level_type'] == 2) checked="checked" @endif
>
以上</label>
</div>
<div class="control-label" style="margin-left: 5px;margin-right: 5px">并且团队累计消费(已支付)达到</div>
<input type="text" style="width: 10%" class="form-control" name="setdata[upgrade][price]"
value="{{$upgrade['price']}}">
<div class="control-label" style="margin-left: 5px;margin-right: 5px;"></div>
</div>
</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">
<div>购买指定商品之一</div>
<div style="display: flex;">
<div class="input-group multi-img-details" id='goods_id'>
@foreach ($goods as $goods_id => $good)
<div class="multi-item saler-item" style="height: 100px;width: 100px ; margin-bottom: 70px;" 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[upgrade][goods_ids][{{ $good['id'] }}]" class="opt-multi-item">
<em onclick="remove_member(this)" class="close">×</em>
</div>
@endforeach
</div>
<div class="choose-goods" style="width: 100px;height: 100px;border: 1px dotted #bfbbbb; display: flex;justify-content: center;align-items: center;flex-direction: column;margin: 10px 0; " onclick="$('#modal-goods').modal()">
<i class="el-icon-plus" style="font-size: 22px;color: #a7a2a2;"></i>
<button type="button" style="margin-top: 10px;color: #a7a2a2;border: none;background-color: white;">选择商品</button>
</div>
</div>
<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-dividend" 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>
</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="radio-inline">
<input type="radio" name="setdata[upgrade][event_type]" value="1"
@if($upgrade['event_type'] == 1) checked="checked" @endif /> 支付后</label>
<label class="radio-inline">
<input type="radio" name="setdata[upgrade][event_type]" value="2"
@if($upgrade['event_type'] == 2) checked="checked" @endif /> 完成后</label>
<span style="" class='help-block'>
备注:支付后/完成后仅针对购买指定商品之一
</span>
</div>
</div>
<script>
function search_goods_two() {
if( $.trim($('#search-kwd-goods-dividend').val())==''){
Tip.focus('#search-kwd-goods-dividend','请输入关键词');
return;
}
$("#module-goods").html("正在搜索....")
$.get('{!! yzWebUrl('plugin.area-dividend.admin.area-dividend-set.searchGoods') !!}', {
keyword: $.trim($('#search-kwd-goods-dividend').val())
}, function(dat){
$('#module-menus-goods-two').html(dat);
});
}
function select_good_two(op) {
let info = true
if($('.opt-multi-item').length > 0) {
$('.opt-multi-item').map((index) => {
if($('.opt-multi-item').eq(index)[0].name.replace(/[^0-9]/g,"")*1 == op.id) {
info = false;
}
})
}
if(info) {
var html = '<div class="multi-item" style="height: 100px;width: 100px ; margin-bottom: 70px;" openid="' + op.id + '">';
html += '<img class="img-responsive img-thumbnail" src="' + op.thumb + '" onerror="this.src=\'{{static_url('resource/images/nopic.jpg')}}\'; this.title=\'图片未找到.\'">';
html += '<div class="img-nickname" style="max-height: 58px;overflow: hidden">' + op.title + '</div>';
html += '<input type="hidden" value="' + op.id + '" name="setdata[upgrade][goods_ids][' + op.id + ']" class="opt-multi-item">';
html += '<em onclick="remove_member(this)" class="close">×</em>';
html += '</div>';
$("#goods_id").append(html);
refresh_members();
}
}
function refresh_members() {
var nickname = "";
$('.multi-item').each(function () {
nickname += " " + $(this).find('.img-nickname').html() + "; ";
});
$('#many_good').val(nickname);
}
function remove_member(obj) {
$(obj).parent().remove();
refresh_members();
}
</script>