You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

461 lines
19 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>充值查询列表|----软件管理平台</title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
</head>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<script src="__STATIC__/jquery.form.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style>
body {
padding: 50px 50px 50px 50px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.layui-layer-dialog .layui-layer-content{color:red}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
</style>
<body>
<div class="cf top_nav_list" style="height: 38px;">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list">
<input type="text" id="withdraw_id" style="display: none" value="{:I('id')}"/>
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="结算开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}" placeholder="结算结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="type" value="{$_GET['type']}">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id='search' url="{:U('StatementMangement/PersonOrderEdit','model='.$model['name'] .'&row='.I('row'),false)}">生成</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>提现订单号</th>
<th>结算时间</th>
<th>订单类型</th>
<th>会长</th>
</tr>
</thead>
<!-- 列表 -->
<tbody class="setData">
<if condition = "empty($withdraw_data)">
<tr>
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "withdraw_data">
<volist name="withdraw_data" id="withdraw_data">
<tr>
<td ><input class="ids" type="checkbox" value="{$withdraw_data.widthdraw_number}" name="ids[]" onclick="shenhe()"
<if condition = "check_str($_REQUEST['withdraw'],$withdraw_data['widthdraw_number']) gt 0">checked="checked" </if> >
</td>
<td >{$withdraw_data.widthdraw_number}</td>
<td >{$withdraw_data.settlement_begin_time} - {$withdraw_data.settlement_end_time}</td>
<td ><if condition = "$withdraw_data.settlement_type eq 1">周结<elseif condition = "$withdraw_data.settlement_type eq 2"/>月结<elseif condition = "$withdraw_data.settlement_type eq 3"/>补点</if></td>
<td >{$withdraw_data.promote_account}</td>
</tr>
</volist>
</notemtpy>
</tbody>
</table>
</div>
</div>
<!-- <div class="cf top_nav_list" style="margin-top: 20px">-->
<!-- &lt;!&ndash; 高级搜索 &ndash;&gt;-->
<!-- <div class="jssearch fl cf search_list">-->
<!-- <div class="input-list">-->
<!-- <a class="sch-btn" href="javascript:;" style="border: #0a0a0a solid 1px;width: 120px" onclick="shenhe()">预览</a>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<if condition = "empty($data)">
<else/>
<div class="data_list" style="margin-top: 30px">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>序号</th>
<th>下游名称</th>
<th>会长账号</th>
<th>市场员</th>
<th>下游类型</th>
<th>产品</th>
<th>结算时间</th>
<th>推广流水</th>
<th>分成比例</th>
<th>奖励</th>
<th>罚款</th>
<th>结算金额</th>
<th>开户名</th>
<th>银行卡号</th>
<th>开户支行</th>
</tr>
</thead>
<!-- 列表 -->
<tbody class="withdraw_datas">
<notemtpy name = "data">
<volist name="data" id="data">
<if condition = "$data.game_ratio eq ''">
<tr>
<td >{$data.id}</td>
<td >{$data.company_name}</td>
<td >{$data.promote_account}</td>
<td >{$data.username}</td>
<td >{$data.type}</td>
<td></td>
<td>-</td>
<td>0</td>
<td>0%</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td >{$data.bank_account}</td>
<td >{$data.bank_card}</td>
<td >{$data.account_openin}</td>
</tr>
</if>
<volist name="data.game_ratio" id="game_ratio">
<tr>
<td >{$data.id}</td>
<td >{$data.company_name}</td>
<td >{$data.promote_account}</td>
<td >{$data.username}</td>
<td >{$data.type}</td>
<td>{$game_ratio.game_name}</td>
<td>{$game_ratio.begin_time|0}&nbsp;-&nbsp;{$game_ratio.end_time|0}</td>
<td>{$game_ratio.sum_amount|0}</td>
<td>{$game_ratio.selle_ratio|0}%</td>
<td>{$game_ratio.reward|0}</td>
<td>{$game_ratio.forfeit|0}</td>
<td>{$game_ratio.real_amount|0}</td>
<td >{$data.bank_account}</td>
<td >{$data.bank_card}</td>
<td >{$data.account_openin}</td>
</tr>
</volist>
</volist>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="cf top_nav_list" style="margin-top: 50px">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="confirm" url="{:U('Query/marketList','model='.$model['name'] .'&row='.I('row'),false)}" style="border: #0a0a0a solid 1px;width: 120px">确认生成</a>
</div>
</div>
<div class="jssearch fl cf search_list">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="back" style="width: 120px;background:#fff;color: #0a0a0a;border: #0a0a0a solid 1px">取消</a>
</div>
</div>
</div>
</if>
</body>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
<script type="text/javascript">
function reload() {
window.location.reload();
}
function shenhe(){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(",");
var id =$("#withdraw_id").val();
var url = "/admin.php?s=/statementMangement/PersonOrderEdit/withdraw/" + text + "/time_start/" + $("#time_start").val() + "/time_end/" + $("#time_end").val() + "/id/" + id;
console.log(url)
window.location.replace(url);
}
$(function(){
//搜索功能
var start = $("#time_start").val();
var end = $("#time_end").val();
var withdraw_id =$("#withdraw_id").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
$("#back").click(function () {
window.parent.reload();
});
$("#confirm").click(function() {
var withdraw_datas = [];
$('.withdraw_datas tr').each(function() {
var row = {};
$(this).find('td').each(function(index) {
if (index == 0) {
row['id'] = $(this).text();
} else if (index == 1) {
row['company_name'] = $(this).text();
}else if (index == 2) {
row['promote_account'] = $(this).text();
}else if (index == 3) {
row['username'] = $(this).text();
}else if (index == 4) {
row['type'] = $(this).text();
}else if (index == 5) {
row['game_name'] = $(this).text();
}else if (index == 6) {
row['time'] = $(this).text();
}else if (index == 7) {
row['sum_amount'] = $(this).text();
}else if (index == 8) {
row['selle_ratio'] = $(this).text();
}else if (index == 9) {
row['reward'] = $(this).text();
}else if (index == 10) {
row['forfeit'] = $(this).text();
}else if (index == 11) {
row['real_amount'] = $(this).text();
}else if (index == 12) {
row['bank_account'] = $(this).text();
}else if (index == 13) {
row['bank_card'] = $(this).text();
}else if (index == 14) {
row['account_openin'] = $(this).text();
}
});
withdraw_datas.push(row);
});
var setData = [];
$('.setData tr').each(function() {
var row = {};
var checked = $(this).find('input').is(":checked");
if (checked) {
$(this).find('td').each(function(index) {
// console.log($(this).text());return;
if (index == 1) {
row['widthdraw_number'] = $(this).text();
} else if (index == 2) {
row['time'] = $(this).text();
}else if (index == 3) {
row['settlement_type'] = $(this).text();
}else if (index == 4) {
row['promote_account'] = $(this).text();
}
});
setData.push(row);
}
});
$.ajax({
url: "{:U('StatementMangement/savePersonOrderEdit')}",
type: "post",
data: {"second_party_info": JSON.stringify(setData),"statement_info":JSON.stringify(withdraw_datas),"time_start":start,"time_end":end,"withdraw_id":withdraw_id},
dataType: 'json',
success: function (data) {
layer.msg(data.msg);
setTimeout(function(){
window.parent.reload();
},1500);
}
});
console.log(JSON.stringify(withdraw_datas));
console.log(setData);
}
);
//设置对账网址
var order_url = window.location.protocol+"//"+window.location.host+"/admin.php?s=/Public/cp_login.html";
$("#order_url").html("结算单管理,对账地址:<spen style='margin-left:10px;'>"+order_url+"</spen>");
//全选的实现
$(".check-all").click(function(){
$('.ids').prop("checked", this.checked);
shenhe();
});
$(".ids").click(function(){
var option = $(".ids");
option.each(function(i){
if(!this.checked){
$(".check-all").prop("checked", false);
return false;
}else{
$(".check-all").prop("checked", true);
}
});
});
$("#search").click(function(){
var start = $("#time_start").val();
var end = $("#time_end").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url + '&id=' + withdraw_id;
});
$('#time_start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left'
})
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
})
</script>
</block>