Browse Source

更新界面

zhangliwen 1 year ago
parent
commit
ec35831b4f
18 changed files with 319 additions and 230 deletions
  1. 4 2
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Machines/CNCMachines1.cs
  2. 0 156
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/ProcessingManagement/ProcessingModel.cs
  3. 22 0
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/ProcessingManagement/QueryProcessingModel.cs
  4. 84 0
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/TaskManagement/TaskManagementModel.cs
  5. 0 1
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmDeviceState.xaml
  6. 1 0
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmHistoryQuery.xaml.cs
  7. 1 0
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmManager.xaml.cs
  8. 1 0
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmOrderIssue.xaml.cs
  9. 1 5
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessing.xaml
  10. 2 1
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessing.xaml.cs
  11. 93 28
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessingManagement.xaml
  12. 87 22
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessingManagement.xaml.cs
  13. 2 2
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmQCManagement.xaml
  14. 16 11
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmQCManagement.xaml.cs
  15. 2 1
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmTaskManagement.xaml.cs
  16. 1 0
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmTaskQuery.xaml.cs
  17. 2 1
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Env.cs
  18. 0 0
      aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/SCADA_DAQ.csproj

+ 4 - 2
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Machines/CNCMachines1.cs

@@ -21,6 +21,8 @@ namespace SCADA_DAQ.Customer.Machines
     [DisplayName("1#数控机床")]
     public class CNCMachines1 : BasePLCMachine
     {
+        // 设备名
+        private static string DeviceName = "1#数控机床";
 
         // 数据库对象
         private static SqlSchema.DIL.DILDB DAL = Env.SgIDAL;
@@ -134,7 +136,7 @@ namespace SCADA_DAQ.Customer.Machines
                     }
                     //if (reg.Comment.Variable == "IA" || reg.Comment.Variable == "IB" || reg.Comment.Variable == "IC")
                     //{
-                    //    UpdateState("三相嵌入式计量模块");
+                    //    UpdateState(DeviceName);
                     //}
                     break;
                 case "温度振动传感器":
@@ -166,7 +168,7 @@ namespace SCADA_DAQ.Customer.Machines
                     }
                     if (reg.Comment.Variable == "IA" || reg.Comment.Variable == "IC")
                     {
-                        UpdateState("三相电能表");
+                        UpdateState(DeviceName);
                     }
                     break;
                 default:

+ 0 - 156
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/ProcessingManagement/ProcessingModel.cs

@@ -1,156 +0,0 @@
-using SCADA.CommonLib;
-using SqlSchema.DBNames;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace SCADA_DAQ.Customer.Models.ProcessingManagement
-{
-    public class ProcessingModel : ObservableObject
-    {
-        /// <summary>
-        /// 订单编号
-        /// </summary>
-        [AutoViewProperty("订单编号", Icon = "OrderBoolAscendingVariant")]
-        [Column(T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str)]   // 要绑定的表的列属性
-        [Required]
-        public string OrderNo
-        {
-            get { return _OrderNo; }
-            set
-            {
-                if (value != _OrderNo)
-                {
-                    _OrderNo = value;
-                    OnPropertyChanged(nameof(OrderNo));
-                }
-            }
-        }
-        private string _OrderNo;
-
-
-        /// <summary>
-        /// 工件名称
-        /// </summary>
-        [AutoViewProperty("工件名称", Icon = "Map2Line")]
-        [Column(T_Col_Name.App_HongShi_TaskInfo.WorkPieceName_Str)]
-        public string WorkPieceName
-        {
-            get { return _WorkPieceName; }
-            set
-            {
-                if (value != _WorkPieceName)
-                {
-                    _WorkPieceName = value;
-                    OnPropertyChanged(nameof(WorkPieceName));
-                }
-            }
-        }
-        private string _WorkPieceName;
-
-
-        /// <summary>
-        /// 计划数量
-        /// </summary>
-        [AutoViewProperty("计划数量", Icon = "NumbersFill")]
-        [Column(T_Col_Name.App_HongShi_TaskInfo.PlanPiecesNumber_Int)]
-        public string PlanPiecesNumber
-        {
-            get { return _PlanPiecesNumber; }
-            set
-            {
-                if (value != _PlanPiecesNumber)
-                {
-                    _PlanPiecesNumber = value;
-                    OnPropertyChanged(nameof(PlanPiecesNumber));
-                }
-            }
-        }
-        private string _PlanPiecesNumber;
-
-
-        /// <summary>
-        /// 车间号
-        /// </summary>
-        [AutoViewProperty("车间号", Icon = "Greenhouse")]
-        [Column(T_Col_Name.App_HongShi_TaskInfo.WorkShopID_Str)]
-        public string WorkShopNo
-        {
-            get { return _WorkShopNo; }
-            set
-            {
-                if (value != _WorkShopNo)
-                {
-                    _WorkShopNo = value;
-                    OnPropertyChanged(nameof(WorkShopNo));
-                }
-            }
-        }
-        private string _WorkShopNo;
-
-        /// <summary>
-        /// 图号
-        /// </summary>
-        [AutoViewProperty("图号", Icon = "Drawing")]
-        [Column(T_Col_Name.App_HongShi_TaskInfo.DrawNumber_Str)]
-        public string DrawNo
-        {
-            get { return _DrawNo; }
-            set
-            {
-                if (value != _DrawNo)
-                {
-                    _DrawNo = value;
-                    OnPropertyChanged(nameof(DrawNo));
-                }
-            }
-        }
-        private string _DrawNo;
-
-
-        /// <summary>
-        /// 机床编号
-        /// </summary>
-        [AutoViewProperty("机床编号", Icon = "AnimationOutline")]
-        [Column(T_Col_Name.App_HongShi_TaskInfo.ToolNo_Str)]
-        public string ToolNo
-        {
-            get { return _ToolNo; }
-            set
-            {
-                if (value != _ToolNo)
-                {
-                    _ToolNo = value;
-                    OnPropertyChanged(nameof(ToolNo));
-                }
-            }
-        }
-        private string _ToolNo;
-
-
-
-        /// <summary>
-        /// 任务状态
-        /// </summary>
-        [AutoViewProperty("任务状态", Icon = "")]
-        [Column(T_Col_Name.App_HongShi_TaskInfo.TaskState_Str)]
-        public string TaskState
-        {
-            get { return _TaskState; }
-            set
-            {
-                if (value != _TaskState)
-                {
-                    _TaskState = value;
-                    OnPropertyChanged(nameof(TaskState));
-                }
-            }
-        }
-        private string _TaskState;
-    }
-}

+ 22 - 0
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/ProcessingManagement/QueryProcessingModel.cs

@@ -7,6 +7,7 @@ using System.Drawing;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows;
 
 namespace SCADA_DAQ.Customer.Models.ProcessingManagement
 {
@@ -39,5 +40,26 @@ namespace SCADA_DAQ.Customer.Models.ProcessingManagement
             }
         }
         private DateRange _DATETIME = new DateRange(Env.Schedual) { TimeInterval = DateRangeInterval.All };
+
+
+        /// <summary>
+        /// 订单状态
+        /// </summary>
+        [AutoViewProperty("订单状态", Icon = "BringToFront", IsEnable =false)]
+        [Query(T_Col_Name.App_HongShi_TaskInfo.TaskState_Str)]
+        public string TaskState
+        {
+            get { return _TaskState; }
+            set
+            {
+                if (value != _TaskState)
+                {
+                    _TaskState = value;
+                    OnPropertyChanged(nameof(TaskState));
+                }
+            }
+        }
+        private string _TaskState;
+
     }
 }

+ 84 - 0
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/TaskManagement/TaskManagementModel.cs

@@ -6,6 +6,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.ComponentModel.DataAnnotations;
+using System.Windows;
 
 namespace SCADA_DAQ.Customer.Models.TaskManagement
 {
@@ -378,5 +379,88 @@ namespace SCADA_DAQ.Customer.Models.TaskManagement
 
 
 
+        ///// <summary>
+        ///// 创建时间
+        ///// </summary>
+        //[AutoViewProperty("创建时间", Icon = "")]
+        //[Column(T_Col_Name.App_HongShi_TaskInfo.CreateTime_Dt)]
+        //public DateTime CreateTime
+        //{
+        //    get { return _CreateTime; }
+        //    set
+        //    {
+        //        if (value != _CreateTime)
+        //        {
+        //            _CreateTime = value;
+        //            OnPropertyChanged(nameof(CreateTime));
+        //        }
+        //    }
+        //}
+        //private DateTime _CreateTime;
+
+
+
+        ///// <summary>
+        ///// 创建者
+        ///// </summary>
+        //[AutoViewProperty("创建者", Icon = "", Visibility = Visibility.Collapsed)]
+        //[Column(T_Col_Name.App_HongShi_TaskInfo.CreateUser_Str)]
+        //public string CreateUser
+        //{
+        //    get { return _CreateUser; }
+        //    set
+        //    {
+        //        if (value != _CreateUser)
+        //        {
+        //            _CreateUser = value;
+        //            OnPropertyChanged(nameof(CreateUser));
+        //        }
+        //    }
+        //}
+        //private string _CreateUser;
+
+
+
+
+        ///// <summary>
+        ///// 修改时间
+        ///// </summary>
+        //[AutoViewProperty("修改时间", Icon = "")]
+        //[Column(T_Col_Name.App_HongShi_TaskInfo.ModifyTime_Dt)]
+        //public DateTime ModifyTime
+        //{
+        //    get { return _ModifyTime; }
+        //    set
+        //    {
+        //        if (value != _ModifyTime)
+        //        {
+        //            _ModifyTime = value;
+        //            OnPropertyChanged(nameof(ModifyTime));
+        //        }
+        //    }
+        //}
+        //private DateTime _ModifyTime;
+
+
+        ///// <summary>
+        ///// 修改者
+        ///// </summary>
+        //[AutoViewProperty("修改者", Icon = "")]
+        //[Column(T_Col_Name.App_HongShi_TaskInfo.ModifyUser_Str)]
+        //public DateTime ModifyUser
+        //{
+        //    get { return _ModifyUser; }
+        //    set
+        //    {
+        //        if (value != _ModifyUser)
+        //        {
+        //            _ModifyUser = value;
+        //            OnPropertyChanged(nameof(ModifyUser));
+        //        }
+        //    }
+        //}
+        //private DateTime _ModifyUser;
+
+
     }
 }

+ 0 - 1
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmDeviceState.xaml

@@ -24,7 +24,6 @@
                         <DataTrigger Binding="{Binding DeviceState_Str}" Value="加工中">
                             <Setter Property="Background" Value="LightGreen"/>
                         </DataTrigger>
-
                     </Style.Triggers>
                 </Style>
             </wpfcontrol:SmartGrid.CellStyle>

+ 1 - 0
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmHistoryQuery.xaml.cs

@@ -22,6 +22,7 @@ namespace SCADA_DAQ.Customer
 {
     /// <summary>
     /// UctFrmHistoryQuery.xaml 的交互逻辑
+    /// 废弃
     /// </summary>
     [UctMenu("数据查询", Icon = "查询")]
     public partial class UctFrmHistoryQuery : BaseUctFrm

+ 1 - 0
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmManager.xaml.cs

@@ -19,6 +19,7 @@ namespace SCADA_DAQ.Customer
 {
     /// <summary>
     /// UctFrmManager.xaml 的交互逻辑
+    /// 废弃
     /// </summary>
     /// 
     [UctMenu("管理界面",Icon ="看板")]

+ 1 - 0
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmOrderIssue.xaml.cs

@@ -18,6 +18,7 @@ namespace SCADA_DAQ.Customer
 {
     /// <summary>
     /// UctFrmOrderMonitor.xaml 的交互逻辑
+    /// 废弃
     /// </summary>
     /// 
     [UctMenu("订单任务下发", Icon = "ArrowUpDownLine")]

+ 1 - 5
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessing.xaml

@@ -57,11 +57,7 @@
                             <DataGridTextColumn Header="图号" Binding="{Binding DrawNo}"/>
                             <DataGridTextColumn Header="机床编号" Binding="{Binding ToolNo}"/>
                             <DataGridTextColumn Header="加工状态" Binding="{Binding TaskState}"/>
-                            <!--<wpfcontrol:SmartGrid.HeaderExControl>
-                                <wpfcontrol:IconButton ButtonKind="OkButton" ButtonStyle="Success"
-                                    Title="加工" Margin="8" Cursor="Hand" FontSize="20"/>
-                             </wofcontrol:SmartGrid.HeaderExControlx>-->
-                             <DataGridTemplateColumn Header="操作" Width="150">
+                            <DataGridTemplateColumn Header="操作" Width="150">
                                 <DataGridTemplateColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">

+ 2 - 1
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessing.xaml.cs

@@ -25,8 +25,9 @@ namespace SCADA_DAQ.Customer
 {
     /// <summary>
     /// UctFrmProcessing.xaml 的交互逻辑
+    /// 废弃
     /// </summary>
-    [UctMenu("加工管理", Icon = "看板")]
+    [UctMenu("加工界面", Icon = "看板")]
     public partial class UctFrmProcessing : BaseUctFrm
     {
         // 数据库对象

+ 93 - 28
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessingManagement.xaml

@@ -9,46 +9,80 @@
              mc:Ignorable="d" 
              x:Name="this"
              d:DesignHeight="450" 
-             xmlns:model="clr-namespace:SCADA_DAQ.Customer.Models.ProcessingManagement"
-             x:TypeArguments="model:QueryProcessingModel"
              d:DesignWidth="800">
-    
-    <!--多表联动-->
-    <!--<wpfcontrol:QueryFrm x:Name="FrmQuery">
-        <wpfcontrol:SmartGrid x:Name="MainGrid" SelectionUnit="CellOrRowHeader" IsAutoUpdate="True" 
-                              CanUserDeleteRows="{Binding IsAdmin,ElementName=this}" 
-                              AutoGenerateColumns="True" IsReadOnly="{Binding IsReadOnly,ElementName=this}">
-            <wpfcontrol:SmartGrid.ChildContent >
-                <wpfcontrol:SmartGrid x:Name="ChildGrid" SelectionUnit="CellOrRowHeader" IsAutoUpdate="True" 
-                              CanUserDeleteRows="{Binding IsAdmin,ElementName=this}" 
-                              AutoGenerateColumns="True" IsReadOnly="{Binding IsReadOnly,ElementName=this}">
-                </wpfcontrol:SmartGrid>
-            </wpfcontrol:SmartGrid.ChildContent>
-        </wpfcontrol:SmartGrid>
-    </wpfcontrol:QueryFrm>-->
+
+    <!--xmlns:model="clr-namespace:SCADA_DAQ.Customer.Models.ProcessingManagement"
+             x:TypeArguments="model:QueryProcessingModel"-->
     <Grid>
         <Grid.RowDefinitions>
             <RowDefinition Height="1*"/>
             <RowDefinition Height="1*"/>
         </Grid.RowDefinitions>
         <wpfcontrol:QueryFrm x:Name="FrmQuery" Grid.Row="0">
-            <wpfcontrol:SmartGrid x:Name="MainGrid" SelectionUnit="FullRow" IsAutoUpdate="True" 
+            <wpfcontrol:SmartGrid x:Name="MainGrid" SelectionUnit="FullRow" IsAutoUpdate="False"
                                   CanUserDeleteRows="{Binding IsAdmin,ElementName=this}" 
-                                  AutoGenerateColumns="True" IsReadOnly="True"
-                                  MouseDoubleClick="MainGrid_MouseDoubleClick">
+                                  AutoGenerateColumns="True" IsReadOnly="True">
+                <wpfcontrol:SmartGrid.HeaderExControl>
+                    <wpfcontrol:IconButton ButtonKind="AddButton" ButtonStyle="Warning"
+                                    Title="开始加工" Margin="10" Cursor="Hand" FontSize="13"
+                                    Tag="Start"
+                                    Click="IconButton_Click"/>
+                </wpfcontrol:SmartGrid.HeaderExControl>
+                <wpfcontrol:SmartGrid.RowStyle>
+                    <Style TargetType="DataGridRow">
+                        <Setter Property="Height" Value="25" />
+                    </Style>
+                </wpfcontrol:SmartGrid.RowStyle>
                 <wpfcontrol:SmartGrid.Columns>
-                    <DataGridTemplateColumn Header="选择">
+                    <DataGridTextColumn Header="创建时间" Binding="{Binding CreateTime_Dt}" Visibility="Visible"/>
+                    <DataGridTextColumn Header="创建者" Binding="{Binding CreateUser_Str}" Visibility="Collapsed"/>
+                    <DataGridTextColumn Header="修改时间" Binding="{Binding ModifyTime_Dt}" Visibility="Collapsed"/>
+                    <DataGridTextColumn Header="修改者" Binding="{Binding ModifyUser_Str}" Visibility="Collapsed"/>
+                    <!--<DataGridTemplateColumn Header="操作" Width="auto">
                         <DataGridTemplateColumn.CellTemplate>
                             <DataTemplate>
-                                <CheckBox x:Name="DepPatientCheckBox" Margin="10,0,0,0"/>
+                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
+                                    <wpfcontrol:IconButton ButtonKind="AddButton" ButtonStyle="Warning"
+                                                    Title="开始加工" Margin="2" Cursor="Hand" FontSize="11" 
+                                                    Tag="{Binding OrderNo_Str}"
+                                                    Click="IconButton_Click" />
+                                </StackPanel>
                             </DataTemplate>
                         </DataGridTemplateColumn.CellTemplate>
-                    </DataGridTemplateColumn>
+                    </DataGridTemplateColumn>-->
                 </wpfcontrol:SmartGrid.Columns>
-                <wpfcontrol:SmartGrid.HeaderExControl>
-                    <wpfcontrol:IconButton ButtonKind="AddButton" ButtonStyle="Warning"
-                                    Title="开始加工" Margin="10" Cursor="Hand" FontSize="13"/>
-                </wpfcontrol:SmartGrid.HeaderExControl>
+                <!--<wpfcontrol:SmartGrid.Columns>
+                    <DataGridTemplateColumn Header="" Width="auto" DisplayIndex="0">
+                        <DataGridTemplateColumn.HeaderTemplate>
+                            <DataTemplate>
+                                <StackPanel Orientation="Horizontal">
+                                    <CheckBox x:Name="SelectAllCheckBox" Margin="10,0,0,0" Content="全选"
+                                              Click="SelectAllPatientInDep_Click"></CheckBox>
+                                </StackPanel>
+                            </DataTemplate>
+                        </DataGridTemplateColumn.HeaderTemplate>
+                        <DataGridTemplateColumn.CellTemplate>
+                            <DataTemplate>
+                                <CheckBox Name="CkbItem" IsChecked="{Binding IsCheckBinding,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" 
+                                          Click="CkbItem_OnClick"  HorizontalAlignment="Center"></CheckBox>
+                            </DataTemplate>
+                        </DataGridTemplateColumn.CellTemplate>
+                    </DataGridTemplateColumn>
+                    <DataGridTextColumn Header="计划部门" Binding="{Binding ProjectDivision_Str}"/>
+                    <DataGridTextColumn Header="车间号" Binding="{Binding WorkShopID_Str}"/>
+                    <DataGridTextColumn Header="设备名称" Binding="{Binding DeviceName_Str}"/>
+                    <DataGridTextColumn Header="机床编号" Binding="{Binding ToolNo_Str}"/>
+                    <DataGridTextColumn Header="计划单号" Binding="{Binding PlanNo_Str}"/>
+                    <DataGridTextColumn Header="订单编号" Binding="{Binding OrderNo_Str}"/>
+                    <DataGridTextColumn Header="工件名称" Binding="{Binding WorkPieceName_Str}"/>
+                    <DataGridTextColumn Header="操作编号" Binding="{Binding OperationNo_Str}"/>
+                    <DataGridTextColumn Header="图号" Binding="{Binding DrawNumber_Str}"/>
+                    <DataGridTextColumn Header="计划数量" Binding="{Binding PlanPiecesNumber_Int}"/>
+                    <DataGridTextColumn Header="加工状态" Binding="{Binding TaskState_Str}"/>
+                    <DataGridTextColumn Header="操作员" Binding="{Binding OperatorName_Str}"/>
+                    <DataGridCheckBoxColumn Header="人脸识别" Binding="{Binding IsFaceRecognition_Bool}"/>
+                    <DataGridCheckBoxColumn Header="刷卡上岗" Binding="{Binding IsCardOnline_Bool}"/>
+                </wpfcontrol:SmartGrid.Columns>-->
             </wpfcontrol:SmartGrid>
         </wpfcontrol:QueryFrm>
         <wpfcontrol:QueryFrm x:Name="ChildFrmQuery" Grid.Row="1">
@@ -62,11 +96,42 @@
                             <ColumnDefinition/>
                         </Grid.ColumnDefinitions>
                         <wpfcontrol:IconButton ButtonKind="OkButton" ButtonStyle="Success"
-                                    Title="完成加工" Margin="10" Cursor="Hand" FontSize="13"/>
+                                    Title="完成加工" Margin="10" Cursor="Hand" FontSize="13"
+                                    Tag="Done"
+                                    Click="IconButton_Click"/>
                         <wpfcontrol:IconButton ButtonKind="CancelButton" ButtonStyle="Danger"
-                                    Title="取消加工" Margin="0" Cursor="Hand" FontSize="13" Grid.Column="1"/>
+                                    Title="取消加工" Margin="0" Cursor="Hand" FontSize="13" Grid.Column="1"
+                                    Tag="Cancel"
+                                    Click="IconButton_Click"/>
                     </Grid>
                 </wpfcontrol:SmartGrid.HeaderExControl>
+                <wpfcontrol:SmartGrid.RowStyle>
+                    <Style TargetType="DataGridRow">
+                        <Setter Property="Height" Value="25" />
+                    </Style>
+                </wpfcontrol:SmartGrid.RowStyle>
+                <wpfcontrol:SmartGrid.Columns>
+                    <DataGridTextColumn Header="创建时间" Binding="{Binding CreateTime_Dt}" Visibility="Visible"/>
+                    <DataGridTextColumn Header="创建者" Binding="{Binding CreateUser_Str}" Visibility="Collapsed"/>
+                    <DataGridTextColumn Header="修改时间" Binding="{Binding ModifyTime_Dt}" Visibility="Collapsed"/>
+                    <DataGridTextColumn Header="修改者" Binding="{Binding ModifyUser_Str}" Visibility="Collapsed"/>
+                    <!--<DataGridTemplateColumn Header="操作" Width="auto">
+                        <DataGridTemplateColumn.CellTemplate>
+                            <DataTemplate>
+                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
+                                    <wpfcontrol:IconButton ButtonKind="OkButton" ButtonStyle="Success"
+                                                    Title="完成加工" Margin="2" Cursor="Hand" FontSize="11"
+                                                    Tag="{Binding OrderNo}"
+                                                    Click="ProcessedButton_Click" />
+                                    <wpfcontrol:IconButton ButtonKind="CancelButton" ButtonStyle="Danger"
+                                                    Title="取消加工" Margin="2" Cursor="Hand" FontSize="11" 
+                                                    Tag="{Binding OrderNo}"
+                                                    Click="CancelProcessingButton_Click" />
+                                </StackPanel>
+                            </DataTemplate>
+                        </DataGridTemplateColumn.CellTemplate>
+                    </DataGridTemplateColumn>-->
+                </wpfcontrol:SmartGrid.Columns>
             </wpfcontrol:SmartGrid>
         </wpfcontrol:QueryFrm>
     </Grid>

+ 87 - 22
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmProcessingManagement.xaml.cs

@@ -31,7 +31,7 @@ namespace SCADA_DAQ.Customer
     /// UctFrmHistoryQuery.xaml 的交互逻辑
     /// </summary>
     [UctMenu("加工管理", Icon = "看板")]
-    public partial class UctFrmProcessingManagement : BaseUctFrm<QueryProcessingModel>
+    public partial class UctFrmProcessingManagement : BaseUctFrm
     {
         /// <summary>
         /// 
@@ -39,26 +39,96 @@ namespace SCADA_DAQ.Customer
         public UctFrmProcessingManagement()
         {
             InitializeComponent();
-            FrmQuery.QueryModel = QueryModel;
-            QueryProcessingModel queryProcessingModel = new QueryProcessingModel();
-            ChildFrmQuery.QueryModel = queryProcessingModel;
+            //FrmQuery.QueryModel = QueryModel;
+            //QueryProcessingModel queryProcessingModel = new QueryProcessingModel();
+            //ChildFrmQuery.QueryModel = queryProcessingModel;
+            FrmQuery.QueryModel = new QueryProcessingModel() { TaskState = "待加工" };
+            ChildFrmQuery.QueryModel = new QueryProcessingModel() { TaskState = "加工中" };
 
             var column = SmartGridHeaderMapping.CreateMapping<TaskManagementModel>();
+            column.Remove(T_Col_Name.App_HongShi_TaskInfo.PlanCost_Str);
             column.Remove(T_Col_Name.App_HongShi_TaskInfo.QCConfirmMark_Str);
             column.Remove(T_Col_Name.App_HongShi_TaskInfo.PiecesDoneNumber_Int);
             column.Remove(T_Col_Name.App_HongShi_TaskInfo.PiecesLackNumber_Int);
-            column.Add("选择", new SmartGridHeaderMapping("选择", false,typeof(bool)));
-
-            //指定绑定更新的表, SourceTable是用来更新的,更新的时候就会通过sourcetable来操作数据库
-            MainGrid.SourceTable = QueryModel.SourceTable;
             MainGrid.DataTableColumnLables = column;
-
-            ChildGrid.SourceTable = QueryModel.SourceTable;
             ChildGrid.DataTableColumnLables = column;
 
+            //MainGrid.CurrentCellChanged += MainGrid_CurrentCellChanged;
+        }
 
 
-            //MainGrid.CurrentCellChanged += MainGrid_CurrentCellChanged;
+        private void IconButton_Click(object sender, RoutedEventArgs e)
+        {
+            var grid = new SmartGrid();
+            string btTag = (sender as IconButton).Tag.ToString();  // 获取Tag
+            if (btTag == "Start")
+            {
+                grid = MainGrid;
+            }
+            else
+            {
+                grid = ChildGrid;
+            }
+
+            var res = false;
+            string filter = "";
+            string orderString = "";
+            int count = grid.SelectedItems.Count;
+
+            for (int i = 0; i < count; i++)
+            {
+                var drv = grid.SelectedItems[i] as DataRowView;
+                if (drv == null)
+                    continue;
+                if (i + 1 < count)
+                {
+                    filter += $"OrderNo_Str='{drv[T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str]?.ToString()}' OR ";
+                    orderString += $"{drv[T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str]?.ToString()}、";
+                }
+                else if (i + 1 == count)
+                {
+                    filter += $"OrderNo_Str='{drv[T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str]?.ToString()}'";
+                    orderString += $"{drv[T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str]?.ToString()}";
+                }
+            }
+
+            if (filter == null || filter == "")
+                return;
+            if (btTag == "Start")
+            {
+                if (System.Windows.MessageBox.Show($"是否开始加工{orderString}?", "提示", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
+                    return;
+                res = Env.SgIDAL.App_HongShi_TaskInfo.Update(filter,
+                    new UpdateItem(T_Col_Name.App_HongShi_TaskInfo.TaskState_Str, "加工中"));
+            }
+            else if (btTag == "Done")
+            {
+                if (System.Windows.MessageBox.Show($"是否完成加工{orderString}?", "提示", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
+                    return;
+                res = Env.SgIDAL.App_HongShi_TaskInfo.Update(filter,
+                    new UpdateItem(T_Col_Name.App_HongShi_TaskInfo.TaskState_Str, "已加工"));
+            }
+            else if (btTag == "Cancel")
+            {
+                if (System.Windows.MessageBox.Show($"是否取消加工{orderString}?", "提示", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
+                    return;
+                res = Env.SgIDAL.App_HongShi_TaskInfo.Update(filter,
+                    new UpdateItem(T_Col_Name.App_HongShi_TaskInfo.TaskState_Str, "待加工"));
+            }
+            else
+            {
+                ((IApp)System.Windows.Application.Current).ShowShortToast("操作失败,请重试!", ControlStyle.Warning);
+            }
+
+            if (res)
+            {
+                ((IApp)System.Windows.Application.Current).ShowShortToast("操作成功!", ControlStyle.Success);
+                Query();
+            }
+            else
+            {
+                ((IApp)System.Windows.Application.Current).ShowShortToast("操作失败,请重试!", ControlStyle.Warning);
+            }
         }
 
 
@@ -73,14 +143,12 @@ namespace SCADA_DAQ.Customer
             var item = ((DataRowView)((SmartGrid)sender).CurrentItem);
             //QCCheckModelValue.OrderNo = Convert.ToString(item[T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str]);
 
-            ShowChildWindow("", "确认加工", () => 
-            { 
-                return true; 
-            });
+            //ShowChildWindow("", "确认加工", () => 
+            //{ 
+            //    return true; 
+            //});
         }
 
-
-
         /// <summary>
         /// 表格选中事件
         /// </summary>
@@ -92,12 +160,9 @@ namespace SCADA_DAQ.Customer
             var orderNo = ((DataRowView)((SmartGrid)sender).CurrentItem)[T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str]?
                 .ToString();
 
-            ChildGrid.DataSource = Env.SgIDAL.App_HongShi_TaskInfo.GetData($"OrderNo_Str='{orderNo}'");
+            //ChildGrid.DataSource = Env.SgIDAL.App_HongShi_TaskInfo.GetData($"OrderNo_Str='{orderNo}'");
         }
 
-
-
-
         /// <summary>
         /// 查询
         /// </summary>
@@ -107,7 +172,7 @@ namespace SCADA_DAQ.Customer
             ChildFrmQuery.Query();
             base.Query();
         }
-    }
 
+    }
 
 }

+ 2 - 2
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmQCManagement.xaml

@@ -14,9 +14,9 @@
              d:DesignWidth="800">
 
     <wpfcontrol:QueryFrm x:Name="FrmQuery">
-        <wpfcontrol:SmartGrid x:Name="MainGrid" SelectionUnit="FullRow" IsAutoUpdate="True" 
+        <wpfcontrol:SmartGrid x:Name="MainGrid" SelectionUnit="CellOrRowHeader" IsAutoUpdate="True" 
                               CanUserDeleteRows="{Binding IsAdmin,ElementName=this}" 
-                              AutoGenerateColumns="True" IsReadOnly="True"
+                              AutoGenerateColumns="True" IsReadOnly="{Binding IsReadOnly,ElementName=this}"
                               MouseDoubleClick="MainGrid_MouseDoubleClick">
         </wpfcontrol:SmartGrid>
     </wpfcontrol:QueryFrm>

+ 16 - 11
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmQCManagement.xaml.cs

@@ -47,24 +47,29 @@ namespace SCADA_DAQ.Customer
             //MainGrid.DataTableColumnLables = SmartGridHeaderMapping.CreateMapping<TaskManagementModel>();
             MainGrid.DataTableColumnLables = new Dictionary<string, SmartGridHeaderMapping>()
             {
-                {T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str,new SmartGridHeaderMapping("订单编号",false,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.OrderNo_Str,new SmartGridHeaderMapping("订单编号",true,null) },
                 {T_Col_Name.App_HongShi_TaskInfo.QCConfirmMark_Str,new SmartGridHeaderMapping("品控结果",false,null) },
                 {T_Col_Name.App_HongShi_TaskInfo.TaskState_Str,new SmartGridHeaderMapping("订单状态",false,null) },
                 {T_Col_Name.App_HongShi_TaskInfo.PlanPiecesNumber_Int,new SmartGridHeaderMapping("计划数量",false,null) },
                 {T_Col_Name.App_HongShi_TaskInfo.PiecesDoneNumber_Int,new SmartGridHeaderMapping("完成数量",false,null) },
                 {T_Col_Name.App_HongShi_TaskInfo.PiecesLackNumber_Int,new SmartGridHeaderMapping("缺料数量",false,null) },
                 {T_Col_Name.App_HongShi_TaskInfo.ProjectDivision_Str,new SmartGridHeaderMapping("计划部",true,null) },
-                {T_Col_Name.App_HongShi_TaskInfo.WorkShopID_Str,new SmartGridHeaderMapping("车间号",false,null) },
-                {T_Col_Name.App_HongShi_TaskInfo.DeviceName_Str,new SmartGridHeaderMapping("设备名称",false,null) },
-                {T_Col_Name.App_HongShi_TaskInfo.ToolNo_Str,new SmartGridHeaderMapping("机床编号",false,null) },
-                {T_Col_Name.App_HongShi_TaskInfo.PlanNo_Str,new SmartGridHeaderMapping("计划单号",false,null) },
-                {T_Col_Name.App_HongShi_TaskInfo.WorkPieceName_Str,new SmartGridHeaderMapping("工件名称",false,null) },
-                {T_Col_Name.App_HongShi_TaskInfo.DrawNumber_Str,new SmartGridHeaderMapping("图号",false,null) },                
-                {T_Col_Name.App_HongShi_TaskInfo.PlanCost_Str,new SmartGridHeaderMapping("计划成本",false,null) },
-                {T_Col_Name.App_HongShi_TaskInfo.OperationNo_Str,new SmartGridHeaderMapping("操作编号",false,null) },                
-                {T_Col_Name.App_HongShi_TaskInfo.OperatorName_Str,new SmartGridHeaderMapping("操作员",false,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.WorkShopID_Str,new SmartGridHeaderMapping("车间号",true,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.DeviceName_Str,new SmartGridHeaderMapping("设备名称",true,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.ToolNo_Str,new SmartGridHeaderMapping("机床编号",true,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.PlanNo_Str,new SmartGridHeaderMapping("计划单号",true,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.WorkPieceName_Str,new SmartGridHeaderMapping("工件名称",true,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.DrawNumber_Str,new SmartGridHeaderMapping("图号",true,null) },                
+                {T_Col_Name.App_HongShi_TaskInfo.PlanCost_Str,new SmartGridHeaderMapping("计划成本",true,null) },
+                {T_Col_Name.App_HongShi_TaskInfo.OperationNo_Str,new SmartGridHeaderMapping("操作编号",true,null) },                
+                {T_Col_Name.App_HongShi_TaskInfo.OperatorName_Str,new SmartGridHeaderMapping("操作员",true,null) },
             };
-           
+            MainGrid.DataTableColumnLables[T_Col_Name.App_HongShi_TaskInfo.TaskState_Str].OptionItems
+                = new Dictionary<string, string>()
+                { {"待加工","待加工" }, {"加工中","加工中" },{"已加工","已加工" } };
+            MainGrid.DataTableColumnLables[T_Col_Name.App_HongShi_TaskInfo.TaskState_Str].DisplayMemberPath = "Key";
+            MainGrid.DataTableColumnLables[T_Col_Name.App_HongShi_TaskInfo.TaskState_Str].SelectedValuePath = "Value";
+
         }
 
 

+ 2 - 1
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmTaskManagement.xaml.cs

@@ -37,7 +37,8 @@ namespace SCADA_DAQ.Customer
             FrmQuery.QueryModel = QueryModel;
             //DAL = Env.DAL;
             DAL = Env.SgIDAL;
-            MainGrid.SourceTable = QueryModel.SourceTable;   //指定绑定更新的表
+            //指定绑定更新的表, SourceTable是用来更新的,更新的时候就会通过sourcetable来操作数据库
+            MainGrid.SourceTable = QueryModel.SourceTable; 
             MainGrid.DataTableColumnLables = SmartGridHeaderMapping.CreateMapping<TaskManagementModel>();
             MainGrid.DataTableColumnLables[T_Col_Name.App_HongShi_TaskInfo.TaskState_Str].OptionItems
                 = new Dictionary<string, string>()

+ 1 - 0
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmTaskQuery.xaml.cs

@@ -21,6 +21,7 @@ namespace SCADA_DAQ.Customer
 {
     /// <summary>
     /// UctFrmTaskQuery.xaml 的交互逻辑
+    /// 废弃
     /// </summary>
     /// 
     [UctMenu("订单详情",Icon = "Calendar2Fill")]

+ 2 - 1
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Env.cs

@@ -27,7 +27,8 @@ namespace SCADA_DAQ
         public static DILDB DAL = null;
 
         // SQL Server
-        public static SqlSchema.DIL.DILDB SgIDAL = new SqlSchema.DIL.DILDB("127.0.0.1", "HS_DB", "sa", "M+123456");
+        //public static SqlSchema.DIL.DILDB SgIDAL = new SqlSchema.DIL.DILDB("127.0.0.1", "HS_DB", "sa", "M+123456");
+        public static SqlSchema.DIL.DILDB SgIDAL = new SqlSchema.DIL.DILDB("192.168.1.7", "HS_DB", "sa", "M+123456");
         //public static SqlSchema.DIL.DILDB SgIDAL = new SqlSchema.DIL.DILDB("192.168.5.150", "HS_DB", "sa", "M+123456");
 
         public static bool EnvInitFinish = false;

File diff suppressed because it is too large
+ 0 - 0
aliyun_eicp3.0/skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/SCADA_DAQ.csproj


Some files were not shown because too many files changed in this diff