master
sunke 5 years ago
parent d2cb9b9a2b
commit 426d8e4fae

@ -72,6 +72,12 @@ class DownloadController extends BaseController {
}
public function listsIndex($p = 0) {
$nowTime = date('Y-m-d');
$initBegTime = empty(I('begtime')) ? '' : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? '' : I('endtime');
$this->assign('begtime',$initBegTime);
$this->assign('endtime',$initEndTime);
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$res = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
@ -114,9 +120,10 @@ class DownloadController extends BaseController {
$endtime = strtotime($_REQUEST['endtime']);
}
$map['addtime'] = array('BETWEEN',array(strtotime($_REQUEST['begtime']),$endtime));
}
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
$row=10;
$rs = M('downloadlog','tab_')->where($map)->order('tab_downloadlog.addtime desc')
->page($page, $row)->select();
@ -142,11 +149,19 @@ class DownloadController extends BaseController {
//分页
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$parameter['dataname'] = $_REQUEST['dataname'];
$parameter['logid'] = $_REQUEST['logid'];
$parameter['begtime'] = I('begtime');
$parameter['endtime'] = I('endtime');
$parameter['level_promote_2'] = $levelPromote[0];
$parameter['level_promote_3'] = $levelPromote[1];
$parameter['level_promote_4'] = $levelPromote[2];
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('data',$rs);
$this->assign('promoteNameArr',$promoteNameArr);
return $this->display();
}
@ -1710,7 +1725,6 @@ class DownloadController extends BaseController {
$this->orderlistExcelInfo($id,$map);
break;
default:
var_dump('ss');die();
break;
}

@ -80,7 +80,7 @@ class FinanceController extends BaseController
//是否是会长
$this->purview();
//验证安全密码
$metaTitle = '结算明细';
$metaTitle = '结算中心';
$modelList = ['财务管理', $metaTitle];
$this->verifyPasswordView($modelList);

@ -1,10 +1,35 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/manager.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css?v=1.2" rel="stylesheet">
</block>
<block name="body">
<style>
@media screen and (max-width: 1500px) {
.normal_form {
padding-top: 45px;
}
.trunk-search .normal_txt {
width: 100px
}
.select2-container--default .select2-selection--single {
width: 125px;
}
.trunk-search .select-time .txt {
width: 100px;
}
.form-group .submit {
width: 55px;
}
}
.selected-color {
color: #2bd8ed;
}
@ -20,18 +45,22 @@
float: right;
right: 10px;
}
.current {
display: inline-block;
margin-right: 10px;
padding-left: 10px;
padding-right: 10px;
height: 34px;
border: 1px solid #E5E5E5;
color: red;
border-radius: 4px;
line-height: 34px;
text-align: center;
.th-hide {
display: none;
}
.form-group {
float: left;
margin-bottom: 10px;
}
.form-group label {
line-height: 34px;
height: 34px;
}
.form-group .txt {
width: 180px;
height: 34px;
}
.chakan {
display: inline-block;
@ -47,40 +76,33 @@
}
</style>
</block>
<block name="body">
<div class="page-search normal_list query-register-search">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>下载管理></span><span>控制台</span></div>
</div>
<img src="__IMG__/20180207/icon_zhuce.png">
<span class="title_main">下载日志</span>
<span class="details">记录数据管理中导出数据事件</span>
</div>
<div class="page-search normal_list query-recharge-search jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>下载管理></span><span>控制台</span></div>
</div>
<img src="__IMG__/20180207/icon_zhuce.png">
<span class="title_main">下载日志</span>
<span class="details">记录数据管理中导出数据事件</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('download/listsIndex')}" method="post" enctype="multipart/form-data">
<div class="tab normal_tab">
</div>
<!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> -->
<div class="form-group fl">
<div class="form-group normal_space">
<input type="text" name="dataname" class="txt normal_txt" id="uid" placeholder="请输入数据名称"
value="{:I('dataname')}">
</div>
<div class="form-group fl" style='margin-left:10px'>
<div class="form-group normal_space" style='margin-left:10px'>
<input type="text" name="logid" class="txt normal_txt" id="lid" placeholder="输入日志编号"
value="{:I('logid')}">
</div>
<!-- <div class="form-group fl" style="margin-left:10px">
<select id="pid" name="pid" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="0">请选择推广员</option>
<volist name="promoteNameArr" id="vo">
<option value="{$vo.promote_id}" title="{$vo.name}">{$vo.name}</option>
</volist>
</select>
</div>-->
<input type="hidden" id="top-promote-id" value="{$loginer.id}">
<input type="hidden" id="top-promote-id" value="{$loginer.id}">
<if condition="$loginer.level elt 1">
<div class="form-group fl" style="margin-left:10px">
<select name="level_promote_2" class="level-promote reselect select_gallery" style="width: 220px;" data-level="2" data-val="{:I('level_promote_2', 0)}">
@ -103,81 +125,82 @@
</div>
</if>
<div class="form-group normal_space fl">
<label class="form-title select-title" style="position: relative;">申请时间:</label>
<div class="select-time">
<input type="text" id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}" autocomplete="off">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="edate" class="txt" name="endtime" placeholder="结束时间" value="{:I('endtime')}" autocomplete="off">
</div>
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' value="查询">
<div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">下载时间:</label>
<div class="select-time">
<input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{:I('begtime')}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{:I('endtime')}">
</div>
</div>
</form>
<div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('download/listsindex','model='.$model['name'],false)}"
value="查询">
</div>
<!-- </form> -->
</div>
</div>
<div class="page-list query-register-list">
<div class="trunk-content article">
<div class="trunk-list list_normal" style="">
<table class="table normal_table">
<tr class="odd">
<th>ID</th>
<th>报表类型</th>
<th>操作人</th>
<th>申请时间</th>
<th>下载时间</th>
<th>状态</th>
</tr>
<empty name="data">
<tr class="num2">
<td colspan="8" style="text-align: center;height: 45vh;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</td>
</tr>
<else/>
<volist name="data" id="vo">
<tr class="num2">
<td>{$vo.logid}</td>
<td>{$vo.dataname}</td>
<td>{$vo.actor}</td>
<td>{$vo.addtime|date='Y-m-d H:i:s',###}</td>
<td>
<if condition="$vo['begintime'] neq 0">
{$vo.begintime|date='Y-m-d H:i:s',###}
<else />
暂无下载时间
</if>
<div class="page-list apply-app_apply-list query-recharge-list">
<div class="trunk-content article" style="margin-left: 0;margin-right: 0;">
<div class="tabcon trunk-list">
<table class="table normal_table">
<tr class="odd">
<th>ID</th>
<th>报表类型</th>
<th>操作人</th>
<th>申请时间</th>
<th>下载时间</th>
<th>状态</th>
</tr>
<empty name="data">
<tr class="num2">
<td colspan="8" style="text-align: center;height: 45vh;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</td>
<td>
<if condition="$vo['status'] eq 0">
<form action="{:U('download/export',array('conditions'=>$vo['conditions'],'id'=>$vo['id'],'dataname'=>$vo['dataname']))}" method="post" id="downloadForm">
<a style="cursor: pointer" onclick="reload()" target="_blank"
class="chakan"><span>可下载</span></a>
</form>
<else /> <a href="javascript:;" class="current"><span style="color:#9D9D9D">已下载</span></a>
</if>
</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$_page}
</tr>
<else/>
<volist name="data" id="vo">
<tr class="num2">
<td>{$vo.logid}</td>
<td>{$vo.dataname}</td>
<td>{$vo.actor}</td>
<td>{$vo.addtime|date='Y-m-d H:i:s',###}</td>
<td>
<if condition="$vo['begintime'] neq 0">
{$vo.begintime|date='Y-m-d H:i:s',###}
<else />
暂无下载时间
</if>
</td>
<td>
<if condition="$vo['status'] eq 0">
<form action="{:U('download/export',array('conditions'=>$vo['conditions'],'id'=>$vo['id'],'dataname'=>$vo['dataname']))}" method="post" id="downloadForm">
<a style="cursor: pointer" onclick="reload()" target="_blank" class="chakan"><span>可下载</span></a>
</form>
<else /> <a href="javascript:;" class="current"><span style="color:#9D9D9D">已下载</span></a>
</if>
</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
@ -186,15 +209,21 @@
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript">
var promoteUrl = "{:U('Query/getSubPromotes')}"
initPromoteSelect(promoteUrl)
$().ready(function () {
setValue('team_leader_id', {$Think.request.team_leader_id |default = '""'});
setValue('promote_id', {$Think.request.promote_id |default = 0});
setValue('row', '{:I("get.row",10)}');
$("#pagehtml a").on("click", function (event) {
event.preventDefault();//使a自带的方法失效即无法调整到href中的URL(http://www.baidu.com)
var geturl = $(this).attr('href');
$('#data_form').attr('action', geturl);
$('#data_form').submit();
});
var date = "{$setdate}";
$('#sdate').datetimepicker({
format: 'yyyy-mm-dd',
@ -219,49 +248,40 @@
endDate: date
});
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');
$('#submit').click(function () {
var sdate = Date.parse($('#sdate').val()) / 1000;
var edate = Date.parse($('#edate').val()) / 1000;
if (ownId > 0) {
checkBox.removeClass('iconfangxingxuanzhongfill');
checkBox.removeClass('selected-color');
checkBox.addClass('iconfangxingweixuanzhong');
if (sdate > edate) {
layer.msg('开始时间必须小于等于结束时间', {icon: 5});
return false;
}
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天请重新选择日期', {icon: 5});
return false;
}
$('#own_id').val(0);
var url = $(this).attr('url');
console.log(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 {
checkBox.removeClass('iconfangxingweixuanzhong');
checkBox.addClass('iconfangxingxuanzhongfill');
checkBox.addClass('selected-color');
$('#own_id').val({$pID});
url += '?' + query;
}
});
console.log(url)
window.location.href = url;
$("#pagehtml a").on("click", function (event) {
event.preventDefault();//使a自带的方法失效即无法调整到href中的URL(http://www.baidu.com)
var geturl = $(this).attr('href');
$('#data_form').attr('action', geturl);
$('#data_form').submit();
});
$(".select_gallery").select2();
$('.submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
});
});
</script>
<script>
setValue('pid', {$Think.request.pid |default = '""'});
</script>
<script>
function reload() {
function reload() {
document.getElementById('downloadForm').submit()
setTimeout(function(){ window.location.reload(); }, 7000);
}

Loading…
Cancel
Save