52 changed files with 2526 additions and 651 deletions
@ -1,49 +0,0 @@ |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Common.Http; |
|||
using BBWY.Common.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Net.Http; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.APIServices |
|||
{ |
|||
public class PackServiceService : BaseApiService,IDenpendency |
|||
{ |
|||
public PackServiceService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
|
|||
public ApiResponse<PackServiceDTO[]> SearchAll() |
|||
{ |
|||
return SendRequest<PackServiceDTO[]>(globalContext.QKApiHost, "api/PackService/SearchAll", |
|||
null |
|||
, null, HttpMethod.Get); |
|||
} |
|||
|
|||
public ApiResponse<object> Add(PackServiceDTO consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/PackService/Add", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
public ApiResponse<object> Edit(PackServiceDTO consumable) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/PackService/Edit", |
|||
consumable |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
|
|||
public ApiResponse<object> Deleted(long id) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, "api/PackService/Deleted", |
|||
new |
|||
{ |
|||
id = id |
|||
} |
|||
, null, HttpMethod.Get); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,62 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.APIModel.Response.PackTask; |
|||
using BBWY.Common.Http; |
|||
using BBWY.Common.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Net.Http; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.APIServices.QiKu |
|||
{ |
|||
public class PackTaskAbortService : BaseApiService, IDenpendency |
|||
{ |
|||
public PackTaskAbortService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
|||
{ |
|||
} |
|||
|
|||
|
|||
|
|||
public ApiResponse<object> AbortPackTask(long TaskId, int TaskExceptionType, string RemarkMsg, TaskState AbortTaskState, string ShelvesNumber, int? FloorNumber) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, $"api/PackTaskAbort/AbortPackTask?taskId={TaskId}", |
|||
new |
|||
{ |
|||
TaskId, |
|||
TaskExceptionType, |
|||
RemarkMsg, |
|||
UserName = globalContext.User.Name, |
|||
AbortTaskState, |
|||
ShelvesNumber, |
|||
FloorNumber |
|||
} |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<object> DisposedPackTask(long TaskId) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, $"api/PackTaskAbort/DisposedPackTask?taskId={TaskId}", |
|||
new { |
|||
TaskId, |
|||
UserName = globalContext.User.Name |
|||
|
|||
} |
|||
, null, HttpMethod.Post); |
|||
} |
|||
|
|||
public ApiResponse<object> UpdateAbortPackTask(long TaskId, TaskState TaskState, string ShelvesNumber,int? FloorNumber) |
|||
{ |
|||
return SendRequest<object>(globalContext.QKApiHost, $"api/PackTaskAbort/UpdateAbortPackTask", |
|||
new |
|||
{ |
|||
TaskId, |
|||
TaskState, |
|||
ShelvesNumber, |
|||
FloorNumber, |
|||
UserName = globalContext.User.Name |
|||
|
|||
} |
|||
, null, HttpMethod.Post); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Globalization; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows.Data; |
|||
|
|||
namespace BBWY.Client.Converters |
|||
{ |
|||
public class MultiStateConverter : IMultiValueConverter |
|||
{ |
|||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) |
|||
{ |
|||
|
|||
var param = parameter?.ToString(); |
|||
|
|||
var parms = param.Split(":"); |
|||
|
|||
|
|||
if (values == null||values.Count()<2) return null; |
|||
|
|||
string taskState = values[0]?.ToString(); |
|||
string exceptState = values[1]?.ToString(); |
|||
|
|||
|
|||
if (taskState != param) |
|||
{ |
|||
return taskState ; |
|||
} |
|||
else |
|||
{ |
|||
return exceptState; |
|||
} |
|||
} |
|||
|
|||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel |
|||
{ |
|||
public class TaskAbortEnumResponse |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 货架列表
|
|||
/// </summary>
|
|||
public List<string> ShelvesNumberList { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 层数列表
|
|||
/// </summary>
|
|||
public List<int> FloorNumberList { get; set; } |
|||
|
|||
///// <summary>
|
|||
///// 异常类型列表
|
|||
///// </summary>
|
|||
//public List<EnumModel> TaskExceptionTypeList { get; set; }
|
|||
/// <summary>
|
|||
/// 是否能包装类型
|
|||
/// </summary>
|
|||
public List<IsContinuePackageModel> IsCanPackModelList { get; set; } |
|||
} |
|||
|
|||
public class IsContinuePackageModel |
|||
{ |
|||
/// <summary>
|
|||
/// 可继续包装类型
|
|||
/// </summary>
|
|||
public string Name { get; set; } |
|||
/// <summary>
|
|||
/// 索引
|
|||
/// </summary>
|
|||
public int Index { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 异常类型列表
|
|||
/// </summary>
|
|||
public List<EnumModel> TaskExceptionTypeList { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
public class EnumModel |
|||
{ |
|||
public string Name { get; set; } |
|||
public int Index { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,119 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.QualityTask.AddExceptionWindow" |
|||
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.QualityTask" |
|||
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="360" ResizeMode="NoResize" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<Window.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> |
|||
</Window.Resources> |
|||
<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="20 20 20 20"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="60"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Grid Grid.Row="0" Height="30" Margin="0"> |
|||
<Rectangle HorizontalAlignment="Stretch" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<Grid Height="30" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="70"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Label HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="Transparent" Content="能否打包"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<Grid Grid.Column="1"> |
|||
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1" HorizontalAlignment="Stretch"/> |
|||
<ComboBox Height="30" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ItemsSource="{Binding IsContinuePackageList}" DisplayMemberPath="Name" SelectedValuePath="Index" SelectedValue="{Binding IsContinuePackage}" BorderThickness="0" Margin="1" > |
|||
<ComboBox.Resources> |
|||
|
|||
</ComboBox.Resources> |
|||
</ComboBox> |
|||
|
|||
</Grid> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Height="30" Margin="0"> |
|||
<Rectangle HorizontalAlignment="Stretch" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<Grid Height="30" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="70"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Label HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="Transparent" Content="异常类型"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<Grid Grid.Column="1"> |
|||
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1" HorizontalAlignment="Stretch"/> |
|||
<ComboBox Height="30" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ItemsSource="{Binding TaskExceptionTypeList}" DisplayMemberPath="Name" SelectedValuePath="Index" SelectedValue="{Binding TaskExceptionType}" BorderThickness="0" Margin="1" > |
|||
<ComboBox.Resources> |
|||
|
|||
</ComboBox.Resources> |
|||
</ComboBox> |
|||
|
|||
</Grid> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0 10 0 10"> |
|||
<TextBlock Text="摆放货架:" Style="{StaticResource middleTextBlock}" Foreground="Red"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" CornerRadius="1" Height="30"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Label Content="货架编号" BorderThickness="0 0 0 0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="70"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left"/> |
|||
<ComboBox Height="30" HorizontalAlignment="Stretch" ItemsSource="{Binding ShelvesNumberList}" Text="{Binding ShelvesNumber}" BorderThickness="0" Margin="1" /> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" CornerRadius="1" Height="30" Margin="10 0 0 0"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Label Content="货架层数" BorderThickness="0 0 0 0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="70"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left"/> |
|||
<ComboBox Height="30" HorizontalAlignment="Stretch" ItemsSource="{Binding FloorNumberList}" Text="{Binding FloorNumber}" BorderThickness="0" Margin="1" /> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
</StackPanel> |
|||
|
|||
|
|||
<Grid Grid.Row="3"> |
|||
<c:BTextBox Text="{Binding RemarkMsg}" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" WaterRemark="备注消息" VerticalAlignment="Top" MinHeight="100" TextWrapping="Wrap" AcceptsReturn="True" /> |
|||
</Grid> |
|||
|
|||
|
|||
</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> |
@ -0,0 +1,183 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.APIServices.QiKu; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.APIModel; |
|||
using BBWY.Controls; |
|||
using EnumsNET; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
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; |
|||
using WebSocketSharp; |
|||
|
|||
namespace BBWY.Client.Views.QualityTask |
|||
{ |
|||
/// <summary>
|
|||
/// AddExceptionWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class AddExceptionWindow : BWindow |
|||
{ |
|||
public AddExceptionWindow(PackTaskAbortService packTaskAbortService, long taskId, TaskState abortTaskState, Action taskAbort, List<IsContinuePackageModel> IsCanPackModelList, List<string> shelvesNumberList, List<int> floorNumberList) |
|||
{ |
|||
InitializeComponent(); |
|||
this.packTaskAbortService = packTaskAbortService; |
|||
this.TaskId = taskId; |
|||
this.DataContext = this; |
|||
AbortTaskState = abortTaskState; |
|||
TaskAbort = taskAbort; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
this.IsCanPackModelList = IsCanPackModelList; |
|||
ShelvesNumberList = shelvesNumberList; |
|||
FloorNumberList = floorNumberList; |
|||
|
|||
|
|||
|
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
IsContinuePackageList = IsCanPackModelList.Select(c => new EnumModel { Index = c.Index, Name = c.Name }).ToList(); |
|||
if (IsCanPackModelList.Any()) |
|||
IsContinuePackage = IsContinuePackageList.First().Index; |
|||
}); |
|||
|
|||
} |
|||
|
|||
private int isContinuePackage; |
|||
/// <summary>
|
|||
/// 验收异常类型
|
|||
/// </summary>
|
|||
public int IsContinuePackage |
|||
{ |
|||
get => isContinuePackage; set |
|||
{ |
|||
Set(ref isContinuePackage, value); |
|||
OnIsContinuePackageChanged(); |
|||
} |
|||
} |
|||
public void OnIsContinuePackageChanged() |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
TaskExceptionTypeList = IsCanPackModelList.SingleOrDefault(cp => cp.Index == IsContinuePackage)?.TaskExceptionTypeList; |
|||
}); |
|||
} |
|||
|
|||
|
|||
private List<EnumModel> isContinuePackageList; |
|||
/// <summary>
|
|||
/// 是否可继续包装
|
|||
/// </summary>
|
|||
public List<EnumModel> IsContinuePackageList { get => isContinuePackageList; set { Set(ref isContinuePackageList, value); } } |
|||
|
|||
List<IsContinuePackageModel> IsCanPackModelList { get; set; } |
|||
|
|||
|
|||
Action TaskAbort { get; set; } |
|||
/// <summary>
|
|||
/// 任务挂起类型
|
|||
/// </summary>
|
|||
public TaskState AbortTaskState { get; set; } |
|||
|
|||
|
|||
PackTaskAbortService packTaskAbortService; |
|||
|
|||
|
|||
private long taskId; |
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get => taskId; set { Set(ref taskId, value); } } |
|||
|
|||
|
|||
private int? taskExceptionType; |
|||
/// <summary>
|
|||
/// 验收异常类型
|
|||
/// </summary>
|
|||
public int? TaskExceptionType { get => taskExceptionType; set { Set(ref taskExceptionType, value); } } |
|||
|
|||
|
|||
private List<EnumModel> taskExceptionTypeList; |
|||
/// <summary>
|
|||
/// 验收异常类型
|
|||
/// </summary>
|
|||
public List<EnumModel> TaskExceptionTypeList { get => taskExceptionTypeList; set { Set(ref taskExceptionTypeList, value); } } |
|||
|
|||
|
|||
private string remarkMsg; |
|||
/// <summary>
|
|||
/// 备注消息
|
|||
/// </summary>
|
|||
public string RemarkMsg { get => remarkMsg; set { Set(ref remarkMsg, value); } } |
|||
|
|||
|
|||
|
|||
private List<int> floorNumberList = new List<int> { 1, 2, 3, 4 }; |
|||
/// <summary>
|
|||
/// 层数列表
|
|||
/// </summary>
|
|||
public List<int> FloorNumberList { get => floorNumberList; set { Set(ref floorNumberList, value); } } |
|||
|
|||
private int floorNumber; |
|||
/// <summary>
|
|||
///层数
|
|||
/// </summary>
|
|||
public int FloorNumber { get => floorNumber; set { Set(ref floorNumber, value); } } |
|||
|
|||
|
|||
private List<string> shelvesNumberList; |
|||
/// <summary>
|
|||
/// 货架列表
|
|||
/// </summary>
|
|||
public List<string> ShelvesNumberList { get => shelvesNumberList; set { Set(ref shelvesNumberList, value); } } |
|||
|
|||
private string shelvesNumber; |
|||
/// <summary>
|
|||
/// 货架
|
|||
/// </summary>
|
|||
public string ShelvesNumber { get => shelvesNumber; set { Set(ref shelvesNumber, value); } } |
|||
|
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (ShelvesNumber.IsNullOrEmpty()|| FloorNumber<=0) |
|||
{ |
|||
MessageBox.Show("请输入摆放货架位置"); |
|||
return; |
|||
} |
|||
|
|||
if (RemarkMsg.IsNullOrEmpty()) |
|||
{ |
|||
MessageBox.Show("请输入具体问题描述."); |
|||
return; |
|||
} |
|||
|
|||
if (TaskExceptionType==null) |
|||
{ |
|||
MessageBox.Show("请选择异常类型."); |
|||
return; |
|||
} |
|||
|
|||
var res = packTaskAbortService.AbortPackTask(TaskId, TaskExceptionType.Value, RemarkMsg, AbortTaskState, ShelvesNumber, FloorNumber); |
|||
if (res == null || !res.Success) |
|||
{ |
|||
MessageBox.Show(res?.Msg); |
|||
return; |
|||
} |
|||
TaskAbort?.Invoke(); |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.PackTaskAbort.UpdateShelvesNumberWindow" |
|||
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" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
Height="219" Width="378" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<Window.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> |
|||
</Window.Resources> |
|||
|
|||
<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"> |
|||
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0 10 0 10" HorizontalAlignment="Center"> |
|||
<TextBlock Text="摆放货架:" Style="{StaticResource middleTextBlock}"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" CornerRadius="1" Height="30"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Label Content="货架编号" BorderThickness="0 0 0 0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="70"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left"/> |
|||
<ComboBox Height="30" HorizontalAlignment="Stretch" ItemsSource="{Binding ShelvesNumberList}" Text="{Binding ShelvesNumber}" BorderThickness="0" Margin="1" /> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1" CornerRadius="1" Height="30" Margin="10 0 0 0"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<Label Content="货架层数" BorderThickness="0 0 0 0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="70"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left"/> |
|||
<ComboBox Height="30" HorizontalAlignment="Stretch" ItemsSource="{Binding FloorNumberList}" Text="{Binding FloorNumber}" BorderThickness="0" Margin="1" /> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/> |
|||
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="提交" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" Click="BButton_Click" |
|||
/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,82 @@ |
|||
using BBWY.Client.APIServices.QiKu; |
|||
using BBWY.Client.Models; |
|||
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.PackTaskAbort |
|||
{ |
|||
/// <summary>
|
|||
/// UpdateShelvesNumberWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class UpdateShelvesNumberWindow : BWindow |
|||
{ |
|||
public UpdateShelvesNumberWindow(PackTaskAbortService packTaskAbortService, PackTaskModel model, Action taskAbort, List<string> shelvesNumberList, List<int> floorNumberList) |
|||
{ |
|||
InitializeComponent(); |
|||
this.model = model; |
|||
this.packTaskAbortService = packTaskAbortService; |
|||
this.taskAbort = taskAbort; |
|||
this.FloorNumberList = floorNumberList; |
|||
this.ShelvesNumberList = shelvesNumberList; |
|||
if (model != null) |
|||
{ |
|||
ShelvesNumber = model.ShelvesNumber; |
|||
FloorNumber = model.FloorNumber; |
|||
} |
|||
this.DataContext = this; |
|||
} |
|||
Action taskAbort { get; set; } |
|||
PackTaskAbortService packTaskAbortService { get; set; } |
|||
PackTaskModel model { get; set; } |
|||
|
|||
private List<int> floorNumberList = new List<int> { 1, 2, 3, 4 }; |
|||
/// <summary>
|
|||
/// 层数列表
|
|||
/// </summary>
|
|||
public List<int> FloorNumberList { get => floorNumberList; set { Set(ref floorNumberList, value); } } |
|||
|
|||
private int? floorNumber; |
|||
/// <summary>
|
|||
///层数
|
|||
/// </summary>
|
|||
public int? FloorNumber { get => floorNumber; set { Set(ref floorNumber, value); } } |
|||
|
|||
|
|||
private List<string> shelvesNumberList; |
|||
/// <summary>
|
|||
/// 货架列表
|
|||
/// </summary>
|
|||
public List<string> ShelvesNumberList { get => shelvesNumberList; set { Set(ref shelvesNumberList, value); } } |
|||
|
|||
private string shelvesNumber; |
|||
/// <summary>
|
|||
/// 货架
|
|||
/// </summary>
|
|||
public string ShelvesNumber { get => shelvesNumber; set { Set(ref shelvesNumber, value); } } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
|
|||
|
|||
|
|||
var res = packTaskAbortService.UpdateAbortPackTask(model.TaskId, model.TaskState, ShelvesNumber, FloorNumber); |
|||
if (res == null || !res.Success) |
|||
{ |
|||
MessageBox.Show(res?.Msg); |
|||
return ; |
|||
} |
|||
taskAbort?.Invoke(); |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,563 @@ |
|||
<UserControl x:Class="BBWY.Client.Views.PackagingTask.WaitPackingExceptionTaskControl" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:hc="https://handyorg.github.io/handycontrol" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:viewmodel="clr-namespace:BBWY.Client.ViewModels.PackTask" Background="White" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views.PackTask" |
|||
DataContext="{Binding WareHouseList,Source={StaticResource Locator}}" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="1500"> |
|||
<UserControl.Resources> |
|||
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="cmodel:StorageType"/> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
<ctr:OrderStorageTypeOptionConverter x:Key="ostConverter"/> |
|||
<ctr:ProfitRatioConverter x:Key="profitRatioConverter"/> |
|||
<ctr:WaybillNoConverter x:Key="waybillConverter"/> |
|||
<ctr:MultiParameterTransferConverter x:Key="mptConverter"/> |
|||
<ctr:SaleGrossProfitConverter x:Key="sgpcConverter"/> |
|||
</UserControl.Resources> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
|
|||
<RowDefinition Height="45"/> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Border Height="1" Grid.Row="0" Margin="0 0 0 0" Background="{StaticResource Border.Brush}" VerticalAlignment="Top"/> |
|||
<Grid Grid.Row="0" Margin="0 0 0 0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="300"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition MinWidth="280"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="140"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="任务时限" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="包装组合类型" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="包装配件" Grid.Column="4" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="摆放货架" Grid.Column="5" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="合格证、条形码" Grid.Column="6" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="包装员" Grid.Column="7" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="费用" Grid.Column="8" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="操作" Grid.Column="9" Style="{StaticResource middleTextBlock}"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
|||
</Grid> |
|||
<!--ItemsSource="{Binding OrderList}"--> |
|||
<ListBox x:Name="listbox_order" |
|||
Grid.Row="1" |
|||
ItemsSource="{Binding PackTaskList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<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"/> |
|||
</Grid.RowDefinitions> |
|||
<Grid Background="#F2F2F2" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="300"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition MinWidth="280"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="140"/> |
|||
</Grid.ColumnDefinitions> |
|||
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11"> |
|||
<TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" /> |
|||
<TextBlock Text="{Binding EndTime,StringFormat=yyyy-MM-dd HH:mm}" VerticalAlignment="Center" Margin="5,0,0,0"/> |
|||
<TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" /> |
|||
<c:BButton Content="{Binding TaskIdRemark}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding TaskIdRemark}" |
|||
Margin=" 5,0,7,0"/> |
|||
|
|||
<Label Width="90" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding TaskState}" |
|||
Foreground="White" Background="{Binding TaskState,Converter={StaticResource enumToColorConverter} , ConverterParameter={x:Type cmodel:TaskState} }" Margin="25,0,0,0" |
|||
|
|||
/> |
|||
<TextBlock VerticalAlignment="Center" Text="部门:" Margin="14,0,0,0" /> |
|||
<c:BButton Content="{Binding DepartmentName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding DepartmentName}" |
|||
Margin=" 5,0,0,0"/> |
|||
|
|||
<TextBlock VerticalAlignment="Center" Text="店铺:" Margin="14,0,0,0" /> |
|||
<c:BButton Content="{Binding ShopName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding ShopName}" |
|||
Margin=" 5,0,0,0"/> |
|||
<StackPanel Orientation="Horizontal" Visibility="{Binding OrderId, Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}"> |
|||
<TextBlock VerticalAlignment="Center" Text="对接人:" Margin="16,0,0,0" /> |
|||
<TextBlock VerticalAlignment="Center" Text="{Binding AcceptName}" Margin="5,0,0,0" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
<StackPanel Grid.Column="12" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" |
|||
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|待验收:Visible:Collapsed}" |
|||
> |
|||
<!-- --> |
|||
<c:BButton Command="{Binding UpdateTaskCommand}" Style="{StaticResource LinkButton}" Content="修改" /> |
|||
<!--<c:BButton Command="{Binding DataContext.DeletedTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}" CommandParameter="{Binding}" |
|||
Margin="5,0,0,0" Style="{StaticResource LinkButton}" Content="取消"/>--> |
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="300"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition MinWidth="280"/> |
|||
<ColumnDefinition Width="200"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="140"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid Width="{Binding ActualWidth,ElementName=listbox_orerSku}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition /> |
|||
<!--<ColumnDefinition />--> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<!--{Binding Logo}--> |
|||
<c:BAsyncImage UrlSource="{Binding ItemList[0].Logo}" |
|||
Width="80" DecodePixelWidth="80" |
|||
VerticalAlignment="Top" Margin="11,9,0,10" |
|||
Cursor="Hand"> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
|||
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"> |
|||
<b:InvokeCommandAction.CommandParameter> |
|||
<MultiBinding Converter="{StaticResource mptConverter}"> |
|||
<Binding Path="SkuId"/> |
|||
</MultiBinding> |
|||
</b:InvokeCommandAction.CommandParameter> |
|||
</b:InvokeCommandAction> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BAsyncImage> |
|||
|
|||
|
|||
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,12,0,10"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Center" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
Margin=" 5,0,0,11"/> |
|||
|
|||
</StackPanel> |
|||
<TextBlock Foreground="{StaticResource Text.Gray}" TextTrimming="CharacterEllipsis"> |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding SkuName}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
<TextBlock Foreground="{StaticResource Text.Gray}" TextWrapping="Wrap" Margin="0,11"> |
|||
<Run Text="品名:"/> |
|||
<Run Text="{Binding BrandName}"/> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
<!--<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="0,12,0,5"> |
|||
<TextBlock Foreground="{StaticResource Text.Gray}"> |
|||
<Run Text="货号:" /> |
|||
</TextBlock> |
|||
<c:BButton Content="{Binding GoodsNo}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Top" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|||
CommandParameter="{Binding GoodsNo}" |
|||
Margin=" 5,0,0,0"/> |
|||
</StackPanel>--> |
|||
</Grid> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="0"/> |
|||
<Grid Grid.Column="1" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<TextBlock x:Name="txt_storeName" |
|||
Text="{Binding SkuCount}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="2" > |
|||
|
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
> |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
Visibility="{Binding PackRemainTime,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
> |
|||
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
Visibility="{Binding IsPackOverTime,Converter={StaticResource objConverter},ConverterParameter=false:Visible:Collapsed}" |
|||
> |
|||
<TextBlock Text="剩余: " /> |
|||
<TextBlock Text="{Binding PackRemainTime}"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Vertical" Margin="10,5" VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
Visibility="{Binding IsPackOverTime,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"> |
|||
<StackPanel Orientation="Horizontal" |
|||
> |
|||
<TextBlock Foreground="Red" Text="超时: "/> |
|||
<TextBlock Foreground="Red" Text="{Binding PackRemainTime}"/> |
|||
</StackPanel> |
|||
|
|||
</StackPanel> |
|||
<c:BButton Margin="0 10 0 0" Content="{Binding QualityOverTimeMarkMsg ,Converter={StaticResource objConverter},ConverterParameter=#null:提交备注:修改备注}" Style="{StaticResource LinkButton}" |
|||
> |
|||
<b:Interaction.Triggers> |
|||
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
|||
<b:InvokeCommandAction Command="{Binding DataContext.SubmitOverTimeMarkMsgCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"> |
|||
<b:InvokeCommandAction.CommandParameter> |
|||
<MultiBinding Converter="{StaticResource mptConverter}"> |
|||
<Binding Path="TaskId"/> |
|||
<Binding Path="QualityOverTimeMarkMsg"/> |
|||
</MultiBinding> |
|||
</b:InvokeCommandAction.CommandParameter> |
|||
</b:InvokeCommandAction> |
|||
</b:EventTrigger> |
|||
</b:Interaction.Triggers> |
|||
</c:BButton> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" |
|||
Visibility="{Binding SendToSetSkuConfigureTime,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="待合格证信息补全"/> |
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
<Grid Grid.Column="3" > |
|||
<StackPanel VerticalAlignment="Center" > |
|||
|
|||
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock Text="组合类型:"/> |
|||
<TextBlock Text="{Binding PackType}"/> |
|||
</StackPanel> |
|||
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock Text="配件数量:"/> |
|||
<TextBlock Text="{Binding GoodsNumber}"/> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="4" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<TextBlock |
|||
Text="{Binding SkuTitle}" |
|||
TextWrapping="Wrap" |
|||
HorizontalAlignment="Center" |
|||
/> |
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
<Grid Grid.Column="5" > |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding ShelvesNumber}"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="号货架,"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding FloorNumber}"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="层"/> |
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="6" > |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock Text="条形码:"/> |
|||
<StackPanel Orientation="Horizontal" Visibility="{Binding BarCodeModel,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}"> |
|||
<c:BButton x:Name="btn_lookBarCode" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding LookBarCommand}" /> |
|||
|
|||
<c:BButton x:Name="btn_daCer" Content="打印" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding PrintBarcodeCommand}"/> |
|||
</StackPanel> |
|||
<TextBlock Text="未配置" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0" |
|||
Visibility="{Binding BarCodeModel,Converter={StaticResource objConverter}, ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
|
|||
|
|||
</StackPanel> |
|||
<StackPanel Margin="10,5" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" > |
|||
<TextBlock Text="合格证:"/> |
|||
<StackPanel Orientation="Horizontal" |
|||
Visibility="{Binding CertificateModel,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}" |
|||
> |
|||
|
|||
<StackPanel Orientation="Horizontal" |
|||
Visibility="{Binding CertificatePosition,Converter={StaticResource objConverter}, ConverterParameter=无需合格证:Collapsed:Visible}" |
|||
> |
|||
<c:BButton x:Name="btn_lookCer" Content="查看" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding LookCerCommand}"/> |
|||
|
|||
<c:BButton x:Name="btn_dayinCer" Content="打印" Style="{StaticResource LinkButton}" Margin="5,0,0,0" |
|||
Command="{Binding PrintCerCommand}"/> |
|||
|
|||
</StackPanel> |
|||
<TextBlock Text="无需合格证" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0" |
|||
Visibility="{Binding CertificatePosition,Converter={StaticResource objConverter}, ConverterParameter=无需合格证:Visible:Collapsed}" |
|||
/> |
|||
|
|||
</StackPanel> |
|||
<TextBlock Text="未配置" Style="{StaticResource middleTextBlock}" Margin="5,0,0,0" |
|||
Visibility="{Binding CertificateModel,Converter={StaticResource objConverter}, ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
|
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Column="7"> |
|||
<TextBlock Text="{Binding PackUser}" Style="{StaticResource middleTextBlock}"/> |
|||
</Grid> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="8" VerticalAlignment="Center"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}"> |
|||
<Run Text="人工:"/> |
|||
<Run Text="{Binding PackageFees,StringFormat=0.00}"/> |
|||
</TextBlock> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Margin="0 8 0 8"> |
|||
<Run Text="耗材:"/> |
|||
<Run Text="{Binding ConsumableFees,StringFormat=0.00}"/> |
|||
</TextBlock> |
|||
<TextBlock Style="{StaticResource middleTextBlock}"> |
|||
<Run Text="总计:"/> |
|||
<Run Text="{Binding PackTotalFees,StringFormat=0.00}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
|
|||
|
|||
<Grid Grid.Column="9" > |
|||
|
|||
|
|||
|
|||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
|
|||
|
|||
<c:BButton HorizontalAlignment="Center" Height="20" Style="{StaticResource LinkButton}" VerticalAlignment="Center" Grid.Row="1" |
|||
Content="修改设置 " |
|||
Command="{Binding SetServiceCommand}" |
|||
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=已取消|未到货|部分到货|待验收:Collapsed:Visible}" |
|||
/> |
|||
|
|||
<StackPanel |
|||
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待包装:Visible:Collapsed}" |
|||
> |
|||
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="完成" |
|||
CommandParameter="{Binding}" |
|||
Command="{Binding DataContext.CompletedPackTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" |
|||
Visibility="{Binding PackTotalFees,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible }" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="商品验收" |
|||
Command="{Binding DataContext.QualityTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" |
|||
CommandParameter="{Binding TaskId}" |
|||
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收:Visible:Collapsed}" |
|||
/> |
|||
|
|||
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="任务挂起" |
|||
Command="{Binding DataContext.PackagingTaskExceptionCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" CommandParameter="{Binding TaskId}" |
|||
Visibility="{Binding PackagingTaskExceptionState,Converter={StaticResource objConverter},ConverterParameter=待包装:Visible:Collapsed}" |
|||
/> |
|||
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="释放挂起" |
|||
Command="{Binding DataContext.DisposeTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" CommandParameter="{Binding TaskId}" |
|||
Visibility="{Binding PackagingTaskExceptionState,Converter={StaticResource objConverter},ConverterParameter=挂起任务:Visible:Collapsed}" |
|||
/> |
|||
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" VerticalAlignment="Center" Grid.Row="1" Content="任务拆分" |
|||
Command="{Binding DataContext.TaskSplitCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" CommandParameter="{Binding }" |
|||
Visibility="{Binding DataContext.PackagingTaskExceptionState,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}},Converter={StaticResource objConverter},ConverterParameter=挂起任务:Visible:Collapsed}" |
|||
/> |
|||
|
|||
<!--Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收:Visible:Collapsed}" --> |
|||
<!--<StackPanel > |
|||
<StackPanel.Visibility> |
|||
<MultiBinding Converter="{StaticResource mobjConverter}" |
|||
ConverterParameter="9;待验收:&:Visible:Collapsed:1"> |
|||
<Binding Path="ShopId"/> |
|||
<Binding Path="TaskState"/> |
|||
</MultiBinding> |
|||
</StackPanel.Visibility> |
|||
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="信息不全" |
|||
CommandParameter="{Binding }" |
|||
Command="{Binding DataContext.SendToSetSkuConfigureCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"> |
|||
<c:BButton.Visibility> |
|||
<MultiBinding Converter="{StaticResource mobjConverter}" |
|||
ConverterParameter=";:amp;:Visible:Collapsed:1"> |
|||
<Binding Path="BarCodeModel"/> |
|||
<Binding Path="CertificateModel"/> |
|||
</MultiBinding> |
|||
|
|||
</c:BButton.Visibility> |
|||
</c:BButton> |
|||
</StackPanel>--> |
|||
|
|||
|
|||
|
|||
<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}}}" |
|||
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Visible:Collapsed}" |
|||
/> |
|||
|
|||
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="{Binding ShowSendMsg,Converter={StaticResource objConverter},ConverterParameter=False:任务备注:取消备注}" |
|||
CommandParameter="{Binding TaskId}" |
|||
Command="{Binding DataContext.PackTaskMarkMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" |
|||
/> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
<Grid Grid.Row="1" Grid.ColumnSpan="4" Visibility="{Binding MarkMessageModelList,Converter={StaticResource objConverter}, ConverterParameter=#null:Collapsed:Visible}" Margin="10 0 0 0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="30"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BButton Margin="0" Panel.ZIndex="100" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.ColumnSpan="2" Background="Transparent" |
|||
Command="{Binding DataContext.ShowMoreMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" CommandParameter="{Binding TaskId}"/> |
|||
<c:BButton Margin="0" Content="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:∨:∧}" Style="{StaticResource LinkButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" |
|||
/> |
|||
<ListBox Grid.Column="1" x:Name="listbox_message" Grid.Row="2" Margin=" 0" SelectionMode="Single" IsEnabled="False" |
|||
ItemsSource="{Binding MarkMessageModelList}" Height="{Binding ShowMoreMsg,Converter={StaticResource objConverter},ConverterParameter=false:30:*}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0,0,0,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=listbox_message,Converter={StaticResource widthConverter},ConverterParameter=-0}" MinHeight="30"> |
|||
<DockPanel VerticalAlignment="Center"> |
|||
<TextBlock HorizontalAlignment="Left" Text="{Binding CreateTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/> |
|||
<TextBlock HorizontalAlignment="Left" Text=" "/> |
|||
<TextBlock HorizontalAlignment="Left" Text="{Binding UserName}"/> |
|||
<TextBlock HorizontalAlignment="Left" Text=" : "/> |
|||
<TextBlock HorizontalAlignment="Left" Text="{Binding MarkMessage}" Foreground="Red" TextWrapping="Wrap"/> |
|||
|
|||
</DockPanel> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
|
|||
<Border Width="1" Grid.Row="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|||
|
|||
|
|||
<TextBlock Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="6" |
|||
Visibility="{Binding QualityOverTimeMarkMsg,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5 5 0 5" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" > |
|||
<TextBlock.ToolTip> |
|||
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|||
<TextBlock Text="{Binding QualityOverTimeMarkMsg}"/> |
|||
</ToolTip> |
|||
</TextBlock.ToolTip> |
|||
<Run Text="超时原因:"/> |
|||
<Run Text="{Binding QualityOverTimeMarkMsg}" Foreground="Red" /> |
|||
</TextBlock> |
|||
|
|||
|
|||
|
|||
<Grid Grid.Row="3" Grid.ColumnSpan="100" MinHeight="40" Visibility="{Binding ShowSendMsg,Converter={StaticResource objConverter},ConverterParameter=false:Collapsed:Visible}"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="300"/> |
|||
<ColumnDefinition Width="90"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="120"/> |
|||
<ColumnDefinition Width="140"/> |
|||
<ColumnDefinition MinWidth="100"/> |
|||
<ColumnDefinition Width="100"/> |
|||
<ColumnDefinition Width="150"/> |
|||
<ColumnDefinition Width="120"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Height="1" VerticalAlignment="Top" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="100"/> |
|||
<c:BTextBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="9" Height="30" Margin="5 0 0 0" Text="{Binding TaskMarkMsg}" AcceptsReturn="True"/> |
|||
<c:BButton Grid.Column="10" Content="提交备注" Width="80" Command="{Binding DataContext.AppendMarkMessageCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}" |
|||
CommandParameter="{Binding TaskId}"/> |
|||
</Grid> |
|||
|
|||
|
|||
<Border Grid.Row="1" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="100"/> |
|||
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/>--> |
|||
<!--<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/>--> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="2" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="3" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="4" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="5" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="6" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="7" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="8" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="9" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="10" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="11" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="12" Margin="-1 0 0 0"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
|||
|
|||
</Grid> |
|||
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
</UserControl> |
|||
|
@ -0,0 +1,26 @@ |
|||
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.Navigation; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.PackagingTask |
|||
{ |
|||
/// <summary>
|
|||
/// WaitPackingExceptionTaskControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class WaitPackingExceptionTaskControl : UserControl |
|||
{ |
|||
public WaitPackingExceptionTaskControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -1,72 +0,0 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.QualityTask.AddExceptionWindow" |
|||
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.QualityTask" |
|||
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="20 20 20 20"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
|
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Grid Grid.Row="0" Height="30" Margin="0"> |
|||
<Rectangle HorizontalAlignment="Stretch" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<Grid Height="30" > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Label HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="异常类型:"/> |
|||
<Grid Grid.Column="1"> |
|||
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1" HorizontalAlignment="Stretch"/> |
|||
<ComboBox Height="30" HorizontalAlignment="Stretch" ItemsSource="{Binding TaskExceptionTypeList}" Text="{Binding TaskExceptionType}" 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> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
<Grid Grid.Row="1"> |
|||
<c:BTextBox Text="{Binding RemarkMsg}" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" WaterRemark="备注消息" VerticalAlignment="Stretch" Height="120" /> |
|||
</Grid> |
|||
|
|||
|
|||
</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> |
@ -1,94 +0,0 @@ |
|||
using BBWY.Client.APIServices.QiKu; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using EnumsNET; |
|||
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; |
|||
using WebSocketSharp; |
|||
|
|||
namespace BBWY.Client.Views.QualityTask |
|||
{ |
|||
/// <summary>
|
|||
/// AddExceptionWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class AddExceptionWindow : BWindow |
|||
{ |
|||
public AddExceptionWindow(QualityTaskService qualityTaskService, long taskId, TaskState abortTaskState, Action taskAbort) |
|||
{ |
|||
InitializeComponent(); |
|||
this.qualityTaskService = qualityTaskService; |
|||
this.TaskId = taskId; |
|||
this.DataContext = this; |
|||
AbortTaskState = abortTaskState; |
|||
TaskAbort = taskAbort; |
|||
} |
|||
|
|||
Action TaskAbort { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 任务挂起类型
|
|||
/// </summary>
|
|||
public TaskState AbortTaskState { get; set; } |
|||
|
|||
|
|||
QualityTaskService qualityTaskService; |
|||
|
|||
|
|||
private long taskId; |
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get=> taskId; set {Set(ref taskId,value); } } |
|||
|
|||
|
|||
private TaskExceptionType taskExceptionType; |
|||
/// <summary>
|
|||
/// 验收异常类型
|
|||
/// </summary>
|
|||
public TaskExceptionType TaskExceptionType { get => taskExceptionType; set { Set(ref taskExceptionType, value); } } |
|||
|
|||
|
|||
private List<TaskExceptionType> taskExceptionTypeList=new List<TaskExceptionType> { |
|||
TaskExceptionType.配件未到齐, TaskExceptionType.数量不对 |
|||
}; |
|||
/// <summary>
|
|||
/// 验收异常类型
|
|||
/// </summary>
|
|||
public List< TaskExceptionType> TaskExceptionTypeList { get => taskExceptionTypeList; set { Set(ref taskExceptionTypeList, value); } } |
|||
|
|||
|
|||
private string remarkMsg; |
|||
/// <summary>
|
|||
/// 备注消息
|
|||
/// </summary>
|
|||
public string RemarkMsg { get => remarkMsg; set { Set(ref remarkMsg, value); } } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
|
|||
if (RemarkMsg.IsNullOrEmpty()) |
|||
{ |
|||
MessageBox.Show("请输入具体问题描述."); |
|||
return; |
|||
} |
|||
|
|||
var res = qualityTaskService.QualityTaskException(TaskId, TaskExceptionType, RemarkMsg, AbortTaskState); |
|||
if (res==null||!res.Success) |
|||
{ |
|||
MessageBox.Show(res?.Msg); |
|||
return; |
|||
} |
|||
TaskAbort?.Invoke(); |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SplitTask.ExceptionTaskWindow" |
|||
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.SplitTask" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
mc:Ignorable="d" |
|||
CloseButtonVisibility="Visible" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonColor="White" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0" |
|||
Title="ExceptionTaskWindow" Height="567" Width="388"> |
|||
<Grid Visibility="Visible" > |
|||
<Grid x:Name="print_box" Height="492" Width="272"> |
|||
|
|||
<StackPanel Margin="10 10 10 10" Width="252" HorizontalAlignment="Center" Orientation="Vertical"> |
|||
<TextBlock FontSize="28" FontWeight="Bold"> |
|||
<Run Text="任务ID:"/> |
|||
|
|||
</TextBlock> |
|||
<TextBlock FontSize="60" FontWeight="Bold"> |
|||
|
|||
<Run Text="{Binding Model.TaskIdRemark}"/> |
|||
</TextBlock> |
|||
|
|||
<TextBlock FontSize="20" FontWeight="Bold" Margin="0 10 0 10"> |
|||
<Run Text="异常类型:"/> |
|||
<Run Text="{Binding Model.TaskExceptionType}"/> |
|||
</TextBlock > |
|||
<TextBlock FontSize="20" FontWeight="Bold"> |
|||
<Run Text="商品件数:"/> |
|||
<Run Text="{Binding Model.SkuCount}"/> |
|||
</TextBlock> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
|
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="摆放货号: "/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding Model.ShelvesNumber}"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="号货架,第"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding Model.FloorNumber}"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="层"/> |
|||
</StackPanel> |
|||
|
|||
<TextBlock TextWrapping="Wrap" > |
|||
<Run Text="备注信息:"/> |
|||
<Run Text="{Binding Model.AbortRemark}"/> |
|||
</TextBlock> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
|
|||
|
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,61 @@ |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Printing; |
|||
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.SplitTask |
|||
{ |
|||
/// <summary>
|
|||
/// ExceptionTaskWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class ExceptionTaskWindow : BWindow |
|||
{ |
|||
public ExceptionTaskWindow(PackTaskModel model) |
|||
{ |
|||
InitializeComponent(); |
|||
this.DataContext = this; |
|||
Model=model; |
|||
} |
|||
private PackTaskModel model; |
|||
|
|||
public PackTaskModel Model { get => model; set { Set(ref model, value); } } |
|||
|
|||
public string taskIdRemark; |
|||
public string TaskIdRemark { get=> taskIdRemark; set {Set(ref taskIdRemark,value); } } |
|||
|
|||
|
|||
public string remarkMsg; |
|||
public string RemarkMsg { get => remarkMsg; set { Set(ref remarkMsg, value); } } |
|||
|
|||
public string exceptType; |
|||
public string ExceptType { get => exceptType; set { Set(ref exceptType, value); } } |
|||
public void Print(string printName) |
|||
{ |
|||
|
|||
MyPrintHelper.SetDefaultPrint(printName);//设置默认打印机
|
|||
PrintDialog printDialog = new PrintDialog(); |
|||
//Height="492" Width="272" 567 388
|
|||
printDialog.PrintTicket.PageOrientation = PageOrientation.ReversePortrait;//设置为横向打印 PageOrientation.Landscape Portrait为纵向 //设置纸张大小
|
|||
var pageWidth = (int)Math.Ceiling(printDialog.PrintableAreaWidth); |
|||
var pageHeight = (int)Math.Ceiling(printDialog.PrintableAreaHeight); |
|||
printDialog.PrintTicket.PageMediaSize = new PageMediaSize(pageWidth, pageHeight); |
|||
print_box.Height = pageHeight; |
|||
print_box.Width = pageWidth; |
|||
this.print_box.Arrange(new Rect(new System.Windows.Point(0, 0), new System.Windows.Size(pageWidth, pageHeight))); |
|||
this.UpdateLayout(); //刷新界面
|
|||
printDialog.PrintVisual(this.print_box, "打印任务"); |
|||
this.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SplitTask.PrintExceptionTaskWindow" |
|||
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.SplitTask" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
Height="219" Width="378" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,5,5,0"> |
|||
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
|||
<Window.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> |
|||
</Window.Resources> |
|||
<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> |
|||
|
|||
<StackPanel Grid.Row="1" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="50 0 0 10"> |
|||
<TextBlock Margin="0 0 5 0" Style="{StaticResource middleTextBlock}" Text="打印机:"/> |
|||
|
|||
<Border BorderBrush="{StaticResource Border.Brush}" VerticalAlignment="Center" BorderThickness="1" Height="30" > |
|||
<ComboBox x:Name="cbPrints" BorderThickness="0" Height="25" Width="200" VerticalAlignment="Center" HorizontalAlignment="Left" ItemsSource="{Binding PrintList}" Text="{Binding PrintName}" /> |
|||
</Border> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="62 0 0 0"> |
|||
<TextBlock Margin="0 0 5 0" Style="{StaticResource middleTextBlock}" Text="份数:"/> |
|||
|
|||
<c:BTextBox Text="{Binding PrintCount}" Height="30" Width="200" /> |
|||
|
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
|
|||
<Border Grid.Row="2" Height="1" VerticalAlignment="Top" BorderBrush="{StaticResource Border.Background}" BorderThickness="1"/> |
|||
<c:BButton Background="{StaticResource Button.Background}" Grid.Row="2" Content="打印" HorizontalAlignment="Right" Width="100" VerticalAlignment="Stretch" Click="BButton_Click" |
|||
/> |
|||
</Grid> |
|||
</c:BWindow> |
|||
|
@ -0,0 +1,127 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.APIModel; |
|||
using BBWY.Client.Views.FallWare; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Drawing.Printing; |
|||
using System.IO; |
|||
using System.Printing; |
|||
using System.Reflection; |
|||
using System.Windows; |
|||
using WebSocketSharp; |
|||
|
|||
namespace BBWY.Client.Views.SplitTask |
|||
{ |
|||
/// <summary>
|
|||
/// PrintExceptionTaskWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class PrintExceptionTaskWindow : BWindow |
|||
{ |
|||
public PrintExceptionTaskWindow(PackTaskModel model) |
|||
{ |
|||
InitializeComponent(); |
|||
InitPrintList(); |
|||
this.DataContext = this; |
|||
this.model = model; |
|||
} |
|||
|
|||
private PackTaskModel model; |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 打印机列表
|
|||
/// </summary>
|
|||
public ObservableCollection<string> PrintList { get; set; } |
|||
public string PrintName { get; set; } |
|||
public int PrintCount { get=> printCount; set {Set(ref printCount,value); } } |
|||
private int printCount = 1; |
|||
|
|||
|
|||
public void InitPrintList() |
|||
{ |
|||
|
|||
PrintList = new ObservableCollection<string>(); |
|||
var printingNames = PrinterSettings.InstalledPrinters;//获取本机的打印机数据
|
|||
int index = -1; |
|||
int selectIndex = 0; |
|||
foreach (string name in printingNames) |
|||
{ |
|||
if (name == "Microsoft XPS Document Writer" || name == "Microsoft Print to PDF" || name == "Fax") |
|||
{ |
|||
continue; |
|||
} |
|||
index++; |
|||
if (name.Contains("Deli")) |
|||
{ |
|||
selectIndex = index; |
|||
} |
|||
PrintList.Add(name); |
|||
} |
|||
try |
|||
{ |
|||
var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); |
|||
string printNames = System.IO.Path.Combine(applicationPath, "printName.init"); |
|||
if (File.Exists(printNames)) |
|||
{ |
|||
PrintName = File.ReadAllText(printNames); |
|||
} |
|||
else |
|||
{ |
|||
if (PrintList.Count > 0) |
|||
{ |
|||
PrintName = PrintList[0].ToString(); |
|||
} |
|||
} |
|||
} |
|||
catch (Exception) |
|||
{ |
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
public void PrintBox() |
|||
{ |
|||
|
|||
App.Current.Dispatcher.Invoke(() => { |
|||
|
|||
|
|||
}); |
|||
} |
|||
|
|||
private void BButton_Click(object sender, System.Windows.RoutedEventArgs e) |
|||
{ |
|||
if (PrintName.IsNullOrEmpty()) |
|||
{ |
|||
MessageBox.Show("请选择打印设备"); |
|||
return; |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(PrintName)) |
|||
{ |
|||
return; |
|||
} |
|||
var localPrintServer = new LocalPrintServer(); |
|||
var printQueue = localPrintServer.GetPrintQueue(PrintName); |
|||
if (printQueue.IsInError) |
|||
{ |
|||
System.Windows.MessageBox.Show("打印机处于错误状态"); |
|||
return; |
|||
} |
|||
|
|||
ExceptionTaskWindow window = new ExceptionTaskWindow(model); |
|||
//window.ShowDialog();
|
|||
window.Print(PrintName); |
|||
|
|||
this.Close(); |
|||
|
|||
|
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue