Commit 82a9f865 by guanzhenshan

资产负债表增加导入数据更新功能

parent ffcd462d
...@@ -435,7 +435,30 @@ namespace Bailun.DC.Services ...@@ -435,7 +435,30 @@ namespace Bailun.DC.Services
{ {
return json["message"].ToString(); return json["message"].ToString();
} }
}
/// <summary>
/// 更新资产负债表的物流应付款额
/// </summary>
/// <param name="day">日期</param>
/// <param name="amount">金额</param>
/// <param name="paramname">参数名</param>
/// <returns></returns>
public string UpdateLogisticsEndAmount(DateTime day, decimal amount,string paramname)
{
var url = "http://fee.bailuntec.com/balanceSheet/updateSheetLogisticsSupplier?date=" + day.ToString("yyyy-MM-dd") + "&"+ paramname+"=" + amount;
var result = Common.HttpHelper.NetHelper.Request(url);
var json = Newtonsoft.Json.Linq.JObject.Parse(result);
if (json["success"].ToString().ToLower() == "true")
{
return "";
}
else
{
return json["message"].ToString();
}
} }
/// <summary> /// <summary>
......
...@@ -3515,6 +3515,34 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -3515,6 +3515,34 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
} }
var result = service.AddRang(list); var result = service.AddRang(list);
if (result > 0)
{
var paramname = "";
switch (type)
{
case "other_accounts_receivable": //其他应收账款
paramname = "otherAccountsReceivableImport";
break;
case "other_accounts_payable": //其他应付
paramname = "otherAccountsPayableImport";
break;
case "fixed_assets": //固定资产
paramname = "fixedAssetsImport";
break;
case "nca_deferred_tax_assets": //递延所得税
paramname = "ncaDeferredTaxAssetsImport";
break;
}
if (!string.IsNullOrEmpty(paramname))
{
new Services.FinanceReportServices().UpdateLogisticsEndAmount(list.FirstOrDefault().day, list.Sum(a => a.amount), paramname);
}
}
return Json(new return Json(new
{ {
success = result>0, success = result>0,
...@@ -3531,6 +3559,26 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -3531,6 +3559,26 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
} }
} }
/// <summary>
/// 其他应收账款明细汇总
/// </summary>
/// <param name="paycompanyid"></param>
/// <param name="date"></param>
/// <returns></returns>
public ActionResult OtherReceivableCount(int? paycompanyid, DateTime date)
{
var objCount = new Services.FinanceReportServices().ListBorrowAmountCount(date, paycompanyid??0);
var hander = new Services.BalanceSheetServices().GetCount("other_accounts_receivable", date);
ViewBag.borrow = objCount.amount;
ViewBag.handerfee = hander;
ViewBag.date = date;
ViewBag.paycompanyid = paycompanyid;
return View();
}
#endregion #endregion
#region 平台余额 #region 平台余额
......
...@@ -185,20 +185,6 @@ ...@@ -185,20 +185,6 @@
</div> </div>
</div> </div>
<div class="item-row fa fa1" style="width:100%;"> <div class="item-row fa fa1" style="width:100%;">
<div style="width:11.5%;color:#bbb;">1.借支金额</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;">
<input id="amount_borrowed" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
</div>
<div style="width:8%;">
</div>
</div>
<div class="item-row fa fa1" style="width:100%;">
<div style="width:11.5%;">预付款项</div> <div style="width:11.5%;">预付款项</div>
<div style="width:11.5%;" class="prepayment">0</div> <div style="width:11.5%;" class="prepayment">0</div>
<div style="width:11.5%;" class="prepayment">0</div> <div style="width:11.5%;" class="prepayment">0</div>
...@@ -304,6 +290,20 @@ ...@@ -304,6 +290,20 @@
</div> </div>
</div> </div>
<div class="item-row fa fa1" style="width:100%;"> <div class="item-row fa fa1" style="width:100%;">
<div style="width:11.5%;color:#bbb;">1.借支金额</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;" class="amount_borrowed">0</div>
<div style="width:11.5%;">
<input id="amount_borrowed" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
</div>
<div style="width:8%;">
</div>
</div>
<div class="item-row fa fa1" style="width:100%;">
<div style="width:11.5%;">存货</div> <div style="width:11.5%;">存货</div>
<div style="width:11.5%;" class="inventory_amount">0</div> <div style="width:11.5%;" class="inventory_amount">0</div>
<div style="width:11.5%;" class="inventory_amount">0</div> <div style="width:11.5%;" class="inventory_amount">0</div>
...@@ -1424,7 +1424,7 @@ ...@@ -1424,7 +1424,7 @@
else { else {
$('#' + key).val(obj[key]); $('#' + key).val(obj[key]);
} }
} }
for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
...@@ -1516,13 +1516,16 @@ ...@@ -1516,13 +1516,16 @@
showdetail(title + ' 应付帐款明细', '@Url.Content("~/Reports/Finance/CopeWithCount?date=")' + title + '&paycompanyid=' + paycompany); showdetail(title + ' 应付帐款明细', '@Url.Content("~/Reports/Finance/CopeWithCount?date=")' + title + '&paycompanyid=' + paycompany);
return false; return false;
case 'other_accounts_receivable': case 'other_accounts_receivable':
showdetail(title + ' 其他应收款明细', '@Url.Content("~/Reports/Finance/OtherReceivable?date=")' + title + '&paycompanyid=' + paycompany); @*showdetail(title + ' 其他应收款明细', '@Url.Content("~/Reports/Finance/OtherReceivable?date=")' + title + '&paycompanyid=' + paycompany);*@
showdetail(title + ' 其他应收款明细', '@Url.Content("~/Reports/Finance/OtherReceivableCount?date=")' + title + '&paycompanyid=' + paycompany);
return false; return false;
case 'other_accounts_payable': case 'other_accounts_payable':
showdetail(title + ' 其他应付款明细', '@Url.Content("~/Reports/Finance/OtherPayable?date=")' + title + '&paycompanyid=' + paycompany); @*showdetail(title + ' 其他应付款明细', '@Url.Content("~/Reports/Finance/OtherPayable?date=")' + title + '&paycompanyid=' + paycompany);*@
showdetail(title + ' 其他应付款明细', '@Url.Content("~/Reports/Finance/BalanceSheetSubDetail?type=other_accounts_payable")&day=' + title + '&paycompanyid=' + paycompany);
return false; return false;
case 'fixed_assets': case 'fixed_assets':
showdetail(title + ' 固定资产明细', '@Url.Content("~/Reports/Finance/ListFixedAssets?date=")' + title + '&paycompanyid=' + paycompany); @*showdetail(title + ' 固定资产明细', '@Url.Content("~/Reports/Finance/ListFixedAssets?date=")' + title + '&paycompanyid=' + paycompany);*@
showdetail(title + ' 固定资产明细', '@Url.Content("~/Reports/Finance/BalanceSheetSubDetail?type=fixed_assets")&day=' + title + '&paycompanyid=' + paycompany);
return false; return false;
case 'withdraw_amount': case 'withdraw_amount':
...@@ -1577,6 +1580,9 @@ ...@@ -1577,6 +1580,9 @@
case 'accounts_receivable': case 'accounts_receivable':
showdetail(title + '应收帐款明细', '@Url.Content("~/Reports/Finance/ReceivablesCount?date=")' + title + '&paycompanyid=' + paycompany); showdetail(title + '应收帐款明细', '@Url.Content("~/Reports/Finance/ReceivablesCount?date=")' + title + '&paycompanyid=' + paycompany);
return false; return false;
case 'nca_deferred_tax_assets':
showdetail(title + ' 递延所得税资产', '@Url.Content("~/Reports/Finance/BalanceSheetSubDetail?type=nca_deferred_tax_assets")&day=' + title + '&paycompanyid=' + paycompany);
return false;
} }
return false; return false;
...@@ -1626,7 +1632,7 @@ ...@@ -1626,7 +1632,7 @@
$('#zc').css('height', (zch+4) + 'px').css('line-height', (zch+4) + 'px'); $('#zc').css('height', (zch+4) + 'px').css('line-height', (zch+4) + 'px');
$('#fz').css('height', (fzh + 8) + 'px').css('line-height', (fzh + 8) + 'px'); $('#fz').css('height', (fzh + 8) + 'px').css('line-height', (fzh + 8) + 'px');
} }
function ExportXsl() { function ExportXsl() {
......

@{
ViewData["Title"] = "OtherReceivableCount";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
}
<div class="ibox-content m-b-sm border-bottom">
<table id="tb" class="table table-hover table-bordered" style="width:100%;">
<thead>
<tr>
<th>序号</th>
<th>类型</th>
<th>金额</th>
<th>操作</th>
</tr>
</thead>
<tr>
<td>1</td>
<td>借支应收账款</td>
<td>@(ViewBag.borrow.ToString("N2"))</td>
<td><a class="btn btn-xs btn-primary" onclick="showdetail('@ViewBag.date.ToString("yyyy-MM-dd") 借支应收账款','@Url.Content("~/Reports/Finance/ListBorrowAmount?date="+ViewBag.date+"&paycompanyid="+ViewBag.paycompanyid)')">查看明细</a></td>
</tr>
@*<tr>
<td>2</td>
<td>借支应收账款</td>
<td>@(ViewBag.m.Item2.ToString("N2"))</td>
<td><a class="btn btn-xs btn-primary" onclick="showdetail('@ViewBag.date.ToString("yyyy-MM-dd") 借支应收账款','@Url.Content("~/Reports/Finance/ListBorrowAmount?date="+ViewBag.date+"&paycompanyid="+ViewBag.paycompanyid)')">查看明细</a></td>
</tr>*@
<tr>
<td>2</td>
<td>手工导入</td>
<td>@(ViewBag.handerfee.ToString("N2"))</td>
<td><a class="btn btn-xs btn-primary" onclick="showdetail('@ViewBag.date.ToString("yyyy-MM-dd") 其他应收账款手工导入','@Url.Content("~/Reports/Finance/BalanceSheetSubDetail?day="+ViewBag.date+"&type=other_accounts_receivable")')">查看明细</a></td>
</tr>
</table>
</div>
<script>
function ShowDetails(title, url) {
dialogApply({
id: 'Form',
title: title,
url: url,
width: '1300px',
height: '650px',
callBack: function (iframeId) {
//top.frames[iframeId].AcceptClick();
}
});
}
</script>
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