diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index a6886c55..51d45a06 100644 Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ diff --git a/DataBase/版本日志/SGGLDB_V2024-11-12.sql b/DataBase/版本日志/SGGLDB_V2024-11-12.sql new file mode 100644 index 00000000..6e22e7d1 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-11-12.sql @@ -0,0 +1,3 @@ +alter table dbo.Tw_InOutPlanDetail + add SortIndex int +go \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2024-11-14.sql b/DataBase/版本日志/SGGLDB_V2024-11-14.sql new file mode 100644 index 00000000..dbcdb6be --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-11-14.sql @@ -0,0 +1,6 @@ + +alter table dbo.Tw_InputDetail + add SortIndex int +go + +update PHTGL_ActionPlanFormation_Sch1 set PlanningContent='分包商资质标准' where ActionPlanItemID='ACBF5487-0C83-4E91-847F-B5BB3F59968A' diff --git a/SGGL/BLL/CLGL/TwConst.cs b/SGGL/BLL/CLGL/TwConst.cs index 11f0e9a2..f597baa5 100644 --- a/SGGL/BLL/CLGL/TwConst.cs +++ b/SGGL/BLL/CLGL/TwConst.cs @@ -45,8 +45,8 @@ namespace BLL }; public static Dictionary PlanPrintMap = new Dictionary { - { "采购通知单" ,(int)TypeInt.采购入库}, - { "退料通知单" ,(int)TypeInt.退料入库}, + { "采购入库申请单" ,(int)TypeInt.采购入库}, + { "退料入库申请单" ,(int)TypeInt.退料入库}, { "其他入库通知单" ,(int)TypeInt.其他入库}, { "材料领用申请单" ,(int)TypeInt.领料出库}, { "补料申请单" ,(int)TypeInt.补料出库}, diff --git a/SGGL/BLL/CLGL/TwInOutplandetailService.cs b/SGGL/BLL/CLGL/TwInOutplandetailService.cs index 45998070..5d419c90 100644 --- a/SGGL/BLL/CLGL/TwInOutplandetailService.cs +++ b/SGGL/BLL/CLGL/TwInOutplandetailService.cs @@ -30,13 +30,14 @@ namespace BLL from mat in mm.DefaultIfEmpty() join master in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals master.Id into masters from master in masters.DefaultIfEmpty() - join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode } into st + join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode,master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode, stock .ProjectId} into st from stock in st.DefaultIfEmpty() where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.InOutPlanMasterId) || x.InOutPlanMasterId.Contains(table.InOutPlanMasterId)) && (string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) && (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) + orderby x.SortIndex select new Model.Tw_InOutDetailOutput { Id = x.Id, @@ -49,7 +50,7 @@ namespace BLL MaterialName = mat.MaterialName, MaterialDef= mat.MaterialDef, StockNum = stock.StockNum ?? 0, - } + } ; return q; @@ -94,6 +95,7 @@ namespace BLL MaterialCode = newtable.MaterialCode, PlanNum = newtable.PlanNum, ActNum = newtable.ActNum, + SortIndex = newtable.SortIndex }; Funs.DB.Tw_InOutPlanDetail.InsertOnSubmit(table); Funs.DB.SubmitChanges(); @@ -106,11 +108,14 @@ namespace BLL /// public static void AddList(IEnumerable list, string inoutPlanMasterId) { + int sortIndex = 1; foreach (var item in list) { item.Id= SQLHelper.GetNewID(); + item.SortIndex= sortIndex; item.InOutPlanMasterId = inoutPlanMasterId; Add(item); + sortIndex++; } } public static void Update(Model.Tw_InOutPlanDetail newtable) @@ -125,6 +130,7 @@ namespace BLL table.MaterialCode = newtable.MaterialCode; table.PlanNum = newtable.PlanNum; table.ActNum = newtable.ActNum; + table.SortIndex= newtable.SortIndex; Funs.DB.SubmitChanges(); } diff --git a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs index c0dff8e3..6a19976b 100644 --- a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs +++ b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs @@ -43,6 +43,7 @@ namespace BLL from warehouseperson in warehousepersons.DefaultIfEmpty() join unit in Funs.DB.Base_Unit on x.ReqUnitId equals unit.UnitId into units from unit in units.DefaultIfEmpty() + orderby x.CreateDate descending where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && @@ -157,6 +158,7 @@ namespace BLL var result = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in result + select new Model.Tw_InOutMasterOutput { Id = x.Id, diff --git a/SGGL/BLL/CLGL/TwInputdetailService.cs b/SGGL/BLL/CLGL/TwInputdetailService.cs index 2b8ec442..33329c0d 100644 --- a/SGGL/BLL/CLGL/TwInputdetailService.cs +++ b/SGGL/BLL/CLGL/TwInputdetailService.cs @@ -35,6 +35,7 @@ namespace BLL (string.IsNullOrEmpty(table.InputMasterId) || x.InputMasterId.Contains(table.InputMasterId)) && (string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) && (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) + orderby x.SortIndex select new Model.Tw_InOutDetailOutput { Id = x.Id, @@ -45,7 +46,8 @@ namespace BLL ActNum = x.ActNum, PipelineComponentCode = y.PipelineComponentCode, MaterialName = mat.MaterialName, - MaterialDef = mat.MaterialDef + MaterialDef = mat.MaterialDef, + SortIndex = x.SortIndex } ; @@ -88,6 +90,7 @@ namespace BLL MaterialCode = newtable.MaterialCode, PlanNum = newtable.PlanNum, ActNum = newtable.ActNum, + SortIndex = newtable.SortIndex }; Funs.DB.Tw_InputDetail.InsertOnSubmit(table); Funs.DB.SubmitChanges(); @@ -105,6 +108,7 @@ namespace BLL table.MaterialCode = newtable.MaterialCode; table.PlanNum = newtable.PlanNum; table.ActNum = newtable.ActNum; + table.SortIndex = newtable.SortIndex; Funs.DB.SubmitChanges(); } @@ -121,5 +125,24 @@ namespace BLL } + public static IEnumerable GePrintListByInputMasterIds(List inputMasterIds) + { + var q = from x in Funs.DB.Tw_InputDetail + join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm + from mat in mm.DefaultIfEmpty() + join y in Funs.DB.Tw_InputMaster on x.InputMasterId equals y.Id + where inputMasterIds.Contains(x.InputMasterId) + orderby y.CusBillCode,x.SortIndex + select new + { + 入库单编号 = y.CusBillCode, + 材料编码 = x.MaterialCode, + 材料名称 = mat.MaterialName, + 材料描述 = mat.MaterialDef, + 计划数量 = x.PlanNum, + 实际数量 = x.ActNum, + }; + return q; + } } } \ No newline at end of file diff --git a/SGGL/BLL/CLGL/TwInputmasterService.cs b/SGGL/BLL/CLGL/TwInputmasterService.cs index 81df4031..c1910943 100644 --- a/SGGL/BLL/CLGL/TwInputmasterService.cs +++ b/SGGL/BLL/CLGL/TwInputmasterService.cs @@ -294,6 +294,7 @@ namespace BLL MaterialCode = detail.MaterialCode, PlanNum = detail.PlanNum, ActNum = detail.ActNum, + SortIndex = detail.SortIndex, }; TwInputdetailService.Add(detailTable); TwMaterialstockService.UpdateStockNum(master.ProjectId, detail.MaterialCode, master.WarehouseCode, TwConst.InOutType.入库, detailTable.ActNum); diff --git a/SGGL/BLL/CLGL/TwOutputdetailService..cs b/SGGL/BLL/CLGL/TwOutputdetailService..cs index 8b323214..73366d9e 100644 --- a/SGGL/BLL/CLGL/TwOutputdetailService..cs +++ b/SGGL/BLL/CLGL/TwOutputdetailService..cs @@ -31,7 +31,7 @@ namespace BLL from mat in mm.DefaultIfEmpty() join master in Funs.DB.Tw_OutputMaster on x.OutputMasterId equals master.Id into masters from master in masters.DefaultIfEmpty() - join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode,master.WarehouseCode} equals new { MaterialCode=stock.PipeLineMatCode,stock.WarehouseCode } into st + join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode, master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode, stock.ProjectId } into st from stock in st.DefaultIfEmpty() where (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs index 9b1f88ec..8c509ae5 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs @@ -237,11 +237,12 @@ namespace BLL /// /// 根据管线code获取管线信息 /// + /// /// /// - public static Model.HJGL_Pipeline GetPipelineByPipelineCode(string pipelineCode) + public static Model.HJGL_Pipeline GetPipelineByPipelineCode(string projectId, string pipelineCode) { - return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode); + return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode&&e.ProjectId==projectId ); } /// /// 根据管线信息筛选管线 diff --git a/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs b/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs index 6ddedc2e..f88c0779 100644 --- a/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/ArrivalStatistics.aspx.cs @@ -31,14 +31,23 @@ namespace FineUIPro.Web.CLGL /// 绑定数据 /// private void BindGrid() - { + { var tb = BLL.TwArrivalStatisticsService.GetStatistics(this.CurrUser.LoginProjectId, txtMaterialCode.Text.Trim(), drpWarehouse.SelectedValue); - lbRate.Text="总体匹配率:"+ Math.Round( tb.Sum(x=>x.MatchRate)*100/tb.Count() ,4) + "%"; + if (tb.Count() > 0) + { + lbRate.Text = "总体匹配率:" + Math.Round(tb.Sum(x => x.MatchRate) * 100 / tb.Count(), 4) + "%"; + } + else + { + lbRate.Text = "总体匹配率:0%"; + } + //tb = GetFilteredTable(Grid1.FilteredData, tb); Grid1.DataSource = tb; Grid1.DataBind(); } + #endregion #region GV 数据操作 diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx index 40b7dcee..0e4e5728 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx @@ -65,9 +65,9 @@ - - + --%> @@ -143,7 +143,14 @@ runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="MaterialCode" SortDirection="DESC" EnableColumnLines="true" - AllowPaging="true" IsDatabasePaging="true" PageSize="10000" > + AllowPaging="true" IsDatabasePaging="true" PageSize="10000" EnableTextSelection="True" > + + + + + + + @@ -151,8 +158,8 @@ - + diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs index 92ea05c1..22f05340 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs @@ -80,6 +80,7 @@ namespace FineUIPro.Web.CLGL { Model.Tw_InOutDetailOutput table = new Model.Tw_InOutDetailOutput(); table.InOutPlanMasterId = inOutPlanMasterId; + table.MaterialCode = txtMaterialCode.Text; var tb = BLL.TwInOutplandetailService.GetListData(table, Grid2); Grid2.DataSource = tb; Grid2.DataBind(); @@ -329,7 +330,6 @@ namespace FineUIPro.Web.CLGL this.btnMenuEdit.Hidden = false; this.btnGenInMaster.Hidden = false; this.btnRevokeGenInMaster.Hidden = false; - this.btnPassMaster.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnDelete)) { @@ -438,8 +438,8 @@ namespace FineUIPro.Web.CLGL AuditDate = string.Format("{0:yyyy-MM-dd}", result.AuditDate), AuditManName2 = !string.IsNullOrEmpty(result.AuditMan2) ? BLL.Person_PersonsService.getSignatureUrl(result.AuditMan2) : "", AuditDate2 = string.Format("{0:yyyy-MM-dd}", result.AuditDate2), - WarehouseManName = !string.IsNullOrEmpty(result.WarehouseMan) ? BLL.Person_PersonsService.getSignatureUrl(result.WarehouseMan) : "", - WarehouseManAuditDate = string.Format("{0:yyyy-MM-dd}", result.WarehouseDate), + WarehouseManName = !string.IsNullOrEmpty(result.CreateManName) ? BLL.Person_PersonsService.getSignatureUrl(result.CreateMan) : "", + WarehouseManAuditDate = string.Format("{0:yyyy-MM-dd}", result.CreateDate), }; tw_PrintMasters.Add(printMaster); // orderApproveIn.ProjectManager = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ProjectManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ProjectManager) : ""; @@ -479,6 +479,7 @@ namespace FineUIPro.Web.CLGL var tw_PrintDetail = ( from x in Funs.DB.Tw_InOutPlanDetail join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode where x.InOutPlanMasterId==Id + orderby x.SortIndex select new Model.Tw_PrintDetail { SortIndex =0, @@ -518,5 +519,9 @@ namespace FineUIPro.Web.CLGL } } + protected void txtMaterialCode_OnTextChanged(object sender, EventArgs e) + { + BindDetailGrid(Grid1.SelectedRowID); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.designer.cs index 0148b89c..1608b59e 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.designer.cs @@ -149,15 +149,6 @@ namespace FineUIPro.Web.CLGL /// protected global::FineUIPro.Button btnImport; - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - /// /// lblNumber 控件。 /// @@ -221,6 +212,15 @@ namespace FineUIPro.Web.CLGL /// protected global::FineUIPro.Grid Grid2; + /// + /// txtMaterialCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMaterialCode; + /// /// Label1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx index 9e9723ed..bde8c373 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx @@ -17,7 +17,7 @@
- @@ -54,12 +54,17 @@ - + - + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs index 13d9bd8c..49375642 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.cs @@ -35,7 +35,7 @@ namespace FineUIPro.Web.CLGL txtCreateDate.Text = string.Format("{0:yyyy-MM-dd}", model.CreateDate); txtCreateMan.Text = Person_PersonsService.GetPersonsNameById(model.CreateMan); txtReqUnitName.Text = UnitService.GetUnitNameByUnitId(model.ReqUnitId); - + txtRemark.Text = model.Remark; var queryModel = new Model.Tw_InOutDetailOutput() { diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.designer.cs index 9a638dc0..0a082e71 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMasterEdit.aspx.designer.cs @@ -140,6 +140,15 @@ namespace FineUIPro.Web.CLGL /// protected global::FineUIPro.Grid Grid1; + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + /// /// tbActNum 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx b/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx index d4383db6..6c2ec783 100644 --- a/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx +++ b/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx @@ -22,6 +22,10 @@ .f-grid-row.red { background-color: darkgoldenrod; } + .f-grid-row-summary .f-grid-cell-inner { + font-weight: bold; + color: red; + } @@ -38,9 +42,9 @@ + EnableRowDoubleClickEvent="true" EnableRowClickEvent="true" OnRowClick="Grid1_RowClick" OnRowCommand="Grid1_RowCommand"> @@ -128,7 +132,7 @@ runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id" SortDirection="DESC" EnableColumnLines="true" - AllowPaging="true" IsDatabasePaging="true" PageSize="10000"> + AllowPaging="true" IsDatabasePaging="true" PageSize="10000" EnableSummary="true" SummaryPosition="Bottom"> diff --git a/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs index ae32704b..c4849863 100644 --- a/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InputMaster.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using MiniExcelLibs; using Model; using System; using System.Collections.Generic; @@ -9,6 +10,7 @@ using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using Newtonsoft.Json.Linq; namespace FineUIPro.Web.CLGL { @@ -72,16 +74,27 @@ namespace FineUIPro.Web.CLGL var tb = BLL.TwInputdetailService.GetListData(table, Grid2); Grid2.DataSource = tb; Grid2.DataBind(); + var planNumTotal = 0m; + var actNumTotal = 0m; for (int i = 0; i < Grid2.Rows.Count; i++) { var model = Grid2.Rows[i].DataItem as Model.Tw_InOutDetailOutput; + planNumTotal += (model.PlanNum ??0m ); + actNumTotal += (model.ActNum ??0m ); if (model.ActNum != model.PlanNum) { Grid2.Rows[i].RowCssClass = "red"; } } - } + JObject summary = new JObject(); + //summary.Add("Major", "全部合计"); + summary.Add("PlanNum", planNumTotal.ToString("F2")); + summary.Add("ActNum", actNumTotal.ToString("F2")); + + + Grid2.SummaryData = summary; + } #endregion #region GV 数据操作 @@ -243,15 +256,26 @@ namespace FineUIPro.Web.CLGL /// protected void btnOut_Click(object sender, EventArgs e) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("出入库计划主表" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = System.Text.Encoding.UTF8; - this.Grid1.PageSize = 500; - this.BindGrid(); - Response.Write(GetGridTableHtml(Grid1)); - Response.End(); + if (Grid1.SelectedRowIDArray.Length>0) + { + var printModel= TwInputdetailService.GePrintListByInputMasterIds(Grid1.SelectedRowIDArray.ToList()); + string path = Funs.RootPath + @"File\Excel\Temp\InputDetail.xlsx"; + path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); + + MiniExcel.SaveAs(path, printModel); + + string fileName = "入库明细表.xlsx"; + FileInfo info = new FileInfo(path); + long fileSize = info.Length; + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close(); + File.Delete(path); + } } /// @@ -318,9 +342,9 @@ namespace FineUIPro.Web.CLGL List tw_PrintMasters = new List(); List tw_PrintDetails = new List(); Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster - { + { - ReqUnitName = result.ReqUnitName, + ReqUnitName = UnitService.GetUnitNameByUnitId(Person_PersonsService.GetPerson_PersonsById(result.CreateMan).UnitId), CusBillCode = result.CusBillCode, CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"), ProjectName = ProjectService.GetProjectNameByProjectId(result.ProjectId), @@ -370,6 +394,7 @@ namespace FineUIPro.Web.CLGL var tw_PrintDetail = (from x in Funs.DB.Tw_InputDetail join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode where x.InputMasterId == Id + orderby x.SortIndex select new Model.Tw_PrintDetail { SortIndex = 0, diff --git a/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx b/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx index 32fb161f..ec77b46a 100644 --- a/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx +++ b/SGGL/FineUIPro.Web/CLGL/MaterialStock.aspx @@ -35,7 +35,7 @@ runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" EnableTextSelection="True" - AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" > + AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"> diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx index e655fdb0..a308f150 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx @@ -165,7 +165,7 @@ diff --git a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx index c2fdb37c..c3d6af57 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx +++ b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx @@ -158,7 +158,7 @@ <%-- - + using System; using System.Collections; using System.Collections.Generic; @@ -84,7 +84,7 @@ namespace FastReport } - + @@ -154,7 +154,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/材料入库计划单.frx b/SGGL/FineUIPro.Web/File/Fastreport/材料入库计划单.frx index 200e4b0b..92f84e74 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/材料入库计划单.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/材料入库计划单.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -84,7 +84,7 @@ namespace FastReport } - + @@ -149,12 +149,12 @@ namespace FastReport - + - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx b/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx index 9873fb20..5777f8af 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -99,7 +99,7 @@ namespace FastReport } - + @@ -149,7 +149,7 @@ namespace FastReport - + @@ -163,7 +163,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/File/Word/PHTGL/施工招标实施计划审批表.docx b/SGGL/FineUIPro.Web/File/Word/PHTGL/施工招标实施计划审批表.docx index a20abf44..501843d4 100644 Binary files a/SGGL/FineUIPro.Web/File/Word/PHTGL/施工招标实施计划审批表.docx and b/SGGL/FineUIPro.Web/File/Word/PHTGL/施工招标实施计划审批表.docx differ diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs index 02e810cc..f401d8ea 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs @@ -241,7 +241,9 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 数据绑定 /// private void BindGrid() + { + if (tvControlItem.SelectedNode==null) return; string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark, com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint, com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate, @@ -255,6 +257,7 @@ namespace FineUIPro.Web.HJGL.PreDesign WHERE 1=1 "; List listStr = new List(); + if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2) { strSql += " and pipe.UnitWorkId =@UnitWorkId"; diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs index 5d6167cc..c68e3134 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipelineQRCodeIn.aspx.cs @@ -249,7 +249,7 @@ namespace FineUIPro.Web.HJGL.PreDesign }); foreach (var item in dt) { - var pipeline = PipelineService.GetPipelineByPipelineCode(item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "")); + var pipeline = PipelineService.GetPipelineByPipelineCode(this.CurrUser.LoginProjectId,item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "")); var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId); if (hJGL_Pipeline_Component!=null) { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx index f86df09f..525e4f5a 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx @@ -206,7 +206,7 @@ - + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index fd566263..1994a85b 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -12037,7 +12037,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] public string ApproveIdea { get @@ -154478,7 +154478,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] public string AttentPerson { get @@ -185437,7 +185437,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")] public string ProjectDescription { get @@ -185557,7 +185557,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")] public string CalculationRule { get @@ -185617,7 +185617,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")] public string ConstructionSubcontractor { get @@ -186001,7 +186001,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")] public System.Nullable WorkPackageEstimate { get @@ -186306,16 +186306,6 @@ namespace Model private string _ProjectId; - private string _ContractId; - - private string _OrderCode; - - private System.Nullable _OrderInDate; - - private System.Nullable _OrderOutDate; - - private string _MaterialRequisitionUnit; - private System.Nullable _State; private string _InvoiceCode; @@ -186344,6 +186334,16 @@ namespace Model private string _CreateUser; + private string _ContractId; + + private System.Nullable _OrderInDate; + + private string _OrderCode; + + private System.Nullable _OrderOutDate; + + private string _MaterialRequisitionUnit; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -186352,16 +186352,6 @@ namespace Model partial void OnInvoiceIdChanged(); partial void OnProjectIdChanging(string value); partial void OnProjectIdChanged(); - partial void OnContractIdChanging(string value); - partial void OnContractIdChanged(); - partial void OnOrderCodeChanging(string value); - partial void OnOrderCodeChanged(); - partial void OnOrderInDateChanging(System.Nullable value); - partial void OnOrderInDateChanged(); - partial void OnOrderOutDateChanging(System.Nullable value); - partial void OnOrderOutDateChanged(); - partial void OnMaterialRequisitionUnitChanging(string value); - partial void OnMaterialRequisitionUnitChanged(); partial void OnStateChanging(System.Nullable value); partial void OnStateChanged(); partial void OnInvoiceCodeChanging(string value); @@ -186390,6 +186380,16 @@ namespace Model partial void OnCreateDateChanged(); partial void OnCreateUserChanging(string value); partial void OnCreateUserChanged(); + partial void OnContractIdChanging(string value); + partial void OnContractIdChanged(); + partial void OnOrderInDateChanging(System.Nullable value); + partial void OnOrderInDateChanged(); + partial void OnOrderCodeChanging(string value); + partial void OnOrderCodeChanged(); + partial void OnOrderOutDateChanging(System.Nullable value); + partial void OnOrderOutDateChanged(); + partial void OnMaterialRequisitionUnitChanging(string value); + partial void OnMaterialRequisitionUnitChanged(); #endregion public PHTGL_Invoice() @@ -186437,106 +186437,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] - public string ContractId - { - get - { - return this._ContractId; - } - set - { - if ((this._ContractId != value)) - { - this.OnContractIdChanging(value); - this.SendPropertyChanging(); - this._ContractId = value; - this.SendPropertyChanged("ContractId"); - this.OnContractIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] - public string OrderCode - { - get - { - return this._OrderCode; - } - set - { - if ((this._OrderCode != value)) - { - this.OnOrderCodeChanging(value); - this.SendPropertyChanging(); - this._OrderCode = value; - this.SendPropertyChanged("OrderCode"); - this.OnOrderCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] - public System.Nullable OrderInDate - { - get - { - return this._OrderInDate; - } - set - { - if ((this._OrderInDate != value)) - { - this.OnOrderInDateChanging(value); - this.SendPropertyChanging(); - this._OrderInDate = value; - this.SendPropertyChanged("OrderInDate"); - this.OnOrderInDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] - public System.Nullable OrderOutDate - { - get - { - return this._OrderOutDate; - } - set - { - if ((this._OrderOutDate != value)) - { - this.OnOrderOutDateChanging(value); - this.SendPropertyChanging(); - this._OrderOutDate = value; - this.SendPropertyChanged("OrderOutDate"); - this.OnOrderOutDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] - public string MaterialRequisitionUnit - { - get - { - return this._MaterialRequisitionUnit; - } - set - { - if ((this._MaterialRequisitionUnit != value)) - { - this.OnMaterialRequisitionUnitChanging(value); - this.SendPropertyChanging(); - this._MaterialRequisitionUnit = value; - this.SendPropertyChanged("MaterialRequisitionUnit"); - this.OnMaterialRequisitionUnitChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")] public System.Nullable State { @@ -186817,6 +186717,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] + public string ContractId + { + get + { + return this._ContractId; + } + set + { + if ((this._ContractId != value)) + { + this.OnContractIdChanging(value); + this.SendPropertyChanging(); + this._ContractId = value; + this.SendPropertyChanged("ContractId"); + this.OnContractIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] + public System.Nullable OrderInDate + { + get + { + return this._OrderInDate; + } + set + { + if ((this._OrderInDate != value)) + { + this.OnOrderInDateChanging(value); + this.SendPropertyChanging(); + this._OrderInDate = value; + this.SendPropertyChanged("OrderInDate"); + this.OnOrderInDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] + public string OrderCode + { + get + { + return this._OrderCode; + } + set + { + if ((this._OrderCode != value)) + { + this.OnOrderCodeChanging(value); + this.SendPropertyChanging(); + this._OrderCode = value; + this.SendPropertyChanged("OrderCode"); + this.OnOrderCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] + public System.Nullable OrderOutDate + { + get + { + return this._OrderOutDate; + } + set + { + if ((this._OrderOutDate != value)) + { + this.OnOrderOutDateChanging(value); + this.SendPropertyChanging(); + this._OrderOutDate = value; + this.SendPropertyChanged("OrderOutDate"); + this.OnOrderOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] + public string MaterialRequisitionUnit + { + get + { + return this._MaterialRequisitionUnit; + } + set + { + if ((this._MaterialRequisitionUnit != value)) + { + this.OnMaterialRequisitionUnitChanging(value); + this.SendPropertyChanging(); + this._MaterialRequisitionUnit = value; + this.SendPropertyChanged("MaterialRequisitionUnit"); + this.OnMaterialRequisitionUnitChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -259172,6 +259172,8 @@ namespace Model private System.Nullable _ActNum; + private System.Nullable _SortIndex; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -259188,6 +259190,8 @@ namespace Model partial void OnPlanNumChanged(); partial void OnActNumChanging(System.Nullable value); partial void OnActNumChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); #endregion public Tw_InOutPlanDetail() @@ -259315,6 +259319,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -260078,6 +260102,8 @@ namespace Model private System.Nullable _ActNum; + private System.Nullable _SortIndex; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -260094,6 +260120,8 @@ namespace Model partial void OnPlanNumChanged(); partial void OnActNumChanging(System.Nullable value); partial void OnActNumChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); #endregion public Tw_InputDetail() @@ -260221,6 +260249,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -302023,7 +302071,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] public string Name { get @@ -302600,7 +302648,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -302791,7 +302839,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -308102,7 +308150,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -309574,7 +309622,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -319125,7 +319173,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")] public string ContractNo { get @@ -319145,7 +319193,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")] public string UnitWorks { get