Browse Source

封箱落仓店铺sku 折叠显示

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
b5192c6a4d
  1. 7
      BBWY.Client/Models/APIModel/Response/PackTask/SearchWaitFallWareResponse.cs
  2. 7
      BBWY.Client/Models/PackTask/SealBoxModel.cs
  3. 68
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  4. 18
      BBWY.Client/Views/FallWare/WaitFallWareControl.xaml
  5. 6
      BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml.cs
  6. 70
      BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml

7
BBWY.Client/Models/APIModel/Response/PackTask/SearchWaitFallWareResponse.cs

@ -116,7 +116,12 @@ namespace BBWY.Client.Models.APIModel
/// <summary>
/// 封箱sku列表
/// </summary>
public List<SealBoxSku> SealBoxSkus { get; set; }
private List<SealBoxSku> sealBoxSkus;
/// <summary>
/// 封箱sku列表
/// </summary>
public List<SealBoxSku> SealBoxSkus { get => sealBoxSkus; set { Set(ref sealBoxSkus, value); } }
/// <summary>
/// 封箱的箱子数量

7
BBWY.Client/Models/PackTask/SealBoxModel.cs

@ -44,7 +44,12 @@ namespace BBWY.Client.Models.PackTask
/// <summary>
/// 封箱sku列表
/// </summary>
public List<WareSealBoxSku> SealBoxSkus { get; set; }
private List<WareSealBoxSku> sealBoxSkus;
/// <summary>
/// 封箱sku列表
/// </summary>
public List<WareSealBoxSku> SealBoxSkus { get => sealBoxSkus; set { Set(ref sealBoxSkus, value); } }
/// <summary>
/// 封箱数

68
BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs

@ -318,6 +318,11 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary>
public ObservableCollection<WaitFallWareModel> WaitFallWareList { get => waitFallWareList; set { Set(ref waitFallWareList, value); } }
public IList<WaitFallWareModelResponse> WaitFallWareLists { get; set; }
private ObservableCollection<WareNoSealBoxModel> wareNoSealBoxModels;
/// <summary>
@ -340,6 +345,14 @@ namespace BBWY.Client.ViewModels.PackTask
/// 分箱列表(已配置)
/// </summary>
public ObservableCollection<SealBoxModel> WaitSealBoxModels { get => waitSealBoxModels; set { Set(ref waitSealBoxModels, value); } }
/// <summary>
/// 分箱列表(已配置)
/// </summary>
public List<WareSealBoxData> SealBoxModelList { get; set; }
private ObservableCollection<PackTaskModel> packTaskList;
/// <summary>
@ -643,8 +656,39 @@ namespace BBWY.Client.ViewModels.PackTask
SelectSku = "SKU";
SelectExpress = "物流单号";
LoadSkuDataCommand = new RelayCommand<WareNoSealBoxModel>(LoadSkuData);
LoadSealBoxSkuDataCommand = new RelayCommand<SealBoxModel>(LoadSealBoxSkuData);
LoadFallWareSkuDataCommand = new RelayCommand<WaitFallWareModel>(LoadFallWareSkuData);
}
private void LoadFallWareSkuData(WaitFallWareModel model)
{
if (model.SealBoxSkus == null || model.SealBoxSkus.Count <= 0)
{
var skuDatas = WaitFallWareLists.SingleOrDefault(w => w.SealBoxId == model.SealBoxId);
WaitFallWareList.SingleOrDefault(w => w.SealBoxId == model.SealBoxId).SealBoxSkus = skuDatas.SealBoxSkus;
}
else
{
WaitFallWareList.SingleOrDefault(w => w.SealBoxId == model.SealBoxId).SealBoxSkus = null;
}
}
private void LoadSealBoxSkuData( SealBoxModel model)
{
if (model.SealBoxSkus == null || model.SealBoxSkus.Count <= 0)
{
var skuDatas =SealBoxModelList.SingleOrDefault(w => w.SealBoxId == model.SealBoxId);
WaitSealBoxModels.SingleOrDefault(w => w.SealBoxId == model.SealBoxId).SealBoxSkus = skuDatas.SealBoxSkus;
}
else
{
WaitSealBoxModels.SingleOrDefault(w => w.SealBoxId == model.SealBoxId).SealBoxSkus = null;
}
}
private void LoadSkuData(WareNoSealBoxModel model)
{
@ -1152,10 +1196,20 @@ namespace BBWY.Client.ViewModels.PackTask
/// <summary>
/// 加载事件
/// 加载事件(待封箱)
/// </summary>
public ICommand LoadSkuDataCommand { get; set; }
/// <summary>
/// 加载事件(封箱已配置)
/// </summary>
public ICommand LoadSealBoxSkuDataCommand { get; set; }
/// <summary>
/// 落仓
/// </summary>
public ICommand LoadFallWareSkuDataCommand { get; set; }
/// <summary>
/// 完成封箱
/// </summary>
@ -1447,6 +1501,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
var dataModel = datas.Data;
OrderCount = dataModel.TotalCount;
WaitFallWareLists = dataModel.WaitFallWareList;
foreach (var item in dataModel.WaitFallWareList)
{
App.Current.Dispatcher.Invoke(new Action(() =>
@ -1455,7 +1510,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
AcceptUserNames = string.Join("|", item.AcceptUserNames),
DepartmentName = item.DepartmentName,
SealBoxSkus = item.SealBoxSkus,
SealBoxSkus =null,
ShopId = item.ShopId,
ShopName = item.ShopName,
WareId = item.WareId,
@ -1495,6 +1550,8 @@ namespace BBWY.Client.ViewModels.PackTask
{
var dataModel = datas.Data;
OrderCount = dataModel.TotalCount;
SealBoxModelList = dataModel.WaitSealBoxModels;
foreach (var item in dataModel.WaitSealBoxModels)
{
@ -1504,12 +1561,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
AcceptUserName = string.Join("|", item.AcceptUserNames),
DepartmentName = item.DepartmentName,
SealBoxSkus = item.SealBoxSkus.Select(s =>
{
s.Logo = s.Logo;
return s;
}).ToList(),
SealBoxSkus = null,
ShopId = item.ShopId,
ShopName = item.ShopName,
WareId = item.WareId,

18
BBWY.Client/Views/FallWare/WaitFallWareControl.xaml

@ -75,10 +75,10 @@
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}"
MinHeight="100">
>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition MinHeight="90"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Background="#F2F2F2" >
<Grid.ColumnDefinitions>
@ -118,9 +118,21 @@
<TextBlock VerticalAlignment="Center" Text="对接人:" Margin="16,0,0,0" />
<TextBlock VerticalAlignment="Center" Text="{Binding AcceptUserNames}" Margin="5,0,0,0" />
</StackPanel>
<c:BButton Grid.Column="0" Grid.ColumnSpan="5" Background="Transparent" HorizontalAlignment="Stretch" BorderThickness="0" Panel.ZIndex="-1"
Command="{Binding DataContext.LoadFallWareSkuDataCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding}"
/>
<Grid Grid.Column="5" Panel.ZIndex="-2">
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding SealBoxSkus,Converter={StaticResource objConverter},ConverterParameter=#null:∧:∨}" FontWeight="Bold"
Foreground="{StaticResource Text.Link.Color}" FontSize="18"
/>
</Grid>
<Grid Grid.Row="1">
</Grid>
<Grid Grid.Row="1"
Visibility="{Binding SealBoxSkus,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="80"/>

6
BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml.cs

@ -26,7 +26,11 @@ namespace BBWY.Client.Views.SealBox
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void listbox_order_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
//if (e.ExtentHeight - e.ViewportHeight - e.VerticalOffset < 100)

70
BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml

@ -77,10 +77,10 @@
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}"
MinHeight="100">
>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition MinHeight="90"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Background="#F2F2F2" >
<Grid.ColumnDefinitions>
@ -120,9 +120,19 @@
<TextBlock VerticalAlignment="Center" Text="对接人:" Margin="16,0,0,0" />
<TextBlock VerticalAlignment="Center" Text="{Binding AcceptUserName}" Margin="5,0,0,0" />
</StackPanel>
<c:BButton Grid.Column="0" Grid.ColumnSpan="6" Background="Transparent" HorizontalAlignment="Stretch" BorderThickness="0" Panel.ZIndex="-1"
Command="{Binding DataContext.LoadSealBoxSkuDataCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding}"
/>
<Grid Grid.Column="6" Panel.ZIndex="-2">
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding SealBoxSkus,Converter={StaticResource objConverter},ConverterParameter=#null:∧:∨}" FontWeight="Bold"
Foreground="{StaticResource Text.Link.Color}" FontSize="18"
/>
</Grid>
<Grid Grid.Row="1">
</Grid>
<Grid Grid.Row="1"
Visibility="{Binding SealBoxSkus,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="80"/>
@ -132,13 +142,21 @@
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding SealBoxSkus}"
Style="{StaticResource NoScrollViewListBoxStyle}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" >
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding SealBoxSkus}" Grid.ColumnSpan="2"
Style="{StaticResource NoScrollViewListBoxStyle}" VirtualizingStackPanel.IsVirtualizing="True"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid MinHeight="100" Width="{Binding ActualWidth,ElementName=listbox_orerSku}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition/>
@ -216,48 +234,30 @@
</StackPanel>
</Grid>
<Border Grid.Row="0" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/>
<ListBox x:Name="listbox_skuCount" ItemsSource="{Binding SealBoxSkus}"
Style="{StaticResource NoScrollViewListBoxStyle}" Grid.Column="1"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid MinHeight="100" Width="{Binding ActualWidth,ElementName=listbox_skuCount}">
<Grid>
<Grid Grid.Column="1" >
<TextBlock x:Name="txt_storeName"
Text="{Binding WareHourseSkuCount}"
TextWrapping="Wrap"
HorizontalAlignment="Center" VerticalAlignment="Center"
/>
</Grid>
<Border Grid.Row="0" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
<Border Grid.Row="0" VerticalAlignment="Bottom" Height="1" Grid.ColumnSpan="2" Background="{StaticResource Border.Brush}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/>
<Grid Grid.Column="2"
<Grid Grid.Column="2" >
>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding SealBoxCount}"/>
</StackPanel>
</Grid>
<Grid Grid.Column="3" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding SealBoxRemainTime,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"
@ -277,7 +277,6 @@
<TextBlock Foreground="Red" Text="超时: "/>
<TextBlock Foreground="Red" Text="{Binding SealBoxRemainTime}"/>
</StackPanel>
</StackPanel>
<c:BButton Margin="0 10 0 0" Content="{Binding SealBoxPackOverTimeMarkMsg ,Converter={StaticResource objConverter},ConverterParameter=#null:提交备注:修改备注}" Style="{StaticResource LinkButton}"
>
@ -299,7 +298,8 @@
</Grid>
<Grid Grid.Column="5" >
<Grid Grid.Column="5"
>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" VerticalAlignment="Center"

Loading…
Cancel
Save