diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs index 3e1f697..b358987 100644 --- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs +++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs @@ -2202,7 +2202,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls int index = 0; foreach (var tmpOrderItem in tmpOrderItems) { - if (tmpOrderItem.order_id == "3738534855500515072") + if (tmpOrderItem.order_id == "3739068430223324416") { } @@ -2237,7 +2237,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls continue; } - MainWindow.Instance.orderListCtrl.GetOrder(tmpOrderItem.order_id); + await Task.Run(() => { MainWindow.Instance.orderListCtrl.GetOrder(tmpOrderItem.order_id); }); + oms_wei_order_info order = null; Dispatcher.Invoke(new Action(() => { order = GlobalConfig.lstOrder.FirstOrDefault(oi => oi.order_id == tmpOrderItem.order_id); })); @@ -2353,7 +2354,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls { BaseMsgWindow.ShowAnimateMessage("买手退款信息更新成功" + orderItem.order_id, "Msg", 3); isSimPddAfterSaleSuccess = true; - Thread.Sleep(Randomx.GetId(10000, 12001)); + await Task.Run(() => { Thread.Sleep(Randomx.GetId(10000, 12001)); }); } else { @@ -2368,7 +2369,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls { BaseMsgWindow.ShowAnimateMessage("买手退款信息更新成功", "Msg", 3); isSimPddAfterSaleSuccess = true; - Thread.Sleep(Randomx.GetId(10000, 12001)); + await Task.Run(() => { Thread.Sleep(Randomx.GetId(10000, 12001)); }); } else { diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowItemCtrl.xaml b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowItemCtrl.xaml index 29153b3..e136c2e 100644 --- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowItemCtrl.xaml +++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowItemCtrl.xaml @@ -207,6 +207,7 @@ + + + + - + @@ -565,15 +578,10 @@ Orientation="Vertical" VerticalSpacing="2"> - - - + + Visibility="{Binding ElementName=txtDirectBuyerRefundAddress, Path=Visibility}"> public string ship_done_time_str { - get { return BaseClass.StampToDateTime(this.ship_done_time.ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss"); } + get { return BaseClass.StampToDateTime(this.ship_done_time.ParseToInt()).ToString("yy-MM-dd HH:mm:ss"); } set { } } /// @@ -666,6 +666,10 @@ namespace AllBase.Model.DBModel /// 中转仓的状态 0未使用,1已创建,2创建失败(购买失败),3已创建未有上游快递单号,4已创建有上游快递单号 /// public decimal? transfer_warehouse_status { get; set; } + /// + /// 店铺运费 + /// + public int? postage_price { get; set; } public void SetOrderTextProperty() { diff --git a/AllBase/Model/DBModel/oms_wei_order_item_info.cs b/AllBase/Model/DBModel/oms_wei_order_item_info.cs index 0b46931..e0c5aab 100644 --- a/AllBase/Model/DBModel/oms_wei_order_item_info.cs +++ b/AllBase/Model/DBModel/oms_wei_order_item_info.cs @@ -227,20 +227,20 @@ namespace AllBase.Model.DBModel } public List PddBuyerAfterSales { get; set; } = new List(); public order_pdd_buyer_after_sale PddBuyerAfterSale - { - get { return this.GetValue(x => x.PddBuyerAfterSale); } - set { this.SetValue(x => x.PddBuyerAfterSale, value); } + { + get { return this.GetValue(x => x.PddBuyerAfterSale); } + set + { + this.SetValue(x => x.PddBuyerAfterSale, value); + // 云仓买手退货地址 + this.PddBuyerAfterSaleAddressStr = this.PddBuyerAfterSale?.afterSaleAddress; + } } public string PddBuyerAfterSaleAddressStr { get { return this.GetValue(x => x.PddBuyerAfterSaleAddressStr); } set { this.SetValue(x => x.PddBuyerAfterSaleAddressStr, value); } } - public string DirectPddBuyerAfterSaleAddressStr - { - get { return this.GetValue(x => x.DirectPddBuyerAfterSaleAddressStr); } - set { this.SetValue(x => x.DirectPddBuyerAfterSaleAddressStr, value); } - } public void SetTransitOrder() { @@ -360,16 +360,6 @@ namespace AllBase.Model.DBModel AddEditTransitWarehouseReturnOrderStr = ""; } } - - // 云仓买手退货地址 - this.PddBuyerAfterSaleAddressStr = this.PddBuyerAfterSale?.afterSaleAddress; - - if (this.order_id == "3739062243856391936") - { - - } - // 直发买手退货地址 - this.DirectPddBuyerAfterSaleAddressStr = this.DirectPddBuyerAfterSale?.afterSaleAddress; } /// /// 仓库拒收按钮文本参数 @@ -861,11 +851,26 @@ namespace AllBase.Model.DBModel public List DirectPddBuyerAfterSales { get; set; } = new List(); 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.DirectPddBuyerAfterSale); } + set + { + if (order_id == "3738766466298321152") + { + + } + + this.SetValue(x => x.DirectPddBuyerAfterSale, value); + // 直发买手退货地址 + this.DirectPddBuyerAfterSaleAddressStr = DirectPddBuyerAfterSale?.afterSaleAddress; + } + } + public string DirectPddBuyerAfterSaleAddressStr + { + get { return this.GetValue(x => x.DirectPddBuyerAfterSaleAddressStr); } + set { this.SetValue(x => x.DirectPddBuyerAfterSaleAddressStr, value); } + } + public string DirectRefundStatusStr { get { return this.GetValue(x => x.DirectRefundStatusStr); } set { this.SetValue(x => x.DirectRefundStatusStr, value); } @@ -935,11 +940,18 @@ namespace AllBase.Model.DBModel set { } } + public string PostagePriceStr + { + + get { return "¥" + (ItemOrder?.postage_price * 0.01m / ItemOrder?.orderItems.Count).ParseToDecimal().ToString("0.00"); } + set { } + } + /// /// 采购价文本 /// - public string purchase_price_str - { + public string PurchasePriceStr + { //get { return "¥" + (order_items.Sum(oi => oi.purchase_price.ParseToInt()) * 0.01m).ParseToDecimal().ToString("0.00"); } get { return "¥" + (purchase_price * 0.01m).ParseToDecimal().ToString("0.00"); } set { } @@ -947,7 +959,7 @@ namespace AllBase.Model.DBModel /// /// 采购价文本是否可见 /// - public Visibility purchase_price_visibility + public Visibility PurchasePriceVisibility { get { if (ItemOrder.out_amount > 0 || ItemTransitOrder?.out_amount > 0) return Visibility.Collapsed; return Visibility.Visible; } set { } @@ -956,7 +968,7 @@ namespace AllBase.Model.DBModel /// /// 运费文本 /// - public string freight_str + public string FreightStr { //get { return "¥" + (order_items.Sum(oi => oi.freight.ParseToInt()) * 0.01m).ParseToDecimal().ToString("0.00"); } get { return "¥" + (freight * 0.01m).ParseToDecimal().ToString("0.00"); } @@ -1024,7 +1036,9 @@ namespace AllBase.Model.DBModel { //ItemOrder.out_amount ItemTransitOrder.out_amount 只有一个有值 var out_amount = ItemTransitOrder?.out_amount ?? ItemOrder.out_amount / ItemOrder.orderItems.Count; - profitCount = ((real_price.ParseToInt() + cash_coupon_discounted_price.ParseToInt() - purchase_price.ParseToInt() - freight.ParseToInt() - predict_commission_fee.ParseToInt() - + var postage_price = ItemOrder?.postage_price ?? ItemOrder.postage_price / ItemOrder.orderItems.Count; + profitCount = ((real_price.ParseToInt() + cash_coupon_discounted_price.ParseToInt() + postage_price - + purchase_price.ParseToInt() - freight.ParseToInt() - predict_commission_fee.ParseToInt() - commission_amount.ParseToInt() - out_amount.ParseToInt()) * 0.01m).ParseToDecimal(); } return profitCount;