https://vip.kingdee.com/link/s/lHB5p
https://vip.kingdee.com/link/s/lHP9c
二开案例--销售订单物料变化后更改供应组织并取对应组织的BOM版本号
https://vip.kingdee.com/link/s/lHPnG
https://vip.kingdee.com/link/s/lHOwt
案例 – 寄售结算单只在列表上审核时,需检查价格
代码来源
Kingdee.K3.SCM.App.Sal.ServicePlugIn.ConsignSettle.Audit
需求背景
寄售结算单,在单据查看界面进行审核时,已经检查了价格,在审核操作时,无需再此检查;但是,在列表上进行审核时,则需要在审核操作中,特别检查价格。
实现方案
在单据查看界面,检查完价格之后,调用审核操作之前,把一个标志变量IsFromBill,放到Option中。
审核插件执行时,判断Option中的IsFromBill标志变量值,如果为true,则不检查价格;
关键字
操作附加参数传递 操作定制参数传递
示例代码
C# | |
using System; using System.Collections.Generic; using System.Linq; using System.Text;
using Kingdee.BOS.Core.DynamicForm.PlugIn; using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
namespace Kingdee.K3.SCM.App.Sal.ServicePlugIn.ConsignSettle { public class Audit : AbstractOperationServicePlugIn { public override void OnPreparePropertys(PreparePropertysEventArgs e) { e.FieldKeys.Add("FPrice"); e.FieldKeys.Add("FTaxPrice"); e.FieldKeys.Add("FPriceUnitId"); e.FieldKeys.Add("FTaxNetPrice"); e.FieldKeys.Add("FLimitDownPrice"); e.FieldKeys.Add("FIsIncludedTax"); e.FieldKeys.Add("FMaterialId"); e.FieldKeys.Add("FUnitId"); e.FieldKeys.Add("FSettleCurrId"); e.FieldKeys.Add("FIsFree"); e.FieldKeys.Add("FPriceCoefficient"); }
public override void OnAddValidators(AddValidatorsEventArgs e) { bool isFromBill = this.Option.GetVariableValue<bool>("IsFromBill", false); if ( !isFromBill) { Kingdee.K3.SCM.App.Sal.ServicePlugIn.SaleOrder.SaleLimitPriceCtrlValidator salePrice = new Kingdee.K3.SCM.App.Sal.ServicePlugIn.SaleOrder.SaleLimitPriceCtrlValidator(); salePrice.AlwaysValidate = true; salePrice.EntityKey = "FBillHead"; salePrice.PriceCtrlTime = "AUDIT"; salePrice.BillFormID = "SAL_ConsignmentSettle"; salePrice.OrderEntryName = "SAL_CONSIGSETTLEENTRY"; salePrice.OrderFinancialEntryName = "SaleCconsignSettleFinance"; e.Validators.Add(salePrice); } } } } |
推荐阅读