U8知识库文档的客户化开发中经常会遇到客户化的单需要生成凭证,标准单据生成凭证,本文即介绍如何使用U8快速开发工具完成两种参照生单的开发。目标本文主要介绍基于快速开发工具,通过脚本预置+插件开发的方式完成生成凭证功能。客户化开发单据生成凭证1.添加自定义按钮操作步骤详见《U8产业链_快速开发工具_基础介绍.docx》中的“增加自定义按钮”章节。本文接续之前的介绍在UA_Menu表加记录在ufsystem..ua_idt表加记录在sa_menuconfig表加记录在sa_toolbarconfig表加记录--BEGIN创建菜单脚本deleteUA_Menuwherecmenu_name='发货单制单'andcsub_id='AR'GOinsertintoUA_Menu([cMenu_Id],[cMenu_Name],[cMenu_Eng],[cSub_Id],[IGrade],[cSupMenu_Id],[bEndGrade],[cAuth_Id],[iOrder],[iImgIndex],[Paramters],[Depends],[Flag],[IsWebFlag])values('AR109','发货单制单',Null,'AR',1,'AR','0',Null,900,2,Null,Null,Null,Null)deleteUA_Menuwherecmenu_name='发货单制单处理'andcsub_id='AR'GOinsertintoUA_Menu([cMenu_Id],[cMenu_Name],[cMenu_Eng],[cSub_Id],[IGrade],[cSupMenuU8知识库文档],[bEndGrade],[cAuth_Id],[iOrder],[iImgIndex],[Paramters],[Depends],[Flag],[IsWebFlag])values('AR10901','发货单制单处理',Null,'AR',2,'AR109','1','AR10901',910,4,Null,Null,Null,Null)--------------------------------当前工具版本V4.00.0011脚本创建时间:2012-09-189:34:52-------创建菜单脚本GO--ENDdeletefromufsystem..ua_idtwhereid='AR10901'GOinsertintoufsystem..ua_idt([id],[assembly],[catalogtype],[type],[class],[entrypoint],[parameter],[reserved])values('AR10901','EFMain.clsProductFacade',0,0,Null,Null,Null,Null)--deletefromsa_menuconfigwhereparameters='AR10901'GOinsertintosa_menuconfig([menuid],[helpid],[functionid],[parameters],[toolbarname],[authid],[defaultstr],[condition])values('AR10901',Null,'voucherlist','AR10901','AR10901_list',Null,Null,Null)--deletefromsa_toolbarconfigwheretblkey='AR10901_list'GOinsertintosa_toolbarconfig([tblkey],[imageid],[keydownapplytask],[keyupfreetask],[buttonkey],[buttoncaptionresid],[tooltiptextresid],[buttonstyle],[inivisible],[inienable],[buttonindex],[subindex],[hotshift],[hotkeycode],[hotkeystate],[editenable],[buttonparas],[downstatus],[upstatus],[errstatus],[buttontag],[grouptype])values('AR10901_list','16',Null,Null,'refresh','U8.SA.xsglsql.01.frmbillvouch.00290','U8.SA.xsglsql.01.frmbillvouch.00291','0',1,1,22,Null,2,'82','Ctrl+R','0',Null,'0',Null,Null,'Refresh','iAssistant')insertintosa_toolbarconfig([tblkey],[imageid],[keydownapplytask],[keyupfreetask],[buttonkeyU8知识库文档],[buttoncaptionresid],[tooltiptextresid],[buttonstyle],[inivisible],[inienable],[buttonindex],[subindex],[hotshift],[hotkeycode],[hotkeystate],[editenable],[buttonparas],[downstatus],[upstatus],[errstatus],[buttontag],[grouptype])values('AR10901_list','36',Null,Null,'help','U8.SA.xsglsql.01.frmbillvouch.00293','U8.SA.xsglsql.01.frmbillvouch.00294','0',1,1,23,Null,0,'112',Null,'0',Null,'0',Null,Null,'Help','iAssistant')----生成凭证insertintosa_toolbarconfig([tblkey],[imageid],[keydownapplytask],[keyupfreetask],[buttonkey],[buttoncaptionresid],[tooltiptextresid],[buttonstyle],[inivisible],[inienable],[buttonindex],[subindex],[hotshift],[hotkeycode],[hotkeystate],[editenable],[buttonparas],[downstatus],[upstatus],[errstatus],[buttontag],[grouptype])values('AR10901_list','13',Null,Null,'SendCreatePZ','生成凭证','生成凭证','0',1,1,13,Null,0,'112',Null,'0',Null,'0',Null,Null,'incomplete_tsk','iAssistant')--参考附件:参照生单按钮.sql2.创建发货单制单列表创建只有单据列表的操作参考《U8产业链_快速开发工具_基础介绍.docx》中的“创建单据列表”章节。本文以“发货单制单列表”为例。领料申请单参照列表---删除栏目缓存信息begin--U8知识库文档='AR10901'GOdeleteAA_ColumnDicCache_Detailwhereckey='AR10901'GOdeleteaa_columnset_basewhereckey='AR10901'GO---删除栏目缓存信息end–deletesa_voucherlistconfigwhereckey='AR10901'GOinsertintosa_voucherlistconfig([ckey],[listfrom],[defaultfilter],[filtername],[subsysid],[columnkey],[menuid],[maintbl],[detailtbl],[mainkey],[detailkey],[showsumoption],[canmodify])values('AR10901','Sales_FHDPZ_TinnerjoinSales_FHDPZ_WonSales_FHDPZ_T.dlid=Sales_FHDPZ_W.dlid',Null,'SA[AddPZ]01','','AR10901',Null,'Sales_FHDPZ_T','Sales_FHDPZ_W',NULL,NULL,'1','0')--InsertintotheTableaa_busobject_basedeleteaa_busobject_basewherecbusobid='AR10901'GOinsertintoaa_busobject_base([cBusObId],[cBusObName],[iAuthType],[bAuthControl],[cSub_Id],[cMark],[iFuncType],[langid],[iOrder],[bLocked],[cLockedBy],[bNoAuth])values('AR10901','listofdeliverydocument',1,'0','SA',Null,2,'en-US',1,'0',Null,'0')insertintoaa_busobject_base([cBusObId],[cBusObName],[iAuthType],[bAuthControl],[cSub_Id],[cMark],[iFuncType],[langid],[iOrder],[bLocked],[cLockedBy],[bNoAuth])values('AR10901','发货单制单处理',1,'0','SA',Null,2,'zh-CN',1,'0',Null,'0')insertintoaa_busobject_base([cBusObId],[cBusObName],[iAuthType],[bAuthControl],[cSub_Id],[cMark],[iFuncType],[langid],[iOrder],[bLocked],[cLockedBy],[bNoAuth])values('AR10901','發貨單制單处理',1,'0','SA',Null,2,'zh-TW',1,'0',Null,'0')--InsertintotheTableaa_columndic_baseU8知识库文档='AR10901'GOinsertintoaa_columndic_base([cKey],[cFld],[cQryField],[iColPos],[cCaption],[cCaptionPar],[bFixed],[bDisp],[iColWidth],[iAlign],[cOrder],[bLock],[iMergeCols],[bMustSel],[bNeedSum],[LocaleID],[IsEnum],[EnumType],[EnumTypeString],[bFilter],[bMerge],[CanModify],[ReferType],[bHideInColSet],[cSumType])values('AR10901','selcol','s