Browse Source

合并

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
441cb79352
  1. 169
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  2. 2
      BBWY.Client/Views/QualityTask/WaitQualityControl.xaml
  3. 26
      BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml
  4. 83
      BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml
  5. 56
      BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml.cs
  6. 8
      BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml
  7. 12
      BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml.cs

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

@ -795,6 +795,8 @@ namespace BBWY.Client.ViewModels.PackTask
StoreGetBySelfCommand = new RelayCommand<long>(StoreGetBySelf); StoreGetBySelfCommand = new RelayCommand<long>(StoreGetBySelf);
QualityStoreGetBySelfCommand = new RelayCommand<long>(QualityStoreGetBySelf);
CompletedPackTaskCommand = new RelayCommand<object>(CompletedPackTask); CompletedPackTaskCommand = new RelayCommand<object>(CompletedPackTask);
SetWareTypeCommand = new RelayCommand<WareType>(s => SetWareTypeCommand = new RelayCommand<WareType>(s =>
@ -1162,7 +1164,6 @@ namespace BBWY.Client.ViewModels.PackTask
AddOneItemWeightWindow addOneItemWeightWindow = new AddOneItemWeightWindow(ReflashTask, packUserService, model.TaskId); AddOneItemWeightWindow addOneItemWeightWindow = new AddOneItemWeightWindow(ReflashTask, packUserService, model.TaskId);
addOneItemWeightWindow.ShowDialog(); addOneItemWeightWindow.ShowDialog();
} }
private void StoreGetBySelf(long taskId) private void StoreGetBySelf(long taskId)
{ {
@ -1196,7 +1197,40 @@ namespace BBWY.Client.ViewModels.PackTask
Task.Factory.StartNew(() => SearchTaskList()); Task.Factory.StartNew(() => SearchTaskList());
return true; return true;
}); },false);
sorePickProductWindow.ShowDialog();
}
private void QualityStoreGetBySelf(long taskId)
{
var data = packTaskService.GetStoreGetSelfData(taskId);
if (!data.Success)
{
MessageBox.Show(data?.Msg);
return;
}
StorePickProductWindow sorePickProductWindow = new StorePickProductWindow(data.Data, (count, UserName) =>
{
var res = packTaskService.StoreGetBySelfV2(taskId, count, UserName);
if (res == null)
{
return false;
}
if (!res.Success)
{
System.Windows.MessageBox.Show(res.Msg, "错误信息");
return false;
}
Task.Factory.StartNew(() => SearchTaskList());
return true;
},true);
sorePickProductWindow.ShowDialog(); sorePickProductWindow.ShowDialog();
@ -1319,6 +1353,137 @@ namespace BBWY.Client.ViewModels.PackTask
#region 事件绑定 #region 事件绑定
/// <summary>
/// 推送sku配置状态
/// </summary>
public ICommand SendToSetSkuConfigureCommand { get; set; }
/// <summary>
/// 提交超时原因
/// </summary>
public ICommand SubmitOverTimeMarkMsgCommand { get; set; }
/// <summary>
/// 查看揽收单
/// </summary>
public ICommand LookLSOrderConfigureCommand { get; set; }
/// <summary>
/// 打印揽收单
/// </summary>
public ICommand PrintLSOrderConfigureCommand { get; set; }
/// <summary>
/// 打印封箱明细
/// </summary>
public ICommand PrintSealBoxDetailsCommand { get; set; }
/// <summary>
/// 待完结 完成事件
/// </summary>
public ICommand CompeteWaitCompletedCommand { get; set; }
/// <summary>
/// 待转运 完成事件
/// </summary>
public ICommand CompeteWaitTransportCommand { get; set; }
/// <summary>
/// 设置仓库类型
/// </summary>
public ICommand SetWareTypeCommand { get; set; }
/// <summary>
/// 查看箱唛配置
/// </summary>
public ICommand LookBoxConfigureCommand { get; set; }
/// <summary>
/// 待配置 /已配置
/// </summary>
public ICommand SetSealBoxConfigureTypeCommand { get; set; }
public ICommand CompeteFallWareCommand { get; set; }
public ICommand CompeteSealBoxCommand { get; set; }
public ICommand CompletedPackTaskCommand { get; set; }
/// <summary>
/// 打开图片链接
/// </summary>
public ICommand OpenSkuDetailCommand { get; set; }
/// <summary>
/// 筛选数据
/// </summary>
public ICommand SetTaskStateCommand { get; set; }
/// <summary>
/// 修改任务状态
/// </summary>
public ICommand UpdateTaskStateCommand { get; set; }
/// <summary>
/// 搜索数据
/// </summary>
public ICommand SearchTaskCommand { get; set; }
/// <summary>
/// 创建任务
/// </summary>
public ICommand CreateTaskCommand { get; set; }
/// <summary>
/// 页面改变事件
/// </summary>
public ICommand TaskPageIndexChangedCommand { get; set; }
/// <summary>
/// 设置分箱数量
/// </summary>
public ICommand SetSealBoxCommand { get; set; }
/// <summary>
/// 打印封箱数据
/// </summary>
public ICommand PrintBoxConfigureCommand { get; set; }
/// <summary>
/// 删除任务
/// </summary>
public ICommand DeletedTaskCommand { get; set; }
/// <summary>
/// 商家自取
/// </summary>
public ICommand StoreGetBySelfCommand { get; set; }
/// <summary>
/// 商家自取(未验收)
/// </summary>
public ICommand QualityStoreGetBySelfCommand { get; set; }
/// <summary>
/// 加载事件(待封箱)
/// </summary>
public ICommand LoadSkuDataCommand { get; set; }
/// <summary>
/// 加载事件(封箱已配置)
/// </summary>
public ICommand LoadSealBoxSkuDataCommand { get; set; }
/// <summary>
/// 落仓
/// </summary>
public ICommand LoadFallWareSkuDataCommand { get; set; }
/// <summary>
/// 转运
/// </summary>
public ICommand LoadTransportSkuDataCommand { get; set; }
/// <summary> /// <summary>
/// 完成封箱 /// 完成封箱

2
BBWY.Client/Views/QualityTask/WaitQualityControl.xaml

@ -614,7 +614,7 @@
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="商家自取" <c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="商家自取"
CommandParameter="{Binding TaskId}" CommandParameter="{Binding TaskId}"
Command="{Binding DataContext.StoreGetBySelfCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}" Command="{Binding DataContext.StoreGetBySelfCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待排单|待包装:Visible:Collapsed}" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Visible:Collapsed}"
/> />

26
BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml

@ -38,16 +38,16 @@
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/> <ColumnDefinition Width="400"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/> <ColumnDefinition Width="80"/>
<ColumnDefinition MinWidth="80"/> <ColumnDefinition MinWidth="80"/>
<ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="操作" Grid.Column="2" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text=" " Grid.Column="2" Style="{StaticResource middleTextBlock}"/> <TextBlock Text=" " Grid.Column="3" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="操作" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="" Grid.Column="4" Style="{StaticResource middleTextBlock}"/>
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>--> <!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>-->
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> <Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/> <Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/>
@ -86,7 +86,7 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/> <ColumnDefinition Width="400"/>
<ColumnDefinition Width="80"/> <ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition MinWidth="80"/> <ColumnDefinition MinWidth="80"/>
<ColumnDefinition MaxWidth="100"/> <ColumnDefinition MaxWidth="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
@ -112,7 +112,7 @@
Command="{Binding DataContext.LoadSkuDataCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" Command="{Binding DataContext.LoadSkuDataCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding}" CommandParameter="{Binding}"
/> />
<Grid Grid.Column="3" Panel.ZIndex="-2"> <Grid Grid.Column="4" Panel.ZIndex="-2">
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding SealBoxSkus.Count,Converter={StaticResource objConverter},ConverterParameter=0:∧:∨}" FontWeight="Bold" <TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding SealBoxSkus.Count,Converter={StaticResource objConverter},ConverterParameter=0:∧:∨}" FontWeight="Bold"
Foreground="{StaticResource Text.Link.Color}" FontSize="18" Foreground="{StaticResource Text.Link.Color}" FontSize="18"
/> />
@ -125,12 +125,12 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/> <ColumnDefinition Width="400"/>
<ColumnDefinition Width="80"/> <ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition MinWidth="80"/> <ColumnDefinition MinWidth="80"/>
<ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding SealBoxSkus, IsAsync=True}" Grid.ColumnSpan="2" <ListBox x:Name="listbox_orerSku" ItemsSource="{Binding SealBoxSkus, IsAsync=True}" Grid.ColumnSpan="3"
Style="{StaticResource NoScrollViewListBoxStyle}" VirtualizingStackPanel.IsVirtualizing="True" Style="{StaticResource NoScrollViewListBoxStyle}" VirtualizingStackPanel.IsVirtualizing="True"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
> >
@ -141,6 +141,7 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/> <ColumnDefinition Width="400"/>
<ColumnDefinition Width="80"/> <ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Grid.Column="0"> <Grid Grid.Column="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -226,6 +227,13 @@
HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"
/> />
</Grid> </Grid>
<Grid Grid.Column="2" >
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="商家自取"
CommandParameter="{Binding TaskId}"
Command="{Binding DataContext.StoreGetBySelfCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
/>
</Grid>
</Grid> </Grid>
<Border Grid.Row="0" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> <Border Grid.Row="0" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
@ -236,7 +244,7 @@
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/> <Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/>
<Grid Grid.Column="2" > <Grid Grid.Column="2" >
</Grid> </Grid>
<Grid Grid.Column="3" > <Grid Grid.Column="3" >

83
BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml

@ -0,0 +1,83 @@
<c:BWindow x:Class="BBWY.Client.Views.StorePickSelf.QualityStorePickProductWindow"
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.StorePickSelf"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
WindowStartupLocation="CenterScreen"
CloseButtonVisibility="Visible"
xmlns:hc="https://handyorg.github.io/handycontrol"
CloseButtonColor="{StaticResource WindowButtonColor}"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
Width="384" Height="300" ResizeMode="NoResize"
RightButtonGroupMargin="0,5,5,0">
<!--CloseButtonColor="{StaticResource WindowButtonColor}" -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="39"/>
<RowDefinition/>
<RowDefinition Height="36"/>
</Grid.RowDefinitions>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"
Background="{StaticResource Button.Background}">
<TextBlock Text="商家自取" HorizontalAlignment="Left" Foreground="White" Margin="20 0 0 0" VerticalAlignment="Center"/>
</Border>
<Grid Grid.Row="1" Margin="50 20 50 20">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock Style="{StaticResource middleTextBlock}" Text="剩余数量:"/>
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding StoreGetSelfResponse.PickMaxCount}"/>
</StackPanel>
<Grid Grid.Row="1" Height="30">
<Rectangle Width="260" HorizontalAlignment="Left" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<StackPanel Orientation="Horizontal" Height="30" >
<Label HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="60" Content="取件人:"/>
<Grid Grid.Column="1" Grid.ColumnSpan="3">
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<ComboBox Height="30" Width="200" ItemsSource="{Binding StoreGetSelfResponse.DepartmentUsers}" DisplayMemberPath="UserName" Text="{Binding UserName}" BorderThickness="0" Margin="1" >
<ComboBox.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries >
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ComboBox.Resources>
</ComboBox>
</Grid>
</StackPanel>
</Grid>
<Grid Grid.Row="2" Height="30">
<Rectangle Width="260" HorizontalAlignment="Left" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<StackPanel Orientation="Horizontal" Height="30" >
<Label HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="60" Content="自取数量:"/>
<StackPanel Orientation="Horizontal">
<c:BTextBox Height="30" Width="150" Text="{Binding Count}" BorderThickness="1"/>
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" BorderThickness="0" Height="30" Width="50" Foreground="{StaticResource Border.Brush}" Click="BButton_Click_1"/>
</StackPanel>
</StackPanel>
</Grid>
<TextBlock VerticalAlignment="Center" Grid.Row="3" Text="{Binding StoreGetSelfResponse.ShowMessage}" Foreground="Orange"/>
</Grid>
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Row="2" VerticalAlignment="Top"/>
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click"
/>
</Grid>
</c:BWindow>

56
BBWY.Client/Views/StorePickSelf/QualityStorePickProductWindow.xaml.cs

@ -0,0 +1,56 @@
using BBWY.Client.Models.PackTask;
using BBWY.Controls;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace BBWY.Client.Views.StorePickSelf
{
/// <summary>
/// QualityStorePickProductWindow.xaml 的交互逻辑
/// </summary>
public partial class QualityStorePickProductWindow : BWindow
{
public QualityStorePickProductWindow(StoreGetSelfResponse model, Func<int, string, bool> SaveData)
{
InitializeComponent();
StoreGetSelfResponse = model;
InitializeComponent();
this.DataContext = this;
}
private string userName;
/// <summary>
/// 用户名
/// </summary>
public string UserName { get => userName; set { Set(ref userName, value); } }
private int count;
public int Count { get => count; set { Set(ref count, value); } }
private StoreGetSelfResponse storeGetSelfResponse;
public StoreGetSelfResponse StoreGetSelfResponse { get => storeGetSelfResponse; set { Set(ref storeGetSelfResponse, value); } }
private void BButton_Click(object sender, RoutedEventArgs e)
{
if (SaveData != null && SaveData.Invoke(Count, UserName))
{
this.Close();
}
}
private Func<int, string, bool> SaveData { get; set; }
private void BButton_Click_1(object sender, RoutedEventArgs e)
{
Count = StoreGetSelfResponse.PickMaxCount;
}
}
}

8
BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml

@ -22,8 +22,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" <Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"
Background="{StaticResource Border.Background}"> Background="{StaticResource Button.Background}">
<TextBlock Text="添加落仓" HorizontalAlignment="Center" VerticalAlignment="Center"/> <TextBlock Text="商家自取" HorizontalAlignment="Left" Foreground="White" Margin="20 0 0 0" VerticalAlignment="Center"/>
</Border> </Border>
<Grid Grid.Row="1" Margin="50 20 50 20"> <Grid Grid.Row="1" Margin="50 20 50 20">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -33,7 +33,9 @@
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal"> <StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock Style="{StaticResource middleTextBlock}" Text="剩余良品数量:"/> <TextBlock Style="{StaticResource middleTextBlock}" Text="剩余数量" />
<!--Text="{Binding IsQuality,Converter={StaticResource objConverter},ConverterParameter=True:剩余数量:剩余良品数量}"-->
<TextBlock Style="{StaticResource middleTextBlock}" Text=":"/>
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding StoreGetSelfResponse.PickMaxCount}"/> <TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding StoreGetSelfResponse.PickMaxCount}"/>
</StackPanel> </StackPanel>
<Grid Grid.Row="1" Height="30"> <Grid Grid.Row="1" Height="30">

12
BBWY.Client/Views/StorePickSelf/StorePickProductWindow.xaml.cs

@ -22,13 +22,23 @@ namespace BBWY.Client.Views.StorePickSelf
/// </summary> /// </summary>
public partial class StorePickProductWindow : BWindow public partial class StorePickProductWindow : BWindow
{ {
public StorePickProductWindow(StoreGetSelfResponse model, Func<int, string, bool> SaveData) public StorePickProductWindow(StoreGetSelfResponse model, Func<int, string, bool> SaveData,bool _isQuality)
{ {
this. SaveData=SaveData; this. SaveData=SaveData;
StoreGetSelfResponse =model; StoreGetSelfResponse =model;
InitializeComponent(); InitializeComponent();
this.DataContext = this; this.DataContext = this;
IsQuality = _isQuality;
} }
private bool isQuality;
public bool IsQuality { get => isQuality; set { Set(ref isQuality, value); } }
private string userName; private string userName;
/// <summary> /// <summary>
/// 用户名 /// 用户名

Loading…
Cancel
Save