王 垚
2020-12-31 f8eaad3fa2ffcae47ff149cd7a826c8983a69b00
color 更改
2个文件已修改
74 ■■■■■ 已修改文件
src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/BLL/Demo.Report/PRD/prd_ExtractionPlanDetail.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
@@ -23,6 +23,7 @@
            if (this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID") == null)
            {
                SearchList();
                ChangeColor();
            }
            else
            {
@@ -55,35 +56,35 @@
                        this.Model.SetValue("FOwnerId", dt.Rows[i]["FOwnerId"], i);//货主 
                    }
                }
                did = true;
                ChangeColor();
                 did = true;
            }
        }
        public override void AfterBindData(EventArgs e)
        {
            base.AfterBindData(e);
            //获取单据体信息
            //Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity");
            ////单据体信息转换为列表集合
            //DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity);
            //EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity");
            //int i = 0;
            //foreach (DynamicObject current in entityDataObjoct)
            //{
            //    if (Convert.ToString(current["FCompleteDetailStatus"]) == "未齐套")
            //    {
            //        grid.SetBackcolor("FEntity", "#FF0000", i);
            //    }
            //    i++;
            //}
            //this.View.UpdateView();
        }
        private void ChangeColor() {
            Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity");
            //单据体信息转换为列表集合
            DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity);
            EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity");
            int _i = 0;
            foreach (DynamicObject current in entityDataObjoct)
            {
                if (Convert.ToString(current["FCompleteDetailStatus"]) == "未齐套")
                {
                    grid.SetRowBackcolor("#FF0000", _i);
                }
                _i++;
            }
        }
        public override void BarItemClick(BarItemClickEventArgs e)
        {
            base.BarItemClick(e);
            if (e.BarItemKey.ToUpper() == "TBFILTER")
            {
                SearchList();
                ChangeColor();
            }
        }
        /// <summary>
@@ -137,7 +138,13 @@
            sql += sqlwhere;
            sql += "order by FPlanDate, FHStockQty desc ,FHMaterID";
            DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0];
            this.Model.DeleteEntryData("FEntity");
            //this.Model.DeleteEntryData("FEntity");
            while (this.Model.GetEntryRowCount("FEntity") > 0)
            {
                this.Model.DeleteEntryRow("FEntity", 0);
            }
            //this.View.Refresh();
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
@@ -159,7 +166,8 @@
                    this.Model.SetValue("FOwnerId", dt.Rows[i]["FOwnerId"], i);//货主 
                }
            }
            this.View.UpdateView();
            //this.View.UpdateView();
            did = true;
        }
    }
src/BLL/Demo.Report/PRD/prd_ExtractionPlanDetail.cs
@@ -23,6 +23,7 @@
    /// </summary>
    public class prd_ExtractionPlanDetail : SysReportBaseService
    {
        string date = "";
        //初始化
        public override void Initialize()
        {
@@ -108,17 +109,27 @@
        public override ReportHeader GetReportHeaders(IRptParams filter)
        {
            ReportHeader header = new ReportHeader();
            ReportHeader headerch = new ReportHeader();
            header.AddChild("FRogNUMBER", new LocaleValue("供应商信息&采购组织", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FNAME", new LocaleValue("供应商信息&供应商", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FNUMBER", new LocaleValue("供应商信息&物料", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            DataSet ds = DBServiceHelper.ExecuteDataSet(Context, "/*dialect*/select distinct convert(nvarchar(50),FHDATE,111) FHDATE from Cg_PODemandPlanBillMain ");
            header.AddChild("FNUMBER", new LocaleValue("物料信息&物料", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FMATERIALNAME", new LocaleValue("物料信息&物料名称", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FSPECIFICATION", new LocaleValue("物料信息&物料规格", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FBASEUNIT", new LocaleValue("物料信息&单位", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FPROUNIT", new LocaleValue("物料信息&计量单位", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FQTY", new LocaleValue("物料信息&库存数量", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            header.AddChild("FTRANSITQTY", new LocaleValue("物料信息&在途数量", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            //header.AddChild("FNUMBER", new LocaleValue("拖期明细&拖期数量", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            //header.AddChild("FNUMBER", new LocaleValue("计划明细&合计", this.Context.UserLocale.LCID), SqlStorageType.Sqlvarchar);
            DataSet ds = DBServiceHelper.ExecuteDataSet(Context, "/*dialect*/select distinct convert(nvarchar(50),FHDATE,111) FHDATE from Cg_PODemandPlanBillMain");
            DataTable dt = ds.Tables[0];
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    header.AddChild(dr[0].ToString(), new LocaleValue("日期&" + dr[0].ToString() + "", this.Context.UserLocale.LCID), SqlStorageType.SqlDecimal);
                    header.AddChild(dr[0].ToString(), new LocaleValue("计划明细&" + dr[0].ToString() + "", this.Context.UserLocale.LCID), SqlStorageType.SqlDecimal);
                }
            }
            return header;
@@ -149,6 +160,7 @@
            string startValue = (customFilter["FBeginConveyDate"] == null) ? string.Empty : Convert.ToDateTime(customFilter["FBeginConveyDate"]).ToString("yyyy/MM/d");
            string endValue = (customFilter["FEndConveyDate"] == null) ? string.Empty : Convert.ToDateTime(customFilter["FEndConveyDate"]).ToString("yyyy/MM/d");
            strwhere.AppendLine(string.Format(" AND FHDate>=''{0}'' and FHDate<=''{1}'' ", startValue, endValue));
            date = string.Format("  FHDate>=''{0}'' and FHDate<=''{1}'' ", startValue, endValue);
            //物料
            var baseDataNameValue = customFilter["FMATERIALID"];
            string MaterailName = baseDataNameValue == null
@@ -161,7 +173,7 @@
            //供应商
            var baseSuppName = customFilter["FSUPPLIERID"];
            string SuppName = baseSuppName == null
                ? " " : string.Format(" AND a.FSUPPLIERID IN ({0}) ", (customFilter["FSUPPLIERID"] as DynamicObject)["Id"].ToString());
                ? " " : string.Format(" AND a.FSUPPLIERID IN ({0}) ", (customFilter["FSUPPLIERID"] as DynamicObject)["Id"].ToString());
            strwhere.AppendLine(SuppName);
            string text2 = string.IsNullOrWhiteSpace(filter.FilterParameter.FilterString) ? " " : " AND " + filter.FilterParameter.FilterString.Replace("{ts", "").Replace("}", "");
            strwhere.AppendLine(text2);