直发买手拍单功能

This commit is contained in:
wule committed 2026-08-03 16:23:25 +08:00
1 parent fe9635f37f
commit 785fcce29e
22 files changed
+1172 -529

No files matched your search

@@ -105,6 +105,11 @@ namespace AllBase.Model.DBModel
get { return this.GetValue(x => x.ItemRefund); }
set { this.SetValue(x => x.ItemRefund, value); }
}
public string RefundAddressStr
{
get { return this.GetValue(x => x.RefundAddressStr); }
set { this.SetValue(x => x.RefundAddressStr, value); }
}
public void SetItemRefund()
{
if (ItemOrder?.refundItems?.Count == 1)
@@ -121,8 +126,14 @@ namespace AllBase.Model.DBModel
this.RefundDatetime = ItemRefund?.create_time == null ? DateTime.MinValue : BaseClass.StampToDateTime((ItemRefund?.create_time).ParseToInt());
if (ItemOrder != null)
ItemOrder.RefundDatetime = this.RefundDatetime;
this.RefundDateTimeStr = RefundDatetime.ToString("yyyy-MM-dd HH:mm:ss");
this.RefundTimeVisibility = RefundDatetime == DateTime.MinValue ? Visibility.Collapsed : Visibility.Visible;
RefundAddressStr = "";
if (ItemRefund != null)
RefundAddressStr = ItemRefund.return_user_name + " " + ItemRefund.return_tel + " " +
ItemRefund.return_province + ItemRefund.return_city + ItemRefund.return_county + ItemRefund.return_detail;
}
/// <summary>
/// 退款状态文本
@@ -249,7 +260,7 @@ namespace AllBase.Model.DBModel
if (this.ItemTransitOrderWithVoid == null || (!this.ItemOrder.IsEmergency && !this.ItemOrder.isAbnormal))
AddEditTransitWarehouseAfterSaleStr = "";
else
AddEditTransitWarehouseAfterSaleStr = this.ItemTransitOrderAfterSale == null ? "添加" : "查看";
AddEditTransitWarehouseAfterSaleStr = this.ItemTransitOrderAfterSale == null ? "添加" : "已添加";
if (this.ItemTransitOrderAfterSale != null)
TransitWarehouseAfterSaleWayBillStr = (this.ItemTransitOrderAfterSale?.downstream_express_code + "-" + this.ItemTransitOrderAfterSale?.downstream_waybill).Trim('-');
@@ -458,13 +469,14 @@ namespace AllBase.Model.DBModel
{
get
{
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
var warehouseWaybillStatusStr = WarehouseWaybillStatusStr.ParseToString();
//if (warehouseWaybillStatusStr.StartsWith("中转已作废"))
// return PurpleBrush;
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
if (warehouseWaybillStatusStr.StartsWith("中转已出库"))
return GlobalConfig.GreenBrush;
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
if (warehouseWaybillStatusStr.StartsWith("中转已入库") || warehouseWaybillStatusStr.StartsWith("中转已取号") || warehouseWaybillStatusStr.StartsWith("中转提前取号"))
return GlobalConfig.YellowBrush;
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
if (warehouseWaybillStatusStr.StartsWith("中转待取号"))
return GlobalConfig.RedBrush;
return GlobalConfig.RedBrush;
}
@@ -478,13 +490,14 @@ namespace AllBase.Model.DBModel
{
get
{
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
string warehouseWaybillStatusStr = this.WarehouseWaybillStatusStr.ParseToString();
//if (warehouseWaybillStatusStr.StartsWith("中转已作废"))
// return PurpleBrush75;
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
if (warehouseWaybillStatusStr.StartsWith("中转已出库"))
return GlobalConfig.GreenBrush75;
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
if (warehouseWaybillStatusStr.StartsWith("中转已入库") || warehouseWaybillStatusStr.StartsWith("中转已取号") || warehouseWaybillStatusStr.StartsWith("中转提前取号"))
return GlobalConfig.YellowBrush75;
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
if (warehouseWaybillStatusStr.StartsWith("中转待取号"))
return GlobalConfig.RedBrush75;
return GlobalConfig.RedBrush75;
}
@@ -494,13 +507,14 @@ namespace AllBase.Model.DBModel
{
get
{
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
string warehouseWaybillStatusStr = this.WarehouseWaybillStatusStr.ParseToString();
//if (warehouseWaybillStatusStr.StartsWith("中转已作废"))
// return PurpleBrush35
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
if (warehouseWaybillStatusStr.ParseToString().StartsWith("中转已出库"))
return GlobalConfig.GreenBrush35;
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
if (warehouseWaybillStatusStr.ParseToString().StartsWith("中转已入库") || warehouseWaybillStatusStr.StartsWith("中转已取号") || warehouseWaybillStatusStr.StartsWith("中转提前取号"))
return GlobalConfig.YellowBrush35;
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
if (warehouseWaybillStatusStr.ParseToString().StartsWith("中转待取号"))
return GlobalConfig.RedBrush35;
return GlobalConfig.RedBrush35;
}
@@ -626,7 +640,7 @@ namespace AllBase.Model.DBModel
if (ItemOrder?.status == 100)
return "订单完成";
if (ItemOrder?.status == 200)
return "售后完成订单取消";
return "售后完成单取消";
if (ItemOrder?.status == 250)
return "未付款已取消";
return "未知状态";
@@ -680,6 +694,55 @@ namespace AllBase.Model.DBModel
}
public List<order_pdd_buyer_after_sale> DirectPddOrders { get; set; } = new List<order_pdd_buyer_after_sale>();
public order_pdd_buyer_after_sale DirectPddOrder
{
get { return this.GetValue(x => x.DirectPddOrder); }
set { this.SetValue(x => x.DirectPddOrder, value); }
}
public List<order_pdd_buyer_after_sale> DirectPddBuyerAfterSales { get; set; } = new List<order_pdd_buyer_after_sale>();
public order_pdd_buyer_after_sale DirectPddBuyerAfterSale
{
get { return this.GetValue(x => x.DirectPddBuyerAfterSale); }
set { this.SetValue(x => x.DirectPddBuyerAfterSale, value); }
}
public string DirectRefundStatusStr
{
get { return this.GetValue(x => x.DirectRefundStatusStr); }
set { this.SetValue(x => x.DirectRefundStatusStr, value); }
}
/// <summary>
/// 直发买手售后字段文字显示背景颜色
/// </summary>
public SolidColorBrush DirectRefundStatusBackColor
{
get { return this.GetValue(x => x.DirectRefundStatusBackColor); }
set { this.SetValue(x => x.DirectRefundStatusBackColor, value); }
}
public void SetDirectOrder()
{
this.DirectPddOrder = DirectPddOrders.FirstOrDefault(p => OrderItemExt?.out_order_id == p.orderSn);
//this.DirectPddBuyerAfterSale = DirectPddBuyerAfterSales?.FirstOrDefault(p => p.statusText == "退款成功") ?? DirectPddBuyerAfterSales?.FirstOrDefault(p => p.statusText != "申请已撤销");
//if (DirectPddBuyerAfterSale == null)
// DirectPddBuyerAfterSale = DirectPddBuyerAfterSales?.FirstOrDefault();
this.DirectPddBuyerAfterSale = DirectPddBuyerAfterSales.FirstOrDefault(p => OrderItemExt?.out_order_id == p.orderSn);
// 服务端这个值不会在拍新单后覆盖,在此处使用扩展订单绑定的买手单信息修改掉,后续在拍单的时候覆盖掉
if (!this.ItemOrder.out_after_sale_status.ParseToString().Contains("需手动申请售后"))
this.ItemOrder.out_after_sale_status = DirectPddBuyerAfterSale?.statusText;
DirectRefundStatusStr = (this.DirectPddBuyerAfterSale?.statusText).ParseToString();
if (DirectRefundStatusStr.Contains("退款成功"))
DirectRefundStatusStr += "(¥" + DirectPddBuyerAfterSale.refundAmount * 0.01m + ")";
DirectRefundStatusBackColor = GlobalConfig.RedBrush;
if (DirectRefundStatusStr.ParseToString().Contains("退款成功"))
DirectRefundStatusBackColor = GlobalConfig.GreenBrush;
else if (DirectRefundStatusStr.ParseToString().Contains("需手动申请售后"))
DirectRefundStatusBackColor = GlobalConfig.RedBrush;
}
/// <summary>
/// 订单中所有商品加起来的总售价文本
/// </summary>
@@ -1075,6 +1138,7 @@ namespace AllBase.Model.DBModel
this.SetTransitOrder();
this.SetItemRefund();
this.SetDirectOrder();
this.SetBuyerTransitWaybillStatusStr();
this.SetWarehouseWaybillStatusStr();
@@ -1087,7 +1151,16 @@ namespace AllBase.Model.DBModel
{
var order_item = this;
order_item.Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order_item.shop_id.ParseToString());
if (GlobalConfig.lstDangerItemWord.Any(d => order_item.title.Contains(d)))
order_item.IsBuyGoodsBtnEnabled = false;
if (order_item.BuyMap == null)
{
order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnTxt = "关联拍单";
order_item.BuyGoodsBtnBackColor = GlobalConfig.PurpleBrush100;
order_item.BuyGoodsBtnColor = GlobalConfig.PurpleBrush;
}
else if (GlobalConfig.lstDangerItemWord.Any(d => order_item.title.Contains(d)))
{
order_item.IsBuyGoodsBtnEnabled = false;
order_item.BuyGoodsBtnBackColor = GlobalConfig.RedTextBrush50;
@@ -1097,7 +1170,6 @@ namespace AllBase.Model.DBModel
else if (Shop == null || (Shop?.LoginStatus != "登录成功" /*&& Shop?.Is29Supplier == null*/))
{
order_item.IsBuyGoodsBtnEnabled = false;
//order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnBackColor = GlobalConfig.RedTextBrush50;
order_item.BuyGoodsBtnColor = GlobalConfig.RedTextBrush;
order_item.BuyGoodsBtnTxt = "请登录店铺";
@@ -1111,7 +1183,6 @@ namespace AllBase.Model.DBModel
}
else if (Shop?.Is29Supplier == false)
{
//order_item.IsBuyGoodsBtnEnabled = false;
order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnBackColor = GlobalConfig.RedTextBrush50;
order_item.BuyGoodsBtnColor = GlobalConfig.RedTextBrush;
@@ -1120,13 +1191,8 @@ namespace AllBase.Model.DBModel
else
{
order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnTxt = order_item.BuyMap == null ? "关联拍单" : "云仓拍单";
if (order_item.BuyMap == null)
{
order_item.BuyGoodsBtnBackColor = GlobalConfig.PurpleBrush100;
}
else
order_item.BuyGoodsBtnBackColor = GlobalConfig.PurpleBrush35;
order_item.BuyGoodsBtnTxt = "云仓拍单";
order_item.BuyGoodsBtnBackColor = GlobalConfig.PurpleBrush35;
order_item.BuyGoodsBtnColor = GlobalConfig.PurpleBrush;
}
}