报工添加效率原因,影响时间

master
zhaojian 1 year ago
parent a7a627ef40
commit d58ae4f823

@ -594,7 +594,7 @@ VALUES
/// <param name="edt"></param> /// <param name="edt"></param>
/// <returns></returns> /// <returns></returns>
public List<string> GetExecuteReportWorkSql(DataRowView selectRow, string orderQuntity, string workCount, string reportCode, string workTime, string userCount, string costCenter, string batchCode, public List<string> GetExecuteReportWorkSql(DataRowView selectRow, string orderQuntity, string workCount, string reportCode, string workTime, string userCount, string costCenter, string batchCode,
string isEndReport, string deviceCode, Dictionary<int, string> workTimeDic, Dictionary<int, string> userCountDic) string isEndReport, string deviceCode, Dictionary<int, string> workTimeDic, Dictionary<int, string> userCountDic,string xiaolv,string shijian)
{ {
string getReportCodeSql = $@"SELECT equipment_code,equipment_name FROM [dbo].[base_equipment] WHERE equipment_code='{deviceCode}'"; string getReportCodeSql = $@"SELECT equipment_code,equipment_name FROM [dbo].[base_equipment] WHERE equipment_code='{deviceCode}'";
string lineName = ""; string lineName = "";
@ -641,7 +641,7 @@ VALUES
'{selectRow["product_spc"]}', '{selectRow["unit"]}', {selectRow["batch_quantity"]}, {workCount}, 0, 0, '{selectRow["product_spc"]}', '{selectRow["unit"]}', {selectRow["batch_quantity"]}, {workCount}, 0, 0,
'{LoginUser.UserCode}', '{LoginUser.UserName}', 'PC', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', 'PREPARE', '{LoginUser.UserCode}', '{LoginUser.UserName}', 'PC', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', 'PREPARE',
'无', '{workTime}', '{deviceCode}', '{lineName}', N'{LoginUser.TeamCode}', '{selectRow["shift_id"]}', '无', '{workTime}', '{deviceCode}', '{lineName}', N'{LoginUser.TeamCode}', '{selectRow["shift_id"]}',
NULL, NULL, NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{xiaolv}', '{shijian}', NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}',
'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', '0', NULL, 'prod', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', '0', NULL, 'prod',
{userCount}, '{costCenter}','0','{batchCode}','{isEndReport}','{0}','{LoginUser.CurrDeviceIP}','{LoginUser.Version}');"; {userCount}, '{costCenter}','0','{batchCode}','{isEndReport}','{0}','{LoginUser.CurrDeviceIP}','{LoginUser.Version}');";

@ -363,7 +363,22 @@ where detail.parent_work_order ='{workorder}' and detail.del_flag = '0'";
} }
return null; return null;
} }
/// <summary>
/// 查询效率原因
/// </summary>
/// <param name="workorder"></param>
/// <returns></returns>
public DataTable GetBatcxiaolvCount()
{
//string sql = $" select count(*) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0'";
string sql = $@" SELECT * FROM [dbo].[sys_dict_data] where dict_type='mes_efficiency_reasons'";
DataSet dtset = Utils.cloudDBHelper.getDataSet(sql);
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
{
return dtset.Tables[0];
}
return null;
}
public bool IsLastBatchReport(string batchNo) public bool IsLastBatchReport(string batchNo)
{ {
//string sql = $" select count(*) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0'"; //string sql = $" select count(*) from mes_report_work where workorder_code = '{workorder}' AND del_flag='0'";

@ -12,149 +12,149 @@
<ResourceDictionary> <ResourceDictionary>
<!--ComboBox下拉按钮--> <!--ComboBox下拉按钮-->
<Style TargetType="ToggleButton" x:Key="ComboxStyleBtn"> <Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate> <ControlTemplate>
<Border x:Name="Back" Background="#F7FDF7" BorderThickness="1" BorderBrush="Transparent"> <Border x:Name="Back" Background="#F7FDF7" BorderThickness="1" BorderBrush="Transparent">
<Path Name="PathFill" Fill="Blue" Width="8" Height="6" StrokeThickness="0" Data="M5,0 L10,10 L0,10 z" RenderTransformOrigin="0.5,0.5" Stretch="Fill"> <Path Name="PathFill" Fill="Blue" Width="8" Height="6" StrokeThickness="0" Data="M5,0 L10,10 L0,10 z" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
<Path.RenderTransform> <Path.RenderTransform>
<TransformGroup> <TransformGroup>
<ScaleTransform/> <ScaleTransform/>
<SkewTransform/> <SkewTransform/>
<RotateTransform Angle="180"/> <RotateTransform Angle="180"/>
<TranslateTransform/> <TranslateTransform/>
</TransformGroup> </TransformGroup>
</Path.RenderTransform> </Path.RenderTransform>
</Path> </Path>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="PathFill" Property="Fill" Value="White"></Setter> <Setter TargetName="PathFill" Property="Fill" Value="White"></Setter>
<Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter> <Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter>
<Setter TargetName="Back" Property="BorderBrush" Value="#3697A4"></Setter> <Setter TargetName="Back" Property="BorderBrush" Value="#3697A4"></Setter>
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style TargetType="ComboBox" x:Key="ComboBoxStyle"> <Style TargetType="ComboBox" x:Key="ComboBoxStyle">
<Setter Property="ItemContainerStyle"> <Setter Property="ItemContainerStyle">
<Setter.Value> <Setter.Value>
<!--ComBoxItem #59CA4F #81D779--> <!--ComBoxItem #59CA4F #81D779-->
<Style TargetType="ComboBoxItem"> <Style TargetType="ComboBoxItem">
<Setter Property="Height" Value="60"></Setter> <Setter Property="Height" Value="60"></Setter>
<Setter Property="MinHeight" Value="22"></Setter> <Setter Property="MinHeight" Value="22"></Setter>
<Setter Property="MinWidth" Value="60"></Setter> <Setter Property="MinWidth" Value="60"></Setter>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="ComboBoxItem"> <ControlTemplate TargetType="ComboBoxItem">
<Border Name="Back" Background="Transparent" CornerRadius="5,5,5,5" <Border Name="Back" Background="Transparent" CornerRadius="5,5,5,5"
RenderTransformOrigin="0.5,0.5" BorderThickness="0,0,0,0" BorderBrush="Blue" > RenderTransformOrigin="0.5,0.5" BorderThickness="0,0,0,0" BorderBrush="Blue" >
<ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></ContentPresenter> <ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></ContentPresenter>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="LightGray"></Setter> <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
</Trigger> </Trigger>
<Trigger Property="IsHighlighted" Value="True"> <Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Back" Property="Background" Value="LightGray"></Setter> <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="ComboBox"> <ControlTemplate TargetType="ComboBox">
<Grid Background="#F7FDF7"> <Grid Background="#F7FDF7">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.7*"/> <ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*" MaxWidth="30"/> <ColumnDefinition Width="0.3*" MaxWidth="30"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="PART_EditableTextBox" Grid.Column="0" IsReadOnly="{TemplateBinding IsReadOnly}" FontSize="18" VerticalContentAlignment="Center" Text="{TemplateBinding Text}"></TextBox> <TextBox x:Name="PART_EditableTextBox" Grid.Column="0" IsReadOnly="{TemplateBinding IsReadOnly}" FontSize="18" VerticalContentAlignment="Center" Text="{TemplateBinding Text}"></TextBox>
<Border Grid.Column="0" BorderThickness="1,1,0,1" BorderBrush="LightGray" CornerRadius="1,0,0,1"> <Border Grid.Column="0" BorderThickness="1,1,0,1" BorderBrush="LightGray" CornerRadius="1,0,0,1">
</Border>
<Border Grid.Column="1" BorderThickness="0,1,1,1" BorderBrush="LightGray" CornerRadius="0,1,1,0">
<ToggleButton Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
</Border>
<Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
<Border CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
<Border.Effect>
<DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="0.5"/>
</Border.Effect>
<ScrollViewer Margin="4,6,4,6" Style="{DynamicResource ScrollViewerStyle}" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
<!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="White"/>
</ScrollViewer>
</Border> </Border>
</Popup> <Border Grid.Column="1" BorderThickness="0,1,1,1" BorderBrush="LightGray" CornerRadius="0,1,1,0">
</Grid> <ToggleButton Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
</ControlTemplate> </Border>
</Setter.Value> <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
</Setter> <Border CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
</Style> <Border.Effect>
<Style TargetType="TextBox"> <DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="0.5"/>
<Setter Property="Height" Value="40"/> </Border.Effect>
<Setter Property="Margin" Value="5"/> <ScrollViewer Margin="4,6,4,6" Style="{DynamicResource ScrollViewerStyle}" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
<Setter Property="Background" Value="Red"></Setter> <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
<Setter Property="VerticalContentAlignment" Value="Center"/> <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="White"/>
<Setter Property="Template" > </ScrollViewer>
<Setter.Value> </Border>
<ControlTemplate TargetType="TextBox"> </Popup>
<Border BorderThickness="2" CornerRadius="8" Background="#f2f3f5"> </Grid>
<ScrollViewer x:Name="PART_ContentHost" /> </ControlTemplate>
</Border> </Setter.Value>
</ControlTemplate> </Setter>
</Setter.Value> </Style>
</Setter> <Style TargetType="TextBox">
</Style> <Setter Property="Height" Value="40"/>
<Style TargetType="Label"> <Setter Property="Margin" Value="5"/>
<Setter Property="Margin" Value="15,0,0,0"/> <Setter Property="Background" Value="Red"></Setter>
<Setter Property="Foreground" Value="Black"/> <Setter Property="VerticalContentAlignment" Value="Center"/>
</Style> <Setter Property="Template" >
<Style x:Key="CustomCellStyle" TargetType="DataGridCell"> <Setter.Value>
<Setter Property="Foreground" Value="Black" /> <ControlTemplate TargetType="TextBox">
<Setter Property="TextBlock.TextAlignment" Value="Center" /> <Border BorderThickness="2" CornerRadius="8" Background="#f2f3f5">
<Setter Property="TextBlock.FontSize" Value="22" /> <ScrollViewer x:Name="PART_ContentHost" />
<Setter Property="BorderThickness" Value="0 0 1 1" /> </Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Label">
<Setter Property="Margin" Value="15,0,0,0"/>
<Setter Property="Foreground" Value="Black"/>
</Style>
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
<Setter Property="Foreground" Value="Black" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="TextBlock.FontSize" Value="22" />
<Setter Property="BorderThickness" Value="0 0 1 1" />
</Style> </Style>
<SolidColorBrush x:Key="EvenRowBackground" Color="#E0E0E0"/> <SolidColorBrush x:Key="EvenRowBackground" Color="#E0E0E0"/>
<SolidColorBrush x:Key="OddRowBackground" Color="#FFFFFF"/> <SolidColorBrush x:Key="OddRowBackground" Color="#FFFFFF"/>
<Style x:Key="DataGridRowStyle" TargetType="DataGridRow"> <Style x:Key="DataGridRowStyle" TargetType="DataGridRow">
<Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="BorderBrush" Value="LightGray"/> <Setter Property="BorderBrush" Value="LightGray"/>
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="{StaticResource EvenRowBackground}"/> <Setter Property="Background" Value="{StaticResource EvenRowBackground}"/>
<Style.Triggers> <Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> <Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="{StaticResource OddRowBackground}"/> <Setter Property="Background" Value="{StaticResource OddRowBackground}"/>
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style x:Key="btnKey" TargetType="Button"> <Style x:Key="btnKey" TargetType="Button">
<Setter Property="Width" Value="120"/> <Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="43"/> <Setter Property="Height" Value="43"/>
<Setter Property="Foreground" Value="White"/> <Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="22"/> <Setter Property="FontSize" Value="22"/>
<Setter Property="FontWeight" Value="Bold"/> <Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Right"/> <Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Template" > <Setter Property="Template" >
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Border x:Name="Back" Background="#2B7EE6" BorderThickness="2" CornerRadius="10"> <Border x:Name="Back" Background="#2B7EE6" BorderThickness="2" CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter> <Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter>
@ -162,24 +162,24 @@
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="btnCancelKey" TargetType="Button"> <Style x:Key="btnCancelKey" TargetType="Button">
<Setter Property="Width" Value="120"/> <Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="43"/> <Setter Property="Height" Value="43"/>
<Setter Property="Foreground" Value="Black"/> <Setter Property="Foreground" Value="Black"/>
<Setter Property="FontSize" Value="22"/> <Setter Property="FontSize" Value="22"/>
<Setter Property="FontWeight" Value="Bold"/> <Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Right"/> <Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Template" > <Setter Property="Template" >
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Border x:Name="Back" Background="#f2f3f5" BorderThickness="2" CornerRadius="10"> <Border x:Name="Back" Background="#f2f3f5" BorderThickness="2" CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter> <Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter>
@ -188,9 +188,9 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>
</Window.Resources> </Window.Resources>
<Grid > <Grid >
@ -207,63 +207,63 @@
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"> <ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Grid x:Name="MyGrid" Grid.Row="1" Grid.ColumnSpan="2"> <Grid x:Name="MyGrid" Grid.Row="1" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="当前工单:"></Label> <Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="当前工单:"></Label>
<Label x:Name="lbCurrOrderNo" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="202311010001" Width="260"></Label> <Label x:Name="lbCurrOrderNo" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="202311010001" Width="260"></Label>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="报工数量:"></Label> <Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="报工数量:"></Label>
<TextBox x:Name="txtQuantity" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtQuantity_TextChanged"></TextBox> <TextBox x:Name="txtQuantity" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtQuantity_TextChanged"></TextBox>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="2"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="2">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="辅助工时:"></Label> <Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="辅助工时:"></Label>
<TextBox x:Name="txtWorkTime" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtWorkTime_TextChanged"></TextBox> <TextBox x:Name="txtWorkTime" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtWorkTime_TextChanged"></TextBox>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="辅助人数:"></Label> <Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="辅助人数:"></Label>
<TextBox x:Name="txtUserCount" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtUserCount_TextChanged"></TextBox> <TextBox x:Name="txtUserCount" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtUserCount_TextChanged"></TextBox>
</StackPanel> </StackPanel>
<!--<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="3" Grid.Column="1"> <!--<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="3" Grid.Column="1">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="母单人数:"></Label> <Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="母单人数:"></Label>
<TextBox x:Name="txtFOUserCount" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtFOUserCount_TextChanged"></TextBox> <TextBox x:Name="txtFOUserCount" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtFOUserCount_TextChanged"></TextBox>
</StackPanel>--> </StackPanel>-->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="13" Grid.Column="0" Grid.ColumnSpan="2"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="13" Grid.Column="0" Grid.ColumnSpan="2">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="成本中心:"></Label> <Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="成本中心:"></Label>
<ComboBox x:Name="comboBoxCostCenter" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="360" Height="50" <ComboBox x:Name="comboBoxCostCenter" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="360" Height="50"
Style="{StaticResource ComboBoxStyle}" SelectionChanged="comboBoxCostCenter_SelectionChanged"></ComboBox> Style="{StaticResource ComboBoxStyle}" SelectionChanged="comboBoxCostCenter_SelectionChanged"></ComboBox>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="13" Grid.Column="1" Grid.ColumnSpan="2"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="13" Grid.Column="1" Grid.ColumnSpan="2">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="批 次 号:"></Label> <Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="批 次 号:"></Label>
<ComboBox x:Name="comboBoxBatch" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Margin="2,5,0,0" Width="360" Height="50" Style="{StaticResource ComboBoxStyle}"></ComboBox> <ComboBox x:Name="comboBoxBatch" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Margin="2,5,0,0" Width="360" Height="50" Style="{StaticResource ComboBoxStyle}"></ComboBox>
<TextBlock Text="* 不选批次号则默认为该工单报工&#x0a;* 不选批次号则无法创建批次成品检验任务" Foreground="Red" VerticalAlignment="Center" TextWrapping="Wrap" /> <TextBlock Text="* 不选批次号则默认为该工单报工&#x0a;* 不选批次号则无法创建批次成品检验任务" Foreground="Red" VerticalAlignment="Center" TextWrapping="Wrap" />
</StackPanel> </StackPanel>
</Grid> </Grid>
</ScrollViewer> </ScrollViewer>
<!--<Grid.Background> <!--<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
@ -333,8 +333,12 @@
<ScaleTransform ScaleX="2" ScaleY="2" /> <ScaleTransform ScaleX="2" ScaleY="2" />
</CheckBox.LayoutTransform> </CheckBox.LayoutTransform>
</CheckBox> </CheckBox>
<Label Grid.Row="2" FontSize="24" Content="效率原因:" Margin="230,20,313,0" ></Label>
<ComboBox x:Name="xiaolv" Grid.Row="2" FontSize="24" Margin="362,20,112,0" Style="{StaticResource ComboBoxStyle}"/>
<Label Grid.Row="2" FontSize="24" Content="影响时间:" Margin="10,20,545,0" Grid.Column="1"></Label>
<TextBox x:Name="txtWorkTime2" Grid.Row="2" FontSize="24" Margin="135,20,328,7" Grid.Column="1"/>
<Button x:Name="btnOK" Grid.Row="2" Grid.Column="1" Style="{StaticResource btnKey}" Content="确定" Margin="30,20,20,0" Click="btnOK_Click"/> <Button x:Name="btnOK" Grid.Row="2" Grid.Column="1" Style="{StaticResource btnKey}" Content="确定" Margin="30,20,20,0" Click="btnOK_Click"/>
<Button x:Name="btnCancel" Grid.Row="2" Grid.Column="1" Style="{StaticResource btnCancelKey}" Background="Gray" Content="取消" Margin="30,20,170,0" Click="btnCancel_Click"/> <Button x:Name="yingxiang" Grid.Row="2" Grid.Column="1" Style="{StaticResource btnCancelKey}" Background="Gray" Content="取消" Margin="30,20,170,0" Click="btnCancel_Click"/>
</Grid> </Grid>
</Grid> </Grid>
</Window> </Window>

@ -1,5 +1,6 @@
using CommonFunc; using CommonFunc;
using CommonFunc.Tools; using CommonFunc.Tools;
using HandyControl.Tools.Extension;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -98,6 +99,18 @@ namespace XGLFinishPro.Views
this.txtQuantity.Text = selectedRow["batch_quantity"].ToString(); this.txtQuantity.Text = selectedRow["batch_quantity"].ToString();
this.comboBoxBatch.Text = selectedRow["batch_code"].ToString(); this.comboBoxBatch.Text = selectedRow["batch_code"].ToString();
_siteCode = siteCode; _siteCode = siteCode;
DataTable dtCount = userDbWareHouse.GetBatcxiaolvCount();
if (dtCount!=null&& dtCount.Rows.Count>0)
{
if (dtCount != null && dtCount.Rows.Count > 0)
{
foreach (System.Data.DataRow row in dtCount.Rows)
{
xiaolv.Items.Add(row["dict_label"].ToString());
}
}
}
} }
private void btnCancel_Click(object sender, RoutedEventArgs e) private void btnCancel_Click(object sender, RoutedEventArgs e)
@ -362,8 +375,26 @@ namespace XGLFinishPro.Views
string isEndReport = _isEndReport == true ? "1" : "0"; string isEndReport = _isEndReport == true ? "1" : "0";
string xiaolv1 = "";
string shijian = "";
if (xiaolv.SelectedIndex==-1)
{
xiaolv1= null;
}
else
{
xiaolv1=xiaolv.SelectedItem.ToString();
}
if (txtWorkTime2.Text.IsNullOrEmpty())
{
shijian = null;
}
else
{
shijian = txtWorkTime2.Text;
}
//bool issucc = formingMachineService.ExecuteReportWork(selectedRow, _orderQuntity, _workQuntity, newReportCode, _workTime, _useMan, _costCenter, batchCode, isEndReport, _deviceCode); //bool issucc = formingMachineService.ExecuteReportWork(selectedRow, _orderQuntity, _workQuntity, newReportCode, _workTime, _useMan, _costCenter, batchCode, isEndReport, _deviceCode);
List<string> reportWorkSqlList = formingMachineService.GetExecuteReportWorkSql(selectedRow, _orderQuntity, _workQuntity, newReportCode, _workTime, _useMan, _costCenter, batchCode, isEndReport, _deviceCode, dicWorkTime, dicUserCount); List<string> reportWorkSqlList = formingMachineService.GetExecuteReportWorkSql(selectedRow, _orderQuntity, _workQuntity, newReportCode, _workTime, _useMan, _costCenter, batchCode, isEndReport, _deviceCode, dicWorkTime, dicUserCount, xiaolv1, shijian);
if (reportWorkSqlList.Count > 0) if (reportWorkSqlList.Count > 0)
{ {
if (AddConsumInfo(reportWorkSqlList, newReportCode)) if (AddConsumInfo(reportWorkSqlList, newReportCode))

Loading…
Cancel
Save