From a3da93cda906c611ab5fb54f4bc3d8fe1c99800a Mon Sep 17 00:00:00 2001 From: lsm Date: Mon, 15 Jul 2024 13:58:39 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=B4=B9=E7=94=A8=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/App.config | 4 +- PEIS/PEIS.csproj | 3 - PEIS/ReportFiles/CostCount.frx | 117 +++++++++++++++++++++------------ 3 files changed, 78 insertions(+), 46 deletions(-) diff --git a/PEIS/App.config b/PEIS/App.config index e1a080b..e35a23d 100644 --- a/PEIS/App.config +++ b/PEIS/App.config @@ -15,9 +15,9 @@ - + - + diff --git a/PEIS/PEIS.csproj b/PEIS/PEIS.csproj index 4249c07..df43b45 100644 --- a/PEIS/PEIS.csproj +++ b/PEIS/PEIS.csproj @@ -699,9 +699,6 @@ Always - - Always - diff --git a/PEIS/ReportFiles/CostCount.frx b/PEIS/ReportFiles/CostCount.frx index 933b944..8c2eaa8 100644 --- a/PEIS/ReportFiles/CostCount.frx +++ b/PEIS/ReportFiles/CostCount.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -19,45 +19,80 @@ namespace FastReport public class ReportScript { - public double totalSum = 0; - public double totalHisSum = 0; - public double deptSum = 0; - public double deptHisSum = 0; + public double itemTotal = 0; + public double itemPrice = 0; + public double deptTotal= 0; + public double deptPrice = 0; public string deptName = "科室"; + public string feeItem = "项目"; private void CostCount_AfterData(object sender, EventArgs e) { DataSourceBase rowData = Report.GetDataSource("P"); -// if(deptName.Equals(rowData["DeptName"].ToString())) -// { -// deptSum += Convert.ToDouble(rowData["SettleFee"].ToString()); -// deptHisSum += Convert.ToDouble(rowData["Fee"].ToString()); -// -// Cell38.Text = deptSum.ToString(); -// Cell50.Text = deptHisSum.ToString(); -// }else{ -// -// if(deptName == "科室"){ -// -// deptSum = Convert.ToDouble(rowData["SettleFee"].ToString()); -// deptHisSum = Convert.ToDouble(rowData["Fee"].ToString()); -// -// Cell38.Text = rowData["SettleFee"].ToString(); -// Cell50.Text = rowData["Fee"].ToString(); -// -// }else{ -// -// deptSum = Convert.ToDouble(rowData["SettleFee"].ToString()); -// deptHisSum = Convert.ToDouble(rowData["Fee"].ToString()); -// -// Cell38.Text = deptSum.ToString(); -// Cell50.Text = deptHisSum.ToString(); -// } -// -// deptName = rowData["DeptName"].ToString(); -// } + #region 科室 + if(deptName.Equals(rowData["DeptName"].ToString())) + { + deptTotal += Convert.ToDouble(rowData["Quantity"].ToString()); + deptPrice += Convert.ToDouble(rowData["Fee"].ToString()); + + Cell181.Text = deptTotal.ToString(); + Cell186.Text = deptPrice.ToString(); + }else{ + + if(deptName == "科室"){ + + deptTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + deptPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell181.Text = deptTotal.ToString(); + Cell186.Text = deptPrice.ToString(); + + }else{ + + deptTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + deptPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell181.Text = deptTotal.ToString(); + Cell186.Text = deptPrice.ToString(); + } + + deptName = rowData["DeptName"].ToString(); + } + #endregion + + #region 项目 + + if(feeItem.Equals(rowData["FeeItemName"].ToString())) + { + itemTotal += Convert.ToDouble(rowData["Quantity"].ToString()); + itemPrice += Convert.ToDouble(rowData["Fee"].ToString()); + + Cell172.Text = itemTotal.ToString(); + Cell177.Text = itemPrice.ToString(); + }else{ + + if(feeItem == "项目"){ + + itemTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + itemPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell172.Text = itemTotal.ToString(); + Cell177.Text = itemPrice.ToString(); + + }else{ + + itemTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + itemPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell172.Text = itemTotal.ToString(); + Cell177.Text = itemPrice.ToString(); + } + + feeItem = rowData["FeeItemName"].ToString(); + } + #endregion } } } @@ -83,7 +118,7 @@ namespace FastReport - + @@ -92,7 +127,7 @@ namespace FastReport - + @@ -115,7 +150,7 @@ namespace FastReport - + @@ -139,7 +174,7 @@ namespace FastReport - + @@ -156,7 +191,7 @@ namespace FastReport - + @@ -164,7 +199,7 @@ namespace FastReport - + @@ -188,7 +223,7 @@ namespace FastReport - + @@ -213,7 +248,7 @@ namespace FastReport - +