23e7cd007eba2a3c2f3adcece8ee4d276b689ad0.svn-base 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  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 AbstractPayPacketListUI extends com.kingdee.eas.framework.client.CoreBillListUI
  42. {
  43. private static final Logger logger = CoreUIObject.getLogger(AbstractPayPacketListUI.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 AbstractPayPacketListUI() 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(AbstractPayPacketListUI.class.getName());
  63. this.setUITitle(resHelper.getString("this.title"));
  64. mainQueryPK = new MetaDataPK("com.kingdee.eas.custom.bill.salary.app", "PayPacketQuery");
  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. //actionTDPrint
  81. this.actionTDPrint = new ActionTDPrint(this);
  82. getActionManager().registerAction("actionTDPrint", actionTDPrint);
  83. this.actionTDPrint.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  84. //actionTDPrintPreview
  85. this.actionTDPrintPreview = new ActionTDPrintPreview(this);
  86. getActionManager().registerAction("actionTDPrintPreview", actionTDPrintPreview);
  87. this.actionTDPrintPreview.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  88. // CoreUI
  89. 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=\"sCol4\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol5\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol6\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol8\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol10\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol11\"><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:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol15\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol16\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol18\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol19\"><c:NumberFormat>&amp;date</c:NumberFormat></c:Style><c:Style id=\"sCol20\"><c:NumberFormat>&amp;date</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;double</c:NumberFormat></c:Style><c:Style id=\"sCol24\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol25\"><c:NumberFormat>&amp;double</c:NumberFormat></c:Style><c:Style id=\"sCol26\"><c:NumberFormat>&amp;double</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=\"bizDate\" 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=\"description\" 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=\"createTime\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol4\" /><t:Column t:key=\"lastUpdateTime\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol5\" /><t:Column t:key=\"auditor.number\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol6\" /><t:Column t:key=\"auditor.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=\"creator.number\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol8\" /><t:Column t:key=\"creator.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=\"lastUpdateUser.number\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol10\" /><t:Column t:key=\"lastUpdateUser.name\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol11\" /><t:Column t:key=\"entrys.id\" 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=\"handler.number\" 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=\"handler.name\" 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.seq\" 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=\"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=\"sCol16\" /><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=\"sCol18\" /><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=\"sCol19\" /><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=\"sCol20\" /><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=\"sCol21\" /><t:Column t:key=\"entrys.month\" 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=\"entrys.money0\" 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=\"entrys.changeAmount\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol24\" /><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=\"sCol25\" /><t:Column t:key=\"entrys.salary\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol26\" /><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=\"header\" t:height=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\"><t:Cell>$Resource{id}</t:Cell><t:Cell>$Resource{number}</t:Cell><t:Cell>$Resource{bizDate}</t:Cell><t:Cell>$Resource{description}</t:Cell><t:Cell>$Resource{createTime}</t:Cell><t:Cell>$Resource{lastUpdateTime}</t:Cell><t:Cell>$Resource{auditor.number}</t:Cell><t:Cell>$Resource{auditor.name}</t:Cell><t:Cell>$Resource{creator.number}</t:Cell><t:Cell>$Resource{creator.name}</t:Cell><t:Cell>$Resource{lastUpdateUser.number}</t:Cell><t:Cell>$Resource{lastUpdateUser.name}</t:Cell><t:Cell>$Resource{entrys.id}</t:Cell><t:Cell>$Resource{handler.number}</t:Cell><t:Cell>$Resource{handler.name}</t:Cell><t:Cell>$Resource{entrys.seq}</t:Cell><t:Cell>$Resource{adminOrgUnit.name}</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{entrys.month}</t:Cell><t:Cell>$Resource{entrys.money0}</t:Cell><t:Cell>$Resource{entrys.changeAmount}</t:Cell><t:Cell>$Resource{entrys.reissueAmount}</t:Cell><t:Cell>$Resource{entrys.salary}</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>";
  90. this.tblMain.setFormatXml(resHelper.translateString("tblMain",tblMainStrXML));
  91. this.tblMain.putBindContents("mainQuery",new String[] {"id","number","bizDate","description","createTime","lastUpdateTime","auditor.number","auditor.name","creator.number","creator.name","lastUpdateUser.number","lastUpdateUser.name","entrys.id","handler.number","handler.name","entrys.seq","adminOrgUnit.name","person.name","money","startDate","endDate","reissueDate","entrys.month","entrys.money0","entrys.changeAmount","entrys.reissueAmount","entrys.salary","status"});
  92. this.tblMain.checkParsed();
  93. this.tblMain.getGroupManager().setGroup(true);
  94. this.separatorFW2.setVisible(true);
  95. this.btnAuditResult.setVisible(false);
  96. this.menuItemCopyTo.setVisible(false);
  97. this.kDSeparator4.setVisible(false);
  98. this.kDSeparator6.setVisible(false);
  99. this.menuItemViewDoProccess.setVisible(false);
  100. this.menuItemAuditResult.setVisible(false);
  101. //Register control's property binding
  102. registerBindings();
  103. registerUIState();
  104. }
  105. public com.kingdee.bos.ctrl.swing.KDToolBar[] getUIMultiToolBar(){
  106. java.util.List list = new java.util.ArrayList();
  107. com.kingdee.bos.ctrl.swing.KDToolBar[] bars = super.getUIMultiToolBar();
  108. if (bars != null) {
  109. list.addAll(java.util.Arrays.asList(bars));
  110. }
  111. return (com.kingdee.bos.ctrl.swing.KDToolBar[])list.toArray(new com.kingdee.bos.ctrl.swing.KDToolBar[list.size()]);
  112. }
  113. /**
  114. * output initUIContentLayout method
  115. */
  116. public void initUIContentLayout()
  117. {
  118. this.setBounds(new Rectangle(10, 10, 1013, 629));
  119. this.setLayout(new KDLayout());
  120. this.putClientProperty("OriginalBounds", new Rectangle(10, 10, 1013, 629));
  121. tblMain.setBounds(new Rectangle(10, 10, 996, 580));
  122. 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));
  123. }
  124. /**
  125. * output initUIMenuBarLayout method
  126. */
  127. public void initUIMenuBarLayout()
  128. {
  129. this.menuBar.add(menuFile);
  130. this.menuBar.add(menuEdit);
  131. this.menuBar.add(MenuService);
  132. this.menuBar.add(menuView);
  133. this.menuBar.add(menuBiz);
  134. this.menuBar.add(menuTool);
  135. this.menuBar.add(menuWorkFlow);
  136. this.menuBar.add(menuTools);
  137. this.menuBar.add(menuHelp);
  138. //menuFile
  139. menuFile.add(menuItemAddNew);
  140. menuFile.add(menuItemImportData);
  141. menuFile.add(menuItemCloudFeed);
  142. menuFile.add(menuItemExportData);
  143. menuFile.add(menuItemCloudScreen);
  144. menuFile.add(separatorFile1);
  145. menuFile.add(menuItemCloudShare);
  146. menuFile.add(MenuItemAttachment);
  147. menuFile.add(kDSeparator1);
  148. menuFile.add(kdSeparatorFWFile1);
  149. menuFile.add(menuItemPageSetup);
  150. menuFile.add(menuItemPrint);
  151. menuFile.add(menuItemPrintPreview);
  152. menuFile.add(kDSeparator2);
  153. menuFile.add(menuItemExitCurrent);
  154. //menuEdit
  155. menuEdit.add(menuItemEdit);
  156. menuEdit.add(menuItemRemove);
  157. menuEdit.add(kDSeparator3);
  158. menuEdit.add(menuItemCreateTo);
  159. menuEdit.add(menuItemCopyTo);
  160. menuEdit.add(kDSeparator4);
  161. //MenuService
  162. MenuService.add(MenuItemKnowStore);
  163. MenuService.add(MenuItemAnwser);
  164. MenuService.add(SepratorService);
  165. MenuService.add(MenuItemRemoteAssist);
  166. //menuView
  167. menuView.add(menuItemView);
  168. menuView.add(menuItemLocate);
  169. menuView.add(kDSeparator5);
  170. menuView.add(menuItemQuery);
  171. menuView.add(menuItemRefresh);
  172. menuView.add(menuItemSwitchView);
  173. menuView.add(separatorView1);
  174. menuView.add(menuItemTraceUp);
  175. menuView.add(menuItemTraceDown);
  176. menuView.add(menuItemQueryScheme);
  177. menuView.add(kDSeparator6);
  178. //menuBiz
  179. menuBiz.add(menuItemCancelCancel);
  180. menuBiz.add(menuItemCancel);
  181. menuBiz.add(menuItemVoucher);
  182. menuBiz.add(menuItemDelVoucher);
  183. menuBiz.add(menuItemPCVoucher);
  184. menuBiz.add(menuItemDelPCVoucher);
  185. //menuTool
  186. menuTool.add(menuItemSendMessage);
  187. menuTool.add(menuItemCalculator);
  188. menuTool.add(menuItemToolBarCustom);
  189. //menuWorkFlow
  190. menuWorkFlow.add(menuItemViewDoProccess);
  191. menuWorkFlow.add(menuItemMultiapprove);
  192. menuWorkFlow.add(menuItemWorkFlowG);
  193. menuWorkFlow.add(menuItemWorkFlowList);
  194. menuWorkFlow.add(separatorWF1);
  195. menuWorkFlow.add(menuItemNextPerson);
  196. menuWorkFlow.add(menuItemAuditResult);
  197. menuWorkFlow.add(kDSeparator7);
  198. menuWorkFlow.add(menuItemSendSmsMessage);
  199. //menuTools
  200. menuTools.add(menuMail);
  201. menuTools.add(menuItemStartWorkFlow);
  202. menuTools.add(menuItemPublishReport);
  203. //menuMail
  204. menuMail.add(menuItemToHTML);
  205. menuMail.add(menuItemCopyScreen);
  206. menuMail.add(menuItemToExcel);
  207. //menuHelp
  208. menuHelp.add(menuItemHelp);
  209. menuHelp.add(kDSeparator12);
  210. menuHelp.add(menuItemRegPro);
  211. menuHelp.add(menuItemPersonalSite);
  212. menuHelp.add(helpseparatorDiv);
  213. menuHelp.add(menuitemProductval);
  214. menuHelp.add(kDSeparatorProduct);
  215. menuHelp.add(menuItemAbout);
  216. }
  217. /**
  218. * output initUIToolBarLayout method
  219. */
  220. public void initUIToolBarLayout()
  221. {
  222. this.toolBar.add(btnAddNew);
  223. this.toolBar.add(btnCloud);
  224. this.toolBar.add(btnView);
  225. this.toolBar.add(btnXunTong);
  226. this.toolBar.add(btnEdit);
  227. this.toolBar.add(kDSeparatorCloud);
  228. this.toolBar.add(btnRemove);
  229. this.toolBar.add(btnRefresh);
  230. this.toolBar.add(btnQuery);
  231. this.toolBar.add(btnLocate);
  232. this.toolBar.add(btnAttachment);
  233. this.toolBar.add(separatorFW1);
  234. this.toolBar.add(btnPageSetup);
  235. this.toolBar.add(btnPrint);
  236. this.toolBar.add(btnPrintPreview);
  237. this.toolBar.add(separatorFW2);
  238. this.toolBar.add(btnCreateTo);
  239. this.toolBar.add(btnCopyTo);
  240. this.toolBar.add(btnQueryScheme);
  241. this.toolBar.add(separatorFW3);
  242. this.toolBar.add(btnTraceUp);
  243. this.toolBar.add(btnTraceDown);
  244. this.toolBar.add(btnWorkFlowG);
  245. this.toolBar.add(btnWorkFlowList);
  246. this.toolBar.add(btnSignature);
  247. this.toolBar.add(btnViewSignature);
  248. this.toolBar.add(separatorFW4);
  249. this.toolBar.add(btnNumberSign);
  250. this.toolBar.add(btnVoucher);
  251. this.toolBar.add(btnDelVoucher);
  252. this.toolBar.add(btnPCVoucher);
  253. this.toolBar.add(btnDelPCVoucher);
  254. this.toolBar.add(btnMultiapprove);
  255. this.toolBar.add(btnNextPerson);
  256. this.toolBar.add(btnAuditResult);
  257. this.toolBar.add(btnCancel);
  258. this.toolBar.add(btnCancelCancel);
  259. this.toolBar.add(btnWFViewdoProccess);
  260. }
  261. //Regiester control's property binding.
  262. private void registerBindings(){
  263. }
  264. //Regiester UI State
  265. private void registerUIState(){
  266. }
  267. public String getUIHandlerClassName() {
  268. return "com.kingdee.eas.custom.bill.salary.app.PayPacketListUIHandler";
  269. }
  270. public IUIActionPostman prepareInit() {
  271. IUIActionPostman clientHanlder = super.prepareInit();
  272. if (clientHanlder != null) {
  273. RequestContext request = new RequestContext();
  274. request.setClassName(getUIHandlerClassName());
  275. clientHanlder.setRequestContext(request);
  276. }
  277. return clientHanlder;
  278. }
  279. public boolean isPrepareInit() {
  280. return false;
  281. }
  282. protected void initUIP() {
  283. super.initUIP();
  284. }
  285. /**
  286. * output setDataObject method
  287. */
  288. public void setDataObject(IObjectValue dataObject)
  289. {
  290. IObjectValue ov = dataObject;
  291. super.setDataObject(ov);
  292. }
  293. protected void Remove() throws Exception {
  294. IObjectValue editData = getBizInterface().getValue(new com.kingdee.bos.dao.ormapping.ObjectUuidPK(BOSUuid.read(getSelectedKeyValue())));
  295. super.Remove();
  296. recycleNumberByOrg(editData,"",editData.getString("number"));
  297. }
  298. protected void recycleNumberByOrg(IObjectValue editData,String orgType,String number) {
  299. if (!StringUtils.isEmpty(number))
  300. {
  301. try {
  302. String companyID = null;
  303. com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
  304. 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) {
  305. companyID =com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
  306. }
  307. else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
  308. companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
  309. }
  310. if (!StringUtils.isEmpty(companyID) && iCodingRuleManager.isExist(editData, companyID) && iCodingRuleManager.isUseIntermitNumber(editData, companyID)) {
  311. iCodingRuleManager.recycleNumber(editData,companyID,number);
  312. }
  313. }
  314. catch (Exception e)
  315. {
  316. handUIException(e);
  317. }
  318. }
  319. }
  320. protected com.kingdee.eas.basedata.org.OrgType getMainBizOrgType() {
  321. return com.kingdee.eas.basedata.org.OrgType.getEnum("Admin");
  322. }
  323. /**
  324. * output loadFields method
  325. */
  326. public void loadFields()
  327. {
  328. dataBinder.loadFields();
  329. }
  330. /**
  331. * output storeFields method
  332. */
  333. public void storeFields()
  334. {
  335. dataBinder.storeFields();
  336. }
  337. /**
  338. * ????????§µ??
  339. */
  340. protected void registerValidator() {
  341. getValidateHelper().setCustomValidator( getValidator() );
  342. }
  343. /**
  344. * output setOprtState method
  345. */
  346. public void setOprtState(String oprtType)
  347. {
  348. super.setOprtState(oprtType);
  349. }
  350. public SelectorItemCollection getBOTPSelectors() {
  351. SelectorItemCollection sic = new SelectorItemCollection();
  352. return sic;
  353. }
  354. protected FilterInfo getDefaultFilterForQuery() {
  355. FilterInfo filter = super.getDefaultFilterForQuery();
  356. if (filter == null)
  357. filter = new FilterInfo();
  358. FilterInfo otherFilter = com.kingdee.eas.framework.FrameWorkUtils.getF7FilterInfoByAuthorizedOrg(com.kingdee.eas.basedata.org.OrgType.getEnum("Admin"),"adminOrgUnit.id",true);
  359. if (otherFilter != null) {
  360. for(int i=0,n=otherFilter.getFilterItems().size();i<n;i++){
  361. FilterItemInfo curFilterItem =otherFilter.getFilterItems().get(i);
  362. if(curFilterItem.getCompareValue()!=null && (curFilterItem.getCompareValue() instanceof String)){
  363. if("*".equalsIgnoreCase((String)(curFilterItem.getCompareValue()))){
  364. BOSUuid nullUuid=BOSUuid.create("nullnull");
  365. curFilterItem.setCompareValue(nullUuid.toString());
  366. }
  367. }
  368. }
  369. try {
  370. if (com.kingdee.eas.framework.util.FilterUtility.hasFilterItem(filter))
  371. filter.mergeFilter(otherFilter, "AND");
  372. else
  373. filter = otherFilter;
  374. } catch (Exception e) {
  375. this.handUIException(e);
  376. }
  377. }
  378. return filter;
  379. }
  380. /**
  381. * output getSelectors method
  382. */
  383. public SelectorItemCollection getSelectors()
  384. {
  385. SelectorItemCollection sic = new SelectorItemCollection();
  386. String selectorAll = System.getProperty("selector.all");
  387. if(StringUtils.isEmpty(selectorAll)){
  388. selectorAll = "true";
  389. }
  390. sic.add(new SelectorItemInfo("id"));
  391. sic.add(new SelectorItemInfo("number"));
  392. sic.add(new SelectorItemInfo("bizDate"));
  393. sic.add(new SelectorItemInfo("description"));
  394. sic.add(new SelectorItemInfo("createTime"));
  395. sic.add(new SelectorItemInfo("lastUpdateTime"));
  396. sic.add(new SelectorItemInfo("auditor.number"));
  397. sic.add(new SelectorItemInfo("auditor.name"));
  398. sic.add(new SelectorItemInfo("creator.number"));
  399. sic.add(new SelectorItemInfo("creator.name"));
  400. sic.add(new SelectorItemInfo("lastUpdateUser.number"));
  401. sic.add(new SelectorItemInfo("lastUpdateUser.name"));
  402. sic.add(new SelectorItemInfo("entrys.id"));
  403. sic.add(new SelectorItemInfo("handler.number"));
  404. sic.add(new SelectorItemInfo("handler.name"));
  405. sic.add(new SelectorItemInfo("entrys.seq"));
  406. sic.add(new SelectorItemInfo("adminOrgUnit.name"));
  407. sic.add(new SelectorItemInfo("person.name"));
  408. sic.add(new SelectorItemInfo("money"));
  409. sic.add(new SelectorItemInfo("startDate"));
  410. sic.add(new SelectorItemInfo("endDate"));
  411. sic.add(new SelectorItemInfo("reissueDate"));
  412. sic.add(new SelectorItemInfo("entrys.month"));
  413. sic.add(new SelectorItemInfo("entrys.money0"));
  414. sic.add(new SelectorItemInfo("entrys.changeAmount"));
  415. sic.add(new SelectorItemInfo("entrys.reissueAmount"));
  416. sic.add(new SelectorItemInfo("entrys.salary"));
  417. sic.add(new SelectorItemInfo("status"));
  418. return sic;
  419. } protected java.util.List getQuerySorterFields()
  420. {
  421. java.util.List sorterFieldList = new ArrayList();
  422. sorterFieldList.add("number");
  423. sorterFieldList.add("entrys.seq");
  424. return sorterFieldList;
  425. }
  426. protected java.util.List getQueryPKFields()
  427. {
  428. java.util.List pkList = new ArrayList();
  429. pkList.add("id");
  430. pkList.add("entrys.id");
  431. return pkList;
  432. }
  433. /**
  434. * output actionRemove_actionPerformed method
  435. */
  436. public void actionRemove_actionPerformed(ActionEvent e) throws Exception
  437. {
  438. super.actionRemove_actionPerformed(e);
  439. }
  440. /**
  441. * output actionTDPrint_actionPerformed method
  442. */
  443. public void actionTDPrint_actionPerformed(ActionEvent e) throws Exception
  444. {
  445. checkSelected();
  446. ArrayList idList =super.getSelectedIdValues();
  447. if (idList == null || idList.size() == 0 || getTDQueryPK() == null || getTDFileName() == null)
  448. return;
  449. com.kingdee.bos.ctrl.reportone.r1.print.data.AbstractPrintDataProvider data = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.DefaultNoteDataProvider(idList,getTDQueryPK());
  450. com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper appHlp = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper();
  451. appHlp.print(getTDFileName(), data, javax.swing.SwingUtilities.getWindowAncestor(this));
  452. }
  453. /**
  454. * output actionTDPrintPreview_actionPerformed method
  455. */
  456. public void actionTDPrintPreview_actionPerformed(ActionEvent e) throws Exception
  457. {
  458. checkSelected();
  459. ArrayList idList =super.getSelectedIdValues();
  460. if (idList == null || idList.size() == 0 || getTDQueryPK() == null || getTDFileName() == null)
  461. return;
  462. com.kingdee.bos.ctrl.reportone.r1.print.data.AbstractPrintDataProvider data = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.DefaultNoteDataProvider(idList,getTDQueryPK());
  463. com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper appHlp = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper();
  464. appHlp.printPreview(getTDFileName(), data, javax.swing.SwingUtilities.getWindowAncestor(this));
  465. }
  466. public RequestContext prepareActionRemove(IItemAction itemAction) throws Exception {
  467. RequestContext request = super.prepareActionRemove(itemAction);
  468. if (request != null) {
  469. request.setClassName(getUIHandlerClassName());
  470. }
  471. return request;
  472. }
  473. public boolean isPrepareActionRemove() {
  474. return false;
  475. }
  476. public RequestContext prepareActionTDPrint(IItemAction itemAction) throws Exception {
  477. RequestContext request = new RequestContext();
  478. if (request != null) {
  479. request.setClassName(getUIHandlerClassName());
  480. }
  481. return request;
  482. }
  483. public boolean isPrepareActionTDPrint() {
  484. return false;
  485. }
  486. public RequestContext prepareActionTDPrintPreview(IItemAction itemAction) throws Exception {
  487. RequestContext request = new RequestContext();
  488. if (request != null) {
  489. request.setClassName(getUIHandlerClassName());
  490. }
  491. return request;
  492. }
  493. public boolean isPrepareActionTDPrintPreview() {
  494. return false;
  495. }
  496. /**
  497. * output ActionTDPrint class
  498. */
  499. protected class ActionTDPrint extends ItemAction {
  500. public ActionTDPrint()
  501. {
  502. this(null);
  503. }
  504. public ActionTDPrint(IUIObject uiObject)
  505. {
  506. super(uiObject);
  507. String _tempStr = null;
  508. _tempStr = resHelper.getString("ActionTDPrint.SHORT_DESCRIPTION");
  509. this.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  510. _tempStr = resHelper.getString("ActionTDPrint.LONG_DESCRIPTION");
  511. this.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  512. _tempStr = resHelper.getString("ActionTDPrint.NAME");
  513. this.putValue(ItemAction.NAME, _tempStr);
  514. }
  515. public void actionPerformed(ActionEvent e)
  516. {
  517. getUIContext().put("ORG.PK", getOrgPK(this));
  518. innerActionPerformed("eas", AbstractPayPacketListUI.this, "ActionTDPrint", "actionTDPrint_actionPerformed", e);
  519. }
  520. }
  521. /**
  522. * output ActionTDPrintPreview class
  523. */
  524. protected class ActionTDPrintPreview extends ItemAction {
  525. public ActionTDPrintPreview()
  526. {
  527. this(null);
  528. }
  529. public ActionTDPrintPreview(IUIObject uiObject)
  530. {
  531. super(uiObject);
  532. String _tempStr = null;
  533. _tempStr = resHelper.getString("ActionTDPrintPreview.SHORT_DESCRIPTION");
  534. this.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  535. _tempStr = resHelper.getString("ActionTDPrintPreview.LONG_DESCRIPTION");
  536. this.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  537. _tempStr = resHelper.getString("ActionTDPrintPreview.NAME");
  538. this.putValue(ItemAction.NAME, _tempStr);
  539. }
  540. public void actionPerformed(ActionEvent e)
  541. {
  542. getUIContext().put("ORG.PK", getOrgPK(this));
  543. innerActionPerformed("eas", AbstractPayPacketListUI.this, "ActionTDPrintPreview", "actionTDPrintPreview_actionPerformed", e);
  544. }
  545. }
  546. /**
  547. * output getMetaDataPK method
  548. */
  549. public IMetaDataPK getMetaDataPK()
  550. {
  551. return new MetaDataPK("com.kingdee.eas.custom.bill.salary.client", "PayPacketListUI");
  552. }
  553. /**
  554. * output isBindWorkFlow method
  555. */
  556. public boolean isBindWorkFlow()
  557. {
  558. return true;
  559. }
  560. /**
  561. * output getEditUIName method
  562. */
  563. protected String getEditUIName()
  564. {
  565. return com.kingdee.eas.custom.bill.salary.client.PayPacketEditUI.class.getName();
  566. }
  567. /**
  568. * output getBizInterface method
  569. */
  570. protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception
  571. {
  572. return com.kingdee.eas.custom.bill.salary.PayPacketFactory.getRemoteInstance();
  573. }
  574. /**
  575. * output createNewData method
  576. */
  577. protected IObjectValue createNewData()
  578. {
  579. com.kingdee.eas.custom.bill.salary.PayPacketInfo objectValue = new com.kingdee.eas.custom.bill.salary.PayPacketInfo();
  580. return objectValue;
  581. }
  582. /**
  583. * output getMergeColumnKeys method
  584. */
  585. public String[] getMergeColumnKeys()
  586. {
  587. return new String[] {"id","number","bizDate","description","createTime","lastUpdateTime","auditor.number","auditor.name","creator.number","creator.name","lastUpdateUser.number","lastUpdateUser.name","handler.number","handler.name","adminOrgUnit.name","person.name","money","startDate","endDate","reissueDate","status"};
  588. }
  589. protected String getTDFileName() {
  590. return "/bim/custom/bill/salary/PayPacket";
  591. }
  592. protected IMetaDataPK getTDQueryPK() {
  593. return new MetaDataPK("com.kingdee.eas.custom.bill.salary.app.PayPacketQuery");
  594. }
  595. }