bztang-admin/plugins/team-dividend/views/admin/tpl/store_manager.blade.php

90 lines
3.8 KiB
PHP

<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[store_manager_switch]" value="1" @if($set['store_manager_switch'] == 1) checked="checked" @endif /> 开启
</label>
<label class="radio-inline">
<input type="radio" name="setdata[store_manager_switch]" value="0" @if($set['store_manager_switch'] == 0) checked="checked" @endif /> 关闭
</label>
</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[store_manager_cycle]" value="yesterday" @if($set['store_manager_cycle'] == 'yesterday') checked="checked" @endif />
</label>
<label class="radio-inline">
<input type="radio" name="setdata[store_manager_cycle]" value="last_week" @if($set['store_manager_cycle'] == 'last_week') checked="checked" @endif />
</label>
<label class="radio-inline">
<input type="radio" name="setdata[store_manager_cycle]" value="last_month" @if($set['store_manager_cycle'] == 'last_month') checked="checked" @endif />
</label>
</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">
<div class='input-group'>
<input type='text' name='setdata[store_manager_proportion]' class="form-control discounts_value" value="{{$set['store_manager_proportion']}}"/>
<div class='input-group-addon waytxt'>%</div>
</div>
<span class='help-block'>店补比例,根据店长团队业绩计算。</span>
</div>
</div>
<div class="tab-pane active" id="withdrawDateContent">
<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[withdraw_date][0]' class="withdraw-date withdraw-date-all" value='0' @if($set['withdraw_date'][0] === '0' || !isset($set['withdraw_date'])) checked @endif />
全部
</label>
@for($i = 1 ; $i <= 31; $i++)
<label class='checkbox-inline'>
<input type='checkbox' name='setdata[withdraw_date][{{ $i }}]' class="withdraw-date withdraw-date-day" value='{{ $i }}' @if(isset($set['withdraw_date'][$i])) checked @endif />
{{ $i }}
</label>
@endfor
</div>
</div>
</div>
<script>
$(function () {
// 可提现日期改变 同步进行对应的操作
$("#withdrawDateContent").on('change','.withdraw-date',function(){
let isChecked = $(this).is(':checked');
let _thisValue = $(this).val();
_thisValue = !isNaN(parseInt(_thisValue)) ? parseInt(_thisValue) : parseInt(0);
if(_thisValue === parseInt(0)){
// 全选被改变 判断:全选|取消全选
$(".withdraw-date-day").prop('checked', isChecked)
}else{
// 日期被改变 判断:未全选则取消全选按钮选中状态|已全选则添加全选按钮选中状态
let checkedLen = $(".withdraw-date-day:checked").length;
checkedLen = !isNaN(parseInt(checkedLen)) ? parseInt(checkedLen) : parseInt(0);
if(checkedLen < 31) $(".withdraw-date-all").prop('checked', false)
else $(".withdraw-date-all").prop('checked', true)
}
});
});
</script>