301f07b4b06f4beb41df492b4b91e6ca46d70f2f.svn-base 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. /**
  2. * output package name
  3. */
  4. package com.kingdee.eas.custom.bill.salary.client;
  5. import org.apache.log4j.*;
  6. import java.awt.*;
  7. import java.awt.event.*;
  8. import java.util.*;
  9. import javax.swing.border.*;
  10. import javax.swing.BorderFactory;
  11. import javax.swing.event.*;
  12. import javax.swing.KeyStroke;
  13. import com.kingdee.bos.ctrl.swing.*;
  14. import com.kingdee.bos.ctrl.kdf.table.*;
  15. import com.kingdee.bos.ctrl.kdf.data.event.*;
  16. import com.kingdee.bos.dao.*;
  17. import com.kingdee.bos.dao.query.*;
  18. import com.kingdee.bos.metadata.*;
  19. import com.kingdee.bos.metadata.entity.*;
  20. import com.kingdee.bos.ui.face.*;
  21. import com.kingdee.bos.ui.util.ResourceBundleHelper;
  22. import com.kingdee.bos.util.BOSUuid;
  23. import com.kingdee.bos.service.ServiceContext;
  24. import com.kingdee.jdbc.rowset.IRowSet;
  25. import com.kingdee.util.enums.EnumUtils;
  26. import com.kingdee.bos.ui.face.UIRuleUtil;
  27. import com.kingdee.bos.ctrl.swing.event.*;
  28. import com.kingdee.bos.ctrl.kdf.table.event.*;
  29. import com.kingdee.bos.ctrl.extendcontrols.*;
  30. import com.kingdee.bos.ctrl.kdf.util.render.*;
  31. import com.kingdee.bos.ui.face.IItemAction;
  32. import com.kingdee.eas.framework.batchHandler.RequestContext;
  33. import com.kingdee.bos.ui.util.IUIActionPostman;
  34. import com.kingdee.bos.appframework.client.servicebinding.ActionProxyFactory;
  35. import com.kingdee.bos.appframework.uistatemanage.ActionStateConst;
  36. import com.kingdee.bos.appframework.validator.ValidateHelper;
  37. import com.kingdee.bos.appframework.uip.UINavigator;
  38. /**
  39. * output class name
  40. */
  41. public abstract class AbstractSalaryBagListUI extends com.kingdee.eas.hr.base.client.HRBillListUI
  42. {
  43. private static final Logger logger = CoreUIObject.getLogger(AbstractSalaryBagListUI.class);
  44. protected ActionTDPrint actionTDPrint = null;
  45. protected ActionTDPrintPreview actionTDPrintPreview = null;
  46. public final static String STATUS_VIEW = "VIEW";
  47. /**
  48. * output class constructor
  49. */
  50. public AbstractSalaryBagListUI() throws Exception
  51. {
  52. super();
  53. this.defaultObjectName = "mainQuery";
  54. jbInit();
  55. initUIP();
  56. }
  57. /**
  58. * output jbInit method
  59. */
  60. private void jbInit() throws Exception
  61. {
  62. this.resHelper = new ResourceBundleHelper(AbstractSalaryBagListUI.class.getName());
  63. this.setUITitle(resHelper.getString("this.title"));
  64. mainQueryPK = new MetaDataPK("com.kingdee.eas.custom.bill.salary.app", "SalaryBagQuery");
  65. //actionRemove
  66. String _tempStr = null;
  67. actionRemove.setEnabled(true);
  68. actionRemove.setDaemonRun(false);
  69. actionRemove.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl D"));
  70. _tempStr = resHelper.getString("ActionRemove.SHORT_DESCRIPTION");
  71. actionRemove.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  72. _tempStr = resHelper.getString("ActionRemove.LONG_DESCRIPTION");
  73. actionRemove.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  74. _tempStr = resHelper.getString("ActionRemove.NAME");
  75. actionRemove.putValue(ItemAction.NAME, _tempStr);
  76. this.actionRemove.setBindWorkFlow(true);
  77. this.actionRemove.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  78. this.actionRemove.addService(new com.kingdee.eas.framework.client.service.NetFunctionService());
  79. this.actionRemove.addService(new com.kingdee.eas.framework.client.service.UserMonitorService());
  80. //actionAudit
  81. actionAudit.setEnabled(true);
  82. actionAudit.setDaemonRun(false);
  83. actionAudit.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl A"));
  84. _tempStr = resHelper.getString("ActionAudit.SHORT_DESCRIPTION");
  85. actionAudit.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  86. _tempStr = resHelper.getString("ActionAudit.LONG_DESCRIPTION");
  87. actionAudit.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  88. _tempStr = resHelper.getString("ActionAudit.NAME");
  89. actionAudit.putValue(ItemAction.NAME, _tempStr);
  90. this.actionAudit.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  91. //actionUnaudit
  92. actionUnaudit.setEnabled(true);
  93. actionUnaudit.setDaemonRun(false);
  94. actionUnaudit.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl U"));
  95. _tempStr = resHelper.getString("ActionUnaudit.SHORT_DESCRIPTION");
  96. actionUnaudit.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  97. _tempStr = resHelper.getString("ActionUnaudit.LONG_DESCRIPTION");
  98. actionUnaudit.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  99. _tempStr = resHelper.getString("ActionUnaudit.NAME");
  100. actionUnaudit.putValue(ItemAction.NAME, _tempStr);
  101. this.actionUnaudit.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  102. //actionTDPrint
  103. this.actionTDPrint = new ActionTDPrint(this);
  104. getActionManager().registerAction("actionTDPrint", actionTDPrint);
  105. this.actionTDPrint.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  106. //actionTDPrintPreview
  107. this.actionTDPrintPreview = new ActionTDPrintPreview(this);
  108. getActionManager().registerAction("actionTDPrintPreview", actionTDPrintPreview);
  109. this.actionTDPrintPreview.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  110. // CoreUI
  111. String tblMainStrXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><DocRoot xmlns:c=\"http://www.kingdee.com/Common\" xmlns:f=\"http://www.kingdee.com/Form\" xmlns:t=\"http://www.kingdee.com/Table\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.kingdee.com/KDF KDFSchema.xsd\" version=\"0.0\"><Styles><c:Style id=\"sCol0\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol2\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol9\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol12\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol13\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol14\"><c:NumberFormat>&amp;date</c:NumberFormat></c:Style><c:Style id=\"sCol15\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol16\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol17\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol18\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol20\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol21\"><c:NumberFormat>&amp;date</c:NumberFormat></c:Style><c:Style id=\"sCol22\"><c:NumberFormat>&amp;date</c:NumberFormat></c:Style><c:Style id=\"sCol23\"><c:NumberFormat>&amp;date</c:NumberFormat></c:Style></Styles><Table id=\"KDTable\"><t:Sheet name=\"sheet1\"><t:Table t:selectMode=\"15\" t:mergeMode=\"0\" t:dataRequestMode=\"0\" t:pageRowCount=\"100\"><t:ColumnGroup><t:Column t:key=\"id\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol0\" /><t:Column t:key=\"number\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /><t:Column t:key=\"applier.id\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"2\" t:styleID=\"sCol2\" /><t:Column t:key=\"applier.name\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"3\" /><t:Column t:key=\"adminOrgUnit.id\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"4\" /><t:Column t:key=\"adminOrgUnit.displayName\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"5\" /><t:Column t:key=\"applyDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"6\" /><t:Column t:key=\"billState\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"7\" /><t:Column t:key=\"bizDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"8\" /><t:Column t:key=\"hrOrgUnit.id\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"9\" t:styleID=\"sCol9\" /><t:Column t:key=\"hrOrgUnit.name\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"10\" /><t:Column t:key=\"description\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"11\" /><t:Column t:key=\"approveType\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol12\" /><t:Column t:key=\"adminOrgUnit.name\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol13\" /><t:Column t:key=\"entrys.months\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol14\" /><t:Column t:key=\"entrys.moneys\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol15\" /><t:Column t:key=\"entrys.beforeAmount\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol16\" /><t:Column t:key=\"entrys.reissueAmount\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol17\" /><t:Column t:key=\"entrys.amountPayable\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol18\" /><t:Column t:key=\"person.name\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /><t:Column t:key=\"money\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol20\" /><t:Column t:key=\"startDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol21\" /><t:Column t:key=\"endDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol22\" /><t:Column t:key=\"reissueDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol23\" /><t:Column t:key=\"status\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /></t:ColumnGroup><t:Head><t:Row t:name=\"head\" t:height=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\"><t:Cell>$Resource{id}</t:Cell><t:Cell>$Resource{number}</t:Cell><t:Cell>$Resource{applier.id}</t:Cell><t:Cell>$Resource{applier.name}</t:Cell><t:Cell>$Resource{adminOrgUnit.id}</t:Cell><t:Cell>$Resource{adminOrgUnit.displayName}</t:Cell><t:Cell>$Resource{applyDate}</t:Cell><t:Cell>$Resource{billState}</t:Cell><t:Cell>$Resource{bizDate}</t:Cell><t:Cell>$Resource{hrOrgUnit.id}</t:Cell><t:Cell>$Resource{hrOrgUnit.name}</t:Cell><t:Cell>$Resource{description}</t:Cell><t:Cell>$Resource{approveType}</t:Cell><t:Cell>$Resource{adminOrgUnit.name}</t:Cell><t:Cell>$Resource{entrys.months}</t:Cell><t:Cell>$Resource{entrys.moneys}</t:Cell><t:Cell>$Resource{entrys.beforeAmount}</t:Cell><t:Cell>$Resource{entrys.reissueAmount}</t:Cell><t:Cell>$Resource{entrys.amountPayable}</t:Cell><t:Cell>$Resource{person.name}</t:Cell><t:Cell>$Resource{money}</t:Cell><t:Cell>$Resource{startDate}</t:Cell><t:Cell>$Resource{endDate}</t:Cell><t:Cell>$Resource{reissueDate}</t:Cell><t:Cell>$Resource{status}</t:Cell></t:Row></t:Head></t:Table><t:SheetOptions><t:MergeBlocks><t:Head /></t:MergeBlocks></t:SheetOptions></t:Sheet></Table></DocRoot>";
  112. this.tblMain.setFormatXml(resHelper.translateString("tblMain",tblMainStrXML));
  113. this.tblMain.putBindContents("mainQuery",new String[] {"id","number","applier.id","applier.name","adminOrg.id","adminOrg.displayName","applyDate","billState","bizDate","hrOrgUnit.id","hrOrgUnit.name","description","approveType","adminOrgUnit.name","entrys.months","entrys.moneys","entrys.beforeAmount","entrys.reissueAmount","entrys.amountPayable","person.name","money","startDate","endDate","reissueDate","status"});
  114. this.tblMain.checkParsed();
  115. this.tblMain.getGroupManager().setGroup(true);
  116. this.separatorFW2.setVisible(true);
  117. this.btnCreateTo.setVisible(false);
  118. this.btnTraceUp.setVisible(false);
  119. this.btnTraceDown.setVisible(false);
  120. this.btnVoucher.setVisible(false);
  121. this.btnDelVoucher.setVisible(false);
  122. this.btnAuditResult.setVisible(false);
  123. this.menuItemCreateTo.setVisible(false);
  124. this.menuItemCopyTo.setVisible(false);
  125. this.kDSeparator4.setVisible(false);
  126. this.menuItemTraceUp.setVisible(false);
  127. this.menuItemTraceDown.setVisible(false);
  128. this.kDSeparator6.setVisible(false);
  129. this.menuItemVoucher.setVisible(false);
  130. this.menuItemDelVoucher.setVisible(false);
  131. this.menuItemViewDoProccess.setVisible(false);
  132. this.menuItemAuditResult.setVisible(false);
  133. this.btnAudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionAudit, new Class[] { IItemAction.class }, getServiceContext()));
  134. this.btnAudit.setText(resHelper.getString("btnAudit.text"));
  135. this.btnAudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_audit"));
  136. this.btnAudit.setToolTipText(resHelper.getString("btnAudit.toolTipText"));
  137. this.btnUnaudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionUnaudit, new Class[] { IItemAction.class }, getServiceContext()));
  138. this.btnUnaudit.setText(resHelper.getString("btnUnaudit.text"));
  139. this.btnUnaudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_unaudit"));
  140. this.btnUnaudit.setToolTipText(resHelper.getString("btnUnaudit.toolTipText"));
  141. this.btnUnaudit.setVisible(false);
  142. this.btnUnaudit.setMnemonic(85);
  143. this.menuItemAudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionAudit, new Class[] { IItemAction.class }, getServiceContext()));
  144. this.menuItemAudit.setText(resHelper.getString("menuItemAudit.text"));
  145. this.menuItemAudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_audit"));
  146. this.menuItemAudit.setToolTipText(resHelper.getString("menuItemAudit.toolTipText"));
  147. this.menuItemAudit.setMnemonic(65);
  148. this.menuItemUnaudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionUnaudit, new Class[] { IItemAction.class }, getServiceContext()));
  149. this.menuItemUnaudit.setText(resHelper.getString("menuItemUnaudit.text"));
  150. this.menuItemUnaudit.setMnemonic(85);
  151. this.menuItemUnaudit.setToolTipText(resHelper.getString("menuItemUnaudit.toolTipText"));
  152. this.menuItemUnaudit.setVisible(false);
  153. this.menuItemUnaudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_unaudit"));
  154. //Register control's property binding
  155. registerBindings();
  156. registerUIState();
  157. }
  158. public com.kingdee.bos.ctrl.swing.KDToolBar[] getUIMultiToolBar(){
  159. java.util.List list = new java.util.ArrayList();
  160. com.kingdee.bos.ctrl.swing.KDToolBar[] bars = super.getUIMultiToolBar();
  161. if (bars != null) {
  162. list.addAll(java.util.Arrays.asList(bars));
  163. }
  164. return (com.kingdee.bos.ctrl.swing.KDToolBar[])list.toArray(new com.kingdee.bos.ctrl.swing.KDToolBar[list.size()]);
  165. }
  166. /**
  167. * output initUIContentLayout method
  168. */
  169. public void initUIContentLayout()
  170. {
  171. this.setBounds(new Rectangle(10, 10, 1013, 629));
  172. this.setLayout(new KDLayout());
  173. this.putClientProperty("OriginalBounds", new Rectangle(10, 10, 1013, 629));
  174. tblMain.setBounds(new Rectangle(10, 10, 996, 580));
  175. this.add(tblMain, new KDLayout.Constraints(10, 10, 996, 580, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_BOTTOM | KDLayout.Constraints.ANCHOR_LEFT | KDLayout.Constraints.ANCHOR_RIGHT));
  176. }
  177. /**
  178. * output initUIMenuBarLayout method
  179. */
  180. public void initUIMenuBarLayout()
  181. {
  182. this.menuBar.add(menuFile);
  183. this.menuBar.add(menuEdit);
  184. this.menuBar.add(MenuService);
  185. this.menuBar.add(menuView);
  186. this.menuBar.add(menuBiz);
  187. this.menuBar.add(menuWorkFlow);
  188. this.menuBar.add(menuTools);
  189. this.menuBar.add(menuHelp);
  190. //menuFile
  191. menuFile.add(menuItemAddNew);
  192. menuFile.add(menuItemImportData);
  193. menuFile.add(menuItemCloudFeed);
  194. menuFile.add(menuItemExportData);
  195. menuFile.add(menuItemCloudScreen);
  196. menuFile.add(separatorFile1);
  197. menuFile.add(menuItemCloudShare);
  198. menuFile.add(MenuItemAttachment);
  199. menuFile.add(kDSeparator1);
  200. menuFile.add(kdSeparatorFWFile1);
  201. menuFile.add(menuItemPageSetup);
  202. menuFile.add(menuItemPrint);
  203. menuFile.add(menuItemPrintPreview);
  204. menuFile.add(menuItemBatchPrint);
  205. menuFile.add(menuItemBatchPrintView);
  206. menuFile.add(kDSeparator2);
  207. menuFile.add(menuItemExitCurrent);
  208. //menuEdit
  209. menuEdit.add(menuItemEdit);
  210. menuEdit.add(menuItemRemove);
  211. menuEdit.add(kDSeparator3);
  212. menuEdit.add(menuItemCreateTo);
  213. menuEdit.add(menuItemCopyTo);
  214. menuEdit.add(kDSeparator4);
  215. //MenuService
  216. MenuService.add(MenuItemKnowStore);
  217. MenuService.add(MenuItemAnwser);
  218. MenuService.add(SepratorService);
  219. MenuService.add(MenuItemRemoteAssist);
  220. //menuView
  221. menuView.add(menuItemView);
  222. menuView.add(menuItemLocate);
  223. menuView.add(kDSeparator5);
  224. menuView.add(menuItemQuery);
  225. menuView.add(menuItemRefresh);
  226. menuView.add(menuItemSwitchView);
  227. menuView.add(separatorView1);
  228. menuView.add(menuItemTraceUp);
  229. menuView.add(menuItemTraceDown);
  230. menuView.add(menuItemQueryScheme);
  231. menuView.add(kDSeparator6);
  232. //menuBiz
  233. menuBiz.add(menuItemCancelCancel);
  234. menuBiz.add(menuItemCancel);
  235. menuBiz.add(menuItemVoucher);
  236. menuBiz.add(menuItemDelVoucher);
  237. menuBiz.add(menuTool);
  238. menuBiz.add(menuItemPCVoucher);
  239. menuBiz.add(menuItemAudit);
  240. menuBiz.add(menuItemDelPCVoucher);
  241. menuBiz.add(menuItemUnaudit);
  242. menuBiz.add(menuItemAbort);
  243. menuBiz.add(menuItemAbandon);
  244. //menuTool
  245. menuTool.add(menuItemSendMessage);
  246. menuTool.add(menuItemCalculator);
  247. menuTool.add(menuItemToolBarCustom);
  248. //menuWorkFlow
  249. menuWorkFlow.add(menuItemViewDoProccess);
  250. menuWorkFlow.add(menuItemMultiapprove);
  251. menuWorkFlow.add(menuItemWorkFlowG);
  252. menuWorkFlow.add(menuItemWorkFlowList);
  253. menuWorkFlow.add(separatorWF1);
  254. menuWorkFlow.add(menuItemNextPerson);
  255. menuWorkFlow.add(menuItemAuditResult);
  256. menuWorkFlow.add(kDSeparator7);
  257. menuWorkFlow.add(menuItemSendSmsMessage);
  258. //menuTools
  259. menuTools.add(menuMail);
  260. menuTools.add(menuItemStartWorkFlow);
  261. menuTools.add(menuItemPublishReport);
  262. //menuMail
  263. menuMail.add(menuItemToHTML);
  264. menuMail.add(menuItemCopyScreen);
  265. menuMail.add(menuItemToExcel);
  266. //menuHelp
  267. menuHelp.add(menuItemHelp);
  268. menuHelp.add(kDSeparator12);
  269. menuHelp.add(menuItemRegPro);
  270. menuHelp.add(menuItemPersonalSite);
  271. menuHelp.add(helpseparatorDiv);
  272. menuHelp.add(menuitemProductval);
  273. menuHelp.add(kDSeparatorProduct);
  274. menuHelp.add(menuItemAbout);
  275. }
  276. /**
  277. * output initUIToolBarLayout method
  278. */
  279. public void initUIToolBarLayout()
  280. {
  281. this.toolBar.add(btnAddNew);
  282. this.toolBar.add(btnCloud);
  283. this.toolBar.add(btnView);
  284. this.toolBar.add(btnEdit);
  285. this.toolBar.add(btnXunTong);
  286. this.toolBar.add(btnRemove);
  287. this.toolBar.add(btnRefresh);
  288. this.toolBar.add(kDSeparatorCloud);
  289. this.toolBar.add(btnQuery);
  290. this.toolBar.add(btnLocate);
  291. this.toolBar.add(btnAttachment);
  292. this.toolBar.add(separatorFW1);
  293. this.toolBar.add(btnPageSetup);
  294. this.toolBar.add(btnPrint);
  295. this.toolBar.add(btnPrintPreview);
  296. this.toolBar.add(btnBatchPrint);
  297. this.toolBar.add(btnBatchPrintPreview);
  298. this.toolBar.add(separatorFW2);
  299. this.toolBar.add(btnCreateTo);
  300. this.toolBar.add(btnCopyTo);
  301. this.toolBar.add(btnQueryScheme);
  302. this.toolBar.add(separatorFW3);
  303. this.toolBar.add(btnTraceUp);
  304. this.toolBar.add(btnTraceDown);
  305. this.toolBar.add(btnWorkFlowG);
  306. this.toolBar.add(btnWorkFlowList);
  307. this.toolBar.add(btnSignature);
  308. this.toolBar.add(btnViewSignature);
  309. this.toolBar.add(separatorFW4);
  310. this.toolBar.add(btnVoucher);
  311. this.toolBar.add(btnNumberSign);
  312. this.toolBar.add(btnDelVoucher);
  313. this.toolBar.add(btnMultiapprove);
  314. this.toolBar.add(btnNextPerson);
  315. this.toolBar.add(btnPCVoucher);
  316. this.toolBar.add(btnAuditResult);
  317. this.toolBar.add(btnCancel);
  318. this.toolBar.add(btnDelPCVoucher);
  319. this.toolBar.add(btnCancelCancel);
  320. this.toolBar.add(btnWFViewdoProccess);
  321. this.toolBar.add(btnAudit);
  322. this.toolBar.add(btnUnaudit);
  323. this.toolBar.add(btnAbort);
  324. }
  325. //Regiester control's property binding.
  326. private void registerBindings(){
  327. }
  328. //Regiester UI State
  329. private void registerUIState(){
  330. }
  331. public String getUIHandlerClassName() {
  332. return "com.kingdee.eas.custom.bill.salary.app.SalaryBagListUIHandler";
  333. }
  334. public IUIActionPostman prepareInit() {
  335. IUIActionPostman clientHanlder = super.prepareInit();
  336. if (clientHanlder != null) {
  337. RequestContext request = new RequestContext();
  338. request.setClassName(getUIHandlerClassName());
  339. clientHanlder.setRequestContext(request);
  340. }
  341. return clientHanlder;
  342. }
  343. public boolean isPrepareInit() {
  344. return false;
  345. }
  346. protected void initUIP() {
  347. super.initUIP();
  348. }
  349. /**
  350. * output setDataObject method
  351. */
  352. public void setDataObject(IObjectValue dataObject)
  353. {
  354. IObjectValue ov = dataObject;
  355. super.setDataObject(ov);
  356. }
  357. protected void Remove() throws Exception {
  358. IObjectValue editData = getBizInterface().getValue(new com.kingdee.bos.dao.ormapping.ObjectUuidPK(BOSUuid.read(getSelectedKeyValue())));
  359. super.Remove();
  360. recycleNumberByOrg(editData,"",editData.getString("number"));
  361. }
  362. protected void recycleNumberByOrg(IObjectValue editData,String orgType,String number) {
  363. if (!StringUtils.isEmpty(number))
  364. {
  365. try {
  366. String companyID = null;
  367. com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
  368. if(!com.kingdee.util.StringUtils.isEmpty(orgType) && !"NONE".equalsIgnoreCase(orgType) && com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType))!=null) {
  369. companyID =com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
  370. }
  371. else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
  372. companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
  373. }
  374. if (!StringUtils.isEmpty(companyID) && iCodingRuleManager.isExist(editData, companyID) && iCodingRuleManager.isUseIntermitNumber(editData, companyID)) {
  375. iCodingRuleManager.recycleNumber(editData,companyID,number);
  376. }
  377. }
  378. catch (Exception e)
  379. {
  380. handUIException(e);
  381. }
  382. }
  383. }
  384. protected com.kingdee.eas.basedata.org.OrgType getMainBizOrgType() {
  385. return com.kingdee.eas.basedata.org.OrgType.getEnum("Admin");
  386. }
  387. /**
  388. * output loadFields method
  389. */
  390. public void loadFields()
  391. {
  392. dataBinder.loadFields();
  393. }
  394. /**
  395. * output storeFields method
  396. */
  397. public void storeFields()
  398. {
  399. dataBinder.storeFields();
  400. }
  401. /**
  402. * ????????§µ??
  403. */
  404. protected void registerValidator() {
  405. getValidateHelper().setCustomValidator( getValidator() );
  406. }
  407. /**
  408. * output setOprtState method
  409. */
  410. public void setOprtState(String oprtType)
  411. {
  412. super.setOprtState(oprtType);
  413. }
  414. public SelectorItemCollection getBOTPSelectors() {
  415. SelectorItemCollection sic = new SelectorItemCollection();
  416. return sic;
  417. }
  418. protected FilterInfo getDefaultFilterForQuery() {
  419. FilterInfo filter = super.getDefaultFilterForQuery();
  420. if (filter == null)
  421. filter = new FilterInfo();
  422. FilterInfo otherFilter = com.kingdee.eas.framework.FrameWorkUtils.getF7FilterInfoByAuthorizedOrg(com.kingdee.eas.basedata.org.OrgType.getEnum("Admin"),"adminOrgUnit.id",true);
  423. if (otherFilter != null) {
  424. for(int i=0,n=otherFilter.getFilterItems().size();i<n;i++){
  425. FilterItemInfo curFilterItem =otherFilter.getFilterItems().get(i);
  426. if(curFilterItem.getCompareValue()!=null && (curFilterItem.getCompareValue() instanceof String)){
  427. if("*".equalsIgnoreCase((String)(curFilterItem.getCompareValue()))){
  428. BOSUuid nullUuid=BOSUuid.create("nullnull");
  429. curFilterItem.setCompareValue(nullUuid.toString());
  430. }
  431. }
  432. }
  433. try {
  434. if (com.kingdee.eas.framework.util.FilterUtility.hasFilterItem(filter))
  435. filter.mergeFilter(otherFilter, "AND");
  436. else
  437. filter = otherFilter;
  438. } catch (Exception e) {
  439. this.handUIException(e);
  440. }
  441. }
  442. return filter;
  443. }
  444. /**
  445. * output getSelectors method
  446. */
  447. public SelectorItemCollection getSelectors()
  448. {
  449. SelectorItemCollection sic = new SelectorItemCollection();
  450. String selectorAll = System.getProperty("selector.all");
  451. if(StringUtils.isEmpty(selectorAll)){
  452. selectorAll = "true";
  453. }
  454. sic.add(new SelectorItemInfo("id"));
  455. sic.add(new SelectorItemInfo("number"));
  456. sic.add(new SelectorItemInfo("bizDate"));
  457. sic.add(new SelectorItemInfo("description"));
  458. sic.add(new SelectorItemInfo("applier.id"));
  459. sic.add(new SelectorItemInfo("applier.name"));
  460. sic.add(new SelectorItemInfo("adminOrg.id"));
  461. sic.add(new SelectorItemInfo("adminOrg.displayName"));
  462. sic.add(new SelectorItemInfo("applyDate"));
  463. sic.add(new SelectorItemInfo("hrOrgUnit.id"));
  464. sic.add(new SelectorItemInfo("hrOrgUnit.name"));
  465. sic.add(new SelectorItemInfo("billState"));
  466. sic.add(new SelectorItemInfo("approveType"));
  467. sic.add(new SelectorItemInfo("adminOrgUnit.name"));
  468. sic.add(new SelectorItemInfo("entrys.months"));
  469. sic.add(new SelectorItemInfo("entrys.moneys"));
  470. sic.add(new SelectorItemInfo("entrys.beforeAmount"));
  471. sic.add(new SelectorItemInfo("entrys.reissueAmount"));
  472. sic.add(new SelectorItemInfo("entrys.amountPayable"));
  473. sic.add(new SelectorItemInfo("person.name"));
  474. sic.add(new SelectorItemInfo("money"));
  475. sic.add(new SelectorItemInfo("startDate"));
  476. sic.add(new SelectorItemInfo("endDate"));
  477. sic.add(new SelectorItemInfo("reissueDate"));
  478. sic.add(new SelectorItemInfo("status"));
  479. return sic;
  480. } protected java.util.List getQuerySorterFields()
  481. {
  482. java.util.List sorterFieldList = new ArrayList();
  483. sorterFieldList.add("number");
  484. return sorterFieldList;
  485. }
  486. protected java.util.List getQueryPKFields()
  487. {
  488. java.util.List pkList = new ArrayList();
  489. pkList.add("id");
  490. return pkList;
  491. }
  492. /**
  493. * output actionRemove_actionPerformed method
  494. */
  495. public void actionRemove_actionPerformed(ActionEvent e) throws Exception
  496. {
  497. super.actionRemove_actionPerformed(e);
  498. }
  499. /**
  500. * output actionAudit_actionPerformed method
  501. */
  502. public void actionAudit_actionPerformed(ActionEvent e) throws Exception
  503. {
  504. super.actionAudit_actionPerformed(e);
  505. }
  506. /**
  507. * output actionUnaudit_actionPerformed method
  508. */
  509. public void actionUnaudit_actionPerformed(ActionEvent e) throws Exception
  510. {
  511. super.actionUnaudit_actionPerformed(e);
  512. }
  513. /**
  514. * output actionTDPrint_actionPerformed method
  515. */
  516. public void actionTDPrint_actionPerformed(ActionEvent e) throws Exception
  517. {
  518. checkSelected();
  519. ArrayList idList =super.getSelectedIdValues();
  520. if (idList == null || idList.size() == 0 || getTDQueryPK() == null || getTDFileName() == null)
  521. return;
  522. com.kingdee.bos.ctrl.kdf.data.impl.BOSQueryDelegate data = new com.kingdee.eas.framework.util.CommonDataProvider(idList,getTDQueryPK());
  523. com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper appHlp = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper();
  524. appHlp.print(getTDFileName(), data, javax.swing.SwingUtilities.getWindowAncestor(this));
  525. }
  526. /**
  527. * output actionTDPrintPreview_actionPerformed method
  528. */
  529. public void actionTDPrintPreview_actionPerformed(ActionEvent e) throws Exception
  530. {
  531. checkSelected();
  532. ArrayList idList =super.getSelectedIdValues();
  533. if (idList == null || idList.size() == 0 || getTDQueryPK() == null || getTDFileName() == null)
  534. return;
  535. com.kingdee.bos.ctrl.kdf.data.impl.BOSQueryDelegate data = new com.kingdee.eas.framework.util.CommonDataProvider(idList,getTDQueryPK());
  536. com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper appHlp = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper();
  537. appHlp.printPreview(getTDFileName(), data, javax.swing.SwingUtilities.getWindowAncestor(this));
  538. }
  539. public RequestContext prepareActionRemove(IItemAction itemAction) throws Exception {
  540. RequestContext request = super.prepareActionRemove(itemAction);
  541. if (request != null) {
  542. request.setClassName(getUIHandlerClassName());
  543. }
  544. return request;
  545. }
  546. public boolean isPrepareActionRemove() {
  547. return false;
  548. }
  549. public RequestContext prepareActionAudit(IItemAction itemAction) throws Exception {
  550. RequestContext request = super.prepareActionAudit(itemAction);
  551. if (request != null) {
  552. request.setClassName(getUIHandlerClassName());
  553. }
  554. return request;
  555. }
  556. public boolean isPrepareActionAudit() {
  557. return false;
  558. }
  559. public RequestContext prepareActionUnaudit(IItemAction itemAction) throws Exception {
  560. RequestContext request = super.prepareActionUnaudit(itemAction);
  561. if (request != null) {
  562. request.setClassName(getUIHandlerClassName());
  563. }
  564. return request;
  565. }
  566. public boolean isPrepareActionUnaudit() {
  567. return false;
  568. }
  569. public RequestContext prepareActionTDPrint(IItemAction itemAction) throws Exception {
  570. RequestContext request = new RequestContext();
  571. if (request != null) {
  572. request.setClassName(getUIHandlerClassName());
  573. }
  574. return request;
  575. }
  576. public boolean isPrepareActionTDPrint() {
  577. return false;
  578. }
  579. public RequestContext prepareActionTDPrintPreview(IItemAction itemAction) throws Exception {
  580. RequestContext request = new RequestContext();
  581. if (request != null) {
  582. request.setClassName(getUIHandlerClassName());
  583. }
  584. return request;
  585. }
  586. public boolean isPrepareActionTDPrintPreview() {
  587. return false;
  588. }
  589. /**
  590. * output ActionTDPrint class
  591. */
  592. protected class ActionTDPrint extends ItemAction {
  593. public ActionTDPrint()
  594. {
  595. this(null);
  596. }
  597. public ActionTDPrint(IUIObject uiObject)
  598. {
  599. super(uiObject);
  600. String _tempStr = null;
  601. _tempStr = resHelper.getString("ActionTDPrint.SHORT_DESCRIPTION");
  602. this.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  603. _tempStr = resHelper.getString("ActionTDPrint.LONG_DESCRIPTION");
  604. this.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  605. _tempStr = resHelper.getString("ActionTDPrint.NAME");
  606. this.putValue(ItemAction.NAME, _tempStr);
  607. }
  608. public void actionPerformed(ActionEvent e)
  609. {
  610. getUIContext().put("ORG.PK", getOrgPK(this));
  611. innerActionPerformed("eas", AbstractSalaryBagListUI.this, "ActionTDPrint", "actionTDPrint_actionPerformed", e);
  612. }
  613. }
  614. /**
  615. * output ActionTDPrintPreview class
  616. */
  617. protected class ActionTDPrintPreview extends ItemAction {
  618. public ActionTDPrintPreview()
  619. {
  620. this(null);
  621. }
  622. public ActionTDPrintPreview(IUIObject uiObject)
  623. {
  624. super(uiObject);
  625. String _tempStr = null;
  626. _tempStr = resHelper.getString("ActionTDPrintPreview.SHORT_DESCRIPTION");
  627. this.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  628. _tempStr = resHelper.getString("ActionTDPrintPreview.LONG_DESCRIPTION");
  629. this.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  630. _tempStr = resHelper.getString("ActionTDPrintPreview.NAME");
  631. this.putValue(ItemAction.NAME, _tempStr);
  632. }
  633. public void actionPerformed(ActionEvent e)
  634. {
  635. getUIContext().put("ORG.PK", getOrgPK(this));
  636. innerActionPerformed("eas", AbstractSalaryBagListUI.this, "ActionTDPrintPreview", "actionTDPrintPreview_actionPerformed", e);
  637. }
  638. }
  639. /**
  640. * output getMetaDataPK method
  641. */
  642. public IMetaDataPK getMetaDataPK()
  643. {
  644. return new MetaDataPK("com.kingdee.eas.custom.bill.salary.client", "SalaryBagListUI");
  645. }
  646. /**
  647. * output isBindWorkFlow method
  648. */
  649. public boolean isBindWorkFlow()
  650. {
  651. return true;
  652. }
  653. /**
  654. * output getEditUIName method
  655. */
  656. protected String getEditUIName()
  657. {
  658. return com.kingdee.eas.custom.bill.salary.client.SalaryBagEditUI.class.getName();
  659. }
  660. /**
  661. * output getBizInterface method
  662. */
  663. protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception
  664. {
  665. return com.kingdee.eas.custom.bill.salary.SalaryBagFactory.getRemoteInstance();
  666. }
  667. /**
  668. * output createNewData method
  669. */
  670. protected IObjectValue createNewData()
  671. {
  672. com.kingdee.eas.custom.bill.salary.SalaryBagInfo objectValue = new com.kingdee.eas.custom.bill.salary.SalaryBagInfo();
  673. return objectValue;
  674. }
  675. /**
  676. * output getMergeColumnKeys method
  677. */
  678. public String[] getMergeColumnKeys()
  679. {
  680. return new String[] {"id","number","applier.id","applier.name","adminOrgUnit.id","adminOrgUnit.displayName","applyDate","billState","bizDate","hrOrgUnit.id","hrOrgUnit.name","description","approveType","adminOrgUnit.name","person.name","money","startDate","endDate","reissueDate","status"};
  681. }
  682. protected String getTDFileName() {
  683. return "/bim/custom/bill/salary/SalaryBag";
  684. }
  685. protected IMetaDataPK getTDQueryPK() {
  686. return new MetaDataPK("com.kingdee.eas.custom.bill.salary.app.SalaryBagQuery");
  687. }
  688. }