二开实现移动分录无刷新删除

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:1

二开实现移动分录无刷新删除

经常有小伙伴反馈:移动分录划到下面,删除一个分录后,分录会刷新,这样焦点就跳到了分录顶部,使用起来比较麻烦,那么如何通过二开实现无刷新删除呢? 直接上代码: ```csharp using Kingdee.BOS.JSON; using Kingdee.BOS.Mobile.Bill; using Kingdee.BOS.Mobile.Metadata.EnitiyElement; using Kingdee.BOS.Mobile.PlugIn; using Kingdee.BOS.Mobile.PlugIn.ControlModel; using Kingdee.BOS.Util; using Kingdee.BOS.Web.DynamicForm; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; namespace Kingdee.BOS.Mobile.FormPlugIns.Test { [Description("测试单据分录")] public class TestBillEntity : AbstractMobileBillPlugin { public override void ButtonClick(Core.DynamicForm.PlugIn.Args.ButtonClickEventArgs e) { switch (e.Key.ToUpper()) { case "FDELETE": var row = this.View.GetControl<MobileListViewControl>("FMobileProxyEntryEntity").GetFocusRowIndex(); var sourceEntryEntity = ((MobileProxyEntryEntity)this.View.BusinessInfo.GetEntity("FMobileProxyEntryEntity")).SourceEntryEntity; int rowCount = this.View.BillModel.GetEntryRowCount(sourceEntryEntity.Key); if (rowCount == 0) return; this.View.BillModel.DeleteEntryRow(sourceEntryEntity.Key, row); this.View.BillView.UpdateView(sourceEntryEntity.Key); //this.View.UpdateView("FMobileProxyEntryEntity"); //直接刷新会导致,页面滚到分录顶部 string key = "FMobileProxyEntryEntity"; CallParameter callParam = new CallParameter() { //从1开始 methodname = "DeleteRows", args = new object[] { row }, key = key.ToUpper() }; this.View.AddAction("InvokeControlMethod", callParam); break; } base.ButtonClick(e); } } } ```

二开实现移动分录无刷新删除

经常有小伙伴反馈:移动分录划到下面,删除一个分录后,分录会刷新,这样焦点就跳到了分录顶部,使用起来比较麻烦,那么如何通过二...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息