本地直发逻辑
This commit is contained in:
1 parent
ac0430f3f7
commit
f00cdee502
19 files changed
+1590
-520
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.MvvmBaseClasses;
|
||||
using NaiBa.Util.Extension;
|
||||
using NPOI.OpenXmlFormats.Dml.Diagram;
|
||||
using NPOI.OpenXmlFormats.Spreadsheet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,11 +12,23 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
|
||||
namespace AllBase.Model.DBModel
|
||||
{
|
||||
public class oms_wei_order_info : PropertyNotifyObject
|
||||
{
|
||||
public string OrderBuyType
|
||||
{
|
||||
get { return this.GetValue(x => x.OrderBuyType); }
|
||||
set { this.SetValue(x => x.OrderBuyType, value); }
|
||||
}
|
||||
public SolidColorBrush OrderBuyTypeColor
|
||||
{
|
||||
get { return this.GetValue(x => x.OrderBuyTypeColor); }
|
||||
set { this.SetValue(x => x.OrderBuyTypeColor, value); }
|
||||
}
|
||||
|
||||
public ObservableCollection<oms_wei_order_item_info> orderItems { get; set; } = new ObservableCollection<oms_wei_order_item_info>();
|
||||
|
||||
public oms_wei_order_item_info order_item1 { get { return orderItems?.Count > 0 ? orderItems[0] : null; } }
|
||||
@@ -38,7 +51,7 @@ namespace AllBase.Model.DBModel
|
||||
{
|
||||
get
|
||||
{
|
||||
if (order_id == "3737846414389704448")
|
||||
if (order_id == "3738070866253717760")
|
||||
{
|
||||
}
|
||||
if (status != 20 && status != 21) return false;
|
||||
@@ -47,9 +60,11 @@ namespace AllBase.Model.DBModel
|
||||
if (gift_order_status == 1 || gift_order_status == 2) return false;
|
||||
if (!string.IsNullOrEmpty(out_order_no))
|
||||
{
|
||||
var oi = orderItems.FirstOrDefault(o => o.ItemTransitOrders.Any(t => t.out_order_no == out_order_no && t.order_void_status == 1));
|
||||
if (oi == null && out_after_sale_status != "退款成功")
|
||||
return false;
|
||||
//var oi = orderItems.FirstOrDefault(o => o.ItemTransitOrders.Any(t => t.out_order_no == out_order_no && t.order_void_status == 1));
|
||||
//if (oi == null && out_after_sale_status != "退款成功")
|
||||
// return false;
|
||||
if (out_after_sale_status != "退款成功")
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -63,7 +78,7 @@ namespace AllBase.Model.DBModel
|
||||
//get { return (purchase_status == 1 || !string.IsNullOrEmpty(out_order_no)) && (status == 20 || status == 21); }
|
||||
get
|
||||
{
|
||||
if (order_id == "3737846414389704448")
|
||||
if (order_id == "3738070866253717760")
|
||||
{
|
||||
|
||||
}
|
||||
@@ -74,8 +89,10 @@ namespace AllBase.Model.DBModel
|
||||
if (gift_order_status == 1 || gift_order_status == 2) return false;
|
||||
if (!string.IsNullOrEmpty(out_order_no))
|
||||
{
|
||||
var oi = orderItems.FirstOrDefault(o => o.ItemTransitOrders.Any(t => t.out_order_no == out_order_no && t.order_void_status == 1));
|
||||
if (oi != null || out_after_sale_status == "退款成功")
|
||||
//var oi = orderItems.FirstOrDefault(o => o.ItemTransitOrders.Any(t => t.out_order_no == out_order_no && t.order_void_status == 1));
|
||||
//if (oi != null || out_after_sale_status == "退款成功")
|
||||
// return false;
|
||||
if (out_after_sale_status == "退款成功")
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -460,7 +477,21 @@ namespace AllBase.Model.DBModel
|
||||
set
|
||||
{
|
||||
this.SetValue(x => x.house_number, value);
|
||||
|
||||
this.AddressStr = user_name + " " + tel_number + " " + province_name + " " + city_name + " " + county_name + " " + detail_info;
|
||||
if (GlobalConfig.DicDecryptOrderAddress.ContainsKey(this.order_id))
|
||||
{
|
||||
var addressOrder = GlobalConfig.DicDecryptOrderAddress[this.order_id];
|
||||
|
||||
this.user_name = addressOrder.user_name;
|
||||
this.tel_number = addressOrder.tel_number;
|
||||
this.tel_number_ext_info = addressOrder.tel_number_ext_info;
|
||||
this.province_name = addressOrder.province_name;
|
||||
this.city_name = addressOrder.city_name;
|
||||
this.county_name = addressOrder.county_name;
|
||||
this.detail_info = addressOrder.detail_info;
|
||||
this.AddressStr = addressOrder.AddressStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -595,5 +626,25 @@ namespace AllBase.Model.DBModel
|
||||
/// 中转仓的状态 0未使用,1已创建,2创建失败(购买失败),3已创建未有上游快递单号,4已创建有上游快递单号
|
||||
/// </summary>
|
||||
public decimal? transfer_warehouse_status { get; set; }
|
||||
|
||||
public void SetOrderTextProperty()
|
||||
{
|
||||
if (order_id == "3737914129536416512")
|
||||
{
|
||||
|
||||
}
|
||||
if (this.orderItems.Any(oi => oi.OrderItemExt?.buy_type == "直发"))
|
||||
{
|
||||
OrderBuyType = "直发";
|
||||
OrderBuyTypeColor = GlobalConfig.RedTextBrush205;
|
||||
}
|
||||
else if (this.orderItems.Any(oi => oi.ItemTransitOrderWithVoid != null))
|
||||
{
|
||||
OrderBuyType = "云仓";
|
||||
OrderBuyTypeColor = GlobalConfig.GreenTextBrush;
|
||||
}
|
||||
else
|
||||
OrderBuyType = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,10 +20,6 @@ namespace AllBase.Model.DBModel
|
||||
{
|
||||
public class oms_wei_order_item_info : PropertyNotifyObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 颜色等图形元素需要在主线程操作
|
||||
/// </summary>
|
||||
public Dispatcher Dispatcher { get; set; }
|
||||
/// <summary>
|
||||
/// 订单对应店铺
|
||||
/// </summary>
|
||||
@@ -243,13 +239,14 @@ namespace AllBase.Model.DBModel
|
||||
else
|
||||
TransitOrderWaybillFromWareHouseStr = "仓库物流:" + ItemTransitOrder.express_2_company + "-" + ItemTransitOrder.express_2_waybill;
|
||||
|
||||
if (order_id == "3737937905497545216")
|
||||
if (order_id == "3737914129536416512")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// 仓库物流售后按钮上的文字,仓库作废单不存在仓库物流,所以此处必须是有效的仓库单(含作废失败)
|
||||
if (this.ItemTransitOrder == null || !this.ItemOrder.IsRefundWithCancel)
|
||||
//if (this.ItemTransitOrder == null || !this.ItemOrder.IsRefundWithCancel)
|
||||
if (this.ItemTransitOrderWithVoid == null || (!this.ItemOrder.IsEmergency && !this.ItemOrder.isAbnormal))
|
||||
AddEditTransitWarehouseAfterSaleStr = "";
|
||||
else
|
||||
AddEditTransitWarehouseAfterSaleStr = this.ItemTransitOrderAfterSale == null ? "添加" : "查看";
|
||||
@@ -353,15 +350,9 @@ namespace AllBase.Model.DBModel
|
||||
}
|
||||
|
||||
// 文本确定后设置颜色
|
||||
if (Dispatcher != null)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
SetBuyerTransitWaybillStatusStrColor();
|
||||
SetBuyerTransitWaybillStatusBorderColor();
|
||||
SetBuyerTransitWaybillStatusBackColor();
|
||||
}));
|
||||
}
|
||||
SetBuyerTransitWaybillStatusStrColor();
|
||||
SetBuyerTransitWaybillStatusBorderColor();
|
||||
SetBuyerTransitWaybillStatusBackColor();
|
||||
}
|
||||
public SolidColorBrush BuyerTransitWaybillStatusStrColor
|
||||
{
|
||||
@@ -371,15 +362,15 @@ namespace AllBase.Model.DBModel
|
||||
public void SetBuyerTransitWaybillStatusStrColor()
|
||||
{
|
||||
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
|
||||
BuyerTransitWaybillStatusStrColor = PurpleBrush;
|
||||
BuyerTransitWaybillStatusStrColor = GlobalConfig.PurpleBrush;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手已送达"))
|
||||
BuyerTransitWaybillStatusStrColor = GreenBrush;
|
||||
BuyerTransitWaybillStatusStrColor = GlobalConfig.GreenBrush;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
|
||||
BuyerTransitWaybillStatusStrColor = YellowBrush;
|
||||
BuyerTransitWaybillStatusStrColor = GlobalConfig.YellowBrush;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
|
||||
BuyerTransitWaybillStatusStrColor = RedBrush;
|
||||
BuyerTransitWaybillStatusStrColor = GlobalConfig.RedBrush;
|
||||
else
|
||||
BuyerTransitWaybillStatusStrColor = RedBrush;
|
||||
BuyerTransitWaybillStatusStrColor = GlobalConfig.RedBrush;
|
||||
}
|
||||
public SolidColorBrush BuyerTransitWaybillStatusBorderColor
|
||||
{
|
||||
@@ -389,15 +380,15 @@ namespace AllBase.Model.DBModel
|
||||
public void SetBuyerTransitWaybillStatusBorderColor()
|
||||
{
|
||||
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
|
||||
BuyerTransitWaybillStatusBorderColor = PurpleBrush75;
|
||||
BuyerTransitWaybillStatusBorderColor = GlobalConfig.PurpleBrush75;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手已送达"))
|
||||
BuyerTransitWaybillStatusBorderColor = GreenBrush75;
|
||||
BuyerTransitWaybillStatusBorderColor = GlobalConfig.GreenBrush75;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
|
||||
BuyerTransitWaybillStatusBorderColor = YellowBrush75;
|
||||
BuyerTransitWaybillStatusBorderColor = GlobalConfig.YellowBrush75;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
|
||||
BuyerTransitWaybillStatusBorderColor = RedBrush75;
|
||||
BuyerTransitWaybillStatusBorderColor = GlobalConfig.RedBrush75;
|
||||
else
|
||||
BuyerTransitWaybillStatusBorderColor = RedBrush75;
|
||||
BuyerTransitWaybillStatusBorderColor = GlobalConfig.RedBrush75;
|
||||
}
|
||||
public SolidColorBrush BuyerTransitWaybillStatusBackColor
|
||||
{
|
||||
@@ -407,15 +398,15 @@ namespace AllBase.Model.DBModel
|
||||
public void SetBuyerTransitWaybillStatusBackColor()
|
||||
{
|
||||
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
|
||||
BuyerTransitWaybillStatusBackColor = PurpleBrush35;
|
||||
BuyerTransitWaybillStatusBackColor = GlobalConfig.PurpleBrush35;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手已送达"))
|
||||
BuyerTransitWaybillStatusBackColor = GreenBrush35;
|
||||
BuyerTransitWaybillStatusBackColor = GlobalConfig.GreenBrush35;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
|
||||
BuyerTransitWaybillStatusBackColor = YellowBrush35;
|
||||
BuyerTransitWaybillStatusBackColor = GlobalConfig.YellowBrush35;
|
||||
else if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
|
||||
BuyerTransitWaybillStatusBackColor = RedBrush35;
|
||||
BuyerTransitWaybillStatusBackColor = GlobalConfig.RedBrush35;
|
||||
else
|
||||
BuyerTransitWaybillStatusBackColor = RedBrush35;
|
||||
BuyerTransitWaybillStatusBackColor = GlobalConfig.RedBrush35;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -470,12 +461,12 @@ namespace AllBase.Model.DBModel
|
||||
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
|
||||
// return PurpleBrush;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
|
||||
return GreenBrush;
|
||||
return GlobalConfig.GreenBrush;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
|
||||
return YellowBrush;
|
||||
return GlobalConfig.YellowBrush;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
|
||||
return RedBrush;
|
||||
return RedBrush;
|
||||
return GlobalConfig.RedBrush;
|
||||
return GlobalConfig.RedBrush;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -490,12 +481,12 @@ namespace AllBase.Model.DBModel
|
||||
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
|
||||
// return PurpleBrush75;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
|
||||
return GreenBrush75;
|
||||
return GlobalConfig.GreenBrush75;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
|
||||
return YellowBrush75;
|
||||
return GlobalConfig.YellowBrush75;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
|
||||
return RedBrush75;
|
||||
return RedBrush75;
|
||||
return GlobalConfig.RedBrush75;
|
||||
return GlobalConfig.RedBrush75;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -506,12 +497,12 @@ namespace AllBase.Model.DBModel
|
||||
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
|
||||
// return PurpleBrush35
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
|
||||
return GreenBrush35;
|
||||
return GlobalConfig.GreenBrush35;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
|
||||
return YellowBrush35;
|
||||
return GlobalConfig.YellowBrush35;
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
|
||||
return RedBrush35;
|
||||
return RedBrush35;
|
||||
return GlobalConfig.RedBrush35;
|
||||
return GlobalConfig.RedBrush35;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -566,10 +557,10 @@ namespace AllBase.Model.DBModel
|
||||
get
|
||||
{
|
||||
if (TransitRefundStatusStr.Contains("退款成功"))
|
||||
return GreenBrush;
|
||||
return GlobalConfig.GreenBrush;
|
||||
if (TransitRefundStatusStr.Contains("需手动申请售后"))
|
||||
return RedBrush;
|
||||
return LightOrangeBrush;
|
||||
return GlobalConfig.RedBrush;
|
||||
return GlobalConfig.LightOrangeBrush;
|
||||
//return YellowBrush;
|
||||
}
|
||||
set
|
||||
@@ -613,7 +604,7 @@ namespace AllBase.Model.DBModel
|
||||
{
|
||||
get
|
||||
{
|
||||
return OutOrderTimeQualifiedStr.EndsWith("√") ? GreenTextBrush : RedTextBrush;
|
||||
return OutOrderTimeQualifiedStr.EndsWith("√") ? GlobalConfig.GreenTextBrush : GlobalConfig.RedTextBrush;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,12 +641,12 @@ namespace AllBase.Model.DBModel
|
||||
get
|
||||
{
|
||||
if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr))
|
||||
return RedBrush;
|
||||
return GlobalConfig.RedBrush;
|
||||
if ("订单完成".Contains(OrderItemStatusStr))
|
||||
return GreenBrush;
|
||||
return GlobalConfig.GreenBrush;
|
||||
if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr))
|
||||
return YellowBrush;
|
||||
return YellowBrush;
|
||||
return GlobalConfig.YellowBrush;
|
||||
return GlobalConfig.YellowBrush;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -664,12 +655,12 @@ namespace AllBase.Model.DBModel
|
||||
get
|
||||
{
|
||||
if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr))
|
||||
return RedBrush75;
|
||||
return GlobalConfig.RedBrush75;
|
||||
if ("订单完成".Contains(OrderItemStatusStr))
|
||||
return GreenBrush75;
|
||||
return GlobalConfig.GreenBrush75;
|
||||
if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr))
|
||||
return YellowBrush75;
|
||||
return YellowBrush75;
|
||||
return GlobalConfig.YellowBrush75;
|
||||
return GlobalConfig.YellowBrush75;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -678,12 +669,12 @@ namespace AllBase.Model.DBModel
|
||||
get
|
||||
{
|
||||
if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr))
|
||||
return RedBrush35;
|
||||
return GlobalConfig.RedBrush35;
|
||||
if ("订单完成".Contains(OrderItemStatusStr))
|
||||
return GreenBrush35;
|
||||
return GlobalConfig.GreenBrush35;
|
||||
if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr))
|
||||
return YellowBrush35;
|
||||
return YellowBrush35;
|
||||
return GlobalConfig.YellowBrush35;
|
||||
return GlobalConfig.YellowBrush35;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -773,10 +764,13 @@ namespace AllBase.Model.DBModel
|
||||
//get { return "¥" + (ItemOrder.out_amount * 0.01m).ParseToDecimal().ToString("0.00"); }
|
||||
get
|
||||
{
|
||||
if (ItemTransitOrder?.out_amount > 0)
|
||||
return "¥" + (ItemTransitOrder.out_amount * 0.01m).ParseToDecimal().ToString("0.00");
|
||||
//if (ItemTransitOrder?.out_amount > 0)
|
||||
// return "¥" + (ItemTransitOrder.out_amount * 0.01m).ParseToDecimal().ToString("0.00");
|
||||
|
||||
if (ItemTransitOrders.Any(t => t.refund_status != "买手退款成功"))
|
||||
return "¥" + (ItemTransitOrders.Where(t => t.refund_status != "买手退款成功").Sum(t => t.out_amount) * 0.01m).ParseToDecimal().ToString("0.00");
|
||||
else
|
||||
return "¥" + (commission_amount.ParseToInt() * 0.01m).ParseToDecimal().ToString("0.00");
|
||||
return "¥" + ((ItemOrder?.out_amount).ParseToInt() * 0.01m).ParseToDecimal().ToString("0.00");
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -825,9 +819,9 @@ namespace AllBase.Model.DBModel
|
||||
get
|
||||
{
|
||||
if (refund_status == 2 || refund_status == 3 || refund_status == 4 || refund_status == 11)
|
||||
return GrayBrush;
|
||||
return GlobalConfig.GrayBrush;
|
||||
//return ProfitCount > 0 ? new SolidColorBrush(Color.FromRgb(103, 194, 58)) : new SolidColorBrush(Color.FromRgb(250, 71, 51));
|
||||
return ProfitCount > 0 ? GreenTextBrush : RedTextBrush;
|
||||
return ProfitCount > 0 ? GlobalConfig.GreenTextBrush : GlobalConfig.RedTextBrush;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
@@ -874,6 +868,53 @@ namespace AllBase.Model.DBModel
|
||||
set { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 拼多多秒退异常重拍按钮可见条件
|
||||
/// </summary>
|
||||
public Visibility BtnAbnormalBtnVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.BtnAbnormalBtnVisibility); }
|
||||
set { this.SetValue(x => x.BtnAbnormalBtnVisibility, value); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 直发按钮可见条件
|
||||
/// </summary>
|
||||
public Visibility BtnDirectBuyOrderVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.BtnDirectBuyOrderVisibility); }
|
||||
set { this.SetValue(x => x.BtnDirectBuyOrderVisibility, value); }
|
||||
}
|
||||
public void SetAbnormalAndDirectBtnVisibility()
|
||||
{
|
||||
// 买手秒退异常重拍
|
||||
BtnAbnormalBtnVisibility = Visibility.Visible;
|
||||
// 不是异常单的不可异常重拍
|
||||
if (this.ItemOrder?.isAbnormal != true)
|
||||
BtnAbnormalBtnVisibility = Visibility.Collapsed;
|
||||
// 买手未退款的,中转正式取号以后的,不可异常重拍
|
||||
else if (this.ItemTransitOrder?.refund_status != "买手退款成功" ||
|
||||
this.WarehouseWaybillStatusStr == "中转已取号" || this.WarehouseWaybillStatusStr == "中转已入库" || this.WarehouseWaybillStatusStr == "中转已出库")
|
||||
BtnAbnormalBtnVisibility = Visibility.Collapsed;
|
||||
// 已正式取号的,不可异常重拍
|
||||
if (this.ItemTransitOrder?.pre_allocated_order_no == 1 || this.ItemTransitOrder?.pre_allocated_order_no == 3)
|
||||
BtnAbnormalBtnVisibility = Visibility.Collapsed;
|
||||
// 仓库异常的异常单不可异常重拍
|
||||
List<string> rawMsgKeyWords = new List<string> { "取号异常", "无法调用" };
|
||||
if (rawMsgKeyWords.Any(k => (this.ItemTransitOrderWithVoid?.raw_message).ParseToString().Contains(k)) && this.ItemTransitOrderWithVoid?.transfer_warehouse_status != 1)
|
||||
BtnAbnormalBtnVisibility = Visibility.Collapsed;
|
||||
|
||||
// 直拍按钮
|
||||
BtnDirectBuyOrderVisibility = Visibility.Collapsed;
|
||||
if (this.ItemOrder?.IsWaitBuy == true && this.BuyGoodsBtnTxt != "关联拍单")
|
||||
BtnDirectBuyOrderVisibility = Visibility.Visible;
|
||||
if (this.ItemOrder?.isAbnormal == true)
|
||||
{
|
||||
//if (BtnAbnormalBtnVisibility == Visibility.Collapsed && (this.ItemOrder.out_order_no.IsNullOrEmpty() || this.ItemOrder.out_after_sale_status == "退款成功"))
|
||||
if (this.ItemOrder.out_order_no.IsNullOrEmpty() || this.ItemOrder.out_after_sale_status == "退款成功")
|
||||
BtnDirectBuyOrderVisibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 订单商品表数据库id
|
||||
/// </summary>
|
||||
@@ -1017,73 +1058,20 @@ namespace AllBase.Model.DBModel
|
||||
/// </summary>
|
||||
public int? refund_status { get; set; }
|
||||
|
||||
|
||||
|
||||
public static SolidColorBrush PurpleBrush;
|
||||
public static SolidColorBrush PurpleBrush75;
|
||||
public static SolidColorBrush PurpleBrush50;
|
||||
public static SolidColorBrush PurpleBrush35;
|
||||
|
||||
public static SolidColorBrush GreenBrush;
|
||||
public static SolidColorBrush GreenBrush75;
|
||||
public static SolidColorBrush GreenBrush35;
|
||||
|
||||
public static SolidColorBrush YellowBrush;
|
||||
public static SolidColorBrush YellowBrush75;
|
||||
public static SolidColorBrush YellowBrush35;
|
||||
|
||||
public static SolidColorBrush LightOrangeBrush;
|
||||
public static SolidColorBrush OrangeBrush;
|
||||
public static SolidColorBrush OrangeBrush50;
|
||||
|
||||
public static SolidColorBrush RedBrush;
|
||||
public static SolidColorBrush RedBrush75;
|
||||
public static SolidColorBrush RedBrush35;
|
||||
|
||||
public static SolidColorBrush GrayBrush;
|
||||
|
||||
public static SolidColorBrush GreenTextBrush;
|
||||
public static SolidColorBrush RedTextBrush;
|
||||
public static SolidColorBrush RedTextBrush50;
|
||||
|
||||
public void SetOrderItemTextProperty()
|
||||
{
|
||||
CreateDateTime = BaseClass.StampToDateTime((ItemOrder?.create_time).ParseToInt());
|
||||
CreateDateTimeStr = CreateDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
UpdateTimeStr = BaseClass.StampToDateTime((ItemOrder?.update_time).ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
if (PurpleBrush == null && this.Dispatcher != null)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
PurpleBrush = new SolidColorBrush(Color.FromArgb(255, 152, 99, 143));
|
||||
PurpleBrush75 = new SolidColorBrush(Color.FromArgb(75, 152, 99, 143));
|
||||
PurpleBrush50 = new SolidColorBrush(Color.FromArgb(50, 152, 99, 143));
|
||||
PurpleBrush35 = new SolidColorBrush(Color.FromArgb(35, 152, 99, 143));
|
||||
|
||||
GreenBrush = new SolidColorBrush(Color.FromArgb(255, 19, 206, 102));
|
||||
GreenBrush75 = new SolidColorBrush(Color.FromArgb(75, 19, 206, 102));
|
||||
GreenBrush35 = new SolidColorBrush(Color.FromArgb(35, 19, 206, 102));
|
||||
|
||||
YellowBrush = new SolidColorBrush(Color.FromArgb(255, 255, 186, 0));
|
||||
YellowBrush75 = new SolidColorBrush(Color.FromArgb(75, 255, 186, 0));
|
||||
YellowBrush35 = new SolidColorBrush(Color.FromArgb(35, 255, 186, 0));
|
||||
|
||||
LightOrangeBrush = new SolidColorBrush(Color.FromArgb(255, 255, 155, 0));
|
||||
OrangeBrush = new SolidColorBrush(Color.FromArgb(255, 250, 127, 51));
|
||||
OrangeBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 127, 51));
|
||||
|
||||
RedBrush = new SolidColorBrush(Color.FromArgb(255, 255, 73, 73));
|
||||
RedBrush75 = new SolidColorBrush(Color.FromArgb(75, 255, 73, 73));
|
||||
RedBrush35 = new SolidColorBrush(Color.FromArgb(35, 255, 73, 73));
|
||||
|
||||
GrayBrush = new SolidColorBrush(Color.FromArgb(255, 127, 127, 127));
|
||||
|
||||
GreenTextBrush = new SolidColorBrush(Color.FromArgb(255, 103, 194, 58));
|
||||
RedTextBrush = new SolidColorBrush(Color.FromArgb(255, 250, 71, 51));
|
||||
RedTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 71, 51));
|
||||
}));
|
||||
}
|
||||
//if (PurpleBrush == null && GlobalConfig.Dispatcher != null)
|
||||
//{
|
||||
// // 初始化笔刷,必修Invoke;
|
||||
// GlobalConfig.Dispatcher.Invoke(new Action(() =>
|
||||
// {
|
||||
|
||||
// }));
|
||||
//}
|
||||
|
||||
this.SetTransitOrder();
|
||||
this.SetItemRefund();
|
||||
@@ -1092,6 +1080,7 @@ namespace AllBase.Model.DBModel
|
||||
|
||||
// 拍单、代发等信息判断并控制拍单按钮
|
||||
this.UpdateOrderItemBuyButton();
|
||||
this.SetAbnormalAndDirectBtnVisibility();
|
||||
}
|
||||
|
||||
public void UpdateOrderItemBuyButton()
|
||||
@@ -1101,39 +1090,44 @@ namespace AllBase.Model.DBModel
|
||||
if (GlobalConfig.lstDangerItemWord.Any(d => order_item.title.Contains(d)))
|
||||
{
|
||||
order_item.IsBuyGoodsBtnEnabled = false;
|
||||
order_item.BuyGoodsBtnBackColor = RedTextBrush50;
|
||||
order_item.BuyGoodsBtnColor = RedTextBrush;
|
||||
order_item.BuyGoodsBtnBackColor = GlobalConfig.RedTextBrush50;
|
||||
order_item.BuyGoodsBtnColor = GlobalConfig.RedTextBrush;
|
||||
order_item.BuyGoodsBtnTxt = "危险品不支持中转拍单";
|
||||
}
|
||||
else if (Shop == null || (Shop?.LoginStatus != "登录成功" /*&& Shop?.Is29Supplier == null*/))
|
||||
{
|
||||
order_item.IsBuyGoodsBtnEnabled = false;
|
||||
//order_item.IsBuyGoodsBtnEnabled = true;
|
||||
order_item.BuyGoodsBtnBackColor = RedTextBrush50;
|
||||
order_item.BuyGoodsBtnColor = RedTextBrush;
|
||||
order_item.BuyGoodsBtnBackColor = GlobalConfig.RedTextBrush50;
|
||||
order_item.BuyGoodsBtnColor = GlobalConfig.RedTextBrush;
|
||||
order_item.BuyGoodsBtnTxt = "请登录店铺";
|
||||
}
|
||||
else if (Shop?.LoginStatus == "登录成功" && Shop?.Is29Supplier == null)
|
||||
{
|
||||
order_item.IsBuyGoodsBtnEnabled = false;
|
||||
order_item.BuyGoodsBtnBackColor = OrangeBrush50;
|
||||
order_item.BuyGoodsBtnColor = OrangeBrush;
|
||||
order_item.BuyGoodsBtnBackColor = GlobalConfig.OrangeBrush50;
|
||||
order_item.BuyGoodsBtnColor = GlobalConfig.OrangeBrush;
|
||||
order_item.BuyGoodsBtnTxt = "代发状态读取中请稍候";
|
||||
}
|
||||
else if (Shop?.Is29Supplier == false)
|
||||
{
|
||||
//order_item.IsBuyGoodsBtnEnabled = false;
|
||||
order_item.IsBuyGoodsBtnEnabled = true;
|
||||
order_item.BuyGoodsBtnBackColor = RedTextBrush50;
|
||||
order_item.BuyGoodsBtnColor = RedTextBrush;
|
||||
order_item.BuyGoodsBtnBackColor = GlobalConfig.RedTextBrush50;
|
||||
order_item.BuyGoodsBtnColor = GlobalConfig.RedTextBrush;
|
||||
order_item.BuyGoodsBtnTxt = "去店铺后台绑定代发";
|
||||
}
|
||||
else
|
||||
{
|
||||
order_item.IsBuyGoodsBtnEnabled = true;
|
||||
order_item.BuyGoodsBtnTxt = order_item.BuyMap == null ? "关联拍单" : "拍单";
|
||||
order_item.BuyGoodsBtnBackColor = PurpleBrush50;
|
||||
order_item.BuyGoodsBtnColor = PurpleBrush;
|
||||
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.BuyGoodsBtnColor = GlobalConfig.PurpleBrush;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,14 @@ namespace AllBase.Model.DBModel
|
||||
public long? id { get; set; }
|
||||
public string order_id { get; set; }
|
||||
public string sku_id { get; set; }
|
||||
public string out_order_id { get; set; }
|
||||
public string shop_app_id { get; set; }
|
||||
public string shop_name { get; set; }
|
||||
/// <summary>
|
||||
/// 直发/云仓(一般只有直发才会写值,直发会覆盖中转)
|
||||
/// </summary>
|
||||
public string buy_type { get; set; }
|
||||
/// <summary>
|
||||
/// 订单异常文本
|
||||
/// </summary>
|
||||
public string abnormal_text { get; set; }
|
||||
|
||||
Reference in new issue
Block a user