K_3开发积累 联系客服

发布时间 : 星期一 文章K_3开发积累更新完毕开始阅读d3a77c3067ec102de3bd8905

fVersion, fImport, fBrNo, fUserDefilast, fType, fGrType)

Select '3020', 'HPrice', '物料价格', 't_ItemPrice', 0, 0, 0, 100, 1, 0

--Drop table t_ItemPrice

if Not Exists(Select 1 from sysObjects where Name = 't_ItemPrice') CREATE TABLE t_ItemPrice(

Delete t_ItemPropDesc where fItemClassID = 3020 INSERT INTO t_ItemPropDesc

(FItemClassID,FPropID,FName,FSQLColumnName,FDataType,FPrecision,FScale,FActualType,FActualSize,FBehavior,FSearch,FSrcTable,FSrcField,FDisplayField,FDefaultValue,FPageName,FComCall,FIsShownList)

VALUES (3020, 101, '物料', 'fSysItemID', 3, 0, 0, 3, 0, NULL, 4, 't_Item', 'FItemID', 'FName', '0', '1.基本资料', NULL, 0) INSERT INTO t_ItemPropDesc

(FItemClassID,FPropID,FName,FSQLColumnName,FDataType,FPrecision,FScale,FActualType,FActualSize,FBehavior,FSearch,FSrcTable,FSrcField,FDisplayField,FDefaultValue,FPageName,FComCall,FIsShownList)

VALUES (3020, 102, '单价', 'fItemPrice', 6, 0, 0, 6, 0, NULL, 0, NULL, NULL, NULL, NULL, '1.基本资料', NULL, 0) INSERT INTO t_ItemPropDesc

(FItemClassID,FPropID,FName,FSQLColumnName,FDataType,FPrecision,FScale,FActualType,FActualSize,FBehavior,FSearch,FSrcTable,FSrcField,FDisplayField,FDefaultValue,FPageName,FComCall,FIsShownList)

VALUES (3020, 103, '最低单价', 'fItemLowPrice', 6, 0, 0, 6, 0, NULL, 0, NULL, NULL, NULL, NULL, '1.基本资料', NULL, 0) go

if Not Exists(Select 1 from sysColumns Where Name = 'fItemPrice' and ID in (Select ID from sysObjects Where Name = 't_ItemPrice') ) Begin go

Alter Table t_ItemDetail Add fItemPrice int not null default(0) Create Index ix_ItemDetail_fItemPrice On t_ItemDetail(fItemPrice) FItemID int NOT NULL, fSysItemID int, fItemPrice money, fItemLowPrice money, FModifyTime TIMESTAMP ,

CONSTRAINT pk_t_Item_3020 PRIMARY KEY (FItemID))

END

if not exists(Select 1 from t_ObjectType where fObjectID = 3020 and FObjectType = 3)

insert t_ObjectType(FObjectType,FObjectID,FName,FDescription)

values(3,3020,'物料价格','')

if not Exists(Select 1 from t_objectaccess where fObjectType = 3 and fObjectID = 3020) insert t_objectaccess

select fgroupid,3,3020,findex from t_objectaccess where fobjecttype=3 and fobjectid=20;

if not Exists(Select 1 from t_objectAccessType where fObjectType = 3 and fObjectID = 3020)

insert t_objectAccessType

Select 3,3020,FIndex,FAccessMask,FAccessUse,FName,FDescription from t_ObjectAccessType where fobjecttype=3 and fobjectid=20 go

if Not Exists(Select 1 from t_BaseProperty where fItemID = 3020 and FTypeID = 2)

Insert Into t_BaseProperty(FTypeID, FItemID, FCreateDate, FCreateUser, FLastModDate, FLastModUser, FDeleteDate, FDeleteUser)

Values(2, 3020, GetDate(), 'Administrator', Null, Null, Null, Null) go

21. 新增辅助资料

Delete from t_SubMesType where fName = '票务角色'

insert t_SubMesType (FTypeID,FName,FDetail,FType,FGRType) values ( 810,'票务角色',NULL,1,0) Go

Delete from t_SubMessage where fTypeID = 810 insert t_SubMessage (FBrNo,FInterID,FID,FParentID,FName,FTypeID,FDetail,FDeleted,FSystemType,FSpec) values ( '0',30001,'01',804,'售票员',810,0,0,1,NULL) insert t_SubMessage (FBrNo,FInterID,FID,FParentID,FName,FTypeID,FDetail,FDeleted,FSystemType,FSpec) values ( '0',30002,'02',804,'售票主管',810,0,0,1,NULL) insert t_SubMessage (FBrNo,FInterID,FID,FParentID,FName,FTypeID,FDetail,FDeleted,FSystemType,FSpec) values ( '0',30003,'02',804,'商场(展厅)经理',810,0,0,1,NULL)