修改bug

master
ELF 5 years ago
parent 3fa68c6f0c
commit ece317d6fa

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

@ -289,6 +289,12 @@ var gameId = $('#game-select').val();
}) })
function getSubPromotes(parentId, defaultPromoteId) { 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({ $.ajax({
url: "{:U('Query/getSubPromotes')}", url: "{:U('Query/getSubPromotes')}",
dataType: 'json', dataType: 'json',

@ -75,9 +75,9 @@
</div> --> </div> -->
<div class="form-group normal_space fr"> <div class="form-group normal_space fr">
<label>充值总额:</label> <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> <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>
<div class="form-group normal_space"> <div class="form-group normal_space">
<input type="submit" class="submit" value="查询"> <input type="submit" class="submit" value="查询">
@ -141,6 +141,7 @@
</block> </block>
<block name="script"> <block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.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"> <script type="text/javascript">
$(function(){ $(function(){
$(".select_gallery").select2(); $(".select_gallery").select2();
@ -185,6 +186,12 @@ $(function(){
}) })
function getSubPromotes(parentId, defaultPromoteId) { 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({ $.ajax({
url: "{:U('Query/getSubPromotes')}", url: "{:U('Query/getSubPromotes')}",
dataType: 'json', dataType: 'json',

@ -76,9 +76,9 @@
</div> </div>
<div class="form-group normal_space fr"> <div class="form-group normal_space fr">
<label>玩家等级:</label> <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> <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>
<div class="form-group"> <div class="form-group">
<input type="submit" class="submit normal_space" value="查询"> <input type="submit" class="submit normal_space" value="查询">
@ -137,6 +137,7 @@
<script src="__STATIC__/flatpickr/flatpickr.min.js"></script> <script src="__STATIC__/flatpickr/flatpickr.min.js"></script>
<script src="__STATIC__/flatpickr/l10n/zh.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__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
var defaultDate = $('.range-date').val() var defaultDate = $('.range-date').val()
@ -189,6 +190,12 @@ $(function() {
}) })
function getSubPromotes(parentId, defaultPromoteId) { 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({ $.ajax({
url: "{:U('Query/getSubPromotes')}", url: "{:U('Query/getSubPromotes')}",
dataType: 'json', dataType: 'json',

@ -206,3 +206,16 @@ function setValue(name,value) {
input.val(value); 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