Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
3ac856d7
Commit
3ac856d7
authored
Mar 18, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加固定资产明细页面
parent
2a102f76
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
269 additions
and
1 deletion
+269
-1
dc_fixed_assets_detail.cs
Bailun.DC.Models/dc_fixed_assets_detail.cs
+52
-0
CommonServices.cs
Bailun.DC.Services/CommonServices.cs
+29
-1
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+38
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+53
-0
Index.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/Index.cshtml
+3
-0
ListFixedAssets.cshtml
...DC.Web/Areas/Reports/Views/Finance/ListFixedAssets.cshtml
+94
-0
No files found.
Bailun.DC.Models/dc_fixed_assets_detail.cs
0 → 100644
View file @
3ac856d7
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
public
class
dc_fixed_assets_detail
{
public
int
id
{
get
;
set
;
}
/// <summary>
/// 统计日期
/// </summary>
public
DateTime
day
{
get
;
set
;
}
/// <summary>
/// 公司主体value
/// </summary>
public
int
company_value
{
get
;
set
;
}
/// <summary>
/// 采购公司
/// </summary>
public
string
company_name
{
get
;
set
;
}
/// <summary>
/// 期初金额
/// </summary>
public
decimal
start_amount
{
get
;
set
;
}
/// <summary>
/// 借方发生额
/// </summary>
public
decimal
debit_amount
{
get
;
set
;
}
/// <summary>
/// 贷方发生额
/// </summary>
public
decimal
credit_amount
{
get
;
set
;
}
/// <summary>
/// 期末金额
/// </summary>
public
decimal
end_amount
{
get
;
set
;
}
/// <summary>
/// 取数时间
/// </summary>
public
DateTime
update_time
{
get
;
set
;
}
}
}
Bailun.DC.Services/CommonServices.cs
View file @
3ac856d7
...
...
@@ -209,6 +209,24 @@ namespace Bailun.DC.Services
}
/// <summary>
/// 获取采购公司列表
/// </summary>
/// <returns></returns>
public
static
List
<
CompanyValue
>
ListCompanyValue
()
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
return
cn
.
Query
<
CompanyValue
>(
"select company_value,company_name from dc_fixed_assets_detail group by company_value,company_name"
).
AsList
();
}
}
}
#
region
汇率实体
ExchangeRate
...
...
@@ -223,5 +241,15 @@ namespace Bailun.DC.Services
}
#
endregion
/// <summary>
/// 采购公司
/// </summary>
public
class
CompanyValue
{
public
int
company_value
{
get
;
set
;
}
public
string
company_name
{
get
;
set
;
}
}
}
Bailun.DC.Services/FinanceReportServices.cs
View file @
3ac856d7
...
...
@@ -1026,6 +1026,44 @@ namespace Bailun.DC.Services
}
}
/// <summary>
/// 固定资产列表
/// </summary>
/// <param name="request">分页信息</param>
/// <param name="date">统计日期</param>
/// <param name="paycompanyid">付款主体id</param>
/// <param name="total">符合条件的记录数</param>
/// <returns></returns>
public
List
<
dc_fixed_assets_detail
>
ListFixedAssets
(
BtTableParameter
request
,
DateTime
date
,
int
paycompanyid
,
int
?
companyvalue
,
ref
int
total
)
{
var
sql
=
"select * from dc_fixed_assets_detail where day='"
+
date
.
ToString
(
"yyyy-MM-dd"
)+
"'"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
if
(
companyvalue
.
HasValue
)
{
sql
+=
" and company_value="
+
companyvalue
.
Value
;
}
if
(!
string
.
IsNullOrEmpty
(
request
.
sort
))
{
sql
+=
" order by "
+
request
.
sort
+
" "
+
request
.
order
;
}
var
obj
=
cn
.
Page
<
dc_fixed_assets_detail
>(
request
.
pageIndex
,
request
.
limit
,
sql
,
ref
total
);
return
obj
.
AsList
();
}
}
#
endregion
#
region
付款主体
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
3ac856d7
...
...
@@ -1077,6 +1077,45 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
});
}
/// <summary>
/// 固定资产一级明细
/// </summary>
/// <returns></returns>
public
ActionResult
ListFixedAssets
(
DateTime
date
,
int
paycompanyid
)
{
ViewBag
.
date
=
date
;
ViewBag
.
paycompanyid
=
paycompanyid
;
return
View
();
}
/// <summary>
/// 固定资产一级明细
/// </summary>
/// <param name="request"></param>
/// <param name="date"></param>
/// <param name="paycompanyid"></param>
/// <param name="companyvalue"></param>
/// <returns></returns>
public
string
ListFixedAssetsJson
(
BtTableParameter
request
,
DateTime
date
,
int
paycompanyid
,
int
?
companyvalue
)
{
var
total
=
0
;
var
obj
=
new
Services
.
FinanceReportServices
().
ListFixedAssets
(
request
,
date
,
paycompanyid
,
companyvalue
,
ref
total
);
var
list
=
obj
.
Select
(
a
=>
new
{
day
=
a
.
day
.
ToString
(
"yyyy-MM-dd"
),
a
.
company_name
,
start_amount
=
a
.
start_amount
.
ToString
(
"N2"
),
debit_amount
=
a
.
debit_amount
.
ToString
(
"N2"
),
credit_amount
=
a
.
credit_amount
.
ToString
(
"N2"
),
end_amount
=
a
.
end_amount
.
ToString
(
"N2"
),
});
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
});
}
#
endregion
#
region
平台余额
...
...
@@ -1692,6 +1731,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
#
endregion
#
region
Common
/// <summary>
...
...
@@ -1710,6 +1750,19 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
return
Json
(
list
);
}
/// <summary>
/// 获取采购公司列表(固定资产)
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
JsonResult
ListCompanyValue
()
{
var
list
=
Services
.
CommonServices
.
ListCompanyValue
();
return
Json
(
list
);
}
#
endregion
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/Index.cshtml
View file @
3ac856d7
...
...
@@ -974,6 +974,9 @@
case 'other_accounts_payable':
showdetail(title + ' 其他应付款明细', '@Url.Content("~/Reports/Finance/OtherPayable?date=")' + title + '&paycompanyid=' + paycompany);
return false;
case 'fixed_assets':
showdetail(title + ' 固定资产明细', '@Url.Content("~/Reports/Finance/ListFixedAssets?date=")' + title + '&paycompanyid=' + paycompany);
return false;
}
return false;
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/ListFixedAssets.cshtml
0 → 100644
View file @
3ac856d7
@{
ViewData["Title"] = "固定资产明细";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
}
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>采购公司</label>
<select id="companyvalue" name="companyvalue" class="form-control">
<option value="">请选择采购公司</option>
</select>
</div>
<div class="form-group">
<label> </label>
<button class="btn btn-primary" onclick="list()">查询</button>
</div>
</div>
</div>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
</div>
@section css{
<style>
.mules {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
}
@section scripts{
<script>
var tb;
$(document).ready(function () {
var height = document.body.clientHeight;
$("#roletable").attr("data-height", (height - 100));
list();
listCompany();
})
function list() {
var columns = [
{
field: 'company_name', title: '采购公司', width: '150', sortable: true, formatter: function (idx, data) {
return '<div class="mules" title="' + data.company_name + '">' + data.company_name + '</div>';
}
},
{ field: 'start_amount', title: '期初金额', width: '110', sortable: true },
{ field: 'debit_amount', title: '借方发生额', width: '110', sortable: false },
{ field: 'credit_amount', title: '贷方发生额', width: '110', sortable: false },
{ field: 'end_amount', title: '期末金额', width: '100', sortable: true },
{ field: 'day', title: '统计日期', width: '90', sortable: true }
];
var pvalue = $('#companyvalue').val();
var url = '@Url.Content("~/Reports/Finance/ListFixedAssetsJson")' + '?date=@(ViewBag.date)&paycompanyid=@(ViewBag.paycompanyid)&companyvalue=' + pvalue;
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "");
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
function listCompany() {
$.submit({
type:'POST',
url: '@Url.Content("~/Reports/Finance/ListCompanyValue")',
paramData: '',
func: function (result) {
if (result != null && result != undefined) {
$('#companyvalue').html('<option value="">请选择采购公司</option>');
for (var i = 0; i < result.length; i++) {
$('#companyvalue').append('<option value="' + result[i].company_value + '">' + result[i].company_name + '</option>');
}
}
}
})
}
</script>
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment