liuwf 1 year ago
commit f6377d2904

@ -301,6 +301,11 @@
祖级列表
</summary>
</member>
<member name="P:Admin.Core.Model.BaseBomInfo.PrintName">
<summary>
打印名称
</summary>
</member>
<member name="T:Admin.Core.Model.BaseMaterialInfo">
<summary>
成品信息

@ -99,7 +99,10 @@ namespace Admin.Core.Model
/// </summary>
[SugarColumn(ColumnName = "ANCESTORS")]
public string Ancestors { get; set; }
/// <summary>
/// 打印名称
/// </summary>
[SugarColumn(ColumnName = "PRINT_NAME")]
public string PrintName { get; set; }
}
}

@ -24,6 +24,13 @@
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="#DDFFFFFF" />
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="#DDFFFFFF" />
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#DDFFFFFF" />
<!--字体大小设置-->
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.PrintTo.Common
{
public class CommHelper
{
#region 打开软盘
/// <summary>
/// 打开软盘
/// </summary>
public static void OpenOsk()
{
try
{
Process proc = new Process();
proc.StartInfo.FileName = @"C:\Windows\System32\osk.exe";
proc.StartInfo.UseShellExecute = true;
proc.StartInfo.Verb = "runas";
proc.Start();
}
catch
{
}
}
#endregion
}
}

@ -1,5 +1,7 @@
using Admin.Core.Common;
using Admin.Core.IService;
using Admin.Core.Model.ViewModels;
using Aucma.Core.PrintTo.Common;
using Aucma.Core.PrintTo.Models;
using Aucma.Core.PrintTo.Views;
using CommunityToolkit.Mvvm.ComponentModel;
@ -9,6 +11,7 @@ using log4net;
using Microsoft.Extensions.DependencyInjection;
using NetTaste;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
@ -65,10 +68,18 @@ namespace Aucma.Core.PrintTo.ViewModels
/// 查询
/// </summary>
[RelayCommand]
private async Task QueryString(string queryStr)
private async void QueryString(string queryStr)
{
List<PrintPlanInfoView> orderList = null;
try
{
if (!string.IsNullOrEmpty(queryStr))
{
var list = await _baseOrderInfoServices.QueryPrintInfo();
orderList = list.Where(d => d.OrderCode.Contains(queryStr) || d.ProductCode.Contains(queryStr) || d.ProductName.Contains(queryStr) || d.MaterialCode.Contains(queryStr) || d.MaterialName.Contains(queryStr)).ToList();
}
System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
{
if (!string.IsNullOrEmpty(queryStr))
@ -81,10 +92,6 @@ namespace Aucma.Core.PrintTo.ViewModels
// whereExpression = whereExpression.And(x => x.PLAN_CODE.Contains(queryStr));
//}
var list = await _baseOrderInfoServices.QueryPrintInfo();
//list.Where(d => d.MaterialName.Contains("U壳") || d.MaterialName.Contains("内胆"));
var orderList = list.Where(d => d.OrderCode.Contains(queryStr) || d.ProductCode.Contains(queryStr) || d.ProductName.Contains(queryStr) || d.MaterialCode.Contains(queryStr) || d.MaterialName.Contains(queryStr));
foreach (var item in orderList)
{
OrderInfo info = new OrderInfo();
@ -117,6 +124,7 @@ namespace Aucma.Core.PrintTo.ViewModels
log.Error("QueryString方法出现异常");
}
}
#endregion
#region radio查询按钮

@ -1,4 +1,5 @@
using Admin.Core.Common;
using Aucma.Core.PrintTo.Common;
using Aucma.Core.PrintTo.Views;
using AutoMapper.Configuration;
using CommunityToolkit.Mvvm.ComponentModel;
@ -16,7 +17,7 @@ namespace Aucma.Core.PrintTo.ViewModels
public partial class MainWindowViewModel : ObservableObject
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MainWindowViewModel));
private IndexPage firstPage = new IndexPage();//首页
private IndexPageView firstPage = new IndexPageView();//首页
public MainWindowViewModel()
{
UserContent = firstPage;
@ -114,8 +115,7 @@ namespace Aucma.Core.PrintTo.ViewModels
break;
// 打开软盘
case "TabTip":
OpenOsk();
CommHelper.OpenOsk();
break;
// 还原 或者 最大化当前窗口
case "Normal":
@ -147,18 +147,6 @@ namespace Aucma.Core.PrintTo.ViewModels
}
#endregion
#region 打开软盘
/// <summary>
/// 打开软盘
/// </summary>
public static void OpenOsk()
{
Process proc = new Process();
proc.StartInfo.FileName = @"C:\Windows\System32\osk.exe";
proc.StartInfo.UseShellExecute = true;
proc.StartInfo.Verb = "runas";
proc.Start();
}
#endregion
}
}

@ -1,17 +0,0 @@
using Aucma.Core.PrintTo.ViewModels;
using System.Windows.Controls;
namespace Aucma.Core.PrintTo.Views
{
/// <summary>
/// IndexPage.xaml 的交互逻辑
/// </summary>
public partial class IndexPage : UserControl
{
public IndexPage()
{
InitializeComponent();
this.DataContext = new IndexPageViewModel();
}
}
}

@ -1,4 +1,4 @@
<UserControl x:Class="Aucma.Core.PrintTo.Views.IndexPage"
<UserControl x:Class="Aucma.Core.PrintTo.Views.IndexPageView"
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"
@ -6,9 +6,12 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
d:DesignHeight="800"
d:DesignWidth="1500">
Background="#1152AC"
d:DesignWidth="1500" FontSize="18">
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<!--<Setter Property="Height" Value="40"/>-->
<Setter Property="FontSize" Value="18"/>
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
@ -39,7 +42,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
@ -158,9 +161,9 @@
<RowDefinition />
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Margin="5 5 0 0">
<Label Content="查询条件" Width="60" VerticalAlignment="Center" Foreground="white" />
<TextBox x:Name="queryParam" Text="" Style="{x:Null}" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
<Button Content="查询" Background="#4285DE" Margin="9,0,4,0" Width="100" Command="{Binding QueryStringCommand}" CommandParameter="{Binding ElementName=queryParam,Path=Text}"/>
<Label Content="查询条件" VerticalAlignment="Center" Foreground="White" />
<TextBox x:Name="queryParam" Text="" Style="{x:Null}" PreviewMouseDown="queryParam_PreviewMouseDown" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center"/>
<Button Content="查询" Background="#4285DE" Width="100" Command="{Binding QueryStringCommand}" CommandParameter="{Binding Text, ElementName=queryParam}"/>
</WrapPanel>
<UniformGrid Grid.Row="1" Margin="0 5 0 0" x:Name="HeightPanel">
<!--
@ -169,19 +172,21 @@
HorizontalAlignment="Left" 不显示多余的空白列;
-->
<DataGrid x:Name="dgvMH" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
HorizontalAlignment="Center" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
HorizontalAlignment="Center" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
ItemsSource="{Binding Datalist}" ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
SelectedItem="{Binding SelectedCells, Mode=OneWayToSource}">
<DataGrid.Columns>
<DataGridTextColumn MinWidth="160" Binding="{Binding CreatedTime, StringFormat=\{0:yyy-MM-dd HH:mm\}}" Header="订单日期" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="110" Binding="{Binding OrderCode}" Header="订单编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="110" Binding="{Binding ProductCode}" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="200" Binding="{Binding ProductName}" Header="产品名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="100" Binding="{Binding PlanAmount}" Header="订单量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="100" Binding="{Binding CompleteAmount}" Header="完成量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="100" Binding="{Binding ErrorNum}" Header="异常量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="120" Binding="{Binding LinerCodeNum}" Header="内胆码已打量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="120" Binding="{Binding BoxCodeNum}" Header="U壳码已打量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="160" Binding="{Binding CreatedTime, StringFormat=\{0:yyy-MM-dd\}}" Header="订单日期" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="200" Binding="{Binding OrderCode}" Header="订单编号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="200" Binding="{Binding ProductCode}" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="300" Binding="{Binding ProductName}" Header="产品型号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="50" Binding="{Binding CompleteAmount}" Header="内胆码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="50" Binding="{Binding CompleteAmount}" Header="箱体码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="50" Binding="{Binding PlanAmount}" Header="订单数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--<DataGridTextColumn MinWidth="50" Binding="{Binding CompleteAmount}" Header="完成量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn MinWidth="50" Binding="{Binding ErrorNum}" Header="异常量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="50" Binding="{Binding LinerCodeNum}" Header="内胆码&#x0a;已打数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="50" Binding="{Binding BoxCodeNum}" Header="U壳码&#x0a;已打数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--<DataGridTextColumn MinWidth="110" Binding="{Binding MaterialCode}" Header="物料编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="200" Binding="{Binding MaterialName}" Header="物料名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="200" Binding="{Binding StandardAmount}" Header="物料数量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
@ -205,31 +210,31 @@
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="产品编码" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="ProductNo" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.ProductCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="400"
<TextBox x:Name="ProductNo" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.ProductCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="400"
materialDesign:HintAssist.Hint="产品编码" />
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="产品名称" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="ProductName" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.ProductName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
<TextBox x:Name="ProductName" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.ProductName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
materialDesign:HintAssist.Hint="产品名称" />
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="物料名称" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialName" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.MaterialName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
<TextBox x:Name="MaterialName" Foreground="white" BorderBrush="White" Text="{Binding SelectedItem.MaterialName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="{Binding Path=ActualWidth, ElementName=ProductNo}"
materialDesign:HintAssist.Hint="物料名称" />
</WrapPanel>
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="打印数量" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Slider x:Name="PlanAmount" Minimum="0" Maximum="500" BorderBrush="White" Value="{Binding SelectedItem.StandardAmount, ElementName=dgvMH}" Foreground="white" Height="30" VerticalContentAlignment="Center"
HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" FontSize="15" Width="340"/>
HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" FontSize="18" Width="340"/>
<TextBlock Text="1~500" Width="50" Margin="10 0 0 0" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
</WrapPanel>
<Border Grid.Row="4" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="100 5" >
<StackPanel >
<WrapPanel Height="300">
<RadioButton Content="内胆码-L" Foreground="white" FontSize="15" x:Name="内胆" Margin="10 5" Command="{Binding RadioQueryCommand}" CommandParameter="{Binding Name, ElementName=内胆}"/>
<RadioButton Content="箱体码-B" Foreground="white" FontSize="15" x:Name="箱体" Margin="10 5" Command="{Binding RadioQueryCommand}" CommandParameter="{Binding Name, ElementName=箱体}"/>
<RadioButton Content="内胆码-L" Foreground="white" FontSize="18" x:Name="内胆" Margin="10 5" Command="{Binding RadioQueryCommand}" CommandParameter="{Binding Name, ElementName=内胆}"/>
<RadioButton Content="箱体码-B" Foreground="white" FontSize="18" x:Name="箱体" Margin="10 5" Command="{Binding RadioQueryCommand}" CommandParameter="{Binding Name, ElementName=箱体}"/>
</WrapPanel>
<!--<Button Content="添加" Foreground="White" BorderBrush="#0288d1" Background="#4285DE" HorizontalAlignment="Right" VerticalAlignment="Bottom" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />-->
</StackPanel>

@ -0,0 +1,33 @@
using Aucma.Core.PrintTo.Common;
using Aucma.Core.PrintTo.ViewModels;
using CommunityToolkit.Mvvm.Input;
using System.Windows.Controls;
namespace Aucma.Core.PrintTo.Views
{
/// <summary>
/// IndexPage.xaml 的交互逻辑
/// </summary>
public partial class IndexPageView : UserControl
{
public IndexPageView()
{
InitializeComponent();
this.DataContext = new IndexPageViewModel();
}
/// <summary>
/// 点击按钮带出键盘
/// </summary>
/// <returns></returns>
private void ClickQuery()
{
CommHelper.OpenOsk();
}
private void queryParam_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
ClickQuery();
}
}
}

@ -5,9 +5,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="澳柯玛物流控制系统"
MinHeight="700" MinWidth="1100"
Background="#1152AC"
Title="澳柯玛条码打印系统"
MinHeight="800" MinWidth="1100"
d:DesignHeight="800" d:DesignWidth="1100"
Background="#1152AC" FontFamily="Microsoft YaHei"
WindowStartupLocation="CenterScreen" WindowState="Maximized" WindowStyle="None"
>
<!--<Window.Background>
@ -30,7 +31,7 @@
<ImageBrush Stretch="Fill" ImageSource="/Assets/Images/headbg.png" />
</StackPanel.Background>
<StackPanel HorizontalAlignment="Center" Margin="0 3 0 0" >
<TextBlock Text="澳柯玛生产控制系统" Margin="0" Foreground="White" FontSize="45" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="澳柯玛条码打印系统" Margin="0" Foreground="White" FontSize="45" HorizontalAlignment="Center" VerticalAlignment="Center" />
</StackPanel>
<WrapPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -30 20 0">
<TextBlock x:Name="TestTB" Text="白班" VerticalAlignment="Center" Foreground="White" FontSize="25" Margin="5 0"/>
@ -52,25 +53,15 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Height="50" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left">
<Button Content="首 页" Background="#4285DE" IsEnabled="False" Margin="5 0" />
<Button Content="首 页" Background="#4285DE" Margin="5 0" />
<Button Content="键 盘" Background="#4285DE" x:Name="TabTip" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Height="30" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="2" Height="50" Orientation="Horizontal" HorizontalAlignment="Right">
<!--<Border Width="30" Height="30" CornerRadius="15">
<Border.Background>
<ImageBrush x:Name="PlcStatusImage" ImageSource="/Assets/Images/Green.png"/>
</Border.Background>
</Border>
<TextBlock x:Name="DB" Text="数据库连接成功" VerticalAlignment="Center" Foreground="Green" FontSize="15" Margin="10,0"/>-->
</StackPanel>
</Grid>
</Border>
</DockPanel>
</Grid>
</Border>

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Aucma.Core.PrintTo.Views"
mc:Ignorable="d"
Background="#0C4CA3" Name="window"
Background="#0C4CA3" Name="window" d:DesignHeight="700" d:DesignWidth="700"
Title="二维码打印" Height="700" Width="700" WindowStartupLocation="CenterScreen" WindowStyle="None">
<Grid Margin="15">
@ -25,17 +25,17 @@
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="物料编号" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox FontSize="15" Text="{Binding ProductCode}" Width="300" Foreground="White" Margin="15 0 0 0" VerticalAlignment="Center" IsReadOnly="True"/>
<TextBlock Text="产品编号" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox FontSize="15" Text="{Binding ProductCode}" Width="300" Foreground="White" BorderBrush="White" Margin="15 0 0 0" VerticalAlignment="Center" IsReadOnly="True"/>
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="物料名称" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Text="{Binding MaterialName}" FontSize="15" Width="300" Foreground="White" Margin="15 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"/>
<TextBlock Text="产品型号" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Text="{Binding MaterialName}" FontSize="15" Width="300" Foreground="White" BorderBrush="White" Margin="15 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"/>
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="打印名称" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Text="{Binding PrintAmount}" FontSize="15" Width="300" Foreground="White" BorderBrush="White" Margin="15 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"/>
</WrapPanel>
<!--<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="打印数量" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Text="{Binding PrintAmount}" FontSize="15" Width="250" Foreground="White" Margin="15 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"/>
</WrapPanel>-->
</Grid>
</GroupBox>
</UniformGrid>
@ -54,7 +54,7 @@
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="打印信息" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Text="{Binding PrintProgress}" FontSize="15" Width="300" Foreground="White" Margin="10 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"/>
<TextBox Text="{Binding PrintProgress}" FontSize="15" Width="300" Foreground="White" BorderBrush="White" Margin="10 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True"/>
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="打印状态" FontSize="15" Foreground="White" Margin="5"/>
@ -63,7 +63,8 @@
<TextBlock Text="{Binding ErrorNum}" FontSize="15" Margin="10 0" Width="150" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</WrapPanel>
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="{Binding StopOrStart}" x:Name="Suspend" Margin="20 0" Command="{Binding OperateCommand}" IsEnabled="{Binding OperateEnabled}" />
<Button Content="打印" x:Name="Start" Margin="20 0" Command="{Binding OperateCommand}" IsEnabled="{Binding OperateEnabled}" />
<Button Content="暂停" x:Name="Suspend" Margin="20 0" Command="{Binding OperateCommand}" IsEnabled="{Binding OperateEnabled}" />
<Button Content="关闭" x:Name="Close" Margin="20 0" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" />
</WrapPanel>
</Grid>

@ -32,7 +32,10 @@
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch" VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<TextBox Grid.RowSpan="2" Height="Auto"
Margin="0" Padding="0" BorderBrush="White"
VerticalAlignment="Stretch" VerticalContentAlignment="Center"
Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<!-- 给TextBox绑定上下命令 -->
<TextBox.InputBindings>
<KeyBinding Gesture="Up" Command="{x:Static Slider.IncreaseSmall}" />
@ -41,10 +44,12 @@
<KeyBinding Gesture="PageDown" Command="{x:Static Slider.DecreaseLarge}" />
</TextBox.InputBindings>
</TextBox>
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}" Style="{StaticResource RepeatButtonStyle}">
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M4,0 L0,4 8,4 Z" Fill="Black" />
</RepeatButton>
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}" Style="{StaticResource RepeatButtonStyle}">
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M0,0 L4,4 8,0 Z" Fill="Black" />
</RepeatButton>
<!-- 由于Slider的内部实现要求存在这些必要组件,所以必须保留,但是设置为隐藏即可 -->
@ -79,15 +84,15 @@
<GroupBox Margin="16 0" Header="条码类型" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Left" Margin="50 5" >
<RadioButton Content="放行码" Foreground="white" FontSize="15" Margin="10 5" />
<TextBox Text="{Binding BarCode,Mode=TwoWay}" FontSize="15" Width="300" Foreground="White" Margin="10 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox Text="{Binding BarCode,Mode=TwoWay}" PreviewMouseDown="TextBox_PreviewMouseDown" FontSize="18" Width="300" BorderBrush="White" Foreground="White" Margin="10 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" />
</WrapPanel>
</GroupBox>
</UniformGrid>
<UniformGrid Grid.Row="1">
<Border Margin="16 5" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="打印数量" Foreground="white" FontSize="15" Margin="10 5" />
<Slider x:Name="PrintAmount" Minimum="0" Value="{Binding PrintNum,Mode=TwoWay}" Maximum="500" Foreground="White" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" FontSize="15" Width="240"/>
<TextBlock Text="打印数量" Foreground="white" Margin="10 5" />
<Slider x:Name="PrintAmount" Minimum="0" Value="{Binding PrintNum,Mode=TwoWay}" Maximum="500" BorderBrush="White" Foreground="White" Height="30" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15 0 0 0" FontSize="15" Width="240"/>
<Button Background="#4285DE" Margin="30 0 0 0"
Content="打印" Width="100" Command="{Binding PrintCommand}" />
<Button Background="#4285DE" Margin="20 0"

@ -1,4 +1,5 @@
using Aucma.Core.PrintTo.ViewModels;
using Aucma.Core.PrintTo.Common;
using Aucma.Core.PrintTo.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
@ -25,5 +26,10 @@ namespace Aucma.Core.PrintTo.Views
InitializeComponent();
this.DataContext = new SpecialPrintViewModel();
}
private void TextBox_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
CommHelper.OpenOsk();
}
}
}

@ -88,8 +88,8 @@
<RowDefinition />
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Margin="5 5 0 0">
<Label Content="查询条件" Width="60" VerticalAlignment="Center" Foreground="White" />
<TextBox x:Name="queryParam" Text="" Style="{x:Null}" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
<Label Content="查询条件" Width="auto" VerticalAlignment="Center" Foreground="White" />
<TextBox x:Name="queryParam" Text="" PreviewMouseDown="queryParam_PreviewMouseDown" Style="{x:Null}" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
<Button Content="查询" Margin="9,0,4,0" Width="100" Command="{Binding QueryBarCodeCommand}" CommandParameter="{Binding ElementName=queryParam,Path=Text}"/>
</WrapPanel>
<UniformGrid Grid.Row="1" Margin="5 5 0 0" x:Name="HeightPanel">
@ -122,23 +122,23 @@
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="产品编码" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="ProductNo" Foreground="white" Text="{Binding SelectedItem.ProductCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="产品编码" />
<TextBox x:Name="ProductNo" Foreground="white" Text="{Binding SelectedItem.ProductCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="产品编码" BorderBrush="White" />
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="物料编码" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialCode" Foreground="white" Text="{Binding SelectedItem.MaterialCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="物料编码" />
<TextBox x:Name="MaterialCode" Foreground="white" Text="{Binding SelectedItem.MaterialCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="物料编码" BorderBrush="White" />
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="物料名称" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialName" Foreground="white" Text="{Binding SelectedItem.MaterialName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="物料名称" />
<TextBox x:Name="MaterialName" Foreground="white" Text="{Binding SelectedItem.MaterialName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="物料名称" BorderBrush="White" />
</WrapPanel>
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="打印条码" FontSize="15" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="BarCode" Foreground="white" Text="{Binding SelectedItem.BarCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="打印条码" />
<TextBox x:Name="BarCode" Foreground="white" Text="{Binding SelectedItem.BarCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="300"
materialDesign:HintAssist.Hint="打印条码" BorderBrush="White" />
</WrapPanel>
<WrapPanel Grid.Row="4" HorizontalAlignment="Center">

@ -1,4 +1,5 @@
using Aucma.Core.PrintTo.ViewModels;
using Aucma.Core.PrintTo.Common;
using Aucma.Core.PrintTo.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
@ -31,5 +32,10 @@ namespace Aucma.Core.PrintTo.Views
InitializeComponent();
this.DataContext = new SupplementPrintPageViewModel(orderCode, productCode, material_code, materialName);
}
private void queryParam_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
CommHelper.OpenOsk();
}
}
}

Loading…
Cancel
Save