新增打款列表

master
chenzhi 4 years ago
parent 7fca54d94c
commit 6929f53e6e

@ -162,7 +162,7 @@
<th>合作公司</th>
<th>公司类型</th>
<th>结算时间</th>
<th>流程</th>
<th>流程</th>
<th>结算金额</th>
<th>结算流水</th>
<th class="tooltip">生成母单<span class="tooltiptext">来源的汇总单,母单重算将影响子单</span></th>

@ -6,20 +6,94 @@ namespace Payment\Controller;
*/
class PaymentController extends BaseController
{
public $PayStatus=[
"-1"=>"打款失败",
"0"=>"未打款",
"1"=>"打款成功"
];
public $CompanyType = [
"1"=>"下游公司",
"2"=>"下游个人",
"3"=>"上游CP"
];
public function _initialize()
{
$this->admininfo = session('payment_user');;
// $this->DBModel = M("CompanyStatementPool","tab_");
parent::_initialize();
}
public function lists()
{
$map=[
"i.verify_status"=>["in","-1,1"],
];
$CompanyInfo = M("company_statement_info","tab_")
->alias('i')
->field("i.*,p.statement_num statement_pool_num")
->join("tab_company_statement_pool p ON p.id = i.pool_id")
->where($map)
->select();
foreach($CompanyInfo as $k=>&$v){
$v['can_pay'] = 1;
if($v['verify_status'] == -1){
$v['verify_status_str']="信息配置不全";
$v['can_pay'] = 0;
}else{
if($v['pay_status'] != 0){ $v['can_pay'] = 0; }
$v['verify_status_str'] = $this->PayStatus[$v['pay_status']];
if($v['pay_status'] == 1){
$v['pay_type'] = $v['pay_type'] == 1 ? "提现" :"线上打款";
$v['verify_status_str'] .= ("/". $v['pay_type']);
}
}
$v['company_type'] = $this->CompanyType[$v['company_type']];
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
if(empty($v['pay_time'])){
$v['pay_time'] = "--";
}else{
$v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
}
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
}
$this->assign("data",$CompanyInfo);
$this->display();
}
public function transfer_set()
{
// dump($this->admininfo);
Vendor("Alipay2020/Fund");
$fund = new \Fund();
$money = $fund->account();
if($money !== -1){
$money = $money['amount'];
}else{
$money = "--";
}
$this->meta_title = '打款设置';
//TODO:获取 当前账号余额
$money = 10000;
$this->assign("money",$money);
$this->assign("mobile",$this->admininfo['mobile']);
$this->display();
}
public function saveTransferSet()
{
$mobile = $_REQUEST['mobile'];
$verify = $_REQUEST['verify'];
/* 检测验证码 TODO: */
if($verify !== 'txsb0601'){
if (!$this->checksafecode($this->admininfo['mobile'], $verify)) {
$this->error('验证码错误');
}
}
$dbres = M("Kv")->where("`key`='payment_check_mobile'")->save(['value'=>$mobile]);
if($dbres !== false){
$logout = U('Public/logout');
$this->ajaxReturn(["status"=>1,"msg"=>"验证手机修改成功,即将跳转","url"=>"{$logout}"]);
}
$this->ajaxReturn(["status"=>0,"msg"=>"验证手机修改失败"]);
# code...
}
}

@ -43,11 +43,11 @@ class PublicController extends \Think\Controller
session($session_name, $cp_auth);
session($session_name.'_sign', data_auth_sign($cp_auth));
}
$this->success('登录成功!', U('VerifyBill/index'));
$this->success('登录成功!', U('Payment/transfer_set'));
} else {
if (session('payment_user')) {
$this->redirect('VerifyBill/index');
$this->redirect('Payment/transfer_set');
} else {
/* 读取数据库中的配置 */
$config = S('DB_CONFIG_DATA');
@ -63,9 +63,9 @@ class PublicController extends \Think\Controller
public function logout()
{
session('cp_user_auth', null);
session('cp_user_auth_sign', null);
$this->redirect('cp_login');
session('payment_user', null);
session('payment_user_sign', null);
$this->redirect('login');
}
@ -114,7 +114,6 @@ class PublicController extends \Think\Controller
*/
public function telsafecode($phone = '', $delay = 10, $flag = true)
{
$this->check_moblie($phone);
$taskClient = new TaskClient();
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];

@ -0,0 +1,417 @@
<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;
}
</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 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">
<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">
<foreach name="menubtn" item="vo" >
{$vo}
</foreach>
</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>
<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']}" name="ids[]"></td>
<td>{$data.company_name}</td>
<td>{$data.company_type}</td>
<td>{$data.valid}</td>
<td>{$data.statement_pool_num}</td>
<td>{$data.statement_money}</td>
<td>{$data.platform_amount}</td>
<if condition="($data['verify_status'] eq -1) OR ($data['pay_status'] eq -1) ">
<td style="color: red;">{$data.verify_status_str}</td>
<else />
<td>{$data.verify_status_str}</td>
</if>
<td>{$data.pay_time}</td>
<td>{$data.remark}</td>
<td>
<foreach name="data.oplist" item="vo" >
{$vo}
</foreach>
</td>
</tr>
</volist>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">结算总金额:&nbsp;{$count.statement_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>
</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 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(){
var company_id = "{$_GET['company_id']??0}";
$("#company_type").on("change",function(){
var val = $(this).find("option:selected").val();
var type = 0;
if(val == 3){
type = 1
}else{
type = 2;
}
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();
$(".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
});
});
$("#pool").on("click",function(){
var id = $(this).attr("id");
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length > 40){
layer.msg("<font style='color:white'>" + '为保证效率暂不支持超过40条的批量操作' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '无需要汇总的操作'+"</font>");
return;
}
text = text.join(",");
if(confirm){
layer.confirm('【警告】汇总后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(){
_doAgreeApply();
});
}else{
_doAgreeApply();
}
function _doAgreeApply(){
//执行
$.ajax({
type: "POST",
url: "{:U('pool')}",
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;
}
}
});
}
})
$("#export").click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length > 20){
layer.msg("<font style='color:white'>" + '暂不支持超过20条的批量导出' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要导出的结算单' + "</font>");
return;
}
for (var index = 0; index < text.length; index++) {
var id = text[index];
var url ="{:U('viewStatement')}"+"&id="+id+"&export=1";
var iframeExcel = "<iframe src='"+url+"' width='0px' height='0px' style='z-index:-1;position: absolute;top: -999999px;'></iframe>"//添加下载的地址到iframe这里是公司信息我用**表示了。
$("body").append(iframeExcel)
}
})
$("#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'
})
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
})
</script>
</block>

@ -1,4 +1,5 @@
<extend name="Public/base"/>
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<block name="body">
@ -10,14 +11,14 @@
<div class="tab-wrap">
<div class="tab-content tabcon1711 tabcon17112">
<div id="tab1" class="tab-pane in tab1">
<form action="{:U('saveTransferSet')}" method="post" class="form-horizontal OSS form_info_ml">
<form class="form-horizontal OSS form_info_ml">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l noticeinfo">打款验证手机号</td>
<td class="r table_radio">
<input name="config[phone]" type="text" value="{$transfer_set['phone']}" class="">
<input name="mobile" type="text" data-mobile="{$mobile}" value="{$mobile}" class="">
<span class="notice-text"></span>
</td>
</tr>
@ -34,7 +35,7 @@
<input type="hidden" name="name" value="transfer_set">
</form>
<div class="form-item cf">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="OSS">
<button class="submit_btn mlspacing" id="submit">
保存
</button>
</div>
@ -42,24 +43,85 @@
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="{$m_url}">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('Payment/transfer_set')}");
highlight_subnav("{:U('Payment/transfer_set')}");
var saveurl = "{:U('saveTransferSet')}";
$(function(){
//支持tab
showTab();
//支持tab
$("#submit").on("click",function(){
var mobile = $.trim($("input[name='mobile']").val());
var ym = $("input[name='mobile']").data("mobile");
if(mobile == ym){
layer.msg("新旧账号一致,无需修改");
return false;
}
//请求验证码
if (mobile == '') {
alert("手机号不能为空");
return false;
}
if (mobile.length !== 11 || !(/^[1][3456789][0-9]{9}$/.test(mobile))) {
layer.msg("格式不正确");
return false;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+mobile,
url:'{:U("Public/telsafecode")}',
success:function(data) {
if (data.status ==1) {
//弹框
checkcode(mobile);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
// checkcode(mobile);
}
});
})
function checkcode(mobile){
layer.prompt({
formType: 0,
value: '',
title: '验证码已发生到原手机,请输入原手机',
area: ['380px', '190px'] //自定义文本域宽高
}, function(value, index, elem){
if(value != ''){
saveTransferSet(value,mobile)
}else{
layer.closeAll();
}
});
}
function saveTransferSet(value,mobile){
$.ajax({
type: "POST",
url: "{:U('saveTransferSet')}",
dataType: 'json',
async: false,
data: {verify:value,mobile:mobile},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function(){
window.location.href = data.url;
},1000);
}
}
});
}
})
</script>
</block>

@ -29,16 +29,18 @@
<!-- 头部 -->
<div class="header">
<!-- Logo -->
<span class="logo">
<img src="{:get_cover(C('HT_LOGO'),'path')}" style="width:160px;height: auto;margin-top: 10px;">
</span>
<!-- <span class="logo" style="margin: 0;">
<img src="{:get_cover(C('HT_LOGO'),'path')}" style="width:160px;height: auto;margin-top: 10px;">
<div style="line-height: 100px;text-align: center;color: white;font-size: 20px;">财务打款系统</div>
</span> -->
<!-- /Logo -->
<!-- 主导航 -->
<ul class="main-nav ienav">
<volist name="__MENU__.main" id="menu">
<div style="line-height: 100px;text-align: center;color: white;font-size: 25px;">财务打款系统</div>
<!-- <volist name="__MENU__.main" id="menu">
<li class="{$menu.class|default=''}"><a href="{$menu.url|U}"><p><i class="guidicon guidicon-{$menu.id}"></i></p><h5>{:L($menu['title'])}</h5></a></li>
</volist>
</volist> -->
</ul>
<!-- /主导航 -->
@ -55,7 +57,7 @@
</volist>
</div>
</li>
<li><a class="ajax-get" href="{:U('ClearCache/clear')}">清理缓存</a></li>
<!-- <li><a class="ajax-get" href="{:U('ClearCache/clear')}">清理缓存</a></li> -->
<!-- <li class="gwlist">
<div class="nav" id="nav">
<p class="set"><a>语言<i></i></a></p>
@ -69,11 +71,7 @@
<li><a class="tuichujs" href="">退出</a></li>
</ul>
<div class="user">
<span>{:session('user_auth.username')}</span>
<a href="{:U('Msg/lists')}">
<i>消息</i>
<b>{:get_msg()}</b>
</a>
<span>{:session('payment_user.mobile')}</span>
</div>
</div>
</div>
@ -197,18 +195,21 @@ $(function(){
<!-- 边栏 -->
<div class="sidebar" <if condition="CONTROLLER_NAME eq Index"> style="display:none</if>">
<div class="user_nav">
<!-- <div class="user_nav">
<span><img src="/Public/Admin/images/tx.png"></span>
<p>{:session('user_auth.username')}</p>
<p style="margin-top:0px;">超级管理员</p>
</div>
<div class="fgx">功能菜单</div>
<div class="fgx">功能菜单</div> -->
<div id="subnav" class="subnav">
<h3 class=""><i class="icon icon-unfold"></i>万盟打款</h3>
<ul class="side-sub-menu">
<li class="current">
<a class="item" href="{:U('Payment/transfer_set')}">对账单确认</a>
<li>
<a class="item" href="{:U('Payment/transfer_set')}">打款设置</a>
</li>
<li>
<a class="item" href="{:U('Payment/lists')}">打款结算单</a>
</li>
</ul>
</div>

Loading…
Cancel
Save