1, implement the following two interfaces,
(1) Idaptransformadapter and Ipcatransformadapter,
(2) Front desk registration Dapadaptor,
(3) Each row of the query table must have a value of company.id
1 Package Com.kingdee.eas.re.sales.inTransfer.web;2 3 import Com.kingdee.bos.Context;4 import Com.kingdee.bos.metadata.bot.BOTMappingInfo;5 import Com.kingdee.bos.webframework.component.dap.IDAPTransformAdapter;6 import Com.kingdee.bos.webframework.context.WafContext;7 import Com.kingdee.eas.base.dap.DAPTransformResult;8 import com.kingdee.eas.fdc.sales.IncomeTransferCollection;9 import com.kingdee.eas.fdc.sales.IncomeTransferFactory;Ten import Com.kingdee.eas.fi.cas.utils.CASWebUtil; One A Public class Intransferdatptransformadapter implements Idaptransformadapter { - -PublicvoidAfterdaptrans (Botmappinginfo mappinginfo, the Daptransformresult Dapresult) throws Exception { - //TODO auto-generated Method Stub - - } + -PublicBooleanBeforedap (String IDs) throws Exception { + //TODO auto-generated Method Stub A return true; at } - -PublicBooleanIsneedshowdaprule () { - //TODO auto-generated Method Stub - return true; - } in -}
1 Package Com.kingdee.eas.re.sales.inTransfer.web;2 3 import Com.kingdee.bos.metadata.bot.BOTMappingInfo;4 import Com.kingdee.bos.webframework.component.dap.IPCATransformAdapter;5 import Com.kingdee.eas.base.dap.DAPTransformResult;6 7 Public class Intransferpcatransformadapter implements Ipcatransformadapter {8 9PublicvoidAfterpcatrans (Botmappinginfo mappinginfo,Ten Daptransformresult Dapresult) throws Exception { One //TODO auto-generated Method Stub A - } - thePublicBooleanBEFOREPCA (String bills) throws Exception { - //TODO auto-generated Method Stub - return true; - } + -PublicBooleanIsneedshowpcarule () { + //TODO auto-generated Method Stub A return true; at } - -}
The front page loads after registering these two classes
1 varDapadaptor = "Com.kingdee.eas.re.sales.inTransfer.web.InTransferDATPTransformAdapter"; 2 varPcaadaptor = "Com.kingdee.eas.re.sales.inTransfer.web.InTransferPCATransformAdapter"; 3 if(WAF ("#dap") && WAF ("#dap"). Length > 0 &&dapadaptor) { 4WAF ("#dap"). DAP ("option", "Mainorgname", "Company.id"); 5WAF ("#dap"). DAP ("option", "Daptransformadapter", Dapadaptor); 6WAF ("#dap"). DAP ("option", "Pcatransformadapter", Pcaadaptor); 7}
2, Code popup voucher multi-rule selection interface (or direct button binding to generate credential function)
1url = "/easweb/component/dap.do?method=actionvoucher&billids=" +id (need to generate voucher for this document ID) + "&daptransformadapter= Com.kingdee.eas.re.sales.intransfer.web.intransferdatptransformadapter&modelorgvalue= "+company.id (company ID) +" &mainorgunit= "+company.id (company ID) +" &mainorgtype=sale&waf2skin=easbase "; 2 Waf.window.open ({3 Url:url,4OpenType: "iframe",5Method: ' POST ', 6 data:{7 Billids:id, (need to generate voucher for this document ID)8 ModelOrgValue:company.id, (company ID)9Daptransformadapter: ' Com.kingdee.eas.re.sales.inTransfer.web.InTransferDATPTransformAdapter '}, TenModaltrue, OneOpenfromparent:false, ATitle: "Generate voucher", -Showtitlebar:true, -Position: ' Center ', thewidth:500, -height:400, -minheight:500, -minwidth:640, +ICONCLS: "Ui-icon-winicon", -Draggable:true, +Resizable:false, AHideeffect: "Slide", atClosefunction(event, UI) { - //close the callback function of the interface - }, -Opencompleted:function(Event, UI) { }?
Generate voucher-enable multiple Rule popup selection box interface