pxx上货功能 temu备货管理可以查询商品售后率并根据售后率处理备货

This commit is contained in:
wule committed 2025-09-19 09:31:34 +08:00
1 parent f4fedf1e2f
commit 0e6a034d5f
34 files changed
+3568 -893

No files matched your search

@@ -938,13 +938,19 @@ namespace TemuKJD.KJDForms.ProductForms
foreach(var order in subOrderInfoLstTmp)
{
order.goodsAfsScore = -1;
order.qltyAfsOrdCnt = -1;
order.qltyAfsOrdrRate = -1;
}
}
foreach (var qualityInfo in qualityInfoLst)
{
var order = subOrderInfoLstTmp.FirstOrDefault(o => o.productId == qualityInfo.productId);
if (order != null)
{
order.goodsAfsScore = qualityInfo.goodsAfsScore;
order.qltyAfsOrdCnt = qualityInfo.qltyAfsOrdCnt;
order.qltyAfsOrdrRate = qualityInfo.qltyAfsOrdrRate;
}
}
//---------------------------------------------------------------------------------------
lstSubOrderInfo.AddRange(subOrderInfoLstTmp);
@@ -973,6 +979,8 @@ namespace TemuKJD.KJDForms.ProductForms
sInfo.skuQuantityTotalInfo.inventoryNumInfo.warehouseInventoryNum,
sInfo.skuQuantityTotalInfo.inventoryNumInfo.waitReceiveNum,
sInfo.goodsAfsScore == null ? "-" : (Math.Round(sInfo.goodsAfsScore.Value * 10) / 10).ToString(),
sInfo.qltyAfsOrdrRate == null ? "-" : (Math.Round(sInfo.qltyAfsOrdrRate.Value * 10000) / 100).ToString("0.00"),
sInfo.qltyAfsOrdCnt == null ? "-" : sInfo.qltyAfsOrdCnt.Value.ToString(),
sInfo.needStockUp == false ? "无需备货" : "可备货",
sInfo.goodsAfsScore == -1 ? "获取商品品质信息失败" : ""
);
@@ -1047,9 +1055,12 @@ namespace TemuKJD.KJDForms.ProductForms
ucGroupBoxEx4.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
var minQualityScore = this.txtMinQualityScore.Text.ParseToInt();
var minQualityScore = this.txtMinQualityScore.Text.ParseToDecimal();
if (!chkMinQualityScore.Checked) // 没选最低品质分,即不考虑品质分上货。
minQualityScore = -100;
var maxQualityRate = this.txtMaxQualityRate.Text.ParseToDecimal();
if (!chkMaxQualityRate.Checked) // 没选最高品质售后率,即不考虑品质售后率上货。
maxQualityRate = 100;
Task.Run(() =>
{
int i = 0;
@@ -1091,6 +1102,17 @@ namespace TemuKJD.KJDForms.ProductForms
}));
continue;
}
if (stockUp.qltyAfsOrdrRate != null && stockUp.qltyAfsOrdrRate * 100 > maxQualityRate)
{
Invoke(new Action(() =>
{
foreach (var row in rows)
{
row.Cells["colMsg"].Value = "商品品质售后率过高,请去网页手动备货";
}
}));
continue;
}
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == stockUp.supplierId.ToString());
if (shop == null || shop.LoginStatus != "登录成功")