Merge branch 'hotfix/query'

master
ELF 5 years ago
commit b1594e2363

@ -1920,8 +1920,8 @@ class QueryController extends BaseController
$userAccount = I('user_account', '');
$promoteId = I('promote_id', 0);
$sdkVersion = I('sdk_version', 0);
$costBegin = I('cost_begin', 0);
$costEnd = I('cost_end', 0);
$costBegin = I('cost_begin', '');
$costEnd = I('cost_end', '');
$headmanPromoteId = I('headman_promote_id', 0);
$promote = $this->getLoginPromote();
@ -1985,13 +1985,13 @@ class QueryController extends BaseController
$spendMap['promote_id'] = $promoteId;
}
}
if ($costBegin > 0 || $costEnd > 0) {
if ($costBegin != '' || $costEnd != '') {
$having = '';
if ($costBegin > 0 && $costEnd > 0) {
if ($costBegin != '' && $costEnd != '') {
$having = 'sum(cost) between ' . $costBegin . ' and ' . $costEnd;
} elseif ($costBegin > 0 && $costEnd == 0) {
} elseif ($costBegin != '' && $costEnd == '') {
$having = 'sum(cost) > ' . $costBegin;
} elseif ($costBegin == 0 && $costEnd > 0) {
} elseif ($costBegin == '' && $costEnd != '') {
$having = 'sum(cost) < ' . $costEnd;
}
$subMap = $map;

@ -289,6 +289,12 @@ var gameId = $('#game-select').val();
})
function getSubPromotes(parentId, defaultPromoteId) {
if (parentId == 0) {
var options = '<option value="0">请选择推广员</option>'
$('#promote-select').html(options)
$("#promote-select").val(defaultPromoteId).trigger("change")
return
}
$.ajax({
url: "{:U('Query/getSubPromotes')}",
dataType: 'json',

@ -75,9 +75,9 @@
</div> -->
<div class="form-group normal_space fr">
<label>充值总额:</label>
<input type="text" class="txt" name="cost_begin" style="width: 50px" value="{:I('cost_begin')}" >
<input type="text" class="txt float-input" name="cost_begin" style="width: 50px" value="{:I('cost_begin')}" >
<label> ~ </label>
<input type="text" class="txt" name="cost_end" style="width: 50px" value="{:I('cost_end')}" >
<input type="text" class="txt float-input" name="cost_end" style="width: 50px" value="{:I('cost_end')}" >
</div>
<div class="form-group normal_space">
<input type="submit" class="submit" value="查询">
@ -141,6 +141,7 @@
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript">
$(function(){
$(".select_gallery").select2();
@ -185,6 +186,12 @@ $(function(){
})
function getSubPromotes(parentId, defaultPromoteId) {
if (parentId == 0) {
var options = '<option value="0">请选择推广员</option>'
$('#promote-select').html(options)
$("#promote-select").val(defaultPromoteId).trigger("change")
return
}
$.ajax({
url: "{:U('Query/getSubPromotes')}",
dataType: 'json',

@ -76,9 +76,9 @@
</div>
<div class="form-group normal_space fr">
<label>玩家等级:</label>
<input type="text" class="txt" name="role_level_begin" style="width: 50px" value="{:I('role_level_begin')}" >
<input type="text" class="txt integer-input" name="role_level_begin" style="width: 50px" value="{:I('role_level_begin')}">
<label> ~ </label>
<input type="text" class="txt" name="role_level_end" style="width: 50px" value="{:I('role_level_end')}" >
<input type="text" class="txt integer-input" name="role_level_end" style="width: 50px" value="{:I('role_level_end')}" >
</div>
<div class="form-group">
<input type="submit" class="submit normal_space" value="查询">
@ -137,6 +137,7 @@
<script src="__STATIC__/flatpickr/flatpickr.min.js"></script>
<script src="__STATIC__/flatpickr/l10n/zh.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript">
$(function() {
var defaultDate = $('.range-date').val()
@ -189,6 +190,12 @@ $(function() {
})
function getSubPromotes(parentId, defaultPromoteId) {
if (parentId == 0) {
var options = '<option value="0">请选择推广员</option>'
$('#promote-select').html(options)
$("#promote-select").val(defaultPromoteId).trigger("change")
return
}
$.ajax({
url: "{:U('Query/getSubPromotes')}",
dataType: 'json',

@ -205,4 +205,17 @@ function setValue(name,value) {
} else { //其他表单选项直接设置值
input.val(value);
}
}
}
$(".float-input").keyup(function(){
$(this).val($(this).val().replace(/[^0-9.]/g,''));
}).bind("paste",function(){
$(this).val($(this).val().replace(/[^0-9.]/g,''));
})
$(".integer-input").keyup(function(){
$(this).val($(this).val().replace(/\D|^0/g,''));
}).bind("paste",function(){
$(this).val($(this).val().replace(/\D|^0/g,''));
})
Loading…
Cancel
Save