|
|
|
|
<extend name="Public/base" />
|
|
|
|
|
|
|
|
|
|
<block name="body">
|
|
|
|
|
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
|
|
|
|
<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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.butnbox {padding:10px 0 15px;}
|
|
|
|
|
.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 td{
|
|
|
|
|
border-right: 0;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<!-- 标题栏 -->
|
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
|
|
|
|
|
|
|
<h3 class="page_title">财务预警表</h3>
|
|
|
|
|
<p class="description_text">每日凌晨五点自动更新,如需获取时时数据,请手动进行【月份重算】</p>
|
|
|
|
|
</div>
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
<div class="cf top_nav_list">
|
|
|
|
|
<!-- 高级搜索 -->
|
|
|
|
|
<div class="jssearch search_list fl cf" style="margin-bottom: 10px;">
|
|
|
|
|
<div class="input-list search-title-box">
|
|
|
|
|
<label>搜索:</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="input-list input-list-resway search_label_rehab">
|
|
|
|
|
<select id="year" name="year" class="select_gallery" style="width:150px;">
|
|
|
|
|
<volist name="YearList" id="vo">
|
|
|
|
|
<option value="{$vo.value}" <if condition="I('year') && $vo.value eq I('year')">selected
|
|
|
|
|
</if> >{$vo.name}</option>
|
|
|
|
|
</volist>
|
|
|
|
|
</select>
|
|
|
|
|
</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="$is_can">
|
|
|
|
|
<a class='butn' id='updateStatement' style='background-color: #3C95C8;'>月份重算</a>
|
|
|
|
|
</if>
|
|
|
|
|
<a class='butn' href="{:U('edit?act=add')}" style='background-color: #3C95C8;'>新增类目</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 数据列表 -->
|
|
|
|
|
<div class="data_list">
|
|
|
|
|
<div style="display: flex;line-height: 3;justify-content:space-between;">
|
|
|
|
|
<div style="color: red;">
|
|
|
|
|
更新时间:{$last_update}
|
|
|
|
|
</div>
|
|
|
|
|
<div style="color: red;">
|
|
|
|
|
单位:万元
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>项目</th><th>1月</th><th>2月</th><th>3月</th><th>4月</th><th>5月</th><th>6月</th><th>7月</th><th>8月</th><th>9月</th><th>10月</th><th>11月</th><th>12月</th><th>年度合计</th><th>操作</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<volist name="data" id="item" key="type">
|
|
|
|
|
<tr style="background-color: #F0F5F7;border: 0;font-weight: 600;font-size: 14px;">
|
|
|
|
|
<td>{$item.name}</td>
|
|
|
|
|
<for start="0" end="13">
|
|
|
|
|
<td>{$item['count'][$i]}</td>
|
|
|
|
|
</for>
|
|
|
|
|
<td></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<foreach name="item.list" item="vo" key="k" >
|
|
|
|
|
<tr style="background-color: #fff;">
|
|
|
|
|
<td>{$vo['name']}</td>
|
|
|
|
|
<for start="0" end="13">
|
|
|
|
|
<td>{$vo['list'][$i]}</td>
|
|
|
|
|
</for>
|
|
|
|
|
<td>
|
|
|
|
|
<if condition="$vo.is_edit eq 1 ">
|
|
|
|
|
<a href="{:U('edit?act=edit',array('name'=>$vo['name'],'count_year'=>I('year')))}">编辑</a>
|
|
|
|
|
<if condition="($vo['name'] neq '费用') AND ($vo.name neq '其他收入')">
|
|
|
|
|
<a style="color: red;" href="{:U('del',array('name'=>$vo['name'],'count_year'=>I('year')))}" class="confirm ajax-get">删除</a>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
|
|
</volist>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<div style="width: 100%;height: 50px;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/html" id="updateStatementTpl">
|
|
|
|
|
<div style="padding:10px 40px 30px;">
|
|
|
|
|
<spend style="font-size:14px;color:#666;">
|
|
|
|
|
按月份对汇总数据进行重算,任务提交成功后,大约需等待3-5分钟才会完成重算
|
|
|
|
|
</spend>
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" style="margin-top:30px;">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l noticeinfo" style="width:80px;">重算月份:</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<input type="text" id="updateStatementTime" name="updateStatementTime" autocomplete="off" class="date" placeholder="重算月份" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<button class="submit_btn mlspacing" id="updateStatementSubmit" type="submit" style="margin-top:30px;">
|
|
|
|
|
保存
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</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 type="text/javascript">
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
//导航高亮
|
|
|
|
|
highlight_subnav('{:U("lists")}');
|
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function () {
|
|
|
|
|
$(".select_gallery").select2();
|
|
|
|
|
//搜索功能
|
|
|
|
|
$("#search").click(function () {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
var start = $("#time_start").val();
|
|
|
|
|
var end = $("#time_end").val();
|
|
|
|
|
if (start != '' && end != '') {
|
|
|
|
|
if (Date.parse(start) > Date.parse(end)) {
|
|
|
|
|
layer.msg('开始时间必须小于等于结束时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
window.location.href = url;
|
|
|
|
|
});
|
|
|
|
|
$("#updateStatement").on("click",function(){
|
|
|
|
|
var html = $("#updateStatementTpl").html();
|
|
|
|
|
layer.open({
|
|
|
|
|
type: 1,
|
|
|
|
|
title: "汇总重算",
|
|
|
|
|
maxWidth:720,
|
|
|
|
|
closeBtn: 1,
|
|
|
|
|
shadeClose: true,
|
|
|
|
|
content: html,
|
|
|
|
|
success:function(){
|
|
|
|
|
$("#updateStatementSubmit").off("click");
|
|
|
|
|
$("#updateStatementTime").datetimepicker({
|
|
|
|
|
format: 'yyyy-mm',
|
|
|
|
|
language: "zh-CN",
|
|
|
|
|
showMeridian:true,
|
|
|
|
|
pickDate:true,
|
|
|
|
|
startView: 3,
|
|
|
|
|
minView: 3,
|
|
|
|
|
autoclose: true,
|
|
|
|
|
pickTime:true
|
|
|
|
|
});
|
|
|
|
|
$("#updateStatementSubmit").on("click",function() {
|
|
|
|
|
var subtime= $("#updateStatementTime").val();
|
|
|
|
|
if(subtime == ''){
|
|
|
|
|
layer.msg('请先选择要重算的月份');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
var subtimeArr = subtime.split("-");
|
|
|
|
|
|
|
|
|
|
var today = new Date();
|
|
|
|
|
today.setTime(today.getTime());
|
|
|
|
|
var year = today.getFullYear();
|
|
|
|
|
var month = today.getMonth()+1;
|
|
|
|
|
|
|
|
|
|
if(subtimeArr[0] > year){
|
|
|
|
|
layer.msg('要重算的月份必须小于当前时间');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if(subtimeArr[0] == year && subtimeArr[1] >= month){
|
|
|
|
|
layer.msg('要重算的月份必须小于当前月份');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: 'post',
|
|
|
|
|
url: "{:U('updateStatement')}",
|
|
|
|
|
data:{time:subtime},
|
|
|
|
|
success: function(data) {
|
|
|
|
|
if(data.success){
|
|
|
|
|
layer.alert('添加重算任务成功,请2分钟后刷新查看',function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
layer.alert('添加任务失败,已有重算任务。请等待上个重算任务完成');
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(){
|
|
|
|
|
layer.alert("网络错误或超时");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//回车自动提交
|
|
|
|
|
$('.jssearch').find('input').keyup(function (event) {
|
|
|
|
|
if (event.keyCode === 13) {
|
|
|
|
|
$("#search").click();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</block>
|