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
6cdd6f00
Commit
6cdd6f00
authored
Sep 16, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
逻辑仓库的仓库维度和SKU维度都加上销量跳转到oms的订单明细
parent
31e88d9c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
23 deletions
+85
-23
mLogicWarehouse.cs
Bailun.DC.Models/Stock/mLogicWarehouse.cs
+2
-0
mSkuWarehouse.cs
Bailun.DC.Models/Stock/mSkuWarehouse.cs
+5
-0
WarehouseController.cs
...n.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
+15
-5
ListWareHouseSku.cshtml
...Web/Areas/Reports/Views/Warehouse/ListWareHouseSku.cshtml
+42
-5
LogicWarehouse.cshtml
...C.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
+11
-9
Index.cshtml
Bailun.DC.Web/Pages/Index.cshtml
+1
-1
common.js
Bailun.DC.Web/wwwroot/js/common.js
+9
-3
No files found.
Bailun.DC.Models/Stock/mLogicWarehouse.cs
View file @
6cdd6f00
...
...
@@ -6,6 +6,8 @@ namespace Bailun.DC.Models.Stock
{
public
class
mLogicWarehouse
{
public
string
hq_type
{
get
;
set
;
}
/// <summary>
/// 仓库编码
/// </summary>
...
...
Bailun.DC.Models/Stock/mSkuWarehouse.cs
View file @
6cdd6f00
...
...
@@ -7,6 +7,11 @@ namespace Bailun.DC.Models.Stock
public
class
mSkuWarehouse
{
/// <summary>
/// 仓库类型
/// </summary>
public
string
hq_type
{
get
;
set
;
}
/// <summary>
/// 仓库编码
/// </summary>
public
string
warehouse_code
{
get
;
set
;
}
...
...
Bailun.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
View file @
6cdd6f00
...
...
@@ -35,11 +35,11 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <returns></returns>
public
ActionResult
LogicWarehouse
()
{
ViewBag
.
EndDate
=
DateTime
.
Parse
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)).
AddSeconds
(-
1
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
;
ViewBag
.
StartOneDate
=
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
StartSevenDate
=
DateTime
.
Now
.
AddDays
(-
7
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
StartFourteenDate
=
DateTime
.
Now
.
AddDays
(-
14
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
StartThirtyDate
=
DateTime
.
Now
.
AddDays
(-
30
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
EndDate
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)+
" 00:00:00"
;
ViewBag
.
StartOneDate
=
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
ViewBag
.
StartSevenDate
=
DateTime
.
Now
.
AddDays
(-
7
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
ViewBag
.
StartFourteenDate
=
DateTime
.
Now
.
AddDays
(-
14
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
ViewBag
.
StartThirtyDate
=
DateTime
.
Now
.
AddDays
(-
30
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
return
View
();
...
...
@@ -88,6 +88,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
usable_stock
=
p
.
usable_stock
.
ToString
(
"N0"
),
p
.
warehouse_code
,
p
.
warehouse_name
,
p
.
hq_type
,
quantity_tuneout_onway
=
(
p
.
quantity_tuneout_onway
??
0
).
ToString
(
"N0"
),
quantity_tuneout_30days
=
(
p
.
quantity_tuneout_30days
??
0
).
ToString
(
"N0"
),
quantity_tunein_30days
=
(
p
.
quantity_tunein_30days
??
0
).
ToString
(
"N0"
),
...
...
@@ -204,6 +205,12 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ViewBag
.
listWarehouse
=
new
Services
.
WareHouseServices
().
List
(
""
,
null
).
OrderBy
(
a
=>
a
.
warehouse_name
).
ToList
();
ViewBag
.
EndDate
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
ViewBag
.
StartOneDate
=
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
ViewBag
.
StartSevenDate
=
DateTime
.
Now
.
AddDays
(-
7
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
ViewBag
.
StartFourteenDate
=
DateTime
.
Now
.
AddDays
(-
14
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
ViewBag
.
StartThirtyDate
=
DateTime
.
Now
.
AddDays
(-
30
).
ToString
(
"yyyy-MM-dd"
)
+
" 00:00:00"
;
return
View
();
}
...
...
@@ -273,12 +280,15 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
quantity_tuneout_onway
=
p
.
quantity_tuneout_onway
??
0
,
quantity_tuneout_30days
=
p
.
quantity_tuneout_30days
,
quantity_tunein_30days
=
(
p
.
quantity_tunein_30days
??
0
),
fourteenday_total_sales
=
(
p
.
fourteenday_total_sales
??
0
),
cash_in_30days
=
(
p
.
cash_in_30days
??
0
).
ToString
(
"N2"
),
cash_out_30days
=
(
p
.
cash_out_30days
??
0
).
ToString
(
"N2"
),
cash_net
=
(
p
.
cash_net
??
0
).
ToString
(
"N2"
),
pin_rate_stock
=
((
p
.
pin_rate_stock
??
0
)
*
100
).
ToString
(
"N2"
),
p
.
available_days
,
p
.
hq_type
,
});
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/ListWareHouseSku.cshtml
View file @
6cdd6f00
...
...
@@ -196,11 +196,29 @@
{
field: 'quantity_tunein_30days', title: '30天调入数', width: '130', sortable: true, iscount: true
},
{ field: 'oneday_total_sales', title: '昨日总销量', width: '130', sortable: true },
{ field: 'amount_onedaysale', title: '昨日总销售额', width: '130', sortable: true },
{ field: 'sevenday_total_sales', title: '七天销量', width: '100', sortable: true },
{ field: 'fourteenday_total_sales', title: '十四天销量', width: '120', sortable: true },
{ field: 'thirtyday_total_sales', title: '三十天销量', width: '130', sortable: true },
{
field: 'oneday_total_sales', title: '昨日总销量', width: '130', sortable: true, formatter: function (idx, data) {
return ((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '昨日总销量' + '\',1,\'' + data.warehouse_code + '\',\'' + data.bailun_sku + '\')">' + data.oneday_total_sales + '</a>' : data.oneday_total_sales);
}
},
{
field: 'amount_onedaysale', title: '昨日总销售额', width: '130', sortable: true
},
{
field: 'sevenday_total_sales', title: '七天销量', width: '100', sortable: true, formatter: function (idx, data) {
return ((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '七天销量' + '\',7,\'' + data.warehouse_code + '\',\'' + data.bailun_sku + '\')">' + data.sevenday_total_sales + '</a>' : data.sevenday_total_sales);
}
},
{
field: 'fourteenday_total_sales', title: '十四天销量', width: '120', sortable: true, formatter: function (idx, data) {
return ((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '十四天销量' + '\',14,\'' + data.warehouse_code + '\',\'' + data.bailun_sku + '\')">' + data.fourteenday_total_sales + '</a>' : data.fourteenday_total_sales);
}
},
{
field: 'thirtyday_total_sales', title: '三十天销量', width: '130', sortable: true, formatter: function (idx, data) {
return ((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '三十天销量' + '\',30,\'' + data.warehouse_code + '\',\'' + data.bailun_sku + '\')">' + data.thirtyday_total_sales + '</a>' : data.thirtyday_total_sales);
}
},
{
field: 'cash_in_30days', title: '30天现金流收入', width: '130', sortable: true, iscount: true, formatter: function (idx, data) {
return '<a href="javascript:;" onclick="ShowCashFlow(\'' + data.warehouse_code + '\',\'' + data.warehouse_name + '\',\'' + data.bailun_sku + '\')">' + data.cash_in_30days + '</a>';
...
...
@@ -328,6 +346,25 @@
layer_show(name + '现金流明细', 'http://aims.bailuntec.com/view/reports/cash-flow-sku.html?warehouse_code=' + code+'&bailun_sku='+sku, '90%', '90%');
}
function ShowOrderList(name,t,warehousecode,sku) {
var start = '@(ViewBag.StartOneDate)';
var end = '@(ViewBag.EndDate)';
if (t == 7) {
start = '@(ViewBag.StartSevenDate)';
}
else if (t == 14) {
start = '@(ViewBag.StartFourteenDate)';
}
else if (t == 30) {
start = '@(ViewBag.StartThirtyDate)';
}
var url = 'http://oms.bailuntec.com/#/bailun-order/all-orders?baseQueryKey=SkuNo_Accurate&dateType=payTime&baseQueryValue=' + sku + '&daterange=' + start + '&daterange=' + end + '&wareNo=' + warehousecode + '&orderStatus=0&orderStatus=1&orderStatus=3';
console.log(url);
layer_show(name + " 的订单明细", url, '90%', '90%');
}
</script>
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
View file @
6cdd6f00
...
...
@@ -132,8 +132,9 @@
return data.quantity_tunein_30days + '<img src="@Url.Content("~/img/icon-trendchart.png")" title="30天调入数趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'30天调入数\',\'quantity_tunein_30days\',\'' + data.warehouse_name + '\');" />';
}
},
{ field: 'oneday_total_sales', title: '昨日总销量', width: '130', sortable: true, iscount: true, formatter: function (idx, data) {
return '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '昨日总销量' + '\',1,\'' + data.warehouse_code + '\')">' + data.oneday_total_sales + '</a><img src="@Url.Content("~/img/icon-trendchart.png")" title="昨日总销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'昨日总销量\',\'oneday_total_sales\',\'' + data.warehouse_name + '\');" />';
{
field: 'oneday_total_sales', title: '昨日总销量', width: '130', sortable: true, iscount: true, formatter: function (idx, data) {
return ((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '昨日总销量' + '\',1,\'' + data.warehouse_code + '\')">' + data.oneday_total_sales + '</a>' : data.oneday_total_sales) + '<img src="@Url.Content("~/img/icon-trendchart.png")" title="昨日总销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'昨日总销量\',\'oneday_total_sales\',\'' + data.warehouse_name + '\');" />';
}
},
{
...
...
@@ -143,19 +144,18 @@
},
{
field: 'sevenday_total_sales', title: '七天销量', width: '100', sortable: true, iscount: true, formatter: function (idx, data) {
return
data.sevenday_total_sales
+ '<img src="@Url.Content("~/img/icon-trendchart.png")" title="七天销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'七天销量\',\'sevenday_total_sales\',\'' + data.warehouse_name + '\');" />';
return
((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '七天销量' + '\',7,\'' + data.warehouse_code + '\')">' + data.sevenday_total_sales + '</a>' : data.sevenday_total_sales)
+ '<img src="@Url.Content("~/img/icon-trendchart.png")" title="七天销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'七天销量\',\'sevenday_total_sales\',\'' + data.warehouse_name + '\');" />';
}
},
{
field: 'fourteenday_total_sales', title: '十四天销量', width: '120', sortable: true, iscount: true, formatter: function (idx, data) {
return
data.fourteenday_total_sales
+ '<img src="@Url.Content("~/img/icon-trendchart.png")" title="十四天销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'十四天销量\',\'fourteenday_total_sales\',\'' + data.warehouse_name + '\');" />';
return
((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '十四天销量' + '\',14,\'' + data.warehouse_code + '\')">' + data.fourteenday_total_sales + '</a>' : data.fourteenday_total_sales)
+ '<img src="@Url.Content("~/img/icon-trendchart.png")" title="十四天销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'十四天销量\',\'fourteenday_total_sales\',\'' + data.warehouse_name + '\');" />';
}
},
{
field: 'thirtyday_total_sales', title: '三十天销量', width: '130', sortable: true, iscount: true, formatter: function (idx, data) {
return
data.thirtyday_total_sales
+ '<img src="@Url.Content("~/img/icon-trendchart.png")" title="三十天销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'三十天销量\',\'thirtyday_total_sales\',\'' + data.warehouse_name + '\');" />';
return
((data.hq_type != 'FBA仓' && data.hq_type != '半成品仓') ? '<a href="javascript:;" onclick="ShowOrderList(\'' + data.warehouse_name + '三十天销量' + '\',30,\'' + data.warehouse_code + '\')">' + data.thirtyday_total_sales + '</a>' : data.thirtyday_total_sales)
+ '<img src="@Url.Content("~/img/icon-trendchart.png")" title="三十天销量趋势图" style="height:20px;margin-left:3px;" onclick="ShowTrendChart(\'' + data.warehouse_code + '\',\'三十天销量\',\'thirtyday_total_sales\',\'' + data.warehouse_name + '\');" />';
}
},
{
field: 'cash_in_30days', title: '30天现金流收入', width: '130', sortable: true, iscount: true, formatter: function (idx, data) {
...
...
@@ -266,13 +266,15 @@
start = '@(ViewBag.StartSevenDate)';
}
else if (t == 14) {
end
= '@(ViewBag.StartFourteenDate)';
start
= '@(ViewBag.StartFourteenDate)';
}
else if (t == 30) {
end
= '@(ViewBag.StartThirtyDate)';
start
= '@(ViewBag.StartThirtyDate)';
}
layer_show(name + "的订单明细", 'http://oms.bailuntec.com/#/bailun-order/all-orders?baseQueryKey=SkuNo_Accurate&dateType=payTime&daterange=' + start + '&daterange=' + end + '&wareNo=' + warehousecode + '&orderStatus=0&orderStatus=1&orderStatus=3', '90%', '90%');
var url = 'http://oms.bailuntec.com/#/bailun-order/all-orders?baseQueryKey=SkuNo_Accurate&dateType=payTime&daterange=' + start + '&daterange=' + end + '&wareNo=' + warehousecode + '&orderStatus=0&orderStatus=1&orderStatus=3';
console.log(url);
layer_show(name + " 的订单明细", url, '90%', '90%');
}
</script>
...
...
Bailun.DC.Web/Pages/Index.cshtml
View file @
6cdd6f00
...
...
@@ -24,7 +24,7 @@
<script
src=
"css/hplus/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"~/js/jquery.cookie.js"
type=
"text/javascript"
></script>
<script
src=
"~/js/common.js?20200
720003
"
type=
"text/javascript"
></script>
<script
src=
"~/js/common.js?20200
9160001
"
type=
"text/javascript"
></script>
</head>
<body
class=
"fixed-sidebar full-height-layout gray-bg"
style=
"overflow:hidden"
>
...
...
Bailun.DC.Web/wwwroot/js/common.js
View file @
6cdd6f00
...
...
@@ -315,10 +315,16 @@ function numFormat(num) {
function
login
()
{
var
token
=
getUrlParam
(
'token'
);
alert
(
baseUrl
);
if
(
token
!=
''
)
{
$
.
cookie
(
'BailunToken'
,
token
,
{
expires
:
1
,
domain
:
'bailuntec.com'
});
window
.
location
=
baseUrl
;
if
(
baseUrl
.
indexOf
(
'bailuntec'
)
>=
0
)
{
$
.
cookie
(
'BailunToken'
,
token
,
{
expires
:
1
,
domain
:
'bailuntec.com'
});
window
.
location
=
baseUrl
;
}
else
{
$
.
cookie
(
'BailunToken'
,
token
,
{
expires
:
1
,
domain
:
'localhost'
});
window
.
location
=
baseUrl
;
}
}
else
{
token
=
$
.
cookie
(
'BailunToken'
);
...
...
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