change -修改明细和执行人员的开始时间

main
启龙 曹 8 months ago
commit 0d12ea58db

@ -56,6 +56,7 @@ namespace SlnMesnac.Business.business
OrderCode = orderCode,
MaterialCode = orderInfo.MaterialCode,
MaterialName = orderInfo.MaterialName,
BeginTime =DateTime.Now.ToString(),
StationCode = stationCode,
DeviceCode = deviceCode,
PlanAmount = orderInfo.OrderAmount,
@ -115,8 +116,8 @@ namespace SlnMesnac.Business.business
StationCode = prodPlanInfo.StationCode,
StaffId = item.StaffId,
CompleteAmount = prodPlanDetail.CompleteAmount,
PlanBeginDate = prodPlanInfo.BeginTime,
PlanEndDate = prodPlanInfo.EndTime,
PlanBeginDate = prodPlanDetail.BeginTime,
PlanEndDate = prodPlanDetail.EndTime,
CreatedBy = prodPlanInfo.CreatedBy,
CreatedTime = prodPlanDetail.BeginTime,
UpdatedBy = prodPlanInfo.UpdatedBy,
@ -152,6 +153,30 @@ namespace SlnMesnac.Business.business
return _prodPlanInfoService.GetPlanInfoByConditions(orderCode,"","", stationCode,"0").FirstOrDefault();
}
/// <summary>
/// 更新订单信息状态
/// </summary>
/// <param name="orderCode"></param>
/// <exception cref="NotImplementedException"></exception>
public void UpdateOrderInfoStatus(string orderCode,string status)
{
_prodOrderInfoService.UpdateOrderInfoStatus(orderCode,status);
}
/// <summary>
/// 删除对应批次的明细和执行人信息
/// </summary>
/// <param name="planCode"></param>
/// <exception cref="NotImplementedException"></exception>
public void DeleteTheBatchDetailAndExecuter(string planCode,int batch)
{
if (planCode != "" && batch != 0)
{
bool result = _prodPlanDetailService.DeleteTheBatchNumberByPlanCode(planCode, batch);
_prodPlanExecuteUserService.DeleteByPlanCodeAndTheBatchNumber(planCode, batch);
}
}
///// <summary>
///// 查询所有计划工位
///// </summary>

@ -26,6 +26,8 @@ namespace SlnMesnac.Business.business
private List<string> members = new List<string>();
public static string stationCode = "";
public static List<string> stationList;
public static string staffId = "";
public static string theNewAmount = "";
public RfidHandleBusniess(IRecordStaffAttendanceService recordStaffAttendanceService, IRecordStaffCommuteService recordStaffCommuteService, IRecordStaffRealTimeService recordStaffRealTimeService)
{
@ -57,6 +59,28 @@ namespace SlnMesnac.Business.business
return _recordStaffAttendanceService.GetRecordStaffAttendances(stationCode);
}
/// <summary>
/// 处理并插入打卡记录(强退)
/// </summary>
/// <param name="staff"></param>
/// <param name="isCheckOn"></param>
/// <returns></returns>
public List<RecordStaffAttendance> HandleAndInsertRemove(BaseStaffInfo staff, int isCheckOn)
{
RecordStaffAttendance recordStaffAttendance = new RecordStaffAttendance
{
StaffId = staff.StaffId,
AttendanceType = isCheckOn.ToString(),
TeamCode = staff.TeamCode,
Remark = staffId,
CreateBy = staff.StaffName,
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
StationCode = stationCode
};
_recordStaffAttendanceService.Insert(recordStaffAttendance);
return _recordStaffAttendanceService.GetRecordStaffAttendances(stationCode);
}
/// <summary>
/// 处理上下班记录
/// </summary>

@ -35,5 +35,33 @@ namespace SlnMesnac.Repository.service.Impl
}
return prodOrderInfo;
}
/// <summary>
/// 更新订单状态
/// </summary>
/// <param name="orderCode"></param>
/// <param name="status"></param>
/// <exception cref="NotImplementedException"></exception>
public void UpdateOrderInfoStatus(string orderCode, string status)
{
try
{
var prodOrderInfo = _rep.GetFirst(x => x.OrderCode == orderCode);
if (prodOrderInfo != null)
{
prodOrderInfo.OrderStatus = status; // 更新订单状态
_rep.Update(prodOrderInfo); // 假设有一个Update方法来保存更改
}
else
{
_logger.LogWarning($"未找到订单号为 {orderCode} 的订单信息");
}
}
catch (Exception ex)
{
_logger.LogError($"更新订单状态异常:{ex.Message}");
}
}
}
}

@ -68,5 +68,26 @@ namespace SlnMesnac.Repository.service.Impl
}
return result;
}
/// <summary>
/// 删除工单里的某个批次
/// </summary>
/// <param name="planCode"></param>
/// <param name="batch"></param>
/// <exception cref="NotImplementedException"></exception>
public bool DeleteTheBatchNumberByPlanCode(string planCode, int batch)
{
bool result = false;
try
{
ProdPlanDetail temp = _rep.AsQueryable().Where(x => x.PlanCode == planCode && x.BatchNumber == batch).OrderByDescending(x => x.ObjId).First();
result = _rep.Delete(temp);
}
catch (Exception ex)
{
_logger.LogError($"根据计划编号删指定锅数的数据异常{ex.Message}");
}
return result;
}
}
}

@ -13,6 +13,31 @@ namespace SlnMesnac.Repository.service.Impl
public ProdPlanExecuteUserServiceImpl(Repository<ProdPlanExecuteUser> repository, ILogger<ProdPlanExecuteUserServiceImpl> logger) : base(repository)
{
_logger = logger;
}
}
/// <summary>
/// 根据计划号和批次号删除所有执行信息
/// </summary>
/// <param name="planCode"></param>
/// <param name="batch"></param>
/// <returns></returns>
public bool DeleteByPlanCodeAndTheBatchNumber(string planCode, int batch)
{
bool result = false;
try
{
List<ProdPlanExecuteUser> prodPlanExecuteUsers = _rep.AsQueryable().Where(x => x.PlanCode == planCode && x.BatchNumber == batch).ToList();
foreach (var execute in prodPlanExecuteUsers)
{
_rep.Delete(execute);
}
result = true;
}
catch (Exception ex)
{
_logger.LogError($"根据计划编号删指定锅数的数据异常{ex.Message}");
}
return result;
}
}
}

@ -53,7 +53,7 @@ namespace SlnMesnac.Repository.service.Impl
.WhereIF(!string.IsNullOrEmpty(planCode), x => x.PlanCode == planCode)
.WhereIF(!string.IsNullOrEmpty(materialCode), x => x.MaterialCode == materialCode)
.WhereIF(!string.IsNullOrEmpty(stationCode), x => x.StationCode == stationCode)
.WhereIF(!string.IsNullOrEmpty(planStatus), x => x.PlanStatus == planStatus || x.PlanStatus == "4")
.WhereIF(!string.IsNullOrEmpty(planStatus), x => x.PlanStatus == planStatus)
.OrderByDescending(x => x.ObjId)
.ToList();
return planInfoList;
@ -85,7 +85,8 @@ namespace SlnMesnac.Repository.service.Impl
ProdPLanInfo prodPLan = new ProdPLanInfo();
try
{//只显示未执行的
prodPLan = _rep.GetFirst(x => x.OrderCode == orderCode && x.StationCode == stationCode && x.PlanStatus == "0" || x.PlanStatus == "4");
prodPLan = _rep.GetFirst(x => x.OrderCode == orderCode && x.StationCode == stationCode);
//&& (x.PlanStatus == "0" || x.PlanStatus == "4")
}
catch (Exception ex)
{

@ -9,5 +9,6 @@ namespace SlnMesnac.Repository.service
public interface ProdOrderInfoService : IBaseService<ProdOrderInfo>
{
ProdOrderInfo GetProdOrderInfoByOrderCode(string orderCode);
public void UpdateOrderInfoStatus(string orderCode,string status);
}
}

@ -36,5 +36,12 @@ namespace SlnMesnac.Repository.service
/// <param name="v"></param>
/// <returns></returns>
bool DeleteByPlanCodeBatchNumber(string planCode, int number);
/// <summary>
/// 产出对应工单里的某个批次
/// </summary>
/// <param name="planCode"></param>
/// <param name="batch"></param>
bool DeleteTheBatchNumberByPlanCode(string planCode, int batch);
}
}

@ -8,6 +8,12 @@ namespace SlnMesnac.Repository.service
{
public interface ProdPlanExecuteUserService : IBaseService<ProdPlanExecuteUser>
{
/// <summary>
/// 根据计划号和批次号删除所有执行信息
/// </summary>
/// <param name="planCode"></param>
/// <param name="batch"></param>
/// <returns></returns>
bool DeleteByPlanCodeAndTheBatchNumber(string planCode, int batch);
}
}

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>

@ -123,13 +123,13 @@
<Border Grid.Row="0" Grid.Column="5">
<TextBox Text="{Binding MaterialNameTextBox}" Height="30" Width="180" FontSize="15" Foreground="White" HorizontalAlignment="Left"/>
</Border>
<!--<Border Grid.Row="1" Grid.Column="0">
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="工位:" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="1">
<TextBlock Text="{Binding StationTextBox}" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left"/>
--><!--<ComboBox x:Name="StationComboBox" ItemsSource="{Binding StationList}" SelectedItem="{Binding Station}" Width="180" Height="30" FontSize="15" HorizontalAlignment="Left"/>--><!--
</Border>-->
<!--<ComboBox x:Name="StationComboBox" ItemsSource="{Binding StationList}" SelectedItem="{Binding Station}" Width="180" Height="30" FontSize="15" HorizontalAlignment="Left"/>-->
</Border>
<Border Grid.Row="1" Grid.Column="5">
<Button Content="检索工单" x:Name="Select" Command="{Binding SearchCommand}" CommandParameter="{Binding Name,ElementName=Select}" Style="{StaticResource BUTTON_AGREE}" FontSize="15" FontWeight="Bold" Background="#009999" BorderBrush="#FF36B5C1" Margin="20,5,20,5"/>
</Border>
@ -156,9 +156,9 @@
</DataGridTemplateColumn>
<!--<DataGridTextColumn Binding="{Binding IndexCode}" Header="序号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding OrderCode}" Header="ERP订单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanCode}" Header="工单编号" Width="3.5*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--<DataGridTextColumn Binding="{Binding PlanCode}" Header="工单编号" Width="3.5*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<!--<DataGridTextColumn Binding="{Binding date,StringFormat=\{0:yyyy-MM-dd\}}" Header="工单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料名称" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料名称" Width="4*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="1.5*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="完成数量" Width="1.5*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTemplateColumn Header="操作" Width="1*" >
@ -230,6 +230,54 @@
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0">
<TextBlock Text="ERP订单编号" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="{Binding OrderCodeText}" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="2">
<TextBlock Text="工单编号" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="{Binding PlanCodeText}" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
</Border>
<Border Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<TextBlock Text="物料名称" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="{Binding MaterialNameText}" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
<!--<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="2*"/>
@ -255,13 +303,13 @@
<TextBlock Text="{Binding PlanCodeText}" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="物料编号" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="物料名称" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="{Binding MaterialCodeText}" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding MaterialNameText}" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="2">
<TextBlock Text="计划工位" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
@ -272,7 +320,7 @@
</Border.Effect>
<TextBlock Text="{Binding StationCodeText}" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
</Grid>-->
</Border>
<Border Grid.Row="2">
<Grid>
@ -292,23 +340,38 @@
<Border Grid.Row="3">
<DataGrid Name="dataGridPlanDetail" ItemsSource="{Binding ProdPLanDetailDataGrid}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="30" LoadingRow="dgvMH_LoadingRow"
RowHeight="30" AutoGenerateColumns="False" RowHeaderWidth="0"
RowHeight="40" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False"
Foreground="#FFFFFF" SelectedItem="{Binding SelectedDataItem}">
<!--resourceStyle 399行修改选中字体颜色-->
Foreground="#FFFFFF" SelectedItem="{Binding SelectedDetailRow}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="55" Header="序号" >
<DataGridTemplateColumn Width="55" Header="序号" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="新增数量" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BeginTime, StringFormat=\{0:yyy-MM-dd HH:mm:ss\}}" Header="实际开始时间" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTemplateColumn Header="操作" Width="1*" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<WrapPanel>
<Button Content="撤回"
FontSize="15"
Width="60"
Height="25"
Command="{Binding DataContext.WithdrawCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGrid}}}"
CommandParameter="{Binding}">
</Button>
</WrapPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--<DataGridTextColumn Binding="{Binding baggageTagCode}" Header="序号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="新增数量" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BeginTime, StringFormat=\{0:yyy-MM-dd HH:mm:ss\}}" Header="实际开始时间" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</Border>

@ -0,0 +1,25 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
public class FirstItemVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var items = parameter as System.Collections.IList;
if (items != null && items.Count > 0)
{
int index = items.IndexOf(value);
return index == 0 ? Visibility.Visible : Visibility.Collapsed;
}
return Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

@ -52,7 +52,7 @@ namespace SlnMesnac.WPF.ViewModel
public static bool isOnDuty = false;//是否有班组当班
private List<string> uniqueStrings = new List<string>();
private List<DateTime> timestamps = new List<DateTime>();
//private BaseStaffInfo user;
private BaseStaffInfo user;
/// <summary>
/// 按钮文字转换事件
@ -290,7 +290,11 @@ namespace SlnMesnac.WPF.ViewModel
var result = ExtractStrings(SelectedItem);
RfidHandleBusniess.stationCode = result.Item1;
stationName = result.Item2;
//ExecuteViewModel.stationTextBlock = stationName;
TransmitStationNameAction?.Invoke(stationName);
isSelectedStationCode = true;
TransmitUserDelegateEvent?.Invoke();
ShowStaffAttendances(null, isCheckOn);
MessageBox.Show("已确认工位:" + stationName);
}
else
@ -314,7 +318,7 @@ namespace SlnMesnac.WPF.ViewModel
if (RemoveConfirmViewModel.times == 1)
{
var theUser = baseStaffService.GetStaffInfoByStaffId(staffId);
_rfidHandleBusniess.HandleAndInsertStaffAttendance(theUser, 2);
_rfidHandleBusniess.HandleAndInsertRemove(theUser, 2);
var list = _rfidHandleBusniess.HandleAndInsertStaffRealTime(theUser, 2);
if (list.Count>=0)
{
@ -323,6 +327,7 @@ namespace SlnMesnac.WPF.ViewModel
RecordStaffRealTimeDataGrid.Clear();
list.ForEach(item => { RecordStaffRealTimeDataGrid.Add(item); });
}));
_rfidHandleBusniess.HandleStaffCommute(user, 1);
}
if(list.Count == 0)
{
@ -355,7 +360,7 @@ namespace SlnMesnac.WPF.ViewModel
// Additional logic for processing the unique string goes here
if (isUse)
{
var user = baseStaffService.GetStaffInfoByCardId(cleanStr);
user = baseStaffService.GetStaffInfoByCardId(cleanStr);
if (user != null)
{
RecordStaffAttendance recordStaffAttendance = _recordStaffAttendanceService.GetRecordStaffAttendanceByStaffId(user.StaffId, RfidHandleBusniess.stationCode);
@ -523,7 +528,7 @@ namespace SlnMesnac.WPF.ViewModel
}
/// <summary>
/// 30分钟内过滤重复str
/// 5秒内过滤重复str
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
@ -531,7 +536,7 @@ namespace SlnMesnac.WPF.ViewModel
{
for (int i = 0; i < uniqueStrings.Count; i++)
{
if (uniqueStrings[i] == str && (DateTime.Now - timestamps[i]).TotalSeconds < 30)
if (uniqueStrings[i] == str && (DateTime.Now - timestamps[i]).TotalSeconds < 5)
{
return true;
}

@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.IdentityModel.Protocols;
using NVelocity.Util.Introspection;
using SlnMesnac.Business;
@ -30,6 +31,7 @@ namespace SlnMesnac.WPF.ViewModel
{
public class ExecuteViewModel : INotifyPropertyChanged
{
private readonly ILogger<ExecuteViewModel> _logger;
public ObservableCollection<string> OrderCodeComboBoxItems { get; set; }
public ObservableCollection<string> PlanCodeComboBoxItems { get; set; }
public ObservableCollection<string> MaterialNameComboBoxItems { get; set; }
@ -39,16 +41,23 @@ namespace SlnMesnac.WPF.ViewModel
private List<ProdPLanInfo> prodPlanInfos;
private ProdPlanDetailService _prodPlanDetailService;
private IRecordStaffAttendanceService _recordStaffAttendanceService;
private IRecordStaffRealTimeService _recordStaffRealTimeService;
private IBaseStaffService _baseStaffService;
//private string StationCode;
private string DeviceCode;
private string ProcessCode;
public static bool isComplete = true;
public static string theStartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");//记录每个明细的开始时间
public static string intervalvalTime = "2023-11-11 00:00:00";
public static int stations = 0;
private string theOrderCode = "";
private ProdPLanInfo pLanInfo;
private ProdPLanInfo haveInfo;
private SerialPortBusiness _serialPortBusiness;
private string executeText = "待执行";
private int isSearch = 0;
public static string lastReportTime;
//public static string batchNums = "";//批次
#region 定义命令
/// <summary>
@ -75,6 +84,11 @@ namespace SlnMesnac.WPF.ViewModel
/// 执行命令
/// </summary>
public ICommand ExecuteCommand { get; private set; }
/// <summary>
/// 撤回命令
/// </summary>
public ICommand WithdrawCommand { get; private set; }
#endregion
#region 定义委托
@ -132,10 +146,10 @@ namespace SlnMesnac.WPF.ViewModel
/// 工位
/// </summary>
private string stationTextBlock;
public string StationTextBox
public string StationTextBox
{
get { return stationTextBlock; }
set { stationTextBlock = value; new PropertyChangedEventArgs(nameof(StationTextBox)); }
set { stationTextBlock = value; OnPropertyChanged("StationTextBox"); }
}
/// <summary>
@ -148,6 +162,19 @@ namespace SlnMesnac.WPF.ViewModel
set { prodPLanInfoDataGrid = value; OnPropertyChanged("ProdPLanInfoDataGrid"); }
}
/// <summary>
/// 工单计划选中行
/// </summary>
public ProdPLanInfo _selectedRow;
public ProdPLanInfo SelectedRow
{
get { return _selectedRow; }
set
{
_selectedRow = value; OnPropertyChanged(nameof(SelectedRow));
}
}
/// <summary>
/// DetailDataGrid
/// </summary>
@ -159,15 +186,15 @@ namespace SlnMesnac.WPF.ViewModel
}
/// <summary>
/// 选中行
/// 工单明细选中行
/// </summary>
public ProdPLanInfo _selectedRow;
public ProdPLanInfo SelectedRow
public ProdPlanDetail _selectedDetialRow;
public ProdPlanDetail SelectedDetailRow
{
get { return _selectedRow; }
get { return _selectedDetialRow; }
set
{
_selectedRow = value; OnPropertyChanged(nameof(SelectedRow));
_selectedDetialRow = value; OnPropertyChanged(nameof(SelectedDetailRow));
}
}
@ -194,11 +221,11 @@ namespace SlnMesnac.WPF.ViewModel
/// <summary>
/// 原料Text
/// </summary>
private string materialCodeText;
public string MaterialCodeText
private string materialNameText;
public string MaterialNameText
{
get { return materialCodeText; }
set { materialCodeText = value; OnPropertyChanged("MaterialCodeText"); }
get { return materialNameText; }
set { materialNameText = value; OnPropertyChanged("MaterialNameText"); }
}
/// <summary>
@ -220,13 +247,25 @@ namespace SlnMesnac.WPF.ViewModel
get { return stationCodeText; }
set { stationCodeText = value; OnPropertyChanged("StationCodeText"); }
}
/// <summary>
/// 批次号
/// </summary>
private string batchNumbers;
public string BatchNumbers
{
get { return batchNumbers; }
set { batchNumbers = value; OnPropertyChanged("BatchNumbers"); }
}
#endregion
public ExecuteViewModel()
{
_logger = App.ServiceProvider.GetService<ILogger<ExecuteViewModel>>();
_prodPlanInfoService = App.ServiceProvider.GetService<ProdPlanInfoService>();
_prodPlanDetailService = App.ServiceProvider.GetService<ProdPlanDetailService>();
_recordStaffAttendanceService = App.ServiceProvider.GetService<IRecordStaffAttendanceService>();
_recordStaffRealTimeService = App.ServiceProvider.GetService<IRecordStaffRealTimeService>();
_RfidHandleBusniess = App.ServiceProvider.GetService<RfidHandleBusniess>();
_baseStaffService = App.ServiceProvider.GetService<IBaseStaffService>();
_serialPortBusiness = App.ServiceProvider.GetService<SerialPortBusiness>();
@ -235,7 +274,7 @@ namespace SlnMesnac.WPF.ViewModel
.SetBasePath(System.AppContext.BaseDirectory)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
IConfigurationRoot configuration = configurationBuilder.Build();
pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions("", "", "", "", "1").FirstOrDefault();
pLanInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", "", "1").FirstOrDefault();
Refresh(pLanInfo);
havePlanOnDuty();
// 从配置文件中获取ProductLineNameTextBlock的值
@ -246,6 +285,10 @@ namespace SlnMesnac.WPF.ViewModel
//};
//StationList = ConvertStringToList(StationCodes);
//RfidHandleBusniess.stationCode = StationCodes;
EmployeeLoginViewModel.TransmitStationNameAction += stationName =>
{
updateStationName(stationName);
};
DeviceCode = configuration.GetSection("AppConfig")["DeviceCode"];
ProcessCode = configuration.GetSection("AppConfig")["ProcessCode"];
HandoverCommand = new RelayCommand(Handover);
@ -253,12 +296,47 @@ namespace SlnMesnac.WPF.ViewModel
TechnologicalInformationCommand = new RelayCommand(TechnologicalInformation);
SearchCommand = new RelayCommand(Search);
ExecuteCommand = new RelayCommand(Execute);
WithdrawCommand = new RelayCommand(Withdraw);
ProductionReportViewModel.RefreshDelegateEvent += Refresh;
EmployeeLoginViewModel.TransmitUserDelegateEvent += ShowTeamMember;
//SerialPortBusiness.ReceivedBarcodeInfoEvent += HandleOrderCode;
MainWindowViewModel.TransferOrderCodeEvent += HandleOrderCode;
}
/// <summary>
/// 撤回
/// </summary>
/// <exception cref="NotImplementedException"></exception>
private void Withdraw()
{
//BatchNumbers = batchNums;
MainWindowViewModel.wins = 2;
var removeConfirmWin = new RemoveConfirmWin();
removeConfirmWin.Owner = Application.Current.MainWindow;
removeConfirmWin.WindowStartupLocation = WindowStartupLocation.CenterOwner;
removeConfirmWin.ShowDialog();
if (RemoveConfirmViewModel.times == 1)
{
//当前正在执行的工单的单号和产量
string planCode = pLanInfo.PlanCode;
int batch = _selectedDetialRow.BatchNumber;
//删除planInfo对应产量
pLanInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", "", "1").FirstOrDefault();
double planNum = double.Parse(pLanInfo.CompleteAmount);
double detailNum = double.Parse(_selectedDetialRow.CompleteAmount);
pLanInfo.CompleteAmount = (planNum - detailNum).ToString();
_prodPlanInfoService.Update(pLanInfo);
//删除对应批次的明细和执行人信息
_databaseHandleBusniess.DeleteTheBatchDetailAndExecuter(planCode, batch);
//刷新
Refresh(pLanInfo);
}
MainWindowViewModel.wins = 1;
}
/// <summary>
/// 是否有计划正在执行
/// </summary>
private void havePlanOnDuty()
{
haveInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", "", "1").FirstOrDefault();
@ -271,6 +349,15 @@ namespace SlnMesnac.WPF.ViewModel
}
}
/// <summary>
/// 更新工位名称
/// </summary>
/// <param name="stationName"></param>
private void updateStationName(string stationName)
{
StationTextBox = EmployeeLoginViewModel.stationName;
}
/// <summary>
/// 换班弹窗
/// </summary>
@ -289,7 +376,7 @@ namespace SlnMesnac.WPF.ViewModel
{
if (RfidHandleBusniess.stationCode != "")
{
pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions("", "", "", RfidHandleBusniess.stationCode, "1").FirstOrDefault();
pLanInfo = _prodPlanInfoService.GetPlanInfoByConditions("", "", "", RfidHandleBusniess.stationCode, "1").FirstOrDefault();
if (pLanInfo != null)
{
MainWindowViewModel.wins = 3;
@ -297,8 +384,13 @@ namespace SlnMesnac.WPF.ViewModel
reportWin.Owner = Application.Current.MainWindow; // 设置父窗口为当前主窗口
reportWin.WindowStartupLocation = WindowStartupLocation.CenterScreen; // 让窗体出现在屏幕中央
reportWin.ShowDialog();//窗体出现后禁止后面的用户控件
Search();
Refresh(pLanInfo);
ShowTeamMember();
if (stations >= 3)
{
_databaseHandleBusniess.UpdateOrderInfoStatus(theOrderCode, "2");
}
MainWindowViewModel.wins = 1;
}
else
@ -337,7 +429,8 @@ namespace SlnMesnac.WPF.ViewModel
/// </summary>
private void Search()
{
if (EmployeeLoginViewModel.isOnDuty == true)
var staffList = _recordStaffRealTimeService.Query().ToList();
if (staffList.Count > 0)
{
//在这里执行其他操作可以通过InputText获取用户输入的信息
//Console.WriteLine("用户输入的信息:" + OrderCodeTextBox + PlanCodeTextBox + MaterialCodeTextBox);
@ -364,10 +457,13 @@ namespace SlnMesnac.WPF.ViewModel
/// </summary>
private void HandleOrderCode(string orderCode)
{
theOrderCode = orderCode;
if (isComplete)
{
if (isSearch == 1)
{
//更新当前工单状态
_databaseHandleBusniess.UpdateOrderInfoStatus(orderCode,"1");
//判断当前工位的工单编号是否存在
var plan = _prodPlanInfoService.GetProdPLanInfoByOrderCode(RfidHandleBusniess.stationCode, orderCode);
if (plan == null)//不存在就在生产工单表中新增一条当前工位的订单且执行状态改为4,重新检索,并高亮这条工单,执行按钮可用
@ -393,10 +489,10 @@ namespace SlnMesnac.WPF.ViewModel
}
Search();
}
else
{
MessageBox.Show("请先检索工单!");
}
//else
//{
// MessageBox.Show("请先检索工单!");
//}
}
else
{
@ -415,33 +511,43 @@ namespace SlnMesnac.WPF.ViewModel
{
if (isComplete)//判断是否完成,未完成不能执行其他工单
{
// 将当前记录存为实体可以通过parameter获取当前记录的信息
string orderCode = _selectedRow.OrderCode.ToString();
string planCode = _selectedRow.PlanCode.ToString();
pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(orderCode, planCode, "", "", "0").First();
RecordStaffAttendance currentRecord = _recordStaffAttendanceService.GetLastestOnRecord();
BaseStaffInfo staffInfo = _baseStaffService.GetMonitorByTeamCode(currentRecord.TeamCode);
RecordStaffAttendance nextRecord = _recordStaffAttendanceService.GetLastestOffRecord();
// 向detail表里插入一条数据
ProdPlanDetail prodPlanDetail = new ProdPlanDetail
try
{
PlanCode = pLanInfo.PlanCode,
MaterialCode = pLanInfo.MaterialCode,
PlanAmount = pLanInfo.PlanAmount,
CompleteAmount = pLanInfo.CompleteAmount,
BeginTime = DateTime.Now.ToString(),
CurrentStaffId = staffInfo.StaffId
//NextStaffId = nextRecord.StaffId,
};
_prodPlanDetailService.Insert(prodPlanDetail);
//按钮文字变成执行中并锁定,其他的订单执行按钮也禁用
pLanInfo.BeginTime = DateTime.Now.ToString();
pLanInfo.PlanStatus = "1";
_prodPlanInfoService.Update(pLanInfo);
Search();
//查明细表显示出来
Refresh(pLanInfo);
isComplete = false;
// 将当前记录存为实体可以通过parameter获取当前记录的信息
string orderCode = _selectedRow.OrderCode.ToString();
string planCode = _selectedRow.PlanCode.ToString();
pLanInfo = _prodPlanInfoService.GetRecordStaffAttendancesByConditions(orderCode, planCode, "", "", "0").First();
//RecordStaffAttendance currentRecord = _recordStaffAttendanceService.GetLastestOnRecord();
//BaseStaffInfo staffInfo = _baseStaffService.GetMonitorByTeamCode(currentRecord.TeamCode);
RecordStaffAttendance nextRecord = _recordStaffAttendanceService.GetLastestOffRecord();
// 向detail表里插入一条数据
if (pLanInfo.CompleteAmount == "0.00")
{
ProdPlanDetail prodPlanDetail = new ProdPlanDetail
{
PlanCode = pLanInfo.PlanCode,
MaterialCode = pLanInfo.MaterialCode,
PlanAmount = pLanInfo.PlanAmount,
CompleteAmount = pLanInfo.CompleteAmount,
BeginTime = DateTime.Now.ToString(),
//CurrentStaffId = staffInfo.StaffId
//NextStaffId = nextRecord.StaffId,
};
_prodPlanDetailService.Insert(prodPlanDetail);
}
//按钮文字变成执行中并锁定,其他的订单执行按钮也禁用
//pLanInfo.BeginTime = DateTime.Now.ToString();
pLanInfo.PlanStatus = "1";
_prodPlanInfoService.Update(pLanInfo);
Search();
//查明细表显示出来
Refresh(pLanInfo);
isComplete = false;
}
catch (Exception ex)
{
_logger.LogError("执行异常", ex);
}
}
else
{
@ -461,7 +567,7 @@ namespace SlnMesnac.WPF.ViewModel
var planDetail = planDetails.FirstOrDefault();
PlanCodeText = planDetail.PlanCode;
OrderCodeText = pLanInfo.OrderCode;
MaterialCodeText = planDetail.MaterialCode;
MaterialNameText = pLanInfo.MaterialName;
StationCodeText = pLanInfo.StationCode;
System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
{

@ -47,8 +47,13 @@ namespace SlnMesnac.WPF.ViewModel
ConfirmCommand = new RelayCommand(Confirm);
EndPlanCommand = new RelayCommand(EndPlan);
ContinueCommand = new RelayCommand(Continue);
PauseCommand = new RelayCommand(Pause);
EndButtonColor = "Red";
Init();
if (RfidHandleBusniess.theNewAmount != "")
{
NewAmountText = RfidHandleBusniess.theNewAmount;
}
}
private void Init()
@ -131,6 +136,11 @@ namespace SlnMesnac.WPF.ViewModel
}
#endregion
/// <summary>
/// 暂停
/// </summary>
public ICommand PauseCommand { get; set; }
/// <summary>
/// 继续
/// </summary>
@ -146,62 +156,80 @@ namespace SlnMesnac.WPF.ViewModel
/// </summary>
private void Confirm()
{
if(EmployeeLoginViewModel.isOnDuty == true)//是否有班组当班,无当班时操作无效
DateTime startTime = DateTime.Parse(ExecuteViewModel.intervalvalTime);
if ((DateTime.Now - startTime).TotalMinutes > 15)
{
string newAmount = NewAmountText;
if (newAmount != null)
if (EmployeeLoginViewModel.isOnDuty == true)//是否有班组当班,无当班时操作无效
{
bool isNum = true;
foreach (char x in newAmount)
string newAmount = NewAmountText;
RfidHandleBusniess.theNewAmount = NewAmountText;
if (newAmount != "")
{
if (!char.IsNumber(x) && x != '.')
bool isNum = true;
foreach (char x in newAmount)
{
isNum = false;
if (!char.IsNumber(x) && x != '.')
{
isNum = false;
}
}
}
if (isNum)
{
//将新增产量加到实际产量中
currentAmountDouble = Convert.ToDouble(planInfo.CompleteAmount);
newAmountDouble = Convert.ToDouble(newAmount);
result = currentAmountDouble + newAmountDouble;
//planDetail = new ProdPlanDetail();
planDetail.CompleteAmount = newAmountDouble.ToString();
planInfo.CompleteAmount = result.ToString();
planDetail.EndTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
planDetail.BatchNumber += 1;
planInfo.PlanStatus = "4";
//保存工单的执行人员
List<RecordStaffRealTime> realTimes = _databaseHandleBusniess.GetRecordStaffRealTimes();
_prodPlanDetailService.Insert(planDetail);
_prodPlanInfoService.Update(planInfo);
_databaseHandleBusniess.InsertPlanExecuteUser(planInfo, planDetail, realTimes);
Refresh();
NewAmountText = null;
HintText = "已提交!";
RefreshDelegateEvent?.Invoke(planInfo);
ExecuteViewModel.isComplete = true;
complateRate = GetComplateRate(result, PlanAmountText);
if (complateRate > 0.9)
if (isNum)
{
EndButtonColor = "#FF11B514";
HintText = "请撤回最新工单明细!";
//将新增产量加到实际产量中
currentAmountDouble = Convert.ToDouble(planInfo.CompleteAmount);
newAmountDouble = Convert.ToDouble(newAmount);
result = currentAmountDouble + newAmountDouble;
//planDetail = new ProdPlanDetail();
planDetail.CompleteAmount = newAmountDouble.ToString();
planInfo.CompleteAmount = result.ToString();
if (planDetail.EndTime == null)//第一条明细
{
planDetail.BeginTime = ExecuteViewModel.theStartTime;
}
else
{
planDetail.BeginTime = planDetail.EndTime;
}
planDetail.EndTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
ExecuteViewModel.intervalvalTime = planDetail.EndTime;
planDetail.BatchNumber += 1;
//ExecuteViewModel.batchNums = planDetail.BatchNumber.ToString();
//保存工单的执行人员
List<RecordStaffRealTime> realTimes = _databaseHandleBusniess.GetRecordStaffRealTimes();
_prodPlanDetailService.Insert(planDetail);
_prodPlanInfoService.Update(planInfo);
_databaseHandleBusniess.InsertPlanExecuteUser(planInfo, planDetail, realTimes);
Refresh();
HintText = "已提交!";
RefreshDelegateEvent?.Invoke(planInfo);
//ExecuteViewModel.isComplete = true;
complateRate = GetComplateRate(result, PlanAmountText);
if (complateRate > 0.9)
{
EndButtonColor = "#FF11B514";
}
}
else
{
//提示框提示错误信息
HintText = "输入有误,请输入阿拉伯数字!";
}
}
else
{
//提示框提示错误信息
HintText = "输入有误,请输入阿拉伯数字!";
HintText = "不能为空!";
}
}
else
{
HintText = "不能为空!";
HintText = "没有班组当班,无法执行此操作";
}
}
else
{
HintText = "没有班组当班,无法执行此操作!";
}
HintText = "当前工单距离上次提交不足15分钟";
}
}
/// <summary>
@ -221,8 +249,9 @@ namespace SlnMesnac.WPF.ViewModel
//_prodPlanDetailService.Insert(planDetail);
planInfo.PlanStatus = "2";
planInfo.EndTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
double planAmountDouble = Convert.ToDouble(planDetail.PlanAmount);
double completeAmountDouble = Convert.ToDouble(planDetail.CompleteAmount);
double planAmountDouble = Convert.ToDouble(planInfo.PlanAmount);
double completeAmountDouble = Convert.ToDouble(planInfo.CompleteAmount);
ExecuteViewModel.isComplete = true;
if (planAmountDouble == completeAmountDouble)
{
planInfo.CompFlag = "0";//正常完成
@ -236,6 +265,7 @@ namespace SlnMesnac.WPF.ViewModel
planInfo.CompFlag = "2";//超额完成
}
_prodPlanInfoService.Update(planInfo);
ExecuteViewModel.stations += 1;
}
//关闭窗口
Application.Current.Windows.OfType<ProductionReportWin>().First().Close();
@ -257,6 +287,19 @@ namespace SlnMesnac.WPF.ViewModel
Application.Current.Windows.OfType<ProductionReportWin>().First().Close();
}
/// <summary>
/// 暂停工单
/// </summary>
private void Pause()
{
//将当前的工单更新为待执行
planInfo.PlanStatus = "4";
_prodPlanInfoService.Update(planInfo);
ExecuteViewModel.isComplete = true;
//关闭窗口
Application.Current.Windows.OfType<ProductionReportWin>().First().Close();
}
/// <summary>
/// 获取完成率

@ -13,6 +13,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using SlnMesnac.Business.business;
namespace SlnMesnac.WPF.ViewModel
{
@ -75,6 +76,7 @@ namespace SlnMesnac.WPF.ViewModel
{
HintText = "成功!";
times++;
RfidHandleBusniess.staffId = user.StaffId;
}
else
{
@ -86,6 +88,11 @@ namespace SlnMesnac.WPF.ViewModel
HintText = "没有匹配的员工,打卡失败!";
}
}
else
{
HintText = "已成功,请勿重打!";
times = 1;
}
}
};
}

@ -139,21 +139,24 @@
<Border Grid.Row="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5" Margin="20,0,20,0">
<Border Grid.Column="0" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5" Margin="20,0,10,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="{Binding HintText}" FontSize="20" Foreground="Red" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="1">
<Button Content="继续执行" x:Name="Continue" Command="{Binding ContinueCommand}" CommandParameter="{Binding Name,ElementName=Select}" Style="{StaticResource BUTTON_AGREE}" FontSize="20" FontWeight="Bold" Height="50" Width="110" Background="#FF11B514" BorderBrush="#FF36B5C1" Margin="70,14,0,14"/>
<StackPanel Orientation="Horizontal">
<Button Content="暂停工单" x:Name="Pause" Command="{Binding PauseCommand}" CommandParameter="{Binding Name,ElementName=Select}" Style="{StaticResource BUTTON_AGREE}" FontSize="20" FontWeight="Bold" Height="50" Width="100" Background="#FFFFAF00" BorderBrush="#FFFFAF00" Margin="20,14,10,14"/>
<Button Content="继续执行" x:Name="Continue" Command="{Binding ContinueCommand}" CommandParameter="{Binding Name,ElementName=Select}" Style="{StaticResource BUTTON_AGREE}" FontSize="20" FontWeight="Bold" Height="50" Width="100" Background="#FF11B514" BorderBrush="#FF36B5C1" Margin="20,14,0,14"/>
</StackPanel>
</Border>
<Border Grid.Column="2">
<Button Content="结束工单" x:Name="Handover" Command="{Binding EndPlanCommand}" CommandParameter="{Binding Name,ElementName=Select}" Style="{StaticResource BUTTON_AGREE}" FontSize="20" FontWeight="Bold" Height="50" Width="110" Background="{Binding EndButtonColor}" BorderBrush="{Binding EndButtonColor}" Margin="40,14,10,14"/>
<Button Content="结束工单" x:Name="Handover" Command="{Binding EndPlanCommand}" CommandParameter="{Binding Name,ElementName=Select}" Style="{StaticResource BUTTON_AGREE}" FontSize="20" FontWeight="Bold" Height="50" Width="110" Background="{Binding EndButtonColor}" BorderBrush="{Binding EndButtonColor}" Margin="0,14,10,14"/>
</Border>
</Grid>
</Border>

@ -20,7 +20,7 @@
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<TextBlock Text="{Binding HintText}" FontSize="20" Foreground="Red" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding HintText}" FontSize="30" Foreground="Red" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="2">
<Button Content="确认" x:Name="ProductionReport" Command="{Binding ConfirmCommand}" CommandParameter="{Binding Name,ElementName=Select}" Style="{StaticResource BUTTON_AGREE}" FontSize="20" FontWeight="Bold" Background="#FFDC870B" BorderBrush="#FFDC870B" HorizontalAlignment="Right" Margin="0,56,10,10" Width="100"/>

Loading…
Cancel
Save