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.

298 lines
13 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<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-promote search_label_rehab">
<select id="time" name="time" class="select_gallery" style="width:150px;">
<option value="">请选择月份</option>
<volist name=":getMonth()" id="vo">
<option value="{$vo}" <if condition="$vo eq $_GET['time']">selected=selected</if>>{$vo}</option>
</volist>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('infoLists','model='.$model['name'] .'&row='.I('row'),false)}">
搜索</a>
</div>
</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>公司</th><th>实时结算金额合计</th><th>橙枫结算金额</th><th>其他结算金额</th><th>是否橙枫结算</th><th>操作</th>
</tr>
</thead>
<tbody>
<volist name="data" id="item" key="type">
<volist name="item.list" id="company" key="i">
<if condition="$i eq 1">
<tr style="border-top:1px solid #b6cad2;">
<td rowspan={$item['row']} style="border-right:1px solid #b6cad2;">{$item['name']}</td>
<td>{$item['list'][0]['company_name']}</td>
<td>{$item['list'][0]['statement_money']}</td>
<td>{$item['list'][0]['wm_amount']}</td>
<td>{$item['list'][0]['other_amount']}</td>
<td>{$item['list'][0]['is_wmstr']}</td>
<td><a class="infoedit" data-name="{$item['list'][0]['company_name']}" data-id="{$item['list'][0]['id']}" data-wmamount="{$item['list'][0]['wm_amount']}" data-iswm="{$item['list'][0]['is_wm']}">编辑</a></td>
</tr>
</if>
<if condition="$i neq 1">
<tr style="border-top:dotted 1px #c7c7c7;">
<td>{$company["company_name"]}</td>
<td>{$company['statement_money']}</td>
<td>{$company['wm_amount']}</td>
<td>{$company['other_amount']}</td>
<td>{$company['is_wmstr']}</td>
<td><a class="infoedit" data-name="{$company['company_name']}" data-id="{$company['id']}" data-wmamount="{$company['wm_amount']}" data-iswm="{$company['is_wm']}"">编辑</a></td>
</tr>
</if>
</volist>
<tr style="border-top:dotted 1px #c7c7c7;font-weight: 600;">
<td>小计:</td>
<td>{$item['count']['statement_money']}</td>
<td>{$item['count']['wm_amount']}</td>
<td>{$item['count']['other_amount']}</td>
<td></td>
<td></td>
</tr>
</volist>
<tr style="border-top:dotted 1px #c7c7c7;font-weight: 600;">
<td colspan="2">总计:</td>
<td>{$allcount['statement_money']}</td>
<td>{$allcount['wm_amount']}</td>
<td>{$allcount['other_amount']}</td>
<td></td>
<td></td>
</tr>
</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;">
编辑结算相关数据单位万元
</spend>
<table border="0" cellspacing="0" cellpadding="0" style="margin-top:30px;">
<input type="text" name="id" id="edit_id" value="0" style="display: none;">
<tr>
<td class="l noticeinfo" style="width:120px;">橙枫结算金额:</td>
<td class="r table_radio">
<input type="number" class="txt ratio" name="wm_amount" id="edit_wm_amount" value="0" placeholder="" οninput="value=value.replace(/[^\w\.\/]/ig, '')" style="width: 150px;">
</td>
</tr>
<tr style="height:30px"></tr>
<tr>
<td class="l noticeinfo" style="width:120px;">是否橙枫结算:</td>
<td class="r table_radio">
<div style="float: left;">
<select id="edit_iswm" name="type" style="width:150px;">
<option value="1"></option>
<option value="2"></option>
</select>
</div>
</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("infoLists")}');
$(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;
});
$(".infoedit").on("click",function(){
let data = $(this).data();
var html = $("#updateStatementTpl").html();
layer.open({
type: 1,
title: data.name+"/结算编辑",
maxWidth:720,
closeBtn: 1,
shadeClose: true,
content: html,
success:function(){
$("#edit_iswm").val(data.iswm);
$("#edit_id").val(data.id);
$("#edit_wm_amount").val(data.wmamount);
$("#updateStatementSubmit").off("click");
$("#updateStatementSubmit").on("click",function() {
var sendData = {};
var iswm = $("#edit_iswm").val();
var id = $("#edit_id").val();
var amount = $("#edit_wm_amount").val();
if(amount != data.wmamount){
sendData.wm_amount = amount;
}
if(iswm != data.iswm){
sendData.is_wm = iswm;
}
if($.isEmptyObject(sendData)){
layer.alert('未修改请直接关闭窗口');
return ;
}
sendData.id = id;
$.ajax({
type: 'post',
url: "{:U('infoEdit')}",
data:sendData,
success: function(data) {
if(data.success){
layer.alert('修改成功',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>