EG: 在库存模块新加一个numberSequences.
1. 新加一个EDT\ SML_Test1;
2. 在库存模块的
class\NumberSeqReference_Inventory\LoadModule
加SML_Test1编码的初始化代码
numRef.DataTypeId = typeId2ExtendedTypeId(typeid(SML_Test1));
numRef.ReferenceHelp = literalstr("SML test1");
numRef.ReferenceLabel = literalstr("SML test1");
numRef.WizardContinuous = false;
numRef.WizardManual = NoYes::No;
numRef.WizardAllowChangeDown = NoYes::No;
numRef.WizardAllowChangeUp = NoYes::No;
numRef.WizardLowest = 0;
numRef.WizardHighest = maxint();
numRef.SortField = 600;
this.create(numRef);
3.基本设置\设置\编号规则\编号规则 –> 点“向导"按钮,设置SML_Test1编号规则
4.在库存管理模块\设置\参数设置\编号规则,检查此处编号规则已经产生。
5.编号规则的调用方式
static void SMLTestNumSeq(Args _args)
{
SML_Test1 test1;
NumberSequenceReference NumberSeqReference;
NumberSeq numberSeq;
; NumberSeqReference = NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(SML_Test1)));
numberSeq = NumberSeq::newGetNum(NumberSeqReference, true, false);
test1 = numberSeq.num(); info(test1);
}