仓库退货订单逻辑 30%
This commit is contained in:
1 parent
d25374956e
commit
d5d235c0b0
18 files changed
+747
-39
No files matched your search
@@ -1910,9 +1910,9 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
obj["outAccount"] = order.buyerName;
|
||||
obj["outOrderNo"] = order.order_sn;
|
||||
obj["orderId"] = order.ShopOrderIdStr;
|
||||
if (!order.outExpressCompanyCode.IsNullOrEmpty() && !order.tracking_number.IsNullOrEmpty())
|
||||
if (!order.outPddToWxExpressCompanyCode.IsNullOrEmpty() && !order.tracking_number.IsNullOrEmpty())
|
||||
{
|
||||
obj["outExpressCompany"] = order.outExpressCompanyCode;
|
||||
obj["outExpressCompany"] = order.outPddToWxExpressCompanyCode;
|
||||
obj["outExpressNo"] = order.tracking_number;
|
||||
}
|
||||
var dataStr = JsonHelper.SerializeObject(obj);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.DBModel;
|
||||
using NaiBa.Util.Extension;
|
||||
@@ -59,19 +60,27 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
shopLoginForm.ShowDialog();
|
||||
|
||||
if (shop.LoginStatus == "登录成功")
|
||||
{
|
||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
|
||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
|
||||
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
|
||||
{
|
||||
shop.Is29Supplier = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopBLL.CheckShopLogin(shop);
|
||||
shop.Is29Supplier = false;
|
||||
}
|
||||
{
|
||||
shop.Is29Supplier = false;
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
||||
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
|
||||
{
|
||||
shop.Is29Supplier = true;
|
||||
break;
|
||||
}
|
||||
else if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
{
|
||||
ShopBLL.CheckShopLogin(shop);
|
||||
}
|
||||
int totalCount = BaseRegex.GetIntJson(ref is29SupplierRst, "totalCount");
|
||||
if (i * 20 >= totalCount)
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
||||
{
|
||||
// 更新代发管理情况
|
||||
|
||||
@@ -440,7 +440,13 @@
|
||||
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" MouseLeftButtonDown="pathBuyerAfterSaleAddress_MouseLeftButtonDown" 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" Stretch="Uniform" />
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
|
||||
|
||||
<!--<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="7" Width="auto" Visibility="{Binding AddEditTransitWarehouseAfterSaleStr,Converter={StaticResource HasTextVisibility}}">
|
||||
<TextBox Text="云仓退货:" Grid.Column="1" Grid.Row="2" Margin="0,1,-8,1" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderBrush="Transparent" BorderThickness="1"/>
|
||||
<Button Grid.Column="1" Grid.Row="2" x:Name="btnRetrunOrder" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
|
||||
Margin="2,0,0,0" Content="退货" Click="btnReturnOrder_Click" Cursor="Hand"></Button>
|
||||
</WrapPanel>-->
|
||||
|
||||
</Grid>
|
||||
<!--操作-->
|
||||
<Grid Grid.Column="8" Background="Transparent" VerticalAlignment="Center">
|
||||
|
||||
@@ -1310,5 +1310,23 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnReturnOrder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.DataContext is oms_wei_order_item_info orderItem)
|
||||
{
|
||||
//if (orderItem.ItemTransitOrder?.warehouse_status != 2 && orderItem.AddEditTransitWarehouseAfterSaleStr == "添加")
|
||||
//{
|
||||
// BaseMsgWindow.ShowError("商品未出库,请选择中转仓拒收!");
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (TransitReturnOrderWindow.instance != null)
|
||||
TransitReturnOrderWindow.instance.Close();
|
||||
|
||||
TransitReturnOrderWindow.instance = new TransitReturnOrderWindow(orderItem);
|
||||
TransitReturnOrderWindow.instance.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@
|
||||
<Grid x:Name="gridRefreshOrSelect" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
@@ -138,6 +138,7 @@
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" x:Name="btnRefreshShop" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 刷新店铺 " Height="26" Margin="6,0,0,0" Click="btnRefreshShop_Click"></Button>
|
||||
|
||||
<Button Grid.Column="6" x:Name="btnApplySelectShop" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 确定 " Height="26" Click="btnApplySelectShop_Click"></Button>
|
||||
<Button Grid.Column="7" x:Name="btnCancelSelectShop" Style="{StaticResource BasePageButtonLightStyle}" Grid.Row="4" Content=" 取消 " Height="26" Margin="4,0,6,0" Click="btnCancelSelectShop_Click"></Button>
|
||||
</Grid>
|
||||
|
||||
@@ -16,6 +16,12 @@ namespace _29WxOrderWpf.Ctrls.Statistics
|
||||
InitializeComponent();
|
||||
// 默认天统计;当 XAML 指定 Week/Month 时通过 PeriodType 回调切换
|
||||
DataContext = new PeriodRevenueStatisticsViewModel(PeriodStatisticType.Day);
|
||||
this.Loaded += PeriodRevenueStatisticsView_Loaded;
|
||||
}
|
||||
|
||||
private void PeriodRevenueStatisticsView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//(DataContext as PeriodRevenueStatisticsViewModel).Init();
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty PeriodTypeProperty =
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="#F5F7FB">
|
||||
<TabControl Style="{StaticResource StatisticsTabControlStyle}">
|
||||
<TabControl Style="{StaticResource StatisticsTabControlStyle}" SelectionChanged="TabControl_SelectionChanged">
|
||||
<TabItem Header="综合统计" Style="{StaticResource StatisticsTabItemStyle}">
|
||||
<ScrollViewer
|
||||
wpf:ScrollViewerBehavior.FixMouseWheel="True"
|
||||
|
||||
@@ -31,5 +31,18 @@ namespace _29WxOrderWpf.Ctrls.Statistics
|
||||
{
|
||||
InfoPopup.IsOpen = false;
|
||||
}
|
||||
|
||||
private void TabControl_Selected(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems != null && e.AddedItems.Count > 0 && e.AddedItems[0] is TabItem tab && tab.Content is PeriodRevenueStatisticsView view && view.DataContext is PeriodRevenueStatisticsViewModel vm)
|
||||
{
|
||||
vm.Init();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,10 @@ namespace _29WxOrderWpf.Ctrls.Statistics.ViewModels
|
||||
_nextPageCommand = new DelegateCommand(() => GoToPage(PageIndex + 1), () => HasNextPage);
|
||||
_lastPageCommand = new DelegateCommand(() => GoToPage(TotalPages), () => HasNextPage);
|
||||
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
InitializeAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -294,19 +294,27 @@ namespace _29WxOrderWpf
|
||||
{
|
||||
if (shop.LoginStatus == "登录成功")
|
||||
{
|
||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
|
||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
|
||||
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
|
||||
{
|
||||
shop.Is29Supplier = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopBLL.CheckShopLogin(shop);
|
||||
shop.Is29Supplier = false;
|
||||
}
|
||||
foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
||||
shop.Is29Supplier = false;
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
||||
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
|
||||
{
|
||||
shop.Is29Supplier = true;
|
||||
break;
|
||||
}
|
||||
else if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
{
|
||||
ShopBLL.CheckShopLogin(shop);
|
||||
}
|
||||
int totalCount = BaseRegex.GetIntJson(ref is29SupplierRst, "totalCount");
|
||||
if (i * 20 >= totalCount)
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
||||
{
|
||||
// 更新代发管理情况
|
||||
foreach (var orderItem in order.orderItems)
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
<basewindows:BaseWindow x:Class="_29WxOrderWpf.Windows.OrderWindows.TransitReturnOrderWindow" xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.Windows.OrderWindows"
|
||||
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls" xmlns:buyerctrls="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
||||
mc:Ignorable="d" Style="{StaticResource BaseNoneBorderWindowStyle}"
|
||||
Title="创建退货单" Height="650" Width="843" ResizeMode="NoResize" Loaded="TransitAfterSaleWindow_Loaded">
|
||||
<Grid Background="Transparent" x:Name="mainGrid" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid x:Name="gridTitle">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{StaticResource main29WeixinIcon}" Height="50" Width="50" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4"></Image>
|
||||
<Label x:Name="lblAppName" FontSize="20" Margin="0,0,0,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" VerticalContentAlignment="Center" Content="创建退货订单" Grid.Column="1"></Label>
|
||||
</Grid>
|
||||
<Border Background="White" Grid.Row="1" Padding="40, 20">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="20"></ColumnDefinition>
|
||||
<ColumnDefinition Width="100"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14" Grid.Row="1">店铺订单号:</Label>
|
||||
<TextBox x:Name="txtShopOrderId" Grid.Row="1" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1" IsReadOnly="True"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
|
||||
<Label VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14" Grid.Row="2">商品名称:</Label>
|
||||
<TextBox x:Name="txtGoodsName" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="4" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1" IsReadOnly="True"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
<Label VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14" Grid.Row="3">商品规格:</Label>
|
||||
<TextBox x:Name="txtSpecName" Grid.Row="3" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1" IsReadOnly="True"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
<Label VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14" Grid.Row="5">收件地址解析:</Label>
|
||||
<TextBox x:Name="txtAddressAnalysis" Grid.Row="5" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" Height="80" BorderThickness="1" Padding="0,4"
|
||||
VerticalContentAlignment="Top" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" TextWrapping="Wrap" Margin="0,0,0,15"/>
|
||||
<Button Grid.Row="5" Grid.Column="1" x:Name="btnAddressAnalysis" Style="{StaticResource BasePageButtonStyle}" Click="btnAddressAnalysis_Click"
|
||||
Content="解 析" MinWidth="48" Height="28" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="4" Margin="0,0,0,15"/>
|
||||
|
||||
<Label VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14" Grid.Row="6">收件人:</Label>
|
||||
<TextBox x:Name="txtUser" Grid.Row="6" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
<Label VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14" Grid.Row="7">收件人电话:</Label>
|
||||
<TextBox x:Name="txtMobile" Grid.Row="7" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
<Label HorizontalAlignment="Right" FontSize="14" Grid.Row="8" Margin="0,0,0,15">收件省/市/区:</Label>
|
||||
<Grid Grid.Row="8" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="txtProvince" Grid.Row="0" Grid.Column="0" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" Margin="0,0,0,15"/>
|
||||
<TextBox x:Name="txtCity" Grid.Row="0" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" Margin="2,0,2,15"/>
|
||||
<TextBox x:Name="txtCounty" Grid.Row="0" Grid.Column="2" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" Margin="0,0,0,15"/>
|
||||
</Grid>
|
||||
|
||||
<Label VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14" Grid.Row="9">收件详细地址:</Label>
|
||||
<TextBox x:Name="txtDetailAddress" Grid.Row="9" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="3" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">店铺名称:</Label>
|
||||
<TextBox x:Name="txtShopName" Grid.Row="1" Grid.Column="4" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1" IsReadOnly="True"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="3" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">商品编号:</Label>
|
||||
<TextBox x:Name="txtSpuId" Grid.Row="3" Grid.Column="4" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1" IsReadOnly="True"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">物流单号:</Label>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" x:Name="txtWaybillId" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="3" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">物流公司:</Label>
|
||||
<!--<TextBox x:Name="txtExpressName" Grid.Row="4" Grid.Column="4" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>-->
|
||||
<ComboBox x:Name="cmbExpressName" Grid.Row="4" Grid.Column="4" VerticalContentAlignment="Center" VerticalAlignment="Top" IsReadOnly="False" IsEnabled="True"
|
||||
Style="{StaticResource RoundedComboBox}" Height="28" SelectedIndex="0">
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="3" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">寄件地址选择:</Label>
|
||||
<TextBox x:Name="txtSendAddressAnalysis" Grid.Row="5" Grid.Column="4" BorderBrush="{StaticResource pageColorBrush}" Height="80" BorderThickness="1" Padding="0,4"
|
||||
Text="上海市普陀区真如镇街道真北路2653弄Z区zt √" Foreground="Green" IsReadOnly="True" Opacity="0.5"
|
||||
VerticalContentAlignment="Top" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" TextWrapping="Wrap" Margin="0,0,0,15"/>
|
||||
|
||||
<Label Grid.Row="6" Grid.Column="3" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">寄件人:</Label>
|
||||
<TextBox x:Name="txtSendUser" Grid.Row="6" Grid.Column="4" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
<Label Grid.Row="7" Grid.Column="3" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">寄件人电话:</Label>
|
||||
<TextBox Grid.Row="7" Grid.Column="4" x:Name="txtSendMobile" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
<Label Grid.Column="3" HorizontalAlignment="Right" FontSize="14" Grid.Row="8" Margin="0,0,0,15">寄件省/市/区:</Label>
|
||||
<Grid Grid.Row="8" Grid.Column="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="txtSendProvince" Grid.Row="0" Grid.Column="0" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" Margin="0,0,0,15"/>
|
||||
<TextBox x:Name="txtSendCity" Grid.Row="0" Grid.Column="1" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" Margin="2,0,2,15"/>
|
||||
<TextBox x:Name="txtSendCounty" Grid.Row="0" Grid.Column="2" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}" Margin="0,0,0,15"/>
|
||||
</Grid>
|
||||
|
||||
<Label Grid.Row="9" Grid.Column="3" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="14">寄件详细地址:</Label>
|
||||
<TextBox Grid.Row="9" Grid.Column="4" x:Name="txtSendDetailAddress" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1"
|
||||
Height="28" VerticalContentAlignment="Center" VerticalAlignment="Top" Style="{StaticResource BaseRoundCornerTextBoxStyle}"/>
|
||||
|
||||
|
||||
<Button Grid.Row="10" Grid.Column="4" x:Name="btnAdd" Style="{StaticResource BasePageButtonStyle}" Click="btnAdd_Click" Content="添 加" MinWidth="48" Height="28"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center" Padding="4"/>
|
||||
<Label x:Name="lblMsg" Grid.Row="10" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,0,70,0" Foreground="{StaticResource PageWarningBrushCC}"></Label>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="Auto" MinHeight="40"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
<userctrls:UcWindowBoxes x:Name="ucWindowBox" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="4" MaxBoxVisibility="Visible"/>
|
||||
</Grid>
|
||||
</basewindows:BaseWindow>
|
||||
@@ -0,0 +1,215 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.DBModel;
|
||||
using AllBase.Model.Result;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Work._29Tools.BLL;
|
||||
|
||||
namespace _29WxOrderWpf.Windows.OrderWindows
|
||||
{
|
||||
/// <summary>
|
||||
/// TransitReturnOrderWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TransitReturnOrderWindow : BaseWindow
|
||||
{
|
||||
public static TransitReturnOrderWindow instance { get; set; }
|
||||
public oms_wei_order_item_info OrderItem { get; set; }
|
||||
|
||||
public TransitReturnOrderWindow(oms_wei_order_item_info orderItem)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
instance = this;
|
||||
|
||||
if (orderItem != null)
|
||||
OrderItem = orderItem;
|
||||
}
|
||||
|
||||
private void mainGrid_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void TransitAfterSaleWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.cmbExpressName.Items.Add("");
|
||||
this.cmbExpressName.Items.Add("邮政EMS");
|
||||
this.cmbExpressName.Items.Add("极兔速递");
|
||||
this.cmbExpressName.Items.Add("申通快递");
|
||||
this.cmbExpressName.Items.Add("韵达快递");
|
||||
this.cmbExpressName.Items.Add("圆通快递");
|
||||
this.cmbExpressName.Items.Add("中通快递");
|
||||
this.cmbExpressName.Items.Add("百世快运");
|
||||
this.cmbExpressName.Items.Add("顺丰速运");
|
||||
this.cmbExpressName.Items.Add("京东快递");
|
||||
this.cmbExpressName.Items.Add("其他快递");
|
||||
|
||||
if (OrderItem != null)
|
||||
{
|
||||
//if (OrderItem.ItemTransitOrderAfterSale != null)
|
||||
//{
|
||||
// btnAdd.IsEnabled = false;
|
||||
|
||||
// this.txtUser.Text = OrderItem.ItemTransitOrderAfterSale.recipient_name;
|
||||
// this.txtMobile.Text = OrderItem.ItemTransitOrderAfterSale.recipient_phone;
|
||||
// this.txtDetailAddress.Text = OrderItem.ItemTransitOrderAfterSale.refund_detail_address;
|
||||
// this.txtProvince.Text = OrderItem.ItemTransitOrderAfterSale.refund_province;
|
||||
// this.txtCity.Text = OrderItem.ItemTransitOrderAfterSale.refund_city;
|
||||
// this.txtCounty.Text = OrderItem.ItemTransitOrderAfterSale.refund_county;
|
||||
//}
|
||||
|
||||
// 上海仓默认发货地址
|
||||
txtSendUser.Text = "29供应链";
|
||||
txtSendMobile.Text = "13024622251";
|
||||
txtSendProvince.Text = "上海市";
|
||||
txtSendCity.Text = "上海市";
|
||||
txtSendCounty.Text = "普陀区";
|
||||
txtSendDetailAddress.Text = "真如镇街道真北路2653弄Z区zt";
|
||||
|
||||
txtShopOrderId.Text = OrderItem.order_id;
|
||||
txtShopName.Text = OrderItem.ItemOrder?.shop_name;
|
||||
txtGoodsName.Text = OrderItem.title;
|
||||
txtSpuId.Text = OrderItem.product_id.ParseToString();
|
||||
txtSpecName.Text = OrderItem.sku_attr_str;
|
||||
|
||||
|
||||
txtWaybillId.Text = OrderItem.ItemRefund?.return_waybill_id;
|
||||
foreach (var cmbItem in cmbExpressName.Items)
|
||||
{
|
||||
if (PddBuyerOrderLiteInfo.GetWxExpressCodeToWxExpressName((OrderItem.ItemRefund?.return_delivery_id).ParseToString()) == cmbItem.ParseToString())
|
||||
{
|
||||
cmbExpressName.SelectedItem = cmbItem;
|
||||
}
|
||||
}
|
||||
//cmbExpressName.SelectedItem =
|
||||
|
||||
|
||||
if (OrderItem.PddBuyerAfterSale != null)
|
||||
{
|
||||
this.txtAddressAnalysis.Text = OrderItem.PddBuyerAfterSale.afterSaleAddress;
|
||||
btnAddressAnalysis_Click(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (OrderItem?.ItemTransitOrder?.warehouse_status != 0 && OrderItem?.ItemTransitOrder?.warehouse_status != 1)
|
||||
{
|
||||
BaseMsgWindow.ShowError("当前订单仓库状态不支持售后,请联系买家直接退回总店!");
|
||||
return;
|
||||
}
|
||||
|
||||
//http://localhost:8088/oms-api/external_procurement/createReturnPackage
|
||||
//{
|
||||
// "orderNo": "3737011320735026432",
|
||||
// "orderCode": "4600000167202606117621000767",
|
||||
// "refundProvince": "安徽省",
|
||||
// "refundCity": "合肥市",
|
||||
// "refundCounty": "瑶海区",
|
||||
// "refundDetailAddress": "某街道 1”,
|
||||
// "recipientName": "张三",
|
||||
// "recipientPhone": "13800138000"
|
||||
//} post(json)请求方式,如果使用客户端账户扣款增加一个参数account_user
|
||||
|
||||
JObject data = new JObject();
|
||||
data["orderNo"] = OrderItem.order_id;
|
||||
data["orderCode"] = OrderItem.ItemTransitOrder?.order_code;
|
||||
data["refundProvince"] = txtProvince.Text.Trim();
|
||||
data["refundCity"] = txtCity.Text.Trim();
|
||||
data["refundCounty"] = txtCounty.Text.Trim();
|
||||
data["refundDetailAddress"] = txtDetailAddress.Text.Trim();
|
||||
data["recipientName"] = txtUser.Text.Trim();
|
||||
data["recipientPhone"] = txtMobile.Text.Trim();
|
||||
data["account_user"] = BaseClass.UserName;
|
||||
data["accountUser"] = BaseClass.UserName;
|
||||
//data["platform"] = "WEISHOP";
|
||||
var getTransitAfterSaleUrl = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/createReturnPackage";
|
||||
var getTransitAfterSaleStr = JsonHelper.SerializeObject(data);
|
||||
var getTransitAfterSaleRst = HttpResponseWXBLL.e57PostResponse(getTransitAfterSaleUrl, getTransitAfterSaleStr, "");
|
||||
if (!getTransitAfterSaleRst.ParseToString().Contains("<code>200</code>") && !getTransitAfterSaleRst.ParseToString().Contains("<code>0</code>"))
|
||||
{
|
||||
string msg = BaseRegex.GetStringXml(ref getTransitAfterSaleRst, "msg");
|
||||
if (msg.IsNullOrEmpty())
|
||||
msg = getTransitAfterSaleRst;
|
||||
BaseMsgWindow.ShowError("中转售后添加失败,服务端返回 " + msg, "", this);
|
||||
}
|
||||
else
|
||||
{
|
||||
//<AjaxResult><msg>创建退货包裹成功</msg><code>0</code></AjaxResult>
|
||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||
MainWindow.Instance.orderListCtrl.FilterOrders();
|
||||
BaseMsgWindow.ShowInfo("添加退货包裹成功", "", this);
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnAddressAnalysis_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var txt = txtAddressAnalysis.Text.Trim();
|
||||
txt = txt.Replace("\r", "").Replace("\n", "");
|
||||
|
||||
|
||||
// 定义座机号的正则表达式
|
||||
string landlinePattern = @"\d{3}-\d{8}|\d{4}-\d{7}";
|
||||
// 定义手机号的正则表达式
|
||||
string mobilePattern = @"1[3-9]\d{9}";
|
||||
|
||||
// 使用正则表达式匹配座机号和手机号
|
||||
Match landlineMatch = Regex.Match(txt, landlinePattern);
|
||||
Match mobileMatch = Regex.Match(txt, mobilePattern);
|
||||
|
||||
var phone = "";
|
||||
if (landlineMatch.Success)
|
||||
{
|
||||
phone = landlineMatch.Value;
|
||||
txt = txt.Replace(phone, " ");
|
||||
}
|
||||
if (mobileMatch.Success)
|
||||
{
|
||||
phone = mobileMatch.Value;
|
||||
txt = txt.Replace(phone, " ");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(phone))
|
||||
{
|
||||
txtMobile.Text = phone;
|
||||
}
|
||||
|
||||
var province = GlobalConfig.Divisions.FirstOrDefault(d => txt.Contains(d.name));
|
||||
if (province == null)
|
||||
return;
|
||||
txtProvince.Text = province.name;
|
||||
var city = province.children.FirstOrDefault(c => txt.Contains(c.name));
|
||||
if (city == null)
|
||||
return;
|
||||
txtCity.Text = city.name;
|
||||
var county = city.children.FirstOrDefault(c => txt.Contains(c.name));
|
||||
if (county == null)
|
||||
return;
|
||||
txtCounty.Text = county.name;
|
||||
txt = txt.Replace(county.name, " ").Replace(city.name, " ").Replace(province.name, " ");
|
||||
|
||||
var tArr = txt.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
|
||||
tArr = tArr.OrderBy(t => t.Length).ToArray();
|
||||
this.txtUser.Text = tArr.FirstOrDefault();
|
||||
this.txtDetailAddress.Text = string.Join("", tArr).Replace(this.txtUser.Text, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,6 +168,7 @@
|
||||
<Compile Include="DouYinModel\Result\DouGoodsInfo.cs" />
|
||||
<Compile Include="DouYinModel\Result\DouOrderListInfo.cs" />
|
||||
<Compile Include="Model\Config\BuyConfig.cs" />
|
||||
<Compile Include="Model\DBModel\distrib_return_order.cs" />
|
||||
<Compile Include="Model\DBModel\ErpMerchantInfo.cs" />
|
||||
<Compile Include="Model\DBModel\oms_wei_external_procurement_after_sale_info.cs" />
|
||||
<Compile Include="Model\DBModel\oms_wei_external_procurement_log_info.cs" />
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace AllBase
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
|
||||
public static int VersionCount = 210;
|
||||
public static int VersionCount = 212;
|
||||
|
||||
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
||||
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace AllBase.Model.DBModel
|
||||
//中国广电:192。作为第四大运营商,其号段于2022年开始放号。
|
||||
public static List<int> MobileHead { get; set; } = new List<int>()
|
||||
{
|
||||
134, 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 172, 178, 182, 183, 184, 187, 188, 195, 197, 198,
|
||||
134, 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 172, 178, 182, 183, 184, 187, 188, 195, 197, 198,
|
||||
130, 131, 132, 155, 156, 166, 175, 176, 185, 186, 196,
|
||||
133, 149, 153, 173, 177, 180, 181, 189, 190, 191, 193, 199,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
using AllBase.Model.MvvmBaseClasses;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AllBase.Model.DBModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 分销退货表
|
||||
/// </summary>
|
||||
public class distrib_return_order : PropertyNotifyObject
|
||||
{
|
||||
public long id { get; set; }
|
||||
/// <summary>
|
||||
/// 退货订单编码
|
||||
/// </summary>
|
||||
public string order_code { get; set; }
|
||||
/// <summary>
|
||||
/// 原始订单来源编码
|
||||
/// </summary>
|
||||
public string order_code_source { get; set; }
|
||||
/// <summary>
|
||||
/// 物流系统编码(如SF、ZTO)
|
||||
/// </summary>
|
||||
public string logistics_code { get; set; }
|
||||
/// <summary>
|
||||
/// 物流单号
|
||||
/// </summary>
|
||||
public string logistics_express_no { get; set; }
|
||||
/// <summary>
|
||||
/// 中转仓平台来源(如OTHER、JD、PDD)
|
||||
/// </summary>
|
||||
public string platform { get; set; } = "PDD";
|
||||
/// <summary>
|
||||
/// 店铺名称
|
||||
/// </summary>
|
||||
public string shop_name { get; set; }
|
||||
/// <summary>
|
||||
/// 发件人姓名(冗余字段,便于快速查询,不依赖JSON解析)
|
||||
/// </summary>
|
||||
public string sender_name { get; set; }
|
||||
/// <summary>
|
||||
/// 发件人电话(冗余字段,便于快速查询,不依赖JSON解析)
|
||||
/// </summary>
|
||||
public string sender_phone { get; set; }
|
||||
/// <summary>
|
||||
/// 发货人信息(JSON格式:姓名、电话、省市区地址)
|
||||
/// </summary>
|
||||
public string sender_info { get; set; }
|
||||
/// <summary>
|
||||
/// 收货人姓名
|
||||
/// </summary>
|
||||
public string receiver_name { get; set; }
|
||||
/// <summary>
|
||||
/// 收货人电话
|
||||
/// </summary>
|
||||
public string receiver_phone { get; set; }
|
||||
/// <summary>
|
||||
/// 收货省份
|
||||
/// </summary>
|
||||
public string receiver_province { get; set; }
|
||||
/// <summary>
|
||||
/// 收货城市
|
||||
/// </summary>
|
||||
public string receiver_city { get; set; }
|
||||
/// <summary>
|
||||
/// 收货区县
|
||||
/// </summary>
|
||||
public string receiver_area { get; set; }
|
||||
/// <summary>
|
||||
/// 收货详细地址
|
||||
/// </summary>
|
||||
public string receiver_address { get; set; }
|
||||
/// <summary>
|
||||
/// 记录创建时间
|
||||
/// </summary>
|
||||
public DateTime created_at { get; set; }
|
||||
/// <summary>
|
||||
/// 记录更新时间
|
||||
/// </summary>
|
||||
public DateTime updated_at { get; set; }
|
||||
/// <summary>
|
||||
/// 入库时间(仓库接收退货商品的时间)
|
||||
/// </summary>
|
||||
public DateTime warehouse_in_time { get; set; }
|
||||
/// <summary>
|
||||
/// 出库时间(仓库发出补货或处理后商品的时间)
|
||||
/// </summary>
|
||||
public DateTime warehouse_out_time { get; set; }
|
||||
/// <summary>
|
||||
/// 出入库状态:0待处理、1已入库、2创建异常、3处理中
|
||||
/// </summary>
|
||||
public int? warehouse_status { get; set; }
|
||||
/// <summary>
|
||||
/// 退货订单创建与处理状态
|
||||
/// </summary>
|
||||
public int? return_order_status { get; set; }
|
||||
/// <summary>
|
||||
/// 首重费用
|
||||
/// </summary>
|
||||
public int first_weight_fee { get; set; }
|
||||
/// <summary>
|
||||
/// 超重费用
|
||||
/// </summary>
|
||||
public int? additional_weight_fee { get; set; }
|
||||
/// <summary>
|
||||
/// 订单作废状态:0=正常,1=已作废,2=作废失败
|
||||
/// </summary>
|
||||
public int? order_void_status { get; set; }
|
||||
/// <summary>
|
||||
/// 下游物流公司
|
||||
/// </summary>
|
||||
public string real_logistics_code { get; set; }
|
||||
/// <summary>
|
||||
/// 下游物流单号
|
||||
/// </summary>
|
||||
public string real_logistics_express_code { get; set; }
|
||||
public string response_msg { get; set; }
|
||||
/// <summary>
|
||||
/// 备用扩展字段1
|
||||
/// </summary>
|
||||
public string ext_field1 { get; set; }
|
||||
/// <summary>
|
||||
/// 备用扩展字段2
|
||||
/// </summary>
|
||||
public string ext_field2 { get; set; }
|
||||
/// <summary>
|
||||
/// 退货订单平台来源
|
||||
/// </summary>
|
||||
public string platform_code { get; set; }
|
||||
/// <summary>
|
||||
/// 平台订单号
|
||||
/// </summary>
|
||||
public string platform_order_no { get; set; }
|
||||
/// <summary>
|
||||
/// 售后单号
|
||||
/// </summary>
|
||||
public string after_sale_no { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public ObservableCollection<distrib_return_order_item> distrib_return_order_items
|
||||
{
|
||||
get { return this.GetValue(x => x.distrib_return_order_items); }
|
||||
set { this.SetValue(x => x.distrib_return_order_items, value); }
|
||||
}
|
||||
}
|
||||
|
||||
public class distrib_return_order_item : PropertyNotifyObject
|
||||
{
|
||||
public long id { get; set; }
|
||||
public string order_code { get; set; }
|
||||
public string spu_code { get; set; }
|
||||
public string spu_name { get; set; }
|
||||
public string sku_code { get; set; }
|
||||
public string spec_info { get; set; }
|
||||
public string sku_url { get; set; }
|
||||
public string pic_url { get; set; }
|
||||
public int return_quantity { get; set; } = 1;
|
||||
public DateTime updated_at { get; set; }
|
||||
|
||||
public distrib_return_order distrib_return_order
|
||||
{
|
||||
get { return this.GetValue(x => x.distrib_return_order); }
|
||||
set
|
||||
{
|
||||
this.SetValue(x => x.distrib_return_order, value);
|
||||
if (value != null)
|
||||
{
|
||||
if (value.distrib_return_order_items == null)
|
||||
value.distrib_return_order_items = new ObservableCollection<distrib_return_order_item>();
|
||||
|
||||
//if (value.distrib_return_order_items.FirstOrDefault(it => it.spu_code + it.sku_code == this.spu_code + this.sku_code) is distrib_return_order_item item)
|
||||
//{
|
||||
// //给每个属性赋值...
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// value.distrib_return_order_items.Add(this);
|
||||
//}
|
||||
while (value.distrib_return_order_items.FirstOrDefault(it => it.spu_code + it.sku_code == this.spu_code + this.sku_code) is distrib_return_order_item item)
|
||||
{
|
||||
value.distrib_return_order_items.Remove(item);
|
||||
}
|
||||
value.distrib_return_order_items.Add(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ namespace AllBase.Model.Result
|
||||
if (expressCompanyName.Contains("京东快运")) return "JDKY";
|
||||
if (expressCompanyName.Contains("京东大件物流")) return "JD";
|
||||
if (expressCompanyName.Contains("其他快递")) return "OTHER";
|
||||
return "";
|
||||
return "OTHER";
|
||||
}
|
||||
|
||||
public static string GetWxExpressNameToWxExpressCode(string expressCompanyName)
|
||||
@@ -92,9 +92,27 @@ namespace AllBase.Model.Result
|
||||
if (expressCompanyName.Contains("京东快递")) return "JD";
|
||||
if (expressCompanyName.Contains("京东快运")) return "JDKY";
|
||||
if (expressCompanyName.Contains("其他快递")) return "OTHER";
|
||||
return "";
|
||||
return "OTHER";
|
||||
}
|
||||
|
||||
public static string GetWxExpressCodeToWxExpressName(string expressCompanyCode)
|
||||
{
|
||||
if (expressCompanyCode == null || expressCompanyCode == "") return "";
|
||||
if (expressCompanyCode.Contains("EMS")) return "邮政EMS";
|
||||
if (expressCompanyCode.Contains("JTSD")) return "极兔速递";
|
||||
if (expressCompanyCode.Contains("STO")) return "申通快递";
|
||||
if (expressCompanyCode.Contains("YD")) return "韵达速递";
|
||||
if (expressCompanyCode.Contains("YUNDA")) return "韵达速递";
|
||||
if (expressCompanyCode.Contains("YTO")) return "圆通速递";
|
||||
if (expressCompanyCode.Contains("ZTO")) return "中通快递";
|
||||
if (expressCompanyCode.Contains("BTWL")) return "百世快运";
|
||||
if (expressCompanyCode.Contains("顺丰速运")) return "SF";
|
||||
if (expressCompanyCode.Contains("京东快递")) return "JD";
|
||||
if (expressCompanyCode.Contains("京东快运")) return "JDKY";
|
||||
if (expressCompanyCode.Contains("其他快递")) return "OTHER";
|
||||
return "其他快递";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发货类型 直发/中转
|
||||
/// </summary>
|
||||
@@ -380,8 +398,19 @@ namespace AllBase.Model.Result
|
||||
//return GetPddToWxExpressCompanyCode(outExpressCompanyName);
|
||||
return GetPddToTransitWarehouseExpressCompanyCode(outExpressCompanyName);
|
||||
}
|
||||
}
|
||||
public string outExpressCompanyName
|
||||
}
|
||||
/// <summary>
|
||||
/// 外采订单物流名称对应微信物流公司编码
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string outPddToWxExpressCompanyCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetPddToWxExpressCompanyCode(outExpressCompanyName);
|
||||
}
|
||||
}
|
||||
public string outExpressCompanyName
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -17,7 +17,17 @@ namespace Work._29Tools.BLL
|
||||
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
public static string GetWxSupplierOrderList(ShopLoginInfo shop, string orderId)
|
||||
|
||||
public static string GetWxSupplierListV2(ShopLoginInfo shop, int offset = 0)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmecnodesuppliercosignment/distribute/cgi/getDistributeSupplierList?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/supply/consignmentOrderList";
|
||||
string body = @"{""limit"":20,""offset"":" + offset + "}";
|
||||
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, referer);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string GetWxSupplierOrderList(ShopLoginInfo shop, string orderId)
|
||||
{
|
||||
string url = "https://store.weixin.qq.com/shop-faas/mmecnodesuppliercosignment/order/cgi/orderSearch?token=&lang=zh_CN";
|
||||
string referer = "https://store.weixin.qq.com/shop/supply/consignmentOrderList";
|
||||
|
||||
Reference in new issue
Block a user