().Single(x => x.LoginCode == LoginCode);
+ if (m == null)
+ return new APIResponseData { Code = -1, Message = "账户不存在!" };
+
+ if (UserDefalutPwd)
+ PassWord = EncryptionHelper.EncryptByMD5(DefaultConstValue.USER_DEFAULT_PASSWORD_RESET);
+
+ base.db.ChangeDatabase("main");
+
+ if (db.Updateable(m).UpdateColumns(it => new { it.PassWord, it.ModifyDate, it.ModifyBy, it.LastPwdAlterTime })
+ .ReSetValue(it => it.PassWord == PassWord)
+ .ReSetValue(it => it.ModifyBy == Operation.Operator)
+ .ReSetValue(it => it.ModifyDate == CurrentDate)
+ .ReSetValue(it => it.LastPwdAlterTime == CurrentDate).ExecuteCommand() > 0)
+ {
+ base.db.ChangeDatabase("log");
+ UserPassChangeLogInfo log = new UserPassChangeLogInfo
+ {
+ LoginCode = m.LoginCode,
+ OperationComputer = Operation.ClientName,
+ OperationDate = CurrentDate,
+ OperationIP = Operation.IPAddress,
+ OperationType = $"{(UserDefalutPwd ? "使用默认" : "使用随机")}密码重置",
+ OperationUser = Operation.Operator,
+ OperationUserName = Operation.OperatorName,
+ PwdNew = PassWord,
+ PwdOld = m.PassWord,
+ UserAutoID = m.AutoID
+ };
+ db.Insertable(log).ExecuteCommand();
+
+ return new APIResponseData { Code = 1, Message = "操作成功!" };
+ }
+ return result;
+ }
+ catch (Exception e)
+ {
+ return new APIResponseData { Code = -1, Message = e.Message };
+ }
+ }
+
///
/// 用户修改
diff --git a/DeviceRepair.Models/DefaultConstValue.cs b/DeviceRepair.Models/DefaultConstValue.cs
new file mode 100644
index 0000000..9531eb1
--- /dev/null
+++ b/DeviceRepair.Models/DefaultConstValue.cs
@@ -0,0 +1,11 @@
+namespace DeviceRepair.Models
+{
+ public static class DefaultConstValue
+ {
+
+ ///
+ /// 重置用户时用的默认密码
+ ///
+ public const string USER_DEFAULT_PASSWORD_RESET = "Kanghui1";
+ }
+}
diff --git a/DeviceRepair.Models/DeviceRepair.Models.csproj b/DeviceRepair.Models/DeviceRepair.Models.csproj
index bd447b7..771dabc 100644
--- a/DeviceRepair.Models/DeviceRepair.Models.csproj
+++ b/DeviceRepair.Models/DeviceRepair.Models.csproj
@@ -60,6 +60,7 @@
+
@@ -67,6 +68,7 @@
+
diff --git a/DeviceRepair.Models/DeviceRepair/DeviceWarrantyRequestFormStatus.cs b/DeviceRepair.Models/DeviceRepair/DeviceWarrantyRequestFormStatus.cs
index 73c5fd3..91acb38 100644
--- a/DeviceRepair.Models/DeviceRepair/DeviceWarrantyRequestFormStatus.cs
+++ b/DeviceRepair.Models/DeviceRepair/DeviceWarrantyRequestFormStatus.cs
@@ -4,12 +4,24 @@ namespace DeviceRepair.Models
{
public enum DeviceWarrantyRequestFormStatus
{
+ ///
+ /// 待维修
+ ///
[Description("待维修")]
AwaitingRepair,
+ ///
+ /// 待审核
+ ///
[Description("待审核")]
AwaitingApproval,
+ ///
+ /// 已完成
+ ///
[Description("已完成")]
BeComplate,
+ ///
+ /// 全部
+ ///
[Description("全部")]
All
}
diff --git a/DeviceRepair.Models/DeviceRepair/ExportView/MaintainOrderView.cs b/DeviceRepair.Models/DeviceRepair/ExportView/MaintainOrderView.cs
new file mode 100644
index 0000000..f36cac7
--- /dev/null
+++ b/DeviceRepair.Models/DeviceRepair/ExportView/MaintainOrderView.cs
@@ -0,0 +1,134 @@
+using System;
+using System.ComponentModel;
+
+namespace DeviceRepair.Models.DeviceRepair.ExportView
+{
+ public class MaintainOrderView
+ {
+ ///
+ /// 序号
+ ///
+ [Description("No.\n序号")]
+ public int AutoNumber { get; set; }
+
+ ///
+ /// 工厂
+ ///
+ [Description("Plant\n工厂")]
+ public int Plant { get; set; }
+
+ ///
+ /// 订单
+ ///
+ [Description("Orde\n订单")]
+ public int AutoID { get; set; }
+
+ ///
+ /// 技术标识号
+ ///
+ [Description("Technical identification number\n技术标识号")]
+ public string EquipmentID { get; set; }
+
+ ///
+ /// 技术对象描述
+ ///
+ [Description("Technical object description\n技术对象描述")]
+ public string EquipmentName { get; set; }
+
+ ///
+ /// 实际下达日期
+ ///
+ [Description("Actual order date Month/day\n实际下达日期")]
+ public string FormCreatOnDate { get; set; }
+
+ ///
+ /// 基本开始时间
+ ///
+ [Description("Basic start time\n基本开始时间")]
+ public string FormCreatOnTime { get; set; }
+
+ ///
+ /// 参考日期
+ ///
+ [Description("Reference date Month/day\n参考日期")]
+ public string ReferenceOnDate { get; set; }
+
+ ///
+ /// 参考时间
+ ///
+ [Description("Reference time\n参考时间")]
+ public string ReferenceOnTime { get; set; }
+
+ ///
+ /// 故障描述
+ ///
+ [Description("Failure description\n故障描述")]
+ public string FaultSymptoms { get; set; }
+
+ ///
+ /// 维修人员
+ ///
+ [Description("Repair personnel\n维修人员")]
+ public string RepairPersonnel { get; set; }
+
+ ///
+ /// 修理开始时间月/日
+ ///
+ [Description("Repair Start Time\n修理开始时间月/日")]
+ public string RepairStartDate { get; set; }
+
+ ///
+ /// 修理完成时间月/日
+ ///
+ [Description("Repair finish Time\n修理完成时间月/日")]
+ public string RepairFinishDate { get; set; }
+
+ ///
+ /// 故障原因
+ ///
+ [Description("Fault Cause \n故障原因")]
+ public string MaintainCause { get; set; }
+
+ ///
+ /// 维修内容
+ ///
+ [Description("Repair Contents\n维修内容")]
+ public string MaintainContent { get; set; }
+
+ ///
+ /// 配件
+ ///
+ [Description("Replacement Accessories\n配件")]
+ public string Accessories { get; set; }
+
+ ///
+ /// 停机时长(H)
+ ///
+ [Description("Downtime\n停机时长\n(H)")]
+ public decimal Downtime { get; set; }
+
+ ///
+ /// 维修工时(H)
+ ///
+ [Description("Repair Duration\n维修工时\n(H)")]
+ public decimal RepairDuration { get; set; }
+
+ ///
+ /// 维修方式
+ ///
+ [Description("maintenance mode\n维修方式")]
+ public string Maintenance { get; set; }
+
+ ///
+ /// 现象区分
+ ///
+ [Description("Fault symptom differentiation\n现象区分")]
+ public string SymptomlDistinction { get; set; }
+
+ ///
+ /// 验证编号
+ ///
+ [Description("Verification number\n验证编号")]
+ public string ValidateNo { get; set; }
+ }
+}
diff --git a/DeviceRepairAndOptimization/Biz/MaintenanceManager.cs b/DeviceRepairAndOptimization/Biz/MaintenanceManager.cs
index adf25b0..752bb2b 100644
--- a/DeviceRepairAndOptimization/Biz/MaintenanceManager.cs
+++ b/DeviceRepairAndOptimization/Biz/MaintenanceManager.cs
@@ -206,5 +206,40 @@ namespace DeviceRepairAndOptimization.Biz
}
return apiResponseData;
}
+
+ ///
+ /// 设备维修列表导出
+ ///
+ ///
+ ///
+ public APIResponseData GetXlsxData(DeviceWarrantyRequestFormFilter FilterInfo)
+ {
+ APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "未能获取到数据!" };
+ try
+ {
+ switch (DeviceRepair.Utils.Config.Configurations.Properties.ConnType?.ToLower())
+ {
+ case "api":
+ apiResponseData = ApiHelper.Instance.SendMessage(new HttpItem
+ {
+ URL = $"{ServiceRouteConstValue.GetXlsxData}",
+ Method = "Post",
+ ContentType = "application/json; charset=utf-8",
+ Postdata = JsonConvert.SerializeObject(FilterInfo),
+ });
+ break;
+
+ default:
+ apiResponseData = MaintenanceAccess.Instance.GetDatas(FilterInfo);
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ apiResponseData.Code = -1;
+ apiResponseData.Message = ex.Message;
+ }
+ return apiResponseData;
+ }
}
}
diff --git a/DeviceRepairAndOptimization/Biz/UserManager.cs b/DeviceRepairAndOptimization/Biz/UserManager.cs
index ed6992c..ff5d259 100644
--- a/DeviceRepairAndOptimization/Biz/UserManager.cs
+++ b/DeviceRepairAndOptimization/Biz/UserManager.cs
@@ -179,6 +179,51 @@ namespace DeviceRepairAndOptimization.Biz
return apiResponseData;
}
+ ///
+ /// 使用默认密码重置
+ ///
+ ///
+ ///
+ public APIResponseData ReprovisionDefaultPassword(string LoginCode, string PassWord = "", bool UserDefalutPwd = true)
+ {
+ APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "账户或密码不正确!" };
+ try
+ {
+ switch (DeviceRepair.Utils.Config.Configurations.Properties.ConnType?.ToLower())
+ {
+ case "api":
+
+ #region api
+
+ apiResponseData = ApiHelper.Instance.SendMessage(new HttpItem
+ {
+ URL = $"{ServiceRouteConstValue.ReprovisionDefaultPassword}?LoginCode={LoginCode}&PassWord={PassWord}",
+ Method = "Post",
+ ContentType = "application/x-www-form-urlencoded",
+ });
+
+ #endregion
+
+ break;
+ case "sql":
+ #region sql
+
+ apiResponseData = UserAccess.Instance.ReprovisionDefaultPassword(LoginCode, GlobalInfo.OperationInfo, PassWord, UserDefalutPwd);
+
+ #endregion
+ break;
+ default:
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ apiResponseData.Code = -1;
+ apiResponseData.Message = ex.Message;
+ }
+ return apiResponseData;
+ }
+
///
/// 查询最后修改密码时间
///
diff --git a/DeviceRepairAndOptimization/Pages/CustomField/pageFieldCode.cs b/DeviceRepairAndOptimization/Pages/CustomField/pageFieldCode.cs
index 542374b..6681df5 100644
--- a/DeviceRepairAndOptimization/Pages/CustomField/pageFieldCode.cs
+++ b/DeviceRepairAndOptimization/Pages/CustomField/pageFieldCode.cs
@@ -351,7 +351,7 @@ namespace DeviceRepairAndOptimization.Pages.CustomField
if (CurrentFieldInfo == null)
throw new Exception("请选择字段所在行!");
- string RoleCode = $"BIZ_FIELD_{FieldCode.ToUpper()}_EDIT";
+ string RoleCode = $"BIZ_FIELD_{FieldCode.ToUpper()}_STATUS";
if (!GlobalInfo.HasRole(RoleCode))
{
throw new Exception($"当前账号缺少此操作的权限");
@@ -382,7 +382,7 @@ namespace DeviceRepairAndOptimization.Pages.CustomField
if (string.IsNullOrWhiteSpace(DescriptionValue))
throw new Exception("原因不能为空,是否继续操作?");
- if (DescriptionValue.Length >= 3800)
+ if (DescriptionValue.Length >= 400)
throw new Exception("原因描述超出长度,最大长度为200!");
bool BeStatus = !CurrentFieldInfo.Status;
diff --git a/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.Designer.cs b/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.Designer.cs
index e438f43..31dbd8d 100644
--- a/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.Designer.cs
+++ b/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.Designer.cs
@@ -111,15 +111,15 @@
columnDefinition2.Width = 100D;
Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] {
columnDefinition2});
- rowDefinition4.Height = 200D;
+ rowDefinition4.Height = 167D;
rowDefinition4.SizeType = System.Windows.Forms.SizeType.Absolute;
- rowDefinition5.Height = 50D;
+ rowDefinition5.Height = 42D;
rowDefinition5.SizeType = System.Windows.Forms.SizeType.Absolute;
- rowDefinition6.Height = 50D;
+ rowDefinition6.Height = 42D;
rowDefinition6.SizeType = System.Windows.Forms.SizeType.Absolute;
- rowDefinition7.Height = 50D;
+ rowDefinition7.Height = 42D;
rowDefinition7.SizeType = System.Windows.Forms.SizeType.Absolute;
- rowDefinition8.Height = 50D;
+ rowDefinition8.Height = 42D;
rowDefinition8.SizeType = System.Windows.Forms.SizeType.Absolute;
Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] {
rowDefinition4,
@@ -127,16 +127,16 @@
rowDefinition6,
rowDefinition7,
rowDefinition8});
- Root.Size = new System.Drawing.Size(608, 437);
+ Root.Size = new System.Drawing.Size(473, 364);
Root.TextVisible = false;
//
// layoutControlItem1
//
this.layoutControlItem1.Control = stackPanel1;
- this.layoutControlItem1.Location = new System.Drawing.Point(0, 350);
+ this.layoutControlItem1.Location = new System.Drawing.Point(0, 293);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 4;
- this.layoutControlItem1.Size = new System.Drawing.Size(588, 67);
+ this.layoutControlItem1.Size = new System.Drawing.Size(457, 55);
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem1.TextVisible = false;
//
@@ -145,25 +145,28 @@
stackPanel1.Controls.Add(this.btn_Cancel);
stackPanel1.Controls.Add(this.btn_Submit);
stackPanel1.LayoutDirection = DevExpress.Utils.Layout.StackPanelLayoutDirection.RightToLeft;
- stackPanel1.Location = new System.Drawing.Point(12, 362);
+ stackPanel1.Location = new System.Drawing.Point(10, 303);
+ stackPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
stackPanel1.Name = "stackPanel1";
- stackPanel1.Size = new System.Drawing.Size(584, 63);
+ stackPanel1.Size = new System.Drawing.Size(453, 51);
stackPanel1.TabIndex = 4;
//
// btn_Cancel
//
- this.btn_Cancel.Location = new System.Drawing.Point(487, 17);
+ this.btn_Cancel.Location = new System.Drawing.Point(378, 13);
+ this.btn_Cancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_Cancel.Name = "btn_Cancel";
- this.btn_Cancel.Size = new System.Drawing.Size(94, 29);
+ this.btn_Cancel.Size = new System.Drawing.Size(73, 24);
this.btn_Cancel.TabIndex = 0;
this.btn_Cancel.Text = "取消";
this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
//
// btn_Submit
//
- this.btn_Submit.Location = new System.Drawing.Point(387, 17);
+ this.btn_Submit.Location = new System.Drawing.Point(301, 13);
+ this.btn_Submit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_Submit.Name = "btn_Submit";
- this.btn_Submit.Size = new System.Drawing.Size(94, 29);
+ this.btn_Submit.Size = new System.Drawing.Size(73, 24);
this.btn_Submit.TabIndex = 1;
this.btn_Submit.Text = "提交";
this.btn_Submit.Click += new System.EventHandler(this.btn_Submit_Click);
@@ -173,16 +176,17 @@
this.layoutControlItem2.Control = panelControl1;
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem2.Name = "layoutControlItem2";
- this.layoutControlItem2.Size = new System.Drawing.Size(588, 200);
+ this.layoutControlItem2.Size = new System.Drawing.Size(457, 167);
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem2.TextVisible = false;
//
// panelControl1
//
panelControl1.Controls.Add(groupBox1);
- panelControl1.Location = new System.Drawing.Point(12, 12);
+ panelControl1.Location = new System.Drawing.Point(10, 10);
+ panelControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
panelControl1.Name = "panelControl1";
- panelControl1.Size = new System.Drawing.Size(584, 196);
+ panelControl1.Size = new System.Drawing.Size(453, 163);
panelControl1.TabIndex = 5;
//
// groupBox1
@@ -190,8 +194,10 @@
groupBox1.Controls.Add(this.layoutControl2);
groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
groupBox1.Location = new System.Drawing.Point(2, 2);
+ groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
groupBox1.Name = "groupBox1";
- groupBox1.Size = new System.Drawing.Size(580, 192);
+ groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ groupBox1.Size = new System.Drawing.Size(449, 159);
groupBox1.TabIndex = 0;
groupBox1.TabStop = false;
groupBox1.Text = "点检表信息";
@@ -202,7 +208,8 @@
this.layoutControl2.Controls.Add(this.txt_Number);
this.layoutControl2.Controls.Add(this.txt_Rev);
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.layoutControl2.Location = new System.Drawing.Point(3, 20);
+ this.layoutControl2.Location = new System.Drawing.Point(2, 16);
+ this.layoutControl2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.layoutControl2.Name = "layoutControl2";
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.BackColor = System.Drawing.Color.LightGray;
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F);
@@ -212,41 +219,44 @@
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControl2.OptionsPrint.AppearanceGroupCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControl2.Root = this.layoutControlGroup1;
- this.layoutControl2.Size = new System.Drawing.Size(574, 169);
+ this.layoutControl2.Size = new System.Drawing.Size(445, 141);
this.layoutControl2.TabIndex = 0;
this.layoutControl2.Text = "layoutControl2";
//
// txt_FormName
//
- this.txt_FormName.Location = new System.Drawing.Point(84, 18);
+ this.txt_FormName.Location = new System.Drawing.Point(67, 15);
+ this.txt_FormName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_FormName.Name = "txt_FormName";
this.txt_FormName.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_FormName.Properties.Appearance.Options.UseFont = true;
this.txt_FormName.Properties.ReadOnly = true;
- this.txt_FormName.Size = new System.Drawing.Size(478, 32);
+ this.txt_FormName.Size = new System.Drawing.Size(368, 26);
this.txt_FormName.StyleController = this.layoutControl2;
this.txt_FormName.TabIndex = 6;
//
// txt_Number
//
- this.txt_Number.Location = new System.Drawing.Point(84, 68);
+ this.txt_Number.Location = new System.Drawing.Point(67, 57);
+ this.txt_Number.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_Number.Name = "txt_Number";
this.txt_Number.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_Number.Properties.Appearance.Options.UseFont = true;
this.txt_Number.Properties.ReadOnly = true;
- this.txt_Number.Size = new System.Drawing.Size(478, 32);
+ this.txt_Number.Size = new System.Drawing.Size(368, 26);
this.txt_Number.StyleController = this.layoutControl2;
this.txt_Number.TabIndex = 5;
//
// txt_Rev
//
this.txt_Rev.Anchor = System.Windows.Forms.AnchorStyles.Left;
- this.txt_Rev.Location = new System.Drawing.Point(84, 118);
+ this.txt_Rev.Location = new System.Drawing.Point(67, 99);
+ this.txt_Rev.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_Rev.Name = "txt_Rev";
this.txt_Rev.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_Rev.Properties.Appearance.Options.UseFont = true;
this.txt_Rev.Properties.ReadOnly = true;
- this.txt_Rev.Size = new System.Drawing.Size(478, 32);
+ this.txt_Rev.Size = new System.Drawing.Size(368, 26);
this.txt_Rev.StyleController = this.layoutControl2;
this.txt_Rev.TabIndex = 4;
//
@@ -274,18 +284,18 @@
rowDefinition1,
rowDefinition2,
rowDefinition3});
- this.layoutControlGroup1.Size = new System.Drawing.Size(574, 169);
+ this.layoutControlGroup1.Size = new System.Drawing.Size(445, 141);
this.layoutControlGroup1.TextVisible = false;
//
// 文档编号
//
this.文档编号.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.文档编号.Control = this.txt_Number;
- this.文档编号.Location = new System.Drawing.Point(0, 49);
+ this.文档编号.Location = new System.Drawing.Point(0, 41);
this.文档编号.Name = "文档编号";
this.文档编号.OptionsTableLayoutItem.RowIndex = 1;
- this.文档编号.Size = new System.Drawing.Size(554, 50);
- this.文档编号.TextSize = new System.Drawing.Size(60, 18);
+ this.文档编号.Size = new System.Drawing.Size(429, 42);
+ this.文档编号.TextSize = new System.Drawing.Size(48, 15);
//
// 文档名称
//
@@ -293,38 +303,39 @@
this.文档名称.Control = this.txt_FormName;
this.文档名称.Location = new System.Drawing.Point(0, 0);
this.文档名称.Name = "文档名称";
- this.文档名称.Size = new System.Drawing.Size(554, 49);
- this.文档名称.TextSize = new System.Drawing.Size(60, 18);
+ this.文档名称.Size = new System.Drawing.Size(429, 41);
+ this.文档名称.TextSize = new System.Drawing.Size(48, 15);
//
// 版本
//
this.版本.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.版本.Control = this.txt_Rev;
- this.版本.Location = new System.Drawing.Point(0, 99);
+ this.版本.Location = new System.Drawing.Point(0, 83);
this.版本.Name = "版本";
this.版本.OptionsTableLayoutItem.RowIndex = 2;
- this.版本.Size = new System.Drawing.Size(554, 50);
- this.版本.TextSize = new System.Drawing.Size(60, 18);
+ this.版本.Size = new System.Drawing.Size(429, 42);
+ this.版本.TextSize = new System.Drawing.Size(48, 15);
//
// 说明
//
this.说明.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.说明.Control = this.txt_Remark;
- this.说明.Location = new System.Drawing.Point(0, 300);
+ this.说明.Location = new System.Drawing.Point(0, 251);
this.说明.Name = "说明";
this.说明.OptionsTableLayoutItem.RowIndex = 3;
- this.说明.Size = new System.Drawing.Size(588, 50);
+ this.说明.Size = new System.Drawing.Size(457, 42);
this.说明.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
- this.说明.TextSize = new System.Drawing.Size(124, 18);
+ this.说明.TextSize = new System.Drawing.Size(96, 15);
this.说明.TextToControlDistance = 5;
//
// txt_Remark
//
- this.txt_Remark.Location = new System.Drawing.Point(141, 319);
+ this.txt_Remark.Location = new System.Drawing.Point(111, 267);
+ this.txt_Remark.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_Remark.Name = "txt_Remark";
this.txt_Remark.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_Remark.Properties.Appearance.Options.UseFont = true;
- this.txt_Remark.Size = new System.Drawing.Size(455, 32);
+ this.txt_Remark.Size = new System.Drawing.Size(352, 26);
this.txt_Remark.StyleController = this.layoutControl1;
this.txt_Remark.TabIndex = 7;
//
@@ -337,6 +348,7 @@
this.layoutControl1.Controls.Add(this.radioGroup1);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
+ this.layoutControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(939, 128, 812, 500);
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.BackColor = System.Drawing.Color.LightGray;
@@ -347,20 +359,21 @@
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControl1.OptionsPrint.AppearanceGroupCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControl1.Root = Root;
- this.layoutControl1.Size = new System.Drawing.Size(608, 437);
+ this.layoutControl1.Size = new System.Drawing.Size(473, 364);
this.layoutControl1.TabIndex = 0;
this.layoutControl1.Text = "layoutControl1";
//
// txt_FilePath
//
- this.txt_FilePath.Location = new System.Drawing.Point(141, 269);
+ this.txt_FilePath.Location = new System.Drawing.Point(111, 225);
+ this.txt_FilePath.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_FilePath.Name = "txt_FilePath";
this.txt_FilePath.Properties.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.txt_FilePath.Properties.Appearance.Options.UseFont = true;
this.txt_FilePath.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txt_FilePath.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
- this.txt_FilePath.Size = new System.Drawing.Size(455, 32);
+ this.txt_FilePath.Size = new System.Drawing.Size(352, 26);
this.txt_FilePath.StyleController = this.layoutControl1;
this.txt_FilePath.TabIndex = 6;
this.txt_FilePath.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.txt_FilePath_ButtonClick);
@@ -368,13 +381,14 @@
// radioGroup1
//
this.radioGroup1.EditValue = 1;
- this.radioGroup1.Location = new System.Drawing.Point(141, 212);
+ this.radioGroup1.Location = new System.Drawing.Point(111, 177);
+ this.radioGroup1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.radioGroup1.Name = "radioGroup1";
this.radioGroup1.Properties.GlyphAlignment = DevExpress.Utils.HorzAlignment.Default;
this.radioGroup1.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] {
new DevExpress.XtraEditors.Controls.RadioGroupItem("FM-P0047.03", "FM-P0047.03"),
new DevExpress.XtraEditors.Controls.RadioGroupItem("FM-P0079.02", "FM-P0079.02")});
- this.radioGroup1.Size = new System.Drawing.Size(455, 46);
+ this.radioGroup1.Size = new System.Drawing.Size(352, 38);
this.radioGroup1.StyleController = this.layoutControl1;
this.radioGroup1.TabIndex = 8;
//
@@ -382,24 +396,24 @@
//
this.文件路径.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.文件路径.Control = this.txt_FilePath;
- this.文件路径.Location = new System.Drawing.Point(0, 250);
+ this.文件路径.Location = new System.Drawing.Point(0, 209);
this.文件路径.Name = "文件路径";
this.文件路径.OptionsTableLayoutItem.RowIndex = 2;
- this.文件路径.Size = new System.Drawing.Size(588, 50);
+ this.文件路径.Size = new System.Drawing.Size(457, 42);
this.文件路径.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
- this.文件路径.TextSize = new System.Drawing.Size(124, 18);
+ this.文件路径.TextSize = new System.Drawing.Size(96, 15);
this.文件路径.TextToControlDistance = 5;
//
// layoutControlItem3
//
this.layoutControlItem3.Control = this.radioGroup1;
- this.layoutControlItem3.Location = new System.Drawing.Point(0, 200);
+ this.layoutControlItem3.Location = new System.Drawing.Point(0, 167);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.OptionsTableLayoutItem.RowIndex = 1;
- this.layoutControlItem3.Size = new System.Drawing.Size(588, 50);
+ this.layoutControlItem3.Size = new System.Drawing.Size(457, 42);
this.layoutControlItem3.Text = "文件版本";
this.layoutControlItem3.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
- this.layoutControlItem3.TextSize = new System.Drawing.Size(124, 18);
+ this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 15);
this.layoutControlItem3.TextToControlDistance = 5;
//
// xtraOpenFileDialog1
@@ -412,13 +426,14 @@
//
// Page_FormVersionAdd
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(608, 437);
+ this.ClientSize = new System.Drawing.Size(473, 364);
this.Controls.Add(this.layoutControl1);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.IconOptions.Image = global::DeviceRepairAndOptimization.Properties.Resources.edit_16x16;
+ this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "Page_FormVersionAdd";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Page_FormVersionAdd";
diff --git a/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.cs b/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.cs
index 0ed8a64..dafdc6a 100644
--- a/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.cs
+++ b/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.cs
@@ -61,6 +61,7 @@ namespace DeviceRepairAndOptimization.Pages.FormVersion
//暂时禁用,后面改为替换
txt_FilePath.Enabled = false;
+ radioGroup1.Enabled = false;
txt_FormName.Text = subData.FormName;
txt_Number.Text = subData.VersionCode;
txt_Rev.Text = subData.VersionRev;
@@ -136,6 +137,7 @@ namespace DeviceRepairAndOptimization.Pages.FormVersion
{
splashScreenManager1.TryCloseWait();
XtraMessageBoxHelper.Error(ex.Message);
+ return;
}
this.DialogResult = DialogResult.OK;
diff --git a/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.resx b/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.resx
index 7006651..43fbccc 100644
--- a/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.resx
+++ b/DeviceRepairAndOptimization/Pages/FormVersion/Page_FormVersionAdd.resx
@@ -130,6 +130,6 @@
False
- 245, 17
+ 205, 17
\ No newline at end of file
diff --git a/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.Designer.cs b/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.Designer.cs
index 450f136..7894fec 100644
--- a/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.Designer.cs
+++ b/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.Designer.cs
@@ -99,7 +99,7 @@ namespace DeviceRepairAndOptimization.Pages
tableLayoutPanel1.RowCount = 2;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- tableLayoutPanel1.Size = new System.Drawing.Size(1598, 916);
+ tableLayoutPanel1.Size = new System.Drawing.Size(1854, 916);
tableLayoutPanel1.TabIndex = 0;
//
// gridControl1
@@ -111,7 +111,7 @@ namespace DeviceRepairAndOptimization.Pages
this.gridControl1.Name = "gridControl1";
this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.Operations});
- this.gridControl1.Size = new System.Drawing.Size(1592, 862);
+ this.gridControl1.Size = new System.Drawing.Size(1848, 862);
this.gridControl1.TabIndex = 1;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
@@ -249,7 +249,7 @@ namespace DeviceRepairAndOptimization.Pages
flowLayoutPanel1.Controls.Add(this.btn_Filter);
flowLayoutPanel1.Controls.Add(this.EditSearch);
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
- flowLayoutPanel1.Location = new System.Drawing.Point(1198, 0);
+ flowLayoutPanel1.Location = new System.Drawing.Point(1454, 0);
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Size = new System.Drawing.Size(400, 35);
@@ -291,7 +291,7 @@ namespace DeviceRepairAndOptimization.Pages
stackPanel1.Location = new System.Drawing.Point(0, 0);
stackPanel1.Margin = new System.Windows.Forms.Padding(0);
stackPanel1.Name = "stackPanel1";
- stackPanel1.Size = new System.Drawing.Size(1198, 48);
+ stackPanel1.Size = new System.Drawing.Size(1454, 48);
stackPanel1.TabIndex = 2;
//
// btn_Add
@@ -350,7 +350,7 @@ namespace DeviceRepairAndOptimization.Pages
//
this.AcceptButton = this.btn_Filter;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.ClientSize = new System.Drawing.Size(1598, 916);
+ this.ClientSize = new System.Drawing.Size(1854, 916);
this.Controls.Add(tableLayoutPanel1);
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
diff --git a/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.cs b/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.cs
index c8f383e..c02e5a4 100644
--- a/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.cs
+++ b/DeviceRepairAndOptimization/Pages/FormVersion/page_FormVersion.cs
@@ -261,6 +261,12 @@ namespace DeviceRepairAndOptimization.Pages
return;
}
+ if (CurrentItem == null)
+ {
+ XtraMessageBoxHelper.Error($"请选择要操作的数据!");
+ return;
+ }
+
DialogResult result = XtraMessageBox.Show("你确定要执行此操作吗?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
@@ -299,6 +305,12 @@ namespace DeviceRepairAndOptimization.Pages
return;
}
+ if (CurrentItem == null)
+ {
+ XtraMessageBoxHelper.Error($"请选择要操作的数据!");
+ return;
+ }
+
if (CurrentItem.FormStatus)
{
// Page_AssignDrives view = new Page_AssignDrives(CurrentItem);
diff --git a/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.Designer.cs b/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.Designer.cs
index dccfc2a..315ff3d 100644
--- a/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.Designer.cs
+++ b/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.Designer.cs
@@ -53,6 +53,9 @@
this.barDockControl2 = new DevExpress.XtraBars.BarDockControl();
this.barDockControl3 = new DevExpress.XtraBars.BarDockControl();
this.barDockControl4 = new DevExpress.XtraBars.BarDockControl();
+ this.barBtn_ExportWord = new DevExpress.XtraBars.BarButtonItem();
+ this.barBtn_Print = new DevExpress.XtraBars.BarButtonItem();
+ this.barBtnExcel = new DevExpress.XtraBars.BarButtonItem();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.layoutControl5 = new DevExpress.XtraLayout.LayoutControl();
this.cbbIsDown = new DevExpress.XtraEditors.ComboBoxEdit();
@@ -61,8 +64,6 @@
this.btn_ChangeDownStatus = new DevExpress.XtraEditors.SimpleButton();
this.btn_Maintain = new DevExpress.XtraEditors.SimpleButton();
this.btn_Validate = new DevExpress.XtraEditors.SimpleButton();
- this.btn_Export = new DevExpress.XtraEditors.SimpleButton();
- this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.txt_DeviceID = new DevExpress.XtraEditors.TextEdit();
this.cb_Status = new DevExpress.XtraEditors.LookUpEdit();
this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
@@ -77,7 +78,7 @@
this.gcAutoID = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEquipmentID = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcEquipmentName = new DevExpress.XtraGrid.Columns.GridColumn();
- this.gcIsIsDownStatusText = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.gcIsIsDownText = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcLocationName = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcCreatOn = new DevExpress.XtraGrid.Columns.GridColumn();
this.gcFormStatusText = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -128,10 +129,10 @@
stackPanel1.Controls.Add(this.de_StartDate);
stackPanel1.Controls.Add(this.labelControl36);
stackPanel1.Controls.Add(this.de_EndDate);
- stackPanel1.Location = new System.Drawing.Point(129, 34);
+ stackPanel1.Location = new System.Drawing.Point(108, 34);
stackPanel1.Margin = new System.Windows.Forms.Padding(0);
stackPanel1.Name = "stackPanel1";
- stackPanel1.Size = new System.Drawing.Size(279, 29);
+ stackPanel1.Size = new System.Drawing.Size(525, 29);
stackPanel1.TabIndex = 5;
//
// de_StartDate
@@ -222,6 +223,9 @@
this.toolbarFormControl1.Size = new System.Drawing.Size(1826, 31);
this.toolbarFormControl1.TabIndex = 4;
this.toolbarFormControl1.TabStop = false;
+ this.toolbarFormControl1.TitleItemLinks.Add(this.barBtn_Print);
+ this.toolbarFormControl1.TitleItemLinks.Add(this.barBtn_ExportWord);
+ this.toolbarFormControl1.TitleItemLinks.Add(this.barBtnExcel);
this.toolbarFormControl1.ToolbarForm = this;
//
// toolbarFormManager1
@@ -231,6 +235,11 @@
this.toolbarFormManager1.DockControls.Add(this.barDockControl3);
this.toolbarFormManager1.DockControls.Add(this.barDockControl4);
this.toolbarFormManager1.Form = this;
+ this.toolbarFormManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
+ this.barBtn_ExportWord,
+ this.barBtn_Print,
+ this.barBtnExcel});
+ this.toolbarFormManager1.MaxItemId = 3;
//
// barDockControl1
//
@@ -264,6 +273,40 @@
this.barDockControl4.Manager = this.toolbarFormManager1;
this.barDockControl4.Size = new System.Drawing.Size(0, 1113);
//
+ // barBtn_ExportWord
+ //
+ this.barBtn_ExportWord.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
+ this.barBtn_ExportWord.Caption = "导出Word";
+ this.barBtn_ExportWord.Id = 0;
+ this.barBtn_ExportWord.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barBtn_ExportWord.ImageOptions.Image")));
+ this.barBtn_ExportWord.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barBtn_ExportWord.ImageOptions.LargeImage")));
+ this.barBtn_ExportWord.Name = "barBtn_ExportWord";
+ this.barBtn_ExportWord.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
+ this.barBtn_ExportWord.Size = new System.Drawing.Size(100, 50);
+ this.barBtn_ExportWord.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtn_ExportWord_ItemClick);
+ //
+ // barBtn_Print
+ //
+ this.barBtn_Print.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
+ this.barBtn_Print.Caption = "打印";
+ this.barBtn_Print.Id = 1;
+ this.barBtn_Print.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barBtn_Print.ImageOptions.Image")));
+ this.barBtn_Print.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barBtn_Print.ImageOptions.LargeImage")));
+ this.barBtn_Print.Name = "barBtn_Print";
+ this.barBtn_Print.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
+ this.barBtn_Print.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtn_Print_ItemClick);
+ //
+ // barBtnExcel
+ //
+ this.barBtnExcel.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
+ this.barBtnExcel.Caption = "导出Excel";
+ this.barBtnExcel.Id = 2;
+ this.barBtnExcel.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItem3.ImageOptions.Image")));
+ this.barBtnExcel.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItem3.ImageOptions.LargeImage")));
+ this.barBtnExcel.Name = "barBtnExcel";
+ this.barBtnExcel.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
+ this.barBtnExcel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnExcel_ItemClick);
+ //
// layoutControl1
//
this.layoutControl1.Controls.Add(this.layoutControl5);
@@ -286,6 +329,7 @@
this.layoutControl5.Controls.Add(this.cb_Status);
this.layoutControl5.Location = new System.Drawing.Point(10, 10);
this.layoutControl5.Name = "layoutControl5";
+ this.layoutControl5.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1215, 0, 650, 400);
this.layoutControl5.OptionsPrint.AppearanceGroupCaption.BackColor = System.Drawing.Color.LightGray;
this.layoutControl5.OptionsPrint.AppearanceGroupCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F);
this.layoutControl5.OptionsPrint.AppearanceGroupCaption.Options.UseBackColor = true;
@@ -300,7 +344,7 @@
//
// cbbIsDown
//
- this.cbbIsDown.Location = new System.Drawing.Point(529, 3);
+ this.cbbIsDown.Location = new System.Drawing.Point(733, 3);
this.cbbIsDown.MenuManager = this.barManager1;
this.cbbIsDown.Name = "cbbIsDown";
this.cbbIsDown.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
@@ -309,7 +353,7 @@
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.cbbIsDown.Properties.DropDownRows = 3;
this.cbbIsDown.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
- this.cbbIsDown.Size = new System.Drawing.Size(279, 26);
+ this.cbbIsDown.Size = new System.Drawing.Size(454, 26);
this.cbbIsDown.StyleController = this.layoutControl5;
this.cbbIsDown.TabIndex = 9;
//
@@ -319,12 +363,10 @@
this.stackPanel2.Controls.Add(this.btn_ChangeDownStatus);
this.stackPanel2.Controls.Add(this.btn_Maintain);
this.stackPanel2.Controls.Add(this.btn_Validate);
- this.stackPanel2.Controls.Add(this.btn_Export);
- this.stackPanel2.Controls.Add(this.simpleButton1);
- this.stackPanel2.Location = new System.Drawing.Point(812, 2);
+ this.stackPanel2.Location = new System.Drawing.Point(1191, 2);
this.stackPanel2.Margin = new System.Windows.Forms.Padding(0);
this.stackPanel2.Name = "stackPanel2";
- this.stackPanel2.Size = new System.Drawing.Size(982, 61);
+ this.stackPanel2.Size = new System.Drawing.Size(603, 61);
this.stackPanel2.TabIndex = 7;
//
// btn_Query
@@ -392,54 +434,20 @@
this.btn_Validate.Text = "设备恢复确认";
this.btn_Validate.Click += new System.EventHandler(this.btn_Validate_Click);
//
- // btn_Export
- //
- this.btn_Export.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
- this.btn_Export.Appearance.Options.UseFont = true;
- this.btn_Export.Appearance.Options.UseTextOptions = true;
- this.btn_Export.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
- this.btn_Export.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
- this.btn_Export.Enabled = false;
- this.btn_Export.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btn_Export.ImageOptions.Image")));
- this.btn_Export.Location = new System.Drawing.Point(526, 8);
- this.btn_Export.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
- this.btn_Export.Name = "btn_Export";
- this.btn_Export.Size = new System.Drawing.Size(78, 44);
- this.btn_Export.TabIndex = 5;
- this.btn_Export.Text = "导出";
- this.btn_Export.Click += new System.EventHandler(this.btn_Export_Click);
- //
- // simpleButton1
- //
- this.simpleButton1.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
- this.simpleButton1.Appearance.Options.UseFont = true;
- this.simpleButton1.Appearance.Options.UseTextOptions = true;
- this.simpleButton1.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
- this.simpleButton1.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
- this.simpleButton1.Enabled = false;
- this.simpleButton1.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("simpleButton1.ImageOptions.Image")));
- this.simpleButton1.Location = new System.Drawing.Point(620, 8);
- this.simpleButton1.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
- this.simpleButton1.Name = "simpleButton1";
- this.simpleButton1.Size = new System.Drawing.Size(78, 44);
- this.simpleButton1.TabIndex = 4;
- this.simpleButton1.Text = "打印";
- this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
- //
// txt_DeviceID
//
- this.txt_DeviceID.Location = new System.Drawing.Point(129, 2);
+ this.txt_DeviceID.Location = new System.Drawing.Point(108, 2);
this.txt_DeviceID.MenuManager = this.barManager1;
this.txt_DeviceID.Name = "txt_DeviceID";
this.txt_DeviceID.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
this.txt_DeviceID.Properties.Appearance.Options.UseFont = true;
- this.txt_DeviceID.Size = new System.Drawing.Size(279, 26);
+ this.txt_DeviceID.Size = new System.Drawing.Size(525, 26);
this.txt_DeviceID.StyleController = this.layoutControl5;
this.txt_DeviceID.TabIndex = 8;
//
// cb_Status
//
- this.cb_Status.Location = new System.Drawing.Point(529, 34);
+ this.cb_Status.Location = new System.Drawing.Point(733, 34);
this.cb_Status.MenuManager = this.barManager1;
this.cb_Status.Name = "cb_Status";
this.cb_Status.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
@@ -451,7 +459,7 @@
this.cb_Status.Properties.DropDownRows = 4;
this.cb_Status.Properties.NullText = "";
this.cb_Status.Properties.PopupSizeable = false;
- this.cb_Status.Size = new System.Drawing.Size(279, 26);
+ this.cb_Status.Size = new System.Drawing.Size(454, 26);
this.cb_Status.StyleController = this.layoutControl5;
this.cb_Status.TabIndex = 6;
//
@@ -467,12 +475,12 @@
this.layoutControlItem3});
this.layoutControlGroup4.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
this.layoutControlGroup4.Name = "Root";
- columnDefinition1.SizeType = System.Windows.Forms.SizeType.Absolute;
- columnDefinition1.Width = 400D;
- columnDefinition2.SizeType = System.Windows.Forms.SizeType.Absolute;
- columnDefinition2.Width = 400D;
+ columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
+ columnDefinition1.Width = 35D;
+ columnDefinition2.SizeType = System.Windows.Forms.SizeType.Percent;
+ columnDefinition2.Width = 31D;
columnDefinition3.SizeType = System.Windows.Forms.SizeType.Percent;
- columnDefinition3.Width = 100D;
+ columnDefinition3.Width = 34D;
this.layoutControlGroup4.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] {
columnDefinition1,
columnDefinition2,
@@ -491,11 +499,11 @@
// layoutControlItem44
//
this.layoutControlItem44.Control = this.stackPanel2;
- this.layoutControlItem44.Location = new System.Drawing.Point(800, 0);
+ this.layoutControlItem44.Location = new System.Drawing.Point(1179, 0);
this.layoutControlItem44.Name = "layoutControlItem44";
this.layoutControlItem44.OptionsTableLayoutItem.ColumnIndex = 2;
this.layoutControlItem44.OptionsTableLayoutItem.RowSpan = 2;
- this.layoutControlItem44.Size = new System.Drawing.Size(986, 65);
+ this.layoutControlItem44.Size = new System.Drawing.Size(607, 65);
this.layoutControlItem44.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem44.TextVisible = false;
//
@@ -504,15 +512,15 @@
this.layoutControlItem43.AppearanceItemCaption.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
this.layoutControlItem43.AppearanceItemCaption.Options.UseFont = true;
this.layoutControlItem43.Control = this.cb_Status;
- this.layoutControlItem43.Location = new System.Drawing.Point(400, 32);
+ this.layoutControlItem43.Location = new System.Drawing.Point(625, 32);
this.layoutControlItem43.MinSize = new System.Drawing.Size(50, 25);
this.layoutControlItem43.Name = "layoutControlItem43";
this.layoutControlItem43.OptionsTableLayoutItem.ColumnIndex = 1;
this.layoutControlItem43.OptionsTableLayoutItem.RowIndex = 1;
- this.layoutControlItem43.Size = new System.Drawing.Size(400, 33);
+ this.layoutControlItem43.Size = new System.Drawing.Size(554, 33);
this.layoutControlItem43.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
this.layoutControlItem43.Text = "维修单状态:";
- this.layoutControlItem43.TextSize = new System.Drawing.Size(105, 20);
+ this.layoutControlItem43.TextSize = new System.Drawing.Size(84, 15);
//
// layoutControlItem42
//
@@ -522,10 +530,10 @@
this.layoutControlItem42.Location = new System.Drawing.Point(0, 32);
this.layoutControlItem42.Name = "layoutControlItem42";
this.layoutControlItem42.OptionsTableLayoutItem.RowIndex = 1;
- this.layoutControlItem42.Size = new System.Drawing.Size(400, 33);
+ this.layoutControlItem42.Size = new System.Drawing.Size(625, 33);
this.layoutControlItem42.Text = "申请时间:";
this.layoutControlItem42.TextLocation = DevExpress.Utils.Locations.Left;
- this.layoutControlItem42.TextSize = new System.Drawing.Size(105, 20);
+ this.layoutControlItem42.TextSize = new System.Drawing.Size(84, 15);
//
// layoutControlItem2
//
@@ -534,9 +542,9 @@
this.layoutControlItem2.Control = this.txt_DeviceID;
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem2.Name = "layoutControlItem2";
- this.layoutControlItem2.Size = new System.Drawing.Size(400, 32);
+ this.layoutControlItem2.Size = new System.Drawing.Size(625, 32);
this.layoutControlItem2.Text = "设备编号:";
- this.layoutControlItem2.TextSize = new System.Drawing.Size(105, 20);
+ this.layoutControlItem2.TextSize = new System.Drawing.Size(84, 15);
//
// layoutControlItem3
//
@@ -545,12 +553,12 @@
this.layoutControlItem3.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
this.layoutControlItem3.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
this.layoutControlItem3.Control = this.cbbIsDown;
- this.layoutControlItem3.Location = new System.Drawing.Point(400, 0);
+ this.layoutControlItem3.Location = new System.Drawing.Point(625, 0);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.OptionsTableLayoutItem.ColumnIndex = 1;
- this.layoutControlItem3.Size = new System.Drawing.Size(400, 32);
+ this.layoutControlItem3.Size = new System.Drawing.Size(554, 32);
this.layoutControlItem3.Text = "设备停机状态:";
- this.layoutControlItem3.TextSize = new System.Drawing.Size(105, 20);
+ this.layoutControlItem3.TextSize = new System.Drawing.Size(84, 15);
//
// splitContainerControl1
//
@@ -592,7 +600,7 @@
this.gcAutoID,
this.gcEquipmentID,
this.gcEquipmentName,
- this.gcIsIsDownStatusText,
+ this.gcIsIsDownText,
this.gcLocationName,
this.gcCreatOn,
this.gcFormStatusText,
@@ -638,14 +646,14 @@
this.gcEquipmentName.VisibleIndex = 3;
this.gcEquipmentName.Width = 67;
//
- // gcIsIsDownStatusText
+ // gcIsIsDownText
//
- this.gcIsIsDownStatusText.Caption = "停机状态";
- this.gcIsIsDownStatusText.FieldName = "IsDownStatusText";
- this.gcIsIsDownStatusText.Name = "gcIsIsDownStatusText";
- this.gcIsIsDownStatusText.Visible = true;
- this.gcIsIsDownStatusText.VisibleIndex = 7;
- this.gcIsIsDownStatusText.Width = 67;
+ this.gcIsIsDownText.Caption = "停机状态";
+ this.gcIsIsDownText.FieldName = "IsDownText";
+ this.gcIsIsDownText.Name = "gcIsIsDownText";
+ this.gcIsIsDownText.Visible = true;
+ this.gcIsIsDownText.VisibleIndex = 7;
+ this.gcIsIsDownText.Width = 67;
//
// gcLocationName
//
@@ -837,14 +845,15 @@
private DevExpress.XtraEditors.SimpleButton btn_Validate;
private DevExpress.XtraGrid.Columns.GridColumn gcFormStatusText;
private DevExpress.XtraEditors.SimpleButton btn_ChangeDownStatus;
- private DevExpress.XtraGrid.Columns.GridColumn gcIsIsDownStatusText;
+ private DevExpress.XtraGrid.Columns.GridColumn gcIsIsDownText;
private DevExpress.XtraGrid.Columns.GridColumn gcAutoID;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem43;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem42;
private DevExpress.XtraEditors.ComboBoxEdit cbbIsDown;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
- private DevExpress.XtraEditors.SimpleButton simpleButton1;
- private DevExpress.XtraEditors.SimpleButton btn_Export;
+ private DevExpress.XtraBars.BarButtonItem barBtn_ExportWord;
+ private DevExpress.XtraBars.BarButtonItem barBtn_Print;
+ private DevExpress.XtraBars.BarButtonItem barBtnExcel;
}
}
\ No newline at end of file
diff --git a/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.cs b/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.cs
index 36fd76f..4a48ba2 100644
--- a/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.cs
+++ b/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.cs
@@ -1,9 +1,14 @@
using DevExpress.XtraBars.ToolbarForm;
+using DevExpress.XtraEditors;
using DeviceRepair.Models;
using DeviceRepair.Models.Common;
+using DeviceRepair.Models.DeviceRepair.ExportView;
using DeviceRepair.Utils;
using DeviceRepairAndOptimization.Biz;
using DeviceRepairAndOptimization.Common;
+using NPOI.HSSF.UserModel;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.Data;
@@ -253,7 +258,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
///
private void gridView1_CustomDrawColumnHeader(object sender, DevExpress.XtraGrid.Views.Grid.ColumnHeaderCustomDrawEventArgs e)
{
- (new Action(BaseControl.GridControlExtend.CustomDrawColumnHeader)).Invoke(e);
+ (new Action(BaseControl.GridControlExtend.CustomDrawColumnHeader)).Invoke(e);
}
///
@@ -331,8 +336,8 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
}
}
- simpleButton1.Enabled = CurrentObjectInfo.RestorationConfirmationBy > 0;
- btn_Export.Enabled = CurrentObjectInfo.RestorationConfirmationBy > 0;
+ barBtn_Print.Enabled = CurrentObjectInfo.RestorationConfirmationBy > 0;
+ barBtn_ExportWord.Enabled = CurrentObjectInfo.RestorationConfirmationBy > 0;
#region 加载表单数据
@@ -769,5 +774,269 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
XtraMessageBoxHelper.Error(ex.Message);
}
}
+
+ ///
+ /// 打印
+ ///
+ ///
+ ///
+ private void barBtn_Print_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+ {
+ this.barBtn_Print.Enabled = false;
+ try
+ {
+ if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_PRINT"))
+ {
+ XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
+ return;
+ }
+
+ if (CurrentObjectInfo == null)
+ {
+ throw new Exception("获取对象失败,请重试!");
+ }
+
+ DataTable table = SubassembliesCurrentData();
+
+ FastReport.Report report = new FastReport.Report();
+ var vLabelDir = System.IO.Path.Combine(Application.StartupPath, "Labels");
+
+ //判断文件夹是否存在
+ if (!System.IO.Directory.Exists(vLabelDir))
+ {
+ throw new Exception("缺少待打印的标签模板目录!");
+ }
+
+ //路径拼接模板文件名
+ var vFileName = System.IO.Path.Combine(vLabelDir, "DeviceMaintenance.frx");
+
+ //判断模板文件是否存在
+ if (!System.IO.File.Exists(vFileName))
+ {
+ throw new Exception("缺少待打印的标签模板文件!");
+ }
+
+ report.Load(vFileName);
+ report.DoublePass = true;
+ DataSet dsDatas = new DataSet();
+ dsDatas.Tables.Add(table);
+
+ report.RegisterData(dsDatas, "MaintenanceInfo");
+
+ //report.Design();
+
+ if (report.Prepare(true))
+ {
+ report.ShowPrepared();
+ }
+ report.Dispose();
+ }
+ catch (Exception ex)
+ {
+ XtraMessageBoxHelper.Error(ex.Message);
+ }
+ this.barBtn_Print.Enabled = true;
+ }
+
+ ///
+ /// 导出word
+ ///
+ ///
+ ///
+ private void barBtn_ExportWord_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+ {
+ try
+ {
+ if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_EXPORT"))
+ {
+ XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
+ return;
+ }
+
+ using (FolderBrowserDialog folderDialog = new FolderBrowserDialog())
+ {
+ folderDialog.Description = "请选择保存文件的路径:";
+ folderDialog.ShowNewFolderButton = true;
+
+ DialogResult result = folderDialog.ShowDialog();
+
+ if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(folderDialog.SelectedPath))
+ {
+ string selectedPath = folderDialog.SelectedPath;
+
+ if (CurrentObjectInfo == null)
+ {
+ throw new Exception("获取对象失败,请重试!");
+ }
+
+ DataTable table = SubassembliesCurrentData();
+
+ FastReport.Report report = new FastReport.Report();
+ var vLabelDir = Path.Combine(Application.StartupPath, "Labels");
+
+ //判断文件夹是否存在
+ if (!Directory.Exists(vLabelDir))
+ {
+ throw new Exception("缺少待打印的标签模板目录!");
+ }
+
+ //路径拼接模板文件名
+ var vFileName = Path.Combine(vLabelDir, "DeviceMaintenance.frx");
+
+ //判断模板文件是否存在
+ if (!File.Exists(vFileName))
+ {
+ throw new Exception("缺少待打印的标签模板文件!");
+ }
+
+ report.Load(vFileName);
+ report.DoublePass = true;
+ DataSet dsDatas = new DataSet();
+ dsDatas.Tables.Add(table);
+
+ report.RegisterData(dsDatas, "MaintenanceInfo");
+ string filePath = Path.Combine(selectedPath, ("维修单" + CurrentObjectInfo.AutoID + ".docx"));
+ if (report.Prepare())
+ {
+ FastReport.Export.OoXML.Word2007Export export = new FastReport.Export.OoXML.Word2007Export();
+ report.MaxPages = 1;
+ export.CurPage = 1;
+ report.Export(export, filePath);
+ }
+ report.Dispose();
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ XtraMessageBoxHelper.Error(ex.Message);
+ }
+ }
+
+ private void barBtnExcel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+ {
+ try
+ {
+ splashScreenManager1.ShowWaitForm();
+ APIResponseData apiResponseData = MaintenanceManager.Instance.GetXlsxData(FilterInfo);
+ if (!apiResponseData.IsSuccess)
+ throw new Exception(apiResponseData.Message);
+
+ List views = apiResponseData.ToDeserializeObject>();
+ DataTable dataTable = views.ToDataTable();
+
+ System.Reflection.PropertyInfo[] prop = typeof(MaintainOrderView).GetProperties();
+ foreach (System.Reflection.PropertyInfo item in prop)
+ {
+ if (dataTable.Columns.Contains(item.Name))
+ {
+ DataColumn dc = dataTable.Columns[item.Name];
+
+ object[] attrs = item.GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false);
+ if (null != attrs && attrs.Length > 0)
+ {
+ System.ComponentModel.DescriptionAttribute description = (System.ComponentModel.DescriptionAttribute)attrs[0];
+ dc.ColumnName = description.Description;
+ }
+ }
+ }
+ //typeof(MaintainOrderView).GetProperties()[0].GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false).FirstOrDefault()
+ //typeof(MaintainOrderView).GetProperties()[0].Name
+ splashScreenManager1.TryCloseWait();
+
+
+ XtraSaveFileDialog xofd = new XtraSaveFileDialog()
+ {
+ Filter = "xlsx file(*.xlsx)|*.xlsx"
+ };
+ SelectPath:
+ if (xofd.ShowDialog() == DialogResult.OK)
+ {
+ if (File.Exists(xofd.FileName))
+ {
+ XtraMessageBoxHelper.Error("当前文件已存在,请重新命名!");
+ goto SelectPath;
+ }
+
+ byte[] btRtn = Export(dataTable);
+
+ //创建一个文件流
+ using (FileStream fs = new FileStream(xofd.FileName, FileMode.Create))
+ {
+
+ //将byte数组写入文件中
+ fs.Write(btRtn, 0, btRtn.Length);
+ //所有流类型都要关闭流,否则会出现内存泄露问题
+ fs.Close();
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ splashScreenManager1.TryCloseWait();
+ XtraMessageBoxHelper.Error(ex.Message);
+ }
+ }
+
+ byte[] Export(DataTable dataTable)
+ {
+ IWorkbook workbook = new XSSFWorkbook();
+ string sheetName = string.IsNullOrEmpty(dataTable.TableName) ? "Sheet1" : dataTable.TableName;
+ ISheet sheet = workbook.CreateSheet(sheetName);
+
+ // 创建表头
+ IRow headerRow = sheet.CreateRow(0);
+
+ // 表头样式
+ #region 表头样式
+
+ ICellStyle style = workbook.CreateCellStyle();
+ //style.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ //style.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ //style.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ //style.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ style.WrapText = true;//设置换行这个要先设置
+ style.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;//居中
+ style.VerticalAlignment = VerticalAlignment.Center;//水平居中
+
+ //HSSFPalette palette = new HSSFPalette();
+ //palette.SetColorAtIndex((short)1, 217, 217, 217);
+ //var v1 = palette.FindColor(217, 217, 217);
+ //colorStyle.FillForegroundColor = v1.GetIndex();
+
+ style.FillPattern = FillPattern.SolidForeground;
+ style.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.Grey25Percent.Index;
+
+ ////设置字体
+ //IFont font = workbook.CreateFont();
+ //font.FontHeightInPoints = 10;
+ //font.FontName = "黑体";
+ //style.SetFont(font);
+
+ #endregion
+
+ for (int i = 0; i < dataTable.Columns.Count; i++)
+ {
+ headerRow.CreateCell(i).SetCellValue(dataTable.Columns[i].ColumnName);
+ headerRow.GetCell(i).CellStyle = style;
+ }
+
+ // 填充数据
+ for (int i = 0; i < dataTable.Rows.Count; i++)
+ {
+ IRow dataRow = sheet.CreateRow(i + 1);
+ for (int j = 0; j < dataTable.Columns.Count; j++)
+ {
+ dataRow.CreateCell(j).SetCellValue(dataTable.Rows[i][j].ToString());
+ }
+ }
+
+ // 转换为byte[]
+ using (MemoryStream stream = new MemoryStream())
+ {
+ workbook.Write(stream);
+ return stream.ToArray();
+ }
+ }
}
}
\ No newline at end of file
diff --git a/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.resx b/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.resx
index 551e95c..cca44f8 100644
--- a/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.resx
+++ b/DeviceRepairAndOptimization/Pages/Maintain/pageMaintainView.resx
@@ -294,7 +294,27 @@
Ev0BUQ6AahuAd3MAAAAASUVORK5CYII=
-
+
+ 336, 17
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAB10RVh0VGl0
+ bGUARXhwb3J0O0RvYztFeHBvcnRUb0RvYzsoIWaSAAAChklEQVQ4T2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WTU3EDq+9ex5d1/IfkoHdGrr2GZZyS8X3sDzy8JYIDvzQCwQvA/
+ EXyO54PDMyR+eXzXqmft6Fce6xJod8sX6S0534Mdf++Gpr4L+Z92QvVJB5Sn7kF+oh1bSYtXhlIWEmhv
+ 8GOA79sD4CwwBGeC+4FhHqVFiz2Cv1y6JprGTwbf/Hq8mnsGPsq/wkt+GqvSTmL5luNYkvgBXoivwW9e
+ 2ogXlofguV94N9BnZ06BHZD/RqJnSD8g/fAB/egB/fgh8e85u5a3IX/5/wmSfwP2rYVC2Q4M0QAAAABJ
+ RU5ErkJggg==
+
+
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABd0RVh0VGl0
diff --git a/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.Designer.cs b/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.Designer.cs
index 8bbaedf..ad1430a 100644
--- a/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.Designer.cs
+++ b/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.Designer.cs
@@ -31,11 +31,11 @@ namespace DeviceRepairAndOptimization.Pages
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
- DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
- DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
- DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
- DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
- DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
+ DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
+ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(page_MaintenancePlan));
System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
@@ -123,9 +123,9 @@ namespace DeviceRepairAndOptimization.Pages
this.EditSearch.Properties.Appearance.Font = new System.Drawing.Font("Verdana", 10F);
this.EditSearch.Properties.Appearance.Options.UseFont = true;
this.EditSearch.Properties.AutoHeight = false;
- editorButtonImageOptions1.SvgImageSize = new System.Drawing.Size(16, 16);
+ editorButtonImageOptions2.SvgImageSize = new System.Drawing.Size(16, 16);
this.EditSearch.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
- new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+ new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
this.EditSearch.Properties.NullValuePrompt = "输入设备编号或设备类型查询";
this.EditSearch.Size = new System.Drawing.Size(300, 31);
this.EditSearch.TabIndex = 9;
diff --git a/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.cs b/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.cs
index e08ce51..e5ffb95 100644
--- a/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.cs
+++ b/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.cs
@@ -348,13 +348,15 @@ namespace DeviceRepairAndOptimization.Pages
{
if (!GlobalInfo.HasRole("BIZ_PLAN_DELETE"))
{
- throw new Exception($"当前账号缺少此操作的权限");
+ XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
+ return;
}
AnnualMaintenancePlan model = (AnnualMaintenancePlan)gridView1.GetFocusedRow();
if (model == null)
{
- throw new Exception("请先选择要删除的行!");
+ XtraMessageBoxHelper.Error("请先选择要删除的行!");
+ return;
}
if (XtraMessageBox.Show("确认删除该条数据?", "信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
diff --git a/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.resx b/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.resx
index 6e8623b..96bad34 100644
--- a/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.resx
+++ b/DeviceRepairAndOptimization/Pages/Plan/page_MaintenancePlan.resx
@@ -123,6 +123,9 @@
True
+
+ True
+
False
diff --git a/DeviceRepairAndOptimization/Pages/Plan/page_PlanEdit.cs b/DeviceRepairAndOptimization/Pages/Plan/page_PlanEdit.cs
index 63cf2c5..ae25c68 100644
--- a/DeviceRepairAndOptimization/Pages/Plan/page_PlanEdit.cs
+++ b/DeviceRepairAndOptimization/Pages/Plan/page_PlanEdit.cs
@@ -96,7 +96,7 @@ namespace DeviceRepairAndOptimization.Pages.Plan
ck_Oct.SelectedItem = DataSource.Oct;
ck_Nov.SelectedItem = DataSource.Nov;
ck_Dec.SelectedItem = DataSource.Dec;
- tp_StartMonth.Value = Convert.ToDateTime(DataSource.PMStartMonth);
+ tp_StartMonth.Value = string.IsNullOrEmpty(DataSource.PMStartMonth) ? DateTime.Today : Convert.ToDateTime(DataSource.PMStartMonth);
txt_Remark.Text = DataSource.Remarks;
}
diff --git a/DeviceRepairAndOptimization/Pages/Plan/page_PlanExcelImport.cs b/DeviceRepairAndOptimization/Pages/Plan/page_PlanExcelImport.cs
index cfc5d3c..63bcb39 100644
--- a/DeviceRepairAndOptimization/Pages/Plan/page_PlanExcelImport.cs
+++ b/DeviceRepairAndOptimization/Pages/Plan/page_PlanExcelImport.cs
@@ -267,12 +267,13 @@ namespace DeviceRepairAndOptimization.Pages.Plan
#region 校验设备信息
- DeviceInformationInfo di = driveLst.Where(x => x.EquipmentID == (newRow[0] + "")).FirstOrDefault();
+ DeviceInformationInfo di = driveLst.Where(x => x.EquipmentID.Equals((newRow[0] + ""), StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
if (di == null)
{
hasError = true;
throw new Exception($"不存在设备编号为:{(newRow[0] + "")}的设备!");
}
+ newRow[0] = di.EquipmentID;
#endregion
#region 校验计划是否冲突
diff --git a/DeviceRepairAndOptimization/Pages/Users/frmRoleUsers.cs b/DeviceRepairAndOptimization/Pages/Users/frmRoleUsers.cs
index d354eab..33fcf87 100644
--- a/DeviceRepairAndOptimization/Pages/Users/frmRoleUsers.cs
+++ b/DeviceRepairAndOptimization/Pages/Users/frmRoleUsers.cs
@@ -116,6 +116,11 @@ namespace DeviceRepairAndOptimization.Pages.Users
if (!apiResponseData.IsSuccess)
throw new Exception(apiResponseData.Message);
}
+ else
+ {
+ splashScreenManager1.TryCloseWait();
+ return;
+ }
}
else
{
diff --git a/DeviceRepairAndOptimization/Pages/Users/frmUsers.cs b/DeviceRepairAndOptimization/Pages/Users/frmUsers.cs
index 8c0aba0..85848d0 100644
--- a/DeviceRepairAndOptimization/Pages/Users/frmUsers.cs
+++ b/DeviceRepairAndOptimization/Pages/Users/frmUsers.cs
@@ -201,13 +201,8 @@ namespace DeviceRepairAndOptimization.Pages.Users
if (EncryptionHelper.EncryptByMD5(vPwdReset) == CurrentUser.PassWord.ToUpper())
goto GenRandomPassword;
}
- else
- {
- vPwdReset = ServiceRouteConstValue.USER_DEFAULT_PASSWORD_RESET;
- }
-
- APIResponseData apiResponseData = UserManager.Instance.UpdateUserPassword(CurrentUser.LoginCode, EncryptionHelper.EncryptByMD5(vPwdReset));
+ APIResponseData apiResponseData = UserManager.Instance.ReprovisionDefaultPassword(CurrentUser.LoginCode, string.IsNullOrWhiteSpace(vPwdReset) ? "" : EncryptionHelper.EncryptByMD5(vPwdReset));
if (apiResponseData.IsSuccess)
{
string OperationType = e.Button.Caption.Contains("随机密码重置") ? "随机密码重置" : "默认密码重置";
@@ -216,7 +211,7 @@ namespace DeviceRepairAndOptimization.Pages.Users
LoadingDatas();
gridView1.RefreshData();
Clipboard.SetDataObject(vPwdReset, true);
- XtraMessageBox.Show($"用户密码重置成功!{vPwdReset}", "成功", buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Information, allowHtmlText: DevExpress.Utils.DefaultBoolean.True);
+ XtraMessageBox.Show($"用户密码重置成功!{(string.IsNullOrWhiteSpace(vPwdReset) ? vPwdReset = DeviceRepair.Models.DefaultConstValue.USER_DEFAULT_PASSWORD_RESET : vPwdReset)}", "成功", buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Information, allowHtmlText: DevExpress.Utils.DefaultBoolean.True);
}
else
{
diff --git a/DeviceRepairAndOptimization/Properties/AssemblyInfo.cs b/DeviceRepairAndOptimization/Properties/AssemblyInfo.cs
index 7eaa7f5..a298de3 100644
--- a/DeviceRepairAndOptimization/Properties/AssemblyInfo.cs
+++ b/DeviceRepairAndOptimization/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.1.13")]
-[assembly: AssemblyFileVersion("2.0.1.13")]
+[assembly: AssemblyVersion("2.0.1.14")]
+[assembly: AssemblyFileVersion("2.0.1.14")]
diff --git a/DeviceRepairAndOptimization/ServiceRouteConstValue.cs b/DeviceRepairAndOptimization/ServiceRouteConstValue.cs
index 17464c3..91bc9ff 100644
--- a/DeviceRepairAndOptimization/ServiceRouteConstValue.cs
+++ b/DeviceRepairAndOptimization/ServiceRouteConstValue.cs
@@ -25,6 +25,11 @@
///
public const string UpdateUserPassword = "Api/User/UpdateUserPassword";
+ ///
+ /// 密码重置
+ ///
+ public const string ReprovisionDefaultPassword = "Api/User/ReprovisionDefaultPassword";
+
///
/// 查询最后修改密码时间
///
@@ -35,11 +40,6 @@
///
public const string GetAllUsers = "Api/User/GetAllUser";
- ///
- /// 重置用户时用的默认密码
- ///
- public const string USER_DEFAULT_PASSWORD_RESET = "Kanghui1";
-
///
/// 用户信息修改
///
@@ -304,6 +304,11 @@
///
public const string GetMaintenanceDatas = "Api/Maintenance/GetDatas";
+ ///
+ /// 设备维修列表导出
+ ///
+ public const string GetXlsxData = "Api/Maintenance/GetXlsxData";
+
///
/// 设备维修
///
diff --git a/TsSFCDeivceClient/DowntimeFormAdd.cs b/TsSFCDeivceClient/DowntimeFormAdd.cs
index 4ddd910..162edd3 100644
--- a/TsSFCDeivceClient/DowntimeFormAdd.cs
+++ b/TsSFCDeivceClient/DowntimeFormAdd.cs
@@ -260,7 +260,7 @@ namespace TsSFCDeivceClient
mail.Title = $"有在生产的设备出现故障,请您尽快评估故障状态!";
mail.IsBodyHtml = true;
System.Text.StringBuilder builder = new System.Text.StringBuilder();
- builder.AppendLine($"在 {ddlWhereFailureOccurred.Text} 发起的编号为:{MaintenanceAutoID} 的保修单,设备 {CurrentDeviceInfo.EquipmentName}({CurrentDeviceInfo.EquipmentID}) 发生故障,{(deviceWarrantyRequestForm.InProduction ? "存有产品在加工中,产品批次号:" + deviceWarrantyRequestForm.Batch : "")} ,请您尽快评估故障情况。
");
+ builder.AppendLine($"在 {ddlWhereFailureOccurred.Text} 发起的编号为:{MaintenanceAutoID} 的报修单,设备 {CurrentDeviceInfo.EquipmentName}({CurrentDeviceInfo.EquipmentID}) 发生故障,{(deviceWarrantyRequestForm.InProduction ? "存有产品在加工中,产品批次号:" + deviceWarrantyRequestForm.Batch : "")} ,请您尽快评估故障情况。
");
builder.AppendLine($"发起人:生产部 - {Runtime.CurrentUser.UserName}
");
mail.Body = builder.ToString();
string msgResult = "";
diff --git a/TsSFCDeivceClient/pageDeviceMaintenanceFormView.cs b/TsSFCDeivceClient/pageDeviceMaintenanceFormView.cs
index c61d3ab..04e60a0 100644
--- a/TsSFCDeivceClient/pageDeviceMaintenanceFormView.cs
+++ b/TsSFCDeivceClient/pageDeviceMaintenanceFormView.cs
@@ -241,9 +241,12 @@ namespace TsSFCDeivceClient
}
}
+ gridControl1.BeginUpdate();
gridControl1.DataSource = null;
gridControl1.DataSource = table;
- gridView1.BestFitColumns();
+ gridControl1.RefreshDataSource();
+ gridControl1.EndUpdate();
+ //gridView1.BestFitColumns();
CloseWaitForm();
}
catch (Exception ex)
@@ -252,6 +255,7 @@ namespace TsSFCDeivceClient
CloseWaitForm();
XtraMessageBoxHelper.Error(ex.Message);
}
+ this.Refresh();
}
///
@@ -348,12 +352,12 @@ namespace TsSFCDeivceClient
{
if (Item.EvaluatorItems != null)
{
- if (!Item.EvaluatorItems.Any(x => x.EvaluatorCode == "PE") && EmployeeType == 0)
+ if (!Item.EvaluatorItems.Any(x => x.EvaluatorCode == "PE") && EmployeeType == 1)
{
PE = true;
}
- if (!Item.EvaluatorItems.Any(x => x.EvaluatorCode == "QE") && EmployeeType == 1)
+ if (!Item.EvaluatorItems.Any(x => x.EvaluatorCode == "QE") && EmployeeType == 0)
{
QE = true;
}
@@ -454,7 +458,6 @@ namespace TsSFCDeivceClient
private void btn_Query_Click(object sender, EventArgs e)
{
InitializeGridDatas();
- this.Refresh();
}
private void btn_Assessment_PE_Click(object sender, EventArgs e)
@@ -642,5 +645,15 @@ namespace TsSFCDeivceClient
XtraMessageBoxHelper.Error(ex.Message);
}
}
+
+ private void cbbIsDown_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ cbbIsDown.Refresh();
+ }
+
+ private void cb_Status_EditValueChanged(object sender, EventArgs e)
+ {
+ cb_Status.Refresh();
+ }
}
}
\ No newline at end of file
diff --git a/TsSFCDeivceClient/pageDeviceMaintenanceFormView.designer.cs b/TsSFCDeivceClient/pageDeviceMaintenanceFormView.designer.cs
index 0aadd59..084955e 100644
--- a/TsSFCDeivceClient/pageDeviceMaintenanceFormView.designer.cs
+++ b/TsSFCDeivceClient/pageDeviceMaintenanceFormView.designer.cs
@@ -29,6 +29,7 @@ namespace TsSFCDeivceClient
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(pageDeviceMaintenanceFormView));
DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition();
DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition();
@@ -41,7 +42,7 @@ namespace TsSFCDeivceClient
this.btn_Assessment_QE = new DevExpress.XtraEditors.SimpleButton();
this.btnResumptionConfirm = new DevExpress.XtraEditors.SimpleButton();
this.toolbarFormControl1 = new DevExpress.XtraBars.ToolbarForm.ToolbarFormControl();
- this.toolbarFormManager1 = new DevExpress.XtraBars.ToolbarForm.ToolbarFormManager();
+ this.toolbarFormManager1 = new DevExpress.XtraBars.ToolbarForm.ToolbarFormManager(this.components);
this.barDockControlTop = new DevExpress.XtraBars.BarDockControl();
this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl();
this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl();
@@ -467,6 +468,7 @@ namespace TsSFCDeivceClient
this.cb_Status.Size = new System.Drawing.Size(349, 26);
this.cb_Status.StyleController = this.layoutControl1;
this.cb_Status.TabIndex = 7;
+ this.cb_Status.EditValueChanged += new System.EventHandler(this.cb_Status_EditValueChanged);
//
// cbbIsDown
//
@@ -482,6 +484,7 @@ namespace TsSFCDeivceClient
this.cbbIsDown.Size = new System.Drawing.Size(349, 26);
this.cbbIsDown.StyleController = this.layoutControl1;
this.cbbIsDown.TabIndex = 6;
+ this.cbbIsDown.SelectedIndexChanged += new System.EventHandler(this.cbbIsDown_SelectedIndexChanged);
//
// stackPanel1
//
@@ -660,6 +663,7 @@ namespace TsSFCDeivceClient
//
// pageDeviceMaintenanceFormView
//
+ this.AcceptButton = this.btn_Query;
this.Appearance.Options.UseFont = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;