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
3dceb06b
Commit
3dceb06b
authored
Sep 15, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产负债表调整自产采购发货在途明细
parent
bbad558c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
230 additions
and
1 deletion
+230
-1
dc_daily_purchase_semi_deliveronway.cs
Bailun.DC.Models/dc_daily_purchase_semi_deliveronway.cs
+26
-0
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+38
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+72
-0
Index2.cshtml
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
+1
-1
ListSelfProductShippingOnway.cshtml
...Reports/Views/Finance/ListSelfProductShippingOnway.cshtml
+93
-0
No files found.
Bailun.DC.Models/dc_daily_purchase_semi_deliveronway.cs
0 → 100644
View file @
3dceb06b
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
public
class
dc_daily_purchase_semi_deliveronway
{
public
int
id
{
get
;
set
;
}
public
DateTime
day
{
get
;
set
;
}
public
string
purchase_id
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
int
count
{
get
;
set
;
}
public
decimal
price
{
get
;
set
;
}
public
DateTime
createtime
{
get
;
set
;
}
public
string
buyer_name
{
get
;
set
;
}
}
}
Bailun.DC.Services/FinanceReportServices.cs
View file @
3dceb06b
...
@@ -2360,6 +2360,44 @@ namespace Bailun.DC.Services
...
@@ -2360,6 +2360,44 @@ namespace Bailun.DC.Services
}
}
}
}
/// <summary>
/// 自产采购发货在途明细
/// </summary>
/// <param name="request">分页信息</param>
/// <param name="date">统计日期</param>
/// <param name="total">符合条件的记录数</param>
/// <returns></returns>
public
List
<
dc_daily_purchase_semi_deliveronway
>
ListSelfProductShippingOnway
(
BtTableParameter
request
,
DateTime
date
,
ref
int
total
)
{
var
sql
=
$@"select t1.*,t2.buyer_name from dc_daily_purchase_semi_deliveronway t1
join dc_base_sku t2 on t1.bailun_sku=t2.bailun_sku
where t1.day='
{
date
}
'"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
if
(
request
.
limit
>
0
)
{
var
obj
=
cn
.
Page
<
dc_daily_purchase_semi_deliveronway
>(
request
.
pageIndex
,
request
.
limit
,
sql
,
ref
total
);
return
obj
.
ToList
();
}
else
{
var
obj
=
cn
.
Query
<
dc_daily_purchase_semi_deliveronway
>(
sql
);
return
obj
.
ToList
();
}
}
}
#
endregion
#
endregion
#
region
付款主体
#
region
付款主体
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
3dceb06b
...
@@ -2250,6 +2250,78 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -2250,6 +2250,78 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
return
File
(
ms
,
"text/csv"
,
filename
+
".csv"
);
return
File
(
ms
,
"text/csv"
,
filename
+
".csv"
);
}
}
/// <summary>
/// 自产采购发货在途
/// </summary>
/// <param name="date">日期</param>
/// <param name="paycompanyid"></param>
/// <returns></returns>
public
ActionResult
ListSelfProductShippingOnway
(
DateTime
date
,
int
paycompanyid
)
{
ViewBag
.
date
=
date
.
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
paycompanyid
=
paycompanyid
;
return
View
();
}
/// <summary>
/// 自产采购在途数据
/// </summary>
/// <param name="request">分页信息</param>
/// <param name="date">统计日期</param>
/// <param name="paycompanyid"></param>
/// <returns></returns>
public
string
ListSelfProductShippingOnwayJson
(
BtTableParameter
request
,
DateTime
date
)
{
var
total
=
0
;
var
obj
=
new
Services
.
FinanceReportServices
().
ListSelfProductShippingOnway
(
request
,
date
,
ref
total
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
purchase_id
,
a
.
bailun_sku
,
a
.
buyer_name
,
a
.
count
,
a
.
price
,
amount
=
a
.
count
*
a
.
price
,
record_time
=
a
.
day
.
ToString
(
"yyyy-MM-dd"
)
});
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
});
}
/// <summary>
/// 自产采购在途数据导出
/// </summary>
/// <param name="date"></param>
/// <returns></returns>
public
ActionResult
ListSelfProductShippingOnwayExport
(
DateTime
date
)
{
var
total
=
0
;
var
obj
=
new
Services
.
FinanceReportServices
().
ListSelfProductShippingOnway
(
new
BtTableParameter
{
limit
=
0
},
date
,
ref
total
);
var
colNames
=
new
List
<
string
>
{
"统计日期"
,
"采购单号"
,
"Sku编码"
,
"发货在途数量"
,
"采购价"
,
"总金额"
,
"采购员名称"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
obj
)
{
list
.
Add
(
item
.
day
.
ToString
(
"yyyy-MM-dd"
)
+
"|"
+
item
.
purchase_id
+
"|"
+
item
.
bailun_sku
+
"|"
+
item
.
count
+
"|"
+
item
.
price
+
"|"
+
(
item
.
count
*
item
.
price
)
+
"|"
+
item
.
buyer_name
);
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filename
=
date
.
ToString
(
"yyyy-MM-dd"
)
+
"自产采购发货在途"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
);
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
ToCSV
(
list
,
colNames
,
guid
,
filepath
);
var
ms
=
new
System
.
IO
.
MemoryStream
();
using
(
var
f
=
new
System
.
IO
.
FileStream
(
filepath
+
guid
+
".csv"
,
System
.
IO
.
FileMode
.
Open
))
{
f
.
CopyTo
(
ms
);
}
ms
.
Position
=
0
;
return
File
(
ms
,
"text/csv"
,
filename
+
".csv"
);
}
/// <summary>
/// <summary>
/// 短期借款明细
/// 短期借款明细
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/Index2.cshtml
View file @
3dceb06b
...
@@ -1753,7 +1753,7 @@
...
@@ -1753,7 +1753,7 @@
showdetail(title + ' 生产库存', '@Url.Content("~/Reports/Finance/SemiProductionStock?type=semi_prod_inventory_amount")&date=' + title + '&paycompanyid=' + paycompany);
showdetail(title + ' 生产库存', '@Url.Content("~/Reports/Finance/SemiProductionStock?type=semi_prod_inventory_amount")&date=' + title + '&paycompanyid=' + paycompany);
return false;
return false;
case 'purchase_pro_amount':
case 'purchase_pro_amount':
//showdetail(title + ' 自产采购发货在途', '@Url.Content("~/Reports/Finance/ListProduct
Onway?date=")' + title + '&paycompanyid=' + paycompany);
showdetail(title + ' 自产采购发货在途', '@Url.Content("~/Reports/Finance/ListSelfProductShipping
Onway?date=")' + title + '&paycompanyid=' + paycompany);
return false;
return false;
}
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/ListSelfProductShippingOnway.cshtml
0 → 100644
View file @
3dceb06b
@{
ViewData["Title"] = "自产采购发货在途";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
}
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>日期</label>
<input id="date" name="date" type="text" class="form-control" style="width:130px;" value="@(ViewBag.date)" />
</div>
<div class="form-group">
<button type="button" class="btn btn-success" onclick="list();">搜索</button>
<button type="button" class="btn btn-primary" onclick="exportFile();">导出</button>
</div>
</div>
</form>
</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 type="text/javascript">
var tb;
$(document).ready(function () {
laydate.render({ elem: '#date' });
var height = document.body.clientHeight;
$("#roletable").attr("data-height", (height - 170));
list();
})
function list() {
var date = $('#date').val();
if (date == '') {
alert('请选择日期');
return false;
}
var columns = [
{ field: 'record_time', title: '统计日期', width: '120' },
{ field: 'purchase_id', title: '采购单号', width: '150' },
{ field: 'bailun_sku', title: 'Sku编码', width: '130' },
{ field: 'count', title: '发货在途数量', width: '130' },
{ field: 'price', title: '采购价', width: '110' },
{ field: 'amount', title: '总金额', width: '110' },
{ field: 'buyer_name', title: '采购员名称', width: '130' }
];
var url = '@Url.Content("~/Reports/Finance/ListSelfProductShippingOnwayJson")' + '?date=' + date;
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "");
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
function exportFile() {
var date = $('#date').val();
if (date == '') {
alert('请选择日期');
return false;
}
window.open('@Url.Content("~/Reports/Finance/ListSelfProductShippingOnwayExport?date=")' + date, '_blank');
}
</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