Ver a proveniência

临时更新

样式分支
taoye há 2 anos
ascendente
cometimento
a20a740007
9 ficheiros alterados com 78 adições e 74 eliminações
  1. +0
    -7
      BPASmartClient.JXJFoodBigStation/App.xaml.cs
  2. +7
    -1
      BPASmartClient.JXJFoodBigStation/Model/RawMaterial/RawMaterialModel.cs
  3. +2
    -2
      BPASmartClient.JXJFoodBigStation/Model/RawMaterial/RecipeModel.cs
  4. +10
    -10
      BPASmartClient.JXJFoodBigStation/View/HardwareStatusView.xaml
  5. +6
    -4
      BPASmartClient.JXJFoodBigStation/View/RecipeInfosView.xaml
  6. +5
    -4
      BPASmartClient.JXJFoodBigStation/View/RecipeReceiveView.xaml
  7. +2
    -1
      BPASmartClient.JXJFoodBigStation/View/RecipeSendDownView.xaml
  8. +6
    -5
      BPASmartClient.JXJFoodBigStation/ViewModel/RecipeInfosViewModel.cs
  9. +40
    -40
      BPASmartClient.JXJFoodBigStation/ViewModel/RecipeReceiveViewModel.cs

+ 0
- 7
BPASmartClient.JXJFoodBigStation/App.xaml.cs Ver ficheiro

@@ -122,13 +122,6 @@ namespace BPASmartClient.JXJFoodBigStation
#region 硬件设备监控
ObservableCollection<SubMenumodel> DeviceMonitor = new ObservableCollection<SubMenumodel>();
DeviceMonitor.Add(new SubMenumodel()
{
SubMenuName = "料仓管理",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },
AssemblyName = "BPASmartClient.JXJFoodBigStation",
ToggleWindowPath = "View.DeviceManageView"
});
DeviceMonitor.Add(new SubMenumodel()
{
SubMenuName = "设备状态",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },


+ 7
- 1
BPASmartClient.JXJFoodBigStation/Model/RawMaterial/RawMaterialModel.cs Ver ficheiro

@@ -28,11 +28,17 @@ namespace BPASmartClient.JXJFoodBigStation.Model
private double _mRawMaterialWeight;

/// <summary>
/// 原料对应料仓的位置/名称
/// 原料对应料仓的位置
/// </summary>
public int RawMaterialLocation { get { return _mRawMaterialLocation; } set { _mRawMaterialLocation = value; OnPropertyChanged(); } }
private int _mRawMaterialLocation;
/// <summary>
/// 原料名称
/// </summary>
public string RawMaterialName { get { return _rawMaterNmae; } set { _rawMaterNmae = value;OnPropertyChanged(); } }

private string _rawMaterNmae;

/// <summary>


+ 2
- 2
BPASmartClient.JXJFoodBigStation/Model/RawMaterial/RecipeModel.cs Ver ficheiro

@@ -34,8 +34,8 @@ namespace BPASmartClient.JXJFoodBigStation.Model
/// <summary>
/// 配方编码
/// </summary>
public long RecipeCode { get { return _mRecipCode; } set { _mRecipCode = value; OnPropertyChanged(); } }
private long _mRecipCode;
public string RecipeCode { get { return _mRecipCode; } set { _mRecipCode = value; OnPropertyChanged(); } }
private string _mRecipCode;

/// <summary>
/// 托盘编号


+ 10
- 10
BPASmartClient.JXJFoodBigStation/View/HardwareStatusView.xaml Ver ficheiro

@@ -384,9 +384,9 @@
<Border Margin="5" Background="Transparent">
<Grid Height="220">
<Grid.RowDefinitions>
<RowDefinition Height="0.45*"/>
<RowDefinition Height="0.45*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition />
<RowDefinition />
<!--<RowDefinition Height="0.1*"/>-->
</Grid.RowDefinitions>

<TextBlock
@@ -461,7 +461,7 @@
Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
Stretch="Fill" />

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2">
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2">
<pry:IcoButton
Width="80"
@@ -498,7 +498,7 @@
Foreground="#FFF53F62"
IcoText="&#xe68e;"
Style="{StaticResource IcoButtonStyle}" />
</StackPanel>
</StackPanel>-->

</Grid>
</Border>
@@ -547,9 +547,9 @@
<Border Margin="5" Background="Transparent">
<Grid Height="220">
<Grid.RowDefinitions>
<RowDefinition Height="0.45*"/>
<RowDefinition Height="0.45*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition/>
<RowDefinition/>
<!--<RowDefinition Height="0.1*"/>-->
</Grid.RowDefinitions>

<TextBlock
@@ -620,7 +620,7 @@
Grid.RowSpan="2"
Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
Stretch="Fill" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2">
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2">
<pry:IcoButton
Width="80"
@@ -657,7 +657,7 @@
Foreground="#FFF53F62"
IcoText="&#xe68e;"
Style="{StaticResource IcoButtonStyle}" />
</StackPanel>
</StackPanel>-->


</Grid>


+ 6
- 4
BPASmartClient.JXJFoodBigStation/View/RecipeInfosView.xaml Ver ficheiro

@@ -334,7 +334,7 @@
<ColumnDefinition Width="225"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialLocation}" Margin="10,0,0,10" Width="190" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus">
<!--<ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialLocation}" Margin="10,0,0,10" Width="190" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Background" Value="White" />
@@ -342,8 +342,10 @@

</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
</ComboBox.ItemContainerStyle>-->
<!--</ComboBox>-->
<TextBox Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14"
BorderBrush="#e69519" Foreground="LightGray" Width="190" Margin="10,0,0,10" ></TextBox>
<StackPanel Grid.Column="1" Orientation="Horizontal" >
<TextBox Text="{Binding RawMaterialBarrelNum}" Background="Transparent" FontSize="14"
BorderBrush="#e69519" Foreground="LightGray" Width="170" Margin="35,0,0,10" ></TextBox>
@@ -362,7 +364,7 @@
Background="Transparent"
BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Right"
Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
CommandParameter="{Binding RawMaterialLocation}"></Button>
CommandParameter="{Binding RawMaterialName}"></Button>
</Grid>
</ControlTemplate>
</RadioButton.Template>


+ 5
- 4
BPASmartClient.JXJFoodBigStation/View/RecipeReceiveView.xaml Ver ficheiro

@@ -168,7 +168,7 @@
Foreground="Aqua"
IcoText="&#xe626;"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
<!--<pry:IcoButton
Width="140"
Margin="10"
HorizontalAlignment="Left"
@@ -177,7 +177,7 @@
FontSize="16"
Foreground="Aqua"
IcoText="&#xe626;"
Style="{StaticResource IcoButtonStyle}" />
Style="{StaticResource IcoButtonStyle}" />-->

<pry:IcoButton
Grid.Column="3"
@@ -241,6 +241,7 @@

<TextBlock
Grid.Row="1"
FontSize="16"
Margin="5,0,0,0"
VerticalAlignment="Top"
Foreground="#FF2AB2E7"
@@ -271,13 +272,13 @@
</RadialGradientBrush>
</Border.Background>
</Border>
<TextBlock Text="{Binding RawMaterialLocation }" Foreground="#FF2AB2E7" VerticalAlignment="Center"/>
<TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14" />
</StackPanel>
</Expander.Header>
<Expander.Content>
<StackPanel Margin="36,0,0,0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="托盘号:" Foreground="#FF2AB2E7"/>
<TextBlock Text="托盘号:" Foreground="#FF2AB2E7"/>
<TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
</StackPanel>
<StackPanel Orientation="Horizontal">


+ 2
- 1
BPASmartClient.JXJFoodBigStation/View/RecipeSendDownView.xaml Ver ficheiro

@@ -473,6 +473,7 @@

<TextBlock
Grid.Row="1"
FontSize="16"
Margin="5,0,0,0"
VerticalAlignment="Top"
Foreground="#FF2AB2E7"
@@ -503,7 +504,7 @@
</RadialGradientBrush>
</Border.Background>
</Border>
<TextBlock Text="{Binding RawMaterialLocation }" Foreground="#FF2AB2E7" VerticalAlignment="Center"/>
<TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14"/>
</StackPanel>
</Expander.Header>
<Expander.Content>


+ 6
- 5
BPASmartClient.JXJFoodBigStation/ViewModel/RecipeInfosViewModel.cs Ver ficheiro

@@ -47,7 +47,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel
if (name == null)
{
go:
long recipeCode = new Random().Next(10000, 99999);
string recipeCode = new Random().Next(10000, 99999).ToString();
var res = Json<LocaPar>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == recipeCode);
if (res == null)
{
@@ -76,6 +76,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel
bom.RawMaterial.Add(item);
}
bom.RecipeName = RecipeName;
bom.TrayCode = TrayCode;
Json<LocaPar>.Save();
ActionManage.GetInstance.Send("CloseRecipeInfosView");
}
@@ -88,7 +89,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel
if (bom == null && rec != null)//配方名称更改
{
prop: long recipeCode = new Random().Next(10000, 99999);//配方唯一ID,后期根据实际要求更改
prop: string recipeCode = new Random().Next(10000, 99999).ToString();//配方唯一ID,后期根据实际要求更改
var res = Json<LocaPar>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == recipeCode);
if (res == null)
{
@@ -108,9 +109,9 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel
ActionManage.GetInstance.Send("CloseNewRecipeView");
});

RemoveRecipe = new RelayCommand<int>((materilaName) => {
RemoveRecipe = new RelayCommand<string>((materilaName) => {

var res= RawMaterialsInfo.FirstOrDefault(p=>p.RawMaterialLocation==materilaName);
var res= RawMaterialsInfo.FirstOrDefault(p=>p.RawMaterialName==materilaName);
if (res != null)
RawMaterialsInfo.Remove(res);
});
@@ -137,7 +138,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel

public RelayCommand SaveAs { get; set; }

public RelayCommand<int> RemoveRecipe { get; set; }
public RelayCommand<string> RemoveRecipe { get; set; }

public ObservableCollection<RawMaterialModel> RawMaterialsInfo { get; set; } = new ObservableCollection<RawMaterialModel>() ;
}


+ 40
- 40
BPASmartClient.JXJFoodBigStation/ViewModel/RecipeReceiveViewModel.cs Ver ficheiro

@@ -45,51 +45,51 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel
RecipeInfosView nrv = new RecipeInfosView();
nrv.ShowDialog();
});
NewSimulateRecipe = new RelayCommand(() =>
{
RawMaterials.Clear();
string recipeName = "配方" + (Json<LocaPar>.Data.Recipes.Count + 1) + "";
go:
string recipeCode = new Random().Next(10000, 99999).ToString();
foreach (var item in Recipes)
{
if (item.RecipeCode == recipeCode)
{
goto go;
}
}
int trayCode = new Random().Next(1,6);
for (int i = 1; i < 13; i++)
{
int a = new Random().Next(1, 5);
if (a == 3)
{
a = 1;
}
RawMaterials.Add(new RawMaterialModel()
{
RawMaterialWeight = new Random().Next(10, 1000),
RawMaterialBarrelNum = a,
RawMaterialLocation = i,
});
}
Json<LocaPar>.Data.Recipes.Add(new RecipeModel()
{
RecipeName = recipeName,
RecipeCode = recipeCode,
TrayCode = trayCode,
RawMaterial = RawMaterials,
});
Json<LocaPar>.Save();
});
//模拟配方
//NewSimulateRecipe = new RelayCommand(() =>
//{
// RawMaterials.Clear();
// string recipeName = "配方" + (Json<LocaPar>.Data.Recipes.Count + 1) + "";
//go:
// string recipeCode = new Random().Next(10000, 99999).ToString();
// foreach (var item in Recipes)
// {
// if (item.RecipeCode == recipeCode)
// {
// goto go;
// }
// }
// int trayCode = new Random().Next(1,6);
// for (int i = 1; i < 13; i++)
// {
// int a = new Random().Next(1, 5);
// if (a == 3)
// {
// a = 1;
// }
// RawMaterials.Add(new RawMaterialModel()
// {
// RawMaterialWeight = new Random().Next(10, 1000),
// RawMaterialBarrelNum = a,
// RawMaterialLocation = i,
// });
// }
// Json<LocaPar>.Data.Recipes.Add(new RecipeModel()
// {
// RecipeName = recipeName,
// RecipeCode = recipeCode,
// TrayCode = trayCode,
// RawMaterial = RawMaterials,
// });
// Json<LocaPar>.Save();
//});
ClearAllRecipe = new RelayCommand(() =>
{
Json<LocaPar>.Data.Recipes.Clear();
Json<LocaPar>.Save();
});

RemoveCommand = new RelayCommand<long>((recipeCode) => {
RemoveCommand = new RelayCommand<string>((recipeCode) => {

var res = Recipes.FirstOrDefault(p=>p.RecipeCode==recipeCode);
if(res!=null)
@@ -107,7 +107,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel

public RelayCommand NewRecipe { get; set; }

public RelayCommand<long> RemoveCommand { get; set; }
public RelayCommand<string> RemoveCommand { get; set; }

public ObservableCollection<RecipeModel> Recipes { get; set; } = new ObservableCollection<RecipeModel>();
}


Carregando…
Cancelar
Guardar