优化首页
This commit is contained in:
@@ -38,22 +38,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix visible-sm-block"></div>
|
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
<span class="info-box-icon bg-green"><i class="fa fa-shopping-basket"></i></span>
|
<span class="info-box-icon bg-green"><i class="fa fa-suitcase"></i></span>
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text">本月累计进货</span>
|
<span class="info-box-text">今日累计进货</span>
|
||||||
<span id="thisMonthBuy" class="info-box-number"></span>
|
<span id="todayBuy" class="info-box-number"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
<div class="info-box">
|
<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">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text">本月利润(含财务部分)</span>
|
<span class="info-box-text">本月累计进货</span>
|
||||||
<span id="thisMonthAmount" class="info-box-number"></span>
|
<span id="thisMonthBuy" class="info-box-number"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -133,6 +132,7 @@
|
|||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
$("#todaySale").text((res.data.todaySale).toFixed(2));
|
$("#todaySale").text((res.data.todaySale).toFixed(2));
|
||||||
|
$("#todayBuy").text((res.data.todayBuy).toFixed(2));
|
||||||
$("#thisMonthSale").text((res.data.thisMonthSale).toFixed(2));
|
$("#thisMonthSale").text((res.data.thisMonthSale).toFixed(2));
|
||||||
$("#thisMonthBuy").text((res.data.thisMonthBuy).toFixed(2));
|
$("#thisMonthBuy").text((res.data.thisMonthBuy).toFixed(2));
|
||||||
}
|
}
|
||||||
@@ -144,34 +144,12 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#todaySale").text("--");
|
$("#todaySale").text("--");
|
||||||
|
$("#todayBuy").text("--");
|
||||||
$("#thisMonthSale").text("--");
|
$("#thisMonthSale").text("--");
|
||||||
$("#thisMonthBuy").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) {
|
function getChartObj(titleName, categories, seriesData) {
|
||||||
var chartObj = {
|
var chartObj = {
|
||||||
chart: {
|
chart: {
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ public class DepotHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计今日销售额、本月销售额、本月进货额
|
* 统计今日销售额、今日进货额、本月销售额、本月进货额
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -441,6 +441,8 @@ public class DepotHeadController {
|
|||||||
1, today, getNow3()); //今日销售出库
|
1, today, getNow3()); //今日销售出库
|
||||||
BigDecimal todayRetailSale = depotHeadService.getBuyAndSaleRetailStatistics("出库", "零售",
|
BigDecimal todayRetailSale = depotHeadService.getBuyAndSaleRetailStatistics("出库", "零售",
|
||||||
0, today, getNow3()); //今日零售出库
|
0, today, getNow3()); //今日零售出库
|
||||||
|
BigDecimal todayBuy = depotHeadService.getBuyAndSaleStatistics("入库", "采购",
|
||||||
|
1, today, getNow3()); //今日采购入库
|
||||||
BigDecimal monthSale = depotHeadService.getBuyAndSaleStatistics("出库", "销售",
|
BigDecimal monthSale = depotHeadService.getBuyAndSaleStatistics("出库", "销售",
|
||||||
1,firstDay, getNow3()); //本月销售出库
|
1,firstDay, getNow3()); //本月销售出库
|
||||||
BigDecimal monthRetailSale = depotHeadService.getBuyAndSaleRetailStatistics("出库", "零售",
|
BigDecimal monthRetailSale = depotHeadService.getBuyAndSaleRetailStatistics("出库", "零售",
|
||||||
@@ -448,6 +450,7 @@ public class DepotHeadController {
|
|||||||
BigDecimal monthBuy = depotHeadService.getBuyAndSaleStatistics("入库", "采购",
|
BigDecimal monthBuy = depotHeadService.getBuyAndSaleStatistics("入库", "采购",
|
||||||
1, firstDay, getNow3()); //本月采购入库
|
1, firstDay, getNow3()); //本月采购入库
|
||||||
map.put("todaySale", todaySale.add(todayRetailSale));
|
map.put("todaySale", todaySale.add(todayRetailSale));
|
||||||
|
map.put("todayBuy", todayBuy);
|
||||||
map.put("thisMonthSale", monthSale.add(monthRetailSale));
|
map.put("thisMonthSale", monthSale.add(monthRetailSale));
|
||||||
map.put("thisMonthBuy", monthBuy);
|
map.put("thisMonthBuy", monthBuy);
|
||||||
res.code = 200;
|
res.code = 200;
|
||||||
|
|||||||
Reference in New Issue
Block a user