修改报工界面样式

master
zhaoaomin 2 years ago
parent 6a15770b57
commit e4811a1857

Binary file not shown.

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"> <asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="AutoUpdate.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" /> <assemblyIdentity name="AutoUpdate.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="HP" asmv2:product="AutoUpdate" xmlns="urn:schemas-microsoft-com:asm.v1" /> <description asmv2:publisher="AutoUpdate" asmv2:product="AutoUpdate" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" /> <deployment install="true" mapFileExtensions="true" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2"> <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.8" profile="Full" supportedRuntime="4.0.30319" /> <framework targetVersion="4.8" profile="Full" supportedRuntime="4.0.30319" />
@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Me9Xo9mBXudYE/51yJuvPG+bparg2CiQ+ufukPtZMoM=</dsig:DigestValue> <dsig:DigestValue>5nsrkfe5IXcthCM2+m3k9Y4yChx8IqJYU3f1Sxq/sG0=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

@ -49,7 +49,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>qnFKF+/3YlPAODyAGRSFG761uj8zOHLBVY6MUaXwrHc=</dsig:DigestValue> <dsig:DigestValue>RdMRkRfxKcw3U8ADB8Tu6YmAoNCF0PI0PcoxnRKNOUU=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"> <asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="AutoUpdate.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" /> <assemblyIdentity name="AutoUpdate.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="HP" asmv2:product="AutoUpdate" xmlns="urn:schemas-microsoft-com:asm.v1" /> <description asmv2:publisher="AutoUpdate" asmv2:product="AutoUpdate" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" /> <deployment install="true" mapFileExtensions="true" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2"> <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.8" profile="Full" supportedRuntime="4.0.30319" /> <framework targetVersion="4.8" profile="Full" supportedRuntime="4.0.30319" />
@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Me9Xo9mBXudYE/51yJuvPG+bparg2CiQ+ufukPtZMoM=</dsig:DigestValue> <dsig:DigestValue>5nsrkfe5IXcthCM2+m3k9Y4yChx8IqJYU3f1Sxq/sG0=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

@ -49,7 +49,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>qnFKF+/3YlPAODyAGRSFG761uj8zOHLBVY6MUaXwrHc=</dsig:DigestValue> <dsig:DigestValue>RdMRkRfxKcw3U8ADB8Tu6YmAoNCF0PI0PcoxnRKNOUU=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

@ -13,7 +13,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--显示图片和文本--> <!--显示图片和文本-->
<StackPanel Grid.Row="0" VerticalAlignment="Center" Orientation="Horizontal"> <StackPanel Grid.Row="0" VerticalAlignment="Center" Orientation="Horizontal">
<Image x:Name="MsgImg" Width="62" Height="62" Margin="40,20,20,20" > <!--<Image x:Name="MsgImg" Width="62" Height="62" Margin="40,20,20,20" >
<Image.Triggers> <Image.Triggers>
<EventTrigger RoutedEvent="Loaded"> <EventTrigger RoutedEvent="Loaded">
<EventTrigger.Actions> <EventTrigger.Actions>
@ -30,6 +30,17 @@
</EventTrigger.Actions> </EventTrigger.Actions>
</EventTrigger> </EventTrigger>
</Image.Triggers> </Image.Triggers>
</Image>-->
<Image x:Name="MsgImg" Width="62" Height="62" Margin="40,20,20,20">
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded" >
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="MsgImg" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:1" AutoReverse="True" RepeatBehavior="Forever"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image> </Image>
<TextBlock VerticalAlignment="Center" x:Name="TxtMsg" HorizontalAlignment="Left" Foreground="Black" TextWrapping="WrapWithOverflow" Width="280" TextAlignment="Left" <TextBlock VerticalAlignment="Center" x:Name="TxtMsg" HorizontalAlignment="Left" Foreground="Black" TextWrapping="WrapWithOverflow" Width="280" TextAlignment="Left"
FontSize="18"/> FontSize="18"/>

@ -1,182 +0,0 @@
#pragma checksum "..\..\..\HMessageBox.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "12563C2D2B6AD7A166FA845CB2A8EFEEB313B58285E5B146B127F1A94E3E7C1D"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using CommonFunc;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace CommonFunc {
/// <summary>
/// HMessageBox
/// </summary>
public partial class HMessageBox : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 16 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Image MsgImg;
#line default
#line hidden
#line 34 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock TxtMsg;
#line default
#line hidden
#line 41 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button OkButton;
#line default
#line hidden
#line 43 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button YesButton;
#line default
#line hidden
#line 45 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button NoButton;
#line default
#line hidden
#line 47 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button CancelButton;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/CommonFunc;component/hmessagebox.xaml", System.UriKind.Relative);
#line 1 "..\..\..\HMessageBox.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
#line 8 "..\..\..\HMessageBox.xaml"
((CommonFunc.HMessageBox)(target)).Closed += new System.EventHandler(this.Window_Closed);
#line default
#line hidden
#line 8 "..\..\..\HMessageBox.xaml"
((CommonFunc.HMessageBox)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
#line default
#line hidden
return;
case 2:
this.MsgImg = ((System.Windows.Controls.Image)(target));
return;
case 3:
this.TxtMsg = ((System.Windows.Controls.TextBlock)(target));
return;
case 4:
this.OkButton = ((System.Windows.Controls.Button)(target));
#line 41 "..\..\..\HMessageBox.xaml"
this.OkButton.Click += new System.Windows.RoutedEventHandler(this.OkButton_Click);
#line default
#line hidden
return;
case 5:
this.YesButton = ((System.Windows.Controls.Button)(target));
#line 43 "..\..\..\HMessageBox.xaml"
this.YesButton.Click += new System.Windows.RoutedEventHandler(this.YesButton_Click);
#line default
#line hidden
return;
case 6:
this.NoButton = ((System.Windows.Controls.Button)(target));
#line 45 "..\..\..\HMessageBox.xaml"
this.NoButton.Click += new System.Windows.RoutedEventHandler(this.NoButton_Click);
#line default
#line hidden
return;
case 7:
this.CancelButton = ((System.Windows.Controls.Button)(target));
#line 47 "..\..\..\HMessageBox.xaml"
this.CancelButton.Click += new System.Windows.RoutedEventHandler(this.CancelButton_Click);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

@ -1,182 +0,0 @@
#pragma checksum "..\..\..\HMessageBox.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "12563C2D2B6AD7A166FA845CB2A8EFEEB313B58285E5B146B127F1A94E3E7C1D"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using CommonFunc;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace CommonFunc {
/// <summary>
/// HMessageBox
/// </summary>
public partial class HMessageBox : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 16 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Image MsgImg;
#line default
#line hidden
#line 34 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock TxtMsg;
#line default
#line hidden
#line 41 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button OkButton;
#line default
#line hidden
#line 43 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button YesButton;
#line default
#line hidden
#line 45 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button NoButton;
#line default
#line hidden
#line 47 "..\..\..\HMessageBox.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button CancelButton;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/CommonFunc;component/hmessagebox.xaml", System.UriKind.Relative);
#line 1 "..\..\..\HMessageBox.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
#line 8 "..\..\..\HMessageBox.xaml"
((CommonFunc.HMessageBox)(target)).Closed += new System.EventHandler(this.Window_Closed);
#line default
#line hidden
#line 8 "..\..\..\HMessageBox.xaml"
((CommonFunc.HMessageBox)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
#line default
#line hidden
return;
case 2:
this.MsgImg = ((System.Windows.Controls.Image)(target));
return;
case 3:
this.TxtMsg = ((System.Windows.Controls.TextBlock)(target));
return;
case 4:
this.OkButton = ((System.Windows.Controls.Button)(target));
#line 41 "..\..\..\HMessageBox.xaml"
this.OkButton.Click += new System.Windows.RoutedEventHandler(this.OkButton_Click);
#line default
#line hidden
return;
case 5:
this.YesButton = ((System.Windows.Controls.Button)(target));
#line 43 "..\..\..\HMessageBox.xaml"
this.YesButton.Click += new System.Windows.RoutedEventHandler(this.YesButton_Click);
#line default
#line hidden
return;
case 6:
this.NoButton = ((System.Windows.Controls.Button)(target));
#line 45 "..\..\..\HMessageBox.xaml"
this.NoButton.Click += new System.Windows.RoutedEventHandler(this.NoButton_Click);
#line default
#line hidden
return;
case 7:
this.CancelButton = ((System.Windows.Controls.Button)(target));
#line 47 "..\..\..\HMessageBox.xaml"
this.CancelButton.Click += new System.Windows.RoutedEventHandler(this.CancelButton_Click);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

@ -280,7 +280,7 @@ VALUES
/// <param name="bdt"></param> /// <param name="bdt"></param>
/// <param name="edt"></param> /// <param name="edt"></param>
/// <returns></returns> /// <returns></returns>
public bool ExecuteReportWork(DataRowView selectRow,string workCount, string reportCode, string workTime, string userCount, string costCenter, string deviceCode) public bool ExecuteReportWork(DataRowView selectRow,string workCount, string reportCode, string workTime, string userCount, string costCenter, string batchCode, string isEndReport, string deviceCode)
{ {
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 = "";
@ -297,7 +297,7 @@ VALUES
[remark], [work_time], [machine_code], [machine_name], [team_code], [shift_code], [remark], [work_time], [machine_code], [machine_name], [team_code], [shift_code],
[attr1], [attr2], [attr3], [attr4], [create_by], [create_time], [attr1], [attr2], [attr3], [attr4], [create_by], [create_time],
[update_time], [update_by], [upload_time], [upload_status], [upload_msg], [prod_type], [update_time], [update_by], [upload_time], [upload_status], [upload_msg], [prod_type],
[use_man], [work_center]) [use_man], [work_center],[del_flag],[batch],[end_report])
VALUES VALUES
('{Common.GetUUID()}', 'SELF', '{reportCode}', '{selectRow["workorder_code"]}', '{selectRow["product_code"]}', '{selectRow["product_name"]}', ('{Common.GetUUID()}', 'SELF', '{reportCode}', '{selectRow["workorder_code"]}', '{selectRow["product_code"]}', '{selectRow["product_name"]}',
'{selectRow["product_spc"]}', '{selectRow["unit"]}', {workCount}, {workCount}, 0, 0, '{selectRow["product_spc"]}', '{selectRow["unit"]}', {workCount}, {workCount}, 0, 0,
@ -305,7 +305,7 @@ VALUES
'无', '{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")}', NULL, NULL, NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}',
'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}',GetDate(), '0', NULL, 'prod', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}',GetDate(), '0', NULL, 'prod',
{userCount}, '{costCenter}');"; {userCount}, '{costCenter}','0','{batchCode}','{isEndReport}');";
//赵啸林说不用上位机更新报工标识 //赵啸林说不用上位机更新报工标识
//string updateOrderSql = $@"update pro_order_workorder set status = 'w3', update_by = '{LoginUser.UserName}',update_time = GETDATE() where workorder_id = '{selectRow["workorder_id"]}' "; //string updateOrderSql = $@"update pro_order_workorder set status = 'w3', update_by = '{LoginUser.UserName}',update_time = GETDATE() where workorder_id = '{selectRow["workorder_id"]}' ";
sqlList.Add(sql); sqlList.Add(sql);

@ -494,12 +494,12 @@ select a.TrayCode,a.ProductBarNo,a.carcode,a.createtime,a.lineno,b.HadNumber
public DataTable GetWetPlanInfo(string deviceCode, string date) public DataTable GetWetPlanInfo(string deviceCode, string date)
{ {
string sql = $@"select workorder.factory_code,workorder.product_date as plan_time, workorder.workorder_id,workorder.workorder_code, product_code,product_name, string sql = $@"select workorder.factory_code,workorder.product_date as plan_time, workorder.workorder_id,workorder.workorder_code, product_code,product_name,
product_spc,shifts.shift_desc,prod_line_code,workorder.status,route_code,quantity_split,unit,workorder.shift_id ,batch.batch_code,batch.batch_quantity product_spc,shifts.shift_desc,prod_line_code,workorder.status,route_code,quantity_split,unit,workorder.shift_id ,batch.batch_code,batch.batch_quantity,sort_no
from pro_order_workorder workorder from pro_order_workorder workorder
left JOIN base_shifts_t shifts on workorder.shift_id = shifts.shift_id left JOIN base_shifts_t shifts on workorder.shift_id = shifts.shift_id
left JOIN pro_order_workorder_batch batch on workorder.workorder_id = batch.workorder_id left JOIN pro_order_workorder_batch batch on workorder.workorder_id = batch.workorder_id
where 1=1 and batch.del_flag = 0 and workorder.del_flag = 0 and where 1=1 and batch.del_flag = 0 and workorder.del_flag = 0 and
workorder.parent_order ='0' and CONVERT(VARCHAR(10), workorder.product_date , 120)= CONVERT(VARCHAR(10), '{date}' , 120) and workorder.prod_line_code like '%{deviceCode}%'"; workorder.parent_order ='0' and CONVERT(VARCHAR(10), workorder.product_date , 120)= CONVERT(VARCHAR(10), '{date}' , 120) and workorder.prod_line_code like '%{deviceCode}%' order by sort_no";
DataSet dtset = Utils.netClientDBHelper.getDataSet(sql); DataSet dtset = Utils.netClientDBHelper.getDataSet(sql);
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0) if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
{ {

@ -178,6 +178,8 @@ namespace XGL.Data
} }
} }
/// <summary> /// <summary>
/// 批量删除一批数据 /// 批量删除一批数据
/// </summary> /// </summary>
@ -335,6 +337,12 @@ namespace XGL.Data
return issuccess;//lst.Count > 0 ? true : false; return issuccess;//lst.Count > 0 ? true : false;
} }
public bool UpdateWorkDate(string deviceCode,string shiftID, string workDate)
{
string sql = $"update base_equipment set curr_work_date = '{workDate}',curr_shift = '{shiftID}' where equipment_code = '{deviceCode}'";
return Utils.netClientDBHelper.executeUpdate(sql) > 0 ? true : false;
}
/// <summary> /// <summary>
/// 查询版本号 /// 查询版本号
/// </summary> /// </summary>

@ -12,14 +12,14 @@
<!--设备编码--> <!--设备编码-->
<add key="DeviceCode" value="C3" /> <add key="DeviceCode" value="C3" />
<!--上位机类型 0:工单准备1成型机\shoupei2烘房,3:人员登录--> <!--上位机类型 0:工单准备1成型机\shoupei2烘房,3:人员登录-->
<add key="ClientMode" value="1" /> <add key="ClientMode" value="2" />
<add key="SerialPort" value="COM5" /> <add key="SerialPort" value="COM5" />
<add key="DryingHouseList" value="H16,H17,H18"/> <add key="DryingHouseList" value="H16,H17,H18"/>
<!--线体编码--> <!--线体编码-->
<add key="LineCode" value="101" /> <add key="LineCode" value="101" />
<!--获取设备状态间隔时间 单位秒--> <!--获取设备状态间隔时间 单位秒-->
<add key="GetDeviceStateInterval" value="15000" /> <add key="GetDeviceStateInterval" value="15000" />
<!--获取设备温湿度间隔时间 单位秒--> <!--获取设备温湿度间隔时间 单位秒-->
<add key="GetDeviceTempAndHumInterval" value="15000" /> <add key="GetDeviceTempAndHumInterval" value="15000" />
<add key="thriftIp" value="192.168.3.150" /> <add key="thriftIp" value="192.168.3.150" />
<!--上件点发车thrift端口 7911 ,7912--> <!--上件点发车thrift端口 7911 ,7912-->

@ -7,7 +7,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:loadin="clr-namespace:LoadingIndicators.WPF;assembly=LoadingIndicators.WPF" xmlns:loadin="clr-namespace:LoadingIndicators.WPF;assembly=LoadingIndicators.WPF"
Title="Login" Height="500" Width="350" ResizeMode="NoResize" WindowStyle="None" Title="Login" Height="530" Width="350" ResizeMode="NoResize" WindowStyle="None"
xmlns:customControlLibrary1="clr-namespace:WpfCustomControlLibrary1;assembly=WpfCustomControlLibrary1" xmlns:customControlLibrary1="clr-namespace:WpfCustomControlLibrary1;assembly=WpfCustomControlLibrary1"
WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown" Loaded="Window_Loaded"> WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown" Loaded="Window_Loaded">
<Window.Resources> <Window.Resources>
@ -20,7 +20,7 @@
</Window.Resources> </Window.Resources>
<Grid> <Grid>
<Rectangle Height="280" VerticalAlignment="Top"> <Rectangle Height="300" VerticalAlignment="Top">
<Rectangle.Fill> <Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
@ -36,32 +36,52 @@
<Image Source="/Resources/logo.png" Width="160" Height="50"/> <Image Source="/Resources/logo.png" Width="160" Height="50"/>
</Label.Content> </Label.Content>
</Label> </Label>
<Rectangle Width="280" Height="240" Fill="White" VerticalAlignment="Bottom" Margin="0,100" RadiusY="19.112" RadiusX="19.112"> <Rectangle Width="280" Height="290" Fill="White" VerticalAlignment="Bottom" Margin="0,100" RadiusY="19.112" RadiusX="19.112">
<Rectangle.Effect> <Rectangle.Effect>
<DropShadowEffect Color="#FFBBBBBB" Direction="0" BlurRadius="15" RenderingBias="Quality" ShadowDepth="1"></DropShadowEffect> <DropShadowEffect Color="#FFBBBBBB" Direction="0" BlurRadius="15" RenderingBias="Quality" ShadowDepth="1"></DropShadowEffect>
</Rectangle.Effect> </Rectangle.Effect>
</Rectangle> </Rectangle>
<Grid Width="280" Height="240" VerticalAlignment="Bottom" Margin="0,100"> <Grid Width="280" Height="240" VerticalAlignment="Bottom" Margin="0,150">
<!--<TextBlock Text="模具管理系统" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="5" Foreground="Gray" FontSize="18"></TextBlock>--> <!--<TextBlock Text="模具管理系统" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="5" Foreground="Gray" FontSize="18"></TextBlock>-->
<StackPanel VerticalAlignment="Center" Margin="10"> <StackPanel VerticalAlignment="Center" Margin="10">
<TextBox x:Name="username" materialDesign:HintAssist.Hint="账号" Margin="0,10" FontFamily="Champagne &amp; Limousines" FontSize="18"></TextBox> <StackPanel Orientation="Horizontal">
<PasswordBox x:Name="userpwd" materialDesign:HintAssist.Hint="密码" Margin="0,10" FontFamily="Champagne &amp; Limousines" FontSize="18"></PasswordBox> <TextBlock Text="用户: " VerticalAlignment="Center"/>
<TextBox x:Name="username" materialDesign:HintAssist.Hint="账号" Margin="0,5" FontFamily="Champagne &amp; Limousines" FontSize="18" Width="210"></TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="密码: " VerticalAlignment="Center"/>
<PasswordBox x:Name="userpwd" materialDesign:HintAssist.Hint="密码" Margin="0,10" FontFamily="Champagne &amp; Limousines" FontSize="18" Width="210"></PasswordBox>
</StackPanel>
<!--<StackPanel Orientation="Horizontal">
<TextBlock Text="班组: " VerticalAlignment="Center"/>
<ComboBox x:Name="comboBoxTeam" Margin="0,5" Width="210"/>
</StackPanel>-->
<StackPanel Orientation="Horizontal">
<TextBlock Text="班次: " VerticalAlignment="Center"/>
<ComboBox x:Name="comboBoxShift" Margin="0,5" Width="210"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="工作日: " VerticalAlignment="Center"/>
<DatePicker x:Name="datepickerWorkDate" Margin="0,8" Width="210"/>
</StackPanel>
</StackPanel> </StackPanel>
<Button x:Name="btnCheckUpdate" Content="检查更新" Background="#0000" BorderThickness="0" RenderTransformOrigin="0.62,7.171" Margin="194,190,20,20" Foreground="Blue" Click="btnCheckUpdate_Click"/>
</Grid> </Grid>
<Button VerticalAlignment="Bottom" Background="#0454D7" IsDefault="True" BorderBrush="Transparent" x:Name="btnlogin" Margin="68,0,182,85" Width="100" Height="30" Content="登录" FontSize="16" Click="btnlogin_Click"></Button> <Button VerticalAlignment="Bottom" Background="#0454D7" IsDefault="True" BorderBrush="Transparent" x:Name="btnlogin" Margin="68,0,182,85" Width="100" Height="30" FontSize="16" Content="登录" Click="btnlogin_Click"></Button>
<Button VerticalAlignment="Bottom" Background="#D7D7D7" Foreground="Black" BorderBrush="Transparent" x:Name="btnloginout" Margin="192,0,58,85" Width="100" Height="30" Content="退出" FontSize="16" Click="btnloginout_Click" ></Button> <Button VerticalAlignment="Bottom" Background="#D7D7D7" Foreground="Black" BorderBrush="Transparent" x:Name="btnloginout" Margin="192,0,58,85" Width="100" FontSize="16" Height="30" Content="退出" Click="btnloginout_Click" ></Button>
<CheckBox x:Name="rememberpwd" VerticalAlignment="Bottom" Background="Black" Margin="48,0,0,126" Width="100" HorizontalAlignment="Left" <CheckBox x:Name="rememberpwd" VerticalAlignment="Bottom" Background="Black" Margin="48,0,0,126" Width="100" HorizontalAlignment="Left"
IsChecked="True"> IsChecked="True">
记住密码 记住密码
</CheckBox> </CheckBox>
<Button x:Name="btnCheckUpdate" Content="检查更新" Background="#0000" BorderThickness="0" RenderTransformOrigin="0.62,7.171" Margin="194,280,20,20" Foreground="Blue" Click="btnCheckUpdate_Click"/>
<!--<Label Width="100" Height="30" VerticalContentAlignment="Center"/>--> <!--<Label Width="100" Height="30" VerticalContentAlignment="Center"/>-->
<!--<loadin:LoadingIndicator x:Name="dldh" Margin="156,434,154,26" SpeedRatio="1.5" IsActive="True" Style="{DynamicResource LoadingIndicatorArcsStyle}"> <!--<loadin:LoadingIndicator x:Name="dldh" Margin="156,434,154,26" SpeedRatio="1.5" IsActive="True" Style="{DynamicResource LoadingIndicatorArcsStyle}">
</loadin:LoadingIndicator>--> </loadin:LoadingIndicator>-->
<customControlLibrary1:CustomControl1 x:Name="dldh" Margin="159,424,140,20" Width="60" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center"/> <customControlLibrary1:CustomControl1 x:Name="dldh" Margin="159,454,140,20" Width="60" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Label x:Name="zzdl" HorizontalAlignment="Center" Margin="115,476,100,0" Content="正在登陆" Foreground="#0454D7" BorderThickness="0"></Label> <Label x:Name="zzdl" HorizontalAlignment="Center" Margin="115,506,100,0" Content="正在登陆" Foreground="#0454D7" BorderThickness="0"></Label>
<!--<TextBlock Text="ESQUECEU SUA SENHA?" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="50" Foreground="Gray" Cursor="Hand"></TextBlock>--> <!--<TextBlock Text="ESQUECEU SUA SENHA?" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="50" Foreground="Gray" Cursor="Hand"></TextBlock>-->
<Label x:Name="lbVersion" Width="100" Content="1.000" Height="30" VerticalContentAlignment="Center" BorderThickness="0" Margin="263,470,13,0"/> <Label x:Name="lbVersion" Width="100" Content="1.000" Height="30" VerticalContentAlignment="Center" BorderThickness="0" Margin="263,506,13,0"/>
</Grid> </Grid>
</Window> </Window>

@ -22,6 +22,7 @@ using XGL.Models;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using XGL.Data.DBService;
namespace XGL namespace XGL
{ {
@ -30,11 +31,15 @@ namespace XGL
/// </summary> /// </summary>
public partial class LoginPage : Window public partial class LoginPage : Window
{ {
userDB usdb = new userDB();
FormingMachineService formingMachineService = new FormingMachineService();
private BackgroundWorker bw = new BackgroundWorker(); private BackgroundWorker bw = new BackgroundWorker();
private UserLogin ul; private UserLogin ul;
Main main; Main main;
public static LoginPage loginpage; public static LoginPage loginpage;
string UserCarNo = ""; string UserCarNo = "";
List<ShiftInfoModel> listShift;
string deviceCode = Utils.GetAppSetting("DeviceCode");
public LoginPage() public LoginPage()
{ {
InitializeComponent(); InitializeComponent();
@ -47,9 +52,46 @@ namespace XGL
//Main mainWindow = new Main(); //Main mainWindow = new Main();
//mainWindow.Show(); //mainWindow.Show();
InitVersion(); InitVersion();
//InitTeamInfo();
InitShiftInfo();
} }
private void InitShiftInfo()
{
DataTable dt = formingMachineService.GetShiftList();
if (dt == null)
{
CustomMessageBox.Show("没有查询到班次信息,请联系管理员!", CustomMessageBoxIcon.Warning);
return;
}
listShift = Utils.ToDataList<ShiftInfoModel>(dt);
//comboDryRoomInfo.SelectedValuePath = "quipName";
//comboDryRoomInfo.DisplayMemberPath = "quipCode";
//comboDryRoomInfo.ItemsSource = listEquip;
//绑定
comboBoxShift.ItemsSource = listShift;
comboBoxShift.SelectedValuePath = "shift_id";
comboBoxShift.DisplayMemberPath = "shift_desc";
}
//private void InitTeamInfo()
//{
// DataTable dt = formingMachineService.GetTeamList();
// if (dt == null)
// {
// CustomMessageBox.Show("没有查询到班组信息,请联系管理员!", CustomMessageBoxIcon.Warning);
// return;
// }
// List<TeamInfoModel> listTeam = Utils.ToDataList<TeamInfoModel>(dt);
// //绑定
// comboBoxTeam.ItemsSource = listTeam;
// comboBoxTeam.SelectedValuePath = "team_id";
// comboBoxTeam.DisplayMemberPath = "team_desc";
//}
private void InitVersion() private void InitVersion()
{ {
string fileName = "vsion.txt"; // 指定要操作的文件名 string fileName = "vsion.txt"; // 指定要操作的文件名
@ -68,11 +110,36 @@ namespace XGL
//this.dldh.IsActive = true;//遮罩层可见 //this.dldh.IsActive = true;//遮罩层可见
this.dldh.Visibility = Visibility.Visible;//遮罩层可见 this.dldh.Visibility = Visibility.Visible;//遮罩层可见
zzdl.Visibility = Visibility.Visible; zzdl.Visibility = Visibility.Visible;
//if (comboBoxTeam.SelectedValue == null || string.IsNullOrEmpty(comboBoxTeam.SelectedValue.ToString()))
//{
// CustomMessageBox.Show("登录失败,请选择班组", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
// comboBoxTeam.Focus();
// return;
//}
if (comboBoxShift.SelectedValue == null || string.IsNullOrEmpty(comboBoxShift.SelectedValue.ToString()))
{
CustomMessageBox.Show("登录失败,请选择班次", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
comboBoxShift.Focus();
return;
}
if (string.IsNullOrEmpty(datepickerWorkDate.Text))
{
CustomMessageBox.Show("登录失败,请选择工作日期", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
datepickerWorkDate.Focus();
return;
}
var lst = listShift.FindLast(t => t.shift_id == Convert.ToInt32(comboBoxShift.SelectedValue.ToString()));
ul = new UserLogin ul = new UserLogin
{ {
username = username.Text.Trim(), username = username.Text.Trim(),
pwd = userpwd.Password.Trim(), pwd = userpwd.Password.Trim(),
IsChecked = rememberpwd.IsChecked IsChecked = rememberpwd.IsChecked,
//teamID = comboBoxTeam.SelectedValue.ToString(),
shiftID = comboBoxShift.SelectedValue.ToString(),
workDate = datepickerWorkDate.Text,
startTime = lst.Shift_Start_Time,
endTime = lst.Shift_End_Time
}; };
main = new Main(); main = new Main();
bw.RunWorkerAsync(); bw.RunWorkerAsync();
@ -103,12 +170,13 @@ namespace XGL
LoginStatus = -2; LoginStatus = -2;
return LoginStatus; return LoginStatus;
} }
userDB usdb = new userDB();
bw.ReportProgress(1); bw.ReportProgress(1);
bool islogin = usdb.Login(ul.username, ul.pwd, ul.shiftID, ul.teamID, ul.workDate, ul.startTime, ul.endTime); bool islogin = usdb.Login(ul.username, ul.pwd, ul.shiftID, ul.teamID, ul.workDate, ul.startTime, ul.endTime);
if (islogin) if (islogin)
{ {
usdb.UpdateWorkDate(deviceCode, ul.shiftID, ul.workDate);
if (ul.IsChecked == true) if (ul.IsChecked == true)
{ {
Common.IniWriteValue("登录明细", "loginUser", ul.username); Common.IniWriteValue("登录明细", "loginUser", ul.username);
@ -172,7 +240,7 @@ namespace XGL
this.Close(); this.Close();
break; break;
case 0: case 0:
CustomMessageBox.Show("登录失败", CustomMessageBoxIcon.Error); CustomMessageBox.Show("登录失败", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
//this.Dispatcher.Invoke( //this.Dispatcher.Invoke(
//new Action(() => { zzdl.Content = "登录失败"; zzdl.Foreground = Brushes.Red; } //new Action(() => { zzdl.Content = "登录失败"; zzdl.Foreground = Brushes.Red; }
//), //),
@ -184,29 +252,29 @@ namespace XGL
//new Action(() => { zzdl.Content = "账号或密码错误"; zzdl.Foreground = Brushes.Red; } //new Action(() => { zzdl.Content = "账号或密码错误"; zzdl.Foreground = Brushes.Red; }
//), //),
//System.Windows.Threading.DispatcherPriority.Render); //System.Windows.Threading.DispatcherPriority.Render);
CustomMessageBox.Show("账号或密码错误", CustomMessageBoxIcon.Error); CustomMessageBox.Show("账号或密码错误", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break; break;
case -2: case -2:
//zzdl.Content = "请输入密码"; //zzdl.Content = "请输入密码";
//zzdl.Foreground = Brushes.Red; //zzdl.Foreground = Brushes.Red;
CustomMessageBox.Show("请输入密码", CustomMessageBoxIcon.Error); CustomMessageBox.Show("请输入密码", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break; break;
case -3: case -3:
//zzdl.Content = "请输入账号"; //zzdl.Content = "请输入账号";
//zzdl.Foreground = Brushes.Red; //zzdl.Foreground = Brushes.Red;
CustomMessageBox.Show("请输入账号", CustomMessageBoxIcon.Error); CustomMessageBox.Show("请输入账号", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break; break;
case -4: case -4:
//zzdl.Content = "加载菜单异常,请重试"; //zzdl.Content = "加载菜单异常,请重试";
//zzdl.Foreground = Brushes.Red; //zzdl.Foreground = Brushes.Red;
CustomMessageBox.Show("加载菜单异常,请重试", CustomMessageBoxIcon.Error); CustomMessageBox.Show("加载菜单异常,请重试", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break; break;
case -5: case -5:
// this.Dispatcher.Invoke( // this.Dispatcher.Invoke(
//new Action(() => zzdl.Content = "登录异常,请重试" //new Action(() => zzdl.Content = "登录异常,请重试"
//), //),
//System.Windows.Threading.DispatcherPriority.Render); //System.Windows.Threading.DispatcherPriority.Render);
CustomMessageBox.Show("登录异常,请重试", CustomMessageBoxIcon.Error); CustomMessageBox.Show("登录异常,请重试", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break; break;
} }
//dldh.IsActive = false; //dldh.IsActive = false;

@ -981,9 +981,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="LanjuLogo.png" /> <Resource Include="LanjuLogo.png" />
<Content Include="newMessage.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libmupdf.dll"> <Content Include="libmupdf.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>

Binary file not shown.

Binary file not shown.

@ -1,226 +0,0 @@
#pragma checksum "..\..\..\LoginPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "608E945D93D5199908395D2CFCFD3D0BE2B0592B7A7AC64C0F7DD8C43AA6889F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using HandyControl.Controls;
using HandyControl.Data;
using HandyControl.Expression.Media;
using HandyControl.Expression.Shapes;
using HandyControl.Interactivity;
using HandyControl.Media.Animation;
using HandyControl.Media.Effects;
using HandyControl.Properties.Langs;
using HandyControl.Themes;
using HandyControl.Tools;
using HandyControl.Tools.Converter;
using HandyControl.Tools.Extension;
using LoadingIndicators.WPF;
using MaterialDesignThemes.Wpf;
using MaterialDesignThemes.Wpf.Converters;
using MaterialDesignThemes.Wpf.Transitions;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms.Integration;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
using WpfCustomControlLibrary1;
namespace XGL {
/// <summary>
/// LoginPage
/// </summary>
public partial class LoginPage : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 47 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox username;
#line default
#line hidden
#line 48 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.PasswordBox userpwd;
#line default
#line hidden
#line 51 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btnCheckUpdate;
#line default
#line hidden
#line 53 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btnlogin;
#line default
#line hidden
#line 54 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btnloginout;
#line default
#line hidden
#line 55 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.CheckBox rememberpwd;
#line default
#line hidden
#line 62 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal WpfCustomControlLibrary1.CustomControl1 dldh;
#line default
#line hidden
#line 63 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Label zzdl;
#line default
#line hidden
#line 65 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Label lbVersion;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/XGL;component/loginpage.xaml", System.UriKind.Relative);
#line 1 "..\..\..\LoginPage.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
#line 12 "..\..\..\LoginPage.xaml"
((XGL.LoginPage)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseLeftButtonDown);
#line default
#line hidden
#line 12 "..\..\..\LoginPage.xaml"
((XGL.LoginPage)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
#line default
#line hidden
return;
case 2:
this.username = ((System.Windows.Controls.TextBox)(target));
return;
case 3:
this.userpwd = ((System.Windows.Controls.PasswordBox)(target));
return;
case 4:
this.btnCheckUpdate = ((System.Windows.Controls.Button)(target));
#line 51 "..\..\..\LoginPage.xaml"
this.btnCheckUpdate.Click += new System.Windows.RoutedEventHandler(this.btnCheckUpdate_Click);
#line default
#line hidden
return;
case 5:
this.btnlogin = ((System.Windows.Controls.Button)(target));
#line 53 "..\..\..\LoginPage.xaml"
this.btnlogin.Click += new System.Windows.RoutedEventHandler(this.btnlogin_Click);
#line default
#line hidden
return;
case 6:
this.btnloginout = ((System.Windows.Controls.Button)(target));
#line 54 "..\..\..\LoginPage.xaml"
this.btnloginout.Click += new System.Windows.RoutedEventHandler(this.btnloginout_Click);
#line default
#line hidden
return;
case 7:
this.rememberpwd = ((System.Windows.Controls.CheckBox)(target));
return;
case 8:
this.dldh = ((WpfCustomControlLibrary1.CustomControl1)(target));
return;
case 9:
this.zzdl = ((System.Windows.Controls.Label)(target));
return;
case 10:
this.lbVersion = ((System.Windows.Controls.Label)(target));
return;
}
this._contentLoaded = true;
}
}
}

@ -1,226 +0,0 @@
#pragma checksum "..\..\..\LoginPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "608E945D93D5199908395D2CFCFD3D0BE2B0592B7A7AC64C0F7DD8C43AA6889F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using HandyControl.Controls;
using HandyControl.Data;
using HandyControl.Expression.Media;
using HandyControl.Expression.Shapes;
using HandyControl.Interactivity;
using HandyControl.Media.Animation;
using HandyControl.Media.Effects;
using HandyControl.Properties.Langs;
using HandyControl.Themes;
using HandyControl.Tools;
using HandyControl.Tools.Converter;
using HandyControl.Tools.Extension;
using LoadingIndicators.WPF;
using MaterialDesignThemes.Wpf;
using MaterialDesignThemes.Wpf.Converters;
using MaterialDesignThemes.Wpf.Transitions;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms.Integration;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
using WpfCustomControlLibrary1;
namespace XGL {
/// <summary>
/// LoginPage
/// </summary>
public partial class LoginPage : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 47 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox username;
#line default
#line hidden
#line 48 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.PasswordBox userpwd;
#line default
#line hidden
#line 51 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btnCheckUpdate;
#line default
#line hidden
#line 53 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btnlogin;
#line default
#line hidden
#line 54 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btnloginout;
#line default
#line hidden
#line 55 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.CheckBox rememberpwd;
#line default
#line hidden
#line 62 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal WpfCustomControlLibrary1.CustomControl1 dldh;
#line default
#line hidden
#line 63 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Label zzdl;
#line default
#line hidden
#line 65 "..\..\..\LoginPage.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Label lbVersion;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/XGL;component/loginpage.xaml", System.UriKind.Relative);
#line 1 "..\..\..\LoginPage.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
#line 12 "..\..\..\LoginPage.xaml"
((XGL.LoginPage)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseLeftButtonDown);
#line default
#line hidden
#line 12 "..\..\..\LoginPage.xaml"
((XGL.LoginPage)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
#line default
#line hidden
return;
case 2:
this.username = ((System.Windows.Controls.TextBox)(target));
return;
case 3:
this.userpwd = ((System.Windows.Controls.PasswordBox)(target));
return;
case 4:
this.btnCheckUpdate = ((System.Windows.Controls.Button)(target));
#line 51 "..\..\..\LoginPage.xaml"
this.btnCheckUpdate.Click += new System.Windows.RoutedEventHandler(this.btnCheckUpdate_Click);
#line default
#line hidden
return;
case 5:
this.btnlogin = ((System.Windows.Controls.Button)(target));
#line 53 "..\..\..\LoginPage.xaml"
this.btnlogin.Click += new System.Windows.RoutedEventHandler(this.btnlogin_Click);
#line default
#line hidden
return;
case 6:
this.btnloginout = ((System.Windows.Controls.Button)(target));
#line 54 "..\..\..\LoginPage.xaml"
this.btnloginout.Click += new System.Windows.RoutedEventHandler(this.btnloginout_Click);
#line default
#line hidden
return;
case 7:
this.rememberpwd = ((System.Windows.Controls.CheckBox)(target));
return;
case 8:
this.dldh = ((WpfCustomControlLibrary1.CustomControl1)(target));
return;
case 9:
this.zzdl = ((System.Windows.Controls.Label)(target));
return;
case 10:
this.lbVersion = ((System.Windows.Controls.Label)(target));
return;
}
this._contentLoaded = true;
}
}
}

@ -1,17 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("newmessage.wav")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("libmupdf.dll")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("resources/hongfang.png")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("resources/nitsos.png")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("snap7.dll")]

@ -1,17 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("newmessage.wav")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("libmupdf.dll")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("resources/hongfang.png")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("resources/nitsos.png")]
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("snap7.dll")]

@ -29,6 +29,8 @@ namespace XGLFinishPro
public static LoginPage loginpage; public static LoginPage loginpage;
string UserCarNo = ""; string UserCarNo = "";
List<ShiftInfoModel> listShift; List<ShiftInfoModel> listShift;
string deviceCode = Utils.GetAppSetting("DeviceCode");
public LoginPage() public LoginPage()
{ {
InitializeComponent(); InitializeComponent();
@ -165,6 +167,7 @@ namespace XGLFinishPro
bool islogin = usdb.Login(ul.username, ul.pwd, ul.shiftID,ul.teamID,ul.workDate, ul.startTime, ul.endTime); bool islogin = usdb.Login(ul.username, ul.pwd, ul.shiftID,ul.teamID,ul.workDate, ul.startTime, ul.endTime);
if (islogin) if (islogin)
{ {
usdb.UpdateWorkDate(deviceCode,ul.shiftID,ul.workDate);
if (ul.IsChecked == true) if (ul.IsChecked == true)
{ {
Common.IniWriteValue("登录明细", "loginUser", ul.username); Common.IniWriteValue("登录明细", "loginUser", ul.username);

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XGLFinishPro.Views" xmlns:local="clr-namespace:XGLFinishPro.Views"
mc:Ignorable="d" mc:Ignorable="d"
Title="CheckUserWin" Height="450" Width="850" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded"> Title="CheckUserWin" Height="550" Width="1050" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded">
<Window.Resources> <Window.Resources>
<!--ComboBox下拉按钮--> <!--ComboBox下拉按钮-->
<Style TargetType="ToggleButton" x:Key="ComboxStyleBtn"> <Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
@ -95,6 +95,12 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style TargetType="TextBox">
<Setter Property="Height" Value="50"/>
</Style>
<Style TargetType="Label">
<Setter Property="Margin" Value="15,0,0,0"/>
</Style>
</Window.Resources> </Window.Resources>
<Grid> <Grid>
<Grid.Background> <Grid.Background>
@ -118,42 +124,42 @@
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.ColumnSpan="2" x:Name="lbTitle" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Content="报工" FontWeight="Bold"></Label> <Label Grid.ColumnSpan="2" x:Name="lbTitle" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Content="报工" FontWeight="Bold"></Label>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" 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="Center" 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="Center" 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="Center" 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="0" Grid.ColumnSpan="2" Margin="15,0,0,0"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="3" 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" Style="{StaticResource ComboBoxStyle}" SelectionChanged="comboBoxCostCenter_SelectionChanged"></ComboBox> <ComboBox x:Name="comboBoxCostCenter" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="360" Height="50" Style="{StaticResource ComboBoxStyle}" SelectionChanged="comboBoxCostCenter_SelectionChanged"></ComboBox>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="15,0,0,0"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="4" 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="pici" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Margin="2,0,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,0,0,0" Width="360" Height="50" Style="{StaticResource ComboBoxStyle}"></ComboBox>
<Label Content="* 不选批次号默认为该工单报工" Foreground="Red" VerticalAlignment="Center"></Label> <Label Content="* 不选批次号默认为该工单报工" Foreground="Red" VerticalAlignment="Center"></Label>
</StackPanel> </StackPanel>
<Label x:Name="tbMsg" Width="500" Height="60" Grid.Row="5" Grid.ColumnSpan="2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" FontSize="18" Foreground="Red" FontWeight="Bold"></Label> <Label x:Name="tbMsg" Width="500" Height="60" Grid.Row="5" Grid.ColumnSpan="2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" FontSize="18" Foreground="Red" FontWeight="Bold"></Label>
<CheckBox Content="最终报工" Height="auto" FontSize="10" Grid.Row="6" IsChecked="False" HorizontalAlignment="Left" VerticalContentAlignment="Center" Name="xuanze9" > <CheckBox Content="最终报工" Height="auto" Margin="15,0,0,0" FontSize="10" ToolTip="选择后将结束该工单" Grid.Row="6" IsChecked="False" HorizontalAlignment="Left" VerticalContentAlignment="Center" Name="xuanze9" >
<CheckBox.LayoutTransform > <CheckBox.LayoutTransform >
<ScaleTransform ScaleX="2" ScaleY="2" /> <ScaleTransform ScaleX="2" ScaleY="2" />
</CheckBox.LayoutTransform> </CheckBox.LayoutTransform>
</CheckBox> </CheckBox>
<Button x:Name="btnOK" Grid.Row="6" Grid.Column="0" Width="120" Height="43" Content="确定" Margin="10" Background="#2F82E7" Foreground="White" FontSize="22" FontWeight="Bold" Click="btnOK_Click"/> <Button x:Name="btnOK" Grid.Row="6" Grid.Column="0" Width="120" Height="43" Content="确定" Margin="3,-20,0,0" Background="#2F82E7" Foreground="White" FontSize="22" FontWeight="Bold" Click="btnOK_Click"/>
<Button x:Name="btnCancel" Grid.Row="6" Grid.Column="1" Width="120" Height="43" Content="取消" Margin="10" FontWeight="Bold" FontSize="22" Click="btnCancel_Click"/> <Button x:Name="btnCancel" Grid.Row="6" Grid.Column="1" Width="120" Height="43" Content="取消" Margin="3,-20,0,0" FontWeight="Bold" FontSize="22" Click="btnCancel_Click"/>
</Grid> </Grid>

@ -32,17 +32,21 @@ namespace XGLFinishPro.Views
public string _costCenter = ""; public string _costCenter = "";
public string _workQuntity = ""; public string _workQuntity = "";
public string workOrdercode = ""; public string workOrdercode = "";
public string batchCode = "";
public bool? _isEndReport = false;
public ExecReportWorkWin() public ExecReportWorkWin()
{ {
InitializeComponent(); InitializeComponent();
} }
public ExecReportWorkWin(string workOrder, string quantity,string workOrdercode) public ExecReportWorkWin(string workOrder, string quantity,string workOrdercode,string batch_code)
{ {
InitializeComponent(); InitializeComponent();
this.workOrdercode = workOrdercode; this.workOrdercode = workOrdercode;
this.lbCurrOrderNo.Content = workOrder; this.lbCurrOrderNo.Content = workOrder;
this.txtQuantity.Text = quantity; this.txtQuantity.Text = quantity;
this.comboBoxBatch.Text = batch_code;
} }
private void btnCancel_Click(object sender, RoutedEventArgs e) private void btnCancel_Click(object sender, RoutedEventArgs e)
@ -108,7 +112,28 @@ namespace XGLFinishPro.Views
_workTime = this.txtWorkTime.Text; _workTime = this.txtWorkTime.Text;
_costCenter = this.comboBoxCostCenter.SelectedValue.ToString(); _costCenter = this.comboBoxCostCenter.SelectedValue.ToString();
_workQuntity = this.txtQuantity.Text; _workQuntity = this.txtQuantity.Text;
batchCode = this.comboBoxBatch.Text;
_isEndReport = this.xuanze9.IsChecked;
if (string.IsNullOrEmpty(batchCode))
{
CustomMessageBoxResult result = CustomMessageBox.Show("您确定要按整单报工么?最终报工:" + (_isEndReport == true ? "是" : "否"), CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Warning);
if (result == CustomMessageBoxResult.OK)
{
this.DialogResult = true; this.DialogResult = true;
}
}
else
{
CustomMessageBoxResult result = CustomMessageBox.Show("您确定要按批次报工么?当前批次号:"+ batchCode + " 最终报工:" + (_isEndReport == true ? "是" : "否"), CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Warning);
if (result == CustomMessageBoxResult.OK)
{
this.DialogResult = true;
}
}
} }
@ -173,7 +198,7 @@ namespace XGLFinishPro.Views
DataTable dt = userDbWareHouse.GetCostCenter(); DataTable dt = userDbWareHouse.GetCostCenter();
if (dt == null) if (dt == null)
{ {
CustomMessageBox.Show("没有维护成本中心,请联系管理员!", CustomMessageBoxIcon.Warning); CustomMessageBox.Show("没有维护成本中心,请联系管理员!",CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return; return;
} }
@ -192,7 +217,7 @@ namespace XGLFinishPro.Views
DataTable dt = userDbWareHouse.piciGetCostCenter(this.workOrdercode); DataTable dt = userDbWareHouse.piciGetCostCenter(this.workOrdercode);
if (dt == null) if (dt == null)
{ {
CustomMessageBox.Show("没有找到批次号,请联系管理员!", CustomMessageBoxIcon.Warning); CustomMessageBox.Show("没有找到批次号,请联系管理员!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return; return;
} }
List<string> strings =new List<string>(); List<string> strings =new List<string>();
@ -202,12 +227,12 @@ namespace XGLFinishPro.Views
strings.Add(row[0].ToString()); strings.Add(row[0].ToString());
} }
List<CostCenter> listCostCenter = Utils.ToDataList<CostCenter>(dt); //List<CostCenter> listCostCenter = Utils.ToDataList<CostCenter>(dt);
//comboDryRoomInfo.SelectedValuePath = "quipName"; //comboDryRoomInfo.SelectedValuePath = "quipName";
//comboDryRoomInfo.DisplayMemberPath = "quipCode"; //comboDryRoomInfo.DisplayMemberPath = "quipCode";
//comboDryRoomInfo.ItemsSource = listEquip; //comboDryRoomInfo.ItemsSource = listEquip;
//绑定 //绑定
pici.ItemsSource = strings; comboBoxBatch.ItemsSource = strings;
} }
private void comboBoxCostCenter_SelectionChanged(object sender, SelectionChangedEventArgs e) private void comboBoxCostCenter_SelectionChanged(object sender, SelectionChangedEventArgs e)

@ -439,9 +439,9 @@
<DataGridTextColumn Width="480" Header="产品名称" Binding="{Binding product_name}" /> <DataGridTextColumn Width="480" Header="产品名称" Binding="{Binding product_name}" />
<DataGridTextColumn Width="380" Header="批次号" Binding="{Binding batch_code}" /> <DataGridTextColumn Width="380" Header="批次号" Binding="{Binding batch_code}" />
<DataGridTextColumn Width="100" Header="数量" Binding="{Binding quantity_split}" /> <DataGridTextColumn Width="100" Header="订单数量" Binding="{Binding quantity_split}" />
<DataGridTextColumn Width="60" Header="状态" Binding="{Binding status,Converter={StaticResource MyConverter}}" > <DataGridTextColumn Width="80" Header="状态" Binding="{Binding status,Converter={StaticResource MyConverter}}" >
<!--<DataGridTextColumn.ElementStyle> <!--<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock"> <Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{Binding status, Converter={StaticResource SyncFlagColorConvert}}" /> <Setter Property="Foreground" Value="{Binding status, Converter={StaticResource SyncFlagColorConvert}}" />
@ -454,6 +454,7 @@
<DataGridTextColumn Width="250" Header="产品编码" Binding="{Binding product_code}" /> <DataGridTextColumn Width="250" Header="产品编码" Binding="{Binding product_code}" />
<DataGridTextColumn Width="180" Header="批次数量" Binding="{Binding batch_quantity}" /> <DataGridTextColumn Width="180" Header="批次数量" Binding="{Binding batch_quantity}" />
<DataGridTextColumn Width="180" Header="工单code" Visibility="Hidden" Binding="{Binding workorder_id}" /> <DataGridTextColumn Width="180" Header="工单code" Visibility="Hidden" Binding="{Binding workorder_id}" />
<DataGridTextColumn Width="100" Header="生产顺序" Binding="{Binding sort_no}" />
<DataGridTextColumn Width="250" Header="计划时间" Binding="{Binding plan_time, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" /> <DataGridTextColumn Width="250" Header="计划时间" Binding="{Binding plan_time, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" />
<!--<DataGridTextColumn Width="340" Header="流转码" Binding="{Binding work_batch_code}" />--> <!--<DataGridTextColumn Width="340" Header="流转码" Binding="{Binding work_batch_code}" />-->
<!--<DataGridTextColumn Width="60" Header="出入" Binding="{Binding taskcode,Converter={StaticResource TaskCodeConverter}}"/>--> <!--<DataGridTextColumn Width="60" Header="出入" Binding="{Binding taskcode,Converter={StaticResource TaskCodeConverter}}"/>-->

@ -441,6 +441,13 @@ namespace XGLFinishPro.Views
MessageBox.Show("你选择的工单不能报工!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning); MessageBox.Show("你选择的工单不能报工!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
return; return;
} }
ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow["workorder_code"].ToString(), selectedRow["quantity_split"].ToString(), selectedRow["workorder_id"].ToString(),selectedRow["batch_code"].ToString());
if (execReport.ShowDialog() == true)
{
//获取报工编码
string newReportCode = ""; string newReportCode = "";
DataTable dtNewReportCode = formingMachineService.GetReportCode(); DataTable dtNewReportCode = formingMachineService.GetReportCode();
if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0) if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0)
@ -459,16 +466,13 @@ namespace XGLFinishPro.Views
} }
} }
ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow["workorder_code"].ToString(), selectedRow["quantity_split"].ToString(), selectedRow["workorder_id"].ToString());
if (execReport.ShowDialog() == true)
{
string workTime = execReport._workTime; string workTime = execReport._workTime;
string costCenter = execReport._costCenter; string costCenter = execReport._costCenter;
string userCount = execReport._useMan; string userCount = execReport._useMan;
string workCount = execReport._workQuntity; string workCount = execReport._workQuntity;
bool issucc = formingMachineService.ExecuteReportWork(selectedRow, workCount, newReportCode, workTime, userCount, costCenter, deviceCode); string batchCode = execReport.batchCode;
string isEndReport = execReport._isEndReport == true ? "1" : "0";
bool issucc = formingMachineService.ExecuteReportWork(selectedRow, workCount, newReportCode, workTime, userCount, costCenter, batchCode, isEndReport, deviceCode);
if (issucc) if (issucc)
{ {
//调用报工接口 //调用报工接口

@ -978,9 +978,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="LanjuLogo.png" /> <Resource Include="LanjuLogo.png" />
<Content Include="newMessage.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libmupdf.dll"> <Content Include="libmupdf.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>

Loading…
Cancel
Save