16 changed files with 931 additions and 191 deletions
@ -0,0 +1,97 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.APIModel.Request |
|||
{ |
|||
public class QualityTaskRequest |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 任务id
|
|||
/// </summary>
|
|||
public long TaskId { get; set; } |
|||
/// <summary>
|
|||
/// 拳探订单id
|
|||
/// </summary>
|
|||
public string OrderId { get; set; } |
|||
/// <summary>
|
|||
/// skuid
|
|||
/// </summary>
|
|||
public string SkuId { get; set; } |
|||
/// <summary>
|
|||
/// 备注信息
|
|||
/// </summary>
|
|||
public string MarkMessage { get; set; } |
|||
/// <summary>
|
|||
/// 配件数
|
|||
/// </summary>
|
|||
public int GoodsNumber { get; set; } |
|||
/// <summary>
|
|||
/// sku配件名称
|
|||
/// </summary>
|
|||
public string SkuGoodsTitle { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 增量1()
|
|||
/// </summary>
|
|||
public string Increment1 { get; set; } |
|||
/// <summary>
|
|||
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
|||
/// </summary>
|
|||
public BasicPack BasicPack { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包类型(单件=0,多件=1)
|
|||
/// </summary>
|
|||
public PackType PackType { get; set; } |
|||
/// <summary>
|
|||
/// 货号品名(手写上传)
|
|||
/// </summary>
|
|||
public string BrandName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证位置(外部包装=0,产品包装=1)
|
|||
/// </summary>
|
|||
public CertificatePosition CertificatePosition { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 合格证id
|
|||
/// </summary>
|
|||
public string CerId { get; set; } |
|||
/// <summary>
|
|||
/// 显示的条码Id
|
|||
/// </summary>
|
|||
public long? BarcodeId { get; set; } |
|||
//public BarCodeDTO BarCodeDTO { get; set; }
|
|||
/// <summary>
|
|||
/// 是否需要合格证
|
|||
/// </summary>
|
|||
public bool IsNeedBar { get; set; } |
|||
/// <summary>
|
|||
/// 是否需要合格证
|
|||
/// </summary>
|
|||
public bool IsNeedCer { get; set; } |
|||
|
|||
///// <summary>
|
|||
///// 配件列表
|
|||
///// </summary>
|
|||
//public PurchaseSku[] PurchaseSkus { get; set; }
|
|||
|
|||
/// <summary>
|
|||
/// 到货数量
|
|||
/// </summary>
|
|||
public int ArrivalQuantity { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 良品数量
|
|||
/// </summary>
|
|||
public int GoodProductQuantity { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 预计完成时间
|
|||
/// </summary>
|
|||
public DateTime? PreCompeteTime { get; set; } |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,75 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.QualityTask.BatchPrintWindow" |
|||
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" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
Height="300" Width="300" |
|||
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" > |
|||
<StackPanel Orientation="Horizontal" Margin=" 50 50 0 0" HorizontalAlignment="Left"> |
|||
<TextBlock Margin="0 0 5 0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="打印机:"/> |
|||
|
|||
<Border BorderBrush="{StaticResource Border.Brush}" VerticalAlignment="Center" BorderThickness="1"> |
|||
<ComboBox x:Name="cbPrints" BorderThickness="0" Height="30" Width="150" VerticalAlignment="Center" HorizontalAlignment="Left" /> |
|||
</Border> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin=" 50 10 0 0" HorizontalAlignment="Left"> |
|||
|
|||
<TextBlock HorizontalAlignment="Left" Text="良品数量:" Margin="0 0 5 0" /> |
|||
|
|||
<TextBlock Name="goodProductQuantity" HorizontalAlignment="Left" Margin="0 0 5 0" /> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="50 10 0 0"> |
|||
<TextBlock Text="条形码数量:" VerticalAlignment="Center" Margin="0 0 5 0" /> |
|||
<c:BTextBox Name="barNumber" Width="100" WaterRemark="条形码数量"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="50 10 0 0"> |
|||
<TextBlock Text="合格证数量:" VerticalAlignment="Center" Margin="0 0 5 0" /> |
|||
<c:BTextBox Name="cerNumber" Width="100" WaterRemark="合格证数量"/> |
|||
</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,205 @@ |
|||
using BBWY.Client.Helpers; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Views.PackTask; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Drawing; |
|||
using System.Drawing.Printing; |
|||
using System.Linq; |
|||
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.QualityTask |
|||
{ |
|||
/// <summary>
|
|||
/// BatchPrintWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class BatchPrintWindow : BWindow |
|||
{ |
|||
public BatchPrintWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
this.Loaded += BatchPrintWindow_Loaded; |
|||
} |
|||
|
|||
public void SetData(int GoodProductQuantity, CertificateModel[] CertificateModel, BarCodeModel BarCodeModel) |
|||
{ |
|||
this.BarCodeModel = BarCodeModel; |
|||
this.GoodProductQuantity = GoodProductQuantity; |
|||
goodProductQuantity.Text = GoodProductQuantity.ToString(); |
|||
this.CertificateModel = CertificateModel; |
|||
|
|||
this.DataContext = this; |
|||
} |
|||
|
|||
|
|||
|
|||
public CertificateModel[] CertificateModel { get; set; } |
|||
|
|||
public BarCodeModel BarCodeModel { get; set; } |
|||
|
|||
|
|||
public int GoodProductQuantity { get; set; } |
|||
|
|||
private void BatchPrintWindow_Loaded(object sender, RoutedEventArgs e) |
|||
{ |
|||
LoadPrints(); |
|||
} |
|||
/// <summary>
|
|||
/// 获取打印机名称
|
|||
/// </summary>
|
|||
private void LoadPrints() |
|||
{ |
|||
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; |
|||
} |
|||
cbPrints.Items.Add(name); |
|||
} |
|||
if (cbPrints.Items.Count > selectIndex) |
|||
{ |
|||
cbPrints.SelectedIndex = selectIndex; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
private void PrintData(int printCount, string printName, BarCodeModel barCode = null, CertificateModel certificateModel = null) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
PrintDocument document = new PrintDocument(); |
|||
document.PrinterSettings.PrinterName = printName;//使用打印机名称,指定特定的打印机进行打印。
|
|||
//设置打印页面
|
|||
//document.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("Custom", 236, 157);
|
|||
document.PrintPage += (s, a) => |
|||
{ |
|||
Font font = new Font("宋体", 6, System.Drawing.FontStyle.Regular); |
|||
if (barCode != null) |
|||
{ |
|||
MyPrintHelper.PrintBarcode(ref a, barCode, font); |
|||
} |
|||
if (certificateModel != null) |
|||
{ |
|||
MyPrintHelper.PrintCertificate(ref a, certificateModel, font); |
|||
} |
|||
|
|||
}; |
|||
document.PrinterSettings.Copies = (short)printCount;//打印份数
|
|||
document.Print(); |
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
new TipsWindow($"打印失败,{ex.Message}").Show(); |
|||
}); |
|||
|
|||
} |
|||
} |
|||
|
|||
private void Document_PrintPage(object sender, PrintPageEventArgs args) |
|||
{ |
|||
|
|||
Font font = new Font("宋体", 6, System.Drawing.FontStyle.Regular); |
|||
if (BarCodeModel != null) |
|||
{ |
|||
MyPrintHelper.PrintBarcode(ref args, BarCodeModel, font); |
|||
} |
|||
if (CertificateModel != null) |
|||
{ |
|||
foreach (var cer in CertificateModel) |
|||
{ |
|||
MyPrintHelper.PrintCertificate(ref args, cer, font); |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
int cerNum = 0, barNum = 0; |
|||
if (!string.IsNullOrEmpty(cerNumber.Text)) |
|||
try |
|||
{ |
|||
cerNum = Convert.ToInt32(cerNumber.Text); |
|||
} |
|||
catch |
|||
{ |
|||
MessageBox.Show("请输入数字"); |
|||
return; |
|||
} |
|||
if (!string.IsNullOrEmpty(barNumber.Text)) |
|||
try |
|||
{ |
|||
cerNum = Convert.ToInt32(barNumber.Text); |
|||
} |
|||
catch |
|||
{ |
|||
MessageBox.Show("请输入数字"); |
|||
return; |
|||
} |
|||
|
|||
|
|||
|
|||
if (barNum > 0) |
|||
{ |
|||
if (BarCodeModel == null) |
|||
{ |
|||
MessageBox.Show("未设置条形码模板"); |
|||
return; |
|||
} |
|||
} |
|||
if (cerNum > 0) |
|||
{ |
|||
if (CertificateModel == null || CertificateModel.Count() <= 0) |
|||
{ |
|||
MessageBox.Show("未设置合格证模板"); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
string printName = cbPrints.Text; |
|||
Task.Factory.StartNew(() => |
|||
{ |
|||
|
|||
if (barNum > 0) |
|||
{ |
|||
if (BarCodeModel != null) |
|||
PrintData(barNum, printName, BarCodeModel); |
|||
|
|||
} |
|||
if (cerNum > 0) |
|||
{ |
|||
if (CertificateModel != null && CertificateModel.Count() > 0) |
|||
foreach (var cer in CertificateModel) |
|||
PrintData(cerNum, printName, null, cer); |
|||
} |
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,164 @@ |
|||
<UserControl x:Class="BBWY.Client.Views.QualityTask.QualitySetCerControl" |
|||
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:local="clr-namespace:BBWY.Client.Views.QualityTask" |
|||
mc:Ignorable="d" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
d:DesignHeight="300" d:DesignWidth="382"> |
|||
<Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:QualitySetCerControl}}}"> |
|||
<DockPanel Grid.Row="1"> |
|||
|
|||
<Border Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=无型号:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
|
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 25" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Border> |
|||
|
|||
|
|||
<Border Name="shiyongnianling" Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=适用年龄:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
|
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 25" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
|
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
<TextBlock Text="适用年龄:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ApplyAge,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="124" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
|
|||
</Border> |
|||
<Border Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=标准无3c:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
<StackPanel Orientation="Vertical"> |
|||
<TextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="0 10 0 25" /> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="型号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Border> |
|||
<Border Visibility="{Binding model.LabelModel,Converter={StaticResource objConverter}, ConverterParameter=标准有3c:Visible:Collapsed}" BorderBrush="Black" BorderThickness="1" Width="380" Height="298" Margin="1" VerticalAlignment="Top" HorizontalAlignment="Left"> |
|||
|
|||
<StackPanel Orientation="Vertical"> |
|||
|
|||
<StackPanel Orientation="Horizontal" > |
|||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="合格证" FontSize="18" Margin="157 0 70 0" /> |
|||
<Image Source="pack://siteoforigin:,,,/Resources/Images/3c.png" Width="54" Height="40" VerticalAlignment="Top" Margin="0 5 0 0" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 2 0 5"> |
|||
<TextBlock Text="工厂编号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="203,0,0,0" /> |
|||
<c:BTextBox Text="{Binding model.FactoryNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="25" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="品牌:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.Brand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="型号:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="品名:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.BrandName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
<TextBlock Text="材质:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30,0,0,0"/> |
|||
<c:BTextBox Height="25" Text="{Binding model.Shader,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="执行标准:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="如多个标准请使用逗号分隔" Height="25" Text="{Binding model.ExcuteStander,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 10 0 10"> |
|||
<TextBlock Text="生产日期:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6 0 0 0" /> |
|||
<c:BTextBox WaterRemark="不填则不打印" Height="25" Text="{Binding model.ProduceDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="生产商:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18 0 0 0" /> |
|||
<c:BTextBox Height="25" Text="{Binding model.ProductShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
<StackPanel Orientation="Horizontal" Margin="0 5 0 0"> |
|||
<TextBlock Text="地址:" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="30 0 0 0" /> |
|||
<c:BTextBox TextWrapping ="Wrap" AcceptsReturn="True" Height="44" Text="{Binding model.ProductAdress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="296" VerticalAlignment="Top" HorizontalAlignment="Left" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
|
|||
</DockPanel> |
|||
</Grid> |
|||
</UserControl> |
|||
@ -0,0 +1,52 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Views.PackTask; |
|||
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.QualityTask |
|||
{ |
|||
/// <summary>
|
|||
/// QualitySetCerControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class QualitySetCerControl : UserControl |
|||
{ |
|||
public QualitySetCerControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
public CertificateModel model |
|||
{ |
|||
get { return (CertificateModel)GetValue(modelProperty); } |
|||
set |
|||
{ |
|||
SetValue(modelProperty, value); |
|||
} |
|||
} |
|||
public static readonly DependencyProperty modelProperty = |
|||
DependencyProperty.Register("model", typeof(CertificateModel), typeof(QualitySetCerControl), new PropertyMetadata(ChangedProperty)); |
|||
|
|||
private static void ChangedProperty(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|||
{ |
|||
//var control = d as CerControl;
|
|||
//var data = e.NewValue as CertificateModel;
|
|||
//if (data != null)
|
|||
//{
|
|||
// control.SetData(data);
|
|||
//}
|
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue