Commit 5e2ad83b by guanzhenshan

解决管理成本无法查看明细的问题

parent f12ec01b
......@@ -783,13 +783,13 @@ namespace Bailun.DC.Services
if (!string.IsNullOrEmpty(feesupertype))
{
sql += " and fee_super_type=@type";
sql += " and type_name=@type";
sqlparam.Add("type", feesupertype);
}
if (!string.IsNullOrEmpty(feesubtype))
{
sql += " and fee_sub_type=@subtype";
sql += " and kind_name=@subtype";
sqlparam.Add("subtype", feesubtype);
}
......
......@@ -1985,7 +1985,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
});
}
public ActionResult ListAdministrativeCost(DateTime start,DateTime end,int? paycompanyid,string headname,string categoryname,int type,int issub)
public ActionResult ListAdministrativeCost(DateTime start,DateTime end,int? paycompanyid,string headname,string categoryname,int type,int issub,int? ismanager)
{
ViewBag.start = start;
ViewBag.end = end;
......@@ -1994,6 +1994,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ViewBag.categoryname = categoryname;
ViewBag.type = type;
ViewBag.isSub = issub;
ViewBag.ismanager = ismanager.HasValue?ismanager.Value.ToString() : "";
return View();
}
......@@ -2008,7 +2009,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
public string ListAdministrativeCostJson(DateTime start, DateTime end, int? paycompanyid, string headname, string categoryname, int type, int issub)
[BailunAuthentication(LoginMode.Enforce)]
public string ListAdministrativeCostJson(DateTime start, DateTime end, int? paycompanyid, string headname, string categoryname, int type, int issub,int? ismanager)
{
//var url = ConfigHelper.GetByName("FeeUrl") + "?o=0";
......@@ -2061,38 +2063,38 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
//var obj = new Services.FinanceReportServices().ListOtherCost(url);
var obj = new Services.FinanceReportServices().ListFinanceManageCost(start, end, (issub == 0 ? categoryname : ""), (issub != 0 ? categoryname : ""), (type==1?headname:""), paycompanyid);
var obj = new Services.FinanceReportServices().ListFinanceFee(start, end, (issub == 0 ? categoryname : ""), (issub != 0 ? categoryname : ""), (type==1?headname:""), paycompanyid, ismanager);
if (obj.Count > 0)
{
var m = new Models.dc_base_finance_managecost {
no = "",
var m = new Models.dc_base_finance_fee {
cost_no = "",
company_name = "",
amount = obj.Sum(a => a.amount),
amount_rmb = obj.Sum(a => a.amount_rmb),
currency = "",
amount = obj.Sum(a => (a.amount??0)),
amount_rmb = obj.Sum(a => (a.amount_rmb??0)),
dic = "",
department_name = "",
accounting_subject_name = "",
fee_super_type = "合计",
type_name = "合计",
};
obj.Add(m);
}
var list = obj.Select(a => new {
amount = a.amount.ToString("###,###.##"),
amountRmb = a.amount_rmb.ToString("###,###.##"),
amount = (a.amount??0).ToString("###,###.##"),
amountRmb = (a.amount_rmb??0).ToString("###,###.##"),
companyName = a.company_name,
a.currency,
currency = a.dic,
departmentName = a.department_name,
feeSubType = a.fee_sub_type,
feeSubType = a.type_name,
a.accounting_subject_name,
feeSuperType = a.fee_super_type,
a.no,
manageCostType = a.manage_cost_type,
receiveUnit = a.receive_unit,
a.reason,
feeSuperType = a.kind_name,
no = a.cost_no,
manageCostType = a.accounting_subject_name,
receiveUnit = a.pay_dic,
reason = a.cost_reason,
payTime = a.pay_time.HasValue?a.pay_time.Value.ToString("yyyy-MM-dd HH:mm:ss"):""
}).ToList();
......
......@@ -152,7 +152,7 @@
for (var j = 0; j < item2.length - 1; j++) {
var tempFloat = parseFloat(item2[j]);
str += '<td style="width:130px">' + (tempFloat > 0 ? '<span style="cursor:pointer" onclick="OpenDetail(\'' + dt[i].item1 + '\',\'' + (result.col[j] == null ? "" : result.col[j]) + '\',0)">' + numFormat(tempFloat) + '</span>' : tempFloat) + '</td>';
str += '<td style="width:130px">' + (tempFloat != 0 ? '<span style="cursor:pointer" onclick="OpenDetail(\'' + dt[i].item1 + '\',\'' + (result.col[j] == null ? "" : result.col[j]) + '\',0)">' + numFormat(tempFloat) + '</span>' : tempFloat) + '</td>';
rowamount = add(rowamount, tempFloat);
if (arrTotal.length > j) {
......@@ -301,7 +301,7 @@
for (var j = 0; j < item2.length; j++) {
var tempFloat = parseFloat(item2[j]);
str += '<td>' + (tempFloat > 0 ? '<span style="cursor:pointer;" onclick="OpenDetail(\'' + dt[i].item1 + '\',\'' + (result.col[j] == null ? "" : result.col[j]) + '\',1)">' + numFormat(tempFloat) + '</span>' : tempFloat) + '</td>';
str += '<td>' + (tempFloat != 0 ? '<span style="cursor:pointer;" onclick="OpenDetail(\'' + dt[i].item1 + '\',\'' + (result.col[j] == null ? "" : result.col[j]) + '\',1)">' + numFormat(tempFloat) + '</span>' : tempFloat) + '</td>';
rowamount = add(rowamount, tempFloat);
}
str += '<td>' + rowamount + '</td>';
......
......@@ -67,7 +67,7 @@
{ field: 'payTime', title: '付款时间' },
];
var url = '@Url.Content("~/Reports/Finance/ListAdministrativeCostJson")' + '?paycompanyid=' + companyid + '&headname=' + headname + '&categoryname=' + categoryname + '&start=' + start + '&end=' + end + '&type=' + type + '&issub=' + issub;
var url = '@Url.Content("~/Reports/Finance/ListAdministrativeCostJson")' + '?paycompanyid=' + companyid + '&headname=' + headname + '&categoryname=' + categoryname + '&start=' + start + '&end=' + end + '&type=' + type + '&issub=' + issub +'&ismanager=@(ViewBag.ismanager)';
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {
......@@ -87,7 +87,7 @@
var start = $('#start').val();
var end = $('#end').val();
window.open('@Url.Content("~/Reports/Finance/ExportListAdministrativeCost")' + '?paycompanyid=' + companyid + '&headname=' + headname + '&categoryname=' + categoryname + '&start=' + start + '&end=' + end + '&type=' + type + '&issub=' + issub, '_blank');
window.open('@Url.Content("~/Reports/Finance/ExportListAdministrativeCost")' + '?paycompanyid=' + companyid + '&headname=' + headname + '&categoryname=' + categoryname + '&start=' + start + '&end=' + end + '&type=' + type + '&issub=' + issub +'&ismanager=@(ViewBag.ismanager)', '_blank');
}
......
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