新增MES模块,包含供应商、客户、车辆和地磅数据记录管理功能,支持免密接口和数据同步。更新相关控制器、实体、服务和数据库配置,优化权限管理和数据字典支持,确保系统的灵活性和可扩展性。
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
<UserControl x:Class="YY.Admin.Views.Supplier.SupplierEditDialogView"
|
||||
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:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d"
|
||||
Width="700" MinHeight="360">
|
||||
<Grid Background="{DynamicResource ThirdlyRegionBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<hc:SimplePanel Margin="20">
|
||||
<TextBlock FontSize="18" Foreground="{DynamicResource PrimaryTextBrush}" Text="{Binding DialogTitle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}"
|
||||
Foreground="{DynamicResource PrimaryBrush}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
|
||||
Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
|
||||
</hc:SimplePanel>
|
||||
|
||||
<hc:ScrollViewer Grid.Row="1" IsInertiaEnabled="True">
|
||||
<StackPanel Margin="20,0,20,0">
|
||||
<hc:Row Gutter="10">
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Supplier.SupplierCode, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="供应商编码"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入供应商编码(同租户内唯一)"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Supplier.SupplierName, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="供应商名称"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入供应商名称"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Supplier.SupplierShortName, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="供应商简称"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入供应商简称"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Supplier.ErpCode, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="ERP编码"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入ERP编码"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:ComboBox SelectedValuePath="Value"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding StatusOptions}"
|
||||
SelectedValue="{Binding Supplier.Status}"
|
||||
hc:InfoElement.Title="状态"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="24">
|
||||
<hc:TextBox Text="{Binding Supplier.Remark, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="备注"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入备注"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
Height="80"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
</StackPanel>
|
||||
</hc:ScrollViewer>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="20">
|
||||
<Button Content="取消" Command="{Binding CancelCommand}" Style="{StaticResource ButtonDefault}" Margin="0,0,15,0" Width="100"/>
|
||||
<Button Content="确定" Command="{Binding SaveCommand}" Style="{StaticResource ButtonPrimary}" Width="100"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Supplier;
|
||||
|
||||
public partial class SupplierEditDialogView : UserControl
|
||||
{
|
||||
public SupplierEditDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<UserControl x:Class="YY.Admin.Views.Supplier.SupplierListView"
|
||||
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:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d">
|
||||
<Grid Style="{StaticResource BaseViewStyle}">
|
||||
<Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition Height="Auto"/><RowDefinition Height="*"/></Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" CornerRadius="4" Margin="0 0 -10 0">
|
||||
<hc:Row>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}"><hc:TextBox Text="{Binding FilterSupplierCode}" Margin="0 0 10 10" hc:InfoElement.Title="供应商编码"/></hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}"><hc:TextBox Text="{Binding FilterSupplierName}" Margin="0 0 10 10" hc:InfoElement.Title="供应商名称"/></hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}"><hc:TextBox Text="{Binding FilterSupplierShortName}" Margin="0 0 10 10" hc:InfoElement.Title="供应商简称"/></hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}"><hc:TextBox Text="{Binding FilterErpCode}" Margin="0 0 10 10" hc:InfoElement.Title="ERP编码"/></hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
||||
<hc:ComboBox SelectedValuePath="Value" DisplayMemberPath="Key" ItemsSource="{Binding StatusOptions}" SelectedValue="{Binding FilterStatus}" Margin="0 0 10 10" hc:InfoElement.Title="状态"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Margin="0,10">
|
||||
<hc:UniformSpacingPanel Spacing="10">
|
||||
<Button Style="{StaticResource ButtonPrimary}" Command="{Binding SearchCommand}"><StackPanel Orientation="Horizontal"><md:PackIcon Kind="Search"/><TextBlock Text="搜索" Style="{StaticResource IconButtonStyle}"/></StackPanel></Button>
|
||||
<Button Style="{StaticResource ButtonDefault}" Command="{Binding ResetCommand}"><StackPanel Orientation="Horizontal"><md:PackIcon Kind="Refresh"/><TextBlock Text="重置" Style="{StaticResource IconButtonStyle}"/></StackPanel></Button>
|
||||
<Button Style="{StaticResource ButtonSuccess}" Command="{Binding AddCommand}"><StackPanel Orientation="Horizontal"><md:PackIcon Kind="Plus"/><TextBlock Text="新增" Style="{StaticResource IconButtonStyle}"/></StackPanel></Button>
|
||||
</hc:UniformSpacingPanel>
|
||||
</Border>
|
||||
<DataGrid Grid.Row="2" ItemsSource="{Binding Suppliers}" AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource CusDataGridStyle}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="供应商编码" Binding="{Binding SupplierCode}" Width="120"/>
|
||||
<DataGridTextColumn Header="供应商名称" Binding="{Binding SupplierName}" Width="160"/>
|
||||
<DataGridTextColumn Header="供应商简称" Binding="{Binding SupplierShortName}" Width="140"/>
|
||||
<DataGridTextColumn Header="ERP编码" Binding="{Binding ErpCode}" Width="120"/>
|
||||
<DataGridTextColumn Header="备注" Binding="{Binding Remark}" Width="180"/>
|
||||
<DataGridTextColumn Header="状态" Binding="{Binding StatusText}" Width="80"/>
|
||||
<DataGridTemplateColumn Header="操作" Width="200" CellStyle="{StaticResource CusOperDataGridCellStyle}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<hc:UniformSpacingPanel Spacing="5">
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="SquareEditOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="修改" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.ToggleStatusCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="ToggleSwitch" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="启/停" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="TrashCanOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="删除" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</hc:UniformSpacingPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Supplier;
|
||||
|
||||
public partial class SupplierListView : UserControl
|
||||
{
|
||||
public SupplierListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user