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.

798 lines
33 KiB
HTML

<extend name="Public/base"/>
<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>
.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;
}
/* .data_list table td{
line-height: 2;
} */
.layui-layer-title {
text-align: center;
height: 42px;
line-height: 42px;
font-weight: 400;
font-size: 14px;
}
.tooltip {
position: relative;
/* display: block; */
/* color: #056dae; */
}
.tooltip .tooltiptext {
display: none;
width: 100%;
background-color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 10px 5px 5px;
position: absolute;
z-index: 1;
bottom: 80%;
left: 0;
border: #000 solid 1px;
line-height: 20px;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
color: #333;
display: block;
}
.page .sch-btn:before{
content: '';
padding: 0;
}
::-webkit-scrollbar {
width: 3px;
height: 3px;
}
::-webkit-scrollbar-track {
border-radius: 3px; /*滚动条的背景区域的圆角*/
}
::-webkit-scrollbar-thumb {
border-radius: 3px; /*滚动条的圆角*/
background-color: #ccc; /*滚动条的背景颜色*/
}
::-webkit-scrollbar-thumb:hover {
background-color: #bbb;
}
::-webkit-scrollbar-thumb:active {
cursor: pointer;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">线下打款</h3>
<p class="description_text">批次号指同一表格上传的打款单</p>
</div>
<div class="cf top_nav_list" style="height: 38px;">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list" style="margin-bottom: 0">
<div class="input-list">
<input type="text" name="company_name" placeholder="请输入公司名称模糊搜索" value="{:I('company_name')}" style="width: 180px;">
</div>
5 years ago
<!-- <div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="结算开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="datetimepicker" name="time_end" class="" value="{:I('time_end')}" placeholder="结算结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
5 years ago
</div> -->
<div class="input-list input-list-promote search_label_rehab">
<select id="pay_status" name="pay_status" class="select_gallery" >
<option value="">支付状态</option>
<volist name="PayStatus" id="vo">
<option value="{$key}" <if condition="isset($_GET['pay_status']) && $key eq I('pay_status')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
5 years ago
<div class="input-list">
5 years ago
<input type="text" name="batch_num" placeholder="批次号" value="{:I('batch_num')}" style="width: 180px;">
5 years ago
</div>
<div class="input-list">
<input type="text" readonly id="time_start2" name="pay_time_start" class="" value="{:I('pay_time_start')}" placeholder="支付开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="datetimepicker2" name="pay_time_end" class="" value="{:I('pay_time_end')}" placeholder="支付结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list">
<input type="text" readonly id="verifytime_start" name="verifytime_start" class="" value="{:I('verifytime_start')}" placeholder="审核开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" style="display:inline-block">
<input type="text" readonly id="verifytime_end" name="verifytime_end" class="" value="{:I('verifytime_end')}" placeholder="审核结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<if condition="session('payment_user.is_payment') eq 1">
<a class='butn' id='doPayment'>打款</a>
</if>
<a class='butn' id='leadExcel'>Excel导入</a>
5 years ago
<a class='butn' id='export'>导出</a>
<!-- <a class='butn verify' data-value='1'>审核通过</a>-->
<!-- <a class='butn verify' data-value='2'>审核拒绝</a>-->
<!-- <a class='butn return_verify' data-value='0' style="background-color: red;">审核撤回</a>-->
5 years ago
<a class='butn' id='delItem' style="background-color: red;">批量删除</a>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>合作公司</th>
<th>公司类型</th>
5 years ago
<th>创建时间</th>
<th>批次号</th>
<th>结算金额</th>
<th>审批状态</th>
<!-- <th>结算流水</th>-->
<th>打款状态</th>
<th>支付时间</th>
<th>预打款备注</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<if condition = "empty($data)">
<tr>
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data['id']}" data-pay="{$data['can_pay']}" data-paystatus="{$data.pay_status}" name="ids[]" data-verifystatus="{$data.verify_status}"></td>
<td>{$data.company_name}</td>
<td>{$data.company_type}</td>
5 years ago
<td>{$data.create_time}</td>
<td>{$data.batch_num}</td>
<td>{$data.statement_money}</td>
<td <if condition="$data.verify_status eq 2">style="color: red"</if>>{$data.verify|default='---'}</td>
<!-- <td>{$data.platform_amount}</td>-->
<if condition="($data['pay_status'] eq -1) ">
<td style="color: red;">{$data.pay_status_str}</td>
<else />
<td>{$data.pay_status_str}</td>
</if>
<td>{$data.pay_time}</td>
<td>{$data.remark}</td>
<td>
<a class='confirm viewPool' data-id='{$data.id}'>查看</a>
5 years ago
<a class='confirm exportPool' data-id='{$data.id}'>导出</a>
<if condition="$data['pay_status'] neq 0">
<a class='confirm paymentInfo' data-id='{$data.id}'>打款详情</a>
</if>
</td>
</tr>
</volist>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">
5 years ago
打款成功金额:&nbsp;{$money.success_money}&nbsp;&nbsp;/&nbsp;&nbsp;待打款金额:&nbsp;{$money.statement_money}&nbsp;&nbsp;/&nbsp;&nbsp;打款失败金额:&nbsp;{$money.error_money}
</td></tr>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<!-- <a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
</if>
{$_page|default=''}
</div>
<div style="width: 800vw;height:600vh;padding: 0;position: absolute;top: 0;z-index: 9999;background-color:rgba(0,0,0,.6);right: 1px;display: none" id="window">
<div class="layui-layer layui-layer-hui" style="width:800px;height:440px;z-index: 19891015; top:28%; left:35%;border-radius: 2%;background-color:white;color: #0a001f;">
<div style="padding: 15px 30px 15px 20px;font-size: 28px;">打款提示</div>
<div class="layui-layer-content" style="font-size: 22px;padding: 0 25px;">您所选打款单与以下打款单可能存在重复,请谨慎操作</div>
<!-- <div style="padding: 0 25px">-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">公司</span></span>-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">结算时间</span></span>-->
<!-- <span style="width: 135px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;border-right:none;"><span style="display: block;padding: 6px 10px">结算金额</span></span>-->
<!-- <span style="width: 136px;display: block;float: left;height: 30px;text-align: center;border:#c7c7c7 1px solid;"><span style="display: block;padding: 6px 10px">支付时间</span></span>-->
<!-- </div>-->
<div class="layui-layer-content" style="font-size: 22px;padding: 5px 25px;height: 200px;overflow-x:hidden;overflow-y:scroll">
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>公司</th>
<th>结算时间</th>
<th>结算金额</th>
<th>支付时间</th>
</tr>
</thead>
<!-- 列表 -->
<tbody id="tbody">
<tr>
<td >13214</td>
<td>13214</td>
<td>13214</td>
<td>13214</td>
</tr>
<tr>
<td >13214</td>
<td>13214</td>
<td>13214</td>
<td>13214</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div style="text-align: right;margin-top: 20px">
<div style="font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;background: white;border: 1px solid black;color: black" id="back">返回</a>
</div>
</div>
</div>
<div style="padding: 0 20px 0 0;font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;" id="commit">继续打款</a>
</div>
</div>
</div>
</div>
</div>
</div>
</block>
<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 src="__STATIC__/laydate/laydate.js" type="text/javascript"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
<script type="text/javascript">
</script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('lists')}");
function reload() {
window.location.reload();
}
function closeLayer(pay_status) {
layer.closeAll();
if (pay_status == 1) {
layer.msg("<font style='color: white'>打款成功</font>");
} else {
layer.msg("<font style='color: white'>打款失败</font>");
}
setTimeout(function () {
window.location.reload();
},2000);
}
$(function(){
$("#back,#window").click(function() {
$('#window').hide();
});
$(".viewPool").click(function () {
var id = $(this).data("id");
var url = "{:U('viewPool')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$(".return_verify").click(function () {
var status = $(this).data('value');
var verifytip = 0;
var paytip = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
var pay_status = $(elem).data('paystatus');
if (verifystatus == 0) {
verifytip = 1;
return ;
}
if (pay_status != 0) {
paytip = 1;
return ;
}
return $(elem).val();
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>" + '请选择已审核的打款单' + "</font>");
return;
}
if (paytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未打款的打款单' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要操作的打款单' + "</font>");
return;
}
layer.confirm('【提示】是否确认取消审核'+((status==1)?'通过':'拒绝'), {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type:'post',
dataType:'json',
data: {'id':text,'status':status},
url:"{:U('verify')}",
success:function(data) {
if (data.status ==1) {
//弹框
layer.msg("<font style='color:white'>审批撤回成功</font>");
setTimeout(function(){
window.location.reload();
},1500);
} else {
layer.msg("<font style='color:white'>审批撤回失败</font>");
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
});
});
$(".verify").click(function () {
var status = $(this).data('value');
var verifytip = 0;
var paytip = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
var pay_status = $(elem).data('paystatus');
if (verifystatus > 0) {
verifytip = 1;
return ;
}
if (pay_status != 0) {
paytip = 1;
return ;
}
return $(elem).val();
}).get();
if (verifytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未审核的打款单' + "</font>");
return;
}
if (paytip == 1) {
layer.msg("<font style='color:white'>" + '请选择未打款的打款单' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要操作的打款单' + "</font>");
return;
}
layer.confirm('【提示】是否确认审核'+((status==1)?'通过':'拒绝'), {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type:'post',
dataType:'json',
data: {'id':text,'status':status},
url:"{:U('verify')}",
success:function(data) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
if (data.status ==1) {
//弹框
setTimeout(function(){
window.location.reload();
},1500);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
});
});
5 years ago
$("#export").click(function () {
var flag = false;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要导出的打款单' + "</font>");
return;
}
_export();
function _export(){
layer.alert("<font style='color:#333'>"+"指令执行成功,等待浏览器响应中..在未确认下载完成前请勿关闭此页面.."+ "</font>");
var id = text.join(",");
var url ="{:U('viewPool')}"+"&id="+id+"&export=1&exporttype=all";
var iframeExcel = "<iframe src='"+url+"' width='0px' height='0px' style='z-index:-1;position: absolute;top: -999999px;'></iframe>"//添加下载的地址到iframe这里是公司信息我用**表示了。
$("body").append(iframeExcel);
}
})
$("#delItem").on("click",function(){
var flag = false;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
if($(elem).data("paystatus") == 1){
flag = true;
}else{
return $(elem).val();
}
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>无可删除数据,支付成功的数据无法删除</font>");
return;
}
text = text.join(",");
layer.confirm('【警告】删除操作将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type: "POST",
url: "{:U('delItem')}",
dataType: 'json',
async: false,
data: {ids:text},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
});
})
$(".exportPool").click(function(){
layer.alert("<font style='color:#333'>"+"指令执行成功,等待浏览器响应中..在未确认下载完成前请勿关闭此页面.."+ "</font>");
var id = $(this).data("id");
var url ="{:U('viewPool')}"+"&id="+id+"&export=1&exporttype=one";
var iframeExcel = "<iframe src='"+url+"' width='0px' height='0px' style='z-index:-1;position: absolute;top: -999999px;'></iframe>"//添加下载的地址到iframe这里是公司信息我用**表示了。
$("body").append(iframeExcel);
})
$(".paymentInfo").on("click",function(){
var id = $(this).data("id");
var url = "{:U('paymentInfo')}"+"&id="+id
layer.open({
type: 2,
title: "打款详情",
shadeClose: true,
shade: 0.8,
5 years ago
area: ['40%', '60%'],
content: url
});
});
function checkPaymentOrder() {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1 && verifystatus == 1){
return $(elem).val();
}
}).get();
console.log(text)
// text = "47,99,100";
$("#tbody").empty();
$.ajax({
type:'post',
dataType:'json',
data: {'ids':text},
url:"{:U('checkOrder')}",
success:function(data) {
if (data.data.length >0) {
var datas = data.data;
var str = "";
$('#window').show();
for (var key in datas) {
str += "<tr><td>" + datas[key]['company_name'] + "</td>"
+ "<td>"+ datas[key]['time'] + "</td>"
+ "<td>"+ datas[key]['statement_money'] + "</td>"
+ "<td>"+ datas[key]['pay_time'] + "</td></tr>";
}
$("#tbody").append(str);
return true;
} else {
doPayment();
return false;
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
})
}
function doPayment() {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
// var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1){
return $(elem).val();
}
}).get();
text = text.join(",");
layer.open({
type: 2,
title: "打款详情",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: "{:U('showPayment')}"+"&ids="+text
});
// window.location.href = "{:U('showPayment')}"+"&ids="+text;
}
$("#commit").on("click",function () {
doPayment();
});
$("#doPayment").on("click",function(){
var verifytip = 0;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
var verifystatus = $(elem).data('verifystatus');
if($(elem).data("pay") == 1){
return $(elem).val();
}
// if (verifystatus != 1) {
// verifytip = 1;
// }
}).get();
// if (verifytip == 1) {
// layer.msg("<font style='color:white'>审核通过方能打款</font>");
// return;
// }
if(text.length < 1){
5 years ago
layer.msg("<font style='color:white'>请先选择需要打款的结算单仅大于0.1元的打款单才能进行打款</font>");
return;
}
checkPaymentOrder();
return;
text = text.join(",");
window.location.href = "{:U('showPayment')}"+"&ids="+text;
})
$("#leadExcel").on("click",function(){
window.location.href = "{:U(add)}";
})
$("#search").click(function(){
var start = $("#time_start").val();
5 years ago
var end = $("#datetimepicker").val();
if(start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
5 years ago
var start2 = $("#time_start2").val();
var end2 = $("#datetimepicker2").val();
if(start2 !='' && end2 != ''){
if (Date.parse(start2) > Date.parse(end2)){
layer.msg("<font style='color:white'>支付时间开始时间必须小于等于结束时间</font>");
return false;
}
}
var verifystart = $("#verifytime_start").val();
var verifyend = $("#verifytime_end").val();
if(verifystart !='' && verifyend != ''){
if (Date.parse(verifystart) > Date.parse(verifyend)){
layer.msg("<font style='color:white'>审核时间开始时间必须小于等于结束时间</font>");
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;
});
laydate.render({
elem: '#time_start'
// ,position: 'static'
});
laydate.render({
elem: '#datetimepicker'
});
laydate.render({
elem: '#time_start2'
});
laydate.render({
elem: '#datetimepicker2'
});
laydate.render({
elem: '#verifytime_start'
});
laydate.render({
elem: '#verifytime_end'
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
})
</script>
</block>