K3 WISE 11.0工业单据插入按钮
最近从新对工业单据的按钮插入进行了复习,发现了几个以前没有总结的知识点,先对其进行总结如下:
1.首先,关于工业单据关联按钮的关联数据表
select * from t_MenuToolBar --菜单按钮的全部集合 select * from t_MenuFunctionMapping --功能未知 select * from t_BandToolMapping --按钮类型关联的业务表关系 select * from IclistTemplate --序时簿单据的编号及按钮信息
2.插入按钮功能信息表 t_MenuToolBar
insert into t_MenuToolBar ( FToolID,FName,FCaption ,FCaption_CHT,FCaption_EN,FImageName,FToolTip,FToolTip_CHT ,FToolTip_EN,FControlType,FVisible,FEnable,FChecked,FShortCut ,FCBList,FCBList_CHT,FCBList_EN,FCBStyle,FCBWidth,FIndex ,FToolCaption,FToolCaption_CHT,FToolCaption_EN) values (18000,'FMenuPrXout','套打出库','套打出库','套打出库','40' ,'套打出库','套打出库','套打出库',0,0,1,0,0,'','','',0,0,0 ,'套打出库','套打出库','套打出库') --其中主要关注:FToolID是按钮的序号信息,FName:按钮的索引名称
3.插入单据关联按钮的关系表 t_BandToolMapping
insert into t_BandToolMapping (FID,FBandID,FToolID,FSubBandID,FIndex,FComName,FBeginGroup) values (82,53,18000,0,200,'|Cai_Xout_PlgIn.PrintXoutBill',1) --FIndex决定按钮的排序前后,可根据数据库中的数据进行自主定义大小 --FBandID同类单据是同一个指数 例如入库单 出库单均为ICSTOCKBILL 可以直接插入该按钮控件即可 --FID是IclistTemplate的FMENUID字段的值
4.在相关工业单据的序时簿按钮处,更新你添加的按钮即可显示 IclistTemplate
Update IclistTemplate set FLogicStr=' H:ModifyQty,OrderAffirm,OrderAppend,ViewCAV,ViewFee,ViewContract,HookBill,UnHookBill,ReHookBill,UnReHookBill,Union,MakeDown,ReMakeDown,Complete,ReComplete,MakeMaterialGet,MakeLowerBills,CheckBOM,ViewMaterialDiff,ViewMaterial,LockStock,UnLockStock,Diminution,UnDiminution,ATPQuery,LockQuery|V:|FModule:1090|FModelDetail:1|V:FMenuPrXout' where FID =8 --其中按钮添加一般是视图添加,需要在字段中添加 --V:前面定义的按钮索引名称
完成后,重新进入工业单据的序时簿界面即可,通过按钮的添加可以实现很多第三方程序的调用,从而改善现有K3低版本功能的限制,例如出库单二维码的打印、PDF生成、集成调用等等功能。
插入按钮实例:
select * from t_MenuToolBar where ftoolid=12000 insert into t_MenuToolBar(FToolID,FName,FCaption,FCaption_EN,FCaption_CHT,FImageName,FToolTip,FToolTip_CHT,FToolTip_EN,FControlType,FVisible,FEnable,FChecked,FShortCut,FCBList,FCBList_CHT,FCBList_EN,FCBStyle,FCBWidth ,FIndex,FToolCaption,FToolCaption_CHT,FToolCaption_EN) values(12000,'mnuPushWms','推送WMS','推送WMS','推送WMS',40,'推送WMS','推送WMS','推送WMS',0,0,1,0,0,'','','',0,0,0,'推送WMS','推送WMS','推送WMS') select * from t_BandToolMapping where FToolID=12000 select * from t_MenuToolBar --菜单按钮的全部集合 select * from t_MenuFunctionMapping --功能未知 select * from t_BandToolMapping where fbandid=53 --按钮类型关联的业务表关系 select * from IclistTemplate where fname like '%调拨%' --序时簿单据的编号及按钮信息 select * from ictransactiontype update t_BandToolMapping set fbandid=53 where FToolID=12000 --采购入库 insert into t_BandToolMapping(FID,FBandID,FToolID ,FSubBandID,FIndex ,FComName ,FBeginGroup) values(82,53,12000,0,10,'|pw_WMS_PlgIn.clsPushWmsList',1) --select FLogicStr from ICListTemplate where FID= '1' update ICListTemplate set FLogicStr = ' H:ModifyQty,OrderAffirm,OrderAppend,ViewCAV,ViewFee,ViewContract,HookBill,UnHookBill,ReHookBill,UnReHookBill,Union,MakeDown,ReMakeDown,Complete,ReComplete,MakeMaterialGet,CheckBOM,MakeLowerBills,ViewMaterialDiff,ViewMaterial,LockStock,UnLockStock,Diminution,UnDiminution,ATPQuery,LockQuery|V:mnuPushWms|FModule:1089|FModelDetail:1' where FID= '1' --委外入库单 --select FLogicStr from ICListTemplate where FID= '5' update ICListTemplate set FLogicStr = 'H:ModifyQty,OrderAffirm,OrderRefuse,OrderAppend,ViewContract,HookBill,UnHookBill,ReHookBill,UnReHookBill,Union,MakeDown,ReMakeDown,Complete,ReComplete,MakeMaterialGet,MakeLowerBills,CheckBOM,ViewMaterialDiff,ViewMaterial,LockStock,UnLockStock,Diminution,UnDiminution,ATPQuery,LockQuery|V:SubsVer,UndoSubsVer,VerType,mnuPushWms|FModule:1089|FModelDetail:3' where FID= '5' --委外出库 --select FLogicStr from ICListTemplate where FID= '15' update ICListTemplate set FLogicStr = 'H:ModifyQty,OrderAffirm,OrderRefuse,OrderAppend,ViewHookBill,HookBill,UnHookBill,ReHookBill,UnReHookBill,ViewFee,ViewContract,Union,MakeDown,ReMakeDown,Complete,ReComplete,MakeMaterialGet,MakeLowerBills,CheckBOM,ViewMaterialDiff,ViewMaterial,LockStock,UnLockStock,Diminution,UnDiminution,ATPQuery,LockQuery|FModule:1090|FModelDetail:3' where FID= '15' --select FLogicStr from ICListTemplate where FID= '1' --生产领料 update ICListTemplate set FLogicStr = 'H:ModifyQty,OrderAffirm,OrderRefuse,OrderAppend,ViewCAV,ViewFee,ViewContract,ViewHookBill,HookBill,UnHookBill,ReHookBill,UnReHookBill,KickBackBill,UndoKickBackBill,Union,MakeDown,ReMakeDown,Complete,ReComplete,UnionBill,SplitBill,MakeMaterialGet,MakeLowerBills,CheckBOM,ViewMaterialDiff,ViewMaterial,LockStock,UnLockStock,Diminution,UnDiminution,ATPQuery,LockQuery|V:mnuPushWms|FModule:1090|FModelDetail:2' where FID= '11' --调拨单 select * from t_BandToolMapping where FID=82 update ICListTemplate set FLogicStr = 'H:ModifyQty,OrderAffirm,OrderRefuse,OrderAppend,ViewCAV,ViewFee,ViewContract,ViewHookBill,HookBill,UnHookBill,ReHookBill,UnReHookBill,KickBackBill,UndoKickBackBill,Union,MakeDown,ReMakeDown,Complete,ReComplete,UnionBill,SplitBill,MakeMaterialGet,MakeLowerBills,CheckBOM,ViewMaterialDiff,ViewMaterial,LockStock,UnLockStock,Diminution,UnDiminution,ATPQuery,LockQuery|V:mnuPushWms|FModule:1088|FModelDetail:30' where FID= '18' select * from t_ThirdPartyComponent where FTypeDetailID=24 --采购入库 insert into t_ThirdPartyComponent values (0,1,11000,'pw_WMS_PlgIn.billPushWms','','') --委外入库单 insert into t_ThirdPartyComponent values (0,5,11000,'pw_WMS_PlgIn.billPushWms','','') --委外出库 insert into t_ThirdPartyComponent values (0,28,11000,'pw_WMS_PlgIn.billPushWms','','') --生产领料 insert into t_ThirdPartyComponent values (0,24,11000,'pw_WMS_PlgIn.billPushWms','','')