Merge branch 'main' of github.com:jtt-fan/29WxOrder
This commit is contained in:
commit
107bf82f97
31 files changed
+2644
-885
No files matched your search
@@ -596,7 +596,7 @@
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkMapProd_Click"
|
||||
Content="已关联商品"
|
||||
Content="选择SKU"
|
||||
FontSize="12" />
|
||||
<CheckBox
|
||||
x:Name="chkMapSku"
|
||||
@@ -614,21 +614,20 @@
|
||||
MinWidth="48"
|
||||
Margin="8,0,4,0"
|
||||
Padding="4,0"
|
||||
c:DebugVisibility.Enable="True"
|
||||
Click="btnAutoBuy_Click"
|
||||
Content="自动拍单"
|
||||
FontSize="12"
|
||||
Style="{StaticResource BasePageButtonStyle}" />
|
||||
<!-- c:DebugVisibility.Enable="true" -->
|
||||
<Button
|
||||
x:Name="btnAutoBuyIntorduction"
|
||||
Width="Auto"
|
||||
Height="22"
|
||||
MinWidth="48"
|
||||
Margin="0,0,4,0"
|
||||
Margin="0,0,8,0"
|
||||
Padding="4,0"
|
||||
c:DebugVisibility.Enable="True"
|
||||
Click="btnAutoBuyIntroduction_Click"
|
||||
Content="自动拍单说明"
|
||||
Content="自动拍单设置说明"
|
||||
FontSize="12"
|
||||
Style="{StaticResource BasePageButtonLightStyle}" />
|
||||
<Polyline
|
||||
@@ -667,15 +666,35 @@
|
||||
Margin="4,0,4,4"
|
||||
BorderBrush="#e0e0e0"
|
||||
BorderThickness="0,0,0,1">
|
||||
<CheckBox
|
||||
x:Name="chkDirectSendFailed"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkDirectSendFailed_Click"
|
||||
Content="直拍发货失败"
|
||||
FontSize="12" />
|
||||
<WrapPanel>
|
||||
<CheckBox
|
||||
x:Name="chkDirectSendFailed"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkDirectSendFailed_Click"
|
||||
Content="直拍发货失败"
|
||||
FontSize="12" />
|
||||
<CheckBox
|
||||
x:Name="chkWaitSend48HourNoWaybill"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkWaitSendNoWaybill_Click"
|
||||
Content="48小时未发货"
|
||||
FontSize="12" />
|
||||
<CheckBox
|
||||
x:Name="chkWaitSend72HourNoWaybill"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkWaitSendNoWaybill_Click"
|
||||
Content="72小时未发货"
|
||||
FontSize="12" />
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem
|
||||
@@ -701,15 +720,43 @@
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox
|
||||
x:Name="chkNeedCheckExpress"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkNeedCheckExpress_Click"
|
||||
Content="需核对物流"
|
||||
FontSize="12" />
|
||||
<WrapPanel>
|
||||
<CheckBox
|
||||
x:Name="chkNeedCheckExpress"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkNeedCheckExpress_Click"
|
||||
Content="需核对物流"
|
||||
FontSize="12" />
|
||||
<Polyline
|
||||
Grid.Column="3"
|
||||
Width="10"
|
||||
Margin="5,0"
|
||||
VerticalAlignment="Center"
|
||||
Points="5,0 5,8 5,0"
|
||||
Stroke="{StaticResource mainColorBrush}"
|
||||
StrokeThickness="2" />
|
||||
<CheckBox
|
||||
x:Name="chk48HourNoWaybill"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkNoWaybill_Click"
|
||||
Content="48小时未发货"
|
||||
FontSize="12" />
|
||||
<CheckBox
|
||||
x:Name="chk72HourNoWaybill"
|
||||
Margin="6,8"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{StaticResource mainColorBrush}"
|
||||
Click="chkNoWaybill_Click"
|
||||
Content="72小时未发货"
|
||||
FontSize="12" />
|
||||
</WrapPanel>
|
||||
<WrapPanel
|
||||
Grid.Column="2"
|
||||
d:Opacity="0.2"
|
||||
@@ -1018,7 +1065,7 @@
|
||||
</wpf:TitleContent>
|
||||
<wpf:TitleContent
|
||||
Title="拦截退回总店状态"
|
||||
Margin="4,0,4,0"
|
||||
Margin="8,0,4,0"
|
||||
VerticalContentAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="Black"
|
||||
@@ -1034,7 +1081,7 @@
|
||||
<ComboBoxItem Content="请选择" />
|
||||
<ComboBoxItem Content="未拦截" />
|
||||
<ComboBoxItem Content="拦截中" />
|
||||
<!--<ComboBoxItem Content="拦截失败" />-->
|
||||
<ComboBoxItem Content="拦截失败" />
|
||||
<ComboBoxItem Content="拦截成功" />
|
||||
</ComboBox>
|
||||
</wpf:TitleContent>
|
||||
@@ -1091,17 +1138,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<WrapPanel>
|
||||
<Button
|
||||
x:Name="btnBatchRefund2"
|
||||
Grid.Column="1"
|
||||
Height="20"
|
||||
MinWidth="48"
|
||||
Margin="6,6"
|
||||
Padding="4,0"
|
||||
Click="btnBatchRefund_Click"
|
||||
Content="批量申请买手售后"
|
||||
FontSize="12"
|
||||
Style="{StaticResource BasePageButtonStyle}" />
|
||||
|
||||
<CheckBox
|
||||
x:Name="chkShopIsRefund"
|
||||
Grid.Column="0"
|
||||
@@ -1140,6 +1177,72 @@
|
||||
Click="chkUpShopAddressAnalyseFailed_Click"
|
||||
Content="总店地址解析失败"
|
||||
FontSize="12" />
|
||||
<Polyline
|
||||
Grid.Column="14"
|
||||
Width="10"
|
||||
Margin="5,0"
|
||||
VerticalAlignment="Center"
|
||||
Points="5,0 5,8 5,0"
|
||||
Stroke="{StaticResource mainColorBrush}"
|
||||
StrokeThickness="2"
|
||||
Visibility="Visible" />
|
||||
|
||||
<wpf:TitleContent
|
||||
Title="买手退货状态"
|
||||
Margin="4,0,4,0"
|
||||
VerticalContentAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="Black"
|
||||
Placement="Left"
|
||||
TitleVerticalAlignment="Center">
|
||||
<ComboBox
|
||||
x:Name="cmbReturnOrderBuyerStatus"
|
||||
Width="130"
|
||||
Height="23"
|
||||
SelectedIndex="0"
|
||||
SelectionChanged="cmbReturnOrderBuyerStatus_SelectionChanged"
|
||||
Style="{StaticResource RoundedComboBox}">
|
||||
<ComboBoxItem Content="请选择" />
|
||||
<ComboBoxItem Content="买手待申请售后" />
|
||||
<ComboBoxItem Content="买手待退货" />
|
||||
<ComboBoxItem Content="买手已寄出待商家退款" />
|
||||
<ComboBoxItem Content="买手退货失败" />
|
||||
</ComboBox>
|
||||
</wpf:TitleContent>
|
||||
<Button
|
||||
x:Name="btnBatchRefund2"
|
||||
Grid.Column="1"
|
||||
Height="20"
|
||||
MinWidth="48"
|
||||
Margin="6,6"
|
||||
Padding="4,0"
|
||||
Click="btnBatchRefund_Click"
|
||||
Content="批量申请买手售后"
|
||||
FontSize="12"
|
||||
Style="{StaticResource BasePageButtonStyle}" />
|
||||
<wpf:TitleContent
|
||||
Title="退货仓状态"
|
||||
Margin="8,0,4,0"
|
||||
VerticalContentAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="Black"
|
||||
Placement="Left"
|
||||
TitleVerticalAlignment="Center">
|
||||
<ComboBox
|
||||
x:Name="cmbReturnOrderStatus"
|
||||
Width="100"
|
||||
Height="23"
|
||||
SelectedIndex="0"
|
||||
SelectionChanged="cmbReturnOrderStatus_SelectionChanged"
|
||||
Style="{StaticResource RoundedComboBox}">
|
||||
<ComboBoxItem Content="请选择" />
|
||||
<ComboBoxItem Content="未创建" />
|
||||
<ComboBoxItem Content="创建失败" />
|
||||
<ComboBoxItem Content="已创建未到仓" />
|
||||
<ComboBoxItem Content="已到仓" />
|
||||
<ComboBoxItem Content="已发回" />
|
||||
</ComboBox>
|
||||
</wpf:TitleContent>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -5,6 +5,8 @@ using _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||
using _29WxOrderWpf.Ctrls.Statistics;
|
||||
using _29WxOrderWpf.Services;
|
||||
using _29WxOrderWpf.Utils;
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using _29WxOrderWpf.Views;
|
||||
using _29WxOrderWpf.Windows.OrderWindows;
|
||||
using AllBase;
|
||||
using AllBase.Extension;
|
||||
@@ -42,9 +44,9 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using Work;
|
||||
using Work._29Tools.BLL;
|
||||
using Work.BaseForms;
|
||||
using Work.BuyUsers;
|
||||
using Work.KJDServer.API.Models;
|
||||
using WPFCommon.Helpers;
|
||||
@@ -58,6 +60,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
/// </summary>
|
||||
public partial class OrderListCtrl : UserControl, INotifyPropertyChanged
|
||||
{
|
||||
public static bool IsAutoBuy { get; set; } = false;
|
||||
public CheckBox chkSelectAll = null;
|
||||
OrderFilterConfig _orderFilterConfig;
|
||||
public OrderFilterConfig orderFilterConfig
|
||||
@@ -304,8 +307,12 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
// 读取关联拍单商品
|
||||
var buyMapList = GetBuyProdMap(orderItems);
|
||||
|
||||
// 读取关联拍单的所有sku
|
||||
var buyMapSkusList = GetBuyProdMapSkus(orderItems);
|
||||
|
||||
// 读取物流轨迹
|
||||
var ewaybillLst = GetEWaybillPath(order_ids);
|
||||
|
||||
// 装载订单
|
||||
foreach (JObject jObj in jArr)
|
||||
{
|
||||
@@ -364,6 +371,15 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
// 装载订单售后详情
|
||||
order.refundItems = new ObservableCollection<oms_wei_refund_info>(refunds.Where(of => of.order_id == order.order_id));
|
||||
|
||||
|
||||
if (order.order_id.Contains("3738794693820307200"))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// 装载订单物流最后一条信息
|
||||
order.latestEWaybills = [.. ewaybillLst.Where(ew => ew.order_id == order.order_id.ParseToLong())];
|
||||
|
||||
// 读取订单后立即赋值,防止滚动时实时赋值造成卡顿
|
||||
InitOrderObservableProp(order);
|
||||
|
||||
@@ -682,6 +698,37 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
return new List<order_pdd_buyer_after_sale>();
|
||||
}
|
||||
|
||||
public static List<oms_wei_ewaybill_path> GetEWaybillPath(string order_ids)
|
||||
{
|
||||
List<oms_wei_ewaybill_path> oms_wei_ewaybill_path_list = null;
|
||||
if (!string.IsNullOrEmpty(order_ids))
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_latest_list");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&erp_order_id_in=" + order_ids;
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgWindow.ShowAnimateMessage("物流查询失败 " + BaseRegex.GetStringJson(ref html, "msg"), "Error", 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
oms_wei_ewaybill_path_list = JsonHelper.DeserializeJsonToList<oms_wei_ewaybill_path>(JObject.Parse(html)["data"].ParseToString()).OrderByDescending(p => p.update_time).ToList();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
if (oms_wei_ewaybill_path_list == null)
|
||||
oms_wei_ewaybill_path_list = new List<oms_wei_ewaybill_path>();
|
||||
return oms_wei_ewaybill_path_list;
|
||||
}
|
||||
|
||||
public static List<WXBuyMapInfo> GetBuyProdMap(List<oms_wei_order_item_info> orderItems)
|
||||
{
|
||||
//foreach (var item in orderItems.ToList())
|
||||
@@ -987,7 +1034,19 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
var waybillId = orderItem.ItemTransitOrderAfterSale.downstream_waybill;
|
||||
|
||||
var chkRst = AddReturnPddShopPackageInfocheck(buyer, orderSn, afterSalesId, waybillId);
|
||||
var result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId);
|
||||
var type = 4;
|
||||
if (chkRst.Contains("\"interactType\":0"))
|
||||
type = 2;
|
||||
var result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
|
||||
if (!result.Contains("\"result\":\"ok\""))
|
||||
{
|
||||
type = type == 4 ? 2 : 4;
|
||||
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
|
||||
}
|
||||
if (!result.Contains("\"result\":\"ok\""))
|
||||
{
|
||||
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
|
||||
}
|
||||
|
||||
if (result.Contains("\"result\":\"ok\""))
|
||||
{
|
||||
@@ -1068,6 +1127,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
type = type == 4 ? 2 : 4;
|
||||
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
|
||||
}
|
||||
if (!result.Contains("\"result\":\"ok\""))
|
||||
{
|
||||
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
|
||||
}
|
||||
|
||||
if (result.Contains("\"result\":\"ok\""))
|
||||
{
|
||||
@@ -1149,6 +1212,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
type = type == 4 ? 2 : 4;
|
||||
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
|
||||
}
|
||||
if (!result.Contains("\"result\":\"ok\""))
|
||||
{
|
||||
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
|
||||
}
|
||||
|
||||
if (result.Contains("\"result\":\"ok\""))
|
||||
{
|
||||
@@ -1239,7 +1306,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
if (tabItem != null)
|
||||
{
|
||||
var filteLstTmp = userOrderLst.Where(o => !GetOrderIsFilter(o, "异常需重拍"));
|
||||
Dispatcher.Invoke(new Action(() => { tabItem.Header = "异常需重拍(" + userOrderLst.Where(r => r.isAbnormal).Count() + "|" + filteLstTmp.Count() + ")"; }));
|
||||
Dispatcher.Invoke(new Action(() => { tabItem.Header = "异常需重拍(" + userOrderLst.Where(r => r.IsAbnormal).Count() + "|" + filteLstTmp.Count() + ")"; }));
|
||||
}
|
||||
Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("全部订单")); }));
|
||||
if (tabItem != null)
|
||||
@@ -1510,13 +1577,17 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
if (filterHeadStr.StartsWith("待采购"))
|
||||
{
|
||||
if (order.order_id == "3739161507780018688")
|
||||
{
|
||||
|
||||
}
|
||||
if (!order.IsWaitBuy)
|
||||
return true;
|
||||
if (chkMapSku.IsChecked == true && order.orderItems.All(oi => oi.BuyMap == null && (oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0)))
|
||||
if (chkMapSku.IsChecked == true && order.orderItems.Any(oi => oi.BuyMap == null))
|
||||
return true;
|
||||
if (chkMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0))
|
||||
if (chkMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0 || oi.BuyMap != null))
|
||||
return true;
|
||||
if (chkNoMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMap != null))
|
||||
if (chkNoMapProd.IsChecked == true && (order.orderItems.All(oi => oi.BuyMap != null) || order.orderItems.All(oi => oi.BuyMapSkus != null && oi.BuyMapSkus.Count > 0)))
|
||||
return true;
|
||||
}
|
||||
if (filterHeadStr.StartsWith("待发货"))
|
||||
@@ -1531,6 +1602,35 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
if (!rst2)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (chkWaitSend72HourNoWaybill.IsChecked == true)
|
||||
{
|
||||
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
|
||||
{ }
|
||||
// 直发没有单号正常发货才判断中转仓总店是否超时发货
|
||||
else if (order.orderItems.Any(oi => (oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
|
||||
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
|
||||
{ }
|
||||
else
|
||||
return true;
|
||||
}
|
||||
else if (chkWaitSend48HourNoWaybill.IsChecked == true)
|
||||
{
|
||||
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
|
||||
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
|
||||
{ }
|
||||
// 直发没有单号才判断中转仓总店是否超时发货
|
||||
else if (order.orderItems.Any(oi => (oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
|
||||
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
|
||||
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
|
||||
{ }
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (filterHeadStr.StartsWith("待收货"))
|
||||
{
|
||||
@@ -1559,8 +1659,41 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
return true;
|
||||
if (chkWaitReceiveWarehouseIsSendOut.IsChecked == true && order.orderItems.All(oi => oi.WarehouseWaybillStatusStr != "中转已出库"))
|
||||
return true;
|
||||
|
||||
if (chk72HourNoWaybill.IsChecked == true)
|
||||
{
|
||||
if (order.order_id == "3739190405314033408")
|
||||
{
|
||||
|
||||
}
|
||||
// 直发没有单号才判断中转仓总店是否超时发货
|
||||
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
|
||||
{ }
|
||||
else if (order.orderItems.Any(oi => (oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
|
||||
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
|
||||
{ }
|
||||
else
|
||||
return true;
|
||||
}
|
||||
else if (chk48HourNoWaybill.IsChecked == true)
|
||||
{
|
||||
// 直发没有单号才判断中转仓总店是否超时发货
|
||||
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
|
||||
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
|
||||
{ }
|
||||
else if (order.orderItems.Any(oi =>(oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
|
||||
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
|
||||
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
|
||||
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
|
||||
{ }
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (filterHeadStr.StartsWith("异常需重拍") && !order.isAbnormal)
|
||||
if (filterHeadStr.StartsWith("异常需重拍") && !order.IsAbnormal)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1657,12 +1790,9 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
|
||||
foreach (var orderItem in order.orderItems)
|
||||
{
|
||||
for (int i = 0; i < 1000; i++)
|
||||
{
|
||||
var receiver = TransitReturnOrderWindow.PddAddressAnalysis(orderItem.PddBuyerAfterSale?.afterSaleAddress);
|
||||
if (!receiver.receiver_address.IsNullOrEmpty())
|
||||
return true;
|
||||
}
|
||||
var receiver = TransitReturnOrderWindow.PddAddressAnalysis(orderItem.PddBuyerAfterSale?.afterSaleAddress);
|
||||
if (!receiver.receiver_address.IsNullOrEmpty() && receiver.receiver_name.Length <= 15)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1673,11 +1803,34 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
foreach (var orderItem in order.orderItems)
|
||||
{
|
||||
var receiver = TransitReturnOrderWindow.PddAddressAnalysis(orderItem.DirectPddBuyerAfterSale?.afterSaleAddress);
|
||||
if (!receiver.receiver_address.IsNullOrEmpty())
|
||||
if (!receiver.receiver_address.IsNullOrEmpty() && receiver.receiver_name.Length <= 15)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var cmbReturnOrderStatusText = cmbReturnOrderStatus.SelectedItem.ParseToString().Replace("System.Windows.Controls.ComboBoxItem: ", "");
|
||||
if (cmbReturnOrderStatusText == "未创建" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr == "未创建"))
|
||||
return true;
|
||||
if (cmbReturnOrderStatusText == "创建失败" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr == "创建失败"))
|
||||
return true;
|
||||
if (cmbReturnOrderStatusText == "已创建未到仓" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr.StartsWith("已创建未到仓")))
|
||||
return true;
|
||||
if (cmbReturnOrderStatusText == "已到仓" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr.StartsWith("已到仓")))
|
||||
return true;
|
||||
if (cmbReturnOrderStatusText == "已发回" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr.StartsWith("已发回")))
|
||||
return true;
|
||||
|
||||
var cmbReturnOrderBuyerStatusText = cmbReturnOrderBuyerStatus.SelectedItem.ParseToString().Replace("System.Windows.Controls.ComboBoxItem: ", "");
|
||||
|
||||
if (cmbReturnOrderBuyerStatusText == "买手待申请售后" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("需手动申请售后")))
|
||||
return true;
|
||||
else if (cmbReturnOrderBuyerStatusText == "买手待退货" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("待用户发货")))
|
||||
return true;
|
||||
else if (cmbReturnOrderBuyerStatusText == "买手已寄出待商家退款" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("商家处理中")))
|
||||
return true;
|
||||
else if (cmbReturnOrderBuyerStatusText == "买手退货失败" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("退款失败")))
|
||||
return true;
|
||||
}
|
||||
if (filterHeadStr.StartsWith("售后完成单"))
|
||||
{
|
||||
@@ -2176,7 +2329,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
int index = 0;
|
||||
foreach (var tmpOrderItem in tmpOrderItems)
|
||||
{
|
||||
if (tmpOrderItem.order_id == "3738534855500515072")
|
||||
if (tmpOrderItem.order_id == "3739068430223324416")
|
||||
{
|
||||
|
||||
}
|
||||
@@ -2211,7 +2364,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); }));
|
||||
@@ -2327,7 +2481,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
|
||||
{
|
||||
@@ -2342,7 +2496,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
|
||||
{
|
||||
@@ -2715,16 +2869,57 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
return;
|
||||
}
|
||||
|
||||
IsAutoBuy = true;
|
||||
foreach (var order in buyOrders)
|
||||
{
|
||||
var orderItem = order.orderItems.FirstOrDefault();
|
||||
await OrderListRowItemCtrl.BuyOrder(orderItem, true);
|
||||
if (IsAutoBuy == false)
|
||||
break;
|
||||
}
|
||||
IsAutoBuy = false;
|
||||
}
|
||||
|
||||
private void btnAutoBuyIntroduction_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AutoBuyIntroductionView autoBuyIntroForm = new AutoBuyIntroductionView();
|
||||
new DialogWindow()
|
||||
{
|
||||
Title = "自动拍单设置说明",
|
||||
Content = autoBuyIntroForm,
|
||||
}.ShowDialog();
|
||||
}
|
||||
|
||||
private void chkNoWaybill_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is CheckBox chk)
|
||||
{
|
||||
var isCheck = !chk.IsChecked.ParseToBool();
|
||||
chk48HourNoWaybill.IsChecked = chk72HourNoWaybill.IsChecked = false;
|
||||
chk.IsChecked = !isCheck;
|
||||
}
|
||||
FilterOrders();
|
||||
}
|
||||
|
||||
private void chkWaitSendNoWaybill_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is CheckBox chk)
|
||||
{
|
||||
var isCheck = !chk.IsChecked.ParseToBool();
|
||||
chkWaitSend48HourNoWaybill.IsChecked = chkWaitSend72HourNoWaybill.IsChecked = false;
|
||||
chk.IsChecked = !isCheck;
|
||||
}
|
||||
FilterOrders();
|
||||
}
|
||||
|
||||
private void cmbReturnOrderStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
FilterOrders();
|
||||
}
|
||||
|
||||
private void cmbReturnOrderBuyerStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
FilterOrders();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -207,6 +207,7 @@
|
||||
|
||||
<wpf:TitleContent Title="发货时间:" Visibility="{Binding ItemOrder.ship_done_time_visibility}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
d:Text="00-01-01 01:01:01"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
@@ -217,6 +218,7 @@
|
||||
|
||||
<wpf:TitleContent Title="退款时间:" Visibility="{Binding RefundTimeVisibility}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
d:Text="00-01-01 01:01:01"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
@@ -245,6 +247,16 @@
|
||||
WaterMark="售价" />
|
||||
</wpf:TitleContent>
|
||||
|
||||
<wpf:TitleContent Title="店铺运费:">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding PostagePriceStr}"
|
||||
TextWrapping="Wrap"
|
||||
WaterMark="店铺运费" />
|
||||
</wpf:TitleContent>
|
||||
|
||||
<wpf:TitleContent Title="平台优惠:">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
d:Text="¥100.00"
|
||||
@@ -256,24 +268,25 @@
|
||||
WaterMark="平台优惠" />
|
||||
</wpf:TitleContent>
|
||||
|
||||
<wpf:TitleContent Title="进价:" Visibility="{Binding purchase_price_visibility}">
|
||||
<wpf:TitleContent Title="进价:" Visibility="{Binding PurchasePriceVisibility}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
d:Text="¥100.00"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding purchase_price_str}"
|
||||
Text="{Binding PurchasePriceStr}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding purchase_price_visibility}"
|
||||
Visibility="{Binding PurchasePriceVisibility}"
|
||||
WaterMark="进价" />
|
||||
</wpf:TitleContent>
|
||||
|
||||
<wpf:TitleContent Title="运费:" Visibility="{Binding FreightVisibility}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
d:Text="¥100.00"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding freight_str}"
|
||||
Text="{Binding FreightStr}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding FreightVisibility}"
|
||||
WaterMark="运费" />
|
||||
@@ -417,15 +430,33 @@
|
||||
</WrapPanel>
|
||||
|
||||
<!-- 售后状态 -->
|
||||
<TextBlock
|
||||
x:Name="txtStatusStr"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
d:Text="售后状态"
|
||||
Background="Transparent"
|
||||
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
||||
Text="{Binding ItemRefund.RefundStatusStr}"
|
||||
Visibility="{Binding ElementName=txtStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
||||
<WrapPanel>
|
||||
<TextBlock
|
||||
x:Name="txtOrderItemStatusStr"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
d:Text="物品售后状态"
|
||||
Background="Transparent"
|
||||
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
||||
Text="{Binding RefundStatusStr}"
|
||||
Visibility="{Binding ElementName=txtOrderItemStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Background="Transparent"
|
||||
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
||||
Text=":"
|
||||
Visibility="{Binding ElementName=txtOrderItemStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
||||
<TextBlock
|
||||
x:Name="txtStatusStr"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
d:Text="售后状态"
|
||||
Background="Transparent"
|
||||
Foreground="{Binding ItemRefund.RefundStatusColor}"
|
||||
Text="{Binding ItemRefund.RefundStatusStr}"
|
||||
Visibility="{Binding ElementName=txtStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
|
||||
</WrapPanel>
|
||||
<!-- 售后原因 -->
|
||||
<TextBlock
|
||||
x:Name="txtRefundReasonTextStr"
|
||||
@@ -565,15 +596,10 @@
|
||||
Orientation="Vertical"
|
||||
VerticalSpacing="2">
|
||||
|
||||
<!-- 状态标签行(原 Row 1-2) -->
|
||||
<WrapPanel
|
||||
x:Name="wpTransitBuyerRefundStatus"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
<!-- 状态标签行 -->
|
||||
<WrapPanel
|
||||
x:Name="wpTransitWaybillStatus"
|
||||
Margin="0,0,0,4"
|
||||
Margin="0,0,0,2"
|
||||
HorizontalAlignment="Center">
|
||||
<Border
|
||||
x:Name="borderBuyStatas"
|
||||
@@ -698,7 +724,7 @@
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtTransitOrderNumStr"
|
||||
Margin="-2,2"
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
Background="Transparent"
|
||||
@@ -736,7 +762,7 @@
|
||||
Visibility="{Binding ElementName=txtOutOrderTimeQualifiedStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtOutOrderTimeQualifiedStr"
|
||||
Margin="-2,2"
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
Background="Transparent"
|
||||
@@ -754,7 +780,7 @@
|
||||
Foreground="{StaticResource PageOkBrush}"
|
||||
Visibility="{Binding TransitOrderWaybillToWareHouseStr, Converter={StaticResource HasTextVisibility}}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,2"
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
Background="Transparent"
|
||||
@@ -783,16 +809,26 @@
|
||||
|
||||
<!-- 仓库物流 -->
|
||||
<wpf:TitleContent Title="仓库物流:" Visibility="{Binding TransitOrderWaybillFromWareHouseStr, Converter={StaticResource HasTextVisibility}}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,2"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding TransitOrderWaybillFromWareHouseStr}"
|
||||
TextWrapping="Wrap"
|
||||
WaterMark="仓库物流" />
|
||||
<WrapPanel>
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding TransitOrderWaybillFromWareHouseStr}"
|
||||
TextWrapping="Wrap"
|
||||
WaterMark="仓库物流" />
|
||||
<Button
|
||||
x:Name="btnGetTransitWaybillDetail"
|
||||
Margin="4,0,0,0"
|
||||
Padding="0,0,0,0"
|
||||
d:Content="查看"
|
||||
Click="btnGetTransitWaybillDetail_Click"
|
||||
Content="{Binding LatestTransitEWaybill.StatusStr}"
|
||||
Style="{StaticResource LinkButton}" />
|
||||
</WrapPanel>
|
||||
</wpf:TitleContent>
|
||||
|
||||
<!-- 外采买手 -->
|
||||
@@ -896,7 +932,7 @@
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,2"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{Binding ItemOrder.OutExpressNoBrush}"
|
||||
@@ -907,7 +943,7 @@
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,2"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{Binding ItemOrder.OutExpressNoBrush}"
|
||||
@@ -918,7 +954,7 @@
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,2,4,2"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{Binding ItemOrder.OutExpressNoBrush}"
|
||||
@@ -926,6 +962,15 @@
|
||||
Text="{Binding ItemOrder.OutExpressNoStr}"
|
||||
TextWrapping="Wrap"
|
||||
WaterMark="外采物流" />
|
||||
|
||||
<Button
|
||||
x:Name="btnGetDirectWaybillDetail"
|
||||
Margin="4,0,0,0"
|
||||
Padding="0,0,0,0"
|
||||
d:Content="查看"
|
||||
Click="btnGetDirectWaybillDetail_Click"
|
||||
Content="{Binding LatestDirectEWaybill.StatusStr}"
|
||||
Style="{StaticResource LinkButton}" />
|
||||
</WrapPanel>
|
||||
</wpf:TitleContent>
|
||||
|
||||
@@ -996,7 +1041,7 @@
|
||||
IsReadOnly="True"
|
||||
Text="{Binding ItemOrder.shop_remark}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="Visible"
|
||||
Visibility="{Binding ItemOrder.shop_remark, Converter={StaticResource HasTextVisibility}}"
|
||||
WaterMark="店铺备注" />
|
||||
<Button
|
||||
x:Name="btnEditShopRemark"
|
||||
@@ -1025,6 +1070,7 @@
|
||||
IsReadOnly="True"
|
||||
Text="{Binding ItemOrder.soft_remark}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding ItemOrder.soft_remark, Converter={StaticResource HasTextVisibility}}"
|
||||
WaterMark="软件备注" />
|
||||
<Button
|
||||
x:Name="btnEditAppRemark"
|
||||
@@ -1053,6 +1099,7 @@
|
||||
IsReadOnly="True"
|
||||
Text="{Binding TransitWarehouseRejectSuccessTimeStr}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding TransitWarehouseRejectSuccessTimeStr, Converter={StaticResource HasTextVisibility}}"
|
||||
WaterMark="中转仓拒收" />
|
||||
<Button
|
||||
x:Name="btnAddEditTransitWarehouseReject"
|
||||
@@ -1082,6 +1129,7 @@
|
||||
IsReadOnly="True"
|
||||
Text="{Binding TransitWarehouseAfterSaleWayBillStr}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding TransitWarehouseAfterSaleWayBillStr, Converter={StaticResource HasTextVisibility}}"
|
||||
WaterMark="拦截退回总店" />
|
||||
<Button
|
||||
x:Name="btnAddEditTransitWarehouseAfterSale"
|
||||
@@ -1089,6 +1137,17 @@
|
||||
Click="btnAddEditTransitWarehouseAfterSale_Click"
|
||||
Content="{Binding AddEditTransitWarehouseAfterSaleStr}"
|
||||
Style="{StaticResource LinkButton}" />
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtInterceptReturnInfoStr"
|
||||
Margin="0,1,0,1"
|
||||
VerticalAlignment="Top"
|
||||
Background="Transparent"
|
||||
BorderThickness="1"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding InterceptReturnInfoStr, Converter={StaticResource TextEllipsisConverter8}}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding InterceptReturnInfoStr}"
|
||||
Visibility="{Binding InterceptReturnInfoStr, Converter={StaticResource HasTextVisibility}}" />
|
||||
</WrapPanel>
|
||||
</wpf:TitleContent>
|
||||
|
||||
@@ -1104,10 +1163,11 @@
|
||||
IsReadOnly="True"
|
||||
Text="{Binding AddEditTransitWarehouseReturnOrderWaybillStr}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding AddEditTransitWarehouseReturnOrderWaybillStr, Converter={StaticResource HasTextVisibility}}"
|
||||
WaterMark="云仓退货" />
|
||||
<Button
|
||||
x:Name="btnRetrunOrder"
|
||||
d:Content="添加"
|
||||
d:Content="未创建"
|
||||
Click="btnReturnOrder_Click"
|
||||
Content="{Binding AddEditTransitWarehouseReturnOrderStr}"
|
||||
Style="{StaticResource LinkButton}" />
|
||||
@@ -1170,7 +1230,7 @@
|
||||
Background="Transparent"
|
||||
Cursor="Hand"
|
||||
MouseLeftButtonDown="pathDirectBuyerAfterSaleAddress_MouseLeftButtonDown"
|
||||
Visibility="{Binding ElementName=txtBuyerRefundAddress, Path=Visibility}">
|
||||
Visibility="{Binding ElementName=txtDirectBuyerRefundAddress, Path=Visibility}">
|
||||
<Path
|
||||
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
|
||||
Fill="{StaticResource PageLinkBrush}"
|
||||
@@ -1191,7 +1251,7 @@
|
||||
<wpf:TitleContent>
|
||||
<Button
|
||||
x:Name="btnMapSkus"
|
||||
Height="24"
|
||||
Height="22"
|
||||
MinWidth="38"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -1207,7 +1267,7 @@
|
||||
|
||||
<Button
|
||||
x:Name="btnBuyOrder"
|
||||
Height="24"
|
||||
Height="22"
|
||||
MinWidth="38"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -1227,7 +1287,7 @@
|
||||
|
||||
<Button
|
||||
x:Name="btnVoidTransitOrder"
|
||||
Height="24"
|
||||
Height="22"
|
||||
MinWidth="38"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -1239,7 +1299,7 @@
|
||||
|
||||
<Button
|
||||
x:Name="btnAbnormalOrderRebuy"
|
||||
Height="24"
|
||||
Height="22"
|
||||
MinWidth="38"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -1255,7 +1315,7 @@
|
||||
<wpf:TitleContent>
|
||||
<Button
|
||||
x:Name="btnDirectBuyOrder"
|
||||
Height="24"
|
||||
Height="22"
|
||||
MinWidth="38"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -1269,7 +1329,7 @@
|
||||
<wpf:TitleContent>
|
||||
<Button
|
||||
x:Name="btnShipGift"
|
||||
Height="24"
|
||||
Height="22"
|
||||
MinWidth="38"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -1279,7 +1339,19 @@
|
||||
Style="{StaticResource BasePageButtonLightStyle}"
|
||||
Visibility="{Binding ItemOrder.IsWaitSend, Converter={StaticResource VisibleToVisibilityConverter}}" />
|
||||
</wpf:TitleContent>
|
||||
|
||||
<wpf:TitleContent>
|
||||
<Button
|
||||
x:Name="btnChangeWaybill"
|
||||
Height="22"
|
||||
MinWidth="38"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
d:Visibility="Visible"
|
||||
Click="btnChangeWaybill_Click"
|
||||
Content="修改物流"
|
||||
Style="{StaticResource BasePageButtonLightStyle}"
|
||||
Visibility="{Binding ItemOrder.IsShowChangeWaybillBtn, Converter={StaticResource VisibleToVisibilityConverter}}" />
|
||||
</wpf:TitleContent>
|
||||
</wpf:SpacingStackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -3,6 +3,8 @@ using _29WxOrderWpf.Common;
|
||||
using _29WxOrderWpf.Converters;
|
||||
using _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||
using _29WxOrderWpf.UserControls;
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using _29WxOrderWpf.Views;
|
||||
using _29WxOrderWpf.Windows.OrderWindows;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
@@ -30,7 +32,6 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using TemuKJD.ToolForms;
|
||||
using Work;
|
||||
using Work._29Tools.BLL;
|
||||
@@ -232,6 +233,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
txtShopRemark.SetValue(WidthProperty, Double.NaN);
|
||||
txtShopRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
|
||||
txtShopRemark.IsReadOnly = true;
|
||||
if (txtShopRemark.Text.IsNullOrEmpty())
|
||||
txtShopRemark.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -240,6 +243,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
txtShopRemark.SetValue(WidthProperty, 135.0);
|
||||
txtShopRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(50, 0, 50, 150));
|
||||
txtShopRemark.IsReadOnly = false;
|
||||
txtShopRemark.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -251,6 +255,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
txtShopRemark.SetValue(WidthProperty, Double.NaN);
|
||||
txtShopRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
|
||||
txtShopRemark.IsReadOnly = true;
|
||||
if (txtShopRemark.Text.IsNullOrEmpty())
|
||||
txtShopRemark.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void btnEditAppRemark_Click(object sender, RoutedEventArgs e)
|
||||
@@ -288,6 +294,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
txtAppRemark.SetValue(WidthProperty, Double.NaN);
|
||||
txtAppRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
|
||||
txtAppRemark.IsReadOnly = true;
|
||||
if (txtAppRemark.Text.IsNullOrEmpty())
|
||||
txtAppRemark.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -295,7 +303,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
btnEditAppRemark.Content = "保存";
|
||||
txtAppRemark.SetValue(WidthProperty, 135.0);
|
||||
txtAppRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(50, 0, 50, 150));
|
||||
txtAppRemark.IsReadOnly = false;
|
||||
txtAppRemark.IsReadOnly = false;
|
||||
txtAppRemark.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -307,6 +316,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
txtAppRemark.SetValue(WidthProperty, Double.NaN);
|
||||
txtAppRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
|
||||
txtAppRemark.IsReadOnly = true;
|
||||
if (txtAppRemark.Text.IsNullOrEmpty())
|
||||
txtAppRemark.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private async void btnBuyOrder_Click(object sender, RoutedEventArgs e)
|
||||
@@ -323,17 +334,20 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
{
|
||||
if (orderItem == null)
|
||||
{
|
||||
BaseMsgWindow.ShowError("订单信息为空");
|
||||
if (!isAutoBuy)
|
||||
BaseMsgWindow.ShowError("订单信息为空");
|
||||
return;
|
||||
}
|
||||
if (GlobalConfig.CurrentPddBuyer == null)
|
||||
{
|
||||
BaseMsgWindow.ShowError("请选择买手号");
|
||||
if (!isAutoBuy)
|
||||
BaseMsgWindow.ShowError("请选择买手号");
|
||||
return;
|
||||
}
|
||||
if (orderItem.ItemOrder.orderItems.Count > 1)
|
||||
{
|
||||
BaseMsgWindow.ShowError("多子单订单中转仓暂不支持");
|
||||
if (!isAutoBuy)
|
||||
BaseMsgWindow.ShowError("多子单订单中转仓暂不支持");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -342,7 +356,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
{
|
||||
OrderListCtrl.InitOrderItemObservableProp(orderItem);
|
||||
MainWindow.Instance.orderListCtrl.FilterOneOrder(orderItem.ItemOrder);
|
||||
BaseMsgWindow.ShowError("已存在中转拍单信息,请核对后再拍单");
|
||||
if (!isAutoBuy)
|
||||
BaseMsgWindow.ShowError("已存在中转拍单信息,请核对后再拍单");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -590,6 +605,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
if (isAbnormalOrder)
|
||||
buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder;
|
||||
buyOrderForm.ShowDialog();
|
||||
OrderListCtrl.IsAutoBuy = buyOrderForm.IsAutoBuy;
|
||||
}));
|
||||
});
|
||||
}
|
||||
@@ -647,13 +663,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
//wpBuyOrderId.Visibility = Visibility.Collapsed;
|
||||
//wpBuyTime.Visibility = Visibility.Collapsed;
|
||||
//wpTransitWaybillStatus.Visibility = Visibility.Collapsed;
|
||||
//wpTransitBuyerRefundStatus.Visibility = Visibility.Collapsed;
|
||||
|
||||
wpBuyAccount.Opacity = 0.5;
|
||||
wpBuyOrderId.Opacity = 0.5;
|
||||
wpBuyTime.Opacity = 0.5;
|
||||
wpTransitWaybillStatus.Opacity = 0.5;
|
||||
wpTransitBuyerRefundStatus.Opacity = 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -666,7 +680,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
static bool GetIsAbnormalOrderRebuy(oms_wei_order_item_info order_item)
|
||||
{
|
||||
// 不是异常单的不可异常重拍
|
||||
if (order_item?.ItemOrder?.isAbnormal != true)
|
||||
if (order_item?.ItemOrder?.IsAbnormal != true)
|
||||
return false;
|
||||
// 买手未退款的,中转正式取号以后的,不可异常重拍
|
||||
if (order_item.ItemTransitOrder?.refund_status != "买手退款成功" ||
|
||||
@@ -1561,7 +1575,56 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
|
||||
private void btnChangeWaybill_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is oms_wei_order_item_info orderItem && orderItem.ItemOrder != null)
|
||||
{
|
||||
ChangeWaybillView changeWaybillView = new ChangeWaybillView(orderItem.ItemOrder);
|
||||
new DialogWindow()
|
||||
{
|
||||
Title = "修改订单物流",
|
||||
Content = changeWaybillView,
|
||||
}.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private async void btnGetTransitWaybillDetail_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.DataContext is oms_wei_order_item_info orderItem && GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == orderItem.shop_id.ParseToString()) is ShopLoginInfo shop)
|
||||
{
|
||||
//var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_list");
|
||||
////var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_latest_list");
|
||||
//var data = UserLogin.GetSignaturex();
|
||||
////data += "&erp_order_id_in=" + orderItem.order_id;
|
||||
//data += "&waybill_id_in=" + orderItem.ItemTransitOrderWithVoid.express_2_waybill;
|
||||
//var html = GetHtml.PostUtf8(url, data);
|
||||
//if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
// html = GetHtml.PostUtf8(url, data);
|
||||
|
||||
//if (!html.Contains("\"code\":200"))
|
||||
//{
|
||||
// BaseMsgForm.ShowError("查询失败请重试");
|
||||
// return;
|
||||
//}
|
||||
|
||||
var order = orderItem.ItemOrder;
|
||||
var waybillId = orderItem.ItemTransitOrderWithVoid.express_2_waybill;
|
||||
var expressName = orderItem.ItemTransitOrderWithVoid.express_2_company;
|
||||
EWaybillPathView WaybillPathView = new EWaybillPathView(order, waybillId, expressName);
|
||||
new DialogWindow()
|
||||
{
|
||||
Title = "订单 " + orderItem.order_id + " 物流明细",
|
||||
Content = WaybillPathView,
|
||||
}.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btnGetDirectWaybillDetail_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user