From 79715f0aa90d5e6d9bb7c11252ce4f54e605f24f Mon Sep 17 00:00:00 2001 From: yuyubo <1870149533@qq.com> Date: Fri, 18 Apr 2025 11:58:17 +0800 Subject: [PATCH] 22 --- Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs | 70 +++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs b/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs index 2cc5bb4..05a4331 100644 --- a/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs +++ b/Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs @@ -1,4 +1,5 @@ -using DevExpress.Data.PLinq.Helpers; +using DevExpress.Data.Linq; +using DevExpress.Data.PLinq.Helpers; using DocumentFormat.OpenXml.Drawing.Spreadsheet; using Kingdee.BOS.App.Core.Utils; using Kingdee.BOS.BusinessEntity.BusinessFlow; @@ -10,6 +11,8 @@ using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel; using Kingdee.BOS.Core.Enums; using Kingdee.BOS.Core.List; using Kingdee.BOS.Core.Msg; +using Kingdee.BOS.Core.Report.PlugIn.Args; +using Kingdee.BOS.JSON; using Kingdee.BOS.Orm; using Kingdee.BOS.Orm.DataEntity; using Kingdee.BOS.Orm.Exceptions; @@ -657,6 +660,8 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire //获取已配对的数据 List SaleBILLLISNew2 = SaleBILLLISNew.Where(a => a.FSKBIllNO != "" && a.FSKBIllNO != null).ToList(); INDEXNumber = 1; + + //绑定收款单数据 foreach (var item in ReceiveBILLLIST) { @@ -671,7 +676,8 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire this.View.Model.SetValue("F_PendingAmount", item.FDAMOUNT, item.FRow); this.View.Model.SetValue("F_BenCi", item.BenCi, item.FRow); this.View.Model.SetValue("F_MBBA_Decimal_3iy", item.FYAMOUNT, item.FRow); - this.View.Model.SetValue("F_ISHX", false, item.FRow); + this.View.Model.SetValue("F_ISHX", false, item.FRow); + List strings = new List(); if (item.FCONTRACTNUMBER != null) strings = item.FCONTRACTNUMBER.Split(',').ToList(); @@ -710,7 +716,7 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire this.View.Model.SetValue("F_ISHX", false, Rowindex + i); } - + //GridSetRowBackcolor(this.View, "FEntity2", "#C6E0B4", item.FRow); //if (strings.Count() == 1 && item.FWeiYi == "否") //{ @@ -1335,7 +1341,7 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire where1 += $@" and A.FCUSTID in ('{CustFid}')"; where2 += $@" and A.FCONTACTUNIT in ('{CustFid}')"; } - + //this.View.ShowMessage(string.Format("选中的客户是:{0}s", CustFid)); //获取收款日期 var FSDate = Convert.ToString(dyObj["F_ShouKuan1"]); @@ -1467,5 +1473,61 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire this.View.UpdateView("FEntity2"); } } + + //public override void AfterBindData(EventArgs e) + + //{ + + // base.AfterBindData(e); + + // var entityKey = "FSaleOrderEntry"; + + // var backColor = "#ead1dc"; + + // // 常规操作是直接使用grid.SetRowBackcolor函数,如果不生效,可以尝试用自定义封装的GridSetRowBackcolor函数 + + // var grid = this.View.GetControl(entityKey); + + // grid.SetRowBackcolor(backColor, 1); + + // //GridSetRowBackcolor(this.View, entityKey, backColor, 1); + + //} + + + + ///// + + ///// 设置表格背景色 + + ///// + + ///// 当前动态表单的View层接口 + + ///// 单据体的标识 + + ///// 颜色代码 + + ///// 要设置颜色的数据行的行索引 + + //private static void GridSetRowBackcolor(IDynamicFormView view, string entityKey, string color, int rowIndex) + + //{ + + // var value = new JSONObject(); + + // value[rowIndex.ToString()] = color; + + // var jo = new JSONObject(); + + // jo["backcolor"] = value; + + // var grid = view.GetControl(entityKey); + + // var formState = view.GetService(); + + // formState.AftInvokeControlMethod(grid.ControlAppearance, "UpdateFieldStates", jo); + + //} } }