Commit 69378815 by guanzhenshan

新月销售利润表增加查看财务销售付现明细功能,增加固定表头功能

parent eb934110
......@@ -533,7 +533,7 @@ namespace Bailun.DC.MonthSaleProfit
}
//利息支出
var cwurl = "http://cw.bailuntec.com/api/api/GetRepayPlanDetails?" + "BeginRepayTime=" + day.ToString("yyyy-MM-dd") + "&EndRepayTime=" + day.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"); ;
var cwurl = "http://cw.bailuntec.com/api/api/GetRepayPlanDetails?" + "BeginRepayTime=" + day.ToString("yyyy-MM-dd") + "&EndRepayTime=" + day.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd");
var listInterest = new Bailun.DC.Services.FinanceReportServices().ListInterestExpense(cwurl);
//管理成本
var list = new Bailun.DC.Services.FinanceReportServices().ListFinanceManageCost(day, day.AddMonths(1).AddDays(-1), "", "", "", null);
......
......@@ -6886,7 +6886,7 @@ group by currency";
{
var sql = $"select * from dc_base_finance_managecost where pay_time>='{start.ToString("yyyy-MM-dd")}' and pay_time<'{end.ToString("yyyy-MM-dd")}' ";
if (col.Trim() == "fee_paycash_sales") //付现
if (col.Trim() == "fee_paycash_sales") //付现 fee_paycash_sales
{
sql += @" and (company_name='香港百伦科技有限公司' or
(fee_super_type in ('推广费','物流费用') and company_name!='(英国)4kmiles technologies ltd'
......
......@@ -7,9 +7,6 @@
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning">
说明:数据从每月的5号当天取数;2021年1月份开始才能查看订单明细数据
</div>
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
......@@ -21,6 +18,7 @@
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
<button type="button" class="btn btn-danger" onclick="exportxls();">导出</button>
<span style="color:#999;margin-left:10px;">说明:数据从每月的5号当天取数;2021年1月份开始才能查看订单明细数据</span>
</div>
</div>
</form>
......@@ -30,7 +28,7 @@
<div class="bootstrap-table">
<div class="fixed-table-container">
<div class="fixed-table-body">
<table id="tb" style="table-layout: fixed;" class="table table-border table-bordered table-hover table-bg table-sort form-inline">
<table id="tb" style="table-layout: fixed;" class="table table-border table-bordered table-hover table-bg table-sort form-inline" data-height="200">
<thead>
</thead>
......@@ -53,6 +51,7 @@
@section scripts{
<script src="~/css/Layer-2.1/extend/layer.ext.js"></script>
<script src="~/js/jquery.freezeheader.js?i=1.0"></script>
<script type="text/javascript">
$(document).ready(function () {
......@@ -290,7 +289,16 @@
})
}
else if (_this.hasClass('fee_paycash_sales')) {
_this.css('cursor', 'pointer');
_this.click(function () {
ShowFeeDetail(_this.attr('val'), _this.attr('valname'), 'fee_paycash_sales');
})
}
})
$("#tb").freezeHeader();
}
else {
layer.msg('没有' + $('#month').val()+'月份的销售利润数据。');
......

@{
ViewData["Title"] = "管理成本明细";
ViewData["Title"] = "费用明细";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
}
......
/* ------------------------------------------------------------------------
Class: freezeHeader
Use:freeze header row in html table
Example 1: $('#tableid').freezeHeader();
Example 2: $("#tableid").freezeHeader({ 'height': '300px' });
Example 3: $("table").freezeHeader();
Example 4: $(".table2").freezeHeader();
Example 5: $("#tableid").freezeHeader({ 'offset': '50px' });
Author(s): Laerte Mercier Junior, Larry A. Hendrix
Version: 1.0.8
-------------------------------------------------------------------------*/
(function ($) {
var TABLE_ID = 0;
$.fn.freezeHeader = function (params) {
var copiedHeader = false;
function freezeHeader(elem) {
var idObj = elem.attr('id') || ('tbl-' + (++TABLE_ID));
if (elem.length > 0 && elem[0].tagName.toLowerCase() == "table") {
var obj = {
id: idObj,
grid: elem,
container: null,
header: null,
divScroll: null,
openDivScroll: null,
closeDivScroll: null,
scroller: null
};
if (params && params.height !== undefined) {
obj.divScroll = '<div id="hdScroll' + obj.id + '" style="height: ' + params.height + '; overflow-y: scroll">';
obj.closeDivScroll = '</div>';
}
obj.header = obj.grid.find('thead');
if (params && params.height !== undefined) {
if ($('#hdScroll' + obj.id).length == 0) {
obj.grid.wrapAll(obj.divScroll);
}
}
obj.scroller = params && params.height !== undefined
? $('#hdScroll' + obj.id)
: $(window);
if (params && params.scrollListenerEl !== undefined) {
obj.scroller = params.scrollListenerEl;
}
obj.scroller.on('scroll', function () {
if ($('#hd' + obj.id).length == 0) {
obj.grid.before('<div id="hd' + obj.id + '"></div>');
}
obj.container = $('#hd' + obj.id);
if (obj.header.offset() != null) {
if (limiteAlcancado(obj, params)) {
elem.trigger("freeze:on");
if (!copiedHeader) {
cloneHeaderRow(obj);
copiedHeader = true;
}
}
else {
if (($(document).scrollTop() > obj.header.offset().top)) {
obj.container.css("position", "absolute");
obj.container.css("top", (obj.grid.find("tr:last").offset().top - obj.header.height()) + "px");
}
else {
elem.trigger("freeze:off");
obj.container.css("visibility", "hidden");
obj.container.css("top", "38px");
obj.container.width(0);
}
copiedHeader = false;
}
}
});
}
}
function limiteAlcancado(obj, params) {
if (params && (params.height !== undefined || params.scrollListenerEl !== undefined)) {
return (obj.header.offset().top <= obj.scroller.offset().top);
}
else {
var top = obj.header.offset().top;
if (params) {
if (params.offset !== undefined) {
top -= parseInt(params.offset.replace('px',''),10);
}
}
var gridHeight = (obj.grid.height() - obj.header.height() - obj.grid.find("tr:last").height()) + obj.header.offset().top;
return ($(document).scrollTop() > top && $(document).scrollTop() < gridHeight);
}
}
function cloneHeaderRow(obj) {
obj.container.html('');
obj.container.val('');
var tabela = $('<table style="margin: 0 0;"></table>');
var atributos = obj.grid.prop("attributes");
$.each(atributos, function () {
if (this.name != "id") {
tabela.attr(this.name, this.value);
}
});
var clone = obj.header.clone(true);
clone.appendTo(tabela);
obj.container.append(tabela);
obj.container.width(obj.header.width());
obj.container.height(obj.header.height);
obj.container.find('th').each(function (index) {
var cellWidth = obj.grid.find('th').eq(index).width();
$(this).css('width', cellWidth);
});
obj.container.css("visibility", "visible");
if (params && params.height !== undefined) {
if(params.offset !== undefined){
obj.container.css("top", obj.scroller.offset().top + (params.offset.replace("px","") * 1) + "px");
}
else
{
obj.container.css("top", obj.scroller.offset().top + "px");
}
obj.container.css("position", "absolute");
} else if (params && params.scrollListenerEl!== undefined) {
obj.container.css("top", obj.scroller.find("thead > tr").innerHeight() + "px");
obj.container.css("position", "absolute");
obj.container.css("z-index", "2");
} else if (params && params.offset !== undefined) {
obj.container.css("top", params.offset);
obj.container.css("position", "fixed");
} else {
obj.container.css("top", "38px");
obj.container.css("position", "fixed");
}
}
return this.each(function (i, e) {
freezeHeader($(e));
});
};
})(jQuery);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment