From c4a15451972131149ef8561cce46f85941e19dbf Mon Sep 17 00:00:00 2001 From: LiJiaWen Date: Thu, 16 Oct 2025 16:51:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.新增登记项目时的部位选择功能 2.新增时间节点报表 3.新增职业体检意见字段 4.修复删除订单后无法取消应用模板到分组的BUG --- PEIS/Entity/EnrollmentFeeItem.cs | 4 +- PEIS/Entity/EnrollmentOrgFeeItem.cs | 3 +- PEIS/Entity/EnrollmentPatient.cs | 18 ++- PEIS/Entity/ExamCareerConclusion.cs | 4 + PEIS/Event/Args.cs | 3 +- .../Enrollment/EnrollmentOrgFeeItemModel.cs | 4 +- PEIS/Model/Exam/TotalModel.cs | 4 +- PEIS/Model/StatisticalReportModel.cs | 44 ++++-- PEIS/PEIS.csproj | 12 ++ PEIS/Presenter/StatisticalReportPresenter.cs | 4 + PEIS/Presenter/TotalPresenter.cs | 2 +- PEIS/ReportFiles/CAPReport.frx | 32 ++-- PEIS/ReportFiles/PeopleDateTimeCount.frx | 112 ++++++++++++++ PEIS/Utils/DAOHelp.cs | 8 +- PEIS/Utils/ReportHelper.cs | 7 +- .../Enrollment/EnrollmentOrgForm.Designer.cs | 146 ++++++++++++++---- PEIS/View/Enrollment/EnrollmentOrgForm.cs | 58 ++++++- PEIS/View/Enrollment/EnrollmentOrgForm.resx | 18 ++- .../EnrollmentPersonForm.Designer.cs | 94 +++++++---- PEIS/View/Enrollment/EnrollmentPersonForm.cs | 30 ++++ .../View/Enrollment/EnrollmentPersonForm.resx | 17 +- .../Enrollment/PartOptionForm.Designer.cs | 86 +++++++++++ PEIS/View/Enrollment/PartOptionForm.cs | 65 ++++++++ PEIS/View/Enrollment/PartOptionForm.resx | 120 ++++++++++++++ PEIS/View/Exam/TotalForm.Designer.cs | 45 +++++- PEIS/View/Exam/TotalForm.cs | 20 ++- .../View/statistics/IStatisticalReportView.cs | 4 + .../StatisticalReportForm.Designer.cs | 2 +- PEIS/View/statistics/StatisticalReportForm.cs | 96 ++++++++---- 29 files changed, 902 insertions(+), 160 deletions(-) create mode 100644 PEIS/ReportFiles/PeopleDateTimeCount.frx create mode 100644 PEIS/View/Enrollment/PartOptionForm.Designer.cs create mode 100644 PEIS/View/Enrollment/PartOptionForm.cs create mode 100644 PEIS/View/Enrollment/PartOptionForm.resx diff --git a/PEIS/Entity/EnrollmentFeeItem.cs b/PEIS/Entity/EnrollmentFeeItem.cs index 44e63b9..a5cc8c9 100644 --- a/PEIS/Entity/EnrollmentFeeItem.cs +++ b/PEIS/Entity/EnrollmentFeeItem.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using PEIS.Utils; namespace PEIS.Entity @@ -23,6 +24,7 @@ namespace PEIS.Entity public Decimal? Price { get; set; } public Decimal? SettlePrice { get; set; } public String ItemClass { get; set; } + public String Part { get; set; } public DateTime CreateTime { get; set; } public String CreatorCode { get; set; } public String Creator { get; set; } @@ -35,7 +37,7 @@ namespace PEIS.Entity public String GiveUpUser { get; set; } public String GiveUpCode { get; set; } public String KeyNo { get; set; } - public bool? IsSend{ get; set; } + public bool? IsSend { get; set; } public bool IsOccupational { get; set; } [RefFlag(true)] diff --git a/PEIS/Entity/EnrollmentOrgFeeItem.cs b/PEIS/Entity/EnrollmentOrgFeeItem.cs index e3b716b..01a816d 100644 --- a/PEIS/Entity/EnrollmentOrgFeeItem.cs +++ b/PEIS/Entity/EnrollmentOrgFeeItem.cs @@ -8,7 +8,7 @@ namespace PEIS.Entity /// public partial class EnrollmentOrgFeeItem : ObjectData { - public override String TableName => "Enrollment_OrgFeeItem"; + public override String TableName => "Enrollment_OrgFeeItem"; public Int64? OEID { get; set; } public Int64? GroupID { get; set; } @@ -32,5 +32,6 @@ namespace PEIS.Entity public Int64? OID { get; set; } public String KeyNo { get; set; } public bool IsOccupational { get; set; } + public string Part { get; set; } } } \ No newline at end of file diff --git a/PEIS/Entity/EnrollmentPatient.cs b/PEIS/Entity/EnrollmentPatient.cs index 5af027f..816bfa2 100644 --- a/PEIS/Entity/EnrollmentPatient.cs +++ b/PEIS/Entity/EnrollmentPatient.cs @@ -8,7 +8,7 @@ namespace PEIS.Entity /// public partial class EnrollmentPatient : ObjectData { - public override String TableName => "Enrollment_Patient"; + public override String TableName => "Enrollment_Patient"; //public Int64 EID { get; set; } public String Name { get; set; } @@ -120,6 +120,18 @@ namespace PEIS.Entity [RefFlag(true)] public Decimal Discount { get; set; } - #endregion Other -} + [RefFlag(true)] + public DateTime? MINC { get; set; } + + [RefFlag(true)] + public DateTime? MAXC { get; set; } + + [RefFlag(true)] + public DateTime? MINV { get; set; } + + [RefFlag(true)] + public DateTime? MAXV { get; set; } + + #endregion Other + } } \ No newline at end of file diff --git a/PEIS/Entity/ExamCareerConclusion.cs b/PEIS/Entity/ExamCareerConclusion.cs index 8de4a3c..d70e24e 100644 --- a/PEIS/Entity/ExamCareerConclusion.cs +++ b/PEIS/Entity/ExamCareerConclusion.cs @@ -20,6 +20,10 @@ namespace PEIS.Entity /// 职业体检结论(1.目前未见异常 2.复查 3.疑似职业病 4.职业禁忌症 5.其他疾病或异常) /// public int OccupationalConclusion { get; set; } + /// + /// 职业健康检查处理意见 + /// + public string OccupationalSuggestion { get; set; } } public class CareerConclusionReportModele : ExamCareerConclusion diff --git a/PEIS/Event/Args.cs b/PEIS/Event/Args.cs index 7ac9439..810b90b 100644 --- a/PEIS/Event/Args.cs +++ b/PEIS/Event/Args.cs @@ -48,9 +48,10 @@ namespace PEIS.Event /// public ExamPart Part { get; set; } public String DeptCode { get; set; } - public Int64 Eid{ get; set; } + public Int64 Eid { get; set; } public Int64 Pid { get; set; } public int OccupationalConclusion { get; set; } + public string OccupationalSuggestion { get; set; } public Args() { diff --git a/PEIS/Model/Enrollment/EnrollmentOrgFeeItemModel.cs b/PEIS/Model/Enrollment/EnrollmentOrgFeeItemModel.cs index a0d67ba..9124c04 100644 --- a/PEIS/Model/Enrollment/EnrollmentOrgFeeItemModel.cs +++ b/PEIS/Model/Enrollment/EnrollmentOrgFeeItemModel.cs @@ -33,7 +33,7 @@ namespace PEIS.Model.Enrollment public List GetItems(Int64 groupID) { - return DAOHelp.GetDataBySQL($"SELECT ID, GroupID, PackId, PackName, FID,FeeItemCode, FeeItemName, Quantity, Unit,Price, SettlePrice, ItemClass, CreateTime, Creator, DeptCode, DeptName, KeyNo, IsOccupational FROM Enrollment_OrgFeeItem WHERE GroupID = {groupID} Order by PackID, ItemClass, DeptCode, FeeItemCode"); + return DAOHelp.GetDataBySQL($"SELECT ID, GroupID, PackId, PackName, FID,FeeItemCode, FeeItemName, Quantity, Unit,Price, SettlePrice, ItemClass, CreateTime, Creator, DeptCode, DeptName, KeyNo, IsOccupational, Part FROM Enrollment_OrgFeeItem WHERE GroupID = {groupID} Order by PackID, ItemClass, DeptCode, FeeItemCode"); } public void AddPackFeeItem(Int64 packID, Int64 oeID, Int64 groupID, Int64 oID) @@ -69,7 +69,7 @@ namespace PEIS.Model.Enrollment if (groupFeeItem.Count != 0) { // 个人收费项目信息 - DAOHelp.ExecuteSql($"INSERT INTO Enrollment_FeeItem(OEID, GroupID, EID, PackID, PackName, FID, FeeItemCode, FeeItemName, Quantity, Unit, Price, SettlePrice, ItemClass, CreateTime, CreatorCode, Creator, DeptCode, DeptName, Seq, KeyNo) SELECT a.OEID, a.GroupID, a.ID, b.PackID, b.PackName, b.FID, b.FeeItemCode, b.FeeItemName, b.Quantity, b.Unit, b.Price, b.SettlePrice, b.ItemClass, GETDATE(), '{Global.currentUser.Code}', '{Global.currentUser.Name}', b.DeptCode, b.DeptName, b.Seq, b.KeyNo FROM Enrollment_patient a LEFT JOIN dbo.Enrollment_OrgFeeItem b ON a.GroupID = b.GroupID WHERE a.GroupID = { groupID} AND a.OEID = {oeID} AND a.ID NOT IN ( SELECT EID FROM Enrollment_FeeItem )"); + DAOHelp.ExecuteSql($"INSERT INTO Enrollment_FeeItem(OEID, GroupID, EID, PackID, PackName, FID, FeeItemCode, FeeItemName, Quantity, Unit, Price, SettlePrice, ItemClass, CreateTime, CreatorCode, Creator, DeptCode, DeptName, Seq, KeyNo, Part) SELECT a.OEID, a.GroupID, a.ID, b.PackID, b.PackName, b.FID, b.FeeItemCode, b.FeeItemName, b.Quantity, b.Unit, b.Price, b.SettlePrice, b.ItemClass, GETDATE(), '{Global.currentUser.Code}', '{Global.currentUser.Name}', b.DeptCode, b.DeptName, b.Seq, b.KeyNo, B.Part FROM Enrollment_patient a LEFT JOIN dbo.Enrollment_OrgFeeItem b ON a.GroupID = b.GroupID WHERE a.GroupID = { groupID} AND a.OEID = {oeID} AND a.ID NOT IN ( SELECT EID FROM Enrollment_FeeItem )"); } // 更新应用时间 diff --git a/PEIS/Model/Exam/TotalModel.cs b/PEIS/Model/Exam/TotalModel.cs index ddcf7dd..db1fdfa 100644 --- a/PEIS/Model/Exam/TotalModel.cs +++ b/PEIS/Model/Exam/TotalModel.cs @@ -375,10 +375,10 @@ namespace PEIS.Model /// /// /// - public List SaveExamCareerConclusion(Int64 eid, int conclusion) + public List SaveExamCareerConclusion(Int64 eid, int conclusion, string suggestion) { DAOHelp.ExecuteSql($@"DELETE Exam_CareerConclusion WHERE eid = {eid}"); - DAOHelp.Save(new ExamCareerConclusion() { EID = eid, OccupationalConclusion = conclusion }); + DAOHelp.Save(new ExamCareerConclusion() { EID = eid, OccupationalConclusion = conclusion, OccupationalSuggestion = suggestion }); return GetExamCareerConclusion(eid); } diff --git a/PEIS/Model/StatisticalReportModel.cs b/PEIS/Model/StatisticalReportModel.cs index f5e49a8..75a1fe9 100644 --- a/PEIS/Model/StatisticalReportModel.cs +++ b/PEIS/Model/StatisticalReportModel.cs @@ -25,7 +25,7 @@ namespace PEIS.Model internal class StatisticalReportModel : IModel { #region base - public List GetItems() + public List GetItems() { return null; } @@ -69,14 +69,14 @@ namespace PEIS.Model { return false; } - + #endregion - + // 人次统计表 - public List GetItemsByDateType(DateTime begTime ,DateTime endTime, string dateType, int status) + public List GetItemsByDateType(DateTime begTime, DateTime endTime, string dateType, int status) { - var sql= ""; + var sql = ""; if (status == 0) { switch (dateType) @@ -346,10 +346,10 @@ namespace PEIS.Model } // 费用明细统计表 - public List GetEFeeItems(DateTime begTime, DateTime endTime, int status, long oEid, string deptCode="9999") + public List GetEFeeItems(DateTime begTime, DateTime endTime, int status, long oEid, string deptCode = "9999") { var sql = ""; - if(status == 0) + if (status == 0) { sql = deptCode == "9999" ? $@"SELECT @@ -400,7 +400,7 @@ namespace PEIS.Model a.DeptCode ORDER BY a.DeptCode,a.FeeItemCode"; } - else if(status == 1) + else if (status == 1) { sql = deptCode == "9999" ? $@"SELECT @@ -503,7 +503,7 @@ namespace PEIS.Model } // 订单统计表 - public List GetCheckCosts(DateTime begTime ,DateTime endTime, string dateType, int status) + public List GetCheckCosts(DateTime begTime, DateTime endTime, string dateType, int status) { var sql = $@"SELECT a.ID, @@ -531,12 +531,12 @@ namespace PEIS.Model FROM Enrollment_CheckCost a LEFT JOIN Enrollment_Patient b ON a.EID = b.ID LEFT JOIN Enrollment_Org c ON a.OEID = c.ID"; - if(status == 0) + if (status == 0) { switch (dateType) { case "OrderCreateDate": - sql = sql + $@" WHERE a.CreateTime Between '{begTime:yyyy-MM-dd}' and DateAdd(day, 1,'{endTime:yyyy-MM-dd}') AND a.DeleteTime IS NULL AND a.OEID IS NOT NULL AND a.CancelTime IS NULL"; + sql = sql + $@" WHERE a.CreateTime Between '{begTime:yyyy-MM-dd}' and DateAdd(day, 1,'{endTime:yyyy-MM-dd}') AND a.DeleteTime IS NULL AND a.OEID IS NOT NULL AND a.CancelTime IS NULL"; break; case "OrderChargeDate": sql = sql + $@" WHERE a.ChargeTime Between '{begTime:yyyy-MM-dd}' and DateAdd(day, 1,'{endTime:yyyy-MM-dd}') AND a.DeleteTime IS NULL AND a.OEID IS NOT NULL AND a.CancelTime IS NULL"; @@ -632,5 +632,27 @@ namespace PEIS.Model order by t.DeptCode;"; return DAOHelp.GetDataBySQL(sql); } + + // 获取体检时间节点 + public List GetPeopleDateTimeData(DateTime begDate, DateTime endDate, int status, long oEid) + { + string sql = $@"select ID, Name, CreateTime, SignTime ,B.MINC, B.MAXC, B.MINV, B.MAXV, FinishTime, PrintTime, LastPrintTime + from Enrollment_Patient A with(nolock) + LEFT JOIN (select EID, MIN(CheckTime) MINC, MAX(CheckTime) MAXC, MIN(VerifyTime) MINV, MAX(VerifyTime) MAXV from Exam_Part with(nolock) group by EID) B on A.id=B.EID + where CreateTime between '{begDate:yyyy-MM-dd}' and '{endDate:yyyy-MM-dd}' "; + if (status == 0) + { + if (oEid == -1) + sql += $@" AND A.OEID is not null "; + else + sql += $@" AND A.OEID = {oEid} "; + } + else if (status == 1) + { + sql += $@" AND A.OEID is null "; + } + sql += $@" order by ID; "; + return DAOHelp.GetDataBySQL(sql); + } } } diff --git a/PEIS/PEIS.csproj b/PEIS/PEIS.csproj index f1ccdbc..3f3b048 100644 --- a/PEIS/PEIS.csproj +++ b/PEIS/PEIS.csproj @@ -394,6 +394,12 @@ NewEnrollmentPersonForm.cs + + Form + + + PartOptionForm.cs + Form @@ -644,6 +650,9 @@ NewEnrollmentPersonForm.cs + + PartOptionForm.cs + TeamReportForm.cs @@ -777,6 +786,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/PEIS/Presenter/StatisticalReportPresenter.cs b/PEIS/Presenter/StatisticalReportPresenter.cs index 86ad8b8..ec53a5c 100644 --- a/PEIS/Presenter/StatisticalReportPresenter.cs +++ b/PEIS/Presenter/StatisticalReportPresenter.cs @@ -61,6 +61,10 @@ namespace PEIS.Presenter { View.ShowOrgCostFeeData(new StatisticalReportModel().GetOrgCostFeeData(args.Item.oEid)); }; + View.GetPeopleDateTimeData += (send, args) => + { + View.ShowPeopleDateTimeData(new StatisticalReportModel().GetPeopleDateTimeData(args.Item.begDate, args.Item.endDate, args.Item.status, args.Item.oEid)); + }; } } } \ No newline at end of file diff --git a/PEIS/Presenter/TotalPresenter.cs b/PEIS/Presenter/TotalPresenter.cs index fa48995..da808bb 100644 --- a/PEIS/Presenter/TotalPresenter.cs +++ b/PEIS/Presenter/TotalPresenter.cs @@ -89,7 +89,7 @@ namespace PEIS.Presenter }; View.SaveExamCareerConclusion += (send, args) => { - View.ShowExamCareerConclusion(new TotalModel().SaveExamCareerConclusion(args.ID, args.OccupationalConclusion)); + View.ShowExamCareerConclusion(new TotalModel().SaveExamCareerConclusion(args.ID, args.OccupationalConclusion, args.OccupationalSuggestion)); }; } } diff --git a/PEIS/ReportFiles/CAPReport.frx b/PEIS/ReportFiles/CAPReport.frx index 357922b..cdecf61 100644 --- a/PEIS/ReportFiles/CAPReport.frx +++ b/PEIS/ReportFiles/CAPReport.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -612,9 +612,9 @@ namespace FastReport - - - + + + @@ -626,17 +626,19 @@ namespace FastReport - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/PEIS/ReportFiles/PeopleDateTimeCount.frx b/PEIS/ReportFiles/PeopleDateTimeCount.frx new file mode 100644 index 0000000..8c861e5 --- /dev/null +++ b/PEIS/ReportFiles/PeopleDateTimeCount.frx @@ -0,0 +1,112 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + public double totalSum = 0; + public double totalHisSum = 0; + + private void OrderCount_AfterData(object sender, EventArgs e) + { +// DataSourceBase rowData = Report.GetDataSource("P"); +//// Cell37.Text = rowData["CreateTime"] == null ? "" : rowData["CreateTime"].ToString().Substring(0,16); +//// Cell46.Text = rowData["ChargeTime"] == null ? "" : rowData["ChargeTime"].ToString().Substring(0,16); +//// Cell48.Text = rowData["CostTime"] == null ? "" : rowData["CostTime"].ToString().Substring(0,16); +// +// +// totalSum += Convert.ToDouble(rowData["Sum"].ToString()); +// totalHisSum += Convert.ToDouble(rowData["Fee"].ToString()); +// Cell50.Text = totalSum.ToString(); +// Cell51.Text = totalHisSum.ToString(); +// +// int total = rowData.CurrentRowNo + 1; +// Cell49.Text = "-总计- " + total.ToString() +"笔订单"; + } + + private void Cell43_AfterData(object sender, EventArgs e) + { + if (Cell43.Text != null && Cell43.Text.Length > 0 && Cell43.Text.Substring(0,1).Equals("、")) { + Cell43.Text = Cell43.Text.Substring(1); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PEIS/Utils/DAOHelp.cs b/PEIS/Utils/DAOHelp.cs index 6c986cf..0901cf3 100644 --- a/PEIS/Utils/DAOHelp.cs +++ b/PEIS/Utils/DAOHelp.cs @@ -161,10 +161,10 @@ namespace PEIS.Utils catch (Exception e) { Console.WriteLine(lastErrorMsg + lastErrorTime); - if (lastErrorMsg == e.Message&& lastErrorTime > DateTime.Now.AddMinutes(-1)) - return 0; + if (lastErrorMsg == e.Message && lastErrorTime > DateTime.Now.AddMinutes(-1)) + return 0; lastErrorMsg = e.Message; - lastErrorTime=DateTime.Now; + lastErrorTime = DateTime.Now; new Log($@"Save-{e.Message}-{JsonConvert.SerializeObject(obj)}", "4").Save(); Global.MsgErr(e.Message); return 0; @@ -243,7 +243,7 @@ namespace PEIS.Utils sqltext = sqltext + " " + item.Name + "= '" + columnValue.Replace("'", "''") + "',"; } } - else if (item.PropertyType == typeof(Boolean)) + else if (item.PropertyType == typeof(Boolean) || item.PropertyType == typeof(Boolean?)) { String value = columnValue.Equals("True") ? "1" : "0"; sqltext = sqltext + " " + item.Name + "= " + value + ","; diff --git a/PEIS/Utils/ReportHelper.cs b/PEIS/Utils/ReportHelper.cs index 5abb4ef..21ee7d3 100644 --- a/PEIS/Utils/ReportHelper.cs +++ b/PEIS/Utils/ReportHelper.cs @@ -444,6 +444,7 @@ namespace PEIS.Utils rpt.SetParameterValue("Conclusion", Conclusion); rpt.SetParameterValue("Suggestion", Suggestion); + string occupationalSuggestion = string.Empty; List lstCareerConclusions = new List(); CareerConclusionReportModele careerConclusion = new CareerConclusionReportModele(); if (examCareerConclusions != null && examCareerConclusions.Any()) @@ -458,8 +459,10 @@ namespace PEIS.Utils careerConclusion.Conclusion_4 = true; else if (examCareerConclusions.First().OccupationalConclusion == 5) careerConclusion.Conclusion_5 = true; + occupationalSuggestion = examCareerConclusions.First().OccupationalSuggestion; } lstCareerConclusions.Add(careerConclusion); + rpt.SetParameterValue("OccupationalSuggestion", occupationalSuggestion); // 收费列表 SetDataSource(ref rpt, lstEFeeItems, "F", "FeeItems"); @@ -499,7 +502,9 @@ namespace PEIS.Utils rpt.Load(filePath); var lstEFeeItems = new ReportModel().GetEFeeItem(eid); - var lstConclusions = new ReportModel().GetExamConclusions(eid).Where(w => !w.IsOccupational).ToList(); + //2025年10月10日 李嘉文 应德宏中医院李昕蔓要求,健康体检的结论要包含职业体检结论,这里不再做过滤 + //var lstConclusions = new ReportModel().GetExamConclusions(eid).Where(w => !w.IsOccupational).ToList(); + var lstConclusions = new ReportModel().GetExamConclusions(eid).ToList(); var lstGeneral = new ReportModel().GetGeneralResult(eid); var lstLis = new ReportModel().GetLisResult(eid); var lstPacs = new ReportModel().GetPacsResult(eid); diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs index 4f56c5c..425770f 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs @@ -143,12 +143,15 @@ this.TpGroupFeeItem = new DevExpress.XtraTab.XtraTabPage(); this.panel5 = new System.Windows.Forms.Panel(); this.DgcGroupFeeItem = new DevExpress.XtraGrid.GridControl(); + this.GFeeItmeMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.GroupPartOption = new System.Windows.Forms.ToolStripMenuItem(); this.DgvGroupFeeItem = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridColumn75 = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemMemoEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit(); this.gridColumn74 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn76 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn77 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn106 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn79 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn78 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn80 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -277,6 +280,7 @@ this.gridColumn115 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn116 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn117 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn107 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn161 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn163 = new DevExpress.XtraGrid.Columns.GridColumn(); this.splitter7 = new System.Windows.Forms.Splitter(); @@ -284,6 +288,8 @@ this.tabControl2 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.DgcPack2 = new DevExpress.XtraGrid.GridControl(); + this.EFeeItemMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.EnrollmentPartOption = new System.Windows.Forms.ToolStripMenuItem(); this.DgvPack2 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridColumn126 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn127 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -347,6 +353,7 @@ this.gridColumn90 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn108 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn91 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn42 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn93 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn94 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn95 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -354,6 +361,8 @@ this.gridColumn105 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn104 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn92 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn39 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn40 = new DevExpress.XtraGrid.Columns.GridColumn(); this.PatientSearch = new System.Windows.Forms.TextBox(); this.gridColumn109 = new DevExpress.XtraGrid.Columns.GridColumn(); this.新建NToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -385,9 +394,6 @@ this.gridView5 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridView7 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridView8 = new DevExpress.XtraGrid.Views.Grid.GridView(); - this.gridColumn39 = new DevExpress.XtraGrid.Columns.GridColumn(); - this.gridColumn40 = new DevExpress.XtraGrid.Columns.GridColumn(); - this.gridColumn42 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMemoEdit21)).BeginInit(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgcOrg)).BeginInit(); @@ -424,6 +430,7 @@ this.TpGroupFeeItem.SuspendLayout(); this.panel5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgcGroupFeeItem)).BeginInit(); + this.GFeeItmeMenu.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgvGroupFeeItem)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMemoEdit1)).BeginInit(); this.panel9.SuspendLayout(); @@ -468,6 +475,7 @@ this.tabControl2.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgcPack2)).BeginInit(); + this.EFeeItemMenu.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgvPack2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView4)).BeginInit(); this.tabPage2.SuspendLayout(); @@ -1978,6 +1986,7 @@ // // DgcGroupFeeItem // + this.DgcGroupFeeItem.ContextMenuStrip = this.GFeeItmeMenu; this.DgcGroupFeeItem.Dock = System.Windows.Forms.DockStyle.Fill; this.DgcGroupFeeItem.Location = new System.Drawing.Point(0, 5); this.DgcGroupFeeItem.MainView = this.DgvGroupFeeItem; @@ -1989,6 +1998,20 @@ this.DgcGroupFeeItem.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvGroupFeeItem}); // + // GFeeItmeMenu + // + this.GFeeItmeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.GroupPartOption}); + this.GFeeItmeMenu.Name = "contextMenuStrip2"; + this.GFeeItmeMenu.Size = new System.Drawing.Size(125, 26); + // + // GroupPartOption + // + this.GroupPartOption.Image = global::PEIS.Properties.Resources.个人信息__1_; + this.GroupPartOption.Name = "GroupPartOption"; + this.GroupPartOption.Size = new System.Drawing.Size(124, 22); + this.GroupPartOption.Text = "选择部位"; + // // DgvGroupFeeItem // this.DgvGroupFeeItem.Appearance.FooterPanel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -2004,6 +2027,7 @@ this.gridColumn74, this.gridColumn76, this.gridColumn77, + this.gridColumn106, this.gridColumn79, this.gridColumn78, this.gridColumn80, @@ -2105,6 +2129,21 @@ this.gridColumn77.VisibleIndex = 3; this.gridColumn77.Width = 200; // + // gridColumn106 + // + this.gridColumn106.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gridColumn106.AppearanceCell.Options.UseFont = true; + this.gridColumn106.Caption = "部位"; + this.gridColumn106.FieldName = "Part"; + this.gridColumn106.Name = "gridColumn106"; + this.gridColumn106.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn106.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn106.OptionsColumn.Printable = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn106.OptionsColumn.ReadOnly = true; + this.gridColumn106.OptionsFilter.AllowAutoFilter = false; + this.gridColumn106.Visible = true; + this.gridColumn106.VisibleIndex = 4; + // // gridColumn79 // this.gridColumn79.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); @@ -2126,7 +2165,7 @@ this.gridColumn79.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] { new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Sum, "Price", "¥{0:0.##}")}); this.gridColumn79.Visible = true; - this.gridColumn79.VisibleIndex = 4; + this.gridColumn79.VisibleIndex = 5; this.gridColumn79.Width = 63; // // gridColumn78 @@ -2142,7 +2181,7 @@ this.gridColumn78.OptionsColumn.ReadOnly = true; this.gridColumn78.OptionsFilter.AllowFilter = false; this.gridColumn78.Visible = true; - this.gridColumn78.VisibleIndex = 5; + this.gridColumn78.VisibleIndex = 6; this.gridColumn78.Width = 63; // // gridColumn80 @@ -2160,7 +2199,7 @@ this.gridColumn80.OptionsColumn.ReadOnly = true; this.gridColumn80.OptionsFilter.AllowFilter = false; this.gridColumn80.Visible = true; - this.gridColumn80.VisibleIndex = 6; + this.gridColumn80.VisibleIndex = 7; this.gridColumn80.Width = 70; // // gridColumn81 @@ -2175,7 +2214,7 @@ this.gridColumn81.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; this.gridColumn81.OptionsColumn.ReadOnly = true; this.gridColumn81.Visible = true; - this.gridColumn81.VisibleIndex = 7; + this.gridColumn81.VisibleIndex = 8; this.gridColumn81.Width = 40; // // splitter4 @@ -3869,6 +3908,7 @@ // // DgcEnrollmentFeeItem // + this.DgcEnrollmentFeeItem.ContextMenuStrip = this.EFeeItemMenu; this.DgcEnrollmentFeeItem.Dock = System.Windows.Forms.DockStyle.Fill; this.DgcEnrollmentFeeItem.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.DgcEnrollmentFeeItem.Location = new System.Drawing.Point(0, 0); @@ -3895,6 +3935,7 @@ this.gridColumn115, this.gridColumn116, this.gridColumn117, + this.gridColumn107, this.gridColumn161, this.gridColumn163}); this.DgvEnrollmentFeeItem.GridControl = this.DgcEnrollmentFeeItem; @@ -4057,6 +4098,21 @@ this.gridColumn117.VisibleIndex = 7; this.gridColumn117.Width = 48; // + // gridColumn107 + // + this.gridColumn107.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gridColumn107.AppearanceCell.Options.UseFont = true; + this.gridColumn107.Caption = "部位"; + this.gridColumn107.FieldName = "Part"; + this.gridColumn107.Name = "gridColumn107"; + this.gridColumn107.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn107.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn107.OptionsColumn.Printable = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn107.OptionsColumn.ReadOnly = true; + this.gridColumn107.OptionsFilter.AllowAutoFilter = false; + this.gridColumn107.Visible = true; + this.gridColumn107.VisibleIndex = 8; + // // gridColumn161 // this.gridColumn161.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); @@ -4072,7 +4128,7 @@ this.gridColumn161.OptionsColumn.ReadOnly = true; this.gridColumn161.OptionsFilter.AllowFilter = false; this.gridColumn161.Visible = true; - this.gridColumn161.VisibleIndex = 8; + this.gridColumn161.VisibleIndex = 9; // // gridColumn163 // @@ -4148,6 +4204,20 @@ this.DgvPack2, this.gridView4}); // + // EFeeItemMenu + // + this.EFeeItemMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.EnrollmentPartOption}); + this.EFeeItemMenu.Name = "EFeeItemMenu"; + this.EFeeItemMenu.Size = new System.Drawing.Size(125, 26); + // + // EnrollmentPartOption + // + this.EnrollmentPartOption.Image = global::PEIS.Properties.Resources.个人信息__1_; + this.EnrollmentPartOption.Name = "EnrollmentPartOption"; + this.EnrollmentPartOption.Size = new System.Drawing.Size(124, 22); + this.EnrollmentPartOption.Text = "选择部位"; + // // DgvPack2 // this.DgvPack2.Appearance.FooterPanel.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -4954,6 +5024,20 @@ this.gridColumn91.Visible = true; this.gridColumn91.VisibleIndex = 4; // + // gridColumn42 + // + this.gridColumn42.Caption = "备注"; + this.gridColumn42.FieldName = "Description"; + this.gridColumn42.Name = "gridColumn42"; + this.gridColumn42.OptionsColumn.AllowEdit = false; + this.gridColumn42.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn42.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn42.OptionsColumn.AllowMove = false; + this.gridColumn42.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn42.OptionsColumn.ReadOnly = true; + this.gridColumn42.Visible = true; + this.gridColumn42.VisibleIndex = 7; + // // gridColumn93 // this.gridColumn93.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); @@ -5092,6 +5176,18 @@ this.gridColumn92.Visible = true; this.gridColumn92.VisibleIndex = 10; // + // gridColumn39 + // + this.gridColumn39.Name = "gridColumn39"; + this.gridColumn39.Visible = true; + this.gridColumn39.VisibleIndex = 13; + // + // gridColumn40 + // + this.gridColumn40.Name = "gridColumn40"; + this.gridColumn40.Visible = true; + this.gridColumn40.VisibleIndex = 14; + // // PatientSearch // this.PatientSearch.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -5311,32 +5407,6 @@ // this.gridView8.Name = "gridView8"; // - // gridColumn39 - // - this.gridColumn39.Name = "gridColumn39"; - this.gridColumn39.Visible = true; - this.gridColumn39.VisibleIndex = 13; - // - // gridColumn40 - // - this.gridColumn40.Name = "gridColumn40"; - this.gridColumn40.Visible = true; - this.gridColumn40.VisibleIndex = 14; - // - // gridColumn42 - // - this.gridColumn42.Caption = "备注"; - this.gridColumn42.FieldName = "Description"; - this.gridColumn42.Name = "gridColumn42"; - this.gridColumn42.OptionsColumn.AllowEdit = false; - this.gridColumn42.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False; - this.gridColumn42.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; - this.gridColumn42.OptionsColumn.AllowMove = false; - this.gridColumn42.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; - this.gridColumn42.OptionsColumn.ReadOnly = true; - this.gridColumn42.Visible = true; - this.gridColumn42.VisibleIndex = 7; - // // EnrollmentOrgForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); @@ -5388,6 +5458,7 @@ this.TpGroupFeeItem.ResumeLayout(false); this.panel5.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgcGroupFeeItem)).EndInit(); + this.GFeeItmeMenu.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgvGroupFeeItem)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMemoEdit1)).EndInit(); this.panel9.ResumeLayout(false); @@ -5433,6 +5504,7 @@ this.tabControl2.ResumeLayout(false); this.tabPage1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgcPack2)).EndInit(); + this.EFeeItemMenu.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgvPack2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView4)).EndInit(); this.tabPage2.ResumeLayout(false); @@ -5815,5 +5887,11 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn42; private DevExpress.XtraGrid.Columns.GridColumn gridColumn39; private DevExpress.XtraGrid.Columns.GridColumn gridColumn40; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn106; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn107; + private System.Windows.Forms.ContextMenuStrip GFeeItmeMenu; + private System.Windows.Forms.ToolStripMenuItem GroupPartOption; + private System.Windows.Forms.ContextMenuStrip EFeeItemMenu; + private System.Windows.Forms.ToolStripMenuItem EnrollmentPartOption; } } \ No newline at end of file diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.cs index a5a0c07..49e8f0d 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.cs +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.cs @@ -3,6 +3,7 @@ using DevExpress.XtraGrid.Views.Grid.ViewInfo; using DevExpress.XtraPrinting.Native; using FastReport; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using PEIS.Base; using PEIS.Entity; using PEIS.Event; @@ -194,6 +195,61 @@ namespace PEIS.View.Enrollment #endregion DgvGroup.CellValueChanged += DgvGroup_CellValueChanged; + + //分组项目选择部位 + GroupPartOption.Click += GroupPartOption_Click; + //人员项目选择部位 + EnrollmentPartOption.Click += EnrollmentPartOption_Click; + } + + private void EnrollmentPartOption_Click(object sender, EventArgs e) + { + if (DgvEnrollmentFeeItem.GetSelectedRows().Count() == 0) return; + EnrollmentFeeItem item = DgvEnrollmentFeeItem.GetRow(DgvEnrollmentFeeItem.GetSelectedRows()[0]) as EnrollmentFeeItem; + + string jsonString = DAOHelp.GetDataBySQL($@"select * from [vi_HisFeeItem] where FeeItemCode='{item.FeeItemCode}' and KeyNo='{item.KeyNo}'; ").Rows[0]["BodyParts"]?.ToString(); + + if (string.IsNullOrEmpty(jsonString)) return; + + List parts = new List(); + JArray array = JArray.Parse(jsonString); + foreach (JObject data in array) + { + parts.Add((string)data["Name"]); + } + + PartOptionForm po = new PartOptionForm(item.FeeItemName, parts); + if (po.ShowDialog() == DialogResult.OK) + { + item.Part = PartOptionForm.PartResult; + item.Update(); + DgcEnrollmentFeeItem.RefreshDataSource(); + } + } + + private void GroupPartOption_Click(object sender, EventArgs e) + { + if (DgvGroupFeeItem.GetSelectedRows().Count() == 0) return; + EnrollmentOrgFeeItem item = DgvGroupFeeItem.GetRow(DgvGroupFeeItem.GetSelectedRows()[0]) as EnrollmentOrgFeeItem; + + string jsonString = DAOHelp.GetDataBySQL($@"select * from [vi_HisFeeItem] where FeeItemCode='{item.FeeItemCode}' and KeyNo='{item.KeyNo}'; ").Rows[0]["BodyParts"]?.ToString(); + + if (string.IsNullOrEmpty(jsonString)) return; + + List parts = new List(); + JArray array = JArray.Parse(jsonString); + foreach (JObject data in array) + { + parts.Add((string)data["Name"]); + } + + PartOptionForm po = new PartOptionForm(item.FeeItemName, parts); + if (po.ShowDialog() == DialogResult.OK) + { + item.Part = PartOptionForm.PartResult; + item.Update(); + DgcGroupFeeItem.RefreshDataSource(); + } } /// @@ -566,7 +622,7 @@ namespace PEIS.View.Enrollment Int64 _groupId = Convert.ToInt64(DgvGroup2.GetRowCellValue(DgvGroup2.GetSelectedRows()[0], "ID").ToString()); String _oename = DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "Name").ToString(); - List _checkCost = DAOHelp.GetDataBySQL($@"select a.* from Enrollment_CheckCost a left join Enrollment_Patient b on a.EID = b.ID and a.OEID = b.OEID where b.OEID = {_oeid} and b.GroupId = {_groupId}"); + List _checkCost = DAOHelp.GetDataBySQL($@"select a.* from Enrollment_CheckCost a left join Enrollment_Patient b on a.EID = b.ID and a.OEID = b.OEID where b.OEID = {_oeid} and b.GroupId = {_groupId} and a.DeleteTime is null "); if (_checkCost.Count > 0) { Global.Msg("info", "该团体分组成员已生成订单,无法撤销分组成员的模版应用!"); diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.resx b/PEIS/View/Enrollment/EnrollmentOrgForm.resx index 6bb55f1..c2b7e86 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.resx +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 510, 16 + 299, 17 @@ -132,7 +132,7 @@ - 1597, 17 + 897, 17 @@ -141,8 +141,11 @@ azgI0NwCEBi1hCQwDC2hRWEHAzQtrkcBzQAAtlLL7bkHJToAAAAASUVORK5CYII= + + 17, 17 + - 1023, 19 + 588, 17 @@ -211,7 +214,7 @@ - 713, 17 + 419, 17 @@ -279,8 +282,11 @@ xgAAAABJRU5ErkJggg== + + 159, 17 + - 1914, 17 + 1062, 17 @@ -432,7 +438,7 @@ - 1358, 18 + 764, 17 diff --git a/PEIS/View/Enrollment/EnrollmentPersonForm.Designer.cs b/PEIS/View/Enrollment/EnrollmentPersonForm.Designer.cs index 8dee8da..adf7cb1 100644 --- a/PEIS/View/Enrollment/EnrollmentPersonForm.Designer.cs +++ b/PEIS/View/Enrollment/EnrollmentPersonForm.Designer.cs @@ -30,8 +30,8 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EnrollmentPersonForm)); - DevExpress.XtraGrid.GridFormatRule gridFormatRule1 = new DevExpress.XtraGrid.GridFormatRule(); - DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression1 = new DevExpress.XtraEditors.FormatConditionRuleExpression(); + DevExpress.XtraGrid.GridFormatRule gridFormatRule2 = new DevExpress.XtraGrid.GridFormatRule(); + DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression2 = new DevExpress.XtraEditors.FormatConditionRuleExpression(); this.gridColumn52 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn118 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn123 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -175,6 +175,8 @@ this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.DgcEFeeItem = new DevExpress.XtraGrid.GridControl(); + this.FeeFastMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.PartOption = new System.Windows.Forms.ToolStripMenuItem(); this.DgvEFeeItem = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridColumn28 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -184,6 +186,7 @@ this.gridColumn29 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn30 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn31 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn54 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn32 = new DevExpress.XtraGrid.Columns.GridColumn(); this.PackAndFeeItem = new System.Windows.Forms.TabControl(); this.ExamComboTab = new System.Windows.Forms.TabPage(); @@ -272,6 +275,7 @@ this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgcEFeeItem)).BeginInit(); + this.FeeFastMenu.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgvEFeeItem)).BeginInit(); this.PackAndFeeItem.SuspendLayout(); this.ExamComboTab.SuspendLayout(); @@ -1786,7 +1790,7 @@ // this.splitContainer1.Panel2.Controls.Add(this.DgcCheckCost); this.splitContainer1.Size = new System.Drawing.Size(1201, 541); - this.splitContainer1.SplitterDistance = 293; + this.splitContainer1.SplitterDistance = 280; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 29; // @@ -1807,24 +1811,40 @@ // this.splitContainer2.Panel2.BackColor = System.Drawing.Color.White; this.splitContainer2.Panel2.Controls.Add(this.PackAndFeeItem); - this.splitContainer2.Size = new System.Drawing.Size(1201, 293); + this.splitContainer2.Size = new System.Drawing.Size(1201, 280); this.splitContainer2.SplitterDistance = 547; this.splitContainer2.SplitterWidth = 3; this.splitContainer2.TabIndex = 0; // // DgcEFeeItem // + this.DgcEFeeItem.ContextMenuStrip = this.FeeFastMenu; this.DgcEFeeItem.Dock = System.Windows.Forms.DockStyle.Fill; this.DgcEFeeItem.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.DgcEFeeItem.Location = new System.Drawing.Point(0, 0); this.DgcEFeeItem.MainView = this.DgvEFeeItem; this.DgcEFeeItem.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.DgcEFeeItem.Name = "DgcEFeeItem"; - this.DgcEFeeItem.Size = new System.Drawing.Size(543, 289); + this.DgcEFeeItem.Size = new System.Drawing.Size(543, 276); this.DgcEFeeItem.TabIndex = 2; this.DgcEFeeItem.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvEFeeItem}); // + // FeeFastMenu + // + this.FeeFastMenu.ImageScalingSize = new System.Drawing.Size(20, 20); + this.FeeFastMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.PartOption}); + this.FeeFastMenu.Name = "FeeFastMenu"; + this.FeeFastMenu.Size = new System.Drawing.Size(129, 30); + // + // PartOption + // + this.PartOption.Image = global::PEIS.Properties.Resources.个人信息__1_; + this.PartOption.Name = "PartOption"; + this.PartOption.Size = new System.Drawing.Size(128, 26); + this.PartOption.Text = "选择部位"; + // // DgvEFeeItem // this.DgvEFeeItem.Appearance.FooterPanel.Font = new System.Drawing.Font("微软雅黑", 10.8F); @@ -1842,6 +1862,7 @@ this.gridColumn29, this.gridColumn30, this.gridColumn31, + this.gridColumn54, this.gridColumn32}); this.DgvEFeeItem.GridControl = this.DgcEFeeItem; this.DgvEFeeItem.Name = "DgvEFeeItem"; @@ -1996,9 +2017,24 @@ this.gridColumn31.OptionsColumn.ReadOnly = true; this.gridColumn31.OptionsFilter.AllowFilter = false; this.gridColumn31.Visible = true; - this.gridColumn31.VisibleIndex = 7; + this.gridColumn31.VisibleIndex = 8; this.gridColumn31.Width = 48; // + // gridColumn54 + // + this.gridColumn54.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gridColumn54.AppearanceCell.Options.UseFont = true; + this.gridColumn54.Caption = "部位"; + this.gridColumn54.FieldName = "Part"; + this.gridColumn54.Name = "gridColumn54"; + this.gridColumn54.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn54.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn54.OptionsColumn.Printable = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn54.OptionsColumn.ReadOnly = true; + this.gridColumn54.OptionsFilter.AllowAutoFilter = false; + this.gridColumn54.Visible = true; + this.gridColumn54.VisibleIndex = 7; + // // gridColumn32 // this.gridColumn32.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); @@ -2014,7 +2050,7 @@ this.gridColumn32.OptionsColumn.ReadOnly = true; this.gridColumn32.OptionsFilter.AllowFilter = false; this.gridColumn32.Visible = true; - this.gridColumn32.VisibleIndex = 8; + this.gridColumn32.VisibleIndex = 9; // // PackAndFeeItem // @@ -2026,7 +2062,7 @@ this.PackAndFeeItem.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.PackAndFeeItem.Name = "PackAndFeeItem"; this.PackAndFeeItem.SelectedIndex = 0; - this.PackAndFeeItem.Size = new System.Drawing.Size(647, 289); + this.PackAndFeeItem.Size = new System.Drawing.Size(647, 276); this.PackAndFeeItem.TabIndex = 1; // // ExamComboTab @@ -2037,7 +2073,7 @@ this.ExamComboTab.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.ExamComboTab.Name = "ExamComboTab"; this.ExamComboTab.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3); - this.ExamComboTab.Size = new System.Drawing.Size(639, 259); + this.ExamComboTab.Size = new System.Drawing.Size(639, 246); this.ExamComboTab.TabIndex = 1; this.ExamComboTab.Text = "体检套餐"; // @@ -2049,7 +2085,7 @@ this.DgcPack.Name = "DgcPack"; this.DgcPack.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemCheckEdit2}); - this.DgcPack.Size = new System.Drawing.Size(635, 253); + this.DgcPack.Size = new System.Drawing.Size(635, 240); this.DgcPack.TabIndex = 122; this.DgcPack.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvPack, @@ -2213,7 +2249,7 @@ this.FeeItemTab.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.FeeItemTab.Name = "FeeItemTab"; this.FeeItemTab.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3); - this.FeeItemTab.Size = new System.Drawing.Size(637, 255); + this.FeeItemTab.Size = new System.Drawing.Size(637, 242); this.FeeItemTab.TabIndex = 0; this.FeeItemTab.Text = "收费项目"; // @@ -2225,7 +2261,7 @@ this.DgcFeeItem.Name = "DgcFeeItem"; this.DgcFeeItem.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemCheckEdit1}); - this.DgcFeeItem.Size = new System.Drawing.Size(633, 226); + this.DgcFeeItem.Size = new System.Drawing.Size(633, 213); this.DgcFeeItem.TabIndex = 124; this.DgcFeeItem.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvFeeItem, @@ -2408,7 +2444,7 @@ this.CopyItemTab.Location = new System.Drawing.Point(4, 26); this.CopyItemTab.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.CopyItemTab.Name = "CopyItemTab"; - this.CopyItemTab.Size = new System.Drawing.Size(637, 255); + this.CopyItemTab.Size = new System.Drawing.Size(639, 246); this.CopyItemTab.TabIndex = 2; this.CopyItemTab.Text = "从体检者复制项目"; this.CopyItemTab.UseVisualStyleBackColor = true; @@ -2421,7 +2457,7 @@ this.DgcCopyItem.MainView = this.DgvCopyItem; this.DgcCopyItem.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.DgcCopyItem.Name = "DgcCopyItem"; - this.DgcCopyItem.Size = new System.Drawing.Size(497, 227); + this.DgcCopyItem.Size = new System.Drawing.Size(499, 218); this.DgcCopyItem.TabIndex = 32; this.DgcCopyItem.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvCopyItem}); @@ -2598,7 +2634,7 @@ this.panel2.Dock = System.Windows.Forms.DockStyle.Left; this.panel2.Location = new System.Drawing.Point(0, 28); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(140, 227); + this.panel2.Size = new System.Drawing.Size(140, 218); this.panel2.TabIndex = 31; // // NameSearch2 @@ -2620,7 +2656,7 @@ this.DgcRegItem2.MainView = this.DgvRegItem2; this.DgcRegItem2.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.DgcRegItem2.Name = "DgcRegItem2"; - this.DgcRegItem2.Size = new System.Drawing.Size(140, 227); + this.DgcRegItem2.Size = new System.Drawing.Size(140, 218); this.DgcRegItem2.TabIndex = 29; this.DgcRegItem2.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvRegItem2}); @@ -2684,7 +2720,7 @@ this.CopyMenu.Location = new System.Drawing.Point(0, 0); this.CopyMenu.Name = "CopyMenu"; this.CopyMenu.Padding = new System.Windows.Forms.Padding(2, 2, 0, 2); - this.CopyMenu.Size = new System.Drawing.Size(637, 28); + this.CopyMenu.Size = new System.Drawing.Size(639, 28); this.CopyMenu.TabIndex = 24; this.CopyMenu.Text = "menuStrip1"; // @@ -2704,7 +2740,7 @@ this.DgcCheckCost.Name = "DgcCheckCost"; this.DgcCheckCost.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemMemoEdit3}); - this.DgcCheckCost.Size = new System.Drawing.Size(1197, 241); + this.DgcCheckCost.Size = new System.Drawing.Size(1197, 254); this.DgcCheckCost.TabIndex = 145; this.DgcCheckCost.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvCheckCost}); @@ -2737,15 +2773,15 @@ this.gridColumn53, this.gridColumn52}); this.DgvCheckCost.FixedLineWidth = 1; - gridFormatRule1.ApplyToRow = true; - gridFormatRule1.Column = this.gridColumn52; - gridFormatRule1.Name = "Format0"; - formatConditionRuleExpression1.Appearance.ForeColor = System.Drawing.Color.Gray; - formatConditionRuleExpression1.Appearance.Options.UseForeColor = true; - formatConditionRuleExpression1.Expression = "[CancelTime] Is Not Null"; - formatConditionRuleExpression1.PredefinedName = "Strikeout Text"; - gridFormatRule1.Rule = formatConditionRuleExpression1; - this.DgvCheckCost.FormatRules.Add(gridFormatRule1); + gridFormatRule2.ApplyToRow = true; + gridFormatRule2.Column = this.gridColumn52; + gridFormatRule2.Name = "Format0"; + formatConditionRuleExpression2.Appearance.ForeColor = System.Drawing.Color.Gray; + formatConditionRuleExpression2.Appearance.Options.UseForeColor = true; + formatConditionRuleExpression2.Expression = "[CancelTime] Is Not Null"; + formatConditionRuleExpression2.PredefinedName = "Strikeout Text"; + gridFormatRule2.Rule = formatConditionRuleExpression2; + this.DgvCheckCost.FormatRules.Add(gridFormatRule2); this.DgvCheckCost.GridControl = this.DgcCheckCost; this.DgvCheckCost.IndicatorWidth = 40; this.DgvCheckCost.Name = "DgvCheckCost"; @@ -2840,6 +2876,7 @@ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgcEFeeItem)).EndInit(); + this.FeeFastMenu.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.DgvEFeeItem)).EndInit(); this.PackAndFeeItem.ResumeLayout(false); this.ExamComboTab.ResumeLayout(false); @@ -3075,5 +3112,8 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn47; private DevExpress.XtraGrid.Columns.GridColumn gridColumn48; private DevExpress.XtraGrid.Columns.GridColumn gridColumn49; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn54; + private System.Windows.Forms.ContextMenuStrip FeeFastMenu; + private System.Windows.Forms.ToolStripMenuItem PartOption; } } \ No newline at end of file diff --git a/PEIS/View/Enrollment/EnrollmentPersonForm.cs b/PEIS/View/Enrollment/EnrollmentPersonForm.cs index b576b17..e0d0cfd 100644 --- a/PEIS/View/Enrollment/EnrollmentPersonForm.cs +++ b/PEIS/View/Enrollment/EnrollmentPersonForm.cs @@ -15,6 +15,7 @@ using System.Linq; using System.Threading; using System.Windows.Forms; using System.Net; +using Newtonsoft.Json.Linq; namespace PEIS.View.Enrollment { @@ -119,6 +120,9 @@ namespace PEIS.View.Enrollment // 移除收费项目 DgvEFeeItem.DoubleClick += DgvEFeeItem_DoubleClick; + //选择部位 + PartOption.Click += PartOption_Click; + // 改变体检项目行颜色 DgvEFeeItem.RowStyle += DgvEFeeItem_RowStyle; // 改变订单行颜色 @@ -142,6 +146,7 @@ namespace PEIS.View.Enrollment DgvFeeItem.MouseDown += DgvFeeItem_MouseDown; DgvEFeeItem.MouseDown += DgvEFeeItem_MouseDown; #endregion + } private void DgvEFeeItem_MouseDown(object sender, MouseEventArgs e) @@ -159,6 +164,31 @@ namespace PEIS.View.Enrollment pInfo = DgvPack.CalcHitInfo(e.X, e.Y); } + private void PartOption_Click(object sender, EventArgs e) + { + if (DgvEFeeItem.GetSelectedRows().Count() == 0) return; + EnrollmentFeeItem item = DgvEFeeItem.GetRow(DgvEFeeItem.GetSelectedRows()[0]) as EnrollmentFeeItem; + + string jsonString = DAOHelp.GetDataBySQL($@"select * from [vi_HisFeeItem] where FeeItemCode='{item.FeeItemCode}' and KeyNo='{item.KeyNo}'; ").Rows[0]["BodyParts"]?.ToString(); + + if (string.IsNullOrEmpty(jsonString)) return; + + List parts = new List(); + JArray array = JArray.Parse(jsonString); + foreach (JObject data in array) + { + parts.Add((string)data["Name"]); + } + + PartOptionForm po = new PartOptionForm(item.FeeItemName, parts); + if (po.ShowDialog() == DialogResult.OK) + { + item.Part = PartOptionForm.PartResult; + item.Update(); + DgcEFeeItem.RefreshDataSource(); + } + } + private void DgvEFeeItem_RowStyle(object sender, RowStyleEventArgs e) { if (DgvEFeeItem.RowCount == 0) return; diff --git a/PEIS/View/Enrollment/EnrollmentPersonForm.resx b/PEIS/View/Enrollment/EnrollmentPersonForm.resx index 374a6eb..a710b11 100644 --- a/PEIS/View/Enrollment/EnrollmentPersonForm.resx +++ b/PEIS/View/Enrollment/EnrollmentPersonForm.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 1724, 14 + 925, 13 @@ -134,7 +134,7 @@ - 182, 9 + 19, 18 @@ -176,7 +176,7 @@ - 522, 8 + 335, 18 @@ -358,7 +358,7 @@ - 816, 8 + 483, 18 @@ -387,7 +387,7 @@ - 1094, 4 + 621, 16 @@ -495,8 +495,11 @@ AElFTkSuQmCC + + 152, 18 + - 1417, 8 + 762, 13 @@ -508,6 +511,6 @@ - 58 + 54 \ No newline at end of file diff --git a/PEIS/View/Enrollment/PartOptionForm.Designer.cs b/PEIS/View/Enrollment/PartOptionForm.Designer.cs new file mode 100644 index 0000000..6119ecc --- /dev/null +++ b/PEIS/View/Enrollment/PartOptionForm.Designer.cs @@ -0,0 +1,86 @@ + +namespace PEIS.View.Enrollment +{ + partial class PartOptionForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.CheckPanel = new System.Windows.Forms.Panel(); + this.OKButton = new System.Windows.Forms.Button(); + this.CancelButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // CheckPanel + // + this.CheckPanel.AutoScroll = true; + this.CheckPanel.Location = new System.Drawing.Point(13, 13); + this.CheckPanel.Name = "CheckPanel"; + this.CheckPanel.Size = new System.Drawing.Size(239, 148); + this.CheckPanel.TabIndex = 0; + // + // OKButton + // + this.OKButton.Location = new System.Drawing.Point(13, 167); + this.OKButton.Name = "OKButton"; + this.OKButton.Size = new System.Drawing.Size(110, 30); + this.OKButton.TabIndex = 1; + this.OKButton.Text = "确定"; + this.OKButton.UseVisualStyleBackColor = true; + // + // CancelButton + // + this.CancelButton.Location = new System.Drawing.Point(142, 167); + this.CancelButton.Name = "CancelButton"; + this.CancelButton.Size = new System.Drawing.Size(110, 30); + this.CancelButton.TabIndex = 2; + this.CancelButton.Text = "取消"; + this.CancelButton.UseVisualStyleBackColor = true; + // + // PartOptionForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(264, 203); + this.Controls.Add(this.CancelButton); + this.Controls.Add(this.OKButton); + this.Controls.Add(this.CheckPanel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "PartOptionForm"; + this.Text = "PartOptionForm"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel CheckPanel; + private System.Windows.Forms.Button OKButton; + private System.Windows.Forms.Button CancelButton; + } +} \ No newline at end of file diff --git a/PEIS/View/Enrollment/PartOptionForm.cs b/PEIS/View/Enrollment/PartOptionForm.cs new file mode 100644 index 0000000..36b8849 --- /dev/null +++ b/PEIS/View/Enrollment/PartOptionForm.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace PEIS.View.Enrollment +{ + public partial class PartOptionForm : Form + { + + public static string PartResult; + + public PartOptionForm(string feeItemName, List parts) + { + InitializeComponent(); + + Text = feeItemName; + StartPosition = FormStartPosition.Manual; + Location = Control.MousePosition; + + OKButton.Click += OKButton_Click; + CancelButton.Click += CancelButton_Click; + + PartResult = null; + + for (int i = 0; i < parts.Count; i++) + { + CheckBox checkBox = new CheckBox + { + Text = parts[i], + AutoSize = true, + Location = new Point(10, i * 25 + 10) + }; + CheckPanel.Controls.Add(checkBox); + } + } + + private void OKButton_Click(object sender, EventArgs e) + { + foreach (var control in CheckPanel.Controls) + { + if (control is CheckBox) + { + var checkbox = control as CheckBox; + if (checkbox.Checked) + { + PartResult += checkbox.Text + ","; + } + } + } + PartResult = PartResult?.TrimEnd(','); + + DialogResult = DialogResult.OK; + } + + private void CancelButton_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + } + } +} diff --git a/PEIS/View/Enrollment/PartOptionForm.resx b/PEIS/View/Enrollment/PartOptionForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/PEIS/View/Enrollment/PartOptionForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PEIS/View/Exam/TotalForm.Designer.cs b/PEIS/View/Exam/TotalForm.Designer.cs index da41e1b..22742d3 100644 --- a/PEIS/View/Exam/TotalForm.Designer.cs +++ b/PEIS/View/Exam/TotalForm.Designer.cs @@ -244,6 +244,8 @@ this.gridView6 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridView7 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridView8 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.OccupationalGroupBox = new System.Windows.Forms.GroupBox(); + this.OccupationalText = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerBase)).BeginInit(); this.splitContainerBase.Panel1.SuspendLayout(); this.splitContainerBase.Panel2.SuspendLayout(); @@ -341,6 +343,7 @@ ((System.ComponentModel.ISupportInitialize)(this.gridView6)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView7)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView8)).BeginInit(); + this.OccupationalGroupBox.SuspendLayout(); this.SuspendLayout(); // // splitContainerBase @@ -1181,7 +1184,7 @@ this.repositoryItemMemoEdit2, this.CmbSearchConclusion, this.repositoryItemCheckEdit1}); - this.DgcExamConclusion.Size = new System.Drawing.Size(442, 391); + this.DgcExamConclusion.Size = new System.Drawing.Size(442, 280); this.DgcExamConclusion.TabIndex = 5; this.DgcExamConclusion.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvExamConclusion, @@ -1351,10 +1354,11 @@ this.panelOccupational.Controls.Add(this.OccupationalConclusion_3); this.panelOccupational.Controls.Add(this.OccupationalConclusion_2); this.panelOccupational.Controls.Add(this.OccupationalConclusion_1); + this.panelOccupational.Controls.Add(this.OccupationalGroupBox); this.panelOccupational.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panelOccupational.Location = new System.Drawing.Point(0, 391); + this.panelOccupational.Location = new System.Drawing.Point(0, 280); this.panelOccupational.Name = "panelOccupational"; - this.panelOccupational.Size = new System.Drawing.Size(442, 36); + this.panelOccupational.Size = new System.Drawing.Size(442, 147); this.panelOccupational.TabIndex = 6; this.panelOccupational.Visible = false; // @@ -1365,7 +1369,7 @@ this.OccupationalConclusion_5.Location = new System.Drawing.Point(356, 0); this.OccupationalConclusion_5.Name = "OccupationalConclusion_5"; this.OccupationalConclusion_5.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.OccupationalConclusion_5.Size = new System.Drawing.Size(119, 36); + this.OccupationalConclusion_5.Size = new System.Drawing.Size(119, 38); this.OccupationalConclusion_5.TabIndex = 4; this.OccupationalConclusion_5.TabStop = true; this.OccupationalConclusion_5.Text = "其他疾病或异常"; @@ -1378,7 +1382,7 @@ this.OccupationalConclusion_4.Location = new System.Drawing.Point(261, 0); this.OccupationalConclusion_4.Name = "OccupationalConclusion_4"; this.OccupationalConclusion_4.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.OccupationalConclusion_4.Size = new System.Drawing.Size(95, 36); + this.OccupationalConclusion_4.Size = new System.Drawing.Size(95, 38); this.OccupationalConclusion_4.TabIndex = 3; this.OccupationalConclusion_4.TabStop = true; this.OccupationalConclusion_4.Text = "职业禁忌症"; @@ -1391,7 +1395,7 @@ this.OccupationalConclusion_3.Location = new System.Drawing.Point(166, 0); this.OccupationalConclusion_3.Name = "OccupationalConclusion_3"; this.OccupationalConclusion_3.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.OccupationalConclusion_3.Size = new System.Drawing.Size(95, 36); + this.OccupationalConclusion_3.Size = new System.Drawing.Size(95, 38); this.OccupationalConclusion_3.TabIndex = 2; this.OccupationalConclusion_3.TabStop = true; this.OccupationalConclusion_3.Text = "疑似职业病"; @@ -1404,7 +1408,7 @@ this.OccupationalConclusion_2.Location = new System.Drawing.Point(107, 0); this.OccupationalConclusion_2.Name = "OccupationalConclusion_2"; this.OccupationalConclusion_2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.OccupationalConclusion_2.Size = new System.Drawing.Size(59, 36); + this.OccupationalConclusion_2.Size = new System.Drawing.Size(59, 38); this.OccupationalConclusion_2.TabIndex = 1; this.OccupationalConclusion_2.TabStop = true; this.OccupationalConclusion_2.Text = "复查"; @@ -1418,7 +1422,7 @@ this.OccupationalConclusion_1.Location = new System.Drawing.Point(0, 0); this.OccupationalConclusion_1.Name = "OccupationalConclusion_1"; this.OccupationalConclusion_1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.OccupationalConclusion_1.Size = new System.Drawing.Size(107, 36); + this.OccupationalConclusion_1.Size = new System.Drawing.Size(107, 38); this.OccupationalConclusion_1.TabIndex = 0; this.OccupationalConclusion_1.TabStop = true; this.OccupationalConclusion_1.Text = "目前未见异常"; @@ -2988,6 +2992,27 @@ // this.gridView8.Name = "gridView8"; // + // OccupationalGroupBox + // + this.OccupationalGroupBox.Controls.Add(this.OccupationalText); + this.OccupationalGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; + this.OccupationalGroupBox.Location = new System.Drawing.Point(0, 38); + this.OccupationalGroupBox.Name = "OccupationalGroupBox"; + this.OccupationalGroupBox.Size = new System.Drawing.Size(442, 109); + this.OccupationalGroupBox.TabIndex = 5; + this.OccupationalGroupBox.TabStop = false; + this.OccupationalGroupBox.Text = "职业健康检查处理意见"; + // + // OccupationalText + // + this.OccupationalText.AcceptsReturn = true; + this.OccupationalText.Dock = System.Windows.Forms.DockStyle.Fill; + this.OccupationalText.Location = new System.Drawing.Point(3, 18); + this.OccupationalText.Multiline = true; + this.OccupationalText.Name = "OccupationalText"; + this.OccupationalText.Size = new System.Drawing.Size(436, 88); + this.OccupationalText.TabIndex = 0; + // // TotalForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); @@ -3104,6 +3129,8 @@ ((System.ComponentModel.ISupportInitialize)(this.gridView6)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView7)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView8)).EndInit(); + this.OccupationalGroupBox.ResumeLayout(false); + this.OccupationalGroupBox.PerformLayout(); this.ResumeLayout(false); } @@ -3324,5 +3351,7 @@ private System.Windows.Forms.RadioButton OccupationalConclusion_4; private System.Windows.Forms.RadioButton OccupationalConclusion_3; private System.Windows.Forms.RadioButton OccupationalConclusion_2; + private System.Windows.Forms.GroupBox OccupationalGroupBox; + private System.Windows.Forms.TextBox OccupationalText; } } \ No newline at end of file diff --git a/PEIS/View/Exam/TotalForm.cs b/PEIS/View/Exam/TotalForm.cs index ec46e5e..c2b9dae 100644 --- a/PEIS/View/Exam/TotalForm.cs +++ b/PEIS/View/Exam/TotalForm.cs @@ -625,12 +625,21 @@ namespace PEIS.View.Exam var item = items.First(); foreach (var item2 in panelOccupational.Controls) { - var radioButton = item2 as RadioButton; - if (radioButton.Name.EndsWith(item.OccupationalConclusion.ToString())) - Invoke(new Action(() => radioButton.Checked = true)); - else - Invoke(new Action(() => radioButton.Checked = false)); + if (item2 is RadioButton) + { + var radioButton = item2 as RadioButton; + if (radioButton.Name.EndsWith(item.OccupationalConclusion.ToString())) + Invoke(new Action(() => radioButton.Checked = true)); + else + Invoke(new Action(() => radioButton.Checked = false)); + } } + OccupationalText.Text = item.OccupationalSuggestion; + } + else + { + OccupationalConclusion_1.Checked = true; + OccupationalText.Text = string.Empty; } } @@ -921,6 +930,7 @@ namespace PEIS.View.Exam { ID = _patient.ID, OccupationalConclusion = int.Parse(rb.Name.Split('_')[1]), + OccupationalSuggestion = OccupationalText.Text, }); break; } diff --git a/PEIS/View/statistics/IStatisticalReportView.cs b/PEIS/View/statistics/IStatisticalReportView.cs index 5a8b1bb..2aa50ff 100644 --- a/PEIS/View/statistics/IStatisticalReportView.cs +++ b/PEIS/View/statistics/IStatisticalReportView.cs @@ -52,5 +52,9 @@ namespace PEIS.View.Statistics // 团体费用统计 event EventHandler> GetOrgCostFeeData; void ShowOrgCostFeeData(List items); + + // 体检时间节点 + event EventHandler> GetPeopleDateTimeData; + void ShowPeopleDateTimeData(List items); } } diff --git a/PEIS/View/statistics/StatisticalReportForm.Designer.cs b/PEIS/View/statistics/StatisticalReportForm.Designer.cs index 2bc6616..1e9a599 100644 --- a/PEIS/View/statistics/StatisticalReportForm.Designer.cs +++ b/PEIS/View/statistics/StatisticalReportForm.Designer.cs @@ -259,7 +259,7 @@ this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 17); this.label4.TabIndex = 8; - this.label4.Text = "执行科室"; + this.label4.Text = "统计类别"; // // label3 // diff --git a/PEIS/View/statistics/StatisticalReportForm.cs b/PEIS/View/statistics/StatisticalReportForm.cs index 05e712f..19248d3 100644 --- a/PEIS/View/statistics/StatisticalReportForm.cs +++ b/PEIS/View/statistics/StatisticalReportForm.cs @@ -28,6 +28,7 @@ namespace PEIS.View.Statistics public List _orgCostFeeData = new List(); public List _checkCost = new List(); public List _twoCancerData = new List(); + private List _peopleDateTimeData = new List(); public EnrollmentOrg _org = new EnrollmentOrg(); public StatisticalReportForm() @@ -48,7 +49,7 @@ namespace PEIS.View.Statistics // 控制团体选择的显示 TeamRadio.CheckedChanged += (object sender, EventArgs e) => { - if (TeamRadio.Checked && _parentNode == "CostCount") + if (TeamRadio.Checked) { OrgTextEdit.Enabled = true; } @@ -93,7 +94,7 @@ namespace PEIS.View.Statistics break; case "费用明细统计表": _parentNode = "CostCount"; - OrgTextEdit.Enabled = TeamRadio.Checked; + OrgTextEdit.Enabled = TeamRadio.Checked = true; RefreshBtn_Click(sender, e); HandleReport(); break; @@ -116,6 +117,15 @@ namespace PEIS.View.Statistics RefreshBtn_Click(sender, e); HandleReport(); break; + case "体检时间节点统计": + _parentNode = "PeopleDateTimeCount"; + DeptComboBox.Enabled = false; + PersonRadio.Enabled = true; + AllRadio.Enabled = true; + OrgTextEdit.Enabled = TeamRadio.Checked = true; + RefreshBtn_Click(sender, e); + HandleReport(); + break; } } else @@ -167,13 +177,13 @@ namespace PEIS.View.Statistics switch (_parentNode) { case "PeopleCount": - if (_reportType == null) - { - Global.Msg("info","请选择统计表!"); + if (_reportType == null) + { + Global.Msg("info", "请选择统计表!"); break; - } - OnGetPeopleCount(); - break; + } + OnGetPeopleCount(); + break; case "OrderCount": if (_reportType == null) { @@ -191,24 +201,27 @@ namespace PEIS.View.Statistics case "OrgCostFeeCount": OnGetOrgCostFeeData(); break; + case "PeopleDateTimeCount": + OnGetPeopleDateTimeData(); + break; default: - Global.Msg("info","请选择统计表!"); + Global.Msg("info", "请选择统计表!"); break; } } private void HandleReport() { - sReport = new FastReport.Report(); //实例化一个Report报表 - try - { + sReport = new FastReport.Report(); //实例化一个Report报表 + try + { var reportFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportFiles", _parentNode + ".frx"); - //var reportFile = "D:/Code/project/PEIS/PeopleCount.frx"; + //var reportFile = "D:/Code/project/PEIS/PeopleCount.frx"; sReport.Load(reportFile); - sReport.Preview = ReportPreview; + sReport.Preview = ReportPreview; // 表头信息 - sReport.SetParameterValue("HospitalName",Global._hospital.Name); + sReport.SetParameterValue("HospitalName", Global._hospital.Name); sReport.SetParameterValue("DateBetween", BegDate.Value.ToShortDateString() + "--" + EndDate.Value.ToShortDateString()); sReport.SetParameterValue("Type", _reportName); @@ -221,20 +234,23 @@ namespace PEIS.View.Statistics case "OrderCount": sReport.RegisterData(_checkCost, "p"); break; - case "CostCount": + case "CostCount": sReport.RegisterData(_eFeeItems, "p"); sReport.SetParameterValue("TotalFee", _eFeeItems.Sum(s => s.Fee)); sReport.SetParameterValue("DeptName", (DeptComboBox.SelectedItem as User)?.DeptName); - sReport.SetParameterValue("TeamName", TeamRadio.Checked && _org != null? _org.Name : ""); + sReport.SetParameterValue("TeamName", TeamRadio.Checked && _org != null ? _org.Name : ""); break; case "TwoCancerCount": sReport.SetParameterValue("TotalCount", _twoCancerData.Count); sReport.RegisterData(_twoCancerData, "p"); break; case "OrgCostFeeCount": - sReport.SetParameterValue("OrgName", _org != null && _org.ID != -1? _org.Name : ""); + sReport.SetParameterValue("OrgName", _org != null && _org.ID != -1 ? _org.Name : ""); sReport.RegisterData(_orgCostFeeData, "p"); break; + case "PeopleDateTimeCount": + sReport.RegisterData(_peopleDateTimeData, "p"); + break; } DataBand dataBand = sReport.Report.FindObject(_parentNode) as DataBand; @@ -243,12 +259,12 @@ namespace PEIS.View.Statistics sReport.Prepare(); //准备 sReport.ShowPrepared(); //显示 - } - catch (Exception ex) - { + } + catch (Exception ex) + { Global.Msg("info", ex.Message); Console.WriteLine(ex.Message); - } + } } private void InitTree() @@ -276,7 +292,10 @@ namespace PEIS.View.Statistics new StatisticalTree() { Id = 12, ParentId = 12, Name = "两癌筛查统计",}, // 团体总费用统计 - new StatisticalTree() { Id = 13, ParentId = 13, Name = "团体费用统计" } + new StatisticalTree() { Id = 13, ParentId = 13, Name = "团体费用统计" }, + + // 体检时间节点统计 + new StatisticalTree() { Id = 14, ParentId = 14, Name = "体检时间节点统计" } }; ImageList imageList = new ImageList(); @@ -328,8 +347,8 @@ namespace PEIS.View.Statistics public void ShowPeopleCount(List items) { - Invoke(new Action(() => _peopleCount = items)); - HandleReport(); + Invoke(new Action(() => _peopleCount = items)); + HandleReport(); } protected virtual void OnGetPeopleCount() { @@ -339,7 +358,7 @@ namespace PEIS.View.Statistics paramsData.endDate = EndDate.Value; paramsData.status = TeamRadio.Checked ? 0 : PersonRadio.Checked ? 1 : 2; - GetPeopleCount?.Invoke(this, new Args{ Item = paramsData }); + GetPeopleCount?.Invoke(this, new Args { Item = paramsData }); } // 费用明细统计表 @@ -358,7 +377,7 @@ namespace PEIS.View.Statistics paramsData.status = TeamRadio.Checked ? 0 : PersonRadio.Checked ? 1 : 2; paramsData.oEid = _org == null || !TeamRadio.Checked ? -1 : _org.ID; - GetEFeeItems?.Invoke(this, new Args{ Item = paramsData }); + GetEFeeItems?.Invoke(this, new Args { Item = paramsData }); } // 获取科室列表 @@ -367,7 +386,7 @@ namespace PEIS.View.Statistics { Invoke(new Action(() => { - items.Insert(0, new User(){ DeptName = "所有科室", DeptCode = "9999" }); + items.Insert(0, new User() { DeptName = "所有科室", DeptCode = "9999" }); DeptComboBox.DataSource = items; DeptComboBox.DisplayMember = "DeptName"; DeptComboBox.ValueMember = "DeptCode"; @@ -393,7 +412,7 @@ namespace PEIS.View.Statistics paramsData.endDate = EndDate.Value; paramsData.status = TeamRadio.Checked ? 0 : PersonRadio.Checked ? 1 : 2; - GetCheckCost?.Invoke(this, new Args{ Item = paramsData }); + GetCheckCost?.Invoke(this, new Args { Item = paramsData }); } // 两癌筛查统计表 @@ -451,6 +470,25 @@ namespace PEIS.View.Statistics HandleReport(); } + + // 体检时间节点 + public event EventHandler> GetPeopleDateTimeData; + protected virtual void OnGetPeopleDateTimeData() + { + dynamic paramsData = new ExpandoObject(); + paramsData.begDate = BegDate.Value; + paramsData.endDate = EndDate.Value; + paramsData.status = TeamRadio.Checked ? 0 : PersonRadio.Checked ? 1 : 2; + paramsData.oEid = _org == null || !TeamRadio.Checked ? -1 : _org.ID; + + GetPeopleDateTimeData?.Invoke(this, new Args { Item = paramsData }); + } + public void ShowPeopleDateTimeData(List items) + { + Invoke(new Action(() => _peopleDateTimeData = items)); + HandleReport(); + } + #endregion #region 树形菜单