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.

432 lines
19 KiB
HTML

5 years ago
<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;
}
5 years ago
.data_list table td{
line-height: 2;
}
5 years ago
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">联运平台结算单管理</h3>
<p class="description_text" id="order_url"></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-list-promote search_label_rehab">
<select id="company_type" name="company_type" class="select_gallery" >
<option value="">请选择公司类型</option>
<volist name="CompanyType" id="vo">
<option value="{$key}" <if condition="isset($_GET['company_type']) && $key eq I('company_type')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">请先选择公司类型</option>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="company_belong" name="company_belong" class="select_gallery" >
<option value="">结算单类型</option>
<volist name="CompanyBelong" id="vo">
<option value="{$key}" <if condition="isset($_GET['company_belong']) && $key eq I('company_belong')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="withdraw_type" name="withdraw_type" class="select_gallery" style="width:150px;">
<option value="">结算周期</option>
<option value="0">周结</option>
<option value="1">月结</option>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="withdraw_type" name="withdraw_type2" class="select_gallery" style="width:150px;">
<option value="">结算类型</option>
<option value="1">正常计算</option>
<option value="2">补点</option>
</select>
</div>
<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" 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>
<div class="input-list input-list-promote search_label_rehab">
<select id="verify_status" name="verify_status" class="select_gallery" >
<option value="">请选择审核状态</option>
<volist name="VerifyStatus" id="vo">
<option value="{$key}" <if condition="isset($_GET['verify_status']) && $key eq I('verify_status')">selected</if> >{$vo}</option>
</volist>
</select>
</div>
<div class="input-list">
<input type="text" readonly id="time_start2" name="time_start2" class="" value="{:I('time_start2')}" placeholder="操作开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" id="datetimepicker2" style="display:inline-block">
<input type="text" readonly id="time_end2" name="time_end2" class="" value="{:I('time_end2')}" 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">
5 years ago
<foreach name="menubtn" item="vo" >
{$vo}
</foreach>
5 years ago
</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>
<th>结算类型</th>
<th>结算金额</th>
5 years ago
<th>结算流水</th>
<th>创建记录</th>
5 years ago
<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>
5 years ago
<td ><input class="ids" type="checkbox" data-status="{$data.verify_status}" value="{$data['id']}" name="ids[]"></td>
5 years ago
<td>{$data.company_name}</td>
5 years ago
<td>{$data.company_belong}</td>
<td>{$data.valid}</td>
<td>{$data.withdraw_type_1}</td>
<td>{$data.withdraw_type_2}</td>
5 years ago
<td>{$data.statement_money}</td>
5 years ago
<td>{$data.platform_amount}</td>
<td>{$data.create}</td>
5 years ago
<td>
<if condition="$data.verify_status eq -1 ">
<div style="line-height: 2;color: red;">
{$data.verify}
</div>
<else />
<div style="line-height: 2;">
{$data.verify}
</div>
</if>
</td>
5 years ago
<td>{$data.launch}</td>
<td>{$data.confirm}</td>
<td>{$data.pool}</td>
5 years ago
<td>
5 years ago
<foreach name="data.oplist" item="vo" >
{$vo}
</foreach>
5 years ago
</td>
</tr>
</volist>
5 years ago
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">结算总金额:&nbsp;{$count.statement_money}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;结算总流水:&nbsp;{$count['platform_amount']}&nbsp;(补点不重复统计在内)</td></tr>
5 years ago
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn" href="{:U('Export/promote_list',array_merge(['xlsname'=>'推广员管理_推广员列表'.((I('type',1)==2)?'_混服申请':'_推广员列表')],I('get.')))}">导出</a>
</if>
{$_page|default=''}
</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 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>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('StatementMangement/lists')}");
function reload() {
window.location.reload();
}
$(function(){
var company_id = "{$_GET['company_id']??0}";
$("#company_type").on("change",function(){
var type = $(this).find("option:selected").val();
var url = "{:U('Ajax/getCompanyList')}"+"&company_type="+type;
$.get(url,function(data){
var company = data;
var companystr = '<option value="">请选择合作公司</option>';
for (var i in company) {
if(company[i].id == company_id){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].name + "</option>"
}
}
$("#company_id").html(companystr);
$("#company_id").select2();
})
})
$("#company_type").change();
//设置对账网址
var order_url = window.location.protocol+"//"+window.location.host+"/admin.php?s=/Public/cp_login.html";
$("#order_url").html("流程说明:结算自动生成对账单--->财务审核对账单--->发起对外对账--->合作方进行确认--->进入报销流程【合作方确认地址:"+order_url+"】");
5 years ago
$(".viewStatement").click(function () {
var id = $(this).data("id");
var url = "{:U('viewStatement')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$(".editStatement").click(function () {
var id = $(this).data("id");
var url = "{:U('editStatement')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
5 years ago
$("#verifyAgree,#verifyRefuse,#launch,#pool,#updateStatement,#export").on("click",function(){
var id = $(this).attr("id");
if(id == "verifyAgree"){
var opname = "审批通过";
var opurl = "{:U('verifyAgree')}";
var opst ="[未进行审批]";
var status = 0;
}else if(id=="verifyRefuse"){
var opname = "审批拒绝";
var opurl = "{:U('verifyRefuse')}";
var opst ="[未进行审批]";
var status = 0;
}else if(id=="launch"){
var opname = "对外发起";
var opurl = "{:U('launch')}";
var opst ="[审批通过]";
var status = 1;
}else if(id=="pool"){
var opname = "发起汇总";
var opurl = "{:U('pool')}";
var opst ="[合作方确认]";
var status = 3;
}
5 years ago
5 years ago
var flag = false;
5 years ago
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
5 years ago
if($(elem).data("status") != status){
flag = true;
}else{
return $(elem).val();
5 years ago
}
}).get().join(",");
5 years ago
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要'+opname+'的申请,仅'+opst+'状态可以进行'+opname+"</font>");
return;
}
if(flag){
layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
_doAgreeApply();
layer.close(index);
});
}else{
_doAgreeApply();
}
function _doAgreeApply(){
//执行
5 years ago
$.ajax({
5 years ago
type: "POST",
url: opurl,
5 years ago
dataType: 'json',
5 years ago
async: false,
data: {ids:text},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
5 years ago
setTimeout(function(){
5 years ago
window.location.reload();
5 years ago
},1500);
}
}
});
5 years ago
}
5 years ago
})
$("#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;
});
$('#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'
})
$('#time_start2').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
$('#datetimepicker2').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();
}
});
5 years ago
5 years ago
})
</script>
</block>