mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:13:26 +08:00
后台【修复】:修复库存显示数据错误,链接错误,商品库存异常列表数据错误的问题。
This commit is contained in:
@@ -1930,7 +1930,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
|
||||
//库存报警
|
||||
var goodsStaticsTotalWarn = await _productsServices.GoodsStaticsTotalWarn(goodsStocksWarn);
|
||||
|
||||
|
||||
//返回数据
|
||||
jm.code = 0;
|
||||
jm.msg = "数据调用成功!";
|
||||
@@ -1939,11 +1939,9 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
unpaidCount,
|
||||
unshipCount,
|
||||
aftersalesCount,
|
||||
goodsStaticsTotalWarn
|
||||
goodsStaticsTotalWarn,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
return jm;
|
||||
}
|
||||
|
||||
|
||||
@@ -231,14 +231,22 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
//获取库存
|
||||
var allConfigs = await _settingServices.GetConfigDictionaries();
|
||||
var kc = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.GoodsStocksWarn);
|
||||
var kcNumer = kc.ObjectToInt();
|
||||
if (kc != null)
|
||||
{
|
||||
var kcNumer = kc.ObjectToInt();
|
||||
where = where.And(p => p.stock <= kcNumer && p.isDel == false && p.isMarketable);
|
||||
var ids = await _productsServices.GoodsStaticsTotalWarnByGoodIds(kcNumer);
|
||||
if (ids.Any())
|
||||
{
|
||||
where = where.And(p=>ids.Contains(p.id));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
where = where.And(p => p.stock <= 0 && p.isDel == false && p.isMarketable);
|
||||
var ids = await _productsServices.GoodsStaticsTotalWarnByGoodIds(0);
|
||||
if (ids.Any())
|
||||
{
|
||||
where = where.And(p => ids.Contains(p.id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,13 +303,13 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
if (kc != null)
|
||||
{
|
||||
var kcNumer = kc.ObjectToInt();
|
||||
totalWarn = await _coreCmsGoodsServices.GetCountAsync(p =>
|
||||
p.stock <= kcNumer && p.isDel == false && p.isMarketable);
|
||||
//返回数量
|
||||
totalWarn = await _productsServices.GoodsStaticsTotalWarn(kcNumer);
|
||||
}
|
||||
else
|
||||
{
|
||||
totalWarn = await _coreCmsGoodsServices.GetCountAsync(p =>
|
||||
p.stock <= 0 && p.isDel == false && p.isMarketable);
|
||||
//返回数量
|
||||
totalWarn = await _productsServices.GoodsStaticsTotalWarn(0);
|
||||
}
|
||||
|
||||
//获取商品分类
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-col-xs6">
|
||||
<a lay-href="/order/orders/" class="layadmin-backlog-body">
|
||||
<a lay-href="/good/goods/" class="layadmin-backlog-body">
|
||||
<h3>库存报警</h3>
|
||||
<p><cite style="color: #FF5722;">{{d.goodsStaticsTotalWarn || '0'}}</cite></p>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user