|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
<title>充值查询列表|----软件管理平台</title>
|
|
|
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
|
|
|
<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__/module.css">
|
|
|
<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">
|
|
|
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
|
|
|
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
|
|
|
</head>
|
|
|
<style>
|
|
|
body {
|
|
|
padding: 0px;
|
|
|
}
|
|
|
.input-list, .i_list {
|
|
|
/*float: none;*/
|
|
|
margin: 0;
|
|
|
}
|
|
|
.search_list>div {
|
|
|
margin-top: 9px;
|
|
|
line-height: 40px;
|
|
|
}
|
|
|
</style>
|
|
|
<body>
|
|
|
<div id="main" class="main" style="min-height: 342px;width: 92.5%;">
|
|
|
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
|
|
|
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
|
|
|
|
|
<div class="cf top_nav_list" style="height: 250px;margin-left: 5px">
|
|
|
<!-- 高级搜索 -->
|
|
|
<div class="jssearch cf search_list" >
|
|
|
<!-- <div class="input-list search-title-box">-->
|
|
|
<!-- <label>乙方:</label>-->
|
|
|
<!-- </div>-->
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%;">
|
|
|
提现单号:
|
|
|
<!-- <select id="ext_field" name="ext_field" class="select_gallery" style="width: 50%">-->
|
|
|
<!-- <option value="">提现单号</option>-->
|
|
|
<!-- <volist name=":getWithdrawNumber()" id="vo">-->
|
|
|
<!-- <option value="{$vo.widthdraw_number}" <if condition="$vo eq $_GET['count_date']">selected=selected</if>>{$vo.widthdraw_number}</option>-->
|
|
|
<!-- </volist>-->
|
|
|
<!-- </select>-->
|
|
|
<input type="text" readonly id="ext_field" name="ext_field" class="" value="" placeholder="提现单号" style="width: 50%"/>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
银行账号:
|
|
|
<input type="text" readonly id="bank_card" name="bank_card" class="" value="" placeholder="银行账号" style="width: 50%"/>
|
|
|
</div>
|
|
|
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
乙 方:
|
|
|
<select disabled="disabled" id="company_name" name="company_name" class="select_gallery" style="width: 50%">
|
|
|
<option value="">乙 方</option>
|
|
|
<volist name=":getCompanyList()" id="vo">
|
|
|
<option company_id="{$vo.id}" value="{$vo.company_name}">{$vo.company_name}</option>
|
|
|
</volist>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
户 名:
|
|
|
<input type="text" id="bank_account_name" name="bank_account_name" class="" value="" placeholder="户名" style="width: 50%"/>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
开 户 行:
|
|
|
<input type="text" id="account_openin" name="account_openin" class="" value="" placeholder="开户行" style="width: 50%"/>
|
|
|
</div>
|
|
|
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
订单类型:
|
|
|
<input type="text" name="settlement_type_value" id="settlement_type_value" style="display: none" value="默认"/>
|
|
|
<span style="width: 50%" id="settlement_type">默认</span>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
邮寄地址:
|
|
|
<input type="text" id="address" name="address" class="" value="" placeholder="邮寄地址" style="width: 50%"/>
|
|
|
</div>
|
|
|
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
联 系 人:
|
|
|
<input type="text" id="real_name" name="real_name" class="" value="" placeholder="联系人" style="width: 50%"/>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
开票项目:
|
|
|
<input type="text" id="invoice_item" name="invoice_item" class="" value="信息技术服务费" placeholder="信息技术服务费" style="width: 50%"/>
|
|
|
</div>
|
|
|
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
联系电话:
|
|
|
<input type="text" id="mobile_phone" name="mobile_phone" class="" value="{:I('time_start')}" placeholder="请输入联系电话" style="width: 50%"/>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 50%">
|
|
|
发票类型:
|
|
|
<input type="text" id="invoice_type" name="invoice_type" class="" value="增值税专用发票" placeholder="增值税专用发票" style="width: 50%"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 数据列表 -->
|
|
|
<div class="data_list box_mt" style="margin-top: 30px">
|
|
|
<div class="">
|
|
|
<table>
|
|
|
<!-- 表头 -->
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>结算时间</th>
|
|
|
<th>合作产品</th>
|
|
|
<th >平台总额</th>
|
|
|
<th>分成比例</th>
|
|
|
<th>税费费率</th>
|
|
|
<th >结算金额(元)</th>
|
|
|
|
|
|
</thead>
|
|
|
<!-- 列表 -->
|
|
|
<tbody style="overflow: hidden;height: 300px" class="getData">
|
|
|
<if condition = "empty($list_data)">
|
|
|
<tr>
|
|
|
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
|
|
</tr>
|
|
|
</if>
|
|
|
<volist name="list_data" id="data">
|
|
|
<tr>
|
|
|
|
|
|
</tr>
|
|
|
</volist>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cf top_nav_list" style="height: 250px;margin-left: 5px">
|
|
|
<!-- 高级搜索 -->
|
|
|
<div class="wesearch cf search_list" >
|
|
|
<!-- <div class="input-list search-title-box">-->
|
|
|
<!-- <label>乙方:</label>-->
|
|
|
<!-- </div>-->
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 100%;">
|
|
|
甲方:
|
|
|
<input type="text" id="jfCompany" name="jfCompany" class="" value="海南万盟天下科技有限公司" style="width: 30%;display: none"/>
|
|
|
<span>海南万盟天下科技有限公司</span>
|
|
|
</div>
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 100%;">
|
|
|
联系人:
|
|
|
<input type="text" id="jfPerson" name="jfPerson" class="" value="" placeholder="请输入联系人" style="width: 30%"/>
|
|
|
</div>
|
|
|
|
|
|
<div class="input-list input-list-promote search_label_rehab" style="width: 100%;">
|
|
|
联系电话:
|
|
|
<input type="text" id="jfTel" name="jfTel" class="" value="" placeholder="请输入电话号码" style="width: 30%"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cf top_nav_list" style="width:50px;position: relative;top: -160px;left: 60%;">
|
|
|
<!-- 高级搜索 -->
|
|
|
<div class="jssearch fl cf search_list">
|
|
|
<div class="input-list">
|
|
|
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Query/marketList','model='.$model['name'] .'&row='.I('row'),false)}" style="width: 120px">生成结算订单</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="page">
|
|
|
{$_page|default=''}
|
|
|
</div>
|
|
|
</div>
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
$(function(){
|
|
|
var queryData = [];
|
|
|
var statement = [];
|
|
|
var key = 0;
|
|
|
|
|
|
//搜索功能
|
|
|
$("#ext_field").change(function(){
|
|
|
var ext_field = $("#ext_field").val();
|
|
|
console.log(ext_field);
|
|
|
$("tbody").empty();
|
|
|
|
|
|
$("#company_name").val("");
|
|
|
$("#settlement_type").text("");
|
|
|
$("#bank_card").val("");
|
|
|
$("#account_openin").val("");
|
|
|
$("#address").val("");
|
|
|
$("#real_name").val("");
|
|
|
$("#mobile_phone").val("");
|
|
|
|
|
|
$("tbody").append('<tr>\n' +
|
|
|
' <td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>\n' +
|
|
|
' </tr>');
|
|
|
|
|
|
if (ext_field)
|
|
|
$.ajax({
|
|
|
url:"{:U('Ajax/getDownstreamData')}",
|
|
|
type:"get",
|
|
|
data:{withdraw_number:ext_field},
|
|
|
dataType:'json',
|
|
|
success:function(data){
|
|
|
console.log($("#company_name option:selected").attr('company-type'))
|
|
|
|
|
|
$("#company_name").val(data.data.company_name);
|
|
|
$("#settlement_type").text(data.data.settlement_type);
|
|
|
$("#bank_card").val(data.data.bank_card);
|
|
|
$("#account_openin").val(data.data.account_openin);
|
|
|
$("#address").val(data.data.address);
|
|
|
$("#real_name").val(data.data.real_name);
|
|
|
$("#mobile_phone").val(data.data.mobile_phone);
|
|
|
$("#settlement_type_value").val(data.data.settlement_type);
|
|
|
$("#invoice_item").val(data.data.invoice_item);
|
|
|
$("#invoice_type").val(data.data.invoice_type);
|
|
|
$("#bank_account_name").val(data.data.bank_account_name);
|
|
|
|
|
|
$("#jfCompany").val(data.data.jfCompany);
|
|
|
$("#jfCompany").next().text(data.data.jfCompany);
|
|
|
$("#jfPerson").val(data.data.jfPerson);
|
|
|
$("#jfTel").val(data.data.jfTel);
|
|
|
|
|
|
var game_ratio = data.data.game_ratio;
|
|
|
|
|
|
var str = '';
|
|
|
var sumAmount = 0;
|
|
|
var sum = data.data.sum;
|
|
|
|
|
|
for(var p in game_ratio){
|
|
|
|
|
|
for(var i in game_ratio[p]) {
|
|
|
queryData['pay_amount'] = game_ratio[p][i].sum_amount;
|
|
|
queryData['game_id'] = p;
|
|
|
queryData['game_name'] = game_ratio[p][i].game_name;
|
|
|
queryData['sum_money'] = (game_ratio[p][i].sum_amount*(game_ratio[p][i].selle_ratio/100)).toFixed(2);
|
|
|
queryData['statement_begin_time'] = game_ratio[p][i].begin_time;
|
|
|
queryData['statement_end_time'] = game_ratio[p][i].end_time;
|
|
|
queryData['second_ratio'] = game_ratio[p][i].selle_ratio;
|
|
|
queryData['fax_ratio'] = 0;
|
|
|
statement.push(queryData);
|
|
|
queryData=[];
|
|
|
// game_name = "<?php echo get_gamename('"+game_id+"')?>";
|
|
|
sumAmount=sumAmount+parseFloat(game_ratio[p][i].sum_amount);
|
|
|
str+="<tr class='statement_data_"+key+"'><td class='time_"+key+"' begin_time='"+game_ratio[p][i].begin_time+"' end_time='"+game_ratio[p][i].end_time+
|
|
|
"'>"+game_ratio[p][i].begin_time+"-"+game_ratio[p][i].end_time+"</td>" +
|
|
|
"<td class='game_name_"+key+"' game_id='"+p+"'>"+game_ratio[p][i].game_name+"</td>" +
|
|
|
"<td class='pay_amount_"+key+"'>"+game_ratio[p][i].sum_amount+"</td>" +
|
|
|
"<td class='second_ratio_"+key+"' second_ratio='"+game_ratio[p][i].selle_ratio+"'>"+game_ratio[p][i].selle_ratio+"%</td>" +
|
|
|
"<td><input value='"+game_ratio[p][i].fax_ratio+"' style='width: 30px' class='tax tax_"+key+"'/>%</td>" +
|
|
|
"<td id='sum_"+key+"' data-value='"+(game_ratio[p][i].sum_amount*(game_ratio[p][i].selle_ratio/100)).toFixed(2)+"'>"+((game_ratio[p][i].sum_amount*(game_ratio[p][i].selle_ratio/100))*(1-(game_ratio[p][i].fax_ratio)/100)).toFixed(2)+"</td></tr>";
|
|
|
// sum = ((parseFloat(sum) +(game_ratio[p][i].sum_amount*(game_ratio[p][i].selle_ratio/100))*(1-(game_ratio[p][i].fax_ratio)/100))).toFixed(2);
|
|
|
key++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
str+="<tr class=''><td>-</td><td>罚款</td>" +
|
|
|
"<td><input value='"+data.data.forfeit+"' style='width: 30px' class='forfeit'/></td>" +
|
|
|
"<td>-</td>" +
|
|
|
"<td>-</td>" +
|
|
|
"<td>"+data.data.forfeit+"</td>" +
|
|
|
"</tr>" +
|
|
|
"<tr><td>合计</td>" +
|
|
|
"<td>---</td>" +
|
|
|
"<td class='sumAmount' data-value='"+sumAmount+"'>"+data.data.pay_amount+"</td>" +
|
|
|
"<td>-</td>" +
|
|
|
"<td>-</td>" +
|
|
|
"<td class='sumAll' data-value='"+sum+"'>"+data.data.sum+"</td>" +
|
|
|
"</tr>"+
|
|
|
"<tr><td colspan='3'>\n" +
|
|
|
"本月分成总金额(人民币大写):</td>" +
|
|
|
"<td>-</td>" +
|
|
|
"<td>-</td>" +
|
|
|
"<td data-value='"+sum+"'>"+number_chinese(sum)+"</td>" +
|
|
|
"</tr>";
|
|
|
$("tbody").empty();
|
|
|
$("tbody").append(str);
|
|
|
eventnew();
|
|
|
}
|
|
|
})
|
|
|
|
|
|
});
|
|
|
$("#ext_field").val("{:I('ext_field')}");
|
|
|
$("#ext_field").change();
|
|
|
$(".tax").blur();
|
|
|
function eventnew(){
|
|
|
$(".tax").off("blur");
|
|
|
$(".tax").on("blur", function() {
|
|
|
var lastNum = (parseFloat($(this).parent().next().text())).toFixed(2);
|
|
|
$(this).parent().next().text(($(this).parent().next().attr('data-value')*(1-$(this).val()/100)).toFixed(2));
|
|
|
var nowNum = (parseFloat($(this).parent().next().text())).toFixed(2);
|
|
|
console.log((nowNum-lastNum))
|
|
|
$(".sumAll").text((parseFloat($(".sumAll").text())+(nowNum-lastNum)).toFixed(2));
|
|
|
});
|
|
|
|
|
|
$(".forfeit").off("blur");
|
|
|
$(".forfeit").on("blur", function() {
|
|
|
var lastNumber = $(this).parent().next().next().next().text();
|
|
|
|
|
|
$(this).parent().next().next().next().text(parseFloat($(this).val()).toFixed(2));
|
|
|
$(".sumAmount").text(($(".sumAmount").attr("data-value")-$(this).val()).toFixed(2));
|
|
|
|
|
|
$(".sumAll").text((parseFloat($(".sumAll").text())+parseFloat(lastNumber)-parseFloat($(this).val())).toFixed(2));
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
$("#search").click(function(){
|
|
|
var query = $('.jssearch').find('input').serializeArray();
|
|
|
|
|
|
var weQuery = $('.wesearch').find('input').serializeArray();
|
|
|
|
|
|
query = $.merge(query,$('.jssearch').find('select').serializeArray());
|
|
|
|
|
|
// query = $.merge(query,weQuery);
|
|
|
|
|
|
// console.log(statement)
|
|
|
var ext_field = '';
|
|
|
var second_party_info = {};
|
|
|
var first_party_info = {};
|
|
|
var statement_info = {};
|
|
|
var pushStatement = [];
|
|
|
var sumData = {};
|
|
|
var company_id = $("#company_name option:selected").attr('company_id');
|
|
|
|
|
|
ext_field=$("#ext_field").val();
|
|
|
console.log(ext_field)
|
|
|
|
|
|
second_party_info['partner'] = $("#company_name").val();
|
|
|
second_party_info["bank_account"] = $("#bank_card").val();
|
|
|
second_party_info["opening_bank"] = $("#account_openin").val();
|
|
|
// if ($("#settlement_type_value").val()=='周结订单') {
|
|
|
// second_party_info['settlement_type'] = 1;
|
|
|
// } else if ($("#settlement_type_value").val()=='月结订单') {
|
|
|
// second_party_info['settlement_type'] = 2;
|
|
|
// } else {
|
|
|
// second_party_info['settlement_type'] = 3;
|
|
|
// }
|
|
|
second_party_info['settlement_type'] = $("#settlement_type_value").val();
|
|
|
second_party_info['address'] = $("#address").val();
|
|
|
second_party_info['link_man'] = $("#real_name").val();
|
|
|
second_party_info['link_phone'] = $("#mobile_phone").val();
|
|
|
second_party_info['invoice_item'] = $("#invoice_item").val();
|
|
|
second_party_info['invoice_type'] = $("#invoice_type").val();
|
|
|
second_party_info['bank_account_name'] = $("#bank_account_name").val();
|
|
|
|
|
|
first_party_info['jfCompany'] = $("#jfCompany").val();
|
|
|
first_party_info['jfPerson'] = $("#jfPerson").val();
|
|
|
first_party_info['jfTel'] = $("#jfTel").val();
|
|
|
var i = 0;
|
|
|
for(i=0;i<key;i++) {
|
|
|
|
|
|
var _this = $(".statement_data_"+i);
|
|
|
statement_info['statement_begin_time'] = _this.children().attr('begin_time');
|
|
|
statement_info['statement_end_time'] = _this.children().attr('end_time');
|
|
|
statement_info['game_id'] = _this.children().next().attr('game_id');
|
|
|
statement_info['game_name'] = $(".statement_data_"+i+' .game_name_'+i).text();
|
|
|
statement_info['pay_amount'] = $(".statement_data_"+i+' .pay_amount_'+i).text();
|
|
|
statement_info['sum_money'] = $(".statement_data_"+i+' #sum_'+i).text();
|
|
|
statement_info['fax_ratio'] = $(".statement_data_"+i+' .tax_'+i).val();
|
|
|
statement_info['second_ratio'] = $(".statement_data_"+i+' .second_ratio_'+i).attr('second_ratio');
|
|
|
|
|
|
statement_info['statement_type'] = 0;
|
|
|
pushStatement.push(statement_info);
|
|
|
statement_info = {};
|
|
|
// console.log(statement_info);
|
|
|
}
|
|
|
var forfeit = {};
|
|
|
|
|
|
forfeit['type_name'] = '罚款';
|
|
|
forfeit['sum_money'] = $('.forfeit').val();
|
|
|
forfeit['statement_type'] = 1;
|
|
|
|
|
|
pushStatement.push(forfeit);
|
|
|
// console.log(pushStatement);
|
|
|
|
|
|
sumData['statement_money'] = $(".sumAll").text();
|
|
|
sumData['pay_amount'] = $(".sumAmount").text();
|
|
|
|
|
|
if (!ext_field) {
|
|
|
layer.msg("提现单号不能为空");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (!second_party_info['partner']) {
|
|
|
layer.msg("乙方不能为空");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (!second_party_info['link_man']) {
|
|
|
layer.msg("联系人不能为空");
|
|
|
return;
|
|
|
}
|
|
|
var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(17[0]{1})|(15[0-3]{1})|(15[5-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
|
|
if (!myreg.test(second_party_info['link_phone'])) {
|
|
|
layer.msg("乙方联系电话必须有效");
|
|
|
return;
|
|
|
}
|
|
|
if (!second_party_info["bank_account"]) {
|
|
|
layer.msg("银行账号不能为空");
|
|
|
return;
|
|
|
}
|
|
|
if (!second_party_info["opening_bank"]) {
|
|
|
layer.msg("开户行不能为空");
|
|
|
return;
|
|
|
}
|
|
|
if(!second_party_info['address']) {
|
|
|
layer.msg("邮寄地址不能为空");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if(!first_party_info['jfPerson']) {
|
|
|
layer.msg("甲方联系人不能为空");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if(!myreg.test(first_party_info['jfTel'])) {
|
|
|
layer.msg("甲方联系电话必须有效");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
url: "{:U('StatementMangement/editDownstreamOrderSave')}",
|
|
|
type: "post",
|
|
|
data: {"second_party_info": second_party_info,"first_party_info":first_party_info,
|
|
|
"statement_info":pushStatement,"sum_data":sumData,"ext_field":ext_field,"company_id":company_id},
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
layer.msg(data.msg);
|
|
|
setTimeout(function(){
|
|
|
window.parent.reload();
|
|
|
},1500);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
})
|
|
|
|
|
|
function number_chinese(str) {
|
|
|
var num = parseFloat(str);
|
|
|
var strOutput = "",
|
|
|
strUnit = '仟佰拾亿仟佰拾万仟佰拾元角分';
|
|
|
num += "00";
|
|
|
var intPos = num.indexOf('.');
|
|
|
if (intPos >= 0){
|
|
|
num = num.substring(0, intPos) + num.substr(intPos + 1, 2);
|
|
|
}
|
|
|
strUnit = strUnit.substr(strUnit.length - num.length);
|
|
|
for (var i=0; i < num.length; i++){
|
|
|
strOutput += '零壹贰叁肆伍陆柒捌玖'.substr(num.substr(i,1),1) + strUnit.substr(i,1);
|
|
|
}
|
|
|
return strOutput.replace(/零角零分$/, '整').replace(/零[仟佰拾]/g, '零').replace(/零{2,}/g, '零').replace(/零([亿|万])/g, '$1').replace(/零+元/, '元').replace(/亿零{0,3}万/, '亿').replace(/^元/, "零元")
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |