47 changed files with 2048 additions and 379 deletions
@ -0,0 +1,39 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace BBWY.Client.Models.APIModel |
||||
|
{ |
||||
|
public class GetWareLSAcceptOrderResponse |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 客户名称
|
||||
|
/// </summary>
|
||||
|
public string CustomerName { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 提货地址
|
||||
|
/// </summary>
|
||||
|
public string AcceptAdress { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 客户联系人
|
||||
|
/// </summary>
|
||||
|
public string CustomerUserName { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 客户电话
|
||||
|
/// </summary>
|
||||
|
public string CustomerPhoneNumber { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 揽收任务号
|
||||
|
/// </summary>
|
||||
|
public string LSTaskNumber { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 始发TC
|
||||
|
/// </summary>
|
||||
|
public string StartTC { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// JD运输联系人
|
||||
|
/// </summary>
|
||||
|
public string JDTransportUserName { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace BBWY.Client.Models.APIModel |
||||
|
{ |
||||
|
public class GetWareLSOrderPurchaseResponse |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 总封箱数
|
||||
|
/// </summary>
|
||||
|
public int TotalSealBoxCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TC收货总箱数
|
||||
|
/// </summary>
|
||||
|
public int TotalTCAcceptBoxCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 采购单列表
|
||||
|
/// </summary>
|
||||
|
public IList<GetWareLSOrderPurchase> GetWareLSOrderPurchases { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class GetWareLSOrderPurchase |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 序号(1-10)
|
||||
|
/// </summary>
|
||||
|
public int Index { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 采购订单号
|
||||
|
/// </summary>
|
||||
|
public string PurchaseOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 封箱数
|
||||
|
/// </summary>
|
||||
|
public int? SealBoxCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 目的城市
|
||||
|
/// </summary>
|
||||
|
public string WareCity { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TC收货箱数
|
||||
|
/// </summary>
|
||||
|
public int? TCAcceptBoxCount { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 供应商
|
||||
|
/// </summary>
|
||||
|
public string ProviderName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 预约单号
|
||||
|
/// </summary>
|
||||
|
public string PrewOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 目的城市-仓库
|
||||
|
/// </summary>
|
||||
|
public string WareName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 商品数量
|
||||
|
/// </summary>
|
||||
|
public int ProductCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 商品名称
|
||||
|
/// </summary>
|
||||
|
public string ProductTitle { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
After Width: | Height: | Size: 8.0 KiB |
@ -0,0 +1,68 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.FallWare.PrintLSOrderWindow" |
||||
|
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.FallWare" |
||||
|
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="62 0 0 10"> |
||||
|
<TextBlock Margin="0 0 5 0" Style="{StaticResource middleTextBlock}" Text="份数:"/> |
||||
|
|
||||
|
<c:BTextBox Text="{Binding PrintCount}" Height="30" Width="200" /> |
||||
|
|
||||
|
</StackPanel> |
||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="50 0 0 0"> |
||||
|
<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> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<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,149 @@ |
|||||
|
using BBWY.Client.Models.APIModel; |
||||
|
using BBWY.Client.Models.PackTask; |
||||
|
using BBWY.Client.Views.SealBox; |
||||
|
using BBWY.Controls; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Collections.ObjectModel; |
||||
|
using System.Drawing.Printing; |
||||
|
using System.IO; |
||||
|
using System.Reflection; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
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.FallWare |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// PrintLSOrderWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class PrintLSOrderWindow : BWindow |
||||
|
{ |
||||
|
public PrintLSOrderWindow(List<GetWareLSOrderPurchase> getWareLSOrderPurchases, string prewOrder, GetWareLSAcceptOrderResponse getWareLSAcceptOrderResponse) |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
InitPrintList(); |
||||
|
|
||||
|
this.DataContext = this; |
||||
|
GetWareLSOrderPurchases = getWareLSOrderPurchases; |
||||
|
PrewOrder = prewOrder; |
||||
|
GetWareLSAcceptOrderResponse = getWareLSAcceptOrderResponse; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 打印机列表
|
||||
|
/// </summary>
|
||||
|
public ObservableCollection<string> PrintList { get; set; } |
||||
|
public string PrintName { get; set; } |
||||
|
public int PrintCount { get; set; } = 1; |
||||
|
public void InitPrintList() |
||||
|
{ |
||||
|
//TaskImage = MyPrintHelper.GetBarcodeImage(TaskId.ToString(), 300, 60);
|
||||
|
|
||||
|
//BarcodeImage = MyPrintHelper.GetBarcodeImage(SkuId, 300, 60);
|
||||
|
|
||||
|
|
||||
|
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) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 采购单列表
|
||||
|
/// </summary>
|
||||
|
public List<GetWareLSOrderPurchase> GetWareLSOrderPurchases { get; set; } |
||||
|
public string PrewOrder { get; set; } |
||||
|
public GetWareLSAcceptOrderResponse GetWareLSAcceptOrderResponse { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
private void BButton_Click(object sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
int limitIndex = 10;//单页限制数量
|
||||
|
|
||||
|
int totalPageIndex = GetWareLSOrderPurchases.Count % 10 == 0 ? GetWareLSOrderPurchases.Count / 10 : GetWareLSOrderPurchases.Count / 10 + 1; |
||||
|
|
||||
|
|
||||
|
Task.Factory.StartNew(() => |
||||
|
{ |
||||
|
|
||||
|
for (int i = 0; i < PrintCount; i++)//打印份数
|
||||
|
{ |
||||
|
int nowPageIndex = 0; |
||||
|
again: |
||||
|
nowPageIndex++; |
||||
|
if (GetWareLSOrderPurchases.Count > limitIndex) |
||||
|
{ |
||||
|
PrintBox(GetWareLSOrderPurchases.GetRange(0, limitIndex), nowPageIndex, totalPageIndex); |
||||
|
|
||||
|
GetWareLSOrderPurchases.RemoveRange(0, limitIndex); |
||||
|
goto again; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
PrintBox(GetWareLSOrderPurchases, nowPageIndex, totalPageIndex); |
||||
|
} |
||||
|
} |
||||
|
App.Current.Dispatcher.Invoke(() => { |
||||
|
this.Close(); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public void PrintBox(List<GetWareLSOrderPurchase> GetWareLSOrderPurchases, int nowPageIndex, int totalPageIndex) |
||||
|
{ |
||||
|
|
||||
|
App.Current.Dispatcher.Invoke(() => { |
||||
|
|
||||
|
WareLSAcceptOrderWindow lSAcceptOrderWindow = new WareLSAcceptOrderWindow(GetWareLSAcceptOrderResponse, GetWareLSOrderPurchases, nowPageIndex, totalPageIndex, PrewOrder); |
||||
|
//lSAcceptOrderWindow.Show();
|
||||
|
lSAcceptOrderWindow.PrintLSOrder(PrintName); |
||||
|
}); |
||||
|
|
||||
|
//SealBoxPolicyDetailsWindow policyDetailsWindow = new SealBoxPolicyDetailsWindow(sealBoxSkus, SealBoxModel.ShopName, SealBoxModel.WareName, SealBoxModel.SealBoxId);
|
||||
|
//policyDetailsWindow.PrintBox(PrintName);
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,317 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.FallWare.WareLSAcceptOrderWindow" |
||||
|
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.FallWare" |
||||
|
mc:Ignorable="d" |
||||
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
||||
|
Title="WareLSAcceptOrderWindow" Height="1123" Width="794" |
||||
|
WindowStartupLocation="CenterScreen" |
||||
|
CloseButtonVisibility="Visible" |
||||
|
CloseButtonColor="{StaticResource WindowButtonColor}" |
||||
|
MinButtonVisibility="Collapsed" |
||||
|
MaxButtonVisibility="Collapsed" |
||||
|
RightButtonGroupMargin="0,5,5,0" |
||||
|
|
||||
|
> |
||||
|
<c:BWindow.Resources> |
||||
|
<ResourceDictionary> |
||||
|
<Style x:Key="fontSize14" TargetType="TextBlock"> |
||||
|
<Setter Property="HorizontalAlignment" Value="Center"/> |
||||
|
<Setter Property="VerticalAlignment" Value="Center"/> |
||||
|
<Setter Property="FontSize" Value="14"/> |
||||
|
</Style> |
||||
|
</ResourceDictionary> |
||||
|
</c:BWindow.Resources> |
||||
|
<Grid> |
||||
|
|
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="39"/> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition Height="0"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
||||
|
Background="{StaticResource Border.Background}"> |
||||
|
<TextBlock Text="查看揽收单" FontSize="16" HorizontalAlignment="Left" Margin="10 0 0 0" VerticalAlignment="Center"/> |
||||
|
</Border> |
||||
|
<Grid Name="print_lsOrder" Grid.Row="1"> |
||||
|
<Grid Margin="20" > |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="50"/> |
||||
|
<RowDefinition Height="210"/> |
||||
|
<RowDefinition Height="510"/> |
||||
|
<RowDefinition/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition Width="200"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Grid Background="#c00000"> |
||||
|
<TextBlock Foreground="White" Text="到仓上门揽收交接单" FontSize="30" VerticalAlignment="Center" Margin="5 0 0 0"/> |
||||
|
</Grid> |
||||
|
<Image Source="/resources/images/jdwl.png" Stretch="Fill" Grid.Column="1"/> |
||||
|
</Grid> |
||||
|
<Grid Margin="0 10 0 10" Grid.Row="1" > |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition /> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="90"/> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition Width="100"/> |
||||
|
<ColumnDefinition Width="160"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Grid Background="#fce4d6" Grid.ColumnSpan="4"> |
||||
|
<TextBlock Text="1. 任务信息" VerticalAlignment="Center" FontSize="16" Margin="5"/> |
||||
|
</Grid> |
||||
|
|
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="0" Grid.ColumnSpan="4"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="1" Grid.ColumnSpan="4"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="2" Grid.ColumnSpan="4"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="3" Grid.ColumnSpan="4"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="4" Grid.ColumnSpan="4"/> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1" Grid.RowSpan="4" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="1" Grid.RowSpan="4" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="1" Grid.Row="1" Grid.RowSpan="4" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="1" Grid.RowSpan="4" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="3" Grid.Row="1" Grid.RowSpan="4" /> |
||||
|
<TextBlock Text="客户名称*" Grid.Row="1" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Text="{Binding GetWareLSAcceptOrderResponse.CustomerName}" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" FontSize="14"/> |
||||
|
|
||||
|
<TextBlock Text="提货地址" Grid.Row="2" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Text="{Binding GetWareLSAcceptOrderResponse.AcceptAdress}" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" FontSize="14"/> |
||||
|
|
||||
|
<TextBlock Text="客户联系人*" Grid.Row="3" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Text="{Binding GetWareLSAcceptOrderResponse.CustomerUserName}" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1" FontSize="14"/> |
||||
|
|
||||
|
<TextBlock Text="客户电话*" Grid.Row="4" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Text="{Binding GetWareLSAcceptOrderResponse.CustomerPhoneNumber}" VerticalAlignment="Center" Grid.Row="4" Grid.Column="1" FontSize="14"/> |
||||
|
|
||||
|
<TextBlock Text="预约单号*" Grid.Column="2" Grid.Row="1" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Text="{Binding PrewOrder}" Grid.Column="3" Grid.Row="1" Style="{StaticResource fontSize14}" /> |
||||
|
|
||||
|
<TextBlock Text="揽收任务号*" Grid.Row="2" Grid.Column="2" Style="{StaticResource fontSize14}"/> |
||||
|
<TextBlock Text="{Binding GetWareLSAcceptOrderResponse.LSTaskNumber}" Grid.Row="2" Grid.Column="3" VerticalAlignment="Center" FontSize="14"/> |
||||
|
|
||||
|
<TextBlock Text="始发TC**" Grid.Row="3" Grid.Column="2" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Text="{Binding GetWareLSAcceptOrderResponse.StartTC}" Grid.Row="3" Grid.Column="3" VerticalAlignment="Center" FontSize="14"/> |
||||
|
|
||||
|
|
||||
|
<TextBlock Text="JD运输联系人*" Grid.Row="4" Grid.Column="2" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Text="{Binding GetWareLSAcceptOrderResponse.JDTransportUserName}" VerticalAlignment="Center" Grid.Row="4" Grid.Column="3" FontSize="14"/> |
||||
|
</Grid> |
||||
|
|
||||
|
<Grid Grid.Row="2" Margin="0 0 0 10"> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="30"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="40"/> |
||||
|
<ColumnDefinition Width="140"/> |
||||
|
<ColumnDefinition Width="50"/> |
||||
|
<ColumnDefinition Width="75"/> |
||||
|
<ColumnDefinition Width="75"/> |
||||
|
<ColumnDefinition Width="75"/> |
||||
|
<ColumnDefinition Width="90"/> |
||||
|
<ColumnDefinition/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Top" Grid.Row="1" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="1" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="2" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="3" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="4" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="5" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="6" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="7" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="8" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="9" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="10" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="11" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="12" Grid.ColumnSpan="8"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Margin="0 0 0 3" Grid.Row="12" Grid.ColumnSpan="8"/> |
||||
|
|
||||
|
|
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="1" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="3" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="4" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="5" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="6" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="7" Grid.Row="1" Grid.RowSpan="11" /> |
||||
|
|
||||
|
|
||||
|
<Grid Background="#fce4d6" Grid.ColumnSpan="8"> |
||||
|
<TextBlock Text="2. 货物信息" VerticalAlignment="Center" FontSize="16" Margin="5"/> |
||||
|
</Grid> |
||||
|
<TextBlock Grid.Row="1" Text="序号" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="2" Text="1" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="3" Text="2" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="4" Text="3" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="5" Text="4" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="6" Text="5" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="7" Text="6" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="8" Text="7" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="9" Text="8" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="10" Text="9" Style="{StaticResource fontSize14}" /> |
||||
|
<TextBlock Grid.Row="11" Text="10" Style="{StaticResource fontSize14}" /> |
||||
|
|
||||
|
<TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource fontSize14}" Text="客户采购单号/JDV*"/> |
||||
|
<TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource fontSize14}" Text="箱数*"/> |
||||
|
<TextBlock Grid.Row="1" Grid.Column="3" Style="{StaticResource fontSize14}" Text="目的城市*"/> |
||||
|
<TextBlock Grid.Row="1" Grid.Column="4" Style="{StaticResource fontSize14}" Text="外箱标识*"/> |
||||
|
<TextBlock Grid.Row="1" Grid.Column="5" Style="{StaticResource fontSize14}" Text="提货说明*"/> |
||||
|
<TextBlock Grid.Row="1" Grid.Column="6" Style="{StaticResource fontSize14}" Text="TC收货箱数*"/> |
||||
|
<TextBlock Grid.Row="1" Grid.Column="7" Style="{StaticResource fontSize14}" Text="TC收货说明(外包装情况等)"/> |
||||
|
|
||||
|
|
||||
|
<TextBlock Grid.Row="12" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="14" > |
||||
|
<Run Text="提货总箱数*:"/> |
||||
|
|
||||
|
</TextBlock> |
||||
|
<TextBlock Grid.Row="12" Grid.Column="2" Style="{StaticResource fontSize14}" Text="{Binding TotalSealBoxCount}"/> |
||||
|
<TextBlock Grid.Row="12" Grid.Column="4" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="14" > |
||||
|
<Run Text="TC收货总箱数*:"/> |
||||
|
|
||||
|
</TextBlock> |
||||
|
<TextBlock Grid.Row="12" Grid.Column="6" Style="{StaticResource fontSize14}" Text="{Binding TotalSealBoxCount}"/> |
||||
|
<ListBox x:Name="listbox_order" |
||||
|
Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="7" Grid.RowSpan="10" |
||||
|
ItemsSource="{Binding GetWareLSOrderPurchases}" |
||||
|
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
||||
|
BorderBrush="{StaticResource Border.Brush}" |
||||
|
BorderThickness="0" |
||||
|
Foreground="{StaticResource Text.Color}"> |
||||
|
<ListBox.ItemTemplate> |
||||
|
<DataTemplate> |
||||
|
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}" |
||||
|
MinHeight="40"> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="140"/> |
||||
|
<ColumnDefinition Width="50"/> |
||||
|
<ColumnDefinition Width="75"/> |
||||
|
<ColumnDefinition Width="75"/> |
||||
|
<ColumnDefinition Width="75"/> |
||||
|
<ColumnDefinition Width="90"/> |
||||
|
<ColumnDefinition/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding PurchaseOrder}" Grid.Column="0"/> |
||||
|
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding SealBoxCount}" Grid.Column="1"/> |
||||
|
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WareCity}" Grid.Column="2"/> |
||||
|
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding TCAcceptBoxCount}" Grid.Column="5"/> |
||||
|
</Grid> |
||||
|
|
||||
|
</DataTemplate> |
||||
|
</ListBox.ItemTemplate> |
||||
|
</ListBox> |
||||
|
|
||||
|
|
||||
|
</Grid> |
||||
|
|
||||
|
<Grid Grid.Row="3" > |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition /> |
||||
|
<RowDefinition Height="30"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="350"/> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition Width="180"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
|
||||
|
|
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="1" Grid.ColumnSpan="4"/> |
||||
|
|
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="3" Grid.ColumnSpan="4"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="4" Grid.ColumnSpan="4"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="5" Grid.ColumnSpan="4"/> |
||||
|
<Border Height="1" Background="#c00000" VerticalAlignment="Bottom" Grid.Row="6" Grid.ColumnSpan="4"/> |
||||
|
|
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="6" Grid.RowSpan="1" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="2" Grid.RowSpan="3" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="1" Grid.Row="2" Grid.RowSpan="3" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="6" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="1" Grid.Row="6" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="2" Grid.RowSpan="3" /> |
||||
|
<Border Width="1" Background="#c00000" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="6" Grid.RowSpan="1" /> |
||||
|
|
||||
|
<Grid Background="#fce4d6" Grid.ColumnSpan="3"> |
||||
|
<TextBlock Text="1. 签字确认" VerticalAlignment="Center" FontSize="16" Margin="5"/> |
||||
|
</Grid> |
||||
|
<TextBlock Text="客户确认" FontWeight="Bold" Grid.Row="1" VerticalAlignment="Center" FontSize="16" Margin="5"/> |
||||
|
<TextBlock Text="揽收司机确认" FontWeight="Bold" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" FontSize="16" Margin="5"/> |
||||
|
<TextBlock Text="TC收货确认" FontWeight="Bold" Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" FontSize="16" Margin="5"/> |
||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="2" > |
||||
|
<Run Text="发货人签字*:"/> |
||||
|
<Run Text="{Binding GetWareLSAcceptOrderResponse.CustomerName}"/> |
||||
|
</TextBlock> |
||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="3" > |
||||
|
<Run Text="发货人电话:"/> |
||||
|
<Run Text="{Binding GetWareLSAcceptOrderResponse.CustomerPhoneNumber}"/> |
||||
|
</TextBlock> |
||||
|
<Grid Grid.Row="2" Grid.Column="1"> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="车牌号*:"/> |
||||
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Text="车型*:"/> |
||||
|
</Grid> |
||||
|
<TextBlock Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Text="司机签字*:"/> |
||||
|
<TextBlock Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="收货人签字*:"/> |
||||
|
<TextBlock Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="联系方式:"/> |
||||
|
<TextBlock Grid.Row="4" Text="签字日期时间*:" Margin="0 5 0 0"/> |
||||
|
<TextBlock Grid.Row="4" Text="签字日期时间*:" Margin="0 5 0 0" Grid.Column="2"/> |
||||
|
<TextBlock Grid.Row="5" Text="客户备注:" VerticalAlignment="Center"/> |
||||
|
<TextBlock Grid.Row="5" Text="司机备注:" VerticalAlignment="Center" Grid.Column="1"/> |
||||
|
<TextBlock Grid.Row="5" Text="TC备注:" VerticalAlignment="Center" Grid.Column="2"/> |
||||
|
<TextBlock Grid.Row="6" Text="确认以上采购单号及对应交接箱数、目的城市、对应外箱标识(如有)信息准确。" |
||||
|
FontSize="8" VerticalAlignment="Bottom"/> |
||||
|
<TextBlock Grid.Row="6" Text="确认以上采购单号、对应箱数与实际揽收货物相符。" |
||||
|
Grid.Column="1" FontSize="8" VerticalAlignment="Bottom"/> |
||||
|
<TextBlock Grid.Row="6" Text="确认以上采购单号、对应箱数与实收货物相符。" |
||||
|
Grid.Column="2" FontSize="8" VerticalAlignment="Bottom"/> |
||||
|
|
||||
|
<TextBlock Grid.Row="7" Grid.ColumnSpan="3" HorizontalAlignment="Center"> |
||||
|
<Run Text="本次揽收任务交接单共"/> |
||||
|
<Run Text="{Binding NowPageIndex}"/> |
||||
|
<Run Text="页,此为第"/> |
||||
|
<Run Text="{Binding TotalPageIndex}"/> |
||||
|
<Run Text="页"/> |
||||
|
</TextBlock> |
||||
|
</Grid> |
||||
|
|
||||
|
</Grid> |
||||
|
</Grid> |
||||
|
<!--<c:BButton Grid.Row="2" Content="保存" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click" |
||||
|
Name="btn_save" />--> |
||||
|
</Grid> |
||||
|
|
||||
|
</c:BWindow> |
@ -0,0 +1,92 @@ |
|||||
|
using BBWY.Client.Helpers; |
||||
|
using BBWY.Client.Models.APIModel; |
||||
|
using BBWY.Client.Models.APIModel.Response; |
||||
|
using BBWY.Client.Models.FallWare; |
||||
|
using BBWY.Controls; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Printing; |
||||
|
using System.Reflection; |
||||
|
using System.Text; |
||||
|
using System.Threading; |
||||
|
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.FallWare |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// WareLSAcceptOrderWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class WareLSAcceptOrderWindow : BWindow |
||||
|
{ |
||||
|
public WareLSAcceptOrderWindow(GetWareLSAcceptOrderResponse GetWareLSAcceptOrderResponse, List<GetWareLSOrderPurchase> GetWareLSOrderPurchases, int nowPageIndex, int totalPageIndex, string prewOrder |
||||
|
|
||||
|
) |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
this.GetWareLSAcceptOrderResponse = GetWareLSAcceptOrderResponse; |
||||
|
this.GetWareLSOrderPurchases = GetWareLSOrderPurchases; |
||||
|
this.NowPageIndex = nowPageIndex; |
||||
|
this.TotalPageIndex = totalPageIndex; |
||||
|
this.DataContext = this; |
||||
|
PrewOrder = prewOrder; |
||||
|
TotalSealBoxCount = GetWareLSOrderPurchases.Select(w=>w.SealBoxCount).Sum().Value; |
||||
|
this.UpdateLayout(); |
||||
|
} |
||||
|
|
||||
|
public GetWareLSAcceptOrderResponse GetWareLSAcceptOrderResponse { get; set; } |
||||
|
public List<GetWareLSOrderPurchase> GetWareLSOrderPurchases { get; set; } |
||||
|
public int NowPageIndex { get; set; } |
||||
|
public int TotalPageIndex { get; set; } |
||||
|
public string PrewOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 总封箱数
|
||||
|
/// </summary>
|
||||
|
public int TotalSealBoxCount { get; set; } |
||||
|
|
||||
|
///// <summary>
|
||||
|
///// TC收货总箱数
|
||||
|
///// </summary>
|
||||
|
//public int TotalTCAcceptBoxCount { get; set; }
|
||||
|
|
||||
|
|
||||
|
public void PrintLSOrder(string printName) |
||||
|
{ |
||||
|
var localPrintServer = new LocalPrintServer(); |
||||
|
if (string.IsNullOrEmpty(printName)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
var printQueue = localPrintServer.GetPrintQueue(printName); |
||||
|
if (printQueue.IsInError) |
||||
|
{ |
||||
|
System.Windows.MessageBox.Show("打印机处于错误状态"); |
||||
|
return; |
||||
|
} |
||||
|
MyPrintHelper.SetDefaultPrint(printName);//设置默认打印机
|
||||
|
PrintDialog printDialog = new PrintDialog(); |
||||
|
printDialog.PrintTicket.PageOrientation = PageOrientation.Portrait;//设置为横向打印 PageOrientation.Landscape Portrait为纵向
|
||||
|
var pageWidth = (int)Math.Ceiling(printDialog.PrintableAreaWidth); |
||||
|
var pageHeight = (int)Math.Ceiling(printDialog.PrintableAreaHeight); |
||||
|
// printDialog.PrintTicket.PageMediaSize = new PageMediaSize(pageWidth, pageHeight);
|
||||
|
|
||||
|
//835 1166
|
||||
|
this.Height = pageHeight+39; |
||||
|
this.Width = pageWidth; |
||||
|
this.print_lsOrder.Arrange(new Rect(new Point(0, 0), new Size(pageWidth, pageHeight))); |
||||
|
this.UpdateLayout(); |
||||
|
printDialog.PrintVisual(this.print_lsOrder, "打印任务"); |
||||
|
this.Close(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,120 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.SealBox.SealBoxPolicyDetailsWindow" |
||||
|
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.SealBox" |
||||
|
mc:Ignorable="d" |
||||
|
|
||||
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
||||
|
Height="1123" Width="794" |
||||
|
WindowStartupLocation="CenterScreen" |
||||
|
CloseButtonVisibility="Visible" |
||||
|
CloseButtonColor="{StaticResource WindowButtonColor}" |
||||
|
MinButtonVisibility="Collapsed" |
||||
|
MaxButtonVisibility="Collapsed" |
||||
|
RightButtonGroupMargin="0,5,5,0" |
||||
|
> |
||||
|
<!-- DataContext="{Binding CreateSetBarCodeView,Source={StaticResource Locator}}"--> |
||||
|
<Grid Name="print_sealbox"> |
||||
|
|
||||
|
<Grid Margin="30"> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="50"/> |
||||
|
<RowDefinition Height="50"/> |
||||
|
<RowDefinition/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<TextBlock Text="封箱策略明细" FontSize="36" VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold"/> |
||||
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1"> |
||||
|
<TextBlock Text="封箱ID:"/> |
||||
|
<TextBlock Text="{Binding SealBoxId}"/> |
||||
|
|
||||
|
<!--<TextBlock Text="箱数:" Margin="50 0 0 0"/> |
||||
|
<TextBlock Text="1"/> |
||||
|
<TextBlock Text="/"/> |
||||
|
<TextBlock Text="2"/>--> |
||||
|
|
||||
|
<TextBlock Text="店铺:" Margin="50 0 0 0"/> |
||||
|
<TextBlock Text="{Binding ShopName}"/> |
||||
|
|
||||
|
<TextBlock Text="仓库:" Margin="50 0 0 0"/> |
||||
|
<TextBlock Text="{Binding WareName}"/> |
||||
|
|
||||
|
</StackPanel> |
||||
|
|
||||
|
<Grid Grid.Row="2" > |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="35"/> |
||||
|
<RowDefinition /> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Border BorderBrush="Black" BorderThickness="1,1,1,0" |
||||
|
> |
||||
|
<Grid> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="80"/> |
||||
|
<ColumnDefinition /> |
||||
|
<ColumnDefinition Width="80"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<TextBlock Text="选择" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="商品信息" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="装箱数量" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> |
||||
|
|
||||
|
<Border Grid.Row="0" HorizontalAlignment="Right" Width="1" Background="Black"/> |
||||
|
<Border Grid.Column="1" HorizontalAlignment="Right" Width="1" Background="Black"/> |
||||
|
|
||||
|
</Grid> |
||||
|
</Border> |
||||
|
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding SealBoxSkus}" BorderThickness="0 1 0 0" BorderBrush="Black" |
||||
|
Grid.Row="2" Style="{StaticResource NoScrollViewListBoxStyle}" |
||||
|
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" > |
||||
|
<ListBox.ItemTemplate> |
||||
|
<DataTemplate> |
||||
|
<Grid MinHeight="60" Width="{Binding ActualWidth,ElementName=listbox_orerSku}"> |
||||
|
|
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="81"/> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition Width="81"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Grid Grid.Column="1"> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<StackPanel Orientation="Vertical" Margin="10 10 0 0" Grid.ColumnSpan="3"> |
||||
|
<TextBlock> |
||||
|
<Run Text="SKU:"/> |
||||
|
<Run Text="{Binding SkuId}"/> |
||||
|
</TextBlock> |
||||
|
<TextBlock Margin="0 10 0 0"> |
||||
|
<Run Text="SKU名称:"/> |
||||
|
<Run Text="{Binding SkuTitle}"/> |
||||
|
</TextBlock> |
||||
|
</StackPanel> |
||||
|
<TextBlock Grid.Column="1" Margin="10 10 0 0"> |
||||
|
<Run Text="任务ID:"/> |
||||
|
<Run Text="{Binding TaskId}"/> |
||||
|
</TextBlock> |
||||
|
<TextBlock Grid.Column="2" Margin="10 10 0 0"> |
||||
|
<Run Text="需装数量:"/> |
||||
|
<Run Text="{Binding WareHourseSkuCount}"/> |
||||
|
</TextBlock> |
||||
|
</Grid> |
||||
|
<Border Grid.Row="0" HorizontalAlignment="Left" Width="1" Background="Black"/> |
||||
|
<Border Grid.Row="0" HorizontalAlignment="Right" Width="1" Background="Black"/> |
||||
|
<Border Grid.Column="1" HorizontalAlignment="Right" Width="1" Background="Black"/> |
||||
|
<Border Grid.Column="2" HorizontalAlignment="Right" Width="1" Background="Black"/> |
||||
|
|
||||
|
<Border Grid.Row="0" VerticalAlignment="Bottom" Height="1" Grid.ColumnSpan="3" Background="Black"/> |
||||
|
</Grid> |
||||
|
</DataTemplate> |
||||
|
</ListBox.ItemTemplate> |
||||
|
</ListBox> |
||||
|
</Grid> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</Grid> |
||||
|
</Grid> |
||||
|
</c:BWindow> |
@ -0,0 +1,76 @@ |
|||||
|
using BBWY.Client.Helpers; |
||||
|
using BBWY.Client.Models.APIModel; |
||||
|
using BBWY.Client.Models.FallWare; |
||||
|
using BBWY.Controls; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Printing; |
||||
|
using System.Reflection; |
||||
|
using System.Text; |
||||
|
using System.Threading; |
||||
|
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.SealBox |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// SealBoxPolicyDetailsWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class SealBoxPolicyDetailsWindow : BWindow |
||||
|
{ |
||||
|
public SealBoxPolicyDetailsWindow(List<WareSealBoxSku> sealBoxSkus, string shopName, string wareName, long sealBoxId) |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
this.DataContext = this; |
||||
|
SealBoxSkus = sealBoxSkus; |
||||
|
ShopName = shopName; |
||||
|
WareName = wareName; |
||||
|
SealBoxId = sealBoxId; |
||||
|
this.UpdateLayout(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 封箱sku列表
|
||||
|
/// </summary>
|
||||
|
public List<WareSealBoxSku> SealBoxSkus { get; set; } |
||||
|
|
||||
|
public string ShopName { get; set; } |
||||
|
public string WareName { get; set; } |
||||
|
|
||||
|
public long SealBoxId { get; set; } |
||||
|
|
||||
|
public void PrintBox(string printName) |
||||
|
{ |
||||
|
var localPrintServer = new LocalPrintServer(); |
||||
|
if (string.IsNullOrEmpty(printName)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
var printQueue = localPrintServer.GetPrintQueue(printName); |
||||
|
if (printQueue.IsInError) |
||||
|
{ |
||||
|
System.Windows.MessageBox.Show("打印机处于错误状态"); |
||||
|
return; |
||||
|
} |
||||
|
MyPrintHelper.SetDefaultPrint(printName);//设置默认打印机
|
||||
|
PrintDialog printDialog = new PrintDialog(); |
||||
|
printDialog.PrintTicket.PageOrientation = PageOrientation.Portrait;//设置为横向打印 PageOrientation.Landscape Portrait为纵向
|
||||
|
var pageWidth = (int)Math.Ceiling(printDialog.PrintableAreaWidth); |
||||
|
var pageHeight = (int)Math.Ceiling(printDialog.PrintableAreaHeight); |
||||
|
printDialog.PrintTicket.PageMediaSize = new PageMediaSize(pageWidth, pageHeight); |
||||
|
this.Height = pageHeight; |
||||
|
this.Width = pageWidth; |
||||
|
// this.FontSize = 30;
|
||||
|
this.print_sealbox.Arrange(new Rect(new Point(0, 0), new Size(pageWidth, pageHeight))); |
||||
|
this.UpdateLayout(); |
||||
|
printDialog.PrintVisual(this.print_sealbox, "打印任务"); |
||||
|
this.Close(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.SealBox.SealBoxPrintDetailsWindow" |
||||
|
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.SealBox" |
||||
|
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="62 0 0 10"> |
||||
|
<TextBlock Margin="0 0 5 0" Style="{StaticResource middleTextBlock}" Text="份数:"/> |
||||
|
|
||||
|
<c:BTextBox Text="{Binding PrintCount}" Height="30" Width="200" /> |
||||
|
|
||||
|
</StackPanel> |
||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="50 0 0 0"> |
||||
|
<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> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<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,141 @@ |
|||||
|
using BBWY.Client.Models.APIModel; |
||||
|
using BBWY.Client.Models.PackTask; |
||||
|
using BBWY.Controls; |
||||
|
using NPOI.Util; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Collections.ObjectModel; |
||||
|
using System.Drawing.Printing; |
||||
|
using System.IO; |
||||
|
using System.Reflection; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
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.SealBox |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// SealBoxPrintDetailsWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class SealBoxPrintDetailsWindow : BWindow |
||||
|
{ |
||||
|
public SealBoxPrintDetailsWindow(SealBoxModel sealBox) |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
InitPrintList(); |
||||
|
SealBoxModel = sealBox.Copy(); |
||||
|
this.DataContext = this; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 打印机列表
|
||||
|
/// </summary>
|
||||
|
public ObservableCollection<string> PrintList { get; set; } |
||||
|
public void InitPrintList() |
||||
|
{ |
||||
|
//TaskImage = MyPrintHelper.GetBarcodeImage(TaskId.ToString(), 300, 60);
|
||||
|
|
||||
|
//BarcodeImage = MyPrintHelper.GetBarcodeImage(SkuId, 300, 60);
|
||||
|
|
||||
|
|
||||
|
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 string PrintName { get; set; } |
||||
|
public int PrintCount { get; set; } = 1; |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 封箱sku列表
|
||||
|
/// </summary>
|
||||
|
public SealBoxModel SealBoxModel { get; set; } |
||||
|
|
||||
|
public string ShopName { get; set; } |
||||
|
public string WareName { get; set; } |
||||
|
|
||||
|
public long SealBoxId { get; set; } |
||||
|
private void BButton_Click(object sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
int limitIndex = 15;//单页限制数量
|
||||
|
|
||||
|
Task.Factory.StartNew(() => |
||||
|
{ |
||||
|
for (int i = 0; i < PrintCount; i++)//打印份数
|
||||
|
{ |
||||
|
again: |
||||
|
if (SealBoxModel.SealBoxSkus.Count > limitIndex) |
||||
|
{ |
||||
|
PrintBox(SealBoxModel.SealBoxSkus.GetRange(0, limitIndex)); |
||||
|
|
||||
|
SealBoxModel.SealBoxSkus.RemoveRange(0, limitIndex); |
||||
|
goto again; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
PrintBox(SealBoxModel.SealBoxSkus); |
||||
|
} |
||||
|
} |
||||
|
App.Current.Dispatcher.Invoke(new Action(() => |
||||
|
{ |
||||
|
this.Close(); |
||||
|
})); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public void PrintBox(List<WareSealBoxSku> sealBoxSkus) |
||||
|
{ |
||||
|
App.Current.Dispatcher.Invoke(new Action(() => |
||||
|
{ |
||||
|
SealBoxPolicyDetailsWindow policyDetailsWindow = new SealBoxPolicyDetailsWindow(sealBoxSkus, SealBoxModel.ShopName, SealBoxModel.WareName, SealBoxModel.SealBoxId); |
||||
|
policyDetailsWindow.PrintBox(PrintName); |
||||
|
})); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.TaskOverTime.SubmitOverTimeMarkMsgWindow" |
||||
|
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.TaskOverTime" |
||||
|
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}}"--> |
||||
|
|
||||
|
<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"> |
||||
|
<Grid Margin="20 10 0 10"> |
||||
|
<TextBlock Width="60" HorizontalAlignment="Left" Height="60" VerticalAlignment="Top" Text="超时原因:"/> |
||||
|
|
||||
|
<TextBox Text="{Binding MarkMsg}" AcceptsReturn="True" TextWrapping="Wrap" Margin="50 0 50 0" /> |
||||
|
|
||||
|
</Grid> |
||||
|
|
||||
|
</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,74 @@ |
|||||
|
using BBWY.Client.APIServices; |
||||
|
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.Interop; |
||||
|
using System.Windows.Media; |
||||
|
using System.Windows.Media.Imaging; |
||||
|
using System.Windows.Shapes; |
||||
|
using WebSocketSharp; |
||||
|
|
||||
|
namespace BBWY.Client.Views.TaskOverTime |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// SubmitOverTimeMarkMsgWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class SubmitOverTimeMarkMsgWindow : BWindow |
||||
|
{ |
||||
|
public SubmitOverTimeMarkMsgWindow(OverTimeTaskType overTimeTaskType, long id, string msg, PackTaskService packTaskService, Action reflashWindow) |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
this.OverTimeTaskType = overTimeTaskType; |
||||
|
this.Id = id; |
||||
|
MarkMsg = msg; |
||||
|
this.reflashWindow = reflashWindow; |
||||
|
this.packTaskService = packTaskService; |
||||
|
this.DataContext = this; |
||||
|
} |
||||
|
Action reflashWindow; |
||||
|
PackTaskService packTaskService { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 超时任务类型(待验收 = 2,待打包 = 3,待封箱 = 4, 待落仓 = 8,待转运 = 11,)
|
||||
|
/// </summary>
|
||||
|
public OverTimeTaskType OverTimeTaskType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务id 或者 封箱id
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 备注信息
|
||||
|
/// </summary>
|
||||
|
public string MarkMsg { get; set; } |
||||
|
|
||||
|
private void BButton_Click(object sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
if (MarkMsg.IsNullOrEmpty()) |
||||
|
{ |
||||
|
MessageBox.Show("请输入超时原因"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
var res = packTaskService.SubmitOverTimeMarkMsg(OverTimeTaskType, Id, MarkMsg); |
||||
|
if (res == null) |
||||
|
{ |
||||
|
MessageBox.Show("网络异常"); |
||||
|
return; |
||||
|
} |
||||
|
if (!res.Success) |
||||
|
{ |
||||
|
MessageBox.Show(res.Msg); |
||||
|
return; |
||||
|
} |
||||
|
if (reflashWindow != null) reflashWindow(); |
||||
|
this.Close(); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue