修改报工界面样式

master
zhaoaomin 2 years ago
parent 6a15770b57
commit e4811a1857

Binary file not shown.

@ -1,7 +1,7 @@
<?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">
<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" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.8" profile="Full" supportedRuntime="4.0.30319" />
@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<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>
</dependentAssembly>
</dependency>

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

@ -1,7 +1,7 @@
<?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">
<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" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.8" profile="Full" supportedRuntime="4.0.30319" />
@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<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>
</dependentAssembly>
</dependency>

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

@ -13,7 +13,7 @@
</Grid.RowDefinitions>
<!--显示图片和文本-->
<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>
<EventTrigger RoutedEvent="Loaded">
<EventTrigger.Actions>
@ -30,6 +30,17 @@
</EventTrigger.Actions>
</EventTrigger>
</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>
<TextBlock VerticalAlignment="Center" x:Name="TxtMsg" HorizontalAlignment="Left" Foreground="Black" TextWrapping="WrapWithOverflow" Width="280" TextAlignment="Left"
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="edt"></param>
/// <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 lineName = "";
@ -297,7 +297,7 @@ VALUES
[remark], [work_time], [machine_code], [machine_name], [team_code], [shift_code],
[attr1], [attr2], [attr3], [attr4], [create_by], [create_time],
[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
('{Common.GetUUID()}', 'SELF', '{reportCode}', '{selectRow["workorder_code"]}', '{selectRow["product_code"]}', '{selectRow["product_name"]}',
'{selectRow["product_spc"]}', '{selectRow["unit"]}', {workCount}, {workCount}, 0, 0,
@ -305,7 +305,7 @@ VALUES
'无', '{workTime}', '{deviceCode}', '{lineName}', N'{LoginUser.TeamCode}', '{selectRow["shift_id"]}',
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',
{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"]}' ";
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)
{
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
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
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);
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
{

@ -178,6 +178,8 @@ namespace XGL.Data
}
}
/// <summary>
/// 批量删除一批数据
/// </summary>
@ -335,6 +337,12 @@ namespace XGL.Data
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>

@ -12,14 +12,14 @@
<!--设备编码-->
<add key="DeviceCode" value="C3" />
<!--上位机类型 0:工单准备1成型机\shoupei2烘房,3:人员登录-->
<add key="ClientMode" value="1" />
<add key="ClientMode" value="2" />
<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="GetDeviceStateInterval" value="15000" />
<!--获取设备温湿度间隔时间 单位秒-->
<!--获取设备温湿度间隔时间 单位秒-->
<add key="GetDeviceTempAndHumInterval" value="15000" />
<add key="thriftIp" value="192.168.3.150" />
<!--上件点发车thrift端口 7911 ,7912-->

@ -7,7 +7,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
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"
WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown" Loaded="Window_Loaded">
<Window.Resources>
@ -19,9 +19,9 @@
</ResourceDictionary>
</Window.Resources>
<Grid>
<Rectangle Height="280" VerticalAlignment="Top">
<Rectangle Height="300" VerticalAlignment="Top">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF2281D1"></GradientStop>
@ -31,37 +31,57 @@
</Rectangle.Fill>
</Rectangle>
<!--<Image Source="Images/home.png" Width="100" Height="100" VerticalAlignment="Top" Margin="20"></Image>-->
<Label Foreground="White" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,0" Width="160" Height="60" Background="Transparent" BorderThickness="0">
<Label Foreground="White" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,0" Width="160" Height="60" Background="Transparent" BorderThickness="0">
<Label.Content>
<Image Source="/Resources/logo.png" Width="160" Height="50"/>
</Label.Content>
</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>
<DropShadowEffect Color="#FFBBBBBB" Direction="0" BlurRadius="15" RenderingBias="Quality" ShadowDepth="1"></DropShadowEffect>
</Rectangle.Effect>
</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>-->
<StackPanel VerticalAlignment="Center" Margin="10">
<TextBox x:Name="username" materialDesign:HintAssist.Hint="账号" Margin="0,10" FontFamily="Champagne &amp; Limousines" FontSize="18"></TextBox>
<PasswordBox x:Name="userpwd" materialDesign:HintAssist.Hint="密码" Margin="0,10" FontFamily="Champagne &amp; Limousines" FontSize="18"></PasswordBox>
<StackPanel Orientation="Horizontal">
<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>
<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>
<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="#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="#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" 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"
IsChecked="True">
记住密码
</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"/>-->
<!--<loadin:LoadingIndicator x:Name="dldh" Margin="156,434,154,26" SpeedRatio="1.5" IsActive="True" Style="{DynamicResource LoadingIndicatorArcsStyle}">
</loadin:LoadingIndicator>-->
<customControlLibrary1:CustomControl1 x:Name="dldh" Margin="159,424,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>
<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,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>-->
<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>
</Window>

@ -22,6 +22,7 @@ using XGL.Models;
using System.Diagnostics;
using System.IO;
using System.Threading;
using XGL.Data.DBService;
namespace XGL
{
@ -30,11 +31,15 @@ namespace XGL
/// </summary>
public partial class LoginPage : Window
{
userDB usdb = new userDB();
FormingMachineService formingMachineService = new FormingMachineService();
private BackgroundWorker bw = new BackgroundWorker();
private UserLogin ul;
Main main;
public static LoginPage loginpage;
string UserCarNo = "";
List<ShiftInfoModel> listShift;
string deviceCode = Utils.GetAppSetting("DeviceCode");
public LoginPage()
{
InitializeComponent();
@ -47,16 +52,53 @@ namespace XGL
//Main mainWindow = new Main();
//mainWindow.Show();
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()
{
string fileName = "vsion.txt"; // 指定要操作的文件名
string filePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName); // 构建完整的文件路径
string fileContent = File.ReadAllText(filePath);
lbVersion.Content = fileContent;
LoginUser.Version = fileContent;
}
@ -68,24 +110,49 @@ namespace XGL
//this.dldh.IsActive = true;//遮罩层可见
this.dldh.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
{
username = username.Text.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();
bw.RunWorkerAsync();
}
catch (Exception ex)
{
LogHelper.instance.log.Error( "登陆异常:" + ex.Message);
}
LogHelper.instance.log.Error("登陆异常:" + ex.Message);
}
}
void bw_DoWork(object sender, DoWorkEventArgs e)
{
JudgeLogin();
{
JudgeLogin();
}
private int LoginStatus = 0;
private int JudgeLogin()
@ -103,12 +170,13 @@ namespace XGL
LoginStatus = -2;
return LoginStatus;
}
userDB usdb = new userDB();
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)
{
usdb.UpdateWorkDate(deviceCode, ul.shiftID, ul.workDate);
if (ul.IsChecked == true)
{
Common.IniWriteValue("登录明细", "loginUser", ul.username);
@ -172,41 +240,41 @@ namespace XGL
this.Close();
break;
case 0:
CustomMessageBox.Show("登录失败", CustomMessageBoxIcon.Error);
CustomMessageBox.Show("登录失败", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
//this.Dispatcher.Invoke(
//new Action(() => { zzdl.Content = "登录失败"; zzdl.Foreground = Brushes.Red; }
//),
//System.Windows.Threading.DispatcherPriority.Render) ;
break;
case -1:
//this.Dispatcher.Invoke(
//new Action(() => { zzdl.Content = "账号或密码错误"; zzdl.Foreground = Brushes.Red; }
//),
//System.Windows.Threading.DispatcherPriority.Render);
CustomMessageBox.Show("账号或密码错误", CustomMessageBoxIcon.Error);
CustomMessageBox.Show("账号或密码错误", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break;
case -2:
//zzdl.Content = "请输入密码";
//zzdl.Foreground = Brushes.Red;
CustomMessageBox.Show("请输入密码", CustomMessageBoxIcon.Error);
CustomMessageBox.Show("请输入密码", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break;
case -3:
//zzdl.Content = "请输入账号";
//zzdl.Foreground = Brushes.Red;
CustomMessageBox.Show("请输入账号", CustomMessageBoxIcon.Error);
CustomMessageBox.Show("请输入账号", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break;
case -4:
//zzdl.Content = "加载菜单异常,请重试";
//zzdl.Foreground = Brushes.Red;
CustomMessageBox.Show("加载菜单异常,请重试", CustomMessageBoxIcon.Error);
CustomMessageBox.Show("加载菜单异常,请重试", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break;
case -5:
// this.Dispatcher.Invoke(
//new Action(() => zzdl.Content = "登录异常,请重试"
//),
//System.Windows.Threading.DispatcherPriority.Render);
CustomMessageBox.Show("登录异常,请重试", CustomMessageBoxIcon.Error);
// this.Dispatcher.Invoke(
//new Action(() => zzdl.Content = "登录异常,请重试"
//),
//System.Windows.Threading.DispatcherPriority.Render);
CustomMessageBox.Show("登录异常,请重试", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
break;
}
//dldh.IsActive = false;
@ -214,7 +282,7 @@ namespace XGL
zzdl.Visibility = Visibility.Collapsed;
}
private void btnloginout_Click(object sender, RoutedEventArgs e)
{
Environment.Exit(0);
@ -244,10 +312,10 @@ namespace XGL
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
}
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.DragMove();//窗体可移动
@ -289,7 +357,7 @@ namespace XGL
{
StartInfo = startInfo
};
process.Start();
process.Start();
Environment.Exit(0);
}
@ -297,7 +365,7 @@ namespace XGL
else
{
MessageBox.Show("没有检测到新版本", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
else

@ -981,9 +981,6 @@
</ItemGroup>
<ItemGroup>
<Resource Include="LanjuLogo.png" />
<Content Include="newMessage.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="libmupdf.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</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;
string UserCarNo = "";
List<ShiftInfoModel> listShift;
string deviceCode = Utils.GetAppSetting("DeviceCode");
public LoginPage()
{
InitializeComponent();
@ -164,7 +166,8 @@ namespace XGLFinishPro
bw.ReportProgress(1);
bool islogin = usdb.Login(ul.username, ul.pwd, ul.shiftID,ul.teamID,ul.workDate, ul.startTime, ul.endTime);
if (islogin)
{
{
usdb.UpdateWorkDate(deviceCode,ul.shiftID,ul.workDate);
if (ul.IsChecked == true)
{
Common.IniWriteValue("登录明细", "loginUser", ul.username);

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XGLFinishPro.Views"
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>
<!--ComboBox下拉按钮-->
<Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
@ -94,7 +94,13 @@
</ControlTemplate>
</Setter.Value>
</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>
<Grid>
<Grid.Background>
@ -118,42 +124,42 @@
<RowDefinition/>
</Grid.RowDefinitions>
<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 x:Name="lbCurrOrderNo" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="202311010001" Width="260"></Label>
</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>
<TextBox x:Name="txtQuantity" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtQuantity_TextChanged"></TextBox>
</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>
<TextBox x:Name="txtWorkTime" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtWorkTime_TextChanged"></TextBox>
</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>
<TextBox x:Name="txtUserCount" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtUserCount_TextChanged"></TextBox>
</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>
<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 Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="15,0,0,0">
<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>
<Label Content="* 不选批次号默认为该工单报工" Foreground="Red" VerticalAlignment="Center"></Label>
<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>
<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>
</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>
<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 >
<ScaleTransform ScaleX="2" ScaleY="2" />
</CheckBox.LayoutTransform>
</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="btnCancel" Grid.Row="6" Grid.Column="1" Width="120" Height="43" Content="取消" Margin="10" FontWeight="Bold" FontSize="22" Click="btnCancel_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="3,-20,0,0" FontWeight="Bold" FontSize="22" Click="btnCancel_Click"/>
</Grid>

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

@ -439,9 +439,9 @@
<DataGridTextColumn Width="480" Header="产品名称" Binding="{Binding product_name}" />
<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>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{Binding status, Converter={StaticResource SyncFlagColorConvert}}" />
@ -454,6 +454,7 @@
<DataGridTextColumn Width="250" Header="产品编码" Binding="{Binding product_code}" />
<DataGridTextColumn Width="180" Header="批次数量" Binding="{Binding batch_quantity}" />
<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="340" Header="流转码" Binding="{Binding work_batch_code}" />-->
<!--<DataGridTextColumn Width="60" Header="出入" Binding="{Binding taskcode,Converter={StaticResource TaskCodeConverter}}"/>-->

@ -441,36 +441,40 @@ namespace XGLFinishPro.Views
MessageBox.Show("你选择的工单不能报工!", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
string newReportCode = "";
DataTable dtNewReportCode = formingMachineService.GetReportCode();
if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0)
ExecReportWorkWin execReport = new ExecReportWorkWin(selectedRow["workorder_code"].ToString(), selectedRow["quantity_split"].ToString(), selectedRow["workorder_id"].ToString(),selectedRow["batch_code"].ToString());
if (execReport.ShowDialog() == true)
{
newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
}
else
{
if (string.IsNullOrEmpty(dtNewReportCode.Rows[0]["report_code"].ToString()))
//获取报工编码
string newReportCode = "";
DataTable dtNewReportCode = formingMachineService.GetReportCode();
if (dtNewReportCode == null || dtNewReportCode.Rows.Count == 0)
{
newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
}
else
{
newReportCode = (Convert.ToInt64(dtNewReportCode.Rows[0]["report_code"].ToString()) + 1).ToString();
if (string.IsNullOrEmpty(dtNewReportCode.Rows[0]["report_code"].ToString()))
{
newReportCode = DateTime.Now.ToString("yyyyMMdd") + "0001";
}
else
{
newReportCode = (Convert.ToInt64(dtNewReportCode.Rows[0]["report_code"].ToString()) + 1).ToString();
}
}
}
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 costCenter = execReport._costCenter;
string userCount = execReport._useMan;
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)
{
{
//调用报工接口
string apiUrl = formingMachineService.InterfaceUrl("reportWork");
ReportWork reportWork = new ReportWork();

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

Loading…
Cancel
Save