From 44e12e88738eb19496c0b91875124c7041ba7182 Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Fri, 20 Sep 2024 09:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E6=B3=A8=E5=B0=84?= =?UTF-8?q?=E5=89=82=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/DM_Weight.csproj | 3 + DM_Weight/Report/GridReportUtil.cs | 30 +- DM_Weight/ReportTemp/use_jiaojie - 副本.grf | 561 ++++++++++++++++++ DM_Weight/ReportTemp/use_jiaojie.grf | 217 ++++--- .../ViewModels/AddToJiaoJieDialogViewModel.cs | 5 + .../ViewModels/AddToJiaoJieWindowViewModel.cs | 18 + DM_Weight/Views/AddToJiaoJieWindow.xaml | 9 + 7 files changed, 748 insertions(+), 95 deletions(-) create mode 100644 DM_Weight/ReportTemp/use_jiaojie - 副本.grf diff --git a/DM_Weight/DM_Weight.csproj b/DM_Weight/DM_Weight.csproj index b35d455..98dcd9a 100644 --- a/DM_Weight/DM_Weight.csproj +++ b/DM_Weight/DM_Weight.csproj @@ -121,6 +121,9 @@ Always + + Always + diff --git a/DM_Weight/Report/GridReportUtil.cs b/DM_Weight/Report/GridReportUtil.cs index d4eb460..6f94c06 100644 --- a/DM_Weight/Report/GridReportUtil.cs +++ b/DM_Weight/Report/GridReportUtil.cs @@ -328,8 +328,8 @@ namespace DM_Weight.Report /// /// /// - public static void OrderUseReport(DateTime? startDate,DateTime? endDate, string drug_id) - { + public static void OrderUseReport(DateTime? startDate, DateTime? endDate, string drug_id) + { // 定义Grid++Report报表主对象 GridppReport Report = new GridppReport(); DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1"); @@ -366,5 +366,31 @@ namespace DM_Weight.Report Report.PrintPreview(true); } + public static void RejectionReport(string date) + { + // 定义Grid++Report报表主对象 + GridppReport Report = new GridppReport(); + //DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1"); + //DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1); + string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1"); + string SQL = string.Empty; + + Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "use_jiaojie.grf"); + SQL = $@" + SELECT YEAR(operationtime) as DMYear,MONTH(operationtime) DMMonth,DAY(operationtime) DMDay, 0 as TotalBaseNum, + DATE_FORMAT(Senddate,'%Y/%m/%d %H:%i:%s') as Senddate,SendUser as SendUser,receiveuser as ReceiveUser,realnum as SendNum,infactnum as InfactNum,emptynum as EmptyNum, + DATE_FORMAT(returntime,'%Y/%m/%d %H:%i:%s') as ReturnTime,returnuser as ReturnUser,returnreceiveuser as ReturnReceiveUser, + adduser as AddUser,addcheckuser as AddCheckUser,DATE_FORMAT(operationtime,'%Y/%m/%d %H:%i:%s') as OperationTime,drugid as drugId,drugname as drugName,drugspec,basenum as TotalNum,drawerno + from rejection_report -- where DATE_FORMAT(operationtime,'%Y-%m-%d')= '2024-09-19' + GROUP BY Senddate,drugId order by Senddate,drugId"; + + Dictionary>> records = new Dictionary>>(); + List> tableList=SqlSugarHelper.Db.SqlQueryable(SQL).ToDictionaryList(); + records.Add("Table", tableList); + string str=JsonConvert.SerializeObject(records); + Report.LoadDataFromXML(str); + + Report.PrintPreview(true); + } } } diff --git a/DM_Weight/ReportTemp/use_jiaojie - 副本.grf b/DM_Weight/ReportTemp/use_jiaojie - 副本.grf new file mode 100644 index 0000000..23ab40f --- /dev/null +++ b/DM_Weight/ReportTemp/use_jiaojie - 副本.grf @@ -0,0 +1,561 @@ +{ + "Version":"6.8.1.1", + "Font":{ + "Name":"宋体", + "Size":105000, + "Weight":400, + "Charset":134 + }, + "Printer":{ + "Oriention":"Landscape", + "LeftMargin":1, + "TopMargin":1.42875, + "RightMargin":1, + "BottomMargin":1.8 + }, + "DetailGrid":{ + "CenterView":true, + "IsCrossTab":true, + "FixCols":2, + "AppendBlankRow":true, + "Recordset":{ + "Field":[ + { + "Name":"DMYear", + "Type":"Integer" + }, + { + "Name":"DMMonth", + "Type":"Integer" + }, + { + "Name":"DMDay", + "Type":"Integer" + }, + { + "Name":"TotalNum", + "Type":"Integer" + }, + { + "Name":"Senddate", + "Type":"DateTime", + "Format":"HH:mm" + }, + { + "Name":"SendUser" + }, + { + "Name":"ReceiveUser" + }, + { + "Name":"SendNum", + "Type":"Integer" + }, + { + "Name":"InfactNum", + "Type":"Integer" + }, + { + "Name":"EmptyNum", + "Type":"Integer" + }, + { + "Name":"ReturnTime", + "Type":"DateTime", + "Format":"HH:mm" + }, + { + "Name":"ReturnUser" + }, + { + "Name":"ReturnReceiveUser" + }, + { + "Name":"AddUser" + }, + { + "Name":"AddCheckUser" + }, + { + "Name":"drugId" + }, + { + "Name":"drugName" + }, + { + "Name":"drugSpec" + }, + { + "Name":"drawerno", + "Type":"Integer" + } + ] + }, + "Column":[ + { + "Name":"Column4" + }, + { + "Name":"Column6" + }, + { + "Name":"Column31" + }, + { + "Name":"Column14" + }, + { + "Name":"Column19" + }, + { + "Name":"Column20" + }, + { + "Name":"Column22" + }, + { + "Name":"Column23" + }, + { + "Name":"Column24" + } + ], + "ColumnContent":{ + "Height":2.19604, + "ColumnContentCell":[ + { + "Column":"Column4", + "TextAlign":"MiddleCenter", + "DataField":"Senddate" + }, + { + "Column":"Column6", + "TextAlign":"MiddleCenter", + "DataField":"SendUser" + }, + { + "Column":"Column31", + "TextAlign":"MiddleCenter", + "DataField":"ReceiveUser" + }, + { + "Column":"Column14", + "TextAlign":"MiddleCenter", + "DataField":"SendNum" + }, + { + "Column":"Column19", + "TextAlign":"MiddleCenter", + "DataField":"InfactNum" + }, + { + "Column":"Column20", + "TextAlign":"MiddleCenter", + "DataField":"EmptyNum" + }, + { + "Column":"Column22", + "TextAlign":"MiddleCenter", + "DataField":"ReturnTime" + }, + { + "Column":"Column23", + "TextAlign":"MiddleCenter", + "DataField":"ReturnUser" + }, + { + "Column":"Column24", + "DataField":"ReturnReceiveUser" + } + ] + }, + "ColumnTitle":{ + "Height":4.10104, + "RepeatStyle":"OnGroupHeaderPage", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column3", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column12", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column25", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column26", + "ColumnTitleCell":[ + { + "GroupTitle":false, + "Column":"Column4", + "TextAlign":"BottomCenter", + "Text":"发药\r\n时间" + }, + { + "GroupTitle":false, + "Column":"Column6", + "TextAlign":"BottomCenter", + "Text":"发药者" + } + ], + "TextAlign":"MiddleRight", + "Text":"交接状态", + "BorderCustom":true, + "Border":{ + "Styles":"[DrawBottom]" + } + } + ] + } + ], + "TextAlign":"MiddleCenter", + "Text":"药品信息", + "BorderCustom":true, + "Border":{ + "Styles":"[DrawRight]" + } + } + ], + "BorderCustom":true, + "Border":{ + "Styles":"[DrawRight]" + } + }, + { + "GroupTitle":true, + "Name":"Column27", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column28", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column29", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column30", + "ColumnTitleCell":[ + { + "GroupTitle":false, + "Column":"Column31", + "TextAlign":"BottomCenter", + "Text":"领药者" + } + ] + } + ], + "TextAlign":"MiddleCenter", + "Text":"总基数" + } + ], + "TextAlign":"MiddleCenter", + "Text":"规格" + } + ], + "TextAlign":"MiddleCenter", + "Text":"品名" + }, + { + "GroupTitle":true, + "Name":"Column32", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column33", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"Column34", + "ColumnTitleCell":[ + { + "GroupTitle":true, + "Name":"发药", + "ColumnTitleCell":[ + { + "GroupTitle":false, + "Column":"Column14", + "TextAlign":"BottomCenter", + "Text":"实发数" + } + ], + "TextAlign":"MiddleCenter", + "Text":"发药" + }, + { + "GroupTitle":true, + "Name":"Column35", + "ColumnTitleCell":[ + { + "GroupTitle":false, + "Column":"Column19", + "TextAlign":"BottomCenter", + "Text":"实物数" + }, + { + "GroupTitle":false, + "Column":"Column20", + "TextAlign":"BottomCenter", + "Text":"空安瓿" + } + ], + "TextAlign":"MiddleCenter", + "Text":"还药" + } + ], + "TextAlign":"MiddleCenter", + "Text":"[#TotalNum#]" + } + ], + "TextAlign":"MiddleCenter", + "Text":"[#drugSpec#]" + } + ], + "TextAlign":"MiddleCenter", + "Text":"[#drugName#]" + }, + { + "GroupTitle":false, + "Column":"Column22", + "TextAlign":"BottomCenter", + "Text":"还药\r\n时间" + }, + { + "GroupTitle":false, + "Column":"Column23", + "TextAlign":"BottomCenter", + "Text":"还药者" + }, + { + "GroupTitle":false, + "Column":"Column24", + "TextAlign":"BottomCenter", + "Text":"接收者" + } + ] + }, + "Group":[ + { + "Name":"Group1", + "GroupHeader":{ + "Height":0.79375, + "PrintGridBorder":false, + "Control":[ + { + "Type":"MemoBox", + "Name":"MemoBox7", + "AlignColumnSide":"Right", + "Left":19.394, + "Top":0.211667, + "Width":7.59354, + "Height":0.396875, + "TextAlign":"MiddleRight", + "Text":"[#DMMonth#]月[#DMDay#]日" + } + ] + }, + "GroupFooter":{ + "Height":2, + "Control":[ + { + "Type":"StaticBox", + "Name":"StaticBox4", + "AlignColumn":"Column31", + "AlignColumnEx":"Column4", + "Width":8.96938, + "Height":2, + "Border":{ + "Styles":"[DrawRight]" + }, + "TextAlign":"MiddleCenter", + "Text":"日消耗总计(支)" + }, + { + "Type":"StaticBox", + "Name":"StaticBox5", + "AlignColumn":"Column14", + "Left":8.96938, + "Width":2.98979, + "Height":1, + "Border":{ + "Styles":"[DrawRight|DrawBottom]" + }, + "TextAlign":"BottomCenter", + "Text":"安瓿" + }, + { + "Type":"StaticBox", + "Name":"StaticBox6", + "AlignColumn":"Column19", + "Left":11.9592, + "Width":2.99, + "Height":1, + "Border":{ + "Styles":"[DrawRight|DrawBottom]" + }, + "TextAlign":"BottomCenter", + "Text":"处方" + }, + { + "Type":"StaticBox", + "Name":"StaticBox7", + "AlignColumn":"Column20", + "Left":14.949, + "Width":2.99, + "Height":1, + "Border":{ + "Styles":"[DrawRight|DrawBottom]" + }, + "TextAlign":"BottomCenter", + "Text":"补充" + }, + { + "Type":"MemoBox", + "Name":"MemoBox2", + "AlignColumn":"Column14", + "Left":8.96938, + "Top":1.00542, + "Width":2.9898, + "Height":1, + "Border":{ + "Styles":"[DrawRight]" + }, + "TextAlign":"MiddleCenter", + "Text":"[#Sum(EmptyNum)#]" + }, + { + "Type":"MemoBox", + "Name":"MemoBox3", + "AlignColumn":"Column19", + "Left":11.9592, + "Top":1.0054, + "Width":2.98979, + "Height":1, + "Border":{ + "Styles":"[DrawRight]" + }, + "TextAlign":"MiddleCenter", + "Text":"[#Sum(SendNum-InfactNum)#]" + }, + { + "Type":"MemoBox", + "Name":"MemoBox4", + "AlignColumn":"Column20", + "Left":14.949, + "Top":1.0054, + "Width":2.98979, + "Height":1, + "Border":{ + "Styles":"[DrawRight]" + }, + "TextAlign":"MiddleCenter", + "Text":"[#Sum(SendNum-InfactNum)#]" + }, + { + "Type":"StaticBox", + "Name":"StaticBox8", + "AlignColumn":"Column23", + "AlignColumnEx":"Column22", + "Left":17.9388, + "Width":5.95313, + "Height":1, + "Border":{ + "Styles":"[DrawBottom]" + }, + "TextAlign":"BottomCenter", + "Text":"补充者" + }, + { + "Type":"StaticBox", + "Name":"StaticBox9", + "AlignColumn":"Column24", + "Left":23.8919, + "Width":3.01625, + "Height":1, + "Border":{ + "Styles":"[DrawLeft|DrawRight|DrawBottom]" + }, + "TextAlign":"BottomCenter", + "Text":"核对者" + }, + { + "Type":"MemoBox", + "Name":"MemoBox5", + "AlignColumn":"Column23", + "AlignColumnEx":"Column22", + "Left":17.9388, + "Top":1.0054, + "Width":5.95313, + "Height":1, + "TextAlign":"MiddleCenter", + "Text":"[#AddUser#]" + }, + { + "Type":"MemoBox", + "Name":"MemoBox6", + "AlignColumn":"Column24", + "Left":23.8919, + "Top":1.00542, + "Width":3.01625, + "Height":1, + "Border":{ + "Styles":"[DrawLeft|DrawRight]" + }, + "TextAlign":"MiddleCenter", + "Text":"[#AddCheckUser#]" + } + ] + } + } + ], + "CrossTab":{ + "PercentFormat":"0.##%", + "HCrossFields":"drugId", + "VCrossFields":"Senddate", + "ListCols":3, + "TotalCols":3 + } + }, + "Parameter":[ + { + "Name":"machine_id" + }, + { + "Name":"startDate", + "DataType":"DateTime" + }, + { + "Name":"endDate", + "DataType":"DateTime" + } + ], + "ReportHeader":[ + { + "Name":"ReportHeader1", + "Height":1.79917, + "Control":[ + { + "Type":"MemoBox", + "Name":"MemoBox1", + "Dock":"Fill", + "Center":"Both", + "Font":{ + "Name":"宋体", + "Size":217500, + "Bold":true, + "Charset":134 + }, + "ShrinkFontToFit":true, + "TextAlign":"MiddleCenter", + "Text":"麻醉科小药箱麻醉、精神药品(注射剂)使用与交接记录([#DMYear#])年" + } + ], + "RepeatOnPage":true + } + ] +} \ No newline at end of file diff --git a/DM_Weight/ReportTemp/use_jiaojie.grf b/DM_Weight/ReportTemp/use_jiaojie.grf index 7794a61..7dde8c3 100644 --- a/DM_Weight/ReportTemp/use_jiaojie.grf +++ b/DM_Weight/ReportTemp/use_jiaojie.grf @@ -21,19 +21,25 @@ "Recordset":{ "Field":[ { - "Name":"DMYear" + "Name":"DMYear", + "Type":"Integer" }, { - "Name":"DMMonth" + "Name":"DMMonth", + "Type":"Integer" }, { - "Name":"DMDay" + "Name":"DMDay", + "Type":"Integer" }, { - "Name":"TotalBaseNum" + "Name":"TotalNum", + "Type":"Integer" }, { - "Name":"OperationTime" + "Name":"Senddate", + "Type":"DateTime", + "Format":"HH:mm" }, { "Name":"SendUser" @@ -42,16 +48,21 @@ "Name":"ReceiveUser" }, { - "Name":"SendNum" + "Name":"SendNum", + "Type":"Integer" }, { - "Name":"InfactNum" + "Name":"InfactNum", + "Type":"Integer" }, { - "Name":"EmptyNum" + "Name":"EmptyNum", + "Type":"Integer" }, { - "Name":"ReturnTime" + "Name":"ReturnTime", + "Type":"DateTime", + "Format":"HH:mm" }, { "Name":"ReturnUser" @@ -73,6 +84,10 @@ }, { "Name":"drugSpec" + }, + { + "Name":"drawerno", + "Type":"Integer" } ] }, @@ -96,7 +111,7 @@ "Name":"Column20" }, { - "Name":"Column22" + "Name":"Column36" }, { "Name":"Column23" @@ -109,36 +124,53 @@ "Height":2.19604, "ColumnContentCell":[ { - "Column":"Column4" + "Column":"Column4", + "TextAlign":"MiddleCenter", + "DataField":"Senddate" }, { - "Column":"Column6" + "Column":"Column6", + "TextAlign":"MiddleCenter", + "DataField":"SendUser" }, { - "Column":"Column31" + "Column":"Column31", + "TextAlign":"MiddleCenter", + "DataField":"ReceiveUser" }, { - "Column":"Column14" + "Column":"Column14", + "TextAlign":"MiddleCenter", + "DataField":"SendNum" }, { - "Column":"Column19" + "Column":"Column19", + "TextAlign":"MiddleCenter", + "DataField":"InfactNum" }, { - "Column":"Column20" + "Column":"Column20", + "TextAlign":"MiddleCenter", + "DataField":"EmptyNum" }, { - "Column":"Column22" + "Column":"Column36", + "TextAlign":"MiddleCenter", + "DataField":"DMYear" }, { - "Column":"Column23" + "Column":"Column23", + "TextAlign":"MiddleCenter", + "DataField":"ReturnUser" }, { - "Column":"Column24" + "Column":"Column24", + "DataField":"ReturnReceiveUser" } ] }, "ColumnTitle":{ - "Height":3.96875, + "Height":4.10104, "RepeatStyle":"OnGroupHeaderPage", "ColumnTitleCell":[ { @@ -161,7 +193,7 @@ "GroupTitle":false, "Column":"Column4", "TextAlign":"BottomCenter", - "Text":"发药时间" + "Text":"发药\r\n时间" }, { "GroupTitle":false, @@ -195,15 +227,15 @@ }, { "GroupTitle":true, - "Name":"Column27", + "Name":"品名", "ColumnTitleCell":[ { "GroupTitle":true, - "Name":"Column28", + "Name":"规格", "ColumnTitleCell":[ { "GroupTitle":true, - "Name":"Column29", + "Name":"总基数", "ColumnTitleCell":[ { "GroupTitle":true, @@ -231,26 +263,34 @@ }, { "GroupTitle":true, - "Name":"Column32", + "Name":"drugname", "ColumnTitleCell":[ { "GroupTitle":true, - "Name":"Column33", + "Name":"drugspec", "ColumnTitleCell":[ { "GroupTitle":true, - "Name":"Column34", + "Name":"totalnum", "ColumnTitleCell":[ { "GroupTitle":true, - "Name":"Column35", + "Name":"发药", "ColumnTitleCell":[ { "GroupTitle":false, "Column":"Column14", "TextAlign":"BottomCenter", "Text":"实发数" - }, + } + ], + "TextAlign":"MiddleCenter", + "Text":"发药" + }, + { + "GroupTitle":true, + "Name":"还药", + "ColumnTitleCell":[ { "GroupTitle":false, "Column":"Column19", @@ -264,44 +304,26 @@ "Text":"空安瓿" } ], - "FreeCell":true, - "Control":[ - { - "Type":"StaticBox", - "Name":"StaticBox1", - "Width":2.98979, - "Height":1.00542, - "Border":{ - "Styles":"[DrawRight]" - }, - "TextAlign":"MiddleCenter", - "Text":"发药" - }, - { - "Type":"StaticBox", - "Name":"StaticBox2", - "Left":2.98979, - "Width":6.00604, - "Height":1.00542, - "TextAlign":"MiddleCenter", - "Text":"还药" - } - ] + "TextAlign":"MiddleCenter", + "Text":"还药" } ], + "TextAlign":"MiddleCenter", "Text":"[#TotalNum#]" } ], + "TextAlign":"MiddleCenter", "Text":"[#drugSpec#]" } ], - "Text":"[drugName]" + "TextAlign":"MiddleCenter", + "Text":"[#drugName#]" }, { "GroupTitle":false, - "Column":"Column22", + "Column":"Column36", "TextAlign":"BottomCenter", - "Text":"还药时间" + "Text":"还药\r\n时间" }, { "GroupTitle":false, @@ -320,11 +342,25 @@ "Group":[ { "Name":"Group1", - "ByFields":"drugId", "GroupHeader":{ + "Height":0.79375, + "PrintGridBorder":false, + "Control":[ + { + "Type":"MemoBox", + "Name":"MemoBox7", + "AlignColumnSide":"Right", + "Left":19.394, + "Top":0.211667, + "Width":7.59354, + "Height":0.396875, + "TextAlign":"MiddleRight", + "Text":"[#DMMonth#]月[#DMDay#]日" + } + ] }, "GroupFooter":{ - "Height":2.40771, + "Height":2, "Control":[ { "Type":"StaticBox", @@ -349,7 +385,8 @@ "Border":{ "Styles":"[DrawRight|DrawBottom]" }, - "Text":"StaticBox5" + "TextAlign":"BottomCenter", + "Text":"安瓿" }, { "Type":"StaticBox", @@ -361,7 +398,8 @@ "Border":{ "Styles":"[DrawRight|DrawBottom]" }, - "Text":"StaticBox6" + "TextAlign":"BottomCenter", + "Text":"处方" }, { "Type":"StaticBox", @@ -373,7 +411,8 @@ "Border":{ "Styles":"[DrawRight|DrawBottom]" }, - "Text":"StaticBox7" + "TextAlign":"BottomCenter", + "Text":"补充" }, { "Type":"MemoBox", @@ -386,6 +425,7 @@ "Border":{ "Styles":"[DrawRight]" }, + "TextAlign":"MiddleCenter", "Text":"[#Sum(EmptyNum)#]" }, { @@ -399,6 +439,7 @@ "Border":{ "Styles":"[DrawRight]" }, + "TextAlign":"MiddleCenter", "Text":"[#Sum(SendNum-InfactNum)#]" }, { @@ -412,58 +453,61 @@ "Border":{ "Styles":"[DrawRight]" }, + "TextAlign":"MiddleCenter", "Text":"[#Sum(SendNum-InfactNum)#]" }, { "Type":"StaticBox", "Name":"StaticBox8", - "AlignColumn":"Column22", + "Anchor":"[Left|Top|Right|Bottom]", + "AlignColumn":"Column36", "AlignColumnEx":"Column23", "Left":17.9388, - "Width":5.97958, + "Width":5.95313, "Height":1, "Border":{ - "Styles":"[DrawRight|DrawBottom]" + "Styles":"[DrawBottom]" }, + "TextAlign":"BottomCenter", "Text":"补充者" }, { "Type":"StaticBox", "Name":"StaticBox9", "AlignColumn":"Column24", - "Left":23.9183, - "Width":2.98979, + "Left":23.8919, + "Width":3.01625, "Height":1, "Border":{ - "Styles":"[DrawRight|DrawBottom]" + "Styles":"[DrawLeft|DrawRight|DrawBottom]" }, + "TextAlign":"BottomCenter", "Text":"核对者" }, { "Type":"MemoBox", "Name":"MemoBox5", - "AlignColumn":"Column22", + "AlignColumn":"Column36", "AlignColumnEx":"Column23", "Left":17.9388, "Top":1.0054, - "Width":5.97958, - "Height":1.00542, - "Border":{ - "Styles":"[DrawRight]" - }, + "Width":5.95313, + "Height":1, + "TextAlign":"MiddleCenter", "Text":"[#AddUser#]" }, { "Type":"MemoBox", "Name":"MemoBox6", "AlignColumn":"Column24", - "Left":23.9183, + "Left":23.8919, "Top":1.00542, - "Width":2.96333, - "Height":1.00542, + "Width":3.01625, + "Height":1, "Border":{ - "Styles":"[DrawRight]" + "Styles":"[DrawLeft|DrawRight]" }, + "TextAlign":"MiddleCenter", "Text":"[#AddCheckUser#]" } ] @@ -473,7 +517,7 @@ "CrossTab":{ "PercentFormat":"0.##%", "HCrossFields":"drugId", - "VCrossFields":"OperationTime", + "VCrossFields":"Senddate", "ListCols":3, "TotalCols":3 } @@ -503,29 +547,16 @@ "Center":"Both", "Font":{ "Name":"宋体", - "Size":262500, + "Size":217500, "Bold":true, "Charset":134 }, + "ShrinkFontToFit":true, "TextAlign":"MiddleCenter", - "Text":"麻醉科小药箱麻醉、精神药品(注射剂)使用与交接记录([#Year#])年" + "Text":"麻醉科小药箱麻醉、精神药品(注射剂)使用与交接记录([#DMYear#])年" } ], "RepeatOnPage":true - }, - { - "Name":"ReportHeader2", - "Height":0.608542, - "Control":[ - { - "Type":"StaticBox", - "Name":"StaticBox3", - "Left":24.7915, - "Width":4.81542, - "Height":0.608542, - "Text":"[#DMYear#]年[#DMMonth#]月" - } - ] } ] } \ No newline at end of file diff --git a/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs b/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs index 836a689..cbdc2e8 100644 --- a/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs +++ b/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs @@ -198,6 +198,11 @@ namespace DM_Weight.ViewModels .OrderBy(cs => cs.EffDate) .OrderBy(cs => cs.DrawerNo) .ToList(); + if(HasQChannels==null|| HasQChannels.Count <= 0) + { + msg.Add($"有药品未绑定,请先绑定"); + continue; + } int total = HasQChannels.Sum(it => it.Quantity); int TakeQ = ChannelStocks[i].AddQuantity; // 说明数量足够 diff --git a/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs b/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs index 57ec199..88733cc 100644 --- a/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs +++ b/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs @@ -1,6 +1,7 @@ using DM_Weight.Models; using DM_Weight.msg; using DM_Weight.Port; +using DM_Weight.Report; using DM_Weight.util; using log4net; using log4net.Repository.Hierarchy; @@ -391,6 +392,13 @@ namespace DM_Weight.ViewModels }); } + + public DelegateCommand RejectReport_Download + { + get => new DelegateCommand(() => { + GridReportUtil.RejectionReport(""); + }); + } private List csList = new List(); //取药 弹出出药列表 public DelegateCommand TakeDrugCommand @@ -415,6 +423,16 @@ namespace DM_Weight.ViewModels DialogServiceExtensions.ShowDialogHost(_dialogService, "AddToJiaoJieDialog", dialogParameters, DoDialogResult, "RootDialog"); } + else + { + AlertMsg alertMsg = new AlertMsg + { + Message = $"未选择药品,请先勾选要药箱号", + Type = MsgType.ERROR, + }; + _eventAggregator.GetEvent().Publish(alertMsg); + _portUtil.Operate = false; + } }); } private void DoDialogResult(IDialogResult dialogResult) diff --git a/DM_Weight/Views/AddToJiaoJieWindow.xaml b/DM_Weight/Views/AddToJiaoJieWindow.xaml index 1cd6dd5..63d18fc 100644 --- a/DM_Weight/Views/AddToJiaoJieWindow.xaml +++ b/DM_Weight/Views/AddToJiaoJieWindow.xaml @@ -57,6 +57,13 @@ Style="{StaticResource MaterialDesignOutlinedLightButton}" Content="取消" />--> +