Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
57d8b1c9
Commit
57d8b1c9
authored
Aug 30, 2020
by
季圣华
Browse files
优化首页
parent
6d7c44d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
erp_web/home.html
View file @
57d8b1c9
...
...
@@ -38,22 +38,21 @@
</div>
</div>
</div>
<div
class=
"clearfix visible-sm-block"
></div>
<div
class=
"col-md-3 col-sm-6 col-xs-12"
>
<div
class=
"info-box"
>
<span
class=
"info-box-icon bg-green"
><i
class=
"fa fa-s
hopping-basket
"
></i></span>
<span
class=
"info-box-icon bg-green"
><i
class=
"fa fa-s
uitcase
"
></i></span>
<div
class=
"info-box-content"
>
<span
class=
"info-box-text"
>
本月
累计进货
</span>
<span
id=
"t
hisMonth
Buy"
class=
"info-box-number"
></span>
<span
class=
"info-box-text"
>
今日
累计进货
</span>
<span
id=
"t
oday
Buy"
class=
"info-box-number"
></span>
</div>
</div>
</div>
<div
class=
"col-md-3 col-sm-6 col-xs-12"
>
<div
class=
"info-box"
>
<span
class=
"info-box-icon bg-yellow"
><i
class=
"fa fa-
rmb
"
></i></span>
<span
class=
"info-box-icon bg-yellow"
><i
class=
"fa fa-
shopping-basket
"
></i></span>
<div
class=
"info-box-content"
>
<span
class=
"info-box-text"
>
本月
利润(含财务部分)
</span>
<span
id=
"thisMonth
Amount
"
class=
"info-box-number"
></span>
<span
class=
"info-box-text"
>
本月
累计进货
</span>
<span
id=
"thisMonth
Buy
"
class=
"info-box-number"
></span>
</div>
</div>
</div>
...
...
@@ -133,6 +132,7 @@
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
)
{
$
(
"
#todaySale
"
).
text
((
res
.
data
.
todaySale
).
toFixed
(
2
));
$
(
"
#todayBuy
"
).
text
((
res
.
data
.
todayBuy
).
toFixed
(
2
));
$
(
"
#thisMonthSale
"
).
text
((
res
.
data
.
thisMonthSale
).
toFixed
(
2
));
$
(
"
#thisMonthBuy
"
).
text
((
res
.
data
.
thisMonthBuy
).
toFixed
(
2
));
}
...
...
@@ -144,34 +144,12 @@
});
}
else
{
$
(
"
#todaySale
"
).
text
(
"
--
"
);
$
(
"
#todayBuy
"
).
text
(
"
--
"
);
$
(
"
#thisMonthSale
"
).
text
(
"
--
"
);
$
(
"
#thisMonthBuy
"
).
text
(
"
--
"
);
}
});
$
(
function
()
{
var
loginName
=
sessionStorage
.
getItem
(
"
loginName
"
);
if
(
loginName
!=
"
admin
"
)
{
$
.
ajax
({
type
:
"
get
"
,
url
:
"
/account/getStatistics
"
,
dataType
:
"
json
"
,
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
)
{
$
(
"
#thisMonthAmount
"
).
text
((
res
.
data
.
allMonthAmount
-
0
).
toFixed
(
2
));
}
}
},
error
:
function
(
res
){
}
});
}
else
{
$
(
"
#thisMonthAmount
"
).
text
(
"
--
"
);
}
});
function
getChartObj
(
titleName
,
categories
,
seriesData
)
{
var
chartObj
=
{
chart
:
{
...
...
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
57d8b1c9
...
...
@@ -426,7 +426,7 @@ public class DepotHeadController {
}
/**
* 统计今日销售额、本月销售额、本月进货额
* 统计今日销售额、
今日进货额、
本月销售额、本月进货额
* @param request
* @return
*/
...
...
@@ -441,6 +441,8 @@ public class DepotHeadController {
1
,
today
,
getNow3
());
//今日销售出库
BigDecimal
todayRetailSale
=
depotHeadService
.
getBuyAndSaleRetailStatistics
(
"出库"
,
"零售"
,
0
,
today
,
getNow3
());
//今日零售出库
BigDecimal
todayBuy
=
depotHeadService
.
getBuyAndSaleStatistics
(
"入库"
,
"采购"
,
1
,
today
,
getNow3
());
//今日采购入库
BigDecimal
monthSale
=
depotHeadService
.
getBuyAndSaleStatistics
(
"出库"
,
"销售"
,
1
,
firstDay
,
getNow3
());
//本月销售出库
BigDecimal
monthRetailSale
=
depotHeadService
.
getBuyAndSaleRetailStatistics
(
"出库"
,
"零售"
,
...
...
@@ -448,6 +450,7 @@ public class DepotHeadController {
BigDecimal
monthBuy
=
depotHeadService
.
getBuyAndSaleStatistics
(
"入库"
,
"采购"
,
1
,
firstDay
,
getNow3
());
//本月采购入库
map
.
put
(
"todaySale"
,
todaySale
.
add
(
todayRetailSale
));
map
.
put
(
"todayBuy"
,
todayBuy
);
map
.
put
(
"thisMonthSale"
,
monthSale
.
add
(
monthRetailSale
));
map
.
put
(
"thisMonthBuy"
,
monthBuy
);
res
.
code
=
200
;
...
...
Write
Preview
Supports
Markdown
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