Browse Source

分箱配置 未完

AddValidOverTime
shanji 2 years ago
parent
commit
7f13af9c0e
  1. 11
      BBWY.Client/APIServices/LogisticsService.cs
  2. 1
      BBWY.Client/App.xaml.cs
  3. 15
      BBWY.Client/Models/APIModel/Response/Logistics/StoreResponse.cs
  4. 16
      BBWY.Client/Models/Enums.cs
  5. 11
      BBWY.Client/Models/QiKu/PackSkuConfig.cs
  6. 12
      BBWY.Client/ViewModels/BatchPurchase/BatchPurchaseCreateNewOrderViewModel.cs
  7. 105
      BBWY.Client/ViewModels/QiKu/PackSkuSplitConfigViewModel.cs
  8. 9
      BBWY.Client/ViewModels/ViewModelLocator.cs
  9. 8
      BBWY.Client/Views/BatchPurchase/BatchCreateNewPurchaseOrder.xaml
  10. 2
      BBWY.Client/Views/BatchPurchase/BatchPurchaseOrderList.xaml
  11. 132
      BBWY.Client/Views/BatchPurchase/PackSkuConfigWindow.xaml
  12. 44
      BBWY.Client/Views/BatchPurchase/PackSkuConfigWindow.xaml.cs
  13. 50
      BBWY.Client/Views/BatchPurchase/PackSkuSplitCountAndStoreWindow.xaml
  14. 64
      BBWY.Client/Views/BatchPurchase/PackSkuSplitCountAndStoreWindow.xaml.cs

11
BBWY.Client/APIServices/LogisticsService.cs

@ -20,5 +20,16 @@ namespace BBWY.Client.APIServices
globalContext.User.Shop.AppToken globalContext.User.Shop.AppToken
}, null, HttpMethod.Post); }, null, HttpMethod.Post);
} }
public ApiResponse<IList<StoreResponse>> GetStoreList()
{
return SendRequest<IList<StoreResponse>>(globalContext.BBYWApiHost, "api/vender/GetStoreHouseList", new
{
globalContext.User.Shop.Platform,
globalContext.User.Shop.AppKey,
globalContext.User.Shop.AppSecret,
globalContext.User.Shop.AppToken
}, null, HttpMethod.Post);
}
} }
} }

1
BBWY.Client/App.xaml.cs

@ -122,6 +122,7 @@ namespace BBWY.Client
serviceCollection.AddTransient<EditServiceOrderViewModel>(); serviceCollection.AddTransient<EditServiceOrderViewModel>();
serviceCollection.AddTransient<BatchPurchaseCreateNewOrderViewModel>(); serviceCollection.AddTransient<BatchPurchaseCreateNewOrderViewModel>();
serviceCollection.AddTransient<BatchPurchaseAddProductSkuViewModel>(); serviceCollection.AddTransient<BatchPurchaseAddProductSkuViewModel>();
serviceCollection.AddTransient<PackSkuSplitConfigViewModel>();
#region 注册拳探SDK相关类 #region 注册拳探SDK相关类
serviceCollection.AddSingleton<QuanTanProductClient>(); serviceCollection.AddSingleton<QuanTanProductClient>();

15
BBWY.Client/Models/APIModel/Response/Logistics/StoreResponse.cs

@ -1,9 +1,18 @@
namespace BBWY.Client.Models using System;
namespace BBWY.Client.Models
{ {
public class StoreResponse public class StoreResponse
{ {
public string StoreId { get; set; } public DateTime? CreateTime { get; set; }
public string Id { get; set; }
public string Name { get; set; }
public Platform Platform { get; set; }
public StockStatus Status { get; set; }
public string StoreName { get; set; } public StockType Type { get; set; }
} }
} }

16
BBWY.Client/Models/Enums.cs

@ -402,4 +402,20 @@
= 2, = 2,
= 3 = 3
} }
/// <summary>
/// 京东仓库类型 1商家仓 2京东仓
/// </summary>
public enum StockType
{
= 1, = 2
}
/// <summary>
/// 仓库状态 0暂停,1使用
/// </summary>
public enum StockStatus
{
= 0, 使 = 1
}
} }

11
BBWY.Client/Models/QiKu/PackSkuConfig.cs

@ -1,7 +1,14 @@
namespace BBWY.Client.Models.QiKu using System.Collections.ObjectModel;
namespace BBWY.Client.Models.QiKu
{ {
public class PackSkuConfig : NotifyObject public class PackSkuConfig : NotifyObject
{ {
public PackSkuConfig()
{
PackSkuSplitConfigList = new ObservableCollection<PackSkuSplitConfig>();
}
private int splitCount; private int splitCount;
public string SkuId { get; set; } public string SkuId { get; set; }
@ -19,6 +26,8 @@
/// 分箱数量 /// 分箱数量
/// </summary> /// </summary>
public int SplitCount { get => splitCount; set { Set(ref splitCount, value); } } public int SplitCount { get => splitCount; set { Set(ref splitCount, value); } }
public ObservableCollection<PackSkuSplitConfig> PackSkuSplitConfigList { get; set; }
} }
public class PackSkuSplitConfig : NotifyObject public class PackSkuSplitConfig : NotifyObject

12
BBWY.Client/ViewModels/BatchPurchase/BatchPurchaseCreateNewOrderViewModel.cs

@ -400,7 +400,19 @@ namespace BBWY.Client.ViewModels
return; return;
} }
var packWindow = new PackSkuConfigWindow(ProductSkuWithSchemeList.Select(ps => new Models.QiKu.PackSkuConfig()
{
Logo = ps.Logo,
SkuId = ps.SkuId,
Title = ps.Title,
PurchaseCount = ps.Quantity
}).ToList());
if (packWindow.ShowDialog() != true)
return;
var packSkuConfigList = packWindow.GetPackSkuConfigList();
Console.WriteLine(packSkuConfigList);
} }
} }
} }

105
BBWY.Client/ViewModels/QiKu/PackSkuSplitConfigViewModel.cs

@ -0,0 +1,105 @@
using BBWY.Client.APIServices;
using BBWY.Client.Models;
using BBWY.Client.Models.QiKu;
using BBWY.Client.Views.BatchPurchase;
using GalaSoft.MvvmLight.Command;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Input;
namespace BBWY.Client.ViewModels
{
public class PackSkuSplitConfigViewModel : BaseVM
{
public IList<PackSkuConfig> PackSkuConfigList { get; set; }
private IList<StoreResponse> storeList;
public ICommand SetSplitCountCommand { get; set; }
public ICommand SetPackCountAndStoreCommand { get; set; }
public ICommand SaveCommand { get; set; }
private LogisticsService logisticsService;
public PackSkuSplitConfigViewModel(LogisticsService logisticsService)
{
this.logisticsService = logisticsService;
SetSplitCountCommand = new RelayCommand<PackSkuConfig>(SetSplitCount);
SetPackCountAndStoreCommand = new RelayCommand<PackSkuSplitConfig>(SetPackCountAndStore);
SaveCommand = new RelayCommand(Save);
PackSkuConfigList = new ObservableCollection<PackSkuConfig>();
}
public void SetData(IList<PackSkuConfig> packSkuConfigList)
{
foreach (var item in packSkuConfigList)
PackSkuConfigList.Add(item);
}
public IList<PackSkuConfig> GetPackSkuConfigList()
{
return PackSkuConfigList;
}
private void SetSplitCount(PackSkuConfig packSkuConfig)
{
if (packSkuConfig.SplitCount <= 0)
{
MessageBox.Show("份数不正确");
return;
}
packSkuConfig.PackSkuSplitConfigList.Clear();
for (var i = 1; i <= packSkuConfig.SplitCount; i++)
{
packSkuConfig.PackSkuSplitConfigList.Add(new PackSkuSplitConfig()
{
Index = i,
PackCount = 0
});
}
}
private void SetPackCountAndStore(PackSkuSplitConfig packSkuSplitConfig)
{
if (storeList == null)
{
var response = logisticsService.GetStoreList();
if (!response.Success)
{
MessageBox.Show(response.Msg, "获取仓库");
return;
}
storeList = response.Data;
}
var w = new PackSkuSplitCountAndStoreWindow(packSkuSplitConfig.PackCount, packSkuSplitConfig.Store, storeList);
if (w.ShowDialog() == true)
{
packSkuSplitConfig.PackCount = w.Quantity;
packSkuSplitConfig.Store = w.Store;
}
}
private void Save()
{
if (PackSkuConfigList.Any(s => s.PackSkuSplitConfigList.Count() == 0 ||
s.PackSkuSplitConfigList.Any(sp => sp.PackCount <= 0)))
{
MessageBox.Show("装箱设置不正确", "提示");
return;
}
if (PackSkuConfigList.Any(s => s.PurchaseCount != s.PackSkuSplitConfigList.Sum(sp => sp.PackCount)))
{
MessageBox.Show("打包份数总数与采购数量不相等", "提示");
return;
}
GalaSoft.MvvmLight.Messaging.Messenger.Default.Send(true, "PackSkuConfigWindowClose");
}
}
}

9
BBWY.Client/ViewModels/ViewModelLocator.cs

@ -294,5 +294,14 @@ namespace BBWY.Client.ViewModels
return s.ServiceProvider.GetRequiredService<PublishTaskViewModel>(); return s.ServiceProvider.GetRequiredService<PublishTaskViewModel>();
} }
} }
public PackSkuSplitConfigViewModel PackSkuConfig
{
get
{
using var s = sp.CreateScope();
return s.ServiceProvider.GetRequiredService<PackSkuSplitConfigViewModel>();
}
}
} }
} }

8
BBWY.Client/Views/BatchPurchase/BatchCreateNewPurchaseOrder.xaml

@ -345,10 +345,10 @@
<StackPanel Orientation="Horizontal" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right"> <StackPanel Orientation="Horizontal" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right">
<c:BButton Content="预览订单" Width="80" HorizontalAlignment="Right" Margin="5,0,0,0" <c:BButton Content="预览订单" Width="80" HorizontalAlignment="Right" Margin="5,0,0,0"
Command="{Binding PreviewOrderCommand}" Background="#1CC2A2"/> Command="{Binding PreviewOrderCommand}" Background="#1CC2A2"/>
<c:BButton Content="提交订单" Width="80" HorizontalAlignment="Right" <!--<c:BButton Content="提交订单" Width="80" HorizontalAlignment="Right"
Command="{Binding FastCreateOrderCommand}" Margin="0,0,5,0"/> Command="{Binding FastCreateOrderCommand}" Margin="0,0,5,0"/>-->
<!--<c:BButton Content="下一步" Width="80" HorizontalAlignment="Right" <c:BButton Content="下一步" Width="80" HorizontalAlignment="Right"
Command="{Binding NextCommand}" Margin="0,0,5,0"/>--> Command="{Binding NextCommand}" Margin="0,0,5,0"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</c:BWindow> </c:BWindow>

2
BBWY.Client/Views/BatchPurchase/BatchPurchaseOrderList.xaml

@ -202,7 +202,7 @@
<c:BButton Content="{Binding Id}" Style="{StaticResource LinkButton}" <c:BButton Content="{Binding Id}" Style="{StaticResource LinkButton}"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding Id}" Margin="5,0,0,0"/> CommandParameter="{Binding Id}" Margin="5,0,0,0"/>
<c:BButton x:Name="btn_orderState" Content="{Binding OrderState}" Margin="5,0,0,0" Height="25" Padding="5,0" Background="{StaticResource Text.Link.Color}"/> <c:BButton x:Name="btn_orderState" Content="{Binding OrderState}" Margin="5,0,0,0" Height="25" Padding="5,0" Background="{Binding OrderState,ConverterParameter=已取消:#EC808D:#02A7F0,Converter={StaticResource objConverter}}"/>
<Border Width="1" Margin="5,5,0,5" Background="{StaticResource Border.Brush}"/> <Border Width="1" Margin="5,5,0,5" Background="{StaticResource Border.Brush}"/>
<StackPanel x:Name="txt_consignee" Margin="5,0,0,0" Orientation="Horizontal" VerticalAlignment="Center"> <StackPanel x:Name="txt_consignee" Margin="5,0,0,0" Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="下单账号:"/> <TextBlock Text="下单账号:"/>

132
BBWY.Client/Views/BatchPurchase/PackSkuConfigWindow.xaml

@ -0,0 +1,132 @@
<c:BWindow x:Class="BBWY.Client.Views.BatchPurchase.PackSkuConfigWindow"
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.BatchPurchase"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
Title="PackSkuConfigWindow" Height="500" Width="1024"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
Style="{StaticResource bwstyle}"
DataContext="{Binding PackSkuConfig,Source={StaticResource Locator}}">
<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>
<ListBox x:Name="listbox"
ItemsSource="{Binding PackSkuConfigList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="1,0,0,0"
Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox,Converter={StaticResource widthConverter},ConverterParameter=3}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="140"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--{Binding Logo}-->
<c:BAsyncImage UrlSource="{Binding Logo}"
Width="130" DecodePixelWidth="130"
VerticalAlignment="Top" Margin="0,5,0,5"
Cursor="Hand"/>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0">
<Run Text="SKU:"/>
<Run Text="{Binding SkuId}"/>
</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Column="1" Margin="5,0,0,0">
<Run Text="采购数量:"/>
<Run Text="{Binding PurchaseCount}"/>
</TextBlock>
<TextBlock VerticalAlignment="Center" Margin="5,0,5,0" Grid.Row="1">
<Run Text="SKU名称:"/>
<Run Text="{Binding Title}"/>
</TextBlock>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1" Margin="5,0,0,0">
<TextBlock Text="份数:" VerticalAlignment="Center"/>
<c:BTextBox Text="{Binding SplitCount}" Width="40" Margin="5,0" Height="25"/>
<c:BButton Command="{Binding DataContext.SetSplitCountCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding }"
Content="设置"
Style="{StaticResource LinkButton}"/>
</StackPanel>
<ListBox Grid.Row="2" Grid.ColumnSpan="2"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderThickness="1,1,0,1"
BorderBrush="{StaticResource Border.Brush}"
ItemsSource="{Binding PackSkuSplitConfigList}"
Width="Auto"
Margin="5,0,0,6"
HorizontalAlignment="Left"
Visibility="{Binding SplitCount,ConverterParameter=0:Collapsed:Visible,Converter={StaticResource objConverter}}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="120" Height="80">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Index,StringFormat=第\{0\}份}" Style="{StaticResource middleTextBlock}"/>
<c:BButton Content="设置" Style="{StaticResource LinkButton}" Grid.Row="1"
Command="{Binding DataContext.SetPackCountAndStoreCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}"
CommandParameter="{Binding }"/>
<TextBlock Grid.Row="2" Style="{StaticResource middleTextBlock}">
<Run Text="{Binding PackCount,StringFormat=\{0\}件}"/>
<Run Text="{Binding Store.Name}"/>
</TextBlock>
<Border Width="1" Grid.RowSpan="3" HorizontalAlignment="Right"
Background="{StaticResource Border.Brush}"/>
<Border Height="1" Background="{StaticResource Border.Brush}"
VerticalAlignment="Bottom"/>
<Border Height="1" Background="{StaticResource Border.Brush}"
VerticalAlignment="Bottom" Grid.Row="1"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<Border Grid.ColumnSpan="2" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
<Border HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<c:BButton Content="提交订单" Width="80" HorizontalAlignment="Right" Grid.Row="2"
Command="{Binding SaveCommand}" Margin="0,0,5,0"/>
</Grid>
</c:BWindow>

44
BBWY.Client/Views/BatchPurchase/PackSkuConfigWindow.xaml.cs

@ -0,0 +1,44 @@
using BBWY.Client.Models.QiKu;
using BBWY.Client.ViewModels;
using BBWY.Controls;
using System.Collections.Generic;
namespace BBWY.Client.Views.BatchPurchase
{
/// <summary>
/// PackSkuConfigWindow.xaml 的交互逻辑
/// </summary>
public partial class PackSkuConfigWindow : BWindow
{
private PackSkuSplitConfigViewModel vm;
public PackSkuConfigWindow(IList<PackSkuConfig> list)
{
InitializeComponent();
vm = this.DataContext as PackSkuSplitConfigViewModel;
vm.SetData(list);
this.Loaded += PackSkuConfigWindow_Loaded;
this.Unloaded += PackSkuConfigWindow_Unloaded;
}
private void PackSkuConfigWindow_Unloaded(object sender, System.Windows.RoutedEventArgs e)
{
GalaSoft.MvvmLight.Messaging.Messenger.Default.Unregister(this);
}
private void PackSkuConfigWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
GalaSoft.MvvmLight.Messaging.Messenger.Default.Register<bool>(this, "PackSkuConfigWindowClose", (r) =>
{
this.DialogResult = r;
this.Close();
});
}
public IList<PackSkuConfig> GetPackSkuConfigList()
{
return vm.GetPackSkuConfigList();
}
}
}

50
BBWY.Client/Views/BatchPurchase/PackSkuSplitCountAndStoreWindow.xaml

@ -0,0 +1,50 @@
<c:BWindow x:Class="BBWY.Client.Views.BatchPurchase.PackSkuSplitCountAndStoreWindow"
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.BatchPurchase"
mc:Ignorable="d"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
Title="PackSkuSplitCountAndStoreWindow" Height="160" Width="250"
Style="{StaticResource bwstyle}"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="5"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"
Background="{StaticResource Border.Background}"
Grid.ColumnSpan="2">
<TextBlock Text="装箱设置" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<TextBlock Text="件数:" HorizontalAlignment="Right" VerticalAlignment="Center"
Grid.Row="2"/>
<c:BTextBox x:Name="txtQuantity" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center"
Margin="5,0,10,0"/>
<TextBlock Text="落仓去向:" HorizontalAlignment="Right" VerticalAlignment="Center"
Grid.Row="3"/>
<ComboBox x:Name="cbx_stroeList" Grid.Row="3" Grid.Column="1" Height="30"
Margin="5,0,10,0"
DisplayMemberPath="Name"
VerticalContentAlignment="Center"/>
<c:BButton x:Name="btn_save" Content="保存" Width="80" HorizontalAlignment="Right" Grid.Row="4"
Margin="0,0,5,0" Click="btn_save_Click"
Grid.Column="1"/>
</Grid>
</c:BWindow>

64
BBWY.Client/Views/BatchPurchase/PackSkuSplitCountAndStoreWindow.xaml.cs

@ -0,0 +1,64 @@
using BBWY.Client.Models;
using BBWY.Controls;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
namespace BBWY.Client.Views.BatchPurchase
{
/// <summary>
/// PackSkuSplitCountAndStoreWindow.xaml 的交互逻辑
/// </summary>
public partial class PackSkuSplitCountAndStoreWindow : BWindow
{
public int Quantity { get; set; }
public StoreResponse Store { get; set; }
private IList<StoreResponse> storeList;
public PackSkuSplitCountAndStoreWindow(int quantity, StoreResponse store, IList<StoreResponse> storeList)
{
InitializeComponent();
this.Quantity = quantity;
this.Store = store;
this.storeList = storeList;
this.Loaded += PackSkuSplitCountAndStoreWindow_Loaded;
}
private void PackSkuSplitCountAndStoreWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
this.txtQuantity.Text = Quantity.ToString();
this.cbx_stroeList.ItemsSource = storeList;
if (Store != null)
this.cbx_stroeList.SelectedItem = storeList.FirstOrDefault(s => s.Id == Store.Id);
else
this.cbx_stroeList.SelectedItem = storeList.FirstOrDefault();
}
private void btn_save_Click(object sender, System.Windows.RoutedEventArgs e)
{
if (!int.TryParse(txtQuantity.Text, out int q))
{
MessageBox.Show("件数不正确", "提示");
return;
}
if (q <= 0)
{
MessageBox.Show("件数不正确", "提示");
return;
}
if (cbx_stroeList.SelectedItem == null)
{
MessageBox.Show("请选择一个仓库", "提示");
return;
}
this.Quantity = q;
this.Store = cbx_stroeList.SelectedItem as StoreResponse;
this.DialogResult = true;
this.Close();
}
}
}
Loading…
Cancel
Save