change-登录修改

main
liuwf 10 months ago
parent 945a90de7c
commit c3c6cb3bf2

@ -27,6 +27,17 @@ namespace Aucma.Core.ProductOffLine.Config
}
/// <summary>
/// 产线编号
/// </summary>
public string ProductlineCode
{
get { return iniHelper.IniReadValue("system", "ProductlineCode"); }
set { iniHelper.IniWriteValue("system", "ProductlineCode", value); }
}
/// <summary>
/// 工位编号
/// </summary>

@ -123,7 +123,7 @@ namespace Aucma.Core.PrintTo.ViewModels
#region 班组添加到集合中
public void AddTeamData()
{
var baseTeamMembersList = _baseTeamMembersServices.QueryAsync(d => d.ProductLineCode==appConfig.StationCode).Result;
var baseTeamMembersList = _baseTeamMembersServices.QueryAsync(d => d.ProductLineCode==appConfig.ProductlineCode).Result;
if (baseTeamMembersList == null) return;
foreach (var item in baseTeamMembersList)
{

@ -147,10 +147,7 @@ namespace Aucma.Core.PrintTo.ViewModels
}
break;
// 最小化当前窗口
case "Minimized":
Application.Current.MainWindow.WindowState = WindowState.Minimized;
break;
default:
break;
}
@ -163,6 +160,51 @@ namespace Aucma.Core.PrintTo.ViewModels
}
#endregion
#region 最小化界面
/// <summary>
/// 关闭当前界面
/// </summary>
/// <param name="parameter"></param>
[RelayCommand]
public void MinWindow(object parameter)
{
var window = parameter as Window;
if (window == null) return;
window.WindowState = WindowState.Minimized;
}
#endregion
#region 关闭当前界面
/// <summary>
/// 关闭当前界面
/// </summary>
/// <param name="parameter"></param>
[RelayCommand]
public void CloseWindow(object parameter)
{
var window = parameter as Window;
if (window == null) return;
if (MessageBox.Show("确定要退出系统吗?", "系统提醒", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
{
appConfig.TeamCode = "";
appConfig.TeamName = "";
appConfig.Account = "";
window.Hide();
//跳转到登录页
LoginPageView login = new LoginPageView();
login.Show();
window.Close();
}
}
#endregion
#region 刷新时间
public string _currentDateTime;
@ -231,31 +273,6 @@ namespace Aucma.Core.PrintTo.ViewModels
}
#endregion
#region 关闭当前界面
/// <summary>
/// 关闭当前界面
/// </summary>
/// <param name="parameter"></param>
[RelayCommand]
public void CloseWindow(object parameter)
{
var window = parameter as Window;
if (window == null) return;
if (MessageBox.Show("确定要退出系统吗?", "系统提醒", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
{
appConfig.TeamCode = "";
appConfig.TeamName = "";
appConfig.Account = "";
window.Hide();
//跳转到登录页
LoginPageView login = new LoginPageView();
login.Show();
window.Close();
}
}
#endregion
}
}

@ -73,7 +73,7 @@
<StackPanel Height="60" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left">
<Button Content="首 页" Margin="5 0" Height="40"/>
<Button Content="键 盘" x:Name="TabTip" Height="40" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" Height="40" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="最小化" x:Name="Minimized" Height="40" Margin="5 0" Command="{Binding MinWindowCommand}" CommandParameter="{Binding ElementName=window}" Width="100" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="退 出" x:Name="Exit" Height="40" Margin="5 0" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Width="100" Background="#FF0033" BorderBrush="#FF0033" />
<!--<TextBlock Text=" 登陆人账号:" Height="30" Width="auto" Margin="5 0" Foreground="White" Block.TextAlignment="Center" />

@ -438,7 +438,7 @@ namespace Aucma.Core.ProductOffLine.Business
completion.MaterialBarcode = bindingRecord1.BoxCode;
completion.MaterialCode = print.MaterialCode;
completion.MaterialName = print.MaterialName;
completion.StationName = "1009";
completion.StationName = appConfig.StationCode;
completion.CompleteDate = DateTime.Now;
completion.ProductLineCode = appConfig.ProductlineCode;
completion.isDownLine = 1;

@ -44,8 +44,16 @@ namespace Aucma.Core.ProductOffLine.Config
set { iniHelper.IniWriteValue("system", "ProductlineCode", value); }
}
/// <summary>
/// 工位编号
/// </summary>
public string StationCode
{
get { return iniHelper.IniReadValue("system", "StationCode"); }
set { iniHelper.IniWriteValue("system", "StationCode", value); }
}
/// <summary>
/// 扫码枪放行方向0外侧1内侧-1都未选中
/// </summary>

@ -126,7 +126,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
#region 班组添加到集合中
public void AddTeamData()
{
var baseTeamMembersList = _baseTeamMembersServices.QueryAsync(d => d.ProductLineCode.Contains("CX_02")).Result;
var baseTeamMembersList = _baseTeamMembersServices.QueryAsync(d => d.ProductLineCode==appConfig.ProductlineCode).Result;
if (baseTeamMembersList == null) return;
foreach (var item in baseTeamMembersList)
{

@ -292,6 +292,22 @@ namespace Aucma.Core.ProductOffLine.ViewModels
}
#endregion
#region 最小化当前界面
/// <summary>
/// 关闭当前界面
/// </summary>
/// <param name="parameter"></param>
[RelayCommand]
public void MinWindow(object parameter)
{
var window = parameter as Window;
if (window == null) return;
window.WindowState = WindowState.Minimized;
}
#endregion
#region 关闭当前界面
/// <summary>

@ -72,7 +72,7 @@
<Button Content="任务记录" x:Name="RecordPage" Margin="5 0" Height="40" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=RecordPage}" />
<Button Content="质检分垛" x:Name="QualityPage" Margin="5 0" Height="40" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=QualityPage}" />
<Button Content="键盘" x:Name="TabTip" Margin="5 0" Height="40" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Margin="5 0" Height="40" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="最小化" x:Name="Minimized" Command="{Binding MinWindowCommand}" CommandParameter="{Binding ElementName=window}" Width="100" Margin="5 0" Height="40" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="退 出" x:Name="Exit" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Width="100" Margin="5 0" Height="40" Background="#FF0033" BorderBrush="#FF0033"/>
</StackPanel>
<StackPanel Height="50" Orientation="Horizontal" HorizontalAlignment="Right">

@ -126,7 +126,7 @@ namespace Aucma.Core.ProductOffLineCX1.ViewModels
#region 班组添加到集合中
public void AddTeamData()
{
var baseTeamMembersList = _baseTeamMembersServices.QueryAsync(d => d.ProductLineCode==appConfig.StationCode).Result;
var baseTeamMembersList = _baseTeamMembersServices.QueryAsync(d => d.ProductLineCode==appConfig.ProductlineCode).Result;
if (baseTeamMembersList == null) return;
foreach (var item in baseTeamMembersList)
{

@ -300,6 +300,22 @@ namespace Aucma.Core.ProductOffLineCX1.ViewModels
#endregion
#region 最小化当前界面
/// <summary>
/// 关闭当前界面
/// </summary>
/// <param name="parameter"></param>
[RelayCommand]
public void MinWindow(object parameter)
{
var window = parameter as Window;
if (window == null) return;
window.WindowState = WindowState.Minimized;
}
#endregion
#region 关闭当前界面
/// <summary>
/// 关闭当前界面

@ -67,7 +67,7 @@
<Button Content="任务记录" x:Name="RecordPage" Margin="5 0" Height="40" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=RecordPage}" />
<Button Content="质检分垛" x:Name="QualityPage" Margin="5 0" Height="40" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=QualityPage}" />
<Button Content="键盘" x:Name="TabTip" Margin="5 0" Height="40" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Margin="5 0" Height="40" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="最小化" x:Name="Minimized" Command="{Binding MinWindowCommand}" CommandParameter="{Binding ElementName=window}" Width="100" Margin="5 0" Height="40" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="退 出" x:Name="Exit" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Width="100" Margin="5 0" Height="40" Background="#FF0033" BorderBrush="#FF0033"/>
</StackPanel>
<StackPanel Height="50" Orientation="Horizontal" HorizontalAlignment="Right">

Loading…
Cancel
Save