diff --git a/HJGL_DS/BLL/DropListService.cs b/HJGL_DS/BLL/DropListService.cs index bfee1a4..46cc96d 100644 --- a/HJGL_DS/BLL/DropListService.cs +++ b/HJGL_DS/BLL/DropListService.cs @@ -352,7 +352,7 @@ list[0] = new ListItem("低碳钢(FeⅠ)", "FeⅠ"); list[1] = new ListItem("低合金钢(FeⅡ)", "FeⅡ"); list[2] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ)", "FeⅢ"); - list[3] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ无保护气体)", "Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ无保护气体)"); + list[3] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ无保护气体)", "FeⅢ无保护气体"); list[4] = new ListItem("奥氏体钢、奥氏体与铁素体双相钢(FeⅣ)", "FeⅣ"); list[5] = new ListItem("奥氏体钢,奥氏体与铁素体双相钢(FeⅣ无保护气体)", "FeⅣ无保护气体"); list[6] = new ListItem("镍合金(Ni)", "Ni"); diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx index da12d87..fd808e1 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx @@ -19,6 +19,7 @@ + diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs index fe0c406..0c919f0 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs @@ -1,9 +1,12 @@ -using System; +using BLL; +using FineUIPro.Web.Welder; +using Model; +using System; using System.Collections.Generic; -using System.Data.SqlClient; using System.Data; +using System.Data.SqlClient; using System.Linq; -using BLL; +using System.Web.DynamicData; namespace FineUIPro.Web.WeldMat.UsingPlan { @@ -31,6 +34,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan if (!IsPostBack) { this.ProjectId = Request.Params["projectId"]; + this.lblWED_ID.Text = Request.Params["wed_Id"]; ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); this.drpWeldType.DataTextField = "WeldTypeName"; @@ -49,14 +53,42 @@ namespace FineUIPro.Web.WeldMat.UsingPlan /// private void BindGrid() { - string strSql = @"SELECT weld.WeldId, weld.WeldCode, weld.WeldName, weld.WeldSpec,weld.WeldTypeId,weld.SteelType, + string strSql = string.Empty; + bool isQua = false; + if (!string.IsNullOrEmpty(this.lblWED_ID.Text.Trim())) + { + var qualifiedProject = BLL.HJGL_WelderQualifiedProjectService.GetWelderQualifiedProjectByWedId(this.lblWED_ID.Text.Trim()); + if (qualifiedProject.Count > 0) + { + //当材质类型为FeⅢ并且资质后面三个数中间的为11时可领用FeⅢ无保护气体焊丝 + qualifiedProject = qualifiedProject.Where(e => e.MaterialType.Contains("FeⅢ") && e.QualifiedProjectCode.Contains("/11/")).ToList(); + if (qualifiedProject.Count > 0) + { + isQua = true; + } + } + } + + if (isQua) + { + strSql = @"SELECT weld.WeldId, weld.WeldCode, weld.WeldName, weld.WeldSpec,weld.WeldTypeId,weld.SteelType, WeldType.WeldTypeName,WeldType.WeldUnit FROM dbo.Weld_WeldInfo weld LEFT JOIN Weld_WeldType AS weldType ON weldType.WeldTypeId =weld.WeldTypeId WHERE 1 = 1 and (weld.IsLock is null or weld.IsLock=0) -and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0"; - //and (select (SUM(ISNULL(stockIn.Amount,0))-SUM(ISNULL(stockIn.UsingAmount,0))) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0"; - List listStr = new List(); + and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0"; + } + else + { + strSql = @"SELECT weld.WeldId, weld.WeldCode, weld.WeldName, weld.WeldSpec,weld.WeldTypeId,weld.SteelType, + WeldType.WeldTypeName,WeldType.WeldUnit + FROM dbo.Weld_WeldInfo weld + LEFT JOIN Weld_WeldType AS weldType ON weldType.WeldTypeId =weld.WeldTypeId + WHERE 1 = 1 and (weld.IsLock is null or weld.IsLock=0) + and weld.SteelType != 'FeⅢ无保护气体' + and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0"; + } + List listStr = new List(); //listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); listStr.Add(new SqlParameter("@UnitStoreId", Request.Params["unitStoreId"])); if (drpWeldType.SelectedValue != BLL.Const._Null) @@ -74,7 +106,6 @@ and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitSt strSql += " AND weld.WeldCode LIKE @WeldCode"; listStr.Add(new SqlParameter("@WeldCode", "%" + this.txtCode.Text.Trim() + "%")); } - SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs index 597e282..e6d3376 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.WeldMat.UsingPlan { - - - public partial class ShowPlanWeld { - +namespace FineUIPro.Web.WeldMat.UsingPlan +{ + + + public partial class ShowPlanWeld + { + /// /// Head1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - + /// /// form1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -65,7 +67,16 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + + /// + /// lblWED_ID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblWED_ID; + /// /// txtName 控件。 /// @@ -74,7 +85,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtName; - + /// /// txtCode 控件。 /// @@ -83,7 +94,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCode; - + /// /// drpWeldType 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpWeldType; - + /// /// ToolbarFill1 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// Label1 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// ToolbarSeparator1 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs index 1930f4a..d41eb95 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs @@ -579,7 +579,12 @@ namespace FineUIPro.Web.WeldMat.UsingPlan Alert.ShowInTop("请选择焊材库!", MessageBoxIcon.Warning); return; } - string window = String.Format("ShowPlanWeld.aspx?projectId={0}&unitStoreId={1}", drpProjectId.SelectedValue, this.drpUnitStore.SelectedValue, "编辑 - "); + if (string.IsNullOrEmpty(this.hdUsingMan1.Text.Trim())) + { + Alert.ShowInTop("请选择领料人!", MessageBoxIcon.Warning); + return; + } + string window = String.Format("ShowPlanWeld.aspx?projectId={0}&unitStoreId={1}&wed_Id={2}", drpProjectId.SelectedValue, this.drpUnitStore.SelectedValue, hdUsingMan1.Text.Trim(), "编辑 - "); PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.hdWeldId.ClientID) + Window1.GetShowReference(window)); }