22 changed files with 393 additions and 37 deletions
@ -0,0 +1,24 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Common.Http; |
|||
using BBWY.Common.Models; |
|||
using System.Collections.Generic; |
|||
using System.Net.Http; |
|||
|
|||
namespace BBWY.Client.APIServices |
|||
{ |
|||
public class LogisticsService : BaseApiService, IDenpendency |
|||
{ |
|||
public LogisticsService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) { } |
|||
|
|||
public ApiResponse<IList<LogisticsResponse>> GetLogisticsList() |
|||
{ |
|||
return SendRequest<IList<LogisticsResponse>>(globalContext.BBYWApiHost, "api/vender/GetLogisticsList", new |
|||
{ |
|||
globalContext.User.Shop.Platform, |
|||
globalContext.User.Shop.AppKey, |
|||
globalContext.User.Shop.AppSecret, |
|||
globalContext.User.Shop.AppToken |
|||
}, null, HttpMethod.Post); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
namespace BBWY.Client.Models |
|||
{ |
|||
public class LogisticsResponse |
|||
{ |
|||
public string Id { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.Order.OutStock" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
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:BBWY.Client.Views.Order" |
|||
mc:Ignorable="d" |
|||
Title="出库" Height="180" Width="300" |
|||
Style="{StaticResource bwstyle}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="订单出库" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<Grid Grid.Row="1" Margin="0,5"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="快递公司" HorizontalAlignment="Right" VerticalAlignment="Center"/> |
|||
<ComboBox x:Name="cbx_Logistics" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Height="25" Width="120" Margin="5,0,0,0" |
|||
ItemsSource="{Binding LogisticsResponseList,Mode=OneWay}" |
|||
SelectedItem="{Binding SelectedLogistics,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" |
|||
DisplayMemberPath="Name" |
|||
VerticalContentAlignment="Center"/> |
|||
|
|||
<TextBlock Text="快递单号" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1"/> |
|||
<c:BTextBox x:Name="txt_waybill" Grid.Column="1" Grid.Row="1" Width="120" HorizontalAlignment="Left" Margin="5,0,0,0" Height="25"/> |
|||
</Grid> |
|||
<c:BButton x:Name="btn_Save" Content="保存" Grid.Row="2" Width="60" HorizontalAlignment="Right" Margin="0,0,8,0" |
|||
Click="btn_Save_Click"/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,48 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using System.Collections.Generic; |
|||
using System.Windows; |
|||
|
|||
namespace BBWY.Client.Views.Order |
|||
{ |
|||
/// <summary>
|
|||
/// OutStock.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class OutStock : BWindow |
|||
{ |
|||
public string OrderId { get; private set; } |
|||
public IList<LogisticsResponse> LogisticsResponseList { get; private set; } |
|||
|
|||
public string WaybillNo { get; private set; } |
|||
|
|||
public LogisticsResponse SelectedLogistics { get; private set; } |
|||
|
|||
|
|||
public OutStock(string orderId, IList<LogisticsResponse> logisticsResponseList) |
|||
{ |
|||
InitializeComponent(); |
|||
this.OrderId = orderId; |
|||
this.LogisticsResponseList = logisticsResponseList; |
|||
this.DataContext = this; |
|||
} |
|||
|
|||
private void btn_Save_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (cbx_Logistics.SelectedItem == null) |
|||
{ |
|||
MessageBox.Show("请选择快递公司", "出库"); |
|||
return; |
|||
} |
|||
|
|||
SelectedLogistics = cbx_Logistics.SelectedItem as LogisticsResponse; |
|||
if (string.IsNullOrEmpty(txt_waybill.Text) && SelectedLogistics.Name != "厂家自送") |
|||
{ |
|||
MessageBox.Show("非厂家自送需要填写快递单号", "出库"); |
|||
return; |
|||
} |
|||
WaybillNo = txt_waybill.Text; |
|||
this.DialogResult = true; |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
namespace BBWY.Server.Model.Dto |
|||
{ |
|||
public class OutStockRequest : PlatformRequest |
|||
{ |
|||
public string OrderId { get; set; } |
|||
/// <summary>
|
|||
/// 运单号
|
|||
/// </summary>
|
|||
public string WayBillNo { get; set; } |
|||
/// <summary>
|
|||
/// 物流公司Id
|
|||
/// </summary>
|
|||
public string LogisticsId { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
namespace BBWY.Server.Model.Dto |
|||
{ |
|||
public class LogisticsResponse |
|||
{ |
|||
public string Id { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
} |
|||
} |
Loading…
Reference in new issue